diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 000000000000..9628a309e345 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,21 @@ +# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.145.0/containers/codespaces-linux/.devcontainer/base.Dockerfile + +FROM mcr.microsoft.com/vscode/devcontainers/universal:0-linux + +USER root + +# [Option] Install Docker CLI +ARG INSTALL_DOCKER="false" +COPY library-scripts/docker-debian.sh /tmp/library-scripts/ +RUN if [ "${INSTALL_DOCKER}" = "true" ]; then \ + rm -f /usr/local/share/docker-init.sh \ + && bash /tmp/library-scripts/docker-debian.sh "true" "/var/run/docker-host.sock" "/var/run/docker.sock" "codespace"; \ + fi \ + && rm -rf /var/lib/apt/lists/* /tmp/library-scripts/ + +USER codespace + +# ** [Optional] Uncomment this section to install additional packages. ** +# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ +# && apt-get -y install --no-install-recommends + diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 000000000000..80712a781c15 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,52 @@ +{ + "name": "GitHub Codespaces (Default)", + "build": { + "dockerfile": "Dockerfile", + "args": { + "INSTALL_DOCKER": "true" + } + }, + "settings": { + "terminal.integrated.shell.linux": "/bin/bash", + "go.useGoProxyToCheckForToolUpdates": false, + "go.useLanguageServer": true, + "go.gopath": "/go", + "go.goroot": "/usr/local/go", + "go.toolsGopath": "/go/bin", + "python.pythonPath": "/opt/python/latest/bin/python", + "python.linting.enabled": true, + "python.linting.pylintEnabled": true, + "python.formatting.autopep8Path": "/usr/local/py-utils/bin/autopep8", + "python.formatting.blackPath": "/usr/local/py-utils/bin/black", + "python.formatting.yapfPath": "/usr/local/py-utils/bin/yapf", + "python.linting.banditPath": "/usr/local/py-utils/bin/bandit", + "python.linting.flake8Path": "/usr/local/py-utils/bin/flake8", + "python.linting.mypyPath": "/usr/local/py-utils/bin/mypy", + "python.linting.pycodestylePath": "/usr/local/py-utils/bin/pycodestyle", + "python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle", + "python.linting.pylintPath": "/usr/local/py-utils/bin/pylint", + "lldb.executable": "/usr/bin/lldb", + "files.watcherExclude": { + "**/target/**": true + } + }, + "remoteUser": "codespace", + "overrideCommand": false, + "workspaceMount": "source=${localWorkspaceFolder},target=/home/codespace/workspace,type=bind,consistency=cached", + "workspaceFolder": "/home/codespace/workspace", + "mounts": [ "source=/var/run/docker.sock,target=/var/run/docker-host.sock,type=bind" ], + "runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined" ], + + // Add the IDs of extensions you want installed when the container is created. + "extensions": [ + "GitHub.vscode-pull-request-github", + "MS-vsliveshare.vsliveshare", + "VisualStudioExptTeam.vscodeintellicode" + ] + + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], + + // Use 'postCreateCommand' to run commands after the container is created. + // "postCreateCommand": "uname -a" +} diff --git a/.devcontainer/library-scripts/docker-debian.sh b/.devcontainer/library-scripts/docker-debian.sh new file mode 100644 index 000000000000..42ee7d6cd382 --- /dev/null +++ b/.devcontainer/library-scripts/docker-debian.sh @@ -0,0 +1,172 @@ +#!/usr/bin/env bash +#------------------------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information. +#------------------------------------------------------------------------------------------------------------- +# +# Docs: https://github.com/microsoft/vscode-dev-containers/blob/master/script-library/docs/docker.md +# +# Syntax: ./docker-debian.sh [enable non-root docker socket access flag] [source socket] [target socket] [non-root user] + +ENABLE_NONROOT_DOCKER=${1:-"true"} +SOURCE_SOCKET=${2:-"/var/run/docker-host.sock"} +TARGET_SOCKET=${3:-"/var/run/docker.sock"} +USERNAME=${4:-"automatic"} + +set -e + +if [ "$(id -u)" -ne 0 ]; then + echo -e 'Script must be run as root. Use sudo, su, or add "USER root" to your Dockerfile before running this script.' + exit 1 +fi + +# Determine the appropriate non-root user +if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then + USERNAME="" + POSSIBLE_USERS=("vscode" "node" "codespace" "$(awk -v val=1000 -F ":" '$3==val{print $1}' /etc/passwd)") + for CURRENT_USER in ${POSSIBLE_USERS[@]}; do + if id -u ${CURRENT_USER} > /dev/null 2>&1; then + USERNAME=${CURRENT_USER} + break + fi + done + if [ "${USERNAME}" = "" ]; then + USERNAME=root + fi +elif [ "${USERNAME}" = "none" ] || ! id -u ${USERNAME} > /dev/null 2>&1; then + USERNAME=root +fi + +# Function to run apt-get if needed +apt-get-update-if-needed() +{ + if [ ! -d "/var/lib/apt/lists" ] || [ "$(ls /var/lib/apt/lists/ | wc -l)" = "0" ]; then + echo "Running apt-get update..." + apt-get update + else + echo "Skipping apt-get update." + fi +} + +# Ensure apt is in non-interactive to avoid prompts +export DEBIAN_FRONTEND=noninteractive + +# Install apt-transport-https, curl, lsb-release, gpg if missing +if ! dpkg -s apt-transport-https curl ca-certificates lsb-release > /dev/null 2>&1 || ! type gpg > /dev/null 2>&1; then + apt-get-update-if-needed + apt-get -y install --no-install-recommends apt-transport-https curl ca-certificates lsb-release gnupg2 +fi + +# Install Docker CLI if not already installed +if type docker > /dev/null 2>&1; then + echo "Docker CLI already installed." +else + curl -fsSL https://download.docker.com/linux/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/gpg | (OUT=$(apt-key add - 2>&1) || echo $OUT) + echo "deb [arch=amd64] https://download.docker.com/linux/$(lsb_release -is | tr '[:upper:]' '[:lower:]') $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list + apt-get update + apt-get -y install --no-install-recommends docker-ce-cli +fi + +# Install Docker Compose if not already installed +if type docker-compose > /dev/null 2>&1; then + echo "Docker Compose already installed." +else + + LATEST_COMPOSE_VERSION=$(curl -sSL "https://api.github.com/repos/docker/compose/releases/latest" | grep -o -P '(?<="tag_name": ").+(?=")') + curl -sSL "https://github.com/docker/compose/releases/download/${LATEST_COMPOSE_VERSION}/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose + chmod +x /usr/local/bin/docker-compose +fi + +# If init file already exists, exit +if [ -f "/usr/local/share/docker-init.sh" ]; then + exit 0 +fi + +# By default, make the source and target sockets the same +if [ "${SOURCE_SOCKET}" != "${TARGET_SOCKET}" ]; then + touch "${SOURCE_SOCKET}" + ln -s "${SOURCE_SOCKET}" "${TARGET_SOCKET}" +fi + +# Add a stub if not adding non-root user access, user is root +if [ "${ENABLE_NONROOT_DOCKER}" = "false" ] || [ "${USERNAME}" = "root" ]; then + echo '/usr/bin/env bash -c "\$@"' > /usr/local/share/docker-init.sh + chmod +x /usr/local/share/docker-init.sh + exit 0 +fi + +# If enabling non-root access and specified user is found, setup socat and add script +chown -h "${USERNAME}":root "${TARGET_SOCKET}" +if ! dpkg -s socat > /dev/null 2>&1; then + apt-get-update-if-needed + apt-get -y install socat +fi +tee /usr/local/share/docker-init.sh > /dev/null \ +<< EOF +#!/usr/bin/env bash +#------------------------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information. +#------------------------------------------------------------------------------------------------------------- + +set -e + +SOCAT_PATH_BASE=/tmp/vscr-dind-socat +SOCAT_LOG=\${SOCAT_PATH_BASE}.log +SOCAT_PID=\${SOCAT_PATH_BASE}.pid + +# Wrapper function to only use sudo if not already root +sudoIf() +{ + if [ "\$(id -u)" -ne 0 ]; then + sudo "\$@" + else + "\$@" + fi +} + +# Log messages +log() +{ + echo -e "[\$(date)] \$@" | sudoIf tee -a \${SOCAT_LOG} > /dev/null +} + +echo -e "\n** \$(date) **" | sudoIf tee -a \${SOCAT_LOG} > /dev/null +log "Ensuring ${USERNAME} has access to ${SOURCE_SOCKET} via ${TARGET_SOCKET}" + +# If enabled, try to add a docker group with the right GID. If the group is root, +# fall back on using socat to forward the docker socket to another unix socket so +# that we can set permissions on it without affecting the host. +if [ "${ENABLE_NONROOT_DOCKER}" = "true" ] && [ "${SOURCE_SOCKET}" != "${TARGET_SOCKET}" ] && [ "${USERNAME}" != "root" ] && [ "${USERNAME}" != "0" ]; then + SOCKET_GID=\$(stat -c '%g' ${SOURCE_SOCKET}) + if [ "\${SOCKET_GID}" != "0" ]; then + log "Adding user to group with GID \${SOCKET_GID}." + if [ "\$(cat /etc/group | grep :\${SOCKET_GID}:)" = "" ]; then + sudoIf groupadd --gid \${SOCKET_GID} docker-host + fi + # Add user to group if not already in it + if [ "\$(id ${USERNAME} | grep -E 'groups=.+\${SOCKET_GID}\(')" = "" ]; then + sudoIf usermod -aG \${SOCKET_GID} ${USERNAME} + fi + else + # Enable proxy if not already running + if [ ! -f "\${SOCAT_PID}" ] || ! ps -p \$(cat \${SOCAT_PID}) > /dev/null; then + log "Enabling socket proxy." + log "Proxying ${SOURCE_SOCKET} to ${TARGET_SOCKET} for vscode" + sudoIf rm -rf ${TARGET_SOCKET} + (sudoIf socat UNIX-LISTEN:${TARGET_SOCKET},fork,mode=660,user=${USERNAME} UNIX-CONNECT:${SOURCE_SOCKET} 2>&1 | sudoIf tee -a \${SOCAT_LOG} > /dev/null & echo "\$!" | sudoIf tee \${SOCAT_PID} > /dev/null) + else + log "Socket proxy already running." + fi + fi + log "Success" +fi + +# Execute whatever commands were passed in (if any). This allows us +# to set this script to ENTRYPOINT while still executing the default CMD. +set +e +exec "\$@" +EOF +chmod +x /usr/local/share/docker-init.sh +chown ${USERNAME}:root /usr/local/share/docker-init.sh +echo "Done!" \ No newline at end of file diff --git a/.devcontainer/library-scripts/git-lfs-debian.sh b/.devcontainer/library-scripts/git-lfs-debian.sh new file mode 100644 index 000000000000..1f5647475aaa --- /dev/null +++ b/.devcontainer/library-scripts/git-lfs-debian.sh @@ -0,0 +1,34 @@ +#!/usr/bin/env bash +#------------------------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information. +#------------------------------------------------------------------------------------------------------------- +# +# Docs: https://github.com/microsoft/vscode-dev-containers/blob/master/script-library/docs/git-lfs.md +# +# Syntax: ./git-lfs-debian.sh + +set -e + +if [ "$(id -u)" -ne 0 ]; then + echo -e 'Script must be run as root. Use sudo, su, or add "USER root" to your Dockerfile before running this script.' + exit 1 +fi + +export DEBIAN_FRONTEND=noninteractive + +# Install git and curl if missing +if ! dpkg -s git curl ca-certificates > /dev/null 2>&1; then + if [ ! -d "/var/lib/apt/lists" ] || [ "$(ls /var/lib/apt/lists/ | wc -l)" = "0" ]; then + apt-get update + fi + apt-get -y install --no-install-recommends git curl ca-certificates +fi + +# Install Git LFS +echo "Downloading Git LFS..." +curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash +echo "Installing Git LFS..." +apt-get install -yq git-lfs +git lfs install +echo "Done!" \ No newline at end of file diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 0f8304009278..8b0833ec9de1 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -38,11 +38,17 @@ /sdk/appconfiguration/ @richardpark-msft @chradek # PRLabel: %Batch -/sdk/batch/ @xingwu1 @matthchr @bgklein @deyaaeldeen +/sdk/batch/ @dpwatrous @paterasMSFT @zfengms @deyaaeldeen + +# PRLabel: %Communication +/sdk/communication/ @RezaJooyandeh @DominikMe @0rland0Wats0n @ankitarorabit @Azure/azure-sdk-communication-code-reviewers # PRLabel: %Cosmos /sdk/cosmosdb/ @southpolesteve @zfoster +# PRLabel: %Digital Twins +/sdk/digitaltwins/ @zolvarga + # PRLabel: %Event Grid /sdk/eventgrid/ @ramya-rao-a @ellismg @@ -75,9 +81,15 @@ # PRLabel: %Cognitive - Form Recognizer /sdk/formrecognizer/ @jeremymeng @willmtemple +# PRLabel: %Cognitive - Metrics Advisor +/sdk/metricsadvisor/ @jeremymeng @KarishmaGhiya + # PRLabel: %Search /sdk/search/ @xirzec @sarangan12 +/sdk/applicationinsights/applicationinsights-query/ @divyajay @geneh @alongafni +/sdk/operationalinsights/loganalytics/ @divyajay @geneh @alongafni + /sdk/cognitiveservices/cognitiveservices-qnamaker-runtime/ @bingisbestest @nerajput1607 /sdk/cognitiveservices/cognitiveservices-qnamaker/ @bingisbestest @nerajput1607 @@ -88,8 +100,8 @@ /sdk/**/review/*api.md @bterlson @xirzec # Management Plane -/**/*Management*.ts @qiaozha -/**/arm-*/ @qiaozha +# PRLabel: %Mgmt +/sdk/**/arm-*/ @qiaozha # PRLabel: %Monitor /sdk/monitor/ @markwolff @xirzec @applicationinsights-js-owners diff --git a/.gitignore b/.gitignore index 0923f6e17a81..792413a0b368 100644 --- a/.gitignore +++ b/.gitignore @@ -129,6 +129,7 @@ child.conf.json # temporary test artifacts test/tmp/* +common/smoke-test/run-manifest.json # build artifacts dist diff --git a/.prettierignore b/.prettierignore index f6b93954e5ca..593616029911 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,5 +1,6 @@ **/src/generated/ **/review/*.api.md +**/recordings/** **/*.yml **/*.yaml **/*.d.ts diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 90ade705c4ea..8980e8a85406 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -39,11 +39,11 @@ If your contribution is significantly big it is better to first check with the p ## Project orchestration -This project uses [Rush](https://rushjs.io) to manage our many Azure SDK libraries within a single repository. It is highly recommended that you read the [Rush Developer Tutorials](https://rushjs.io/pages/developer/new_developer/) to familiarize yourself with the tool. +This project uses [Rush](https://rushjs.io) to manage many of our Azure SDK libraries within a single repository. It is highly recommended that you read the [Rush Developer Tutorials](https://rushjs.io/pages/developer/new_developer/) to familiarize yourself with the tool. -While you -can continue to contribute to the project using the standard `npm` workflow, adopting Rush will provide you many benefits: +Rush provides many benefits: +- Some of our devDependencies are not published to the public registry (e.g. our ESLint plugin), and Rush is configured to install them correctly. - Your local build results will match what occurs on our build server, since the build server uses Rush to build the SDK. - Rush will ensure that all libraries use the same versions of a given dependency, making it easier to reason about our dependency graph and reducing bundle size. - Rush uses [PNPM](https://pnpm.js.org) to install all dependencies across the SDK. Together they solve problems involving [phantom dependencies](https://rushjs.io/pages/advanced/phantom_deps/) and [NPM doppelgangers](https://rushjs.io/pages/advanced/npm_doppelgangers/). The way PNPM lays out packages also ensures that you can never accidentally use a dependency you don't directly declare in your package.json. @@ -51,11 +51,25 @@ can continue to contribute to the project using the standard `npm` workflow, ado - When a change is made in a local dependency, Rush will detect that the dependency is dirty and will rebuild it if you attempt to build a project that consumes that dependency. - Rush runs project tasks in parallel, subject to the inter-project dependencies that it detects. It also performs incremental builds by default, not rebuilding anything unnecessary (unless you tell it to). +Not every library in the repository is managed by Rush yet, only those listed in the `projects` property in [rush.json](https://github.com/Azure/azure-sdk-for-js/blob/master/rush.json). Packages not managed by Rush can still be managed using `npm`. + ## Setting up your environment -Want to get started hacking on the code? Super! Follow these instructions to get up and running. +Want to get started hacking on the code? Great! Keep reading. + +### Using Visual Studio Code + +We love [Visual Studio Code](https://code.visualstudio.com/) for many reasons, mainly: + +- You can debug JavaScript/TypeScript code right away with [automatic debugging configuration](https://code.visualstudio.com/updates/v1_45#_automatic-debug-configurations). +- You can use it with GitHub's [Codespaces](https://visualstudio.microsoft.com/services/github-codespaces/) to develop inside a docker container that has all the prerequisites. +- You get [excellent support for TypeScript](https://code.visualstudio.com/Docs/languages/typescript). + +### Prerequisites -First, make sure you have the prerequisites installed and available on your `$PATH`: +With GitHub's Codespaces, the container already has all prerequisites installed. You can create a codespace in Visual Studio Code by following the instructions [here](https://docs.github.com/en/free-pro-team@latest/github/developing-online-with-codespaces/using-codespaces-in-visual-studio-code). + +If you prefer to setup your own environment instead, make sure you have these prerequisites installed and available on your `$PATH`: - Git - Node 8.x or higher @@ -64,46 +78,27 @@ First, make sure you have the prerequisites installed and available on your `$PA - Rush will automatically manage the specific version needed by this repo as long as you have any v5 version installed. - If you're unable to install a global tool, you can instead call the wrapper script `node /common/scripts/install-run-rush.js` any time the guide instructs you to run `rush`. The wrapper script will install a managed copy of Rush in a temporary directory for you. -Next, get the code: +### Building our repository 1. Fork this repo 2. Clone your fork locally (`git clone https://github.com//azure-sdk-for-js.git`) 3. Open a terminal and move into your local copy (`cd azure-sdk-for-js`) -4. Install and link all dependencies (`rush update`) - -### Making the switch - -If you have previously worked in this repo using the `npm` workflow, the first time you switch to using Rush you should commit or stash any untracked files and then get back to a clean state by running `rush reset-workspace` before proceeding any further. This will get rid of any latent package-lock files, as well as your existing (incompatible) node_modules directories. You can then proceed down the path outlined below. - -### Using Visual Studio Code -#### Debugging +To build packages managed by Rush: -Debugging Node.js code in VSCode is [well documented](https://code.visualstudio.com/docs/nodejs/nodejs-debugging). However, starting from version 1.45.1, VSCode can automatically debug Node.js code in most cases without having to write custom `launch.json` files for that purpose and this is true for our SDKs code as well. A demonstration of that feature can be found in the [release notes](https://code.visualstudio.com/updates/v1_45#_automatic-debug-configurations). - -#### Warnings - -Visual Studio Code has a feature which will automatically fetch and install @types packages for you, using the standard npm package manager. This will cause problems with your node_modules directory, since Rush uses PNPM which lays out this directory quite differently. It's highly recommended that you ensure "Typescript: Disable Automatic Type Acquisition" is checked in your VSCode Workspace Settings (or ensure `typescript.disableAutomaticTypeAcquisition` is present in your .vscode/settings.json file). - -The current version of VSCode for Windows has a bug that may cause a "file locked" error when you run any Rush command that modifies your node_modules directory: - -``` -ERROR: Error: Error: EPERM: operation not permitted, mkdir 'C:\XXXXX\node_modules' -Often this is caused by a file lock from a process such as your text editor, command prompt, or "gulp serve" -``` - -This bug is fixed in the Insiders build of VSCode (1.34), and will be included in the next release. Until then, you can resolve this by running the "Typescript: Restart TS server" command from the Command Palette to release the lock on the files. +4. Install and link all dependencies (`rush update`) +5. Build the code base (`rush rebuild`) -### Warnings for Windows users +To build packages not managed by Rush: -Git for Windows has a bug where repository files may be unintentionally removed by `git clean -df` when a directory is locally linked. Because Rush creates local links between packages, you may encounter this. It's highly recommended to use the `rush reset-workspace` command to get your working directory back to a clean state instead. If you prefer to run `git clean -df` manually, you must first run `rush unlink` so that the operation can be performed safely. +4. Navigate to the package directory as described in our [repository structure](https://github.com/Azure/azure-sdk/blob/master/docs/policies/repostructure.md) +5. Install the package dependencies (`npm install`) +6. Build the package (`npm run build`) -## Inner loop developer workflow with Rush +## Development Workflows ### Installing and managing dependencies -Run `rush update` to install the current set of package dependencies in all projects inside the repo. - To add a new dependency (assuming the dependency is published on the NPM registry), navigate to the project's directory and run `rush add -p "" --caret [--dev]`. This will add the dependency at its latest version to the project's package.json, and then automatically run `rush update` to install the package into the project's node_modules directory. If you know the specific version of the package you want, you can instead run `rush add -p ""` - make sure to use the caret before the version number. Do not use `npm install [--save | --save-dev]`. To add a dependency on another library within the Azure SDK, you can follow the same procedure as above as long as the library is also published to the NPM registry. Additionally, as long as the local copy of that library satisfies the SemVer range you specify when you run `rush add`, that library will be locally linked rather than downloaded from the registry. If the library has not yet been published to the NPM registry, you can't use `rush add`. In this case, you must manually edit the package.json to add the dependency and then run `rush update` to locally link the library into the project's node_modules directory. @@ -126,7 +121,7 @@ If you know your library requires functionality introduced in a newer version of On the other hand, if you know your library does not work with the existing version of the dependency and you explicitly need an older version, you have a few options. The preferred option would be to update your library so that it works with the existing version of the dependency. If this is not feasible, Rush can be instructed to permit an exception to the "consistent versions" policy. Reach out to a member of the [engineering system team](mailto:azuresdkengsysteam@microsoft.com) to describe your situation and they will be able to help you add the exception. -### Building +### Building using Rush Run `rush build` from anywhere in the repo to build any projects that have been modified since the last build. Run `rush rebuild` from anywhere in the repo to rebuild all projects from scratch. @@ -224,7 +219,11 @@ Generally speaking, the following commands are roughly equivalent: ## Onboarding a new library -To add a new library to the repo, update `rush.json` in the root of the repo and add a new entry to the `projects` array at the bottom of the file. The package name must be the full name of the package as specified in its package.json. Your new library must follow our [repository structure](https://github.com/Azure/azure-sdk/blob/master/docs/policies/repostructure.md) (specifically, it must be located at `sdk//`) and your library's package.json must contain the required scripts as documented [above](#other-npm-scripts). Once the library is added, run `rush update` to install and link dependencies. If your new library has introduced a dependency version conflict, this command will fail. See [above](#resolving-dependency-version-conflicts) to learn how to resolve dependency version conflicts. +All libraries must follow our [repository structure](https://github.com/Azure/azure-sdk/blob/master/docs/policies/repostructure.md) (specifically, it must be located at `sdk//`) and your library's `package.json` must contain the required scripts as documented [above](#other-npm-scripts). + +The repository contains two different sets of libraries, each follows different rules for development and maintaining. The first type is generated automatically from the [swagger specifications](https://github.com/Azure/azure-rest-api-specs) and their code should not be edited by hand. Onboarding such library is just a matter of pushing its auto-generated directory to the right location in the repository. + +The second type of libraries is more complex to develop and maintain because they require a custom design that is not necessarily mirroring the swagger specification, if any, and they are handcrafted by our engineers. To add a new such library to the repository, update `rush.json` in the root of the repo and add a new entry to the `projects` array at the bottom of the file. The package name must be the full name of the package as specified in its package.json. Once the library is added, run `rush update` to install and link dependencies. If your new library has introduced a dependency version conflict, this command will fail. See [above](#resolving-dependency-version-conflicts) to learn how to resolve dependency version conflicts. Rush assumes that anything printed to `STDERR` is a warning. Your package scripts should avoid writing to `STDERR` unless emitting warnings or errors, since this will cause Rush to flag them as warnings during the execution of your build or script command. If your library uses a tool that can't be configured this way, you can still append `2>&1` to the command which will redirect all output to `STDOUT`. You won't see warnings show up, but Rush will still consider the command to have failed as long as it returns a nonzero exit code. @@ -263,6 +262,6 @@ For information about packages are versioned and tagged see [Javascript Releases ### Dev Packages -The daily dev build for JS are published directly to [npmjs.com](https://npmjs.com) under the dev tag. These are published daily whenever there is a change in the package. You can test them by downloading or taking a dependency the "dev" tagged version of the package, or pinning to particular dev version. +The daily dev build for JS are published directly to [npmjs.com](https://npmjs.com) under the alpha tag. These are published daily whenever there is a change in the package. You can test them by downloading the "alpha" tagged version of the package, or pinning to particular alpha version. The daily dev packages are considered volatile and taking dependencies on a dev package should be considered a temporary arrangement. diff --git a/README.md b/README.md index 5fe9bb3d6414..6a0d2baf7856 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Packages](https://img.shields.io/badge/packages-latest-blue.svg)](https://azure.github.io/azure-sdk/releases/latest/js.html) [![Dependencies](https://img.shields.io/badge/dependency-report-blue.svg)](https://azuresdkartifacts.blob.core.windows.net/azure-sdk-for-js/dependencies/dependencies.html) [![DependencyGraph](https://img.shields.io/badge/dependency-graph-blue.svg)](https://azuresdkartifacts.blob.core.windows.net/azure-sdk-for-js/dependencies/InterdependencyGraph.html) -This repository is for active development of the Azure SDK for JavaScript (NodeJS & Browser). For consumers of the SDK we recommend visiting our [public developer docs](https://docs.microsoft.com/en-us/javascript/azure/) or our versioned [developer docs](https://azure.github.io/azure-sdk-for-js). +This repository is for active development of the Azure SDK for JavaScript (NodeJS & Browser). For consumers of the SDK we recommend visiting our [public developer docs](https://docs.microsoft.com/javascript/azure/) or our versioned [developer docs](https://azure.github.io/azure-sdk-for-js). ## Getting started @@ -10,9 +10,9 @@ For your convenience, each service has a separate set of libraries that you can Each service might have a number of libraries available from each of the following categories: -- [Client - New Releases](#Client-New-Releases) -- [Client - Previous Versions](#Client-Previous-Versions) -- [Management](#Management) +- [Client - New Releases](#client-new-releases) +- [Client - Previous Versions](#client-previous-versions) +- [Management](#management) ### Client: New Releases @@ -41,7 +41,7 @@ Libraries which enable you to provision specific resources. They are responsible Security issues and bugs should be reported privately, via email, to the Microsoft Security Response Center (MSRC) . You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Further information, including the MSRC PGP key, can be found in the [Security TechCenter](https://www.microsoft.com/msrc/faqs-report-an-issue). ## Contributing -For details on contributing to this repository, see the [contributing guide](CONTRIBUTING.md). +For details on contributing to this repository, see the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/master/CONTRIBUTING.md). This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com. diff --git a/SECURITY.md b/SECURITY.md index 926b8ae4059a..dec3d3b7013b 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -4,7 +4,7 @@ Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/). -If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://docs.microsoft.com/en-us/previous-versions/tn-archive/cc751383(v=technet.10)), please report it to us as described below. +If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://docs.microsoft.com/previous-versions/tn-archive/cc751383(v=technet.10)), please report it to us as described below. ## Reporting Security Issues @@ -12,7 +12,7 @@ If you believe you have found a security vulnerability in any Microsoft-owned re Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://msrc.microsoft.com/create-report). -If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://www.microsoft.com/en-us/msrc/pgp-key-msrc). +If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://www.microsoft.com/msrc/pgp-key-msrc). You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://www.microsoft.com/msrc). @@ -36,6 +36,6 @@ We prefer all communications to be in English. ## Policy -Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://www.microsoft.com/en-us/msrc/cvd). +Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://www.microsoft.com/msrc/cvd). diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 9ada45e415c2..f17bdf6eb810 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -2,8 +2,13 @@ dependencies: '@rush-temp/abort-controller': 'file:projects/abort-controller.tgz' '@rush-temp/ai-anomaly-detector': 'file:projects/ai-anomaly-detector.tgz' '@rush-temp/ai-form-recognizer': 'file:projects/ai-form-recognizer.tgz' + '@rush-temp/ai-metrics-advisor': 'file:projects/ai-metrics-advisor.tgz' '@rush-temp/ai-text-analytics': 'file:projects/ai-text-analytics.tgz' '@rush-temp/app-configuration': 'file:projects/app-configuration.tgz' + '@rush-temp/communication-administration': 'file:projects/communication-administration.tgz' + '@rush-temp/communication-chat': 'file:projects/communication-chat.tgz' + '@rush-temp/communication-common': 'file:projects/communication-common.tgz' + '@rush-temp/communication-sms': 'file:projects/communication-sms.tgz' '@rush-temp/core-amqp': 'file:projects/core-amqp.tgz' '@rush-temp/core-arm': 'file:projects/core-arm.tgz' '@rush-temp/core-asynciterator-polyfill': 'file:projects/core-asynciterator-polyfill.tgz' @@ -18,7 +23,7 @@ dependencies: '@rush-temp/cosmos': 'file:projects/cosmos.tgz' '@rush-temp/data-tables': 'file:projects/data-tables.tgz' '@rush-temp/dev-tool': 'file:projects/dev-tool.tgz' - '@rush-temp/digital-twins': 'file:projects/digital-twins.tgz' + '@rush-temp/digital-twins-core': 'file:projects/digital-twins-core.tgz' '@rush-temp/eslint-plugin-azure-sdk': 'file:projects/eslint-plugin-azure-sdk.tgz' '@rush-temp/event-hubs': 'file:projects/event-hubs.tgz' '@rush-temp/event-processor-host': 'file:projects/event-processor-host.tgz' @@ -46,8 +51,6 @@ dependencies: '@rush-temp/test-utils-perfstress': 'file:projects/test-utils-perfstress.tgz' '@rush-temp/test-utils-recorder': 'file:projects/test-utils-recorder.tgz' '@rush-temp/testhub': 'file:projects/testhub.tgz' - precise-commits: 1.0.2_prettier@1.19.1 - prettier: 1.19.1 lockfileVersion: 5.1 packages: /@azure/abort-controller/1.0.1: @@ -64,11 +67,11 @@ packages: async-lock: 1.2.4 buffer: 5.6.0 debug: 3.2.6 - events: 3.1.0 + events: 3.2.0 is-buffer: 2.0.4 jssha: 2.4.2 process: 0.11.10 - rhea: 1.0.23 + rhea: 1.0.24 rhea-promise: 0.1.15 stream-browserify: 2.0.2 tslib: 1.13.0 @@ -77,7 +80,19 @@ packages: dev: false resolution: integrity: sha512-RVG1Ad3Afv9gwFFmpeCXQAm+Sa0L8KEZRJJAAZEGoYDb6EoO1iQDVmoBz720h8mdrGpi0D60xNU/KhriIwuZfQ== - /@azure/core-amqp/1.1.4: + /@azure/communication-signaling/1.0.0-beta.1: + dependencies: + '@azure/core-http': 1.1.8 + '@azure/logger': 1.0.0 + '@opentelemetry/api': 0.6.1 + events: 3.2.0 + tslib: 1.13.0 + dev: false + engines: + node: '>=8.0.0' + resolution: + integrity: sha512-xxlGwbbTkEZAline8wrP75FLaOsT23nMukzIg5X/Cs6cQSQ/JKj7Uxq5Idxp9GgAYT+g+PAj+BJ929/jaselBQ== + /@azure/core-amqp/1.1.5: dependencies: '@azure/abort-controller': 1.0.1 '@azure/core-auth': 1.1.3 @@ -86,21 +101,43 @@ packages: '@types/is-buffer': 2.0.0 async-lock: 1.2.4 buffer: 5.6.0 - events: 3.1.0 + events: 3.2.0 is-buffer: 2.0.4 - jssha: 3.1.0 + jssha: 3.1.2 process: 0.11.10 - rhea: 1.0.23 + rhea: 1.0.24 rhea-promise: 1.0.0 stream-browserify: 3.0.0 - tslib: 2.0.0 + tslib: 2.0.1 + url: 0.11.0 + util: 0.12.3 + dev: false + engines: + node: '>=8.0.0' + resolution: + integrity: sha512-8l7xMoyH0/emc1Y1p9I6jVggIBGVgTeKR2KUHWZAlXpBhagglabb6pZLQtCaCATasd8dSoCqwOOxfe/DVSE+kQ== + /@azure/core-amqp/2.0.0-beta.1: + dependencies: + '@azure/abort-controller': 1.0.1 + '@azure/logger': 1.0.0 + '@types/async-lock': 1.1.2 + '@types/is-buffer': 2.0.0 + async-lock: 1.2.4 + buffer: 5.6.0 + events: 3.2.0 + is-buffer: 2.0.4 + jssha: 3.1.2 + process: 0.11.10 + rhea: 1.0.24 + rhea-promise: 1.0.0 + tslib: 2.0.1 url: 0.11.0 util: 0.12.3 dev: false engines: node: '>=8.0.0' resolution: - integrity: sha512-1kPDQMOYcmVRMoe9wAx4tqcM5MlkgCWeIq5gfu8u1dK9UWbVy3mDP9OQJOTZJxccOF1AKaJ7yGQhM+uNrSmwog== + integrity: sha512-4H8qzvORiVsajBpzaTCHEP+2h2D4x+bsFU1c67cKzs03LWujCUz68uJ8FX5YGr6u/abHpZwxbyJsZ+tmAdY5oA== /@azure/core-asynciterator-polyfill/1.0.0: dev: false resolution: @@ -110,13 +147,13 @@ packages: '@azure/abort-controller': 1.0.1 '@azure/core-tracing': 1.0.0-preview.8 '@opentelemetry/api': 0.6.1 - tslib: 2.0.0 + tslib: 2.0.1 dev: false engines: node: '>=8.0.0' resolution: integrity: sha512-A4xigW0YZZpkj1zK7dKuzbBpGwnhEcRk6WWuIshdHC32raR3EQ1j6VA9XZqE+RFsUgH6OAmIK5BWIz+mZjnd6Q== - /@azure/core-http/1.1.7: + /@azure/core-http/1.1.8: dependencies: '@azure/abort-controller': 1.0.1 '@azure/core-auth': 1.1.3 @@ -129,15 +166,15 @@ packages: node-fetch: 2.6.0 process: 0.11.10 tough-cookie: 4.0.0 - tslib: 2.0.0 + tslib: 2.0.1 tunnel: 0.0.6 - uuid: 8.2.0 + uuid: 8.3.0 xml2js: 0.4.23 dev: false engines: node: '>=8.0.0' resolution: - integrity: sha512-UmYMY22Zczg/hCtYuM/0KoV2kVc6juj4mrb5uYgBmmxQ9NIIZrpjgCdVSlYQNClpyrvaIMnecRFMqrZywzhiJA== + integrity: sha512-hJ9ZblU99sY2dTD6U5EqZ5zjd0QmwwvSp8RYp2zS9s5mhsNobLQFI09bIE6yo891bOySCEepNCE5tL15dLYhIA== /@azure/core-tracing/1.0.0-preview.8: dependencies: '@opencensus/web-types': 0.0.7 @@ -150,7 +187,7 @@ packages: dependencies: '@opencensus/web-types': 0.0.7 '@opentelemetry/api': 0.10.2 - tslib: 2.0.0 + tslib: 2.0.1 dev: false engines: node: '>=8.0.0' @@ -173,7 +210,7 @@ packages: /@azure/event-hubs/5.2.2: dependencies: '@azure/abort-controller': 1.0.1 - '@azure/core-amqp': 1.1.4 + '@azure/core-amqp': 1.1.5 '@azure/core-asynciterator-polyfill': 1.0.0 '@azure/core-tracing': 1.0.0-preview.8 '@azure/logger': 1.0.0 @@ -181,23 +218,23 @@ packages: buffer: 5.6.0 process: 0.11.10 rhea-promise: 1.0.0 - tslib: 2.0.0 - uuid: 8.2.0 + tslib: 2.0.1 + uuid: 8.3.0 dev: false resolution: integrity: sha512-F/1jaTC9NxgNjMkO7SAs9Q9BndJ16AtRwQu0l21FNyRCN8kWl4Noiblsbsjtv+BPYa+ARrocR5POMlJ5eveR9w== /@azure/identity/1.1.0: dependencies: - '@azure/core-http': 1.1.7 + '@azure/core-http': 1.1.8 '@azure/core-tracing': 1.0.0-preview.9 '@azure/logger': 1.0.0 '@opentelemetry/api': 0.10.2 - events: 3.1.0 + events: 3.2.0 jws: 4.0.0 - msal: 1.3.2 + msal: 1.4.0 qs: 6.9.4 - tslib: 2.0.0 - uuid: 8.2.0 + tslib: 2.0.1 + uuid: 8.3.0 dev: false engines: node: '>=8.0.0' @@ -242,29 +279,38 @@ packages: dev: false resolution: integrity: sha512-aFHRw/IHhg3I9ZJW+Va4L+sCirFHMVIu6B7lFdL5mGLfG3xC5vDIdd957LRXFgy2OiKFRUC0QaKknd0YCsQIqA== - /@azure/msal-common/1.2.0: + /@azure/msal-common/1.4.0: dependencies: debug: 4.1.1 dev: false engines: node: '>=0.8.0' resolution: - integrity: sha512-5MjxcUoalIxGo29MBHCdwMo6HCsCBt25HDkg+Du7x6nG7Y3NAUb9jM8oibLTth9iIRDaWYVvLfxnpXTKwBGs+A== - /@azure/msal-node/1.0.0-alpha.5: + integrity: sha512-Z0zZc0nDkym/usNugB0BYDGyX5ymwlRXJJT0xfpE921H8/lHDzBfrO/NVw0lljH3Ex5CVE+PpdAGahQQ4zWzKQ== + /@azure/msal-common/1.6.3: dependencies: - '@azure/msal-common': 1.2.0 + debug: 4.1.1 + dev: false + engines: + node: '>=0.8.0' + resolution: + integrity: sha512-sZQ8gXavWEX7q0aHS8wNdcDWpbVnfLU4mMcX2E9JRHjn7nKACSEmiYNog2y/8vu7cMMV5RWWttF/oFQmeiIgyg== + /@azure/msal-node/1.0.0-alpha.13: + dependencies: + '@azure/msal-common': 1.6.3 axios: 0.19.2 debug: 4.1.1 jsonwebtoken: 8.5.1 + uuid: 8.3.0 dev: false resolution: - integrity: sha512-DkoEmnGy+PF5UZbViuLrO8qJVKRBftIojEP3xf8ck6q/vjOY18NUGXxrcKkRXfhRmTe4P2mRGCFuiil8+12IbA== + integrity: sha512-YAt7mduHLWCpHg4bAvGugmN1xXwRBDHzLM+TVwvZG6lSJ9a3IQSB/t3uB3DMr5JU8gNsGz5eKgxEFlzuF0sycg== /@azure/schema-registry/1.0.0-beta.1: dependencies: - '@azure/core-http': 1.1.7 + '@azure/core-http': 1.1.8 '@azure/logger': 1.0.0 '@opentelemetry/api': 0.10.2 - tslib: 2.0.0 + tslib: 2.0.1 dev: false resolution: integrity: sha512-bt8VBep8RYjm5om41tvip9ZD72tHexZz+4pp8pPP16/i2nibjFWzxQv4EMdD9UK7sfSLx0Slu9Xyqx7LQkKzKQ== @@ -274,21 +320,21 @@ packages: dev: false resolution: integrity: sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg== - /@babel/core/7.10.4: + /@babel/core/7.11.4: dependencies: '@babel/code-frame': 7.10.4 - '@babel/generator': 7.10.4 - '@babel/helper-module-transforms': 7.10.4 + '@babel/generator': 7.11.4 + '@babel/helper-module-transforms': 7.11.0 '@babel/helpers': 7.10.4 - '@babel/parser': 7.10.4 + '@babel/parser': 7.11.4 '@babel/template': 7.10.4 - '@babel/traverse': 7.10.4 - '@babel/types': 7.10.4 + '@babel/traverse': 7.11.0 + '@babel/types': 7.11.0 convert-source-map: 1.7.0 debug: 4.1.1 gensync: 1.0.0-beta.1 json5: 2.1.3 - lodash: 4.17.19 + lodash: 4.17.20 resolve: 1.17.0 semver: 5.7.1 source-map: 0.5.7 @@ -296,82 +342,81 @@ packages: engines: node: '>=6.9.0' resolution: - integrity: sha512-3A0tS0HWpy4XujGc7QtOIHTeNwUgWaZc/WuS5YQrfhU67jnVmsD6OGPc1AKHH0LJHQICGncy3+YUjIhVlfDdcA== - /@babel/generator/7.10.4: + integrity: sha512-5deljj5HlqRXN+5oJTY7Zs37iH3z3b++KjiKtIsJy1NrjOOVSEaJHEetLBhyu0aQOSNNZ/0IuEAan9GzRuDXHg== + /@babel/generator/7.11.4: dependencies: - '@babel/types': 7.10.4 + '@babel/types': 7.11.0 jsesc: 2.5.2 - lodash: 4.17.19 source-map: 0.5.7 dev: false resolution: - integrity: sha512-toLIHUIAgcQygFZRAQcsLQV3CBuX6yOIru1kJk/qqqvcRmZrYe6WavZTSG+bB8MxhnL9YPf+pKQfuiP161q7ng== + integrity: sha512-Rn26vueFx0eOoz7iifCN2UHT6rGtnkSGWSoDRIy8jZN3B91PzeSULbswfLoOWuTuAcNwpG/mxy+uCTDnZ9Mp1g== /@babel/helper-function-name/7.10.4: dependencies: '@babel/helper-get-function-arity': 7.10.4 '@babel/template': 7.10.4 - '@babel/types': 7.10.4 + '@babel/types': 7.11.0 dev: false resolution: integrity: sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ== /@babel/helper-get-function-arity/7.10.4: dependencies: - '@babel/types': 7.10.4 + '@babel/types': 7.11.0 dev: false resolution: integrity: sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A== - /@babel/helper-member-expression-to-functions/7.10.4: + /@babel/helper-member-expression-to-functions/7.11.0: dependencies: - '@babel/types': 7.10.4 + '@babel/types': 7.11.0 dev: false resolution: - integrity: sha512-m5j85pK/KZhuSdM/8cHUABQTAslV47OjfIB9Cc7P+PvlAoBzdb79BGNfw8RhT5Mq3p+xGd0ZfAKixbrUZx0C7A== + integrity: sha512-JbFlKHFntRV5qKw3YC0CvQnDZ4XMwgzzBbld7Ly4Mj4cbFy3KywcR8NtNctRToMWJOVvLINJv525Gd6wwVEx/Q== /@babel/helper-module-imports/7.10.4: dependencies: - '@babel/types': 7.10.4 + '@babel/types': 7.11.0 dev: false resolution: integrity: sha512-nEQJHqYavI217oD9+s5MUBzk6x1IlvoS9WTPfgG43CbMEeStE0v+r+TucWdx8KFGowPGvyOkDT9+7DHedIDnVw== - /@babel/helper-module-transforms/7.10.4: + /@babel/helper-module-transforms/7.11.0: dependencies: '@babel/helper-module-imports': 7.10.4 '@babel/helper-replace-supers': 7.10.4 '@babel/helper-simple-access': 7.10.4 - '@babel/helper-split-export-declaration': 7.10.4 + '@babel/helper-split-export-declaration': 7.11.0 '@babel/template': 7.10.4 - '@babel/types': 7.10.4 - lodash: 4.17.19 + '@babel/types': 7.11.0 + lodash: 4.17.20 dev: false resolution: - integrity: sha512-Er2FQX0oa3nV7eM1o0tNCTx7izmQtwAQsIiaLRWtavAAEcskb0XJ5OjJbVrYXWOTr8om921Scabn4/tzlx7j1Q== + integrity: sha512-02EVu8COMuTRO1TAzdMtpBPbe6aQ1w/8fePD2YgQmxZU4gpNWaL9gK3Jp7dxlkUlUCJOTaSeA+Hrm1BRQwqIhg== /@babel/helper-optimise-call-expression/7.10.4: dependencies: - '@babel/types': 7.10.4 + '@babel/types': 7.11.0 dev: false resolution: integrity: sha512-n3UGKY4VXwXThEiKrgRAoVPBMqeoPgHVqiHZOanAJCG9nQUL2pLRQirUzl0ioKclHGpGqRgIOkgcIJaIWLpygg== /@babel/helper-replace-supers/7.10.4: dependencies: - '@babel/helper-member-expression-to-functions': 7.10.4 + '@babel/helper-member-expression-to-functions': 7.11.0 '@babel/helper-optimise-call-expression': 7.10.4 - '@babel/traverse': 7.10.4 - '@babel/types': 7.10.4 + '@babel/traverse': 7.11.0 + '@babel/types': 7.11.0 dev: false resolution: integrity: sha512-sPxZfFXocEymYTdVK1UNmFPBN+Hv5mJkLPsYWwGBxZAxaWfFu+xqp7b6qWD0yjNuNL2VKc6L5M18tOXUP7NU0A== /@babel/helper-simple-access/7.10.4: dependencies: '@babel/template': 7.10.4 - '@babel/types': 7.10.4 + '@babel/types': 7.11.0 dev: false resolution: integrity: sha512-0fMy72ej/VEvF8ULmX6yb5MtHG4uH4Dbd6I/aHDb/JVg0bbivwt9Wg+h3uMvX+QSFtwr5MeItvazbrc4jtRAXw== - /@babel/helper-split-export-declaration/7.10.4: + /@babel/helper-split-export-declaration/7.11.0: dependencies: - '@babel/types': 7.10.4 + '@babel/types': 7.11.0 dev: false resolution: - integrity: sha512-pySBTeoUff56fL5CBU2hWm9TesA4r/rOkI9DyJLvvgz09MB9YtfIYe3iBriVaYNaPe+Alua0vBIOVOLs2buWhg== + integrity: sha512-74Vejvp6mHkGE+m+k5vHY93FX2cAtrw1zXrZXRlG4l410Nm9PxfEiVTn1PjDPV5SnmieiueY4AFg2xqhNFuuZg== /@babel/helper-validator-identifier/7.10.4: dev: false resolution: @@ -379,8 +424,8 @@ packages: /@babel/helpers/7.10.4: dependencies: '@babel/template': 7.10.4 - '@babel/traverse': 7.10.4 - '@babel/types': 7.10.4 + '@babel/traverse': 7.11.0 + '@babel/types': 7.11.0 dev: false resolution: integrity: sha512-L2gX/XeUONeEbI78dXSrJzGdz4GQ+ZTA/aazfUsFaWjSe95kiCuOZ5HsXvkiw3iwF+mFHSRUfJU8t6YavocdXA== @@ -392,50 +437,43 @@ packages: dev: false resolution: integrity: sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA== - /@babel/parser/7.10.4: + /@babel/parser/7.11.4: dev: false engines: node: '>=6.0.0' hasBin: true resolution: - integrity: sha512-8jHII4hf+YVDsskTF6WuMB3X4Eh+PsUkC2ljq22so5rHvH+T8BzyL94VOdyFLNR8tBSVXOTbNHOKpR4TfRxVtA== - /@babel/runtime-corejs3/7.10.4: - dependencies: - core-js-pure: 3.6.5 - regenerator-runtime: 0.13.5 - dev: false - resolution: - integrity: sha512-BFlgP2SoLO9HJX9WBwN67gHWMBhDX/eDz64Jajd6mR/UAUzqrNMm99d4qHnVaKscAElZoFiPv+JpR/Siud5lXw== + integrity: sha512-MggwidiH+E9j5Sh8pbrX5sJvMcsqS5o+7iB42M9/k0CD63MjYbdP4nhSh7uB5wnv2/RVzTZFTxzF/kIa5mrCqA== /@babel/template/7.10.4: dependencies: '@babel/code-frame': 7.10.4 - '@babel/parser': 7.10.4 - '@babel/types': 7.10.4 + '@babel/parser': 7.11.4 + '@babel/types': 7.11.0 dev: false resolution: integrity: sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA== - /@babel/traverse/7.10.4: + /@babel/traverse/7.11.0: dependencies: '@babel/code-frame': 7.10.4 - '@babel/generator': 7.10.4 + '@babel/generator': 7.11.4 '@babel/helper-function-name': 7.10.4 - '@babel/helper-split-export-declaration': 7.10.4 - '@babel/parser': 7.10.4 - '@babel/types': 7.10.4 + '@babel/helper-split-export-declaration': 7.11.0 + '@babel/parser': 7.11.4 + '@babel/types': 7.11.0 debug: 4.1.1 globals: 11.12.0 - lodash: 4.17.19 + lodash: 4.17.20 dev: false resolution: - integrity: sha512-aSy7p5THgSYm4YyxNGz6jZpXf+Ok40QF3aA2LyIONkDHpAcJzDUqlCKXv6peqYUs2gmic849C/t2HKw2a2K20Q== - /@babel/types/7.10.4: + integrity: sha512-ZB2V+LskoWKNpMq6E5UUCrjtDUh5IOTAyIl0dTjIEoXum/iKWkoIEKIRDnUucO6f+2FzNkE0oD4RLKoPIufDtg== + /@babel/types/7.11.0: dependencies: '@babel/helper-validator-identifier': 7.10.4 - lodash: 4.17.19 + lodash: 4.17.20 to-fast-properties: 2.0.0 dev: false resolution: - integrity: sha512-UTCFOxC3FsFHb7lkRMVvgLzaRVamXuAs2Tz4wajva4WxtVY82eZeaUBtC2Zt95FU9TiznuC0Zk35tsim8jeVpg== + integrity: sha512-O53yME4ZZI0jO1EVGtF1ePGl0LHirG4P1ibcD80XyzZcKhcMFeCXmh4Xb1ifGBIV233Qg12x4rBfQgA+tmOukA== /@bahmutov/data-driven/1.0.0: dependencies: check-more-types: 2.24.0 @@ -455,6 +493,19 @@ packages: node: '>=8' resolution: integrity: sha512-tsAQNx32a8CoFhjhijUIhI4kccIAgmGhy8LZMZgGfmXcpMbPRUqn5LWmgRttILi6yeGmBJd2xsPkFMs0PzgPCw== + /@microsoft/api-documenter/7.8.56: + dependencies: + '@microsoft/api-extractor-model': 7.9.7 + '@microsoft/tsdoc': 0.12.19 + '@rushstack/node-core-library': 3.33.6 + '@rushstack/ts-command-line': 4.6.10 + colors: 1.2.5 + js-yaml: 3.13.1 + resolve: 1.17.0 + dev: false + hasBin: true + resolution: + integrity: sha512-nf2hRScOib5O6kAi+gbnixWdmrpcpNxaiyzGh3P+hts6BpW1F2dgRSFpLT6cMZlCNjw6NrHA58XaLqc36QUltg== /@microsoft/api-extractor-model/7.7.10: dependencies: '@microsoft/tsdoc': 0.12.19 @@ -462,6 +513,13 @@ packages: dev: false resolution: integrity: sha512-gMFDXwUgoQYz9TgatyNPALDdZN4xBC3Un3fGwlzME+vM13PoJ26pGuqI7kv/OlK9+q2sgrEdxWns8D3UnLf2TA== + /@microsoft/api-extractor-model/7.9.7: + dependencies: + '@microsoft/tsdoc': 0.12.19 + '@rushstack/node-core-library': 3.33.6 + dev: false + resolution: + integrity: sha512-9ztrVtUYsnpUC6S+0PR72h7CGvzAX6ljdo6FOzq+jVte743Nb9TMdV97fnJO/n8XRSGUOAKsApgED0GgAek4jw== /@microsoft/api-extractor/7.7.11: dependencies: '@microsoft/api-extractor-model': 7.7.10 @@ -469,7 +527,7 @@ packages: '@rushstack/node-core-library': 3.19.6 '@rushstack/ts-command-line': 4.3.13 colors: 1.2.5 - lodash: 4.17.19 + lodash: 4.17.20 resolve: 1.8.1 source-map: 0.6.1 typescript: 3.7.5 @@ -596,10 +654,10 @@ packages: rollup: ^1.20.0 || ^2.0.0 resolution: integrity: sha512-Gcp9E8y68Kx+Jo8zy/ZpiiAkb0W01cSqnxOz6h9bPR7MU3gaoTEdRf7xXYplwli1SBFEswXX588ESj+50Brfxw== - /@rollup/plugin-node-resolve/8.1.0_rollup@1.32.1: + /@rollup/plugin-node-resolve/8.4.0_rollup@1.32.1: dependencies: '@rollup/pluginutils': 3.1.0_rollup@1.32.1 - '@types/resolve': 0.0.8 + '@types/resolve': 1.17.1 builtin-modules: 3.1.0 deep-freeze: 0.0.1 deepmerge: 4.2.2 @@ -612,7 +670,7 @@ packages: peerDependencies: rollup: ^1.20.0||^2.0.0 resolution: - integrity: sha512-ovq7ZM3JJYUUmEjjO+H8tnUdmQmdQudJB7xruX8LFZ1W2q8jXdPUS6SsIYip8ByOApu4RR7729Am9WhCeCMiHA== + integrity: sha512-LFqKdRLn0ShtQyf6SBYO69bGE1upV6wUhBX0vFOUnLAyzx5cwp8svA0eHUnu8+YU57XOkrMtfG63QOpQx25pHQ== /@rollup/plugin-replace/2.3.3_rollup@1.32.1: dependencies: '@rollup/pluginutils': 3.1.0_rollup@1.32.1 @@ -648,6 +706,20 @@ packages: dev: false resolution: integrity: sha512-1+FoymIdr9W9k0D8fdZBBPwi5YcMwh/RyESuL5bY29rLICFxSLOPK+ImVZ1OcWj9GEMsvDx5pNpJ311mHQk+MA== + /@rushstack/node-core-library/3.33.6: + dependencies: + '@types/node': 10.17.13 + colors: 1.2.5 + fs-extra: 7.0.1 + import-lazy: 4.0.0 + jju: 1.4.0 + resolve: 1.17.0 + semver: 7.3.2 + timsort: 0.3.0 + z-schema: 3.18.4 + dev: false + resolution: + integrity: sha512-930AP4Zj14Z4ulQ6ty2v3DM+D31zpLslAJuHB5E1qh/0+8JLkA0cf+wd2QiXjdIBpG/UdrHbReh5e9/e920YJw== /@rushstack/ts-command-line/4.3.13: dependencies: '@types/argparse': 1.0.33 @@ -656,33 +728,42 @@ packages: dev: false resolution: integrity: sha512-BUBbjYu67NJGQkpHu8aYm7kDoMFizL1qx78+72XE3mX/vDdXYJzw/FWS7TPcMJmY4kNlYs979v2B0Q0qa2wRiw== - /@sinonjs/commons/1.8.0: + /@rushstack/ts-command-line/4.6.10: + dependencies: + '@types/argparse': 1.0.38 + argparse: 1.0.10 + colors: 1.2.5 + string-argv: 0.3.1 + dev: false + resolution: + integrity: sha512-WhB/+yGvfmdsMFhEeVaJ9lBwPANFdsoKPsEkzSOVj60qG4aLWABeEl5rOdEwbbnx83RaNN2oQW8TX3enD+vdmw== + /@sinonjs/commons/1.8.1: dependencies: type-detect: 4.0.8 dev: false resolution: - integrity: sha512-wEj54PfsZ5jGSwMX68G8ZXFawcSglQSXqCftWX3ec8MDUzQdHgcKvw97awHbY0efQEL5iKUOAmmVtoYgmrSG4Q== + integrity: sha512-892K+kWUUi3cl+LlqEWIDrhvLgdL79tECi8JZUyq6IviKy/DNhuzCRlbHUjxK89f4ypPMMaFnFuR9Ie6DoIMsw== /@sinonjs/fake-timers/6.0.1: dependencies: - '@sinonjs/commons': 1.8.0 + '@sinonjs/commons': 1.8.1 dev: false resolution: integrity: sha512-MZPUxrmFubI36XS1DI3qmI0YdN1gks62JtFZvxR67ljjSNCeK6U08Zx4msEWOXuofgqUt6zPHSi1H9fbjR/NRA== /@sinonjs/formatio/5.0.1: dependencies: - '@sinonjs/commons': 1.8.0 - '@sinonjs/samsam': 5.0.3 + '@sinonjs/commons': 1.8.1 + '@sinonjs/samsam': 5.1.0 dev: false resolution: integrity: sha512-KaiQ5pBf1MpS09MuA0kp6KBQt2JUOQycqVG1NZXvzeaXe5LGFqAKueIS0bw4w0P9r7KuBSVdUk5QjXsUdu2CxQ== - /@sinonjs/samsam/5.0.3: + /@sinonjs/samsam/5.1.0: dependencies: - '@sinonjs/commons': 1.8.0 + '@sinonjs/commons': 1.8.1 lodash.get: 4.4.2 type-detect: 4.0.8 dev: false resolution: - integrity: sha512-QucHkc2uMJ0pFGjJUDP3F9dq5dx8QIaqISl9QgwLOh6P9yv877uONPGXh/OH/0zmM3tW1JjuJltAZV2l7zU+uQ== + integrity: sha512-42nyaQOVunX5Pm6GRJobmzbS7iLI+fhERITnETXzzwDZh+TtDr/Au3yAvXVjFmZ4wEUaE4Y3NFZfKv0bV0cbtg== /@sinonjs/text-encoding/0.7.1: dev: false resolution: @@ -691,6 +772,10 @@ packages: dev: false resolution: integrity: sha512-VQgHxyPMTj3hIlq9SY1mctqx+Jj8kpQfoLvDlVSDNOyuYs8JYfkuY3OW/4+dO657yPmNhHpePRx0/Tje5ImNVQ== + /@types/argparse/1.0.38: + dev: false + resolution: + integrity: sha512-ebDJ9b0e702Yr7pWgB0jzm+CX4Srzz8RcXtLJDJB+BSccqMa36uyH/zUsSYao5+BD1ytv3k3rPYCq4mAE1hsXA== /@types/async-lock/1.1.2: dev: false resolution: @@ -702,29 +787,29 @@ packages: /@types/body-parser/1.19.0: dependencies: '@types/connect': 3.4.33 - '@types/node': 8.10.61 + '@types/node': 8.10.62 dev: false resolution: integrity: sha512-W98JrE0j2K78swW4ukqMleo8R7h/pFETjM2DQ90MF6XK2i4LO4W3gQ71Lt4w3bfm2EvVSyWHplECvB5sK22yFQ== /@types/chai-as-promised/7.1.3: dependencies: - '@types/chai': 4.2.11 + '@types/chai': 4.2.12 dev: false resolution: integrity: sha512-FQnh1ohPXJELpKhzjuDkPLR2BZCAqed+a6xV4MI/T3XzHfd2FlarfUGUdZYgqYe8oxkYn0fchHEeHfHqdZ96sg== /@types/chai-string/1.4.2: dependencies: - '@types/chai': 4.2.11 + '@types/chai': 4.2.12 dev: false resolution: integrity: sha512-ld/1hV5qcPRGuwlPdvRfvM3Ka/iofOk2pH4VkasK4b1JJP1LjNmWWn0LsISf6RRzyhVOvs93rb9tM09e+UuF8Q== - /@types/chai/4.2.11: + /@types/chai/4.2.12: dev: false resolution: - integrity: sha512-t7uW6eFafjO+qJ3BIV2gGUyZs27egcNRkUdalkud+Qa3+kg//f129iuOFivHDXQ+vnU3fDXuwgv0cqMCbcE8sw== + integrity: sha512-aN5IAC8QNtSUdQzxu7lGBgYAOuU1tmRU4c9dIq5OKGf/SBVjXo+ffM2wEjudAWbgpOhy60nLoAGH1xm8fpCKFQ== /@types/chalk/2.2.0: dependencies: - chalk: 4.1.0 + chalk: 3.0.0 deprecated: 'This is a stub types definition for chalk (https://github.com/chalk/chalk). chalk provides its own type definitions, so you don''t need @types/chalk installed!' dev: false resolution: @@ -735,7 +820,7 @@ packages: integrity: sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ== /@types/connect/3.4.33: dependencies: - '@types/node': 8.10.61 + '@types/node': 8.10.62 dev: false resolution: integrity: sha512-2+FrkXY4zllzTNfJth7jOqEHC+enpLeGslEhpnTAkg21GkRrWV4SsAtqchtT4YS9/nODBU2/ZfsBY2X4J/dX7A== @@ -762,20 +847,20 @@ packages: dev: false resolution: integrity: sha512-jnqIUKDUqJbDIUxm0Uj7bnlMnRm1T/eZ9N+AVMqhPgzrba2GhGG5o/jCTwmdPK709nEZsGoMzXEDUjcXHa3W0g== - /@types/express-serve-static-core/4.17.8: + /@types/express-serve-static-core/4.17.9: dependencies: - '@types/node': 8.10.61 - '@types/qs': 6.9.3 + '@types/node': 8.10.62 + '@types/qs': 6.9.4 '@types/range-parser': 1.2.3 dev: false resolution: - integrity: sha512-1SJZ+R3Q/7mLkOD9ewCBDYD2k0WyZQtWYqF/2VvoNN2/uhI49J9CDN4OAm+wGMA0DbArA4ef27xl4+JwMtGggw== + integrity: sha512-DG0BYg6yO+ePW+XoDENYz8zhNGC3jDDEpComMYn7WJc4mY1Us8Rw9ax2YhJXxpyk2SF47PQAoQ0YyVT1a0bEkA== /@types/express/4.17.7: dependencies: '@types/body-parser': 1.19.0 - '@types/express-serve-static-core': 4.17.8 - '@types/qs': 6.9.3 - '@types/serve-static': 1.13.4 + '@types/express-serve-static-core': 4.17.9 + '@types/qs': 6.9.4 + '@types/serve-static': 1.13.5 dev: false resolution: integrity: sha512-dCOT5lcmV/uC2J9k0rPafATeeyz+99xTt54ReX11/LObZgfzJqZNcW27zGhYyX+9iSEGXGt5qLPwRSvBZcLvtQ== @@ -785,20 +870,20 @@ packages: integrity: sha512-mky/O83TXmGY39P1H9YbUpjV6l6voRYlufqfFCvel8l1phuy8HRjdWc1rrPuN53ITBJlbyMSV6z3niOySO5pgQ== /@types/fs-extra/8.1.1: dependencies: - '@types/node': 8.10.61 + '@types/node': 8.10.62 dev: false resolution: integrity: sha512-TcUlBem321DFQzBNuz8p0CLLKp0VvF/XH9E4KHNmgwyp4E3AfgI5cjiIVZWlbfThBop2qxFIh4+LeY6hVWWZ2w== /@types/glob/7.1.3: dependencies: '@types/minimatch': 3.0.3 - '@types/node': 8.10.61 + '@types/node': 8.10.62 dev: false resolution: integrity: sha512-SEYeGAIQIQX8NN6LDKprLjbrd5dARM5EXsd8GI/A5l0apYI1fGMWgPHSe4ZKL4eozlAyI+doUE9XbYS4xCkQ1w== /@types/is-buffer/2.0.0: dependencies: - '@types/node': 8.10.61 + '@types/node': 8.10.62 dev: false resolution: integrity: sha512-0f7N/e3BAz32qDYvgB4d2cqv1DqUwvGxHkXsrucICn8la1Vb6Yl6Eg8mPScGwUiqHJeE7diXlzaK+QMA9m4Gxw== @@ -820,24 +905,28 @@ packages: integrity: sha1-7ihweulOEdK4J7y+UnC86n8+ce4= /@types/jws/3.2.2: dependencies: - '@types/node': 8.10.61 + '@types/node': 8.10.62 dev: false resolution: integrity: sha512-S0ohSSX8ioT65zu8KbG99xKyFV3InIjbM3c8roYqWy4+5HpYPyUHLYykfhM6MEI5B/3s7KSZPGFyCzCrZ2TOZA== + /@types/jwt-decode/2.2.1: + dev: false + resolution: + integrity: sha512-aWw2YTtAdT7CskFyxEX2K21/zSDStuf/ikI3yBqmwpwJF0pS+/IX5DWv+1UFffZIbruP6cnT9/LAJV1gFwAT1A== /@types/long/4.0.1: dev: false resolution: integrity: sha512-5tXH6Bx/kNGd3MgffdmP4dy2Z+G4eaXw0SE81Tq3BNadtnMR5/ySMzX4SLEzHJzSmPNn4HIdpQsBvXMUykr58w== /@types/md5/2.2.0: dependencies: - '@types/node': 8.10.61 + '@types/node': 8.10.62 dev: false resolution: integrity: sha512-JN8OVL/wiDlCWTPzplsgMPu0uE9Q6blwp68rYsfk2G8aokRUQ8XD9MEhZwihfAiQvoyE+m31m6i3GFXwYWomKQ== - /@types/mime/2.0.2: + /@types/mime/2.0.3: dev: false resolution: - integrity: sha512-4kPlzbljFcsttWEq6aBW0OZe6BDajAmyvr2xknBG92tejQnvdGtT9+kXSZ580DqpxY9qG2xeQVF9Dq0ymUTo5Q== + integrity: sha512-Jus9s4CDbqwocc5pOAnh8ShfrnMcPHuJYzVcSUU7lrh8Ni5HuIqX3oilL86p3dlTrk0LzHRCgA/GQ7uNCw6l2Q== /@types/minimatch/3.0.3: dev: false resolution: @@ -852,13 +941,13 @@ packages: integrity: sha512-ZvO2tAcjmMi8V/5Z3JsyofMe3hasRcaw88cto5etSVMwVQfeivGAlEYmaQgceUSVYFofVjT+ioHsATjdWcFt1w== /@types/mock-fs/4.10.0: dependencies: - '@types/node': 8.10.61 + '@types/node': 8.10.62 dev: false resolution: integrity: sha512-FQ5alSzmHMmliqcL36JqIA4Yyn9jyJKvRSGV3mvPh108VFatX7naJDzSG4fnFQNZFq9dIx0Dzoe6ddflMB2Xkg== /@types/mock-require/2.0.0: dependencies: - '@types/node': 8.10.61 + '@types/node': 8.10.62 dev: false resolution: integrity: sha512-nOgjoE5bBiDeiA+z41i95makyHUSMWQMOPocP+J67Pqx/68HAXaeWN1NFtrAYYV6LrISIZZ8vKHm/a50k0f6Sg== @@ -868,7 +957,7 @@ packages: integrity: sha512-DPxmjiDwubsNmguG5X4fEJ+XCyzWM3GXWsqQlvUcjJKa91IOoJUy51meDr0GkzK64qqNcq85ymLlyjoct9tInw== /@types/node-fetch/2.5.7: dependencies: - '@types/node': 8.10.61 + '@types/node': 8.10.62 form-data: 3.0.0 dev: false resolution: @@ -877,10 +966,14 @@ packages: dev: false resolution: integrity: sha512-pMCcqU2zT4TjqYFrWtYHKal7Sl30Ims6ulZ4UFXxI4xbtQqK/qqKwkDoBFCfooRqqmRu9vY3xaJRwxSh673aYg== - /@types/node/8.10.61: + /@types/node/10.17.28: + dev: false + resolution: + integrity: sha512-dzjES1Egb4c1a89C7lKwQh8pwjYmlOAG9dW1pBgxEk57tMrLnssOfEthz8kdkNaBd7lIqQx7APm5+mZ619IiCQ== + /@types/node/8.10.62: dev: false resolution: - integrity: sha512-l+zSbvT8TPRaCxL1l9cwHCb0tSqGAGcjPJFItGGYat5oCTiq1uQQKYg5m7AF1mgnEBzFXGLJ2LRmNjtreRX76Q== + integrity: sha512-76fupxOYVxk36kb7O/6KtrAPZ9jnSK3+qisAX4tQMEuGNdlvl7ycwatlHqjoE6jHfVtXFM3pCrCixZOidc5cuw== /@types/prettier/2.0.2: dev: false resolution: @@ -889,10 +982,10 @@ packages: dev: false resolution: integrity: sha1-bqrDJHpMXO/JRILl2Hw3MLNfUFM= - /@types/qs/6.9.3: + /@types/qs/6.9.4: dev: false resolution: - integrity: sha512-7s9EQWupR1fTc2pSMtXRQ9w9gLOcrJn+h7HOXw4evxyvVqMi4f+q7d2tnFe3ng3SNHjtK+0EzGMGFUQX4/AQRA== + integrity: sha512-+wYo+L6ZF6BMoEjtf8zB2esQsqdV6WsjRK/GP9WOgLPrq87PbNWgIxS76dS5uvl/QXtHGakZmwTznIfcPXcKlQ== /@types/query-string/6.2.0: dev: false resolution: @@ -901,29 +994,50 @@ packages: dev: false resolution: integrity: sha512-ewFXqrQHlFsgc09MK5jP5iR7vumV/BYayNC6PgJO2LPe8vrnNFyjQjSppfEngITi0qvfKtzFvgKymGheFM9UOA== - /@types/resolve/0.0.8: + /@types/resolve/1.17.1: dependencies: - '@types/node': 10.17.13 + '@types/node': 10.17.28 + dev: false + resolution: + integrity: sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw== + /@types/rollup-plugin-node-builtins/2.1.1: + dependencies: + '@types/node': 10.17.28 + rollup: 0.63.5 + dev: false + resolution: + integrity: sha512-1LlOG2TMdv2fP+OVkqUk1mdGwEPfWBLv9BlGu8dkaSiJtMMkCY0C4FAa70m2+BipmtTYs5N9JAef2aCzatNp0w== + /@types/rollup-plugin-node-globals/1.4.0: + dependencies: + '@types/node': 10.17.28 + rollup: 0.63.5 dev: false resolution: - integrity: sha512-auApPaJf3NPfe18hSoJkp8EbZzer2ISk7o8mCC3M9he/a04+gbMF97NkpD2S8riMGvm4BMRI59/SZQSaLTKpsQ== + integrity: sha512-C/M+PCe+Up1nrdo8PTa2tGr6ppOVLWkKni2haYU55kWDBybwMupptV9MeghQLzu262aKsuWdzMjsfduSZt6A2w== + /@types/rollup-plugin-sourcemaps/0.4.2: + dependencies: + '@types/node': 10.17.28 + rollup: 0.63.5 + dev: false + resolution: + integrity: sha512-dqF1rMFy4O8yNlQYwYPos5Cfav0f6M7PLH8B33gsslQ0zA9MX1jMGokwNuJ3Z3EXAzsKF/xAWNHpFmELcgYJww== /@types/semaphore/1.1.0: dev: false resolution: integrity: sha512-YD+lyrPhrsJdSOaxmA9K1lzsCoN0J29IsQGMKd67SbkPDXxJPdwdqpok1sytD19NEozUaFpjIsKOWnJDOYO/GA== - /@types/serve-static/1.13.4: + /@types/serve-static/1.13.5: dependencies: - '@types/express-serve-static-core': 4.17.8 - '@types/mime': 2.0.2 + '@types/express-serve-static-core': 4.17.9 + '@types/mime': 2.0.3 dev: false resolution: - integrity: sha512-jTDt0o/YbpNwZbQmE/+2e+lfjJEJJR0I3OFaKQKPWkASkCoW3i6fsUnqudSMcNAfbtmADGu8f4MV4q+GqULmug== - /@types/sinon/9.0.4: + integrity: sha512-6M64P58N+OXjU432WoLLBQxbA0LRGBCRm7aAGQJ+SMC1IMl0dgRVi9EFfoDcS2a7Xogygk/eGN94CfwU9UF7UQ== + /@types/sinon/9.0.5: dependencies: '@types/sinonjs__fake-timers': 6.0.1 dev: false resolution: - integrity: sha512-sJmb32asJZY6Z2u09bl0G2wglSxDlROlAejCjsnor+LzBMz17gu8IU7vKC/vWDnv9zEq2wqADHVXFjf4eE8Gdw== + integrity: sha512-4CnkGdM/5/FXDGqL32JQ1ttVrGvhOoesLLF7VnTh4KdjK5N5VQOtxaylFqqTjnHx55MnD9O02Nbk5c1ELC8wlQ== /@types/sinonjs__fake-timers/6.0.1: dev: false resolution: @@ -934,33 +1048,33 @@ packages: integrity: sha512-I99sngh224D0M7XgW1s120zxCt3VYQ3IQsuw3P3jbq5GG4yc79+ZjyKznyOGIQrflfylLgcfekeZW/vk0yng6A== /@types/tunnel/0.0.0: dependencies: - '@types/node': 8.10.61 + '@types/node': 8.10.62 dev: false resolution: integrity: sha512-FGDp0iBRiBdPjOgjJmn1NH0KDLN+Z8fRmo+9J7XGBhubq1DPrGrbmG4UTlGzrpbCpesMqD0sWkzi27EYkOMHyg== /@types/tunnel/0.0.1: dependencies: - '@types/node': 8.10.61 + '@types/node': 8.10.62 dev: false resolution: integrity: sha512-AOqu6bQu5MSWwYvehMXLukFHnupHrpZ8nvgae5Ggie9UwzDR1CCwoXgSSWNZJuyOlCdfdsWMA5F2LlmvyoTv8A== - /@types/underscore/1.10.5: + /@types/underscore/1.10.22: dev: false resolution: - integrity: sha512-4pI77A5w5QjFFMlEDkcMYN/B3cWACYV++J2wYT15+WcB/om3YJVejzi6i++e/13J7G4rDGNX4HR6QVq9h8fOVQ== - /@types/uuid/8.0.0: + integrity: sha512-fiJulOOmc747q+mZwBtLyBu6yBX2uI4biuQ1Y3JvcU7YjmdOEOracUXTiET/PAWI2hhoUH1t4HbwJj42YEnbkg== + /@types/uuid/8.3.0: dev: false resolution: - integrity: sha512-xSQfNcvOiE5f9dyd4Kzxbof1aTrLobL278pGLKOZI6esGfZ7ts9Ka16CzIN6Y8hFHE1C7jIBZokULhK1bOgjRw== + integrity: sha512-eQ9qFW/fhfGJF8WKHGEHZEyVWfZxrT+6CLIJGBcZPfxUh/+BnEj+UCGYMlr9qZuX/2AltsvwrGqp0LhEW8D0zQ== /@types/ws/7.2.6: dependencies: - '@types/node': 8.10.61 + '@types/node': 8.10.62 dev: false resolution: integrity: sha512-Q07IrQUSNpr+cXU4E4LtkSIBPie5GLZyyMC1QtQYRLWz701+XcoVygGUZgvLqElq1nU4ICldMYPnexlBsg3dqQ== /@types/xml2js/0.4.5: dependencies: - '@types/node': 8.10.61 + '@types/node': 8.10.62 dev: false resolution: integrity: sha512-yohU3zMn0fkhlape1nxXG2bLEGZRc1FeqF80RoHaYXJN7uibaauXfhzhOJr1Xh36sn+/tx21QAOf07b/xYVk1w== @@ -976,18 +1090,18 @@ packages: integrity: sha512-Dk/IDOPtOgubt/IaevIUbTgV7doaKkoorvOyYM2CMwuDyP89bekI7H4xLIwunNYiK9jhCkmc6pUrJk3cj2AB9w== /@types/yauzl/2.9.1: dependencies: - '@types/node': 8.10.61 + '@types/node': 8.10.62 dev: false optional: true resolution: integrity: sha512-A1b8SU4D10uoPjwb0lnHmmu8wZhR9d+9o2PKBQT2jU5YPTKsxac6M2qGAdY7VcL+dHHhARVUDmeg0rOrcd9EjA== - /@typescript-eslint/eslint-plugin-tslint/2.34.0_f8f62cb1f34b48259c049dd0f60912e9: + /@typescript-eslint/eslint-plugin-tslint/2.34.0_8ecfbc9f33e253d01ca741854a1cb01c: dependencies: - '@typescript-eslint/experimental-utils': 2.34.0_eslint@6.8.0+typescript@3.9.6 + '@typescript-eslint/experimental-utils': 2.34.0_eslint@6.8.0+typescript@3.9.7 eslint: 6.8.0 - lodash: 4.17.19 - tslint: 5.20.1_typescript@3.9.6 - typescript: 3.9.6 + lodash: 4.17.20 + tslint: 5.20.1_typescript@3.9.7 + typescript: 3.9.7 dev: false engines: node: ^8.10.0 || ^10.13.0 || >=11.10.1 @@ -997,15 +1111,15 @@ packages: typescript: '*' resolution: integrity: sha512-sCPCbFm1qRTzloeMUlHEKfgQH/2u9bUcW7tX5wjzRw1LWzsr+iNXS8I+2or9ep8mlqqE0Vy6hsMm4vVF82M2jw== - /@typescript-eslint/eslint-plugin/2.34.0_3787943315ebc5ea524d5c102dc9e452: + /@typescript-eslint/eslint-plugin/2.34.0_5004700905763c91177aaa7d1d0d56ac: dependencies: - '@typescript-eslint/experimental-utils': 2.34.0_eslint@6.8.0+typescript@3.9.6 - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.6 + '@typescript-eslint/experimental-utils': 2.34.0_eslint@6.8.0+typescript@3.9.7 + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.7 eslint: 6.8.0 functional-red-black-tree: 1.0.1 regexpp: 3.1.0 - tsutils: 3.17.1_typescript@3.9.6 - typescript: 3.9.6 + tsutils: 3.17.1_typescript@3.9.7 + typescript: 3.9.7 dev: false engines: node: ^8.10.0 || ^10.13.0 || >=11.10.1 @@ -1018,14 +1132,14 @@ packages: optional: true resolution: integrity: sha512-4zY3Z88rEE99+CNvTbXSyovv2z9PNOVffTWD2W8QF5s2prBQtwN2zadqERcrHpcR7O/+KMI3fcTAmUUhK/iQcQ== - /@typescript-eslint/experimental-utils/2.34.0_eslint@6.8.0+typescript@3.9.6: + /@typescript-eslint/experimental-utils/2.34.0_eslint@6.8.0+typescript@3.9.7: dependencies: '@types/json-schema': 7.0.5 - '@typescript-eslint/typescript-estree': 2.34.0_typescript@3.9.6 + '@typescript-eslint/typescript-estree': 2.34.0_typescript@3.9.7 eslint: 6.8.0 eslint-scope: 5.1.0 eslint-utils: 2.1.0 - typescript: 3.9.6 + typescript: 3.9.7 dev: false engines: node: ^8.10.0 || ^10.13.0 || >=11.10.1 @@ -1034,14 +1148,14 @@ packages: typescript: '*' resolution: integrity: sha512-eS6FTkq+wuMJ+sgtuNTtcqavWXqsflWcfBnlYhg/nS4aZ1leewkXGbvBhaapn1q6qf4M71bsR1tez5JTRMuqwA== - /@typescript-eslint/parser/2.34.0_eslint@6.8.0+typescript@3.9.6: + /@typescript-eslint/parser/2.34.0_eslint@6.8.0+typescript@3.9.7: dependencies: '@types/eslint-visitor-keys': 1.0.0 - '@typescript-eslint/experimental-utils': 2.34.0_eslint@6.8.0+typescript@3.9.6 - '@typescript-eslint/typescript-estree': 2.34.0_typescript@3.9.6 + '@typescript-eslint/experimental-utils': 2.34.0_eslint@6.8.0+typescript@3.9.7 + '@typescript-eslint/typescript-estree': 2.34.0_typescript@3.9.7 eslint: 6.8.0 eslint-visitor-keys: 1.3.0 - typescript: 3.9.6 + typescript: 3.9.7 dev: false engines: node: ^8.10.0 || ^10.13.0 || >=11.10.1 @@ -1053,16 +1167,16 @@ packages: optional: true resolution: integrity: sha512-03ilO0ucSD0EPTw2X4PntSIRFtDPWjrVq7C3/Z3VQHRC7+13YB55rcJI3Jt+YgeHbjUdJPcPa7b23rXCBokuyA== - /@typescript-eslint/typescript-estree/2.34.0_typescript@3.9.6: + /@typescript-eslint/typescript-estree/2.34.0_typescript@3.9.7: dependencies: debug: 4.1.1 eslint-visitor-keys: 1.3.0 glob: 7.1.6 is-glob: 4.0.1 - lodash: 4.17.19 + lodash: 4.17.20 semver: 7.3.2 - tsutils: 3.17.1_typescript@3.9.6 - typescript: 3.9.6 + tsutils: 3.17.1_typescript@3.9.7 + typescript: 3.9.7 dev: false engines: node: ^8.10.0 || ^10.13.0 || >=11.10.1 @@ -1085,6 +1199,12 @@ packages: node: '>=6.5' resolution: integrity: sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg== + /abstract-leveldown/0.12.4: + dependencies: + xtend: 3.0.0 + dev: false + resolution: + integrity: sha1-KeGOYy5g5OIh1YECR4UqY9ey5BA= /accepts/1.3.7: dependencies: mime-types: 2.1.27 @@ -1094,24 +1214,37 @@ packages: node: '>= 0.6' resolution: integrity: sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA== - /acorn-jsx/5.2.0_acorn@7.3.1: + /acorn-jsx/5.2.0_acorn@7.4.0: dependencies: - acorn: 7.3.1 + acorn: 7.4.0 dev: false peerDependencies: acorn: ^6.0.0 || ^7.0.0 resolution: integrity: sha512-HiUX/+K2YpkpJ+SzBffkM/AQ2YE03S0U1kjTLVpoJdhZMOWy8qvXVN9JdLqv2QsaQ6MPYQIuNmwD8zOiYUofLQ== - /acorn/7.3.1: + /acorn-walk/7.2.0: + dev: false + engines: + node: '>=0.4.0' + resolution: + integrity: sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA== + /acorn/5.7.4: + dev: false + engines: + node: '>=0.4.0' + hasBin: true + resolution: + integrity: sha512-1D++VG7BhrtvQpNbBzovKNc1FLGGEE/oGe7b9xJm/RFHMBeUaUGpluV9RLjZa47YFdPcDAenEYuq9pQPcMdLJg== + /acorn/7.4.0: dev: false engines: node: '>=0.4.0' hasBin: true resolution: - integrity: sha512-tLc0wSnatxAQHVHUapaHdz72pi9KUyHjq5KyHjGg9Y8Ifdc79pTh2XvI6I1/chZbnM7QtNKzh66ooDogPZSleA== + integrity: sha512-+G7P8jJmCHr+S+cLfQxygbWhXy+8YTVGzAkpEbcLo2mLoL7tij/VG41QSHACSf5QgYRhMZYHuNc6drJaO0Da+w== /adal-node/0.1.28: dependencies: - '@types/node': 8.10.61 + '@types/node': 8.10.62 async: 3.2.0 date-utils: 1.2.21 jws: 3.2.2 @@ -1159,7 +1292,7 @@ packages: node: '>= 6.0.0' resolution: integrity: sha512-01q25QQDwLSsyfhrKbn8yuur+JNw0H+0Y4JiGIKd3z9aYk/w/2kxD/Upc+t2ZBBSUNff50VjPsSW2YxM8QYKVg== - /ajv/6.12.3: + /ajv/6.12.4: dependencies: fast-deep-equal: 3.1.3 fast-json-stable-stringify: 2.1.0 @@ -1167,7 +1300,7 @@ packages: uri-js: 4.2.2 dev: false resolution: - integrity: sha512-4K0cK3L1hsqk9xIb2z9vs/XU+PGJZ9PNpJRDS9YLzmNdX6jmVPfamLvTJr0aDAusnHyCHO6MjzlkAsgtqp9teA== + integrity: sha512-eienB2c9qVQs2KWexhkrdMLVDoIQCz5KSeLxwg9Lzk4DOfBtIK9PQwwufcsn1jjGuf9WZmqPMbGxOzfcuphJCQ== /amdefine/1.0.1: dev: false engines: @@ -1268,6 +1401,7 @@ packages: integrity: sha512-P009oYkeHyU742iSZJzZZywj4QRJdnTWffaKuJQLablCZ1uz6/cW4yaRgcDaoQ+uwOxxnt0gRUcwfsNP2ri0gw== /aproba/1.2.0: dev: false + optional: true resolution: integrity: sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw== /archy/1.0.0: @@ -1279,6 +1413,7 @@ packages: delegates: 1.0.0 readable-stream: 2.3.7 dev: false + optional: true resolution: integrity: sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w== /arg/4.1.0: @@ -1360,6 +1495,15 @@ packages: dev: false resolution: integrity: sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY= + /asn1.js/5.4.1: + dependencies: + bn.js: 4.11.9 + inherits: 2.0.4 + minimalistic-assert: 1.0.1 + safer-buffer: 2.1.2 + dev: false + resolution: + integrity: sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA== /asn1/0.2.4: dependencies: safer-buffer: 2.1.2 @@ -1379,16 +1523,27 @@ packages: dev: false resolution: integrity: sha512-EDsgawzwoun2CZkCgtxJbv392v4nbk9XDD06zI+kQYoBM/3RBWLlEyJARDOmhAAosBjWACEkKL6S+lIZtcAubA== + /assert/2.0.0: + dependencies: + es6-object-assign: 1.1.0 + is-nan: 1.3.0 + object-is: 1.1.2 + util: 0.12.3 + dev: false + resolution: + integrity: sha512-se5Cd+js9dXJnu6Ag2JFc00t+HmHOen+8Q+L7O9zI0PqQXr20uk2J0XQqMxZEeo5U50o8Nvmmx7dZrl+Ufr35A== /assertion-error/1.1.0: dev: false resolution: integrity: sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw== - /ast-types/0.13.3: + /ast-types/0.14.1: + dependencies: + tslib: 2.0.1 dev: false engines: node: '>=4' resolution: - integrity: sha512-XTZ7xGML849LkQP86sWdQzfhwbt3YwIO6MqbX9mUNYY98VKaaVZP7YNNm70IpwecbkkxmfC5IYAzOQ/2p29zRA== + integrity: sha512-pfSiukbt23P1qMhNnsozLzhMLBs7EEeXqPyvPmnuZM+RMfwfqwDbSVKYflgGuVI7/VehR4oMks0igzdNAg4VeQ== /astral-regex/1.0.0: dev: false engines: @@ -1436,26 +1591,32 @@ packages: node: '>= 0.4' resolution: integrity: sha512-XWX3OX8Onv97LMk/ftVyBibpGwY5a8SmuxZPzeOxqmuEqUCOM9ZE+uIaD1VNJ5QnvU2UQusvmKbuM1FR8QWGfQ== - /avsc/5.4.22: + /avsc/5.5.2: dev: false engines: node: '>=0.11' resolution: - integrity: sha512-3PuueubBH33oLLhnnwmjZh/+kvcpyyuOlsmvUaNAgvsk/cAZe0Zs8OgYmL7z6sXWyEfV2PjyyxwCeoiJIwYpEg== + integrity: sha512-ADkdb9T5KhRRIzbRZ2Pj1f+SMILDnihgbqlksbJcbHpnyNYCAJDa4RCG6o5AT4uktW2noRRvSF7DTrkE4Z4z4A== /aws-sign2/0.7.0: dev: false resolution: integrity: sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg= - /aws4/1.10.0: + /aws4/1.10.1: dev: false resolution: - integrity: sha512-3YDiu347mtVtjpyV3u5kVqQLP242c06zwDOgpeRnybmXlYYsLbtTrUBUm8i8srONt+FWobl5aibnU1030PeeuA== + integrity: sha512-zg7Hz2k5lI8kb7U32998pRRFin7zJlkfezGJjUc2heaD4Pw2wObakCDVzkKztTm/Ln7eiVvYsjqak0Ed4LkMDA== /axios/0.19.2: dependencies: follow-redirects: 1.5.10 dev: false resolution: integrity: sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA== + /axios/0.20.0: + dependencies: + follow-redirects: 1.13.0 + dev: false + resolution: + integrity: sha512-ANA4rr2BDcmmAQLOKft2fufrtuvlqR+cXNNinUmvfeSNCOF98PZL+7M/v1zIdGo7OLjEA9J2gXJL+j4zGsl0bA== /azure-storage/2.10.3: dependencies: browserify-mime: 1.2.9 @@ -1539,14 +1700,20 @@ packages: node: '>=8' resolution: integrity: sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ== - /bl/4.0.2: + /bl/0.8.2: + dependencies: + readable-stream: 1.0.34 + dev: false + resolution: + integrity: sha1-yba8oI0bwuoA/Ir7Txpf0eHGbk4= + /bl/4.0.3: dependencies: buffer: 5.6.0 inherits: 2.0.4 readable-stream: 3.6.0 dev: false resolution: - integrity: sha512-j4OH8f6Qg2bGuWfRiltT2HYGx0e1QcBTrK9KAHNMwMZdQnDZFk0ZSYIpADjYCB3U12nicC5tVJwSIhwOWjb4RQ== + integrity: sha512-fs4G6/Hu4/EE+F75J8DuN/0IpQqNjAdC7aEQv7Qt8MHGUH7Ckv2MwTEEeN9QehD0pfIDkMI1bkHYkKy7xHyKIg== /blob/0.0.5: dev: false resolution: @@ -1555,6 +1722,14 @@ packages: dev: false resolution: integrity: sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== + /bn.js/4.11.9: + dev: false + resolution: + integrity: sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw== + /bn.js/5.1.3: + dev: false + resolution: + integrity: sha512-GkTiFpjFtUzU9CbMeJ5iazkCzGL3jrhzerzZIuqLABjbwRaFt33I9tUdSNryIptM+RxDet6OKm2WnLXzW51KsQ== /body-parser/1.19.0: dependencies: bytes: 3.1.0 @@ -1587,14 +1762,87 @@ packages: node: '>=8' resolution: integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== + /brorand/1.1.0: + dev: false + resolution: + integrity: sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8= + /browser-resolve/1.11.3: + dependencies: + resolve: 1.1.7 + dev: false + resolution: + integrity: sha512-exDi1BYWB/6raKHmDTCicQfTkqwN5fioMFV4j8BsfMU4R2DK/QfZfK7kOVkmWCNANf0snkBzqGqAJBao9gZMdQ== /browser-stdout/1.3.1: dev: false resolution: integrity: sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== + /browserify-aes/1.2.0: + dependencies: + buffer-xor: 1.0.3 + cipher-base: 1.0.4 + create-hash: 1.2.0 + evp_bytestokey: 1.0.3 + inherits: 2.0.4 + safe-buffer: 5.2.1 + dev: false + resolution: + integrity: sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA== + /browserify-cipher/1.0.1: + dependencies: + browserify-aes: 1.2.0 + browserify-des: 1.0.2 + evp_bytestokey: 1.0.3 + dev: false + resolution: + integrity: sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w== + /browserify-des/1.0.2: + dependencies: + cipher-base: 1.0.4 + des.js: 1.0.1 + inherits: 2.0.4 + safe-buffer: 5.2.1 + dev: false + resolution: + integrity: sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A== + /browserify-fs/1.0.0: + dependencies: + level-filesystem: 1.2.0 + level-js: 2.2.4 + levelup: 0.18.6 + dev: false + resolution: + integrity: sha1-8HWqinKdTRcW0GZiDjhvzBMRqW8= /browserify-mime/1.2.9: dev: false resolution: integrity: sha1-rrGvKN5sDXpqLOQK22j/GEIq8x8= + /browserify-rsa/4.0.1: + dependencies: + bn.js: 4.11.9 + randombytes: 2.1.0 + dev: false + resolution: + integrity: sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ= + /browserify-sign/4.2.1: + dependencies: + bn.js: 5.1.3 + browserify-rsa: 4.0.1 + create-hash: 1.2.0 + create-hmac: 1.1.7 + elliptic: 6.5.3 + inherits: 2.0.4 + parse-asn1: 5.1.6 + readable-stream: 3.6.0 + safe-buffer: 5.2.1 + dev: false + resolution: + integrity: sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg== + /browserify-zlib/0.2.0: + dependencies: + pako: 1.0.11 + dev: false + resolution: + integrity: sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA== /buffer-crc32/0.2.13: dev: false resolution: @@ -1603,10 +1851,18 @@ packages: dev: false resolution: integrity: sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk= + /buffer-es6/4.9.3: + dev: false + resolution: + integrity: sha1-8mNHuC33b9N+GLy1KIxJcM/VxAQ= /buffer-from/1.1.1: dev: false resolution: integrity: sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== + /buffer-xor/1.0.3: + dev: false + resolution: + integrity: sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk= /buffer/5.6.0: dependencies: base64-js: 1.3.1 @@ -1626,6 +1882,10 @@ packages: node: '>=6' resolution: integrity: sha512-k0KL0aWZuBt2lrxrcASWDfwOLMnodeQjodT/1SxEQAXsHANgo6ZC/VEaSEHCXt7aSTZ4/4H5LKa+tBXmW7Vtvw== + /builtin-status-codes/3.0.0: + dev: false + resolution: + integrity: sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug= /bytes/3.1.0: dev: false engines: @@ -1645,7 +1905,7 @@ packages: rimraf: 3.0.2 test-exclude: 6.0.0 v8-to-istanbul: 5.0.1 - yargs: 15.4.0 + yargs: 15.4.1 yargs-parser: 18.1.3 dev: false engines: @@ -1763,7 +2023,7 @@ packages: /chalk/3.0.0: dependencies: ansi-styles: 4.2.1 - supports-color: 7.1.0 + supports-color: 7.2.0 dev: false engines: node: '>=8' @@ -1772,7 +2032,7 @@ packages: /chalk/4.1.0: dependencies: ansi-styles: 4.2.1 - supports-color: 7.1.0 + supports-color: 7.2.0 dev: false engines: node: '>=10' @@ -1812,7 +2072,7 @@ packages: fsevents: 2.1.3 resolution: integrity: sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A== - /chokidar/3.4.0: + /chokidar/3.4.2: dependencies: anymatch: 3.1.1 braces: 3.0.2 @@ -1827,7 +2087,7 @@ packages: optionalDependencies: fsevents: 2.1.3 resolution: - integrity: sha512-aXAaho2VJtisB/1fg1+3nlLJqGOuewTzQpd/Tz0yTg2R0e4IGtshYvtjowyEumcBv2z+y4+kc75Mz7j5xJskcQ== + integrity: sha512-IZHaDeBeI+sZJRX7lGcXsdzgvZqKv6sECqsbErJA4mHWfpRrD8B97kSFN4cQz6nGBGiuFia1MKR4d6c1o8Cv7A== /chownr/1.1.4: dev: false resolution: @@ -1836,14 +2096,13 @@ packages: dev: false resolution: integrity: sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== - /cli-cursor/2.1.0: + /cipher-base/1.0.4: dependencies: - restore-cursor: 2.0.0 + inherits: 2.0.4 + safe-buffer: 5.2.1 dev: false - engines: - node: '>=4' resolution: - integrity: sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU= + integrity: sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q== /cli-cursor/3.1.0: dependencies: restore-cursor: 3.1.0 @@ -1852,12 +2111,6 @@ packages: node: '>=8' resolution: integrity: sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw== - /cli-spinners/1.3.1: - dev: false - engines: - node: '>=4' - resolution: - integrity: sha512-1QL4544moEsDVH9T/l6Cemov/37iv1RtoKf7NJ04A60+4MREXNfx/QvavbH6QoGdsD4N4Mwy49cmaINR/o2mdg== /cli-width/3.0.0: dev: false engines: @@ -1884,6 +2137,10 @@ packages: dev: false resolution: integrity: sha1-uI+UqCzzi4eR1YBG6kAprYjKmdE= + /clone/0.1.19: + dev: false + resolution: + integrity: sha1-YT+2hjmyaklKxTJT4Vsaa9iK2oU= /clone/1.0.4: dev: false engines: @@ -1901,6 +2158,7 @@ packages: dev: false engines: node: '>=0.10.0' + optional: true resolution: integrity: sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c= /color-convert/1.9.3: @@ -1942,6 +2200,15 @@ packages: node: '>=0.1.90' resolution: integrity: sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== + /combine-source-map/0.8.0: + dependencies: + convert-source-map: 1.1.3 + inline-source-map: 0.6.2 + lodash.memoize: 3.0.4 + source-map: 0.5.7 + dev: false + resolution: + integrity: sha1-pY0N8ELBhvz4IqjoAV9UUNLXmos= /combined-stream/1.0.8: dependencies: delayed-stream: 1.0.0 @@ -1984,6 +2251,17 @@ packages: dev: false resolution: integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= + /concat-stream/1.6.2: + dependencies: + buffer-from: 1.1.1 + inherits: 2.0.4 + readable-stream: 2.3.7 + typedarray: 0.0.6 + dev: false + engines: + '0': node >= 0.8 + resolution: + integrity: sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== /connect/3.7.0: dependencies: debug: 2.6.9 @@ -1995,10 +2273,19 @@ packages: node: '>= 0.10.0' resolution: integrity: sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ== + /console-browserify/1.2.0: + dev: false + resolution: + integrity: sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA== /console-control-strings/1.1.0: dev: false + optional: true resolution: integrity: sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4= + /constants-browserify/1.0.0: + dev: false + resolution: + integrity: sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U= /contains-path/0.1.0: dev: false engines: @@ -2019,6 +2306,10 @@ packages: node: '>= 0.6' resolution: integrity: sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA== + /convert-source-map/1.1.3: + dev: false + resolution: + integrity: sha1-SCnId+n+SbMWHzvzZziI4gRpmGA= /convert-source-map/1.7.0: dependencies: safe-buffer: 5.1.2 @@ -2041,11 +2332,6 @@ packages: node: '>= 0.6' resolution: integrity: sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg== - /core-js-pure/3.6.5: - dev: false - requiresBuild: true - resolution: - integrity: sha512-lacdXOimsiD0QyNf9BC/mxivNJ/ybBGJXQFKzRekp1WTHoVUWsUHEn+2T8GJAzzIhyOuXA+gOxCVN3l+5PLPUA== /core-js/2.6.11: deprecated: 'core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.' dev: false @@ -2073,6 +2359,34 @@ packages: node: '>=6' resolution: integrity: sha512-fmvV4caBnofhPe8kOcitBwSn2f39QLjnAnGq3gO9dfd75mUytzKNZB1hde6QHunW2Rt+OwuBOMc3i1tNElbszA== + /create-ecdh/4.0.4: + dependencies: + bn.js: 4.11.9 + elliptic: 6.5.3 + dev: false + resolution: + integrity: sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A== + /create-hash/1.2.0: + dependencies: + cipher-base: 1.0.4 + inherits: 2.0.4 + md5.js: 1.3.5 + ripemd160: 2.0.2 + sha.js: 2.4.11 + dev: false + resolution: + integrity: sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg== + /create-hmac/1.1.7: + dependencies: + cipher-base: 1.0.4 + create-hash: 1.2.0 + inherits: 2.0.4 + ripemd160: 2.0.2 + safe-buffer: 5.2.1 + sha.js: 2.4.11 + dev: false + resolution: + integrity: sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg== /cross-env/7.0.2: dependencies: cross-spawn: 7.0.3 @@ -2091,14 +2405,6 @@ packages: dev: false resolution: integrity: sha1-e5JHYhwjrf3ThWAEqCPL45dCTUE= - /cross-spawn/5.1.0: - dependencies: - lru-cache: 4.1.5 - shebang-command: 1.2.0 - which: 1.3.1 - dev: false - resolution: - integrity: sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk= /cross-spawn/6.0.5: dependencies: nice-try: 1.0.5 @@ -2125,6 +2431,22 @@ packages: dev: false resolution: integrity: sha1-iNf/fsDfuG9xPch7u0LQRNPmxBs= + /crypto-browserify/3.12.0: + dependencies: + browserify-cipher: 1.0.1 + browserify-sign: 4.2.1 + create-ecdh: 4.0.4 + create-hash: 1.2.0 + create-hmac: 1.1.7 + diffie-hellman: 5.0.3 + inherits: 2.0.4 + pbkdf2: 3.1.1 + public-encrypt: 4.0.3 + randombytes: 2.1.0 + randomfill: 1.0.4 + dev: false + resolution: + integrity: sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg== /currently-unhandled/0.4.1: dependencies: array-find-index: 1.0.2 @@ -2213,14 +2535,6 @@ packages: node: '>=0.10.0' resolution: integrity: sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= - /decamelize/3.2.0: - dependencies: - xregexp: 4.3.0 - dev: false - engines: - node: '>=6' - resolution: - integrity: sha512-4TgkVUsmmu7oCSyGBm5FvfMoACuoh9EOidm7V5/J2X2djAwwt57qb3F2KMP2ITqODTCSwb+YRV+0Zqrv18k/hw== /decode-uri-component/0.2.0: dev: false engines: @@ -2233,6 +2547,7 @@ packages: dev: false engines: node: '>=8' + optional: true resolution: integrity: sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw== /deep-eql/3.0.1: @@ -2247,6 +2562,7 @@ packages: dev: false engines: node: '>=4.0.0' + optional: true resolution: integrity: sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== /deep-freeze/0.0.1: @@ -2271,6 +2587,18 @@ packages: node: '>=4' resolution: integrity: sha1-9fj7sYp9bVCyH2QfZJ67Uiz+JPc= + /defaults/1.0.3: + dependencies: + clone: 1.0.4 + dev: false + resolution: + integrity: sha1-xlYFHpgX2f8I7YgUd/P+QBnz730= + /deferred-leveldown/0.2.0: + dependencies: + abstract-leveldown: 0.12.4 + dev: false + resolution: + integrity: sha1-LO8fER4cV4cNi7uK8mUOWHzS9bQ= /define-properties/1.1.3: dependencies: object-keys: 1.1.1 @@ -2281,18 +2609,18 @@ packages: integrity: sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ== /degenerator/1.0.4: dependencies: - ast-types: 0.13.3 + ast-types: 0.14.1 escodegen: 1.14.3 esprima: 3.1.3 dev: false resolution: integrity: sha1-/PSQo37OJmRk2cxDGrmMWBnO0JU= - /delay/4.3.0: + /delay/4.4.0: dev: false engines: node: '>=6' resolution: - integrity: sha512-Lwaf3zVFDMBop1yDuFZ19F9WyGcZcGacsbdlZtWjQmM50tOcMntm1njF/Nb/Vjij3KaSvCF+sEYGKrrjObu2NA== + integrity: sha512-txgOrJu3OdtOfTiEOT2e76dJVfG/1dz2NZ4F0Pyt4UGZJryssMRp5vdM5wQoLwSOBNdrJv3F9PAhp/heqd7vrA== /delayed-stream/1.0.0: dev: false engines: @@ -2301,6 +2629,7 @@ packages: integrity: sha1-3zrhmayt+31ECqrgsp4icrJOxhk= /delegates/1.0.0: dev: false + optional: true resolution: integrity: sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o= /depd/1.1.2: @@ -2309,6 +2638,13 @@ packages: node: '>= 0.6' resolution: integrity: sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= + /des.js/1.0.1: + dependencies: + inherits: 2.0.4 + minimalistic-assert: 1.0.1 + dev: false + resolution: + integrity: sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA== /destroy/1.0.4: dev: false resolution: @@ -2318,16 +2654,13 @@ packages: engines: node: '>=0.10' hasBin: true + optional: true resolution: integrity: sha1-+hN8S9aY7fVc1c0CrFWfkaTEups= /di/0.0.1: dev: false resolution: integrity: sha1-gGZJMmzqp8qjMG112YXqJ0i6kTw= - /diff-match-patch/1.0.5: - dev: false - resolution: - integrity: sha512-IayShXAgj/QMXgB0IWmKx+rOPuGMhqm5w6jvFxmVenXKIzRqTAAsbBPT3kWQeGANj3jGgvcvv4yK6SxqYmikgw== /diff/3.5.0: dev: false engines: @@ -2340,6 +2673,14 @@ packages: node: '>=0.3.1' resolution: integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== + /diffie-hellman/5.0.3: + dependencies: + bn.js: 4.11.9 + miller-rabin: 4.0.1 + randombytes: 2.1.0 + dev: false + resolution: + integrity: sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg== /disparity/3.0.0: dependencies: ansi-styles: 4.2.1 @@ -2380,6 +2721,12 @@ packages: dev: false resolution: integrity: sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w== + /domain-browser/4.17.0: + dev: false + engines: + node: '>=10' + resolution: + integrity: sha512-Hj9LbFLqt4MBK/rq24/Bk3nhcPlaKfTCFs8XENVqNQray7WtKbo/GYMGDAVW62O83lgRjxvD5UCmtQsN9B/YxA== /dotenv/8.2.0: dev: false engines: @@ -2389,7 +2736,7 @@ packages: /downlevel-dts/0.4.0: dependencies: shelljs: 0.8.4 - typescript: 3.9.6 + typescript: 3.9.7 dev: false hasBin: true resolution: @@ -2421,6 +2768,18 @@ packages: dev: false resolution: integrity: sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= + /elliptic/6.5.3: + dependencies: + bn.js: 4.11.9 + brorand: 1.1.0 + hash.js: 1.1.7 + hmac-drbg: 1.0.1 + inherits: 2.0.4 + minimalistic-assert: 1.0.1 + minimalistic-crypto-utils: 1.0.1 + dev: false + resolution: + integrity: sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw== /emoji-regex/7.0.3: dev: false resolution: @@ -2484,6 +2843,13 @@ packages: dev: false resolution: integrity: sha1-6WQhkyWiHQX0RGai9obtbOX13R0= + /errno/0.1.7: + dependencies: + prr: 1.0.1 + dev: false + hasBin: true + resolution: + integrity: sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg== /error-ex/1.3.2: dependencies: is-arrayish: 0.2.1 @@ -2497,7 +2863,7 @@ packages: has: 1.0.3 has-symbols: 1.0.1 is-callable: 1.2.0 - is-regex: 1.1.0 + is-regex: 1.1.1 object-inspect: 1.8.0 object-keys: 1.1.1 object.assign: 4.1.0 @@ -2552,6 +2918,10 @@ packages: dev: false resolution: integrity: sha1-tIltSmz4LdWzP0m3E0CMY4D2zZc= + /escape-regexp/0.0.1: + dev: false + resolution: + integrity: sha1-9EvaEtRbvfnLf4Yu5+SCez3TIlQ= /escape-string-regexp/1.0.5: dev: false engines: @@ -2679,6 +3049,14 @@ packages: eslint: '>=5.16.0' resolution: integrity: sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g== + /eslint-plugin-prefer-arrow/1.2.2_eslint@6.8.0: + dependencies: + eslint: 6.8.0 + dev: false + peerDependencies: + eslint: '>=2.0.0' + resolution: + integrity: sha512-C8YMhL+r8RMeMdYAw/rQtE6xNdMulj+zGWud/qIGnlmomiPRaLDGLMeskZ3alN6uMBojmooRimtdrXebLN4svQ== /eslint-plugin-prettier/3.1.4_eslint@6.8.0+prettier@1.19.1: dependencies: eslint: 6.8.0 @@ -2732,7 +3110,7 @@ packages: /eslint/6.8.0: dependencies: '@babel/code-frame': 7.10.4 - ajv: 6.12.3 + ajv: 6.12.4 chalk: 2.4.2 cross-spawn: 6.0.5 debug: 4.1.1 @@ -2750,12 +3128,12 @@ packages: ignore: 4.0.6 import-fresh: 3.2.1 imurmurhash: 0.1.4 - inquirer: 7.3.0 + inquirer: 7.3.3 is-glob: 4.0.1 js-yaml: 3.14.0 json-stable-stringify-without-jsonify: 1.0.1 levn: 0.3.0 - lodash: 4.17.19 + lodash: 4.17.20 minimatch: 3.0.4 mkdirp: 0.5.5 natural-compare: 1.4.0 @@ -2764,7 +3142,7 @@ packages: regexpp: 2.0.1 semver: 6.3.0 strip-ansi: 5.2.0 - strip-json-comments: 3.1.0 + strip-json-comments: 3.1.1 table: 5.4.6 text-table: 0.2.0 v8-compile-cache: 2.1.1 @@ -2782,8 +3160,8 @@ packages: integrity: sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA== /espree/6.2.1: dependencies: - acorn: 7.3.1 - acorn-jsx: 5.2.0_acorn@7.3.1 + acorn: 7.4.0 + acorn-jsx: 5.2.0_acorn@7.4.0 eslint-visitor-keys: 1.3.0 dev: false engines: @@ -2813,7 +3191,7 @@ packages: integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== /esquery/1.3.1: dependencies: - estraverse: 5.1.0 + estraverse: 5.2.0 dev: false engines: node: '>=0.10' @@ -2839,12 +3217,16 @@ packages: node: '>=4.0' resolution: integrity: sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== - /estraverse/5.1.0: + /estraverse/5.2.0: dev: false engines: node: '>=4.0' resolution: - integrity: sha512-FyohXK+R0vE+y1nHLoBM7ZTyqRpqAlhdZHCWIWEviFLiGB8b04H6bQs8G+XTthacvT8VuwvteiP7RJSxMs8UEw== + integrity: sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ== + /estree-walker/0.5.2: + dev: false + resolution: + integrity: sha512-XpCnW/AE10ws/kDAs37cngSkvgIR8aN3G0MS85m7dUpuK2EREo9VJ00uvw6Dg/hXEpfsE1I1TvJOJr+Z+TL+ig== /estree-walker/0.6.1: dev: false resolution: @@ -2871,30 +3253,23 @@ packages: node: '>=6' resolution: integrity: sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ== - /eventemitter3/4.0.4: + /eventemitter3/4.0.7: dev: false resolution: - integrity: sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ== - /events/3.1.0: + integrity: sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== + /events/3.2.0: dev: false engines: node: '>=0.8.x' resolution: - integrity: sha512-Rv+u8MLHNOdMjTAFeT3nCjHn2aGlx435FP/sDHNaRhDEMwyI/aB22Kj2qIN8R0cw3z28psEQLYwxVKLsKrMgWg== - /execa/0.9.0: + integrity: sha512-/46HWwbfCX2xTawVfkKLGxMifJYQBWMwY1mjywRtb4c9x8l5NP3KoJtnIOiL1hfdRkIuYhETxQlo62IF8tcnlg== + /evp_bytestokey/1.0.3: dependencies: - cross-spawn: 5.1.0 - get-stream: 3.0.0 - is-stream: 1.1.0 - npm-run-path: 2.0.2 - p-finally: 1.0.0 - signal-exit: 3.0.3 - strip-eof: 1.0.0 + md5.js: 1.3.5 + safe-buffer: 5.2.1 dev: false - engines: - node: '>=4' resolution: - integrity: sha512-BbUMBiX4hqiHZUA5+JujIjNb6TyAlp2D5KLheMjMluwOuzcnylDL4AxZYLLn1n2AGB49eSWwyKvvEQoRpnAtmA== + integrity: sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA== /execa/1.0.0: dependencies: cross-spawn: 6.0.5 @@ -2912,12 +3287,12 @@ packages: /execa/3.4.0: dependencies: cross-spawn: 7.0.3 - get-stream: 5.1.0 + get-stream: 5.2.0 human-signals: 1.1.1 is-stream: 2.0.0 merge-stream: 2.0.0 npm-run-path: 4.0.1 - onetime: 5.1.0 + onetime: 5.1.2 p-finally: 2.0.1 signal-exit: 3.0.3 strip-final-newline: 2.0.0 @@ -2930,6 +3305,7 @@ packages: dev: false engines: node: '>=6' + optional: true resolution: integrity: sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg== /expand-tilde/2.0.2: @@ -2994,7 +3370,7 @@ packages: /extract-zip/2.0.1: dependencies: debug: 4.1.1 - get-stream: 5.1.0 + get-stream: 5.2.0 yauzl: 2.10.0 dev: false engines: @@ -3047,7 +3423,7 @@ packages: dev: false resolution: integrity: sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4= - /fetch-mock/9.10.3_node-fetch@2.6.0: + /fetch-mock/9.10.7_node-fetch@2.6.0: dependencies: babel-runtime: 6.26.0 core-js: 3.6.5 @@ -3068,7 +3444,7 @@ packages: node-fetch: optional: true resolution: - integrity: sha512-vvTW3vu+6sgDuOpInd8VtaaYlt56Un/zrEvBmT8JppDXj2ZY3PQgIAoxqdSAFR5o/10jJ1yFBhXLQ/Dce/p+jg== + integrity: sha512-YkiMHSL8CQ0vlWYpqGvlaZjViFk0Kar9jonPjSvaWoztkeHH6DENqUzBIsffzjVKhwchPI74SZRLRpIsEyNcZQ== /figures/3.2.0: dependencies: escape-string-regexp: 1.0.5 @@ -3168,6 +3544,7 @@ packages: /flat/4.1.0: dependencies: is-buffer: 2.0.4 + deprecated: 'Fixed a prototype pollution security issue in 4.1.0, please upgrade to ^4.1.1 or ^5.0.1.' dev: false hasBin: true resolution: @@ -3180,12 +3557,12 @@ packages: dev: false resolution: integrity: sha512-+8GbtQBwEqutP0v3uajDDoN64K2ehmHd0cjlghhxh0WpcfPzAIjPA03e1VvHlxL02FVGR0A6lwXsNQKn3H1RNQ== - /follow-redirects/1.12.1: + /follow-redirects/1.13.0: dev: false engines: node: '>=4.0' resolution: - integrity: sha512-tmRv0AVuR7ZyouUHLeNSiO6pqulF7dYa3s19c6t+wz9LD69/uSzdMxJ2S91nTI9U3rt/IldxpzMOFejp6f0hjg== + integrity: sha512-aq6gF1BEKje4a9i9+5jimNFIpq4Q1WiwBToeRK5NvZBd/TRsmW8BsJfOEGkr76TbOyPVD3OVDN910EcUNtRYEA== /follow-redirects/1.5.10: dependencies: debug: 3.1.0 @@ -3284,6 +3661,14 @@ packages: node: '>=6 <7 || >=8' resolution: integrity: sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g== + /fs-mock/1.2.1: + dependencies: + escape-regexp: 0.0.1 + dev: false + engines: + node: '>=0.10' + resolution: + integrity: sha1-LuZLgLgUEA5LpLY1eMvr4w0N7Xs= /fs.realpath/1.0.0: dev: false resolution: @@ -3321,6 +3706,12 @@ packages: dev: false resolution: integrity: sha512-uKuNsaU0WVaK/vmvj23wW1bicOFfyqSsAIH71bRZx8kA4Xj+YCHin7CJKJJjkIsmxYaPFLk9ljmjEyB7xF7WvQ== + /fwd-stream/1.0.4: + dependencies: + readable-stream: 1.0.34 + dev: false + resolution: + integrity: sha1-7Sgcq+1G/uz5Ie4y3ExQs3KsfPo= /gauge/2.7.4: dependencies: aproba: 1.2.0 @@ -3332,6 +3723,7 @@ packages: strip-ansi: 3.0.1 wide-align: 1.1.3 dev: false + optional: true resolution: integrity: sha1-LANAXHU4w51+s3sxcCLjJfsBi/c= /gaxios/2.3.4: @@ -3387,12 +3779,6 @@ packages: node: '>=4' resolution: integrity: sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g== - /get-stream/3.0.0: - dev: false - engines: - node: '>=4' - resolution: - integrity: sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ= /get-stream/4.1.0: dependencies: pump: 3.0.0 @@ -3401,14 +3787,14 @@ packages: node: '>=6' resolution: integrity: sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w== - /get-stream/5.1.0: + /get-stream/5.2.0: dependencies: pump: 3.0.0 dev: false engines: node: '>=8' resolution: - integrity: sha512-EXr1FOzrzTfGeL0gQdeFEvOMm2mzMOglyiOXSTpPC+iAjAKftbr3jpCMWynogwYnM+eSj9sHGc6wjIcDvYiygw== + integrity: sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA== /get-uri/2.0.4: dependencies: data-uri-to-buffer: 1.2.0 @@ -3428,6 +3814,7 @@ packages: integrity: sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo= /github-from-package/0.0.0: dev: false + optional: true resolution: integrity: sha1-l/tdlr/eiXMxPyDoKI75oWf6ZM4= /glob-parent/5.1.1: @@ -3576,7 +3963,7 @@ packages: /handlebars/4.7.6: dependencies: minimist: 1.2.5 - neo-async: 2.6.1 + neo-async: 2.6.2 source-map: 0.6.1 wordwrap: 1.0.0 dev: false @@ -3584,7 +3971,7 @@ packages: node: '>=0.4.7' hasBin: true optionalDependencies: - uglify-js: 3.10.0 + uglify-js: 3.10.2 resolution: integrity: sha512-1f2BACcBfiwAfStCKZNrUCgqNZkGsAT7UM3kkYtXuLo0KnaVfjKOyf7PRzB6++aK9STyT1Pd2ZCPe3EGOXleXA== /har-schema/2.0.0: @@ -3593,15 +3980,16 @@ packages: node: '>=4' resolution: integrity: sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI= - /har-validator/5.1.3: + /har-validator/5.1.5: dependencies: - ajv: 6.12.3 + ajv: 6.12.4 har-schema: 2.0.0 + deprecated: this library is no longer supported dev: false engines: node: '>=6' resolution: - integrity: sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g== + integrity: sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w== /has-ansi/2.0.0: dependencies: ansi-regex: 2.1.1 @@ -3668,6 +4056,7 @@ packages: integrity: sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg== /has-unicode/2.0.1: dev: false + optional: true resolution: integrity: sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk= /has/1.0.3: @@ -3688,6 +4077,13 @@ packages: node: '>=4' resolution: integrity: sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA== + /hash.js/1.1.7: + dependencies: + inherits: 2.0.4 + minimalistic-assert: 1.0.1 + dev: false + resolution: + integrity: sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== /hasha/3.0.0: dependencies: is-stream: 1.1.0 @@ -3701,10 +4097,18 @@ packages: hasBin: true resolution: integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== - /highlight.js/9.18.1: + /highlight.js/9.18.3: + dev: false + resolution: + integrity: sha512-zBZAmhSupHIl5sITeMqIJnYCDfAEc3Gdkqj65wC1lpI468MMQeeQkhcIAvk+RylAkxrCcI9xy9piHiXeQ1BdzQ== + /hmac-drbg/1.0.1: + dependencies: + hash.js: 1.1.7 + minimalistic-assert: 1.0.1 + minimalistic-crypto-utils: 1.0.1 dev: false resolution: - integrity: sha512-OrVKYz70LHsnCgmbXctv/bfuvntIKDz177h0Co37DQ5jamGZLVmoCVMtjMtNZY3X9DrCcKfklHPNeA0uPZhSJg== + integrity: sha1-0nRXAQJabHdabFRXk+1QL8DGSaE= /homedir-polyfill/1.0.3: dependencies: parse-passwd: 1.0.0 @@ -3756,8 +4160,8 @@ packages: integrity: sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg== /http-proxy/1.18.1: dependencies: - eventemitter3: 4.0.4 - follow-redirects: 1.12.1 + eventemitter3: 4.0.7 + follow-redirects: 1.13.0 requires-port: 1.0.0 dev: false engines: @@ -3775,6 +4179,10 @@ packages: npm: '>=1.3.7' resolution: integrity: sha1-muzZJRFHcvPZW2WmCruPfBj7rOE= + /https-browserify/1.0.0: + dev: false + resolution: + integrity: sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM= /https-proxy-agent/3.0.1: dependencies: agent-base: 4.3.0 @@ -3816,14 +4224,14 @@ packages: node: '>=0.10.0' resolution: integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== - /ieee754/1.1.13: + /idb-wrapper/1.7.2: dev: false resolution: - integrity: sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg== - /ignore/3.3.10: + integrity: sha512-zfNREywMuf0NzDo9mVsL0yegjsirJxHpKHvWcyRozIqQy89g0a3U+oBPOCN4cc0oCiOuYgZHimzaW/R46G1Mpg== + /ieee754/1.1.13: dev: false resolution: - integrity: sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug== + integrity: sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg== /ignore/4.0.6: dev: false engines: @@ -3845,6 +4253,12 @@ packages: node: '>=6' resolution: integrity: sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ== + /import-lazy/4.0.0: + dev: false + engines: + node: '>=8' + resolution: + integrity: sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw== /imurmurhash/0.1.4: dev: false engines: @@ -3886,7 +4300,13 @@ packages: dev: false resolution: integrity: sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== - /inquirer/7.3.0: + /inline-source-map/0.6.2: + dependencies: + source-map: 0.5.7 + dev: false + resolution: + integrity: sha1-+Tk0ccGKedFyT4Y/o4tYY3Ct4qU= + /inquirer/7.3.3: dependencies: ansi-escapes: 4.3.1 chalk: 4.1.0 @@ -3894,10 +4314,10 @@ packages: cli-width: 3.0.0 external-editor: 3.1.0 figures: 3.2.0 - lodash: 4.17.19 + lodash: 4.17.20 mute-stream: 0.0.8 run-async: 2.4.1 - rxjs: 6.6.0 + rxjs: 6.6.2 string-width: 4.2.0 strip-ansi: 6.0.0 through: 2.3.8 @@ -3905,7 +4325,7 @@ packages: engines: node: '>=8.0.0' resolution: - integrity: sha512-K+LZp6L/6eE5swqIcVXrxl21aGDU4S50gKH0/d96OMQnSBCyGyZl/oZhbkVmdp5sBoINHd4xZvFSARh2dk6DWA== + integrity: sha512-JG3eIAj5V9CwcGvuOmoo6LB9kbAYT8HXffUl6memuszlwDC/qvFAJw49XJ5NROSFNPxp3iQg1GqkFhaY/CR0IA== /interpret/1.4.0: dev: false engines: @@ -3969,12 +4389,13 @@ packages: node: '>= 0.4' resolution: integrity: sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g== - /is-docker/2.0.0: + /is-docker/2.1.1: dev: false engines: node: '>=8' + hasBin: true resolution: - integrity: sha512-pJEdRugimx4fBMra5z2/5iRdZ63OhYV0vr0Dwm5+xtW4D1FvRkB8hamMIhnWfyJeDdyr/aa7BDyNbtG38VxgoQ== + integrity: sha512-ZOoqiXfEwtGknTiuDEy8pN2CfE3TxMHprvNer1mXiqwkOT77Rw3YVrUQ52EqAOU3QAWDQ+bQdx7HJzrv7LS2Hw== /is-extglob/2.1.1: dev: false engines: @@ -3993,6 +4414,7 @@ packages: dev: false engines: node: '>=0.10.0' + optional: true resolution: integrity: sha1-754xOG8DGn8NZDr4L95QxFfvAMs= /is-fullwidth-code-point/2.0.0: @@ -4033,26 +4455,38 @@ packages: dev: false resolution: integrity: sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE= + /is-nan/1.3.0: + dependencies: + define-properties: 1.1.3 + dev: false + engines: + node: '>= 0.4' + resolution: + integrity: sha512-z7bbREymOqt2CCaZVly8aC4ML3Xhfi0ekuOnjO2L8vKdl+CttdVoGZQhd4adMFAsxQ5VeRVwORs4tU8RH+HFtQ== /is-number/7.0.0: dev: false engines: node: '>=0.12.0' resolution: integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + /is-object/0.1.2: + dev: false + resolution: + integrity: sha1-AO+8CIFsM8/ErIJR0TLhDcZQmNc= /is-reference/1.2.1: dependencies: '@types/estree': 0.0.45 dev: false resolution: integrity: sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ== - /is-regex/1.1.0: + /is-regex/1.1.1: dependencies: has-symbols: 1.0.1 dev: false engines: node: '>= 0.4' resolution: - integrity: sha512-iI97M8KTWID2la5uYXlkbSDQIg4F6o1sYboZKKTDpnDQMLtUL86zxhgDet3Q2SriaYsyGqZ6Mn2SjbRKeLHdqw== + integrity: sha512-1+QkEcxiLlB7VEyFtyBg94e08OAsvq7FUBgApTq/w2ymCLyKJgDPsybBENVtA7XCQEgEXxKPonG+mvYRxh/LIg== /is-stream/1.1.0: dev: false engines: @@ -4116,12 +4550,16 @@ packages: integrity: sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== /is-wsl/2.2.0: dependencies: - is-docker: 2.0.0 + is-docker: 2.1.1 dev: false engines: node: '>=8' resolution: integrity: sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== + /is/0.2.7: + dev: false + resolution: + integrity: sha1-OzSixI81mXLzUEKEkZOucmS2NWI= /isarray/0.0.1: dev: false resolution: @@ -4140,6 +4578,10 @@ packages: node: '>= 8.0.0' resolution: integrity: sha512-ORrEy+SNVqUhrCaal4hA4fBzhggQQ+BaLntyPOdoEiwlKZW9BZiJXjg3RMiruE4tPEI3pyVPpySHQF/dKWperg== + /isbuffer/0.0.0: + dev: false + resolution: + integrity: sha1-OMFG2d9Si4v5sHAcPUPPEt8/w5s= /isexe/2.0.0: dev: false resolution: @@ -4170,11 +4612,11 @@ packages: integrity: sha512-vrRztU9VRRFDyC+aklfLoeXyNdTfga2EI3udDGn4cZ6fpSXpHLV9X6CHvfoMCPtggg8zvDDmC4b9xfu0z6/llA== /istanbul-lib-instrument/3.3.0: dependencies: - '@babel/generator': 7.10.4 - '@babel/parser': 7.10.4 + '@babel/generator': 7.11.4 + '@babel/parser': 7.11.4 '@babel/template': 7.10.4 - '@babel/traverse': 7.10.4 - '@babel/types': 7.10.4 + '@babel/traverse': 7.11.0 + '@babel/types': 7.11.0 istanbul-lib-coverage: 2.0.5 semver: 6.3.0 dev: false @@ -4184,7 +4626,7 @@ packages: integrity: sha512-5nnIN4vo5xQZHdXno/YDXJ0G+I3dAm4XgzfSVTPLQpj/zAV2dV6Juy0yaf10/zrJOJeHoN3fraFe+XRq2bFVZA== /istanbul-lib-instrument/4.0.3: dependencies: - '@babel/core': 7.10.4 + '@babel/core': 7.11.4 '@istanbuljs/schema': 0.1.2 istanbul-lib-coverage: 3.0.0 semver: 6.3.0 @@ -4207,7 +4649,7 @@ packages: dependencies: istanbul-lib-coverage: 3.0.0 make-dir: 3.1.0 - supports-color: 7.1.0 + supports-color: 7.2.0 dev: false engines: node: '>=8' @@ -4424,13 +4866,14 @@ packages: resolution: integrity: sha1-MT5mvB5cwG5Di8G3SZwuXFastqI= /jssha/2.4.2: + deprecated: jsSHA versions < 3.0.0 will no longer receive feature updates dev: false resolution: integrity: sha512-/jsi/9C0S70zfkT/4UlKQa5E1xKurDnXcQizcww9JSR/Fv+uIbWM2btG+bFcL3iNoK9jIGS0ls9HWLr1iw0kFg== - /jssha/3.1.0: + /jssha/3.1.2: dev: false resolution: - integrity: sha512-tPCmr8xSLd8ug6N51k0rbF1tAQWZz1i/uCVHpCH9dl+Te+wM/T375R3lTexP3bk1HPmQ+NlJHQPYLmYuyk6slA== + integrity: sha512-6fEObA9he4vcCpz+dt9b5DjqhqvSsz9XMfNPU6/IyKHDQpCHsYayPRkWmAZG61lZC9XVJcjsQNAiUUd0NpskeQ== /just-extend/4.1.0: dev: false resolution: @@ -4465,6 +4908,10 @@ packages: dev: false resolution: integrity: sha512-KDncfTmOZoOMTFG4mBlG0qUIOlc03fmzH+ru6RgYVZhPkyiy/92Owlt/8UEN+a4TXR1FQetfIpJE8ApdvdVxTg== + /jwt-decode/2.2.0: + dev: false + resolution: + integrity: sha1-fYa9VmefWM5qhHBKZX3TkruoGnk= /karma-chai/0.1.0_chai@4.2.0+karma@5.1.1: dependencies: chai: 4.2.0 @@ -4481,7 +4928,7 @@ packages: dev: false resolution: integrity: sha512-3dPs/n7vgz1rxxtynpzZTvb9y/GIaW8xjAwcIGttLbycqoFtI7yo1NGnQi6oFTherRE+GIhCAHZC4vEqWGhNvg== - /karma-coverage/2.0.2: + /karma-coverage/2.0.3: dependencies: istanbul-lib-coverage: 3.0.0 istanbul-lib-instrument: 4.0.3 @@ -4493,7 +4940,7 @@ packages: engines: node: '>=10.0.0' resolution: - integrity: sha512-zge5qiGEIKDdzWciQwP4p0LSac4k/L6VfrBsERMUn5mpDvxhv1sPVOrSlpzpi70T7NhuEy4bgnpAKIYuumIMCw== + integrity: sha512-atDvLQqvPcLxhED0cmXYdsPMCQuh6Asa9FMZW1bhNqlVEhJoB9qyZ2BY1gu7D/rr5GLGb5QzYO4siQskxaWP/g== /karma-edge-launcher/0.4.2_karma@5.1.1: dependencies: edge-launcher: 1.2.2 @@ -4518,7 +4965,7 @@ packages: /karma-ie-launcher/1.0.0_karma@5.1.1: dependencies: karma: 5.1.1 - lodash: 4.17.19 + lodash: 4.17.20 dev: false peerDependencies: karma: '>=0.9' @@ -4579,7 +5026,7 @@ packages: integrity: sha1-l/O3cAZSVPm0ck8tm+SjouG69vw= /karma-rollup-preprocessor/7.0.5_rollup@1.32.1: dependencies: - chokidar: 3.4.0 + chokidar: 3.4.2 debounce: 1.2.0 rollup: 1.32.1 dev: false @@ -4589,17 +5036,76 @@ packages: rollup: '>= 1.0.0' resolution: integrity: sha512-VhZI81l8LZBvBrSf4xaojsbur7bcycsSlxXkYaTOjV6DQwx1gtAM0CQVdue7LuIbXB1AohYIg0S5at+dqDtMxQ== - /karma-sourcemap-loader/0.3.7: + /karma-source-map-support/1.4.0: + dependencies: + source-map-support: 0.5.19 + dev: false + resolution: + integrity: sha512-RsBECncGO17KAoJCYXjv+ckIz+Ii9NCi+9enk+rq6XC81ezYkb4/RHE6CTXdA7IOJqoF3wcaLfVG0CPmE5ca6A== + /karma-sourcemap-loader/0.3.8: dependencies: graceful-fs: 4.2.4 dev: false resolution: - integrity: sha1-kTIsd/jxPUb+0GKwQuEAnUxFBdg= + integrity: sha512-zorxyAakYZuBcHRJE+vbrK2o2JXLFWK8VVjiT/6P+ltLBUGUvqTEkUiQ119MGdOrK7mrmxXHZF1/pfT6GgIZ6g== + /karma-typescript/5.0.3_karma@5.1.1+typescript@3.9.7: + dependencies: + acorn: 7.4.0 + acorn-walk: 7.2.0 + assert: 2.0.0 + async: 3.2.0 + browser-resolve: 1.11.3 + browserify-zlib: 0.2.0 + buffer: 5.6.0 + combine-source-map: 0.8.0 + console-browserify: 1.2.0 + constants-browserify: 1.0.0 + convert-source-map: 1.7.0 + crypto-browserify: 3.12.0 + diff: 4.0.2 + domain-browser: 4.17.0 + events: 3.2.0 + glob: 7.1.6 + https-browserify: 1.0.0 + istanbul-lib-coverage: 3.0.0 + istanbul-lib-instrument: 4.0.3 + istanbul-lib-report: 3.0.0 + istanbul-lib-source-maps: 4.0.0 + istanbul-reports: 3.0.2 + json-stringify-safe: 5.0.1 + karma: 5.1.1 + lodash: 4.17.20 + log4js: 6.3.0 + minimatch: 3.0.4 + os-browserify: 0.3.0 + pad: 3.2.0 + path-browserify: 1.0.1 + process: 0.11.10 + punycode: 2.1.1 + querystring-es3: 0.2.1 + readable-stream: 3.6.0 + source-map: 0.7.3 + stream-browserify: 2.0.2 + stream-http: 3.1.1 + string_decoder: 1.3.0 + timers-browserify: 2.0.11 + tmp: 0.1.0 + tty-browserify: 0.0.1 + typescript: 3.9.7 + url: 0.11.0 + util: 0.12.3 + vm-browserify: 1.1.2 + dev: false + peerDependencies: + karma: 1 || 2 || 3 || 4 || 5 + typescript: 1 || 2 || 3 + resolution: + integrity: sha512-Irs767Oc5BCMPLbZ+VdJmIxLL+1fB3L9dye8oQHDfHXFuYBx+uir5FDLzNNXFgDRUMYxEFT1T1eucAcb56v+0A== /karma/5.1.1: dependencies: body-parser: 1.19.0 braces: 3.0.2 - chokidar: 3.4.0 + chokidar: 3.4.2 colors: 1.4.0 connect: 3.7.0 di: 0.0.1 @@ -4609,7 +5115,7 @@ packages: graceful-fs: 4.2.4 http-proxy: 1.18.1 isbinaryfile: 4.0.6 - lodash: 4.17.19 + lodash: 4.17.20 log4js: 6.3.0 mime: 2.4.6 minimatch: 3.0.4 @@ -4620,7 +5126,7 @@ packages: source-map: 0.6.1 tmp: 0.2.1 ua-parser-js: 0.7.21 - yargs: 15.4.0 + yargs: 15.4.1 dev: false engines: node: '>= 10' @@ -4632,6 +5138,7 @@ packages: nan: 2.14.1 prebuild-install: 5.3.3 dev: false + optional: true requiresBuild: true resolution: integrity: sha512-ueulhshHSGoryfRXaIvTj0BV1yB0KddBGhGoqCxSN9LR1Ks1GKuuCdVhF+2/YOs5fMl6MlTI9On1a4DHDXoTow== @@ -4641,6 +5148,82 @@ packages: node: '> 0.8' resolution: integrity: sha1-eZllXoZGwX8In90YfRUNMyTVRRM= + /level-blobs/0.1.7: + dependencies: + level-peek: 1.0.6 + once: 1.4.0 + readable-stream: 1.1.14 + dev: false + resolution: + integrity: sha1-mrm5e7mfHtv594o0M+Ie1WOGva8= + /level-filesystem/1.2.0: + dependencies: + concat-stream: 1.6.2 + errno: 0.1.7 + fwd-stream: 1.0.4 + level-blobs: 0.1.7 + level-peek: 1.0.6 + level-sublevel: 5.2.3 + octal: 1.0.0 + once: 1.4.0 + xtend: 2.2.0 + dev: false + resolution: + integrity: sha1-oArKmRnEpN+v3KaoEI0iWq3/Y7M= + /level-fix-range/1.0.2: + dev: false + resolution: + integrity: sha1-vxW5Fa422EcMgh6IPd95zRZCCCg= + /level-fix-range/2.0.0: + dependencies: + clone: 0.1.19 + dev: false + resolution: + integrity: sha1-xBfWIVlEIVGhnZojZ4aPFyTC1Ug= + /level-hooks/4.5.0: + dependencies: + string-range: 1.2.2 + dev: false + resolution: + integrity: sha1-G5rmGSKTDzMF0aYfxNg8gQLA3ZM= + /level-js/2.2.4: + dependencies: + abstract-leveldown: 0.12.4 + idb-wrapper: 1.7.2 + isbuffer: 0.0.0 + ltgt: 2.2.1 + typedarray-to-buffer: 1.0.4 + xtend: 2.1.2 + dev: false + resolution: + integrity: sha1-vAVfQYBjXUSJtWHJSG+jcOjBFpc= + /level-peek/1.0.6: + dependencies: + level-fix-range: 1.0.2 + dev: false + resolution: + integrity: sha1-vsUccqgu5GTTNkNMfIdsP8vM538= + /level-sublevel/5.2.3: + dependencies: + level-fix-range: 2.0.0 + level-hooks: 4.5.0 + string-range: 1.2.2 + xtend: 2.0.6 + dev: false + resolution: + integrity: sha1-dEwSxy0ucr543eO5tc2E1iGRQTo= + /levelup/0.18.6: + dependencies: + bl: 0.8.2 + deferred-leveldown: 0.2.0 + errno: 0.1.7 + prr: 0.0.0 + readable-stream: 1.0.34 + semver: 2.3.2 + xtend: 3.0.0 + dev: false + resolution: + integrity: sha1-5qAcsIlhbI7MApHCqb0/DETj5es= /levn/0.3.0: dependencies: prelude-ls: 1.1.2 @@ -4804,6 +5387,10 @@ packages: dev: false resolution: integrity: sha1-TbwEcrFWvlCgsoaFXRvQsMZWCYo= + /lodash.memoize/3.0.4: + dev: false + resolution: + integrity: sha1-LcvSwofLwKVcxCMovQxzYVDVPj8= /lodash.once/4.1.1: dev: false resolution: @@ -4837,10 +5424,10 @@ packages: dev: false resolution: integrity: sha1-+zB4RHU7Zrnxr6VOJix0UwfbqOU= - /lodash/4.17.19: + /lodash/4.17.20: dev: false resolution: - integrity: sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ== + integrity: sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA== /log-symbols/2.2.0: dependencies: chalk: 2.4.2 @@ -4895,16 +5482,26 @@ packages: dev: false resolution: integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== - /lunr/2.3.8: + /ltgt/2.2.1: + dev: false + resolution: + integrity: sha1-81ypHEk/e3PaDgdJUwTxezH4fuU= + /lunr/2.3.9: dev: false resolution: - integrity: sha512-oxMeX/Y35PNFuZoHp+jUj5OSEmLCaIH4KTFJh7a93cHBoFmpw2IoPs22VIz7vyO2YUnx2Tn9dzIwO2P/4quIRg== - /macos-release/2.4.0: + integrity: sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow== + /macos-release/2.4.1: dev: false engines: node: '>=6' resolution: - integrity: sha512-ko6deozZYiAkqa/0gmcsz+p4jSy3gY7/ZsCEokPaYd8k+6/aXGkiTgr61+Owup7Sf+xjqW8u2ElhoM9SEcEfuA== + integrity: sha512-H/QHeBIN1fIGJX517pvK8IEK53yQOW7YcEI55oYtgjDdoCQQz7eJS94qt5kNrscReEyuD/JcdFCm2XBEcGOITg== + /magic-string/0.22.5: + dependencies: + vlq: 0.2.3 + dev: false + resolution: + integrity: sha512-oreip9rJZkzvA8Qzk9HFs8fZGF/u7H/gtrE8EN6RjKJ9kh2HlC+yQ2QezifqTZfGyiuAV0dRv5a+y/8gBb1m9w== /magic-string/0.25.7: dependencies: sourcemap-codec: 1.4.8 @@ -4965,14 +5562,22 @@ packages: dev: false resolution: integrity: sha1-6b296UogpawYsENA/Fdk1bCdkB0= - /md5/2.2.1: + /md5.js/1.3.5: + dependencies: + hash-base: 3.1.0 + inherits: 2.0.4 + safe-buffer: 5.2.1 + dev: false + resolution: + integrity: sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg== + /md5/2.3.0: dependencies: charenc: 0.0.2 crypt: 0.0.2 is-buffer: 1.1.6 dev: false resolution: - integrity: sha1-U6s41f48iJG6RlMp6iP6wFQBJvk= + integrity: sha512-T1GITYmFaKuO91vxyoQMFETst+O71VUPEU3ze5GNzDm0OWdP8v1ziTaAEPUr/3kLsY3Sftgz242A1SetQiDL7g== /media-typer/0.3.0: dev: false engines: @@ -5022,6 +5627,14 @@ packages: node: '>= 0.6' resolution: integrity: sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4= + /miller-rabin/4.0.1: + dependencies: + bn.js: 4.11.9 + brorand: 1.1.0 + dev: false + hasBin: true + resolution: + integrity: sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA== /mime-db/1.44.0: dev: false engines: @@ -5050,12 +5663,6 @@ packages: hasBin: true resolution: integrity: sha512-RZKhC3EmpBchfTGBVb8fb+RL2cWyw/32lshnsETttkBAyAUXSGHxbEJWWRXc751DrIxG1q04b8QwMbAwkRPpUA== - /mimic-fn/1.2.0: - dev: false - engines: - node: '>=4' - resolution: - integrity: sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ== /mimic-fn/2.1.0: dev: false engines: @@ -5066,6 +5673,7 @@ packages: dev: false engines: node: '>=8' + optional: true resolution: integrity: sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA== /min-document/2.19.0: @@ -5074,6 +5682,14 @@ packages: dev: false resolution: integrity: sha1-e9KC4/WELtKVu3SM3Z8f+iyCRoU= + /minimalistic-assert/1.0.1: + dev: false + resolution: + integrity: sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== + /minimalistic-crypto-utils/1.0.1: + dev: false + resolution: + integrity: sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo= /minimatch/3.0.4: dependencies: brace-expansion: 1.1.11 @@ -5110,7 +5726,7 @@ packages: /mocha-junit-reporter/1.23.3_mocha@7.2.0: dependencies: debug: 2.6.9 - md5: 2.2.1 + md5: 2.3.0 mkdirp: 0.5.5 mocha: 7.2.0 strip-ansi: 4.0.0 @@ -5152,10 +5768,10 @@ packages: hasBin: true resolution: integrity: sha512-O9CIypScywTVpNaRrCAgoUnJgozpIofjKUYmJhiCIJMiuYnLI6otcb1/kpW9/n/tJODHGZ7i8aLQoDVsMtOKQQ== - /mock-fs/4.12.0: + /mock-fs/4.13.0: dev: false resolution: - integrity: sha512-/P/HtrlvBxY4o/PzXY9cCNBrdylDNxg7gnrv2sMNxj+UJ2m8jSpl0/A6fuJeNAWr99ZvGWH8XCbE0vmnM5KupQ== + integrity: sha512-DD0vOdofJdoaRNtnWcrXe6RQbpHkPPmtqGq14uRX0F8ZKJ5nv89CVTYl/BZdppDxBDaV0hl75htg3abpEWlPZA== /mock-require/3.0.3: dependencies: get-caller-file: 1.0.3 @@ -5169,12 +5785,6 @@ packages: dev: false resolution: integrity: sha512-al0MUK7cpIcglMv3YF13qSgdAIqxHTO7brRtaz3DlSULbqfazqkc5kEjNrLDOM7fsjshoFIihnU8snrP7zUvhQ== - /mri/1.1.6: - dev: false - engines: - node: '>=4' - resolution: - integrity: sha512-oi1b3MfbyGa7FJMP9GmLTttni5JoICpYBRlq+x5V16fZbLsnL9N3wFqqIm/nIG43FjUFkFh9Epzp/kzUGUnJxQ== /ms/2.0.0: dev: false resolution: @@ -5187,14 +5797,14 @@ packages: dev: false resolution: integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== - /msal/1.3.2: + /msal/1.4.0: dependencies: tslib: 1.13.0 dev: false engines: node: '>=0.8.0' resolution: - integrity: sha512-vhcpM/ELL+UI7i4HzCegcbSfPMLqf3kp8mAT840bK1ZaDcb7Z1mOJik1jg202V0yfnh/bBPxZhQP6xFgD9g5eA== + integrity: sha512-NTxMFQh6t5g2QWMlvZTWTxL1bmcqiCv0cs2lxTHhUbWEuxWCfvaVRZfjxN8i+T0VltVVGaVIdML8QEoBnlbaSw== /multipipe/0.1.2: dependencies: duplexer2: 0.0.2 @@ -5207,17 +5817,19 @@ packages: integrity: sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== /nan/2.14.1: dev: false + optional: true resolution: integrity: sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw== - /nanoid/3.1.10: + /nanoid/3.1.12: dev: false engines: node: ^10 || ^12 || >=13.7 hasBin: true resolution: - integrity: sha512-iZFMXKeXWkxzlfmMfM91gw7YhN2sdJtixY+eZh9V6QWJWTOiurhpKhBMgr82pfzgSqglQgqYSCowEYsz8D++6w== + integrity: sha512-1qstj9z5+x491jfiC4Nelk+f8XBad7LN20PmyWINJEMRSf3wcAjAWysw1qaA8z6NSKe2sjq1hRSDpBH5paCb6A== /napi-build-utils/1.0.2: dev: false + optional: true resolution: integrity: sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg== /natural-compare/1.4.0: @@ -5230,10 +5842,10 @@ packages: node: '>= 0.6' resolution: integrity: sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw== - /neo-async/2.6.1: + /neo-async/2.6.2: dev: false resolution: - integrity: sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw== + integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== /nested-error-stacks/2.1.0: dev: false resolution: @@ -5250,7 +5862,7 @@ packages: integrity: sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== /nise/4.0.4: dependencies: - '@sinonjs/commons': 1.8.0 + '@sinonjs/commons': 1.8.1 '@sinonjs/fake-timers': 6.0.1 '@sinonjs/text-encoding': 0.7.1 just-extend: 4.1.0 @@ -5262,19 +5874,20 @@ packages: dependencies: debug: 4.1.1 json-stringify-safe: 5.0.1 - lodash: 4.17.19 + lodash: 4.17.20 propagate: 2.0.1 dev: false engines: node: '>= 10.13' resolution: integrity: sha512-QNb/j8kbFnKCiyqi9C5DD0jH/FubFGj5rt9NQFONXwQm3IPB0CULECg/eS3AU1KgZb/6SwUa4/DTRKhVxkGABw== - /node-abi/2.18.0: + /node-abi/2.19.1: dependencies: semver: 5.7.1 dev: false + optional: true resolution: - integrity: sha512-yi05ZoiuNNEbyT/xXfSySZE+yVnQW6fxPZuFbLyS1s6b5Kw3HzV2PHOM4XR+nsjzkHxByK+2Wg+yCQbe35l8dw== + integrity: sha512-HbtmIuByq44yhAzK7b9j/FelKlHYISKQn0mtvcBrU5QBkhoCMp5bu8Hv5AI34DcKfOAcJBcOEMwLlwO62FFu9A== /node-abort-controller/1.1.0: dev: false resolution: @@ -5294,6 +5907,7 @@ packages: integrity: sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA== /noop-logger/0.1.1: dev: false + optional: true resolution: integrity: sha1-lKKxYzxPExdVMAfYlm/Q6EG2pMI= /nopt/3.0.6: @@ -5366,12 +5980,14 @@ packages: gauge: 2.7.4 set-blocking: 2.0.0 dev: false + optional: true resolution: integrity: sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg== /number-is-nan/1.0.1: dev: false engines: node: '>=0.10.0' + optional: true resolution: integrity: sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0= /nyc/14.1.1: @@ -5431,6 +6047,28 @@ packages: dev: false resolution: integrity: sha512-jLdtEOB112fORuypAyl/50VRVIBIdVQOSUUGQHzJ4xBSbit81zRarz7GThkEFZy1RceYrWYcPcBFPQwHyAc1gA== + /object-is/1.1.2: + dependencies: + define-properties: 1.1.3 + es-abstract: 1.17.6 + dev: false + engines: + node: '>= 0.4' + resolution: + integrity: sha512-5lHCz+0uufF6wZ7CRFWJN3hp8Jqblpgve06U5CMQ3f//6iDjPr2PEo9MWCjEssDsa+UZEL4PkFpr+BMop6aKzQ== + /object-keys/0.2.0: + dependencies: + foreach: 2.0.5 + indexof: 0.0.1 + is: 0.2.7 + deprecated: Please update to the latest object-keys + dev: false + resolution: + integrity: sha1-zd7AKZiwkb5CvxA1rjLknxy26mc= + /object-keys/0.4.0: + dev: false + resolution: + integrity: sha1-KKaq50KN0sOpLz2V8hM13SBOAzY= /object-keys/1.1.1: dev: false engines: @@ -5468,6 +6106,10 @@ packages: node: '>= 0.4' resolution: integrity: sha512-WTa54g2K8iu0kmS/us18jEmdv1a4Wi//BZ/DTVYEcH0XhLM5NYdpDHja3gt57VrZLcNAO2WGA+KpWsDBaHt6eA== + /octal/1.0.0: + dev: false + resolution: + integrity: sha1-Y+cWKmjvvrniE1iNWOmJ0eXEUws= /on-finished/2.3.0: dependencies: ee-first: 1.1.1 @@ -5482,31 +6124,23 @@ packages: dev: false resolution: integrity: sha1-WDsap3WWHUsROsF9nFC6753Xa9E= - /onetime/2.0.1: - dependencies: - mimic-fn: 1.2.0 - dev: false - engines: - node: '>=4' - resolution: - integrity: sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ= - /onetime/5.1.0: + /onetime/5.1.2: dependencies: mimic-fn: 2.1.0 dev: false engines: node: '>=6' resolution: - integrity: sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q== - /open/7.0.4: + integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== + /open/7.2.1: dependencies: - is-docker: 2.0.0 + is-docker: 2.1.1 is-wsl: 2.2.0 dev: false engines: node: '>=8' resolution: - integrity: sha512-brSA+/yq+b08Hsr4c8fsEW2CRzk1BmfN3SAK/5VCHQ9bdoZJ4qa/+AfR0xHjlbbZUyPkUHs1b8x1RqdyZdkVqQ== + integrity: sha512-xbYCJib4spUdmcs0g/2mK1nKo/jO2T7INClWd/beL7PFkXRWgr8B23ssDHX/USPn2M2IjDR5UdpYs6I67SnTSA== /optionator/0.8.3: dependencies: deep-is: 0.1.3 @@ -5520,17 +6154,10 @@ packages: node: '>= 0.8.0' resolution: integrity: sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA== - /ora/1.4.0: - dependencies: - chalk: 2.4.2 - cli-cursor: 2.1.0 - cli-spinners: 1.3.1 - log-symbols: 2.2.0 + /os-browserify/0.3.0: dev: false - engines: - node: '>=4' resolution: - integrity: sha512-iMK1DOQxzzh2MBlVsU42G80mnrvUhqsMh74phHtDlrcTZPK0pH6o7l7DRshK+0YsxDyEuaOkziVdvM3T0QTzpw== + integrity: sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc= /os-homedir/1.0.2: dev: false engines: @@ -5539,8 +6166,8 @@ packages: integrity: sha1-/7xJiDNuDoM94MFox+8VISGqf7M= /os-name/3.1.0: dependencies: - macos-release: 2.4.0 - windows-release: 3.3.1 + macos-release: 2.4.1 + windows-release: 3.3.3 dev: false engines: node: '>=6' @@ -5650,6 +6277,18 @@ packages: node: '>=6' resolution: integrity: sha512-lOtmukMDVvtkL84rJHI7dpTYq+0rli8N2wlnqUcBuDWCfVhRUfOmnR9SsoHFMLpACvEV60dX7rd0rFaYDZI+FA== + /pad/3.2.0: + dependencies: + wcwidth: 1.0.1 + dev: false + engines: + node: '>= 4.0.0' + resolution: + integrity: sha512-2u0TrjcGbOjBTJpyewEl4hBO3OeX5wWue7eIFPzQTg6wFSvoaHcBTTUY5m+n0hd04gmTCPuY0kCpVIVuw5etwg== + /pako/1.0.11: + dev: false + resolution: + integrity: sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw== /parent-module/1.0.1: dependencies: callsites: 3.1.0 @@ -5658,6 +6297,16 @@ packages: node: '>=6' resolution: integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== + /parse-asn1/5.1.6: + dependencies: + asn1.js: 5.4.1 + browserify-aes: 1.2.0 + evp_bytestokey: 1.0.3 + pbkdf2: 3.1.1 + safe-buffer: 5.2.1 + dev: false + resolution: + integrity: sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw== /parse-json/2.2.0: dependencies: error-ex: 1.3.2 @@ -5795,6 +6444,18 @@ packages: dev: false resolution: integrity: sha1-uULm1L3mUwBe9rcTYd74cn0GReA= + /pbkdf2/3.1.1: + dependencies: + create-hash: 1.2.0 + create-hmac: 1.1.7 + ripemd160: 2.0.2 + safe-buffer: 5.2.1 + sha.js: 2.4.11 + dev: false + engines: + node: '>=0.12' + resolution: + integrity: sha512-4Ejy1OPxi9f2tt1rRV7Go7zmfDQ+ZectEQz3VGUQhgq62HtIRPDyG/JtnwIxs6x3uNMwo2V7q1fMvKjb+Tnpqg== /pend/1.2.0: dev: false resolution: @@ -5878,7 +6539,7 @@ packages: minimist: 1.2.5 mkdirp: 0.5.5 napi-build-utils: 1.0.2 - node-abi: 2.18.0 + node-abi: 2.19.1 noop-logger: 0.1.1 npmlog: 4.1.2 pump: 3.0.0 @@ -5891,24 +6552,9 @@ packages: engines: node: '>=6' hasBin: true + optional: true resolution: integrity: sha512-GV+nsUXuPW2p8Zy7SarF/2W/oiK8bFQgJcncoJ0d7kRpekEA0ftChjfEaF9/Y+QJEc/wFR7RAEa8lYByuUIe2g== - /precise-commits/1.0.2_prettier@1.19.1: - dependencies: - diff-match-patch: 1.0.5 - execa: 0.9.0 - find-up: 2.1.0 - glob: 7.1.6 - ignore: 3.3.10 - mri: 1.1.6 - ora: 1.4.0 - prettier: 1.19.1 - dev: false - hasBin: true - peerDependencies: - prettier: '>=1.8.0' - resolution: - integrity: sha512-PYkoNTFXVvZRzJTDxdgzmPanhSNGj5Wtj2NgSo7IhwNXGcKktX+L4DJhyIrhFSLsWWAvd+cYyyU2eXlaX5QxzA== /prelude-ls/1.1.2: dev: false engines: @@ -5934,6 +6580,10 @@ packages: dev: false resolution: integrity: sha1-LuTyPCVgkT4IwHzlzN1t498sWvg= + /process-es6/0.11.6: + dev: false + resolution: + integrity: sha1-xrs4n5qVH4K9TrFpYAEFvS/5x3g= /process-nextick-args/1.0.7: dev: false resolution: @@ -5994,6 +6644,14 @@ packages: dev: false resolution: integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== + /prr/0.0.0: + dev: false + resolution: + integrity: sha1-GoS4WQgyVQFBGFPQCB7j+obikmo= + /prr/1.0.1: + dev: false + resolution: + integrity: sha1-0/wRS6BplaRexok/SEzrHXj19HY= /pseudomap/1.0.2: dev: false resolution: @@ -6002,6 +6660,17 @@ packages: dev: false resolution: integrity: sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ== + /public-encrypt/4.0.3: + dependencies: + bn.js: 4.11.9 + browserify-rsa: 4.0.1 + create-hash: 1.2.0 + parse-asn1: 5.1.6 + randombytes: 2.1.0 + safe-buffer: 5.2.1 + dev: false + resolution: + integrity: sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q== /pump/3.0.0: dependencies: end-of-stream: 1.4.4 @@ -6079,6 +6748,12 @@ packages: node: '>=0.10.0' resolution: integrity: sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw== + /querystring-es3/0.2.1: + dev: false + engines: + node: '>=0.4.x' + resolution: + integrity: sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM= /querystring/0.2.0: dev: false engines: @@ -6097,6 +6772,19 @@ packages: dev: false resolution: integrity: sha512-pVzZdDpWwWqEVVLshWUHjNwuVP7SfcmPraYuqocJp1yo2U1R7P+5QAfDhdItkuoGqIBnBYrtPp7rEPqDn9HlZA== + /randombytes/2.1.0: + dependencies: + safe-buffer: 5.2.1 + dev: false + resolution: + integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== + /randomfill/1.0.4: + dependencies: + randombytes: 2.1.0 + safe-buffer: 5.2.1 + dev: false + resolution: + integrity: sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw== /range-parser/1.2.1: dev: false engines: @@ -6133,6 +6821,7 @@ packages: strip-json-comments: 2.0.1 dev: false hasBin: true + optional: true resolution: integrity: sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== /read-pkg-up/1.0.1: @@ -6192,6 +6881,15 @@ packages: node: '>=4' resolution: integrity: sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k= + /readable-stream/1.0.34: + dependencies: + core-util-is: 1.0.2 + inherits: 2.0.4 + isarray: 0.0.1 + string_decoder: 0.10.31 + dev: false + resolution: + integrity: sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw= /readable-stream/1.1.14: dependencies: core-util-is: 1.0.2 @@ -6271,10 +6969,10 @@ packages: dev: false resolution: integrity: sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg== - /regenerator-runtime/0.13.5: + /regenerator-runtime/0.13.7: dev: false resolution: - integrity: sha512-ZS5w8CpKFinUzOwW3c83oPeVXoNsrLsaCoLtJvAClH135j/R77RuymhiSErhm2lKcwSCIpmvIWSbDkIfAqKQlA== + integrity: sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew== /regexpp/2.0.1: dev: false engines: @@ -6328,13 +7026,13 @@ packages: /request/2.88.2: dependencies: aws-sign2: 0.7.0 - aws4: 1.10.0 + aws4: 1.10.1 caseless: 0.12.0 combined-stream: 1.0.8 extend: 3.0.2 forever-agent: 0.6.1 form-data: 2.3.3 - har-validator: 5.1.3 + har-validator: 5.1.5 http-signature: 1.2.0 is-typedarray: 1.0.0 isstream: 0.1.2 @@ -6410,18 +7108,9 @@ packages: dev: false resolution: integrity: sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA== - /restore-cursor/2.0.0: - dependencies: - onetime: 2.0.1 - signal-exit: 3.0.3 - dev: false - engines: - node: '>=4' - resolution: - integrity: sha1-n37ih/gv0ybU/RYpI9YhKe7g368= /restore-cursor/3.1.0: dependencies: - onetime: 5.1.0 + onetime: 5.1.2 signal-exit: 3.0.3 dev: false engines: @@ -6435,7 +7124,7 @@ packages: /rhea-promise/0.1.15: dependencies: debug: 3.2.6 - rhea: 1.0.23 + rhea: 1.0.24 tslib: 1.13.0 dev: false resolution: @@ -6443,17 +7132,17 @@ packages: /rhea-promise/1.0.0: dependencies: debug: 3.2.6 - rhea: 1.0.23 + rhea: 1.0.24 tslib: 1.13.0 dev: false resolution: integrity: sha512-odAjpbB/IpFFBenPDwPkTWMQldt+DUlMBH9yI48Ct5OgTeDuuQcBnlhB+YCc6g2z8+URiP2ejms88joEanNCaw== - /rhea/1.0.23: + /rhea/1.0.24: dependencies: debug: 3.2.6 dev: false resolution: - integrity: sha512-c6xocb+x3uqcC30WDbbIQzeLuc0KNellSNWIzjUDC1WzlM/BwWnsVukDIP89+aqJ0MYAwly/B+ozGwdrF+EBrw== + integrity: sha512-PEl62U2EhxCO5wMUZ2/bCBcXAVKN9AdMSNQOrp3+R5b77TEaOSiy16MQ0sIOmzj/iqsgIAgPs1mt3FYfu1vIXA== /rimraf/2.6.3: dependencies: glob: 7.1.6 @@ -6475,10 +7164,37 @@ packages: hasBin: true resolution: integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== + /ripemd160/2.0.2: + dependencies: + hash-base: 3.1.0 + inherits: 2.0.4 + dev: false + resolution: + integrity: sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA== /rollup-plugin-local-resolve/1.0.7: dev: false resolution: integrity: sha1-xIZwFxbBWt0hJ1ZcLqoQESMyCIc= + /rollup-plugin-node-builtins/2.1.2: + dependencies: + browserify-fs: 1.0.0 + buffer-es6: 4.9.3 + crypto-browserify: 3.12.0 + process-es6: 0.11.6 + dev: false + resolution: + integrity: sha1-JKH+1KQyV7a2Q3HYq8bOGrFFl+k= + /rollup-plugin-node-globals/1.4.0: + dependencies: + acorn: 5.7.4 + buffer-es6: 4.9.3 + estree-walker: 0.5.2 + magic-string: 0.22.5 + process-es6: 0.11.6 + rollup-pluginutils: 2.8.2 + dev: false + resolution: + integrity: sha512-xRkB+W/m1KLIzPUmG0ofvR+CPNcvuCuNdjVBVS7ALKSxr3EDhnzNceGkGi1m8MToSli13AzKFYH4ie9w3I5L3g== /rollup-plugin-shim/1.0.0: dev: false resolution: @@ -6515,20 +7231,20 @@ packages: jest-worker: 24.9.0 rollup: 1.32.1 serialize-javascript: 2.1.2 - uglify-js: 3.10.0 + uglify-js: 3.10.2 dev: false peerDependencies: rollup: '>=0.66.0 <2' resolution: integrity: sha512-ddgqkH02klveu34TF0JqygPwZnsbhHVI6t8+hGTcYHngPkQb5MIHI0XiztXIN/d6V9j+efwHAqEL7LspSxQXGw== - /rollup-plugin-visualizer/4.0.4_rollup@1.32.1: + /rollup-plugin-visualizer/4.1.1_rollup@1.32.1: dependencies: - nanoid: 3.1.10 - open: 7.0.4 + nanoid: 3.1.12 + open: 7.2.1 pupa: 2.0.1 rollup: 1.32.1 source-map: 0.7.3 - yargs: 15.4.0 + yargs: 15.4.1 dev: false engines: node: '>=10' @@ -6536,18 +7252,26 @@ packages: peerDependencies: rollup: '>=1.20.0' resolution: - integrity: sha512-odkyLiVxCEXh4AWFSl75+pbIapzhEZkOVww8pKUgraOHicSH67MYMnAOHWQVK/BYeD1cCiF/0kk8/XNX2+LM9A== + integrity: sha512-aQBukhj8T+1BcOjD/5xB3+mZSSzHIVT+WpQDDEVpmPCkILVX0J7NPOuKEvKIXU+iZLvF7B5/wJA4+wxuH7FNew== /rollup-pluginutils/2.8.2: dependencies: estree-walker: 0.6.1 dev: false resolution: integrity: sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ== - /rollup/1.32.1: + /rollup/0.63.5: + dependencies: + '@types/estree': 0.0.39 + '@types/node': 10.17.28 + dev: false + hasBin: true + resolution: + integrity: sha512-dFf8LpUNzIj3oE0vCvobX6rqOzHzLBoblyFp+3znPbjiSmSvOoK2kMKx+Fv9jYduG1rvcCfCveSgEaQHjWRF6g== + /rollup/1.32.1: dependencies: '@types/estree': 0.0.45 - '@types/node': 8.10.61 - acorn: 7.3.1 + '@types/node': 8.10.62 + acorn: 7.4.0 dev: false hasBin: true resolution: @@ -6558,14 +7282,14 @@ packages: node: '>=0.12.0' resolution: integrity: sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ== - /rxjs/6.6.0: + /rxjs/6.6.2: dependencies: tslib: 1.13.0 dev: false engines: npm: '>=2.0.0' resolution: - integrity: sha512-3HMA8z/Oz61DUHe+SdOiQyzIf4tOx5oQHmMir7IZEu6TMqCLHT4LRcmNaUS0NwOz8VLvmmBduMsoaUvMaIiqzg== + integrity: sha512-BHdBMVoWC2sL26w//BCu3YzKT4s2jip/WhwsGEDmeKYBhKDZeYezVUnHatYB7L85v5xs0BAQmg6BEYJEKxBabg== /safe-buffer/5.1.2: dev: false resolution: @@ -6592,6 +7316,11 @@ packages: node: '>=0.8.0' resolution: integrity: sha512-O4OZEaNtkMd/K0i6js9SL+gqy0ZCBMgUvlSqHKi4IBdjhe7wB8pwztUk1BbZ1fmrvpwFrPbHzqd2w5pTcJH6LA== + /semver/2.3.2: + dev: false + hasBin: true + resolution: + integrity: sha1-uYSPJdbPNjMwc+ye+IVtQvEjPlI= /semver/5.3.0: dev: false hasBin: true @@ -6653,10 +7382,22 @@ packages: dev: false resolution: integrity: sha1-BF+XgtARrppoA93TgrJDkrPYkPc= + /setimmediate/1.0.5: + dev: false + resolution: + integrity: sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU= /setprototypeof/1.1.1: dev: false resolution: integrity: sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw== + /sha.js/2.4.11: + dependencies: + inherits: 2.0.4 + safe-buffer: 5.2.1 + dev: false + hasBin: true + resolution: + integrity: sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ== /shebang-command/1.2.0: dependencies: shebang-regex: 1.0.0 @@ -6715,30 +7456,32 @@ packages: dev: false resolution: integrity: sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA== - /simple-concat/1.0.0: + /simple-concat/1.0.1: dev: false + optional: true resolution: - integrity: sha1-c0TLuLbib7J9ZrL8hvn21Zl1IcY= + integrity: sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q== /simple-get/3.1.0: dependencies: decompress-response: 4.2.1 once: 1.4.0 - simple-concat: 1.0.0 + simple-concat: 1.0.1 dev: false + optional: true resolution: integrity: sha512-bCR6cP+aTdScaQCnQKbPKtJOKDp/hj9EDLJo3Nw4y1QksqaovlW/bnptB6/c1e+qmNIDHRK+oXFDdEqBT8WzUA== - /sinon/9.0.2: + /sinon/9.0.3: dependencies: - '@sinonjs/commons': 1.8.0 + '@sinonjs/commons': 1.8.1 '@sinonjs/fake-timers': 6.0.1 '@sinonjs/formatio': 5.0.1 - '@sinonjs/samsam': 5.0.3 + '@sinonjs/samsam': 5.1.0 diff: 4.0.2 nise: 4.0.4 - supports-color: 7.1.0 + supports-color: 7.2.0 dev: false resolution: - integrity: sha512-0uF8Q/QHkizNUmbK3LRFqx5cpTttEVXudywY9Uwzy8bTfZUhljZ7ARzSxnRHWYWtVTeh4Cw+tTb3iU21FQVO9A== + integrity: sha512-IKo9MIM111+smz9JGwLmw5U1075n1YXeAq8YeSFlndCLhAL5KGn6bLgu7b/4AYHTV/LcEMcRm2wU2YiL55/6Pg== /slice-ansi/2.1.0: dependencies: ansi-styles: 3.2.1 @@ -7010,6 +7753,15 @@ packages: dev: false resolution: integrity: sha512-H73RAHsVBapbim0tU2JwwOiXUj+fikfiaoYAKHF3VJfA0pe2BCzkhAHBlLG6REzE+2WNZcxOXjK7lkso+9euLA== + /stream-http/3.1.1: + dependencies: + builtin-status-codes: 3.0.0 + inherits: 2.0.4 + readable-stream: 3.6.0 + xtend: 4.0.2 + dev: false + resolution: + integrity: sha512-S7OqaYu0EkFpgeGFb/NPOoPLxFko7TPqtEeFg5DXPB4v/KETHG0Ln6fRFrNezoelpaDKmycEmmZ81cC9DAwgYg== /streamroller/2.2.4: dependencies: date-format: 2.1.0 @@ -7026,6 +7778,16 @@ packages: node: '>=0.10.0' resolution: integrity: sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM= + /string-argv/0.3.1: + dev: false + engines: + node: '>=0.6.19' + resolution: + integrity: sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg== + /string-range/1.2.2: + dev: false + resolution: + integrity: sha1-qJPtNH5yKZvIO++78qaSqNI51d0= /string-width/1.0.2: dependencies: code-point-at: 1.1.0 @@ -7034,6 +7796,7 @@ packages: dev: false engines: node: '>=0.10.0' + optional: true resolution: integrity: sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M= /string-width/2.1.1: @@ -7177,12 +7940,12 @@ packages: node: '>=0.10.0' resolution: integrity: sha1-PFMZQukIwml8DsNEhYwobHygpgo= - /strip-json-comments/3.1.0: + /strip-json-comments/3.1.1: dev: false engines: node: '>=8' resolution: - integrity: sha512-e6/d0eBu7gHtdCqFt0xJr642LdToM5/cN4Qb9DbHjVx1CP5RyeM+zH7pbecEmDv/lBqb0QH+6Uqq75rxFPkM0w== + integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== /supports-color/2.0.0: dev: false engines: @@ -7221,18 +7984,18 @@ packages: node: '>=6' resolution: integrity: sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ== - /supports-color/7.1.0: + /supports-color/7.2.0: dependencies: has-flag: 4.0.0 dev: false engines: node: '>=8' resolution: - integrity: sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g== + integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== /table/5.4.6: dependencies: - ajv: 6.12.3 - lodash: 4.17.19 + ajv: 6.12.4 + lodash: 4.17.20 slice-ansi: 2.1.0 string-width: 3.1.0 dev: false @@ -7251,7 +8014,7 @@ packages: integrity: sha512-9uW5iDvrIMCVpvasdFHW0wJPez0K4JnMZtsuIeDI7HyMGJNxmDZDOCQROr7lXyS+iL/QMpj07qcjGYTSdRFXUg== /tar-stream/2.1.3: dependencies: - bl: 4.0.2 + bl: 4.0.3 end-of-stream: 1.4.4 fs-constants: 1.0.0 inherits: 2.0.4 @@ -7318,6 +8081,14 @@ packages: node: '>=0.10.0' resolution: integrity: sha1-dkpaEa9QVhkhsTPztE5hhofg9cM= + /timers-browserify/2.0.11: + dependencies: + setimmediate: 1.0.5 + dev: false + engines: + node: '>=0.6.0' + resolution: + integrity: sha512-60aV6sgJ5YEbzUdn9c8kYGIqOubPoUdqQCul3SBAsRCZ40s6Y5cMcrW4dt3/k/EsbLVJNl9n6Vz3fTc+k2GeKQ== /timsort/0.3.0: dev: false resolution: @@ -7330,6 +8101,14 @@ packages: node: '>=0.6.0' resolution: integrity: sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw== + /tmp/0.1.0: + dependencies: + rimraf: 2.7.1 + dev: false + engines: + node: '>=6' + resolution: + integrity: sha512-J7Z2K08jbGcdA1kkQpJSqLF6T0tdQqpR2pnSUXsIchbPdTI9v3e85cLW0d6WDhwuAleOV71j2xWs8qMPfK7nKw== /tmp/0.2.1: dependencies: rimraf: 3.0.2 @@ -7423,13 +8202,13 @@ packages: hasBin: true resolution: integrity: sha512-BVwVbPJRspzNh2yfslyT1PSbl5uIk03EZlb493RKHN4qej/D06n1cEhjlOJG69oFsE7OT8XjpTUcYf6pKTLMhw== - /ts-node/8.10.2_typescript@3.9.6: + /ts-node/8.10.2_typescript@3.9.7: dependencies: arg: 4.1.3 diff: 4.0.2 make-error: 1.3.6 source-map-support: 0.5.19 - typescript: 3.9.6 + typescript: 3.9.7 yn: 3.1.1 dev: false engines: @@ -7452,10 +8231,10 @@ packages: dev: false resolution: integrity: sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q== - /tslib/2.0.0: + /tslib/2.0.1: dev: false resolution: - integrity: sha512-lTqkx847PI7xEDYJntxZH89L2/aXInsyF2luSafe/+0fHOMjlBNXdH6th7f70qxLDhul7KZK0zC8V5ZIyHl0/g== + integrity: sha512-SgIkNheinmEBgx1IUNirK0TUD4X9yjjBRTqqjggWCU3pUEqIk3/Uwl3yRixYKT6WjQuGiwDv4NomL3wqRCj+CQ== /tslint-config-prettier/1.18.0: dev: false engines: @@ -7463,7 +8242,7 @@ packages: hasBin: true resolution: integrity: sha512-xPw9PgNPLG3iKRxmK7DWr+Ea/SzrvfHtjFt5LBl61gk2UBG/DB9kCXRjv+xyIU1rUtnayLeMUVJBcMX8Z17nDg== - /tslint/5.20.1_typescript@3.9.6: + /tslint/5.20.1_typescript@3.9.7: dependencies: '@babel/code-frame': 7.10.4 builtin-modules: 1.1.1 @@ -7477,8 +8256,8 @@ packages: resolve: 1.17.0 semver: 5.7.1 tslib: 1.13.0 - tsutils: 2.29.0_typescript@3.9.6 - typescript: 3.9.6 + tsutils: 2.29.0_typescript@3.9.7 + typescript: 3.9.7 dev: false engines: node: '>=4.8.0' @@ -7487,19 +8266,19 @@ packages: typescript: '>=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >=3.0.0-dev || >= 3.1.0-dev || >= 3.2.0-dev' resolution: integrity: sha512-EcMxhzCFt8k+/UP5r8waCf/lzmeSyVlqxqMEDQE7rWYiQky8KpIBz1JAoYXfROHrPZ1XXd43q8yQnULOLiBRQg== - /tsutils/2.29.0_typescript@3.9.6: + /tsutils/2.29.0_typescript@3.9.7: dependencies: tslib: 1.13.0 - typescript: 3.9.6 + typescript: 3.9.7 dev: false peerDependencies: typescript: '>=2.1.0 || >=2.1.0-dev || >=2.2.0-dev || >=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >= 3.0.0-dev || >= 3.1.0-dev' resolution: integrity: sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA== - /tsutils/3.17.1_typescript@3.9.6: + /tsutils/3.17.1_typescript@3.9.7: dependencies: tslib: 1.13.0 - typescript: 3.9.6 + typescript: 3.9.7 dev: false engines: node: '>= 6' @@ -7507,6 +8286,10 @@ packages: typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta' resolution: integrity: sha512-kzeQ5B8H3w60nFY2g8cJIuH7JDpsALXySGtwGJ0p2LSjLgay3NdIpqq5SoOBe46bKDW2iq25irHCr8wjomUS2g== + /tty-browserify/0.0.1: + dev: false + resolution: + integrity: sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw== /tunnel-agent/0.6.0: dependencies: safe-buffer: 5.2.1 @@ -7558,11 +8341,19 @@ packages: node: '>= 0.6' resolution: integrity: sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== + /typedarray-to-buffer/1.0.4: + dev: false + resolution: + integrity: sha1-m7i6DoQfs/TPH+fCRenz+opf6Zw= + /typedarray/0.0.6: + dev: false + resolution: + integrity: sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= /typedoc-default-themes/0.6.3: dependencies: backbone: 1.4.0 jquery: 3.5.1 - lunr: 2.3.8 + lunr: 2.3.9 underscore: 1.10.2 dev: false engines: @@ -7574,8 +8365,8 @@ packages: '@types/minimatch': 3.0.3 fs-extra: 8.1.0 handlebars: 4.7.6 - highlight.js: 9.18.1 - lodash: 4.17.19 + highlight.js: 9.18.3 + lodash: 4.17.20 marked: 0.8.2 minimatch: 3.0.4 progress: 2.0.3 @@ -7595,24 +8386,24 @@ packages: hasBin: true resolution: integrity: sha512-/P5lkRXkWHNAbcJIiHPfRoKqyd7bsyCma1hZNUGfn20qm64T6ZBlrzprymeu918H+mB/0rIg2gGK/BXkhhYgBw== - /typescript/3.9.6: + /typescript/3.9.7: dev: false engines: node: '>=4.2.0' hasBin: true resolution: - integrity: sha512-Pspx3oKAPJtjNwE92YS05HQoY7z2SFyOpHo9MqJor3BXAGNaPUs83CuVp9VISFkSjyRfiTpmKuAYGJB7S7hOxw== + integrity: sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw== /ua-parser-js/0.7.21: dev: false resolution: integrity: sha512-+O8/qh/Qj8CgC6eYBVBykMrNtp5Gebn4dlGD/kKXVkJNDwyrAwSIqwz8CDf+tsAIWVycKcku6gIXJ0qwx/ZXaQ== - /uglify-js/3.10.0: + /uglify-js/3.10.2: dev: false engines: node: '>=0.8.0' hasBin: true resolution: - integrity: sha512-Esj5HG5WAyrLIdYU74Z3JdG2PxdIusvj6IWHMtlyESxc7kcDz7zYlYjpnSokn1UbpV0d/QX9fan7gkCNd/9BQA== + integrity: sha512-GXCYNwqoo0MbLARghYjxVBxDCnU0tLqN7IPLdHHbibCb1NI5zBkU2EPcy/GaVxc0BtTjqyGXJCINe6JMR2Dpow== /unbzip2-stream/1.4.3: dependencies: buffer: 5.6.0 @@ -7628,6 +8419,10 @@ packages: dev: false resolution: integrity: sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI= + /universal-user-agent/6.0.0: + dev: false + resolution: + integrity: sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w== /universalify/0.1.2: dev: false engines: @@ -7696,11 +8491,11 @@ packages: hasBin: true resolution: integrity: sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== - /uuid/8.2.0: + /uuid/8.3.0: dev: false hasBin: true resolution: - integrity: sha512-CYpGiFTUrmI6OBMkAdjSDM0k5h8SkkiTP4WAjQgDgNB1S3Ou9VBEvr6q0Kv2H1mMk7IWfxYGpMH5sd5AvcIV2Q== + integrity: sha512-fX6Z5o4m6XsXBdli9g7DtWgAx+osMsRRZFKma1mIUsLCz6vRvv+pz5VNbyu9UEDzpMWulZfvpgb/cmDXVulYFQ== /v8-compile-cache/2.1.1: dev: false resolution: @@ -7767,12 +8562,26 @@ packages: node: '>= 0.9' resolution: integrity: sha1-sEVbOPxeDPMNQyUTLkYZcMIJHN4= + /vlq/0.2.3: + dev: false + resolution: + integrity: sha512-DRibZL6DsNhIgYQ+wNdWDL2SL3bKPlVrRiBqV5yuMm++op8W4kGFtaQfCs4KEJn0wBZcHVHJ3eoywX8983k1ow== + /vm-browserify/1.1.2: + dev: false + resolution: + integrity: sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ== /void-elements/2.0.1: dev: false engines: node: '>=0.10.0' resolution: integrity: sha1-wGavtYK7HLQSjWDqkjkulNXp2+w= + /wcwidth/1.0.1: + dependencies: + defaults: 1.0.3 + dev: false + resolution: + integrity: sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g= /webidl-conversions/4.0.2: dev: false resolution: @@ -7791,6 +8600,7 @@ packages: integrity: sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= /which-pm-runs/1.0.0: dev: false + optional: true resolution: integrity: sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs= /which-typed-array/1.1.2: @@ -7828,14 +8638,14 @@ packages: dev: false resolution: integrity: sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA== - /windows-release/3.3.1: + /windows-release/3.3.3: dependencies: execa: 1.0.0 dev: false engines: node: '>=6' resolution: - integrity: sha512-Pngk/RDCaI/DkuHPlGTdIkDiTAnAkyMjoQMZqRsxydNl1qGXNIoZrB7RK8g53F2tEgQBMqQJHQdYZuQEEAu54A== + integrity: sha512-OSOGH1QYiW5yVor9TtmXKQvt2vjQqbYS+DqmsZw+r7xDwLXEeT3JGW0ZppFmHx4diyXmxt238KFR3N9jzevBRg== /word-wrap/1.2.3: dev: false engines: @@ -7972,12 +8782,35 @@ packages: dev: false resolution: integrity: sha1-UqY+VsoLhKfzpfPWGHLxJq16WUM= - /xregexp/4.3.0: + /xtend/2.0.6: + dependencies: + is-object: 0.1.2 + object-keys: 0.2.0 + dev: false + engines: + node: '>=0.4' + resolution: + integrity: sha1-XqZXptukRwacLlnFihE4ywxebO4= + /xtend/2.1.2: dependencies: - '@babel/runtime-corejs3': 7.10.4 + object-keys: 0.4.0 + dev: false + engines: + node: '>=0.4' + resolution: + integrity: sha1-bv7MKk2tjmlixJAbM3znuoe10os= + /xtend/2.2.0: + dev: false + engines: + node: '>=0.4' + resolution: + integrity: sha1-7vax8ZjByN6vrYsXZaBNrUoBxak= + /xtend/3.0.0: dev: false + engines: + node: '>=0.4' resolution: - integrity: sha512-7jXDIFXh5yJ/orPn4SXjuVrWWoi4Cr8jfV1eHv9CixKSbU+jY4mxfrBwAuDvupPNKpMUY+FeIqsVw/JLT9+B8g== + integrity: sha1-XM50B7r2Qsunvs2laBEcST9ZZlo= /xtend/4.0.2: dev: false engines: @@ -8015,7 +8848,7 @@ packages: /yargs-unparser/1.6.0: dependencies: flat: 4.1.0 - lodash: 4.17.19 + lodash: 4.17.20 yargs: 13.3.2 dev: false engines: @@ -8037,10 +8870,10 @@ packages: dev: false resolution: integrity: sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw== - /yargs/15.4.0: + /yargs/15.4.1: dependencies: cliui: 6.0.0 - decamelize: 3.2.0 + decamelize: 1.2.0 find-up: 4.1.0 get-caller-file: 2.0.5 require-directory: 2.1.1 @@ -8054,7 +8887,7 @@ packages: engines: node: '>=8' resolution: - integrity: sha512-D3fRFnZwLWp8jVAAhPZBsmeIHY8tTsb8ItV9KaAaopmC6wde2u6Yw29JBIZHXw14kgkRnYmDgmQU4FVMDlIsWw== + integrity: sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A== /yauzl/2.10.0: dependencies: buffer-crc32: 0.2.13 @@ -8094,15 +8927,15 @@ packages: '@microsoft/api-extractor': 7.7.11 '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 - '@rollup/plugin-node-resolve': 8.1.0_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 '@rollup/plugin-replace': 2.3.3_rollup@1.32.1 '@types/mocha': 7.0.2 - '@types/node': 8.10.61 - '@typescript-eslint/eslint-plugin': 2.34.0_3787943315ebc5ea524d5c102dc9e452 - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.6 + '@types/node': 8.10.62 + '@typescript-eslint/eslint-plugin': 2.34.0_5004700905763c91177aaa7d1d0d56ac + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.7 assert: 1.5.0 cross-env: 7.0.2 - delay: 4.3.0 + delay: 4.4.0 eslint: 6.8.0 eslint-config-prettier: 6.11.0_eslint@6.8.0 eslint-plugin-no-null: 1.0.2_eslint@6.8.0 @@ -8110,7 +8943,7 @@ packages: eslint-plugin-promise: 4.2.1 karma: 5.1.1 karma-chrome-launcher: 3.1.0 - karma-coverage: 2.0.2 + karma-coverage: 2.0.3 karma-edge-launcher: 0.4.2_karma@5.1.1 karma-env-preprocessor: 0.1.1 karma-firefox-launcher: 1.3.0 @@ -8127,13 +8960,13 @@ packages: rollup: 1.32.1 rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-terser: 5.3.0_rollup@1.32.1 - ts-node: 8.10.2_typescript@3.9.6 - tslib: 2.0.0 - typescript: 3.9.6 + ts-node: 8.10.2_typescript@3.9.7 + tslib: 2.0.1 + typescript: 3.9.7 dev: false name: '@rush-temp/abort-controller' resolution: - integrity: sha512-78SPLuZydRyhpdf4wO9uWQf4g8Ebuk5OZWFKmLKTPk42QJtMJpH9l7X1UXW3nh58BUHYairnIHJ0jamYTC6unw== + integrity: sha512-ePGF2T1ovFoO5zMj5swjozDl1D9pNY1L5fGgDU7ugfDHfCovr6md3cch0ytFFrtFPDIdSbrHChjUQ26gxX6Jaw== tarball: 'file:projects/abort-controller.tgz' version: 0.0.0 'file:projects/ai-anomaly-detector.tgz': @@ -8145,13 +8978,13 @@ packages: '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 '@rollup/plugin-json': 4.1.0_rollup@1.32.1 '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 - '@rollup/plugin-node-resolve': 8.1.0_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 '@rollup/plugin-replace': 2.3.3_rollup@1.32.1 - '@types/chai': 4.2.11 + '@types/chai': 4.2.12 '@types/mocha': 7.0.2 - '@types/node': 8.10.61 - '@typescript-eslint/eslint-plugin': 2.34.0_3787943315ebc5ea524d5c102dc9e452 - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.6 + '@types/node': 8.10.62 + '@typescript-eslint/eslint-plugin': 2.34.0_5004700905763c91177aaa7d1d0d56ac + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.7 chai: 4.2.0 cross-env: 7.0.2 dotenv: 8.2.0 @@ -8163,7 +8996,7 @@ packages: inherits: 2.0.4 karma: 5.1.1 karma-chrome-launcher: 3.1.0 - karma-coverage: 2.0.2 + karma-coverage: 2.0.3 karma-edge-launcher: 0.4.2_karma@5.1.1 karma-env-preprocessor: 0.1.1 karma-firefox-launcher: 1.3.0 @@ -8181,14 +9014,14 @@ packages: rollup-plugin-shim: 1.0.0 rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-terser: 5.3.0_rollup@1.32.1 - rollup-plugin-visualizer: 4.0.4_rollup@1.32.1 - tslib: 2.0.0 - typescript: 3.9.6 + rollup-plugin-visualizer: 4.1.1_rollup@1.32.1 + tslib: 2.0.1 + typescript: 3.9.7 util: 0.12.3 dev: false name: '@rush-temp/ai-anomaly-detector' resolution: - integrity: sha512-J6fb3uCGOsZfCg4OnH1S2tDToB378aSJCXCXdtJ4LKMHI48ciMIM5lHEq0Ee7/oNNGKslg0TruA/v6tAEL/CXg== + integrity: sha512-aaUKAVShh4trVKgoKcP+d37S1xKC0UrnVAe5A0Yx5asTn8v0KyubMDmFNQE6I8EObiHHNP9Hv7EmdY07vKIokw== tarball: 'file:projects/ai-anomaly-detector.tgz' version: 0.0.0 'file:projects/ai-form-recognizer.tgz': @@ -8200,15 +9033,15 @@ packages: '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 '@rollup/plugin-json': 4.1.0_rollup@1.32.1 '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 - '@rollup/plugin-node-resolve': 8.1.0_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 '@rollup/plugin-replace': 2.3.3_rollup@1.32.1 - '@types/chai': 4.2.11 + '@types/chai': 4.2.12 '@types/fs-extra': 8.1.1 '@types/mocha': 7.0.2 - '@types/node': 8.10.61 - '@types/sinon': 9.0.4 - '@typescript-eslint/eslint-plugin': 2.34.0_3787943315ebc5ea524d5c102dc9e452 - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.6 + '@types/node': 8.10.62 + '@types/sinon': 9.0.5 + '@typescript-eslint/eslint-plugin': 2.34.0_5004700905763c91177aaa7d1d0d56ac + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.7 chai: 4.2.0 chai-as-promised: 7.1.1_chai@4.2.0 cross-env: 7.0.2 @@ -8221,7 +9054,7 @@ packages: fs-extra: 8.1.0 karma: 5.1.1 karma-chrome-launcher: 3.1.0 - karma-coverage: 2.0.2 + karma-coverage: 2.0.3 karma-edge-launcher: 0.4.2_karma@5.1.1 karma-env-preprocessor: 0.1.1 karma-firefox-launcher: 1.3.0 @@ -8241,17 +9074,62 @@ packages: rollup-plugin-shim: 1.0.0 rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-terser: 5.3.0_rollup@1.32.1 - rollup-plugin-visualizer: 4.0.4_rollup@1.32.1 - sinon: 9.0.2 + rollup-plugin-visualizer: 4.1.1_rollup@1.32.1 + sinon: 9.0.3 source-map-support: 0.5.19 - tslib: 2.0.0 - typescript: 3.9.6 + tslib: 2.0.1 + typescript: 3.9.7 dev: false name: '@rush-temp/ai-form-recognizer' resolution: - integrity: sha512-yFx1KY5foauaTLXj7u6eN7E0Xp73ULm3sz7HeWVXE2bvPq+G8dfF2cGVDTor/wJ8hfeBltEtRJmR2oJyTh6S1g== + integrity: sha512-itk870Qe396YuKoaQI1kkeHsD4S1oGxIgPnwm6NDQjkc/EVGR/ELp+HxNGUdsUiefo6n4w1B2ouQoREOa4uA0A== tarball: 'file:projects/ai-form-recognizer.tgz' version: 0.0.0 + 'file:projects/ai-metrics-advisor.tgz': + dependencies: + '@azure/core-tracing': 1.0.0-preview.9 + '@azure/identity': 1.1.0 + '@microsoft/api-extractor': 7.7.11 + '@opentelemetry/api': 0.10.2 + '@types/chai': 4.2.12 + '@types/mocha': 7.0.2 + '@types/node': 8.10.62 + '@types/sinon': 9.0.5 + chai: 4.2.0 + chai-as-promised: 7.1.1_chai@4.2.0 + cross-env: 7.0.2 + dotenv: 8.2.0 + eslint: 6.8.0 + karma: 5.1.1 + karma-chrome-launcher: 3.1.0 + karma-coverage: 2.0.3 + karma-edge-launcher: 0.4.2_karma@5.1.1 + karma-env-preprocessor: 0.1.1 + karma-firefox-launcher: 1.3.0 + karma-ie-launcher: 1.0.0_karma@5.1.1 + karma-json-preprocessor: 0.3.3_karma@5.1.1 + karma-json-to-file-reporter: 1.0.1 + karma-junit-reporter: 2.0.1_karma@5.1.1 + karma-mocha: 2.0.1 + karma-mocha-reporter: 2.2.5_karma@5.1.1 + karma-remap-istanbul: 0.6.0_karma@5.1.1 + mocha: 7.2.0 + mocha-junit-reporter: 1.23.3_mocha@7.2.0 + nyc: 14.1.1 + prettier: 1.19.1 + rimraf: 3.0.2 + rollup: 1.32.1 + sinon: 9.0.3 + source-map-support: 0.5.19 + ts-node: 8.10.2_typescript@3.9.7 + tslib: 2.0.1 + typescript: 3.9.7 + dev: false + name: '@rush-temp/ai-metrics-advisor' + resolution: + integrity: sha512-Lcl1NARcCru6Y/gAUpz/URvOQGpyLnVNf33oLHmdPtV3Fp9TQzMl9gmymaipU6MfL5rsI7Il3mER8fjemzeThQ== + tarball: 'file:projects/ai-metrics-advisor.tgz' + version: 0.0.0 'file:projects/ai-text-analytics.tgz': dependencies: '@azure/core-tracing': 1.0.0-preview.9 @@ -8261,15 +9139,15 @@ packages: '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 '@rollup/plugin-json': 4.1.0_rollup@1.32.1 '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 - '@rollup/plugin-node-resolve': 8.1.0_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 '@rollup/plugin-replace': 2.3.3_rollup@1.32.1 - '@types/chai': 4.2.11 + '@types/chai': 4.2.12 '@types/chai-as-promised': 7.1.3 '@types/mocha': 7.0.2 - '@types/node': 8.10.61 - '@types/sinon': 9.0.4 - '@typescript-eslint/eslint-plugin': 2.34.0_3787943315ebc5ea524d5c102dc9e452 - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.6 + '@types/node': 8.10.62 + '@types/sinon': 9.0.5 + '@typescript-eslint/eslint-plugin': 2.34.0_5004700905763c91177aaa7d1d0d56ac + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.7 chai: 4.2.0 chai-as-promised: 7.1.1_chai@4.2.0 cross-env: 7.0.2 @@ -8281,7 +9159,7 @@ packages: eslint-plugin-promise: 4.2.1 karma: 5.1.1 karma-chrome-launcher: 3.1.0 - karma-coverage: 2.0.2 + karma-coverage: 2.0.3 karma-edge-launcher: 0.4.2_karma@5.1.1 karma-env-preprocessor: 0.1.1 karma-firefox-launcher: 1.3.0 @@ -8292,6 +9170,8 @@ packages: karma-mocha: 2.0.1 karma-mocha-reporter: 2.2.5_karma@5.1.1 karma-remap-istanbul: 0.6.0_karma@5.1.1 + karma-source-map-support: 1.4.0 + karma-sourcemap-loader: 0.3.8 mocha: 7.2.0 mocha-junit-reporter: 1.23.3_mocha@7.2.0 nyc: 14.1.1 @@ -8301,15 +9181,16 @@ packages: rollup-plugin-shim: 1.0.0 rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-terser: 5.3.0_rollup@1.32.1 - rollup-plugin-visualizer: 4.0.4_rollup@1.32.1 - sinon: 9.0.2 + rollup-plugin-visualizer: 4.1.1_rollup@1.32.1 + sinon: 9.0.3 source-map-support: 0.5.19 - tslib: 2.0.0 - typescript: 3.9.6 + ts-node: 8.10.2_typescript@3.9.7 + tslib: 2.0.1 + typescript: 3.9.7 dev: false name: '@rush-temp/ai-text-analytics' resolution: - integrity: sha512-dzKtF7SLzOzDdrwRDXidkewcR0TJe3AypIybQShD0XBXmzTmio0Vpp0WBpF2bMyAocTIL59PECBLYy95QTvXUA== + integrity: sha512-w7v5zDItgaPNzOOL3lkjQpSAJgp9Ex86OQckrThCfwYicUvQ2rANqacVz5d6KseFRP1OyenPXM1KaFyY3a1KqQ== tarball: 'file:projects/ai-text-analytics.tgz' version: 0.0.0 'file:projects/app-configuration.tgz': @@ -8322,12 +9203,14 @@ packages: '@rollup/plugin-inject': 4.0.2_rollup@1.32.1 '@rollup/plugin-json': 4.1.0_rollup@1.32.1 '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 - '@rollup/plugin-node-resolve': 8.1.0_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 '@rollup/plugin-replace': 2.3.3_rollup@1.32.1 - '@types/chai': 4.2.11 + '@types/chai': 4.2.12 '@types/mocha': 7.0.2 - '@types/node': 8.10.61 - '@types/sinon': 9.0.4 + '@types/node': 8.10.62 + '@types/sinon': 9.0.5 + '@typescript-eslint/eslint-plugin': 2.34.0_5004700905763c91177aaa7d1d0d56ac + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.7 assert: 1.5.0 chai: 4.2.0 cross-env: 7.0.2 @@ -8340,7 +9223,7 @@ packages: esm: 3.2.25 karma: 5.1.1 karma-chrome-launcher: 3.1.0 - karma-coverage: 2.0.2 + karma-coverage: 2.0.3 karma-edge-launcher: 0.4.2_karma@5.1.1 karma-env-preprocessor: 0.1.1 karma-firefox-launcher: 1.3.0 @@ -8359,17 +9242,257 @@ packages: rollup-plugin-shim: 1.0.0 rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-terser: 5.3.0_rollup@1.32.1 - sinon: 9.0.2 - ts-node: 8.10.2_typescript@3.9.6 - tslib: 2.0.0 - typescript: 3.9.6 - uglify-js: 3.10.0 + sinon: 9.0.3 + ts-node: 8.10.2_typescript@3.9.7 + tslib: 2.0.1 + typescript: 3.9.7 + uglify-js: 3.10.2 dev: false name: '@rush-temp/app-configuration' resolution: - integrity: sha512-Dvua3Tobr3ppJqmYiEfDhOBd69Mz2RrONLDEz1//uL/FXNdxSuaZuMRrrD5Xhdfk2GnChivKp9jt+luKCfA/1A== + integrity: sha512-g4Ch0EtyNeX5u75WQoSVQPcelPMMMQbRUSl9sICbmS2NSddOvicHzvDWB31qCsPccRrOZKZrgVIOA4xst7p7vQ== tarball: 'file:projects/app-configuration.tgz' version: 0.0.0 + 'file:projects/communication-administration.tgz': + dependencies: + '@azure/core-tracing': 1.0.0-preview.9 + '@microsoft/api-documenter': 7.8.56 + '@microsoft/api-extractor': 7.7.11 + '@opentelemetry/api': 0.10.2 + '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 + '@rollup/plugin-json': 4.1.0_rollup@1.32.1 + '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 + '@rollup/plugin-replace': 2.3.3_rollup@1.32.1 + '@types/chai': 4.2.12 + '@types/mocha': 7.0.2 + '@types/node': 8.10.62 + '@types/sinon': 9.0.5 + '@typescript-eslint/eslint-plugin': 2.34.0_5004700905763c91177aaa7d1d0d56ac + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.7 + assert: 1.5.0 + chai: 4.2.0 + cross-env: 7.0.2 + dotenv: 8.2.0 + eslint: 6.8.0 + eslint-config-prettier: 6.11.0_eslint@6.8.0 + eslint-plugin-no-null: 1.0.2_eslint@6.8.0 + eslint-plugin-no-only-tests: 2.4.0 + eslint-plugin-prefer-arrow: 1.2.2_eslint@6.8.0 + eslint-plugin-promise: 4.2.1 + events: 3.2.0 + inherits: 2.0.4 + karma: 5.1.1 + karma-chrome-launcher: 3.1.0 + karma-coverage: 2.0.3 + karma-edge-launcher: 0.4.2_karma@5.1.1 + karma-env-preprocessor: 0.1.1 + karma-firefox-launcher: 1.3.0 + karma-ie-launcher: 1.0.0_karma@5.1.1 + karma-json-preprocessor: 0.3.3_karma@5.1.1 + karma-json-to-file-reporter: 1.0.1 + karma-junit-reporter: 2.0.1_karma@5.1.1 + karma-mocha: 2.0.1 + karma-mocha-reporter: 2.2.5_karma@5.1.1 + karma-remap-istanbul: 0.6.0_karma@5.1.1 + mocha: 7.2.0 + mocha-junit-reporter: 1.23.3_mocha@7.2.0 + node-fetch: 2.6.0 + nyc: 14.1.1 + prettier: 1.19.1 + rimraf: 3.0.2 + rollup: 1.32.1 + rollup-plugin-shim: 1.0.0 + rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 + rollup-plugin-terser: 5.3.0_rollup@1.32.1 + rollup-plugin-visualizer: 4.1.1_rollup@1.32.1 + sinon: 9.0.3 + tslib: 2.0.1 + typescript: 3.9.7 + dev: false + name: '@rush-temp/communication-administration' + resolution: + integrity: sha512-4nL0d0YV/FD5sOQDnYMZE0Xe1gkJOLThAHdlDueC86kQGVP8u6vy+0f8a6dnN/f0tBt+lZ10bFo6rLyRjCoDTg== + tarball: 'file:projects/communication-administration.tgz' + version: 0.0.0 + 'file:projects/communication-chat.tgz': + dependencies: + '@azure/communication-signaling': 1.0.0-beta.1 + '@azure/core-tracing': 1.0.0-preview.9 + '@microsoft/api-extractor': 7.7.11 + '@opentelemetry/api': 0.10.2 + '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 + '@rollup/plugin-json': 4.1.0_rollup@1.32.1 + '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 + '@rollup/plugin-replace': 2.3.3_rollup@1.32.1 + '@types/chai': 4.2.12 + '@types/mocha': 7.0.2 + '@types/node': 8.10.62 + '@types/sinon': 9.0.5 + '@typescript-eslint/eslint-plugin': 2.34.0_5004700905763c91177aaa7d1d0d56ac + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.7 + assert: 1.5.0 + chai: 4.2.0 + cross-env: 7.0.2 + dotenv: 8.2.0 + eslint: 6.8.0 + eslint-config-prettier: 6.11.0_eslint@6.8.0 + eslint-plugin-no-null: 1.0.2_eslint@6.8.0 + eslint-plugin-no-only-tests: 2.4.0 + eslint-plugin-promise: 4.2.1 + events: 3.2.0 + inherits: 2.0.4 + karma: 5.1.1 + karma-chrome-launcher: 3.1.0 + karma-coverage: 2.0.3 + karma-edge-launcher: 0.4.2_karma@5.1.1 + karma-env-preprocessor: 0.1.1 + karma-firefox-launcher: 1.3.0 + karma-ie-launcher: 1.0.0_karma@5.1.1 + karma-json-preprocessor: 0.3.3_karma@5.1.1 + karma-json-to-file-reporter: 1.0.1 + karma-junit-reporter: 2.0.1_karma@5.1.1 + karma-mocha: 2.0.1 + karma-mocha-reporter: 2.2.5_karma@5.1.1 + karma-remap-istanbul: 0.6.0_karma@5.1.1 + mocha: 7.2.0 + mocha-junit-reporter: 1.23.3_mocha@7.2.0 + nyc: 14.1.1 + prettier: 1.19.1 + rimraf: 3.0.2 + rollup: 1.32.1 + rollup-plugin-shim: 1.0.0 + rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 + rollup-plugin-terser: 5.3.0_rollup@1.32.1 + rollup-plugin-visualizer: 4.1.1_rollup@1.32.1 + sinon: 9.0.3 + tslib: 2.0.1 + typescript: 3.9.7 + util: 0.12.3 + dev: false + name: '@rush-temp/communication-chat' + resolution: + integrity: sha512-6RGSAjt0ptu7Pln9xuVYLm2tog8uJ5YvhQ94pb7HzQ8Ib6XXzmvz71m33sL7eCmtBLOD93sK5PKC4Cr7hj35SA== + tarball: 'file:projects/communication-chat.tgz' + version: 0.0.0 + 'file:projects/communication-common.tgz': + dependencies: + '@microsoft/api-extractor': 7.7.11 + '@opentelemetry/api': 0.10.2 + '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 + '@rollup/plugin-json': 4.1.0_rollup@1.32.1 + '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 + '@rollup/plugin-replace': 2.3.3_rollup@1.32.1 + '@types/chai': 4.2.12 + '@types/chai-as-promised': 7.1.3 + '@types/jwt-decode': 2.2.1 + '@types/mocha': 7.0.2 + '@types/node': 8.10.62 + '@types/sinon': 9.0.5 + '@typescript-eslint/eslint-plugin': 2.34.0_5004700905763c91177aaa7d1d0d56ac + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.7 + assert: 1.5.0 + chai: 4.2.0 + chai-as-promised: 7.1.1_chai@4.2.0 + cross-env: 7.0.2 + eslint: 6.8.0 + eslint-config-prettier: 6.11.0_eslint@6.8.0 + eslint-plugin-no-null: 1.0.2_eslint@6.8.0 + eslint-plugin-no-only-tests: 2.4.0 + eslint-plugin-promise: 4.2.1 + events: 3.2.0 + inherits: 2.0.4 + jwt-decode: 2.2.0 + karma: 5.1.1 + karma-chrome-launcher: 3.1.0 + karma-coverage: 2.0.3 + karma-edge-launcher: 0.4.2_karma@5.1.1 + karma-env-preprocessor: 0.1.1 + karma-firefox-launcher: 1.3.0 + karma-ie-launcher: 1.0.0_karma@5.1.1 + karma-junit-reporter: 2.0.1_karma@5.1.1 + karma-mocha: 2.0.1 + karma-mocha-reporter: 2.2.5_karma@5.1.1 + karma-remap-istanbul: 0.6.0_karma@5.1.1 + mocha: 7.2.0 + mocha-junit-reporter: 1.23.3_mocha@7.2.0 + nyc: 14.1.1 + prettier: 1.19.1 + rimraf: 3.0.2 + rollup: 1.32.1 + rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 + rollup-plugin-terser: 5.3.0_rollup@1.32.1 + rollup-plugin-visualizer: 4.1.1_rollup@1.32.1 + sinon: 9.0.3 + tslib: 2.0.1 + typescript: 3.9.7 + util: 0.12.3 + dev: false + name: '@rush-temp/communication-common' + resolution: + integrity: sha512-urCDs68xfK5hgKP4vgAPncOgaMEPgMCQlIXr3UshMXJUVAryUflhfVYCwLiy3tPDHBUpRFMu7qWjU76IVUqulA== + tarball: 'file:projects/communication-common.tgz' + version: 0.0.0 + 'file:projects/communication-sms.tgz': + dependencies: + '@azure/core-tracing': 1.0.0-preview.9 + '@microsoft/api-extractor': 7.7.11 + '@opentelemetry/api': 0.10.2 + '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 + '@rollup/plugin-json': 4.1.0_rollup@1.32.1 + '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 + '@rollup/plugin-replace': 2.3.3_rollup@1.32.1 + '@types/chai': 4.2.12 + '@types/mocha': 7.0.2 + '@types/node': 8.10.62 + '@types/sinon': 9.0.5 + '@typescript-eslint/eslint-plugin': 2.34.0_5004700905763c91177aaa7d1d0d56ac + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.7 + assert: 1.5.0 + chai: 4.2.0 + cross-env: 7.0.2 + dotenv: 8.2.0 + eslint: 6.8.0 + eslint-config-prettier: 6.11.0_eslint@6.8.0 + eslint-plugin-no-null: 1.0.2_eslint@6.8.0 + eslint-plugin-no-only-tests: 2.4.0 + eslint-plugin-promise: 4.2.1 + events: 3.2.0 + inherits: 2.0.4 + karma: 5.1.1 + karma-chrome-launcher: 3.1.0 + karma-coverage: 2.0.3 + karma-edge-launcher: 0.4.2_karma@5.1.1 + karma-env-preprocessor: 0.1.1 + karma-firefox-launcher: 1.3.0 + karma-ie-launcher: 1.0.0_karma@5.1.1 + karma-junit-reporter: 2.0.1_karma@5.1.1 + karma-mocha: 2.0.1 + karma-mocha-reporter: 2.2.5_karma@5.1.1 + karma-remap-istanbul: 0.6.0_karma@5.1.1 + mocha: 7.2.0 + mocha-junit-reporter: 1.23.3_mocha@7.2.0 + nyc: 14.1.1 + prettier: 1.19.1 + rimraf: 3.0.2 + rollup: 1.32.1 + rollup-plugin-shim: 1.0.0 + rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 + rollup-plugin-terser: 5.3.0_rollup@1.32.1 + rollup-plugin-visualizer: 4.1.1_rollup@1.32.1 + sinon: 9.0.3 + tslib: 2.0.1 + typescript: 3.9.7 + util: 0.12.3 + dev: false + name: '@rush-temp/communication-sms' + resolution: + integrity: sha512-3gPH+ljkhCJCsOBcdZnxdalmBPPkbDDBaYa9UbfSabstj4pTlIss2T8J6vc758CfaSB4iGVxyHdgz3vUzavH/A== + tarball: 'file:projects/communication-sms.tgz' + version: 0.0.0 'file:projects/core-amqp.tgz': dependencies: '@azure/identity': 1.1.0 @@ -8378,18 +9501,18 @@ packages: '@rollup/plugin-inject': 4.0.2_rollup@1.32.1 '@rollup/plugin-json': 4.1.0_rollup@1.32.1 '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 - '@rollup/plugin-node-resolve': 8.1.0_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 '@rollup/plugin-replace': 2.3.3_rollup@1.32.1 '@types/async-lock': 1.1.2 - '@types/chai': 4.2.11 + '@types/chai': 4.2.12 '@types/chai-as-promised': 7.1.3 '@types/debug': 4.1.5 '@types/is-buffer': 2.0.0 '@types/mocha': 7.0.2 - '@types/node': 8.10.61 - '@types/sinon': 9.0.4 - '@typescript-eslint/eslint-plugin': 2.34.0_3787943315ebc5ea524d5c102dc9e452 - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.6 + '@types/node': 8.10.62 + '@types/sinon': 9.0.5 + '@typescript-eslint/eslint-plugin': 2.34.0_5004700905763c91177aaa7d1d0d56ac + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.7 assert: 1.5.0 async-lock: 1.2.4 buffer: 5.6.0 @@ -8404,9 +9527,9 @@ packages: eslint-plugin-no-null: 1.0.2_eslint@6.8.0 eslint-plugin-no-only-tests: 2.4.0 eslint-plugin-promise: 4.2.1 - events: 3.1.0 + events: 3.2.0 is-buffer: 2.0.4 - jssha: 3.1.0 + jssha: 3.1.2 karma: 5.1.1 karma-chrome-launcher: 3.1.0 karma-mocha: 2.0.1 @@ -8416,35 +9539,34 @@ packages: prettier: 1.19.1 process: 0.11.10 puppeteer: 3.3.0 - rhea: 1.0.23 + rhea: 1.0.24 rhea-promise: 1.0.0 rimraf: 3.0.2 rollup: 1.32.1 rollup-plugin-shim: 1.0.0 rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-terser: 5.3.0_rollup@1.32.1 - sinon: 9.0.2 - stream-browserify: 3.0.0 - ts-node: 8.10.2_typescript@3.9.6 - tslib: 2.0.0 - typescript: 3.9.6 + sinon: 9.0.3 + ts-node: 8.10.2_typescript@3.9.7 + tslib: 2.0.1 + typescript: 3.9.7 url: 0.11.0 util: 0.12.3 ws: 7.3.1 dev: false name: '@rush-temp/core-amqp' resolution: - integrity: sha512-K0UxDvA6BmhISAJDXoIEIVQRTm7RbY51cNRg7fkMWRzl3dp/UxC7qUnJb/EAawgCOrYeiOS+PR0VLx5s5gDzaQ== + integrity: sha512-Nk2z5Ms2pZsaLcHWcB13/dcFCR3RS5/OWFSMM0hh/heqOxKhog9RJXWnP1DGXhLLp9vibitt7XHBDXZkajra3g== tarball: 'file:projects/core-amqp.tgz' version: 0.0.0 'file:projects/core-arm.tgz': dependencies: - '@rollup/plugin-node-resolve': 8.1.0_rollup@1.32.1 - '@types/chai': 4.2.11 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 + '@types/chai': 4.2.12 '@types/mocha': 7.0.2 - '@types/node': 8.10.61 - '@typescript-eslint/eslint-plugin': 2.34.0_3787943315ebc5ea524d5c102dc9e452 - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.6 + '@types/node': 8.10.62 + '@typescript-eslint/eslint-plugin': 2.34.0_5004700905763c91177aaa7d1d0d56ac + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.7 chai: 4.2.0 eslint: 6.8.0 eslint-config-prettier: 6.11.0_eslint@6.8.0 @@ -8458,34 +9580,34 @@ packages: rimraf: 3.0.2 rollup: 1.32.1 rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 - rollup-plugin-visualizer: 4.0.4_rollup@1.32.1 + rollup-plugin-visualizer: 4.1.1_rollup@1.32.1 shx: 0.3.2 - ts-node: 8.10.2_typescript@3.9.6 - tslib: 2.0.0 - typescript: 3.9.6 - uglify-js: 3.10.0 + ts-node: 8.10.2_typescript@3.9.7 + tslib: 2.0.1 + typescript: 3.9.7 + uglify-js: 3.10.2 dev: false name: '@rush-temp/core-arm' resolution: - integrity: sha512-9W5DtE8mrloERAKoJsqv7KFlpiwJFiHNBRiS/hKZXDxsfm0aPqw7pv8kpr2Uj1HoFdDtlgUCPdu/6LL/O89kJw== + integrity: sha512-Zb61MgOHT1RDAjJuzgtNeCzngU6qWSHyTPraBYk+GoTMSBs/SYUiXp0hMxIriJj8dQIai5BvVDswIVXFSWddUg== tarball: 'file:projects/core-arm.tgz' version: 0.0.0 'file:projects/core-asynciterator-polyfill.tgz': dependencies: - '@types/node': 8.10.61 - '@typescript-eslint/eslint-plugin': 2.34.0_3787943315ebc5ea524d5c102dc9e452 - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.6 + '@types/node': 8.10.62 + '@typescript-eslint/eslint-plugin': 2.34.0_5004700905763c91177aaa7d1d0d56ac + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.7 eslint: 6.8.0 eslint-config-prettier: 6.11.0_eslint@6.8.0 eslint-plugin-no-null: 1.0.2_eslint@6.8.0 eslint-plugin-no-only-tests: 2.4.0 eslint-plugin-promise: 4.2.1 prettier: 1.19.1 - typescript: 3.9.6 + typescript: 3.9.7 dev: false name: '@rush-temp/core-asynciterator-polyfill' resolution: - integrity: sha512-H+PZImxHoD4ZcrJie2qstZmXk1/DHGyIq9b+eSSv4TjT9VsCbeaaEEaZ/iCsoUyzDuLWTj2MYqNEgU4L9ROTzA== + integrity: sha512-qd37qK+hk0KAlOm7XDr2lio3s9unyuKSp92QaJfoh62AkVnjeOjKvPU/PknYBbP1eQT+GnPQKuZMc/e0n6WUtQ== tarball: 'file:projects/core-asynciterator-polyfill.tgz' version: 0.0.0 'file:projects/core-auth.tgz': @@ -8496,12 +9618,12 @@ packages: '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 '@rollup/plugin-json': 4.1.0_rollup@1.32.1 '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 - '@rollup/plugin-node-resolve': 8.1.0_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 '@rollup/plugin-replace': 2.3.3_rollup@1.32.1 '@types/mocha': 7.0.2 - '@types/node': 8.10.61 - '@typescript-eslint/eslint-plugin': 2.34.0_3787943315ebc5ea524d5c102dc9e452 - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.6 + '@types/node': 8.10.62 + '@typescript-eslint/eslint-plugin': 2.34.0_5004700905763c91177aaa7d1d0d56ac + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.7 assert: 1.5.0 cross-env: 7.0.2 downlevel-dts: 0.4.0 @@ -8518,14 +9640,14 @@ packages: rollup: 1.32.1 rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-terser: 5.3.0_rollup@1.32.1 - rollup-plugin-visualizer: 4.0.4_rollup@1.32.1 - tslib: 2.0.0 - typescript: 3.9.6 + rollup-plugin-visualizer: 4.1.1_rollup@1.32.1 + tslib: 2.0.1 + typescript: 3.9.7 util: 0.12.3 dev: false name: '@rush-temp/core-auth' resolution: - integrity: sha512-cisnMZuzgkO4YcSw2Ky+w7AJmn/Dmz5Sm3jtN2wJpo/2q3MGcIVfn6X3mvzLX3L8rQTNHFPTNZCY1MnfkEtNeg== + integrity: sha512-cTNwAPeRONmLxx9r7nvghh+WW1HhcdPSKtlvcvKiHD4UTqLWShmH3Jsrw57ClL8swAclXA0OsWpvFR1oss9qgw== tarball: 'file:projects/core-auth.tgz' version: 0.0.0 'file:projects/core-client.tgz': @@ -8536,14 +9658,14 @@ packages: '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 '@rollup/plugin-json': 4.1.0_rollup@1.32.1 '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 - '@rollup/plugin-node-resolve': 8.1.0_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 '@rollup/plugin-replace': 2.3.3_rollup@1.32.1 - '@types/chai': 4.2.11 + '@types/chai': 4.2.12 '@types/mocha': 7.0.2 - '@types/node': 8.10.61 - '@types/sinon': 9.0.4 - '@typescript-eslint/eslint-plugin': 2.34.0_3787943315ebc5ea524d5c102dc9e452 - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.6 + '@types/node': 8.10.62 + '@types/sinon': 9.0.5 + '@typescript-eslint/eslint-plugin': 2.34.0_5004700905763c91177aaa7d1d0d56ac + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.7 chai: 4.2.0 cross-env: 7.0.2 downlevel-dts: 0.4.0 @@ -8555,7 +9677,7 @@ packages: inherits: 2.0.4 karma: 5.1.1 karma-chrome-launcher: 3.1.0 - karma-coverage: 2.0.2 + karma-coverage: 2.0.3 karma-edge-launcher: 0.4.2_karma@5.1.1 karma-env-preprocessor: 0.1.1 karma-firefox-launcher: 1.3.0 @@ -8571,15 +9693,15 @@ packages: rollup: 1.32.1 rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-terser: 5.3.0_rollup@1.32.1 - rollup-plugin-visualizer: 4.0.4_rollup@1.32.1 - sinon: 9.0.2 - tslib: 2.0.0 - typescript: 3.9.6 + rollup-plugin-visualizer: 4.1.1_rollup@1.32.1 + sinon: 9.0.3 + tslib: 2.0.1 + typescript: 3.9.7 util: 0.12.3 dev: false name: '@rush-temp/core-client' resolution: - integrity: sha512-dy8+MGH/3SnKvFIeYSAeDwg/wkkiQJpa9GU2RpxvZi6tB83JNvRP2hpEOZUwWpeJqLeYeZtP1UtvaIsdLv1vOA== + integrity: sha512-VYIBEitRkTb5B0RxzcvQ9Xj0IRxS23NPGXDp34XMxuypK5HbsHGfyzDP5w6JMlVALW5a1tAfrCjnRjOSl1CSxA== tarball: 'file:projects/core-client.tgz' version: 0.0.0 'file:projects/core-http.tgz': @@ -8591,20 +9713,20 @@ packages: '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 '@rollup/plugin-json': 4.1.0_rollup@1.32.1 '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 - '@rollup/plugin-node-resolve': 8.1.0_rollup@1.32.1 - '@types/chai': 4.2.11 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 + '@types/chai': 4.2.12 '@types/express': 4.17.7 '@types/glob': 7.1.3 '@types/mocha': 7.0.2 - '@types/node': 8.10.61 + '@types/node': 8.10.62 '@types/node-fetch': 2.5.7 - '@types/sinon': 9.0.4 + '@types/sinon': 9.0.5 '@types/tough-cookie': 4.0.0 '@types/tunnel': 0.0.1 - '@types/uuid': 8.0.0 + '@types/uuid': 8.3.0 '@types/xml2js': 0.4.5 - '@typescript-eslint/eslint-plugin': 2.34.0_3787943315ebc5ea524d5c102dc9e452 - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.6 + '@typescript-eslint/eslint-plugin': 2.34.0_5004700905763c91177aaa7d1d0d56ac + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.7 babel-runtime: 6.26.0 chai: 4.2.0 cross-env: 7.0.2 @@ -8615,7 +9737,7 @@ packages: eslint-plugin-no-only-tests: 2.4.0 eslint-plugin-promise: 4.2.1 express: 4.17.1 - fetch-mock: 9.10.3_node-fetch@2.6.0 + fetch-mock: 9.10.7_node-fetch@2.6.0 form-data: 3.0.0 glob: 7.1.6 karma: 5.1.1 @@ -8625,7 +9747,7 @@ packages: karma-firefox-launcher: 1.3.0 karma-mocha: 2.0.1 karma-rollup-preprocessor: 7.0.5_rollup@1.32.1 - karma-sourcemap-loader: 0.3.7 + karma-sourcemap-loader: 0.3.8 mocha: 7.2.0 mocha-junit-reporter: 1.23.3_mocha@7.2.0 node-fetch: 2.6.0 @@ -8634,26 +9756,26 @@ packages: prettier: 1.19.1 process: 0.11.10 puppeteer: 3.3.0 - regenerator-runtime: 0.13.5 + regenerator-runtime: 0.13.7 rimraf: 3.0.2 rollup: 1.32.1 rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 - rollup-plugin-visualizer: 4.0.4_rollup@1.32.1 + rollup-plugin-visualizer: 4.1.1_rollup@1.32.1 shx: 0.3.2 - sinon: 9.0.2 + sinon: 9.0.3 tough-cookie: 4.0.0 - ts-node: 8.10.2_typescript@3.9.6 - tslib: 2.0.0 + ts-node: 8.10.2_typescript@3.9.7 + tslib: 2.0.1 tunnel: 0.0.6 - typescript: 3.9.6 - uglify-js: 3.10.0 - uuid: 8.2.0 + typescript: 3.9.7 + uglify-js: 3.10.2 + uuid: 8.3.0 xhr-mock: 2.5.1 xml2js: 0.4.23 dev: false name: '@rush-temp/core-http' resolution: - integrity: sha512-kOGT2hum2uuqkhtRps2jklAs/cdbCGBa7Sa3xMlDtDLuUpaoLzrIczonA+dQVgE1G/hkJmOnrezCHqlDRpUsoA== + integrity: sha512-DpgHabhCkCWjyoaCH/M7rsup4GWW976NEw9plc0YebJSd4XzWc35e4a4TNyaPuxGraca7hHdWcdRZgTWR7CJkQ== tarball: 'file:projects/core-http.tgz' version: 0.0.0 'file:projects/core-https.tgz': @@ -8664,15 +9786,15 @@ packages: '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 '@rollup/plugin-json': 4.1.0_rollup@1.32.1 '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 - '@rollup/plugin-node-resolve': 8.1.0_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 '@rollup/plugin-replace': 2.3.3_rollup@1.32.1 - '@types/chai': 4.2.11 + '@types/chai': 4.2.12 '@types/mocha': 7.0.2 - '@types/node': 8.10.61 - '@types/sinon': 9.0.4 - '@types/uuid': 8.0.0 - '@typescript-eslint/eslint-plugin': 2.34.0_3787943315ebc5ea524d5c102dc9e452 - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.6 + '@types/node': 8.10.62 + '@types/sinon': 9.0.5 + '@types/uuid': 8.3.0 + '@typescript-eslint/eslint-plugin': 2.34.0_5004700905763c91177aaa7d1d0d56ac + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.7 chai: 4.2.0 cross-env: 7.0.2 downlevel-dts: 0.4.0 @@ -8686,7 +9808,7 @@ packages: inherits: 2.0.4 karma: 5.1.1 karma-chrome-launcher: 3.1.0 - karma-coverage: 2.0.2 + karma-coverage: 2.0.3 karma-edge-launcher: 0.4.2_karma@5.1.1 karma-env-preprocessor: 0.1.1 karma-firefox-launcher: 1.3.0 @@ -8702,17 +9824,17 @@ packages: rollup: 1.32.1 rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-terser: 5.3.0_rollup@1.32.1 - rollup-plugin-visualizer: 4.0.4_rollup@1.32.1 - sinon: 9.0.2 + rollup-plugin-visualizer: 4.1.1_rollup@1.32.1 + sinon: 9.0.3 source-map-support: 0.5.19 - tslib: 2.0.0 - typescript: 3.9.6 + tslib: 2.0.1 + typescript: 3.9.7 util: 0.12.3 - uuid: 8.2.0 + uuid: 8.3.0 dev: false name: '@rush-temp/core-https' resolution: - integrity: sha512-305j81XiP0XeQSKj7yhfB9Y0QUl8qY1w9hnG4i40XPeEKQXo6GdrzyR6yYMo2J69W8bmJQfknfIFsOdCZ7Gewg== + integrity: sha512-tZXTdf7lHpP1SsLKNlvsT0thEH6lwPK8hmbr+xA7HKCFtrUSkEZSV4k0EWPNGJGyp8wDvem2XOQodnv5Do3SgA== tarball: 'file:projects/core-https.tgz' version: 0.0.0 'file:projects/core-lro.tgz': @@ -8721,13 +9843,13 @@ packages: '@opentelemetry/api': 0.10.2 '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 - '@rollup/plugin-node-resolve': 8.1.0_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 '@rollup/plugin-replace': 2.3.3_rollup@1.32.1 - '@types/chai': 4.2.11 + '@types/chai': 4.2.12 '@types/mocha': 7.0.2 - '@types/node': 8.10.61 - '@typescript-eslint/eslint-plugin': 2.34.0_3787943315ebc5ea524d5c102dc9e452 - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.6 + '@types/node': 8.10.62 + '@typescript-eslint/eslint-plugin': 2.34.0_5004700905763c91177aaa7d1d0d56ac + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.7 assert: 1.5.0 chai: 4.2.0 eslint: 6.8.0 @@ -8735,10 +9857,10 @@ packages: eslint-plugin-no-null: 1.0.2_eslint@6.8.0 eslint-plugin-no-only-tests: 2.4.0 eslint-plugin-promise: 4.2.1 - events: 3.1.0 + events: 3.2.0 karma: 5.1.1 karma-chrome-launcher: 3.1.0 - karma-coverage: 2.0.2 + karma-coverage: 2.0.3 karma-edge-launcher: 0.4.2_karma@5.1.1 karma-env-preprocessor: 0.1.1 karma-firefox-launcher: 1.3.0 @@ -8757,33 +9879,33 @@ packages: rollup-plugin-shim: 1.0.0 rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-terser: 5.3.0_rollup@1.32.1 - rollup-plugin-visualizer: 4.0.4_rollup@1.32.1 - ts-node: 8.10.2_typescript@3.9.6 - tslib: 2.0.0 - typescript: 3.9.6 - uglify-js: 3.10.0 + rollup-plugin-visualizer: 4.1.1_rollup@1.32.1 + ts-node: 8.10.2_typescript@3.9.7 + tslib: 2.0.1 + typescript: 3.9.7 + uglify-js: 3.10.2 dev: false name: '@rush-temp/core-lro' resolution: - integrity: sha512-+8UsoSpqb5GbTR2WiwmU+7ItC6ckyyLiKbq+AeQ2zxpi6GXg9FM7D5ciD4z9hJiVUBKDSKOWYF46FQedjP6qHw== + integrity: sha512-+3Pa0Cvs5BdZnsj+IJVnnvwsEjqVH2OMOFTYurioIbNfyhSHLgpm8i3DcDUA+iZO3MyR0Wat1P0hyA4FpHlzLg== tarball: 'file:projects/core-lro.tgz' version: 0.0.0 'file:projects/core-paging.tgz': dependencies: - '@types/node': 8.10.61 - '@typescript-eslint/eslint-plugin': 2.34.0_3787943315ebc5ea524d5c102dc9e452 - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.6 + '@types/node': 8.10.62 + '@typescript-eslint/eslint-plugin': 2.34.0_5004700905763c91177aaa7d1d0d56ac + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.7 eslint: 6.8.0 eslint-config-prettier: 6.11.0_eslint@6.8.0 eslint-plugin-no-null: 1.0.2_eslint@6.8.0 eslint-plugin-no-only-tests: 2.4.0 eslint-plugin-promise: 4.2.1 prettier: 1.19.1 - typescript: 3.9.6 + typescript: 3.9.7 dev: false name: '@rush-temp/core-paging' resolution: - integrity: sha512-jLeKpwyTeRLv1nD/QCwOzTvrQAceI3vZS3lGSxxR569SGdt4luWEKPxpql0GZ5jXLX8vg+t1dbnxeUcHikJWPw== + integrity: sha512-NpQK086LikEUqCs/nm5Mm123GnA0n9HGA8fnuzZxtTRSBtwPGpO1svnf8h76fyXFOsjn3R2/o6TOrRVBr9sPbQ== tarball: 'file:projects/core-paging.tgz' version: 0.0.0 'file:projects/core-tracing.tgz': @@ -8794,12 +9916,12 @@ packages: '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 '@rollup/plugin-json': 4.1.0_rollup@1.32.1 '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 - '@rollup/plugin-node-resolve': 8.1.0_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 '@rollup/plugin-replace': 2.3.3_rollup@1.32.1 '@types/mocha': 7.0.2 - '@types/node': 8.10.61 - '@typescript-eslint/eslint-plugin': 2.34.0_3787943315ebc5ea524d5c102dc9e452 - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.6 + '@types/node': 8.10.62 + '@typescript-eslint/eslint-plugin': 2.34.0_5004700905763c91177aaa7d1d0d56ac + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.7 assert: 1.5.0 cross-env: 7.0.2 eslint: 6.8.0 @@ -8815,14 +9937,14 @@ packages: rollup: 1.32.1 rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-terser: 5.3.0_rollup@1.32.1 - rollup-plugin-visualizer: 4.0.4_rollup@1.32.1 - tslib: 2.0.0 - typescript: 3.9.6 + rollup-plugin-visualizer: 4.1.1_rollup@1.32.1 + tslib: 2.0.1 + typescript: 3.9.7 util: 0.12.3 dev: false name: '@rush-temp/core-tracing' resolution: - integrity: sha512-4pg1Kg9cNBkMqsedTMJOVo2eemMUAQ9yr5Oh0D8xabf4tpihrAjQW8EkzOmAZEQ42KqVlkLjqlWBZzdSdBLuow== + integrity: sha512-oVTo1Y9QipLjugO55ByAQ8XLgI6wWl8OPS1XDax5r4GmR4VBwPEzNM7SS2a8pbvAeqDnr5h16v1SeMxpB5Vr8g== tarball: 'file:projects/core-tracing.tgz' version: 0.0.0 'file:projects/core-xml.tgz': @@ -8831,15 +9953,15 @@ packages: '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 '@rollup/plugin-json': 4.1.0_rollup@1.32.1 '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 - '@rollup/plugin-node-resolve': 8.1.0_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 '@rollup/plugin-replace': 2.3.3_rollup@1.32.1 - '@types/chai': 4.2.11 + '@types/chai': 4.2.12 '@types/mocha': 7.0.2 - '@types/node': 8.10.61 - '@types/sinon': 9.0.4 + '@types/node': 8.10.62 + '@types/sinon': 9.0.5 '@types/xml2js': 0.4.5 - '@typescript-eslint/eslint-plugin': 2.34.0_3787943315ebc5ea524d5c102dc9e452 - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.6 + '@typescript-eslint/eslint-plugin': 2.34.0_5004700905763c91177aaa7d1d0d56ac + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.7 chai: 4.2.0 cross-env: 7.0.2 downlevel-dts: 0.4.0 @@ -8851,7 +9973,7 @@ packages: inherits: 2.0.4 karma: 5.1.1 karma-chrome-launcher: 3.1.0 - karma-coverage: 2.0.2 + karma-coverage: 2.0.3 karma-edge-launcher: 0.4.2_karma@5.1.1 karma-env-preprocessor: 0.1.1 karma-firefox-launcher: 1.3.0 @@ -8867,16 +9989,16 @@ packages: rollup: 1.32.1 rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-terser: 5.3.0_rollup@1.32.1 - rollup-plugin-visualizer: 4.0.4_rollup@1.32.1 - sinon: 9.0.2 - tslib: 2.0.0 - typescript: 3.9.6 + rollup-plugin-visualizer: 4.1.1_rollup@1.32.1 + sinon: 9.0.3 + tslib: 2.0.1 + typescript: 3.9.7 util: 0.12.3 xml2js: 0.4.23 dev: false name: '@rush-temp/core-xml' resolution: - integrity: sha512-ailMjJ1lg/5smpH1qPSW4wXRSCofLz95inLHbp1lGaZ1K44jmJM4m0lGVgOMfLFtzCae8uLFJGG5Us8SoITlLg== + integrity: sha512-VPKz+0t+SMBAPupKiPl15CsjeEHzsBMey7tdKzR53G5P/ZMgYxrPp9wdB1OeTmFfUH/yw4djDBw0gExgD97+Kg== tarball: 'file:projects/core-xml.tgz' version: 0.0.0 'file:projects/cosmos.tgz': @@ -8887,17 +10009,17 @@ packages: '@types/debug': 4.1.5 '@types/fast-json-stable-stringify': 2.0.0 '@types/mocha': 7.0.2 - '@types/node': 8.10.61 + '@types/node': 8.10.62 '@types/node-fetch': 2.5.7 '@types/priorityqueuejs': 1.0.1 '@types/semaphore': 1.1.0 - '@types/sinon': 9.0.4 + '@types/sinon': 9.0.5 '@types/tunnel': 0.0.1 - '@types/underscore': 1.10.5 - '@types/uuid': 8.0.0 - '@typescript-eslint/eslint-plugin': 2.34.0_3787943315ebc5ea524d5c102dc9e452 - '@typescript-eslint/eslint-plugin-tslint': 2.34.0_f8f62cb1f34b48259c049dd0f60912e9 - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.6 + '@types/underscore': 1.10.22 + '@types/uuid': 8.3.0 + '@typescript-eslint/eslint-plugin': 2.34.0_5004700905763c91177aaa7d1d0d56ac + '@typescript-eslint/eslint-plugin-tslint': 2.34.0_8ecfbc9f33e253d01ca741854a1cb01c + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.7 cross-env: 7.0.2 debug: 4.1.1 dotenv: 8.2.0 @@ -8924,20 +10046,21 @@ packages: rollup: 1.32.1 rollup-plugin-local-resolve: 1.0.7 semaphore: 1.1.0 - sinon: 9.0.2 + sinon: 9.0.3 snap-shot-it: 7.9.3 source-map-support: 0.5.19 - ts-node: 8.10.2_typescript@3.9.6 - tslib: 2.0.0 - tslint: 5.20.1_typescript@3.9.6 + ts-node: 8.10.2_typescript@3.9.7 + tslib: 2.0.1 + tslint: 5.20.1_typescript@3.9.7 tslint-config-prettier: 1.18.0 typedoc: 0.15.8 - typescript: 3.9.6 - uuid: 8.2.0 + typescript: 3.9.7 + universal-user-agent: 6.0.0 + uuid: 8.3.0 dev: false name: '@rush-temp/cosmos' resolution: - integrity: sha512-lpTdhiEWZ/QNiArY5mrQLIdd/KjmBl/Xn71juX1PtSQ5cziny1tfnRIcSjyLUq3aTlPAYhs9XjI6ixFrknYVOA== + integrity: sha512-H/M38LRjnxQf/cFlWghr4JMuN/sftRSDf3Jis2bWbwqyvjIGir6YbL07NFtu6zev+IS6DiYAu/WhKdCAO/Pwpg== tarball: 'file:projects/cosmos.tgz' version: 0.0.0 'file:projects/data-tables.tgz': @@ -8949,13 +10072,14 @@ packages: '@rollup/plugin-inject': 4.0.2_rollup@1.32.1 '@rollup/plugin-json': 4.1.0_rollup@1.32.1 '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 - '@rollup/plugin-node-resolve': 8.1.0_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 '@rollup/plugin-replace': 2.3.3_rollup@1.32.1 - '@types/chai': 4.2.11 + '@types/chai': 4.2.12 '@types/mocha': 7.0.2 - '@types/node': 8.10.61 - '@typescript-eslint/eslint-plugin': 2.34.0_3787943315ebc5ea524d5c102dc9e452 - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.6 + '@types/node': 8.10.62 + '@types/sinon': 9.0.5 + '@typescript-eslint/eslint-plugin': 2.34.0_5004700905763c91177aaa7d1d0d56ac + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.7 chai: 4.2.0 cross-env: 7.0.2 dotenv: 8.2.0 @@ -8968,7 +10092,7 @@ packages: inherits: 2.0.4 karma: 5.1.1 karma-chrome-launcher: 3.1.0 - karma-coverage: 2.0.2 + karma-coverage: 2.0.3 karma-edge-launcher: 0.4.2_karma@5.1.1 karma-env-preprocessor: 0.1.1 karma-firefox-launcher: 1.3.0 @@ -8985,28 +10109,38 @@ packages: rollup-plugin-shim: 1.0.0 rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-terser: 5.3.0_rollup@1.32.1 - rollup-plugin-visualizer: 4.0.4_rollup@1.32.1 - tslib: 2.0.0 - typescript: 3.9.6 + rollup-plugin-visualizer: 4.1.1_rollup@1.32.1 + sinon: 9.0.3 + tslib: 2.0.1 + typescript: 3.9.7 util: 0.12.3 dev: false name: '@rush-temp/data-tables' resolution: - integrity: sha512-GRiOgEupabCZemjZqdWhL3JXLoK8191/yPwsjlAZxJ9T3zGwdzmUaciZCKUzW6ElMyKyabVPqtw8GQqje9E2Rg== + integrity: sha512-UMKcEozzNrbbeUY6uEaf46fqDGGbsunONMl4Kt6yGU2IemQuxtRUleQtGbFPoLEm2mX+hrVXxxtgvlivduga4Q== tarball: 'file:projects/data-tables.tgz' version: 0.0.0 'file:projects/dev-tool.tgz': dependencies: - '@types/chai': 4.2.11 + '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 + '@rollup/plugin-json': 4.1.0_rollup@1.32.1 + '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 + '@rollup/plugin-replace': 2.3.3_rollup@1.32.1 + '@types/chai': 4.2.12 '@types/chai-as-promised': 7.1.3 '@types/chalk': 2.2.0 '@types/fs-extra': 8.1.1 '@types/minimist': 1.2.0 '@types/mocha': 7.0.2 - '@types/node': 8.10.61 + '@types/node': 8.10.62 '@types/prettier': 2.0.2 - '@typescript-eslint/eslint-plugin': 2.34.0_3787943315ebc5ea524d5c102dc9e452 - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.6 + '@types/rollup-plugin-node-builtins': 2.1.1 + '@types/rollup-plugin-node-globals': 1.4.0 + '@types/rollup-plugin-sourcemaps': 0.4.2 + '@typescript-eslint/eslint-plugin': 2.34.0_5004700905763c91177aaa7d1d0d56ac + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.7 + builtin-modules: 3.1.0 chai: 4.2.0 chai-as-promised: 7.1.1_chai@4.2.0 chalk: 3.0.0 @@ -9016,42 +10150,44 @@ packages: mocha: 7.2.0 prettier: 1.19.1 rimraf: 3.0.2 - ts-node: 8.10.2_typescript@3.9.6 - typescript: 3.9.6 + rollup: 1.32.1 + rollup-plugin-node-builtins: 2.1.2 + rollup-plugin-node-globals: 1.4.0 + rollup-plugin-shim: 1.0.0 + rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 + rollup-plugin-terser: 5.3.0_rollup@1.32.1 + rollup-plugin-visualizer: 4.1.1_rollup@1.32.1 + ts-node: 8.10.2_typescript@3.9.7 + typescript: 3.9.7 dev: false name: '@rush-temp/dev-tool' resolution: - integrity: sha512-5TXnGsXxkseKtD1Uu/f8Ua++Np5VFavRs7Hl4IfMbFGBrbWPxXGJJLs/CJLljI71Q9Dqc5YmxoFbtY3agUTrNQ== + integrity: sha512-ciciEM+oL304KwFyiYKOYiw/e1tXhpeEAX6kak4fz9dpljOLyqw7zfem3rbVQxbt44hw5zyt700KUp5tqsv73Q== tarball: 'file:projects/dev-tool.tgz' version: 0.0.0 - 'file:projects/digital-twins.tgz': + 'file:projects/digital-twins-core.tgz': dependencies: + '@azure/core-tracing': 1.0.0-preview.9 '@azure/identity': 1.1.0 '@microsoft/api-extractor': 7.7.11 '@opentelemetry/api': 0.10.2 '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 '@rollup/plugin-json': 4.1.0_rollup@1.32.1 '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 - '@rollup/plugin-node-resolve': 8.1.0_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 '@rollup/plugin-replace': 2.3.3_rollup@1.32.1 - '@types/chai': 4.2.11 + '@types/chai': 4.2.12 '@types/mocha': 7.0.2 - '@types/node': 8.10.61 - '@types/sinon': 9.0.4 - '@typescript-eslint/eslint-plugin': 2.34.0_3787943315ebc5ea524d5c102dc9e452 - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.6 + '@types/node': 8.10.62 + '@types/sinon': 9.0.5 chai: 4.2.0 cross-env: 7.0.2 dotenv: 8.2.0 eslint: 6.8.0 - eslint-config-prettier: 6.11.0_eslint@6.8.0 - eslint-plugin-no-null: 1.0.2_eslint@6.8.0 - eslint-plugin-no-only-tests: 2.4.0 - eslint-plugin-promise: 4.2.1 inherits: 2.0.4 karma: 5.1.1 karma-chrome-launcher: 3.1.0 - karma-coverage: 2.0.2 + karma-coverage: 2.0.3 karma-edge-launcher: 0.4.2_karma@5.1.1 karma-env-preprocessor: 0.1.1 karma-firefox-launcher: 1.3.0 @@ -9071,30 +10207,30 @@ packages: rollup-plugin-shim: 1.0.0 rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-terser: 5.3.0_rollup@1.32.1 - rollup-plugin-visualizer: 4.0.4_rollup@1.32.1 - sinon: 9.0.2 - tslib: 2.0.0 - typescript: 3.9.6 + rollup-plugin-visualizer: 4.1.1_rollup@1.32.1 + sinon: 9.0.3 + tslib: 2.0.1 + typescript: 3.9.7 util: 0.12.3 dev: false - name: '@rush-temp/digital-twins' + name: '@rush-temp/digital-twins-core' resolution: - integrity: sha512-Q6AUOkcVcOS26RJl5SFbtwVqfrhVwWmxjpmn3AyuTKWBaJBXOoUKEdBz0X2farUjaioQE5p1cTZS+1M6zpm6RQ== - tarball: 'file:projects/digital-twins.tgz' + integrity: sha512-XD/6kUVKso0pFhmaqLaprwLEOFFS6T7rFoeeXG6RCRmi8/zL2+hKxjWawK2AoY4wuBx/xZs+OaZfjm39OtWkBA== + tarball: 'file:projects/digital-twins-core.tgz' version: 0.0.0 'file:projects/eslint-plugin-azure-sdk.tgz': dependencies: '@types/bluebird': 3.5.32 - '@types/chai': 4.2.11 + '@types/chai': 4.2.12 '@types/eslint': 4.16.8 '@types/estree': 0.0.39 '@types/glob': 7.1.3 '@types/mocha': 7.0.2 - '@types/node': 8.10.61 - '@typescript-eslint/eslint-plugin': 2.34.0_3787943315ebc5ea524d5c102dc9e452 - '@typescript-eslint/experimental-utils': 2.34.0_eslint@6.8.0+typescript@3.9.6 - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.6 - '@typescript-eslint/typescript-estree': 2.34.0_typescript@3.9.6 + '@types/node': 8.10.62 + '@typescript-eslint/eslint-plugin': 2.34.0_5004700905763c91177aaa7d1d0d56ac + '@typescript-eslint/experimental-utils': 2.34.0_eslint@6.8.0+typescript@3.9.7 + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.7 + '@typescript-eslint/typescript-estree': 2.34.0_typescript@3.9.7 bluebird: 3.7.2 chai: 4.2.0 eslint: 6.8.0 @@ -9107,8 +10243,8 @@ packages: prettier: 1.19.1 rimraf: 3.0.2 source-map-support: 0.5.19 - tslib: 2.0.0 - typescript: 3.9.6 + tslib: 2.0.1 + typescript: 3.9.7 dev: false name: '@rush-temp/eslint-plugin-azure-sdk' resolution: @@ -9117,6 +10253,7 @@ packages: version: 0.0.0 'file:projects/event-hubs.tgz': dependencies: + '@azure/core-amqp': 2.0.0-beta.1 '@azure/core-tracing': 1.0.0-preview.9 '@azure/identity': 1.1.0 '@microsoft/api-extractor': 7.7.11 @@ -9125,21 +10262,21 @@ packages: '@rollup/plugin-inject': 4.0.2_rollup@1.32.1 '@rollup/plugin-json': 4.1.0_rollup@1.32.1 '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 - '@rollup/plugin-node-resolve': 8.1.0_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 '@rollup/plugin-replace': 2.3.3_rollup@1.32.1 '@types/async-lock': 1.1.2 - '@types/chai': 4.2.11 + '@types/chai': 4.2.12 '@types/chai-as-promised': 7.1.3 '@types/chai-string': 1.4.2 '@types/debug': 4.1.5 '@types/long': 4.0.1 '@types/mocha': 7.0.2 - '@types/node': 8.10.61 - '@types/sinon': 9.0.4 - '@types/uuid': 8.0.0 + '@types/node': 8.10.62 + '@types/sinon': 9.0.5 + '@types/uuid': 8.3.0 '@types/ws': 7.2.6 - '@typescript-eslint/eslint-plugin': 2.34.0_3787943315ebc5ea524d5c102dc9e452 - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.6 + '@typescript-eslint/eslint-plugin': 2.34.0_5004700905763c91177aaa7d1d0d56ac + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.7 assert: 1.5.0 buffer: 5.6.0 chai: 4.2.0 @@ -9155,9 +10292,11 @@ packages: eslint-plugin-no-only-tests: 2.4.0 eslint-plugin-promise: 4.2.1 esm: 3.2.25 + is-buffer: 2.0.4 + jssha: 3.1.2 karma: 5.1.1 karma-chrome-launcher: 3.1.0 - karma-coverage: 2.0.2 + karma-coverage: 2.0.3 karma-edge-launcher: 0.4.2_karma@5.1.1 karma-env-preprocessor: 0.1.1 karma-firefox-launcher: 1.3.0 @@ -9178,16 +10317,16 @@ packages: rollup-plugin-shim: 1.0.0 rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-terser: 5.3.0_rollup@1.32.1 - sinon: 9.0.2 - ts-node: 8.10.2_typescript@3.9.6 - tslib: 2.0.0 - typescript: 3.9.6 - uuid: 8.2.0 + sinon: 9.0.3 + ts-node: 8.10.2_typescript@3.9.7 + tslib: 2.0.1 + typescript: 3.9.7 + uuid: 8.3.0 ws: 7.3.1 dev: false name: '@rush-temp/event-hubs' resolution: - integrity: sha512-jY4Yvmtu9YSd6dLPezEwmEtggvxAS/MvarrynifBWCjF4SoWmZvc1O2EZdZYTxdYjysYn8I4O3RkaFEnSwNu4w== + integrity: sha512-ULvDOj0ReZbE5TXzESvryoDyHGbatat+qiW4fnfMvLPdvpSvuWBg4GmOIgj8kkzPkV4HoJmUE3BTSoANzGRSXA== tarball: 'file:projects/event-hubs.tgz' version: 0.0.0 'file:projects/event-processor-host.tgz': @@ -9198,19 +10337,19 @@ packages: '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 '@rollup/plugin-json': 4.1.0_rollup@1.32.1 '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 - '@rollup/plugin-node-resolve': 8.1.0_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 '@rollup/plugin-replace': 2.3.3_rollup@1.32.1 '@types/async-lock': 1.1.2 - '@types/chai': 4.2.11 + '@types/chai': 4.2.12 '@types/chai-as-promised': 7.1.3 '@types/chai-string': 1.4.2 '@types/debug': 4.1.5 '@types/mocha': 7.0.2 - '@types/node': 8.10.61 - '@types/uuid': 8.0.0 + '@types/node': 8.10.62 + '@types/uuid': 8.3.0 '@types/ws': 7.2.6 - '@typescript-eslint/eslint-plugin': 2.34.0_3787943315ebc5ea524d5c102dc9e452 - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.6 + '@typescript-eslint/eslint-plugin': 2.34.0_5004700905763c91177aaa7d1d0d56ac + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.7 async-lock: 1.2.4 azure-storage: 2.10.3 chai: 4.2.0 @@ -9235,15 +10374,15 @@ packages: rollup: 1.32.1 rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-uglify: 6.0.4_rollup@1.32.1 - ts-node: 8.10.2_typescript@3.9.6 - tslib: 2.0.0 - typescript: 3.9.6 - uuid: 8.2.0 + ts-node: 8.10.2_typescript@3.9.7 + tslib: 2.0.1 + typescript: 3.9.7 + uuid: 8.3.0 ws: 7.3.1 dev: false name: '@rush-temp/event-processor-host' resolution: - integrity: sha512-QytC/CjcRtJZwlPxvYKLJ91gtaNaw860njdrpQZv0Ka1ZHwZzMkFaJPV15kGYqYrwZSz4IcBaRec90e8fccqOw== + integrity: sha512-5q9OjZ4GQp/BWc/Qm581a7dwZG153HakFDaxUVuudMac7nKhYvwwBbv6whNYPuJp6IHCloR3UvO69lyPnLb9uw== tarball: 'file:projects/event-processor-host.tgz' version: 0.0.0 'file:projects/eventgrid.tgz': @@ -9254,16 +10393,16 @@ packages: '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 '@rollup/plugin-json': 4.1.0_rollup@1.32.1 '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 - '@rollup/plugin-node-resolve': 8.1.0_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 '@rollup/plugin-replace': 2.3.3_rollup@1.32.1 - '@types/chai': 4.2.11 + '@types/chai': 4.2.12 '@types/chai-as-promised': 7.1.3 '@types/mocha': 7.0.2 - '@types/node': 8.10.61 - '@types/sinon': 9.0.4 - '@types/uuid': 8.0.0 - '@typescript-eslint/eslint-plugin': 2.34.0_3787943315ebc5ea524d5c102dc9e452 - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.6 + '@types/node': 8.10.62 + '@types/sinon': 9.0.5 + '@types/uuid': 8.3.0 + '@typescript-eslint/eslint-plugin': 2.34.0_5004700905763c91177aaa7d1d0d56ac + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.7 chai: 4.2.0 chai-as-promised: 7.1.1_chai@4.2.0 cross-env: 7.0.2 @@ -9275,7 +10414,7 @@ packages: eslint-plugin-promise: 4.2.1 karma: 5.1.1 karma-chrome-launcher: 3.1.0 - karma-coverage: 2.0.2 + karma-coverage: 2.0.3 karma-edge-launcher: 0.4.2_karma@5.1.1 karma-env-preprocessor: 0.1.1 karma-firefox-launcher: 1.3.0 @@ -9295,16 +10434,16 @@ packages: rollup-plugin-shim: 1.0.0 rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-terser: 5.3.0_rollup@1.32.1 - rollup-plugin-visualizer: 4.0.4_rollup@1.32.1 - sinon: 9.0.2 + rollup-plugin-visualizer: 4.1.1_rollup@1.32.1 + sinon: 9.0.3 source-map-support: 0.5.19 - ts-node: 8.10.2_typescript@3.9.6 - tslib: 2.0.0 - typescript: 3.9.6 + ts-node: 8.10.2_typescript@3.9.7 + tslib: 2.0.1 + typescript: 3.9.7 dev: false name: '@rush-temp/eventgrid' resolution: - integrity: sha512-JneUDGxCKVc2OBMRQ2oIOHtmnt6clWBwZBmG3eJlAzk+PkSNVr87URfrJJy3nkU28+TUkK3xHnHyU/bmys6nXw== + integrity: sha512-y6YNn5sMKn1xsmZ3nyOnLw1oMVJD52z6aLyc+WeqSElWflH5ga1/hQq/CWQXK52zbZW88NfIJnl7wYnGWkpxyA== tarball: 'file:projects/eventgrid.tgz' version: 0.0.0 'file:projects/eventhubs-checkpointstore-blob.tgz': @@ -9315,16 +10454,16 @@ packages: '@rollup/plugin-inject': 4.0.2_rollup@1.32.1 '@rollup/plugin-json': 4.1.0_rollup@1.32.1 '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 - '@rollup/plugin-node-resolve': 8.1.0_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 '@rollup/plugin-replace': 2.3.3_rollup@1.32.1 - '@types/chai': 4.2.11 + '@types/chai': 4.2.12 '@types/chai-as-promised': 7.1.3 '@types/chai-string': 1.4.2 '@types/debug': 4.1.5 '@types/mocha': 7.0.2 - '@types/node': 8.10.61 - '@typescript-eslint/eslint-plugin': 2.34.0_3787943315ebc5ea524d5c102dc9e452 - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.6 + '@types/node': 8.10.62 + '@typescript-eslint/eslint-plugin': 2.34.0_5004700905763c91177aaa7d1d0d56ac + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.7 assert: 1.5.0 chai: 4.2.0 chai-as-promised: 7.1.1_chai@4.2.0 @@ -9338,12 +10477,12 @@ packages: eslint-plugin-no-only-tests: 2.4.0 eslint-plugin-promise: 4.2.1 esm: 3.2.25 - events: 3.1.0 + events: 3.2.0 guid-typescript: 1.0.9 inherits: 2.0.4 karma: 5.1.1 karma-chrome-launcher: 3.1.0 - karma-coverage: 2.0.2 + karma-coverage: 2.0.3 karma-edge-launcher: 0.4.2_karma@5.1.1 karma-env-preprocessor: 0.1.1 karma-firefox-launcher: 1.3.0 @@ -9361,58 +10500,60 @@ packages: rollup-plugin-shim: 1.0.0 rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-terser: 5.3.0_rollup@1.32.1 - rollup-plugin-visualizer: 4.0.4_rollup@1.32.1 - ts-node: 8.10.2_typescript@3.9.6 - tslib: 2.0.0 - typescript: 3.9.6 + rollup-plugin-visualizer: 4.1.1_rollup@1.32.1 + ts-node: 8.10.2_typescript@3.9.7 + tslib: 2.0.1 + typescript: 3.9.7 util: 0.12.3 dev: false name: '@rush-temp/eventhubs-checkpointstore-blob' resolution: - integrity: sha512-w5AuQEI72MPTBOJE5PkBcl3R/unve12sfjW2aFjQQYtWxP/d8hXO7iL0Yptk4mmcauIDVHchSNIO5rTeebcMyg== + integrity: sha512-zKXMbZZ/qO6r/TdAW8dNOmT9jU/cxROlE2uqTzTJ7ydgx7Ii5SHLfYVLVal6rpk/xEhgrTfhLQ8kCeOhhVBWPw== tarball: 'file:projects/eventhubs-checkpointstore-blob.tgz' version: 0.0.0 'file:projects/identity.tgz': dependencies: '@azure/core-tracing': 1.0.0-preview.9 - '@azure/msal-node': 1.0.0-alpha.5 + '@azure/msal-common': 1.4.0 + '@azure/msal-node': 1.0.0-alpha.13 '@microsoft/api-extractor': 7.7.11 '@opentelemetry/api': 0.10.2 '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 '@rollup/plugin-json': 4.1.0_rollup@1.32.1 '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 - '@rollup/plugin-node-resolve': 8.1.0_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 '@rollup/plugin-replace': 2.3.3_rollup@1.32.1 '@types/express': 4.17.7 '@types/jws': 3.2.2 '@types/mocha': 7.0.2 - '@types/node': 8.10.61 - '@types/qs': 6.9.3 - '@types/sinon': 9.0.4 - '@types/uuid': 8.0.0 - '@typescript-eslint/eslint-plugin': 2.34.0_3787943315ebc5ea524d5c102dc9e452 - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.6 + '@types/node': 8.10.62 + '@types/qs': 6.9.4 + '@types/sinon': 9.0.5 + '@types/uuid': 8.3.0 + '@typescript-eslint/eslint-plugin': 2.34.0_5004700905763c91177aaa7d1d0d56ac + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.7 assert: 1.5.0 - axios: 0.19.2 + axios: 0.20.0 cross-env: 7.0.2 eslint: 6.8.0 - events: 3.1.0 + events: 3.2.0 express: 4.17.1 + fs-mock: 1.2.1 inherits: 2.0.4 jws: 4.0.0 karma: 5.1.1 karma-chrome-launcher: 3.1.0 - karma-coverage: 2.0.2 + karma-coverage: 2.0.3 karma-env-preprocessor: 0.1.1 karma-junit-reporter: 2.0.1_karma@5.1.1 karma-mocha: 2.0.1 karma-mocha-reporter: 2.2.5_karma@5.1.1 karma-remap-istanbul: 0.6.0_karma@5.1.1 - keytar: 5.6.0 mocha: 7.2.0 mocha-junit-reporter: 1.23.3_mocha@7.2.0 - msal: 1.3.2 - open: 7.0.4 + mock-fs: 4.13.0 + msal: 1.4.0 + open: 7.2.1 prettier: 1.19.1 puppeteer: 3.3.0 qs: 6.9.4 @@ -9420,54 +10561,81 @@ packages: rollup: 1.32.1 rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-terser: 5.3.0_rollup@1.32.1 - rollup-plugin-visualizer: 4.0.4_rollup@1.32.1 - sinon: 9.0.2 - tslib: 2.0.0 - typescript: 3.9.6 + rollup-plugin-visualizer: 4.1.1_rollup@1.32.1 + sinon: 9.0.3 + tslib: 2.0.1 + typescript: 3.9.7 util: 0.12.3 - uuid: 8.2.0 + uuid: 8.3.0 dev: false name: '@rush-temp/identity' optionalDependencies: keytar: 5.6.0 resolution: - integrity: sha512-p2S2EGVa4KNgoTYoBYBKogF8arkQ843Rybs+dy6lLxootEKXWKE3N5q0gRP5FXuXvigpQKt3IE1jVqx3UuddoQ== + integrity: sha512-gseNXUeda2sUuauEvkd4xVPlQXbvk3j3ZJTi6FWfC/RgSC3Nw2j26xdxV3lQqTTwipmrOJonnwbQvkvP91nbkQ== tarball: 'file:projects/identity.tgz' version: 0.0.0 'file:projects/keyvault-admin.tgz': dependencies: '@azure/core-tracing': 1.0.0-preview.9 + '@azure/identity': 1.1.0 '@microsoft/api-extractor': 7.7.11 '@opentelemetry/api': 0.10.2 '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 '@rollup/plugin-json': 4.1.0_rollup@1.32.1 '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 - '@rollup/plugin-node-resolve': 8.1.0_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 '@rollup/plugin-replace': 2.3.3_rollup@1.32.1 - '@types/node': 8.10.61 - '@typescript-eslint/eslint-plugin': 2.34.0_3787943315ebc5ea524d5c102dc9e452 - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.6 + '@types/chai': 4.2.12 + '@types/fs-extra': 8.1.1 + '@types/mocha': 7.0.2 + '@types/node': 8.10.62 + '@types/sinon': 9.0.5 + '@types/uuid': 8.3.0 + '@typescript-eslint/eslint-plugin': 2.34.0_5004700905763c91177aaa7d1d0d56ac + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.7 + assert: 1.5.0 + chai: 4.2.0 cross-env: 7.0.2 + dotenv: 8.2.0 eslint: 6.8.0 eslint-config-prettier: 6.11.0_eslint@6.8.0 eslint-plugin-no-null: 1.0.2_eslint@6.8.0 eslint-plugin-no-only-tests: 2.4.0 eslint-plugin-promise: 4.2.1 esm: 3.2.25 + karma: 5.1.1 + karma-chrome-launcher: 3.1.0 + karma-coverage: 2.0.3 + karma-edge-launcher: 0.4.2_karma@5.1.1 + karma-env-preprocessor: 0.1.1 + karma-firefox-launcher: 1.3.0 + karma-ie-launcher: 1.0.0_karma@5.1.1 + karma-json-preprocessor: 0.3.3_karma@5.1.1 + karma-json-to-file-reporter: 1.0.1 + karma-junit-reporter: 2.0.1_karma@5.1.1 + karma-mocha: 2.0.1 + karma-mocha-reporter: 2.2.5_karma@5.1.1 + karma-remap-istanbul: 0.6.0_karma@5.1.1 + mocha: 7.2.0 + mocha-junit-reporter: 1.23.3_mocha@7.2.0 + nyc: 14.1.1 prettier: 1.19.1 rimraf: 3.0.2 rollup: 1.32.1 rollup-plugin-shim: 1.0.0 rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-terser: 5.3.0_rollup@1.32.1 - rollup-plugin-visualizer: 4.0.4_rollup@1.32.1 + rollup-plugin-visualizer: 4.1.1_rollup@1.32.1 + sinon: 9.0.3 source-map-support: 0.5.19 - tslib: 2.0.0 - typescript: 3.9.6 + tslib: 2.0.1 + typescript: 3.9.7 + uuid: 8.3.0 dev: false name: '@rush-temp/keyvault-admin' resolution: - integrity: sha512-eJjxCTqMLb7tC0iSwnDg/sXQpv/89fgdgtuMTfFMnx7nM+30n/L8qTwXhBQs87UucOKDQI3qSw8DD74fs7xGvg== + integrity: sha512-zlghZSc7DbMyVwjv4Z5aT2ZXVp6PqMW/+Eg2WoStevLDkIkWEL3+XYQjv6R3qRJioCsMOXeC5oZ0AbdNVXssjA== tarball: 'file:projects/keyvault-admin.tgz' version: 0.0.0 'file:projects/keyvault-certificates.tgz': @@ -9479,16 +10647,16 @@ packages: '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 '@rollup/plugin-json': 4.1.0_rollup@1.32.1 '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 - '@rollup/plugin-node-resolve': 8.1.0_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 '@rollup/plugin-replace': 2.3.3_rollup@1.32.1 - '@types/chai': 4.2.11 + '@types/chai': 4.2.12 '@types/fs-extra': 8.1.1 '@types/mocha': 7.0.2 - '@types/node': 8.10.61 + '@types/node': 8.10.62 '@types/query-string': 6.2.0 - '@types/sinon': 9.0.4 - '@typescript-eslint/eslint-plugin': 2.34.0_3787943315ebc5ea524d5c102dc9e452 - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.6 + '@types/sinon': 9.0.5 + '@typescript-eslint/eslint-plugin': 2.34.0_5004700905763c91177aaa7d1d0d56ac + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.7 assert: 1.5.0 chai: 4.2.0 cross-env: 7.0.2 @@ -9502,7 +10670,7 @@ packages: fs-extra: 8.1.0 karma: 5.1.1 karma-chrome-launcher: 3.1.0 - karma-coverage: 2.0.2 + karma-coverage: 2.0.3 karma-edge-launcher: 0.4.2_karma@5.1.1 karma-env-preprocessor: 0.1.1 karma-firefox-launcher: 1.3.0 @@ -9524,26 +10692,28 @@ packages: rollup-plugin-shim: 1.0.0 rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-terser: 5.3.0_rollup@1.32.1 - rollup-plugin-visualizer: 4.0.4_rollup@1.32.1 - sinon: 9.0.2 + rollup-plugin-visualizer: 4.1.1_rollup@1.32.1 + sinon: 9.0.3 source-map-support: 0.5.19 - tslib: 2.0.0 - typescript: 3.9.6 + tslib: 2.0.1 + typescript: 3.9.7 url: 0.11.0 dev: false name: '@rush-temp/keyvault-certificates' resolution: - integrity: sha512-+a86qI+0rcf+xiFjB3H4JH6htEoBP+JJvVNmoNtfcLRh4F//9PBzFxOoS0NKutNsdw6Qexlv9lF0zJhj2E9uAA== + integrity: sha512-VUN+2FwAABk8mJ6VEsrqLPtID7DUhz9LYuJTwaOmnGwttoSVb2FfAtF63kz9mgODd0kAngw4giRKWKwp58Bbsw== tarball: 'file:projects/keyvault-certificates.tgz' version: 0.0.0 'file:projects/keyvault-common.tgz': dependencies: - tslib: 2.0.0 - typescript: 3.9.6 + eslint: 6.8.0 + prettier: 1.19.1 + tslib: 2.0.1 + typescript: 3.9.7 dev: false name: '@rush-temp/keyvault-common' resolution: - integrity: sha512-cCbZ1kryFHZNYwGfQj2bRfG6vvwVlPXFWU12cKfc1Xps5KYGcPfIKTbZsOfbMw8SCM/FcLnImZeideZQ3lxXPA== + integrity: sha512-DGPal/bSDCu4fAB45/L4izqSISz+z06LDPNEs0NDFEmPfMfo5K2r1D7gSwxy9q1VBDAXk7FdrBFop6pLol0PrQ== tarball: 'file:projects/keyvault-common.tgz' version: 0.0.0 'file:projects/keyvault-keys.tgz': @@ -9555,16 +10725,16 @@ packages: '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 '@rollup/plugin-json': 4.1.0_rollup@1.32.1 '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 - '@rollup/plugin-node-resolve': 8.1.0_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 '@rollup/plugin-replace': 2.3.3_rollup@1.32.1 - '@types/chai': 4.2.11 + '@types/chai': 4.2.12 '@types/fs-extra': 8.1.1 '@types/mocha': 7.0.2 - '@types/node': 8.10.61 + '@types/node': 8.10.62 '@types/query-string': 6.2.0 - '@types/sinon': 9.0.4 - '@typescript-eslint/eslint-plugin': 2.34.0_3787943315ebc5ea524d5c102dc9e452 - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.6 + '@types/sinon': 9.0.5 + '@typescript-eslint/eslint-plugin': 2.34.0_5004700905763c91177aaa7d1d0d56ac + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.7 assert: 1.5.0 chai: 4.2.0 cross-env: 7.0.2 @@ -9578,7 +10748,7 @@ packages: fs-extra: 8.1.0 karma: 5.1.1 karma-chrome-launcher: 3.1.0 - karma-coverage: 2.0.2 + karma-coverage: 2.0.3 karma-edge-launcher: 0.4.2_karma@5.1.1 karma-env-preprocessor: 0.1.1 karma-firefox-launcher: 1.3.0 @@ -9600,16 +10770,16 @@ packages: rollup-plugin-shim: 1.0.0 rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-terser: 5.3.0_rollup@1.32.1 - rollup-plugin-visualizer: 4.0.4_rollup@1.32.1 - sinon: 9.0.2 + rollup-plugin-visualizer: 4.1.1_rollup@1.32.1 + sinon: 9.0.3 source-map-support: 0.5.19 - tslib: 2.0.0 - typescript: 3.9.6 + tslib: 2.0.1 + typescript: 3.9.7 url: 0.11.0 dev: false name: '@rush-temp/keyvault-keys' resolution: - integrity: sha512-W4iVFbYVGW+2c/7IIw4D2O0qqRq7BaHKjmsNAxVJi1PSjoxFofSzOfEk/7QSKtnPW8PBwhEaWvjPDq/+5+QeyA== + integrity: sha512-Na+m4N9KIMQN764GcMVCg8eFyCLezBxc7J6X1g0/Oxd+i9E4Wnr0cVbXhH36QmaxdSNR4JbgeP2wE/Swxio8NQ== tarball: 'file:projects/keyvault-keys.tgz' version: 0.0.0 'file:projects/keyvault-secrets.tgz': @@ -9621,16 +10791,16 @@ packages: '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 '@rollup/plugin-json': 4.1.0_rollup@1.32.1 '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 - '@rollup/plugin-node-resolve': 8.1.0_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 '@rollup/plugin-replace': 2.3.3_rollup@1.32.1 - '@types/chai': 4.2.11 + '@types/chai': 4.2.12 '@types/fs-extra': 8.1.1 '@types/mocha': 7.0.2 - '@types/node': 8.10.61 + '@types/node': 8.10.62 '@types/query-string': 6.2.0 - '@types/sinon': 9.0.4 - '@typescript-eslint/eslint-plugin': 2.34.0_3787943315ebc5ea524d5c102dc9e452 - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.6 + '@types/sinon': 9.0.5 + '@typescript-eslint/eslint-plugin': 2.34.0_5004700905763c91177aaa7d1d0d56ac + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.7 assert: 1.5.0 chai: 4.2.0 cross-env: 7.0.2 @@ -9644,7 +10814,7 @@ packages: fs-extra: 8.1.0 karma: 5.1.1 karma-chrome-launcher: 3.1.0 - karma-coverage: 2.0.2 + karma-coverage: 2.0.3 karma-edge-launcher: 0.4.2_karma@5.1.1 karma-env-preprocessor: 0.1.1 karma-firefox-launcher: 1.3.0 @@ -9666,16 +10836,16 @@ packages: rollup-plugin-shim: 1.0.0 rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-terser: 5.3.0_rollup@1.32.1 - rollup-plugin-visualizer: 4.0.4_rollup@1.32.1 - sinon: 9.0.2 + rollup-plugin-visualizer: 4.1.1_rollup@1.32.1 + sinon: 9.0.3 source-map-support: 0.5.19 - tslib: 2.0.0 - typescript: 3.9.6 + tslib: 2.0.1 + typescript: 3.9.7 url: 0.11.0 dev: false name: '@rush-temp/keyvault-secrets' resolution: - integrity: sha512-E+Z8eglyBz/UOXKAzRn8KcuIWEjjGdW69ZSlm3uvxE1KGTb72p3z03Fis19WaBLE3IzMpJWhK9RJkp8emoG46Q== + integrity: sha512-z7+hE+5gm4X/0ZZZ96PtdLA+i34Rh0vPfSzLp2h+eOk1L+HEU0cck6a4w5n1Mv+okRt1ufkriVo5/y2PMV8IQg== tarball: 'file:projects/keyvault-secrets.tgz' version: 0.0.0 'file:projects/logger.tgz': @@ -9683,18 +10853,18 @@ packages: '@microsoft/api-extractor': 7.7.11 '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 - '@rollup/plugin-node-resolve': 8.1.0_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 '@rollup/plugin-replace': 2.3.3_rollup@1.32.1 - '@types/chai': 4.2.11 + '@types/chai': 4.2.12 '@types/mocha': 7.0.2 - '@types/node': 8.10.61 - '@types/sinon': 9.0.4 - '@typescript-eslint/eslint-plugin': 2.34.0_3787943315ebc5ea524d5c102dc9e452 - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.6 + '@types/node': 8.10.62 + '@types/sinon': 9.0.5 + '@typescript-eslint/eslint-plugin': 2.34.0_5004700905763c91177aaa7d1d0d56ac + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.7 assert: 1.5.0 chai: 4.2.0 cross-env: 7.0.2 - delay: 4.3.0 + delay: 4.4.0 dotenv: 8.2.0 eslint: 6.8.0 eslint-config-prettier: 6.11.0_eslint@6.8.0 @@ -9703,7 +10873,7 @@ packages: eslint-plugin-promise: 4.2.1 karma: 5.1.1 karma-chrome-launcher: 3.1.0 - karma-coverage: 2.0.2 + karma-coverage: 2.0.3 karma-edge-launcher: 0.4.2_karma@5.1.1 karma-env-preprocessor: 0.1.1 karma-firefox-launcher: 1.3.0 @@ -9721,14 +10891,14 @@ packages: rollup: 1.32.1 rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-terser: 5.3.0_rollup@1.32.1 - sinon: 9.0.2 - ts-node: 8.10.2_typescript@3.9.6 - tslib: 2.0.0 - typescript: 3.9.6 + sinon: 9.0.3 + ts-node: 8.10.2_typescript@3.9.7 + tslib: 2.0.1 + typescript: 3.9.7 dev: false name: '@rush-temp/logger' resolution: - integrity: sha512-hNBX+jdOuiLLL4tZ3Tj37DCPmSAaqTSoI3DysAOy1lxW9ylIYPIWSkBOoEKw6mgzWx+EAnddcxR7biuAJnd/HA== + integrity: sha512-KhMQ8SGiLx75uy0tjxJy1TOPqejl1QvhGa0+Gfzno1zqyPn4+UOJxsXgJOYK1aViPujcLpe7L1XFXpecg06ZCw== tarball: 'file:projects/logger.tgz' version: 0.0.0 'file:projects/monitor-opentelemetry-exporter.tgz': @@ -9738,9 +10908,9 @@ packages: '@opentelemetry/semantic-conventions': 0.10.2 '@opentelemetry/tracing': 0.10.2 '@types/mocha': 7.0.2 - '@types/node': 10.17.13 - '@typescript-eslint/eslint-plugin': 2.34.0_3787943315ebc5ea524d5c102dc9e452 - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.6 + '@types/node': 10.17.28 + '@typescript-eslint/eslint-plugin': 2.34.0_5004700905763c91177aaa7d1d0d56ac + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.7 c8: 7.3.0 eslint: 6.8.0 eslint-config-prettier: 6.11.0_eslint@6.8.0 @@ -9753,15 +10923,16 @@ packages: execa: 3.4.0 mocha: 7.2.0 nock: 12.0.3 + nyc: 14.1.1 prettier: 1.19.1 rimraf: 3.0.2 - sinon: 9.0.2 + sinon: 9.0.3 ts-mocha: 7.0.0_mocha@7.2.0 - typescript: 3.9.6 + typescript: 3.9.7 dev: false name: '@rush-temp/monitor-opentelemetry-exporter' resolution: - integrity: sha512-PgYKE+MGf1QLtt3y6jrVkcztGsnWsoYzjL8fGYlxs/U5AKcElMNc9u3Q92Sbnv8EdxElVfbOxZA7E+eLKIbOqw== + integrity: sha512-S6JsBlD7/w0Ew9kQ7Pu6nEnkC1PBOCIGHh27/Unc6FqVTV2uXZgEWf5KG4gLgwoGM8m6jNdcfsZ25GzCA67c3w== tarball: 'file:projects/monitor-opentelemetry-exporter.tgz' version: 0.0.0 'file:projects/schema-registry-avro.tgz': @@ -9773,15 +10944,15 @@ packages: '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 '@rollup/plugin-inject': 4.0.2_rollup@1.32.1 '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 - '@rollup/plugin-node-resolve': 8.1.0_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 '@rollup/plugin-replace': 2.3.3_rollup@1.32.1 - '@types/chai': 4.2.11 + '@types/chai': 4.2.12 '@types/chai-as-promised': 7.1.3 '@types/mocha': 7.0.2 - '@types/node': 8.10.61 - '@typescript-eslint/eslint-plugin': 2.34.0_3787943315ebc5ea524d5c102dc9e452 - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.6 - avsc: 5.4.22 + '@types/node': 8.10.62 + '@typescript-eslint/eslint-plugin': 2.34.0_5004700905763c91177aaa7d1d0d56ac + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.7 + avsc: 5.5.2 buffer: 5.6.0 chai: 4.2.0 chai-as-promised: 7.1.1_chai@4.2.0 @@ -9794,7 +10965,7 @@ packages: eslint-plugin-promise: 4.2.1 karma: 5.1.1 karma-chrome-launcher: 3.1.0 - karma-coverage: 2.0.2 + karma-coverage: 2.0.3 karma-edge-launcher: 0.4.2_karma@5.1.1 karma-env-preprocessor: 0.1.1 karma-firefox-launcher: 1.3.0 @@ -9815,14 +10986,14 @@ packages: rollup-plugin-shim: 1.0.0 rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-terser: 5.3.0_rollup@1.32.1 - rollup-plugin-visualizer: 4.0.4_rollup@1.32.1 + rollup-plugin-visualizer: 4.1.1_rollup@1.32.1 source-map-support: 0.5.19 - tslib: 2.0.0 - typescript: 3.9.6 + tslib: 2.0.1 + typescript: 3.9.7 dev: false name: '@rush-temp/schema-registry-avro' resolution: - integrity: sha512-UXMtvmv3Sdwo+Gl8f9V7fFw6RRoW72w9DyVxAq4PtIMnoh4EA2vf98PnPztuSWaOsuA+Nrfch7xpLl+dcHS5+g== + integrity: sha512-h+J/B+f/NpSSG78fT5fsLZ4jzupKaWe4Z11MGUFIcX/+toKzVOkojv61rRGLoHwaINT8J6IxyMkr6porRfi/AQ== tarball: 'file:projects/schema-registry-avro.tgz' version: 0.0.0 'file:projects/schema-registry.tgz': @@ -9833,14 +11004,14 @@ packages: '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 '@rollup/plugin-json': 4.1.0_rollup@1.32.1 '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 - '@rollup/plugin-node-resolve': 8.1.0_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 '@rollup/plugin-replace': 2.3.3_rollup@1.32.1 - '@types/chai': 4.2.11 + '@types/chai': 4.2.12 '@types/chai-as-promised': 7.1.3 '@types/mocha': 7.0.2 - '@types/node': 8.10.61 - '@typescript-eslint/eslint-plugin': 2.34.0_3787943315ebc5ea524d5c102dc9e452 - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.6 + '@types/node': 8.10.62 + '@typescript-eslint/eslint-plugin': 2.34.0_5004700905763c91177aaa7d1d0d56ac + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.7 chai: 4.2.0 chai-as-promised: 7.1.1_chai@4.2.0 cross-env: 7.0.2 @@ -9852,7 +11023,7 @@ packages: eslint-plugin-promise: 4.2.1 karma: 5.1.1 karma-chrome-launcher: 3.1.0 - karma-coverage: 2.0.2 + karma-coverage: 2.0.3 karma-edge-launcher: 0.4.2_karma@5.1.1 karma-env-preprocessor: 0.1.1 karma-firefox-launcher: 1.3.0 @@ -9872,14 +11043,14 @@ packages: rollup-plugin-shim: 1.0.0 rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-terser: 5.3.0_rollup@1.32.1 - rollup-plugin-visualizer: 4.0.4_rollup@1.32.1 + rollup-plugin-visualizer: 4.1.1_rollup@1.32.1 source-map-support: 0.5.19 - tslib: 2.0.0 - typescript: 3.9.6 + tslib: 2.0.1 + typescript: 3.9.7 dev: false name: '@rush-temp/schema-registry' resolution: - integrity: sha512-GhcAmAIwEblMY6QAdmD6c0qF3H3iB+zPHYH9Ei07I6wTjh5DBHgrUcyjFG2oMWOTbtjud5Ead3YYEyURo9U+GQ== + integrity: sha512-PjcvNh7JvVDINF3WfOMoFerV+qUO8M++D0eiTMkSG6TDZ6Jo2J1DQo3XnyTp0JchQXX0sPONbPg6+xaxUlAEZg== tarball: 'file:projects/schema-registry.tgz' version: 0.0.0 'file:projects/search-documents.tgz': @@ -9890,14 +11061,14 @@ packages: '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 '@rollup/plugin-json': 4.1.0_rollup@1.32.1 '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 - '@rollup/plugin-node-resolve': 8.1.0_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 '@rollup/plugin-replace': 2.3.3_rollup@1.32.1 - '@types/chai': 4.2.11 + '@types/chai': 4.2.12 '@types/mocha': 7.0.2 - '@types/node': 8.10.61 - '@types/sinon': 9.0.4 - '@typescript-eslint/eslint-plugin': 2.34.0_3787943315ebc5ea524d5c102dc9e452 - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.6 + '@types/node': 8.10.62 + '@types/sinon': 9.0.5 + '@typescript-eslint/eslint-plugin': 2.34.0_5004700905763c91177aaa7d1d0d56ac + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.7 chai: 4.2.0 cross-env: 7.0.2 dotenv: 8.2.0 @@ -9906,10 +11077,11 @@ packages: eslint-plugin-no-null: 1.0.2_eslint@6.8.0 eslint-plugin-no-only-tests: 2.4.0 eslint-plugin-promise: 4.2.1 + events: 3.2.0 inherits: 2.0.4 karma: 5.1.1 karma-chrome-launcher: 3.1.0 - karma-coverage: 2.0.2 + karma-coverage: 2.0.3 karma-edge-launcher: 0.4.2_karma@5.1.1 karma-env-preprocessor: 0.1.1 karma-firefox-launcher: 1.3.0 @@ -9929,20 +11101,21 @@ packages: rollup-plugin-shim: 1.0.0 rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-terser: 5.3.0_rollup@1.32.1 - rollup-plugin-visualizer: 4.0.4_rollup@1.32.1 - sinon: 9.0.2 - ts-node: 8.10.2_typescript@3.9.6 - tslib: 2.0.0 - typescript: 3.9.6 + rollup-plugin-visualizer: 4.1.1_rollup@1.32.1 + sinon: 9.0.3 + ts-node: 8.10.2_typescript@3.9.7 + tslib: 2.0.1 + typescript: 3.9.7 util: 0.12.3 dev: false name: '@rush-temp/search-documents' resolution: - integrity: sha512-N/adRny91VkK9QIxFovQyAKCNYbT0ZBJ9vKd9EG07oo7uoOTZmze/fDXyErn6m+yatsehrN47xNKxGIozcs8TQ== + integrity: sha512-zE1WZpcj1S6huA1g9E4NW0EGiDDMyQgjSZw+UBGUQKwjOho2sNKurymm+aDjLofSr+DOKrqFwh/JFG4ruV0hqg== tarball: 'file:projects/search-documents.tgz' version: 0.0.0 'file:projects/service-bus.tgz': dependencies: + '@azure/core-amqp': 2.0.0-beta.1 '@azure/core-tracing': 1.0.0-preview.9 '@azure/identity': 1.1.0 '@microsoft/api-extractor': 7.7.11 @@ -9951,20 +11124,20 @@ packages: '@rollup/plugin-inject': 4.0.2_rollup@1.32.1 '@rollup/plugin-json': 4.1.0_rollup@1.32.1 '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 - '@rollup/plugin-node-resolve': 8.1.0_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 '@rollup/plugin-replace': 2.3.3_rollup@1.32.1 - '@types/chai': 4.2.11 + '@types/chai': 4.2.12 '@types/chai-as-promised': 7.1.3 '@types/debug': 4.1.5 '@types/glob': 7.1.3 '@types/is-buffer': 2.0.0 '@types/long': 4.0.1 '@types/mocha': 7.0.2 - '@types/node': 8.10.61 - '@types/sinon': 9.0.4 + '@types/node': 8.10.62 + '@types/sinon': 9.0.5 '@types/ws': 7.2.6 - '@typescript-eslint/eslint-plugin': 2.34.0_3787943315ebc5ea524d5c102dc9e452 - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.6 + '@typescript-eslint/eslint-plugin': 2.34.0_5004700905763c91177aaa7d1d0d56ac + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.7 assert: 1.5.0 buffer: 5.6.0 chai: 4.2.0 @@ -9972,7 +11145,7 @@ packages: chai-exclude: 2.0.2_chai@4.2.0 cross-env: 7.0.2 debug: 4.1.1 - delay: 4.3.0 + delay: 4.4.0 dotenv: 8.2.0 downlevel-dts: 0.4.0 eslint: 6.8.0 @@ -9981,12 +11154,14 @@ packages: eslint-plugin-no-only-tests: 2.4.0 eslint-plugin-promise: 4.2.1 esm: 3.2.25 - events: 3.1.0 + events: 3.2.0 glob: 7.1.6 + https-proxy-agent: 5.0.0 is-buffer: 2.0.4 + jssha: 3.1.2 karma: 5.1.1 karma-chrome-launcher: 3.1.0 - karma-coverage: 2.0.2 + karma-coverage: 2.0.3 karma-edge-launcher: 0.4.2_karma@5.1.1 karma-env-preprocessor: 0.1.1 karma-firefox-launcher: 1.3.0 @@ -10010,15 +11185,15 @@ packages: rollup-plugin-shim: 1.0.0 rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-terser: 5.3.0_rollup@1.32.1 - sinon: 9.0.2 - ts-node: 8.10.2_typescript@3.9.6 - tslib: 2.0.0 - typescript: 3.9.6 + sinon: 9.0.3 + ts-node: 8.10.2_typescript@3.9.7 + tslib: 2.0.1 + typescript: 3.9.7 ws: 7.3.1 dev: false name: '@rush-temp/service-bus' resolution: - integrity: sha512-51d4bYHeIAsk9snkfMhwDBa/SdL8xqrjc7MKV2+KuP2Iz+O8XQIupoJG4t64tyM//8CoK0nxSSb+X2te8esCew== + integrity: sha512-GttMlKcf8CpDHVSSRODp/uuKowhaJNnglA4vKroX+wY0pirghFzT800NUDOCBLv08Uzpcu0q+gac5CKwHI/0xg== tarball: 'file:projects/service-bus.tgz' version: 0.0.0 'file:projects/storage-blob-changefeed.tgz': @@ -10029,13 +11204,13 @@ packages: '@opentelemetry/api': 0.10.2 '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 - '@rollup/plugin-node-resolve': 8.1.0_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 '@rollup/plugin-replace': 2.3.3_rollup@1.32.1 '@types/mocha': 7.0.2 - '@types/node': 8.10.61 - '@types/sinon': 9.0.4 - '@typescript-eslint/eslint-plugin': 2.34.0_3787943315ebc5ea524d5c102dc9e452 - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.6 + '@types/node': 8.10.62 + '@types/sinon': 9.0.5 + '@typescript-eslint/eslint-plugin': 2.34.0_5004700905763c91177aaa7d1d0d56ac + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.7 assert: 1.5.0 cross-env: 7.0.2 dotenv: 8.2.0 @@ -10047,11 +11222,11 @@ packages: eslint-plugin-no-only-tests: 2.4.0 eslint-plugin-promise: 4.2.1 esm: 3.2.25 - events: 3.1.0 + events: 3.2.0 inherits: 2.0.4 karma: 5.1.1 karma-chrome-launcher: 3.1.0 - karma-coverage: 2.0.2 + karma-coverage: 2.0.3 karma-edge-launcher: 0.4.2_karma@5.1.1 karma-env-preprocessor: 0.1.1 karma-firefox-launcher: 1.3.0 @@ -10072,17 +11247,17 @@ packages: rollup-plugin-shim: 1.0.0 rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-terser: 5.3.0_rollup@1.32.1 - rollup-plugin-visualizer: 4.0.4_rollup@1.32.1 - sinon: 9.0.2 + rollup-plugin-visualizer: 4.1.1_rollup@1.32.1 + sinon: 9.0.3 source-map-support: 0.5.19 - ts-node: 8.10.2_typescript@3.9.6 - tslib: 2.0.0 - typescript: 3.9.6 + ts-node: 8.10.2_typescript@3.9.7 + tslib: 2.0.1 + typescript: 3.9.7 util: 0.12.3 dev: false name: '@rush-temp/storage-blob-changefeed' resolution: - integrity: sha512-kiQsE6/mLEB5LZoGZFSgH+PgkeeBETkp1HUoTLwYd8IK6WgUaU63hc7FO8LYESW0oP05LeJdVLTtMA5jc2uK9g== + integrity: sha512-ROl8a6HVH3NC/mKyAXgzrgeJ35Yk8tujcoeLfmjHJGn8tQQt82yNNqnxejmAB8huCAXVzBlMK5BKdSQh4YHMFA== tarball: 'file:projects/storage-blob-changefeed.tgz' version: 0.0.0 'file:projects/storage-blob.tgz': @@ -10093,12 +11268,12 @@ packages: '@opentelemetry/api': 0.10.2 '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 - '@rollup/plugin-node-resolve': 8.1.0_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 '@rollup/plugin-replace': 2.3.3_rollup@1.32.1 '@types/mocha': 7.0.2 - '@types/node': 8.10.61 - '@typescript-eslint/eslint-plugin': 2.34.0_3787943315ebc5ea524d5c102dc9e452 - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.6 + '@types/node': 8.10.62 + '@typescript-eslint/eslint-plugin': 2.34.0_5004700905763c91177aaa7d1d0d56ac + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.7 assert: 1.5.0 cross-env: 7.0.2 dotenv: 8.2.0 @@ -10110,11 +11285,11 @@ packages: eslint-plugin-no-only-tests: 2.4.0 eslint-plugin-promise: 4.2.1 esm: 3.2.25 - events: 3.1.0 + events: 3.2.0 inherits: 2.0.4 karma: 5.1.1 karma-chrome-launcher: 3.1.0 - karma-coverage: 2.0.2 + karma-coverage: 2.0.3 karma-edge-launcher: 0.4.2_karma@5.1.1 karma-env-preprocessor: 0.1.1 karma-firefox-launcher: 1.3.0 @@ -10135,16 +11310,16 @@ packages: rollup-plugin-shim: 1.0.0 rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-terser: 5.3.0_rollup@1.32.1 - rollup-plugin-visualizer: 4.0.4_rollup@1.32.1 + rollup-plugin-visualizer: 4.1.1_rollup@1.32.1 source-map-support: 0.5.19 - ts-node: 8.10.2_typescript@3.9.6 - tslib: 2.0.0 - typescript: 3.9.6 + ts-node: 8.10.2_typescript@3.9.7 + tslib: 2.0.1 + typescript: 3.9.7 util: 0.12.3 dev: false name: '@rush-temp/storage-blob' resolution: - integrity: sha512-LgTbZCpuxCffYP45vW6aJiEjl3WSsdhk0eZqgGwSLeSDVx/4+bHjRAWJOgVNG49jUNl4ijV5VJbJy0Rjs1uAKQ== + integrity: sha512-z/4kqI624+5E1514Aj58uljNFQdCOuw2eXAg9zxTeBoenR0g6DrmpU6fyMcmAKNKvSGPb5DYZQUXczYOLsllCQ== tarball: 'file:projects/storage-blob.tgz' version: 0.0.0 'file:projects/storage-file-datalake.tgz': @@ -10155,14 +11330,14 @@ packages: '@opentelemetry/api': 0.10.2 '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 - '@rollup/plugin-node-resolve': 8.1.0_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 '@rollup/plugin-replace': 2.3.3_rollup@1.32.1 '@types/fs-extra': 8.1.1 '@types/mocha': 7.0.2 - '@types/node': 8.10.61 + '@types/node': 8.10.62 '@types/query-string': 6.2.0 - '@typescript-eslint/eslint-plugin': 2.34.0_3787943315ebc5ea524d5c102dc9e452 - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.6 + '@typescript-eslint/eslint-plugin': 2.34.0_5004700905763c91177aaa7d1d0d56ac + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.7 assert: 1.5.0 cross-env: 7.0.2 dotenv: 8.2.0 @@ -10174,13 +11349,13 @@ packages: eslint-plugin-no-only-tests: 2.4.0 eslint-plugin-promise: 4.2.1 esm: 3.2.25 - events: 3.1.0 + events: 3.2.0 execa: 3.4.0 fs-extra: 8.1.0 inherits: 2.0.4 karma: 5.1.1 karma-chrome-launcher: 3.1.0 - karma-coverage: 2.0.2 + karma-coverage: 2.0.3 karma-edge-launcher: 0.4.2_karma@5.1.1 karma-env-preprocessor: 0.1.1 karma-firefox-launcher: 1.3.0 @@ -10202,16 +11377,16 @@ packages: rollup-plugin-shim: 1.0.0 rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-terser: 5.3.0_rollup@1.32.1 - rollup-plugin-visualizer: 4.0.4_rollup@1.32.1 + rollup-plugin-visualizer: 4.1.1_rollup@1.32.1 source-map-support: 0.5.19 - ts-node: 8.10.2_typescript@3.9.6 - tslib: 2.0.0 - typescript: 3.9.6 + ts-node: 8.10.2_typescript@3.9.7 + tslib: 2.0.1 + typescript: 3.9.7 util: 0.12.3 dev: false name: '@rush-temp/storage-file-datalake' resolution: - integrity: sha512-RKgkJyMJreDqQYe/7tXpmVB+4OeAlRMXWFIbH8eWeMzEa156MjEy8G46v07aF/6vgsJfKxTDNWz7ZOZM7k6Qqg== + integrity: sha512-rt+5OdfynZSXLwRDCxPxnKEwEcAUPgrD8Z4ar+qhEtdP8NxwCrF4j0qppNlRi7nM/RFknAWoLlwX6admnjg4pQ== tarball: 'file:projects/storage-file-datalake.tgz' version: 0.0.0 'file:projects/storage-file-share.tgz': @@ -10221,12 +11396,12 @@ packages: '@opentelemetry/api': 0.10.2 '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 - '@rollup/plugin-node-resolve': 8.1.0_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 '@rollup/plugin-replace': 2.3.3_rollup@1.32.1 '@types/mocha': 7.0.2 - '@types/node': 8.10.61 - '@typescript-eslint/eslint-plugin': 2.34.0_3787943315ebc5ea524d5c102dc9e452 - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.6 + '@types/node': 8.10.62 + '@typescript-eslint/eslint-plugin': 2.34.0_5004700905763c91177aaa7d1d0d56ac + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.7 assert: 1.5.0 cross-env: 7.0.2 dotenv: 8.2.0 @@ -10238,11 +11413,11 @@ packages: eslint-plugin-no-only-tests: 2.4.0 eslint-plugin-promise: 4.2.1 esm: 3.2.25 - events: 3.1.0 + events: 3.2.0 inherits: 2.0.4 karma: 5.1.1 karma-chrome-launcher: 3.1.0 - karma-coverage: 2.0.2 + karma-coverage: 2.0.3 karma-edge-launcher: 0.4.2_karma@5.1.1 karma-env-preprocessor: 0.1.1 karma-firefox-launcher: 1.3.0 @@ -10263,16 +11438,16 @@ packages: rollup-plugin-shim: 1.0.0 rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-terser: 5.3.0_rollup@1.32.1 - rollup-plugin-visualizer: 4.0.4_rollup@1.32.1 + rollup-plugin-visualizer: 4.1.1_rollup@1.32.1 source-map-support: 0.5.19 - ts-node: 8.10.2_typescript@3.9.6 - tslib: 2.0.0 - typescript: 3.9.6 + ts-node: 8.10.2_typescript@3.9.7 + tslib: 2.0.1 + typescript: 3.9.7 util: 0.12.3 dev: false name: '@rush-temp/storage-file-share' resolution: - integrity: sha512-SekSXTqd9ixQmb8XYg/Y2xou+LnCbm+zKysZe9AwvadsqTgyaMpm3wgS0OEdBbeGte+Crs/Ep4GcSrBqwryHNg== + integrity: sha512-tNubXcGD+kdnyl9UIyeL6JwvmVA7cynbOlIaZ8oyfj3/HRv+rT6oDwPbF/5gEjgAxC99uwAW+SoU2MMz5bxIiQ== tarball: 'file:projects/storage-file-share.tgz' version: 0.0.0 'file:projects/storage-internal-avro.tgz': @@ -10280,12 +11455,12 @@ packages: '@microsoft/api-extractor': 7.7.11 '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 - '@rollup/plugin-node-resolve': 8.1.0_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 '@rollup/plugin-replace': 2.3.3_rollup@1.32.1 '@types/mocha': 7.0.2 - '@types/node': 8.10.61 - '@typescript-eslint/eslint-plugin': 2.34.0_3787943315ebc5ea524d5c102dc9e452 - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.6 + '@types/node': 8.10.62 + '@typescript-eslint/eslint-plugin': 2.34.0_5004700905763c91177aaa7d1d0d56ac + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.7 assert: 1.5.0 cross-env: 7.0.2 dotenv: 8.2.0 @@ -10300,7 +11475,7 @@ packages: inherits: 2.0.4 karma: 5.1.1 karma-chrome-launcher: 3.1.0 - karma-coverage: 2.0.2 + karma-coverage: 2.0.3 karma-edge-launcher: 0.4.2_karma@5.1.1 karma-env-preprocessor: 0.1.1 karma-firefox-launcher: 1.3.0 @@ -10321,16 +11496,16 @@ packages: rollup-plugin-shim: 1.0.0 rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-terser: 5.3.0_rollup@1.32.1 - rollup-plugin-visualizer: 4.0.4_rollup@1.32.1 + rollup-plugin-visualizer: 4.1.1_rollup@1.32.1 source-map-support: 0.5.19 - ts-node: 8.10.2_typescript@3.9.6 - tslib: 2.0.0 - typescript: 3.9.6 + ts-node: 8.10.2_typescript@3.9.7 + tslib: 2.0.1 + typescript: 3.9.7 util: 0.12.3 dev: false name: '@rush-temp/storage-internal-avro' resolution: - integrity: sha512-ifiezDR4YN49IrAiLisX+IJNVHhdYN4oIzpVNxwyHqvOWyT1sZSUtan8EiXNV0Zzj5fIlGtHdLOcOjO88UUPMg== + integrity: sha512-0SDBUmCEthTK5dc2YxuJqRPE443HPL0DQV9VtqMAZmged7D0B2eGP2A9u9pYuQa5zP1dtAdzI3Dd3NCiZH4/vw== tarball: 'file:projects/storage-internal-avro.tgz' version: 0.0.0 'file:projects/storage-queue.tgz': @@ -10341,12 +11516,12 @@ packages: '@opentelemetry/api': 0.10.2 '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 - '@rollup/plugin-node-resolve': 8.1.0_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 '@rollup/plugin-replace': 2.3.3_rollup@1.32.1 '@types/mocha': 7.0.2 - '@types/node': 8.10.61 - '@typescript-eslint/eslint-plugin': 2.34.0_3787943315ebc5ea524d5c102dc9e452 - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.6 + '@types/node': 8.10.62 + '@typescript-eslint/eslint-plugin': 2.34.0_5004700905763c91177aaa7d1d0d56ac + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.7 assert: 1.5.0 cross-env: 7.0.2 dotenv: 8.2.0 @@ -10361,7 +11536,7 @@ packages: inherits: 2.0.4 karma: 5.1.1 karma-chrome-launcher: 3.1.0 - karma-coverage: 2.0.2 + karma-coverage: 2.0.3 karma-edge-launcher: 0.4.2_karma@5.1.1 karma-env-preprocessor: 0.1.1 karma-firefox-launcher: 1.3.0 @@ -10382,16 +11557,16 @@ packages: rollup-plugin-shim: 1.0.0 rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-terser: 5.3.0_rollup@1.32.1 - rollup-plugin-visualizer: 4.0.4_rollup@1.32.1 + rollup-plugin-visualizer: 4.1.1_rollup@1.32.1 source-map-support: 0.5.19 - ts-node: 8.10.2_typescript@3.9.6 - tslib: 2.0.0 - typescript: 3.9.6 + ts-node: 8.10.2_typescript@3.9.7 + tslib: 2.0.1 + typescript: 3.9.7 util: 0.12.3 dev: false name: '@rush-temp/storage-queue' resolution: - integrity: sha512-op35DDM5BDADPBVZJ52spPgulRrN7kExhcF0OaBa95EJULDPUaQCMghiLROs2Nf/vZHMvcn6G0xZNrWztO8g/A== + integrity: sha512-IHSQC996aAVBVtrsz3xCBeysHjXB1Q2zCoMxkj80n7hSYv9wEek9aEQnUHdnF3Gub0okjB756oCk4qaPb0I+Gg== tarball: 'file:projects/storage-queue.tgz' version: 0.0.0 'file:projects/template.tgz': @@ -10402,15 +11577,14 @@ packages: '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 '@rollup/plugin-json': 4.1.0_rollup@1.32.1 '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 - '@rollup/plugin-node-resolve': 8.1.0_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 '@rollup/plugin-replace': 2.3.3_rollup@1.32.1 - '@types/chai': 4.2.11 + '@types/chai': 4.2.12 '@types/chai-as-promised': 7.1.3 '@types/mocha': 7.0.2 - '@types/node': 8.10.61 - '@typescript-eslint/eslint-plugin': 2.34.0_3787943315ebc5ea524d5c102dc9e452 - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.6 - assert: 1.5.0 + '@types/node': 8.10.62 + '@typescript-eslint/eslint-plugin': 2.34.0_5004700905763c91177aaa7d1d0d56ac + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.7 chai: 4.2.0 chai-as-promised: 7.1.1_chai@4.2.0 cross-env: 7.0.2 @@ -10420,11 +11594,11 @@ packages: eslint-plugin-no-null: 1.0.2_eslint@6.8.0 eslint-plugin-no-only-tests: 2.4.0 eslint-plugin-promise: 4.2.1 - events: 3.1.0 + events: 3.2.0 inherits: 2.0.4 karma: 5.1.1 karma-chrome-launcher: 3.1.0 - karma-coverage: 2.0.2 + karma-coverage: 2.0.3 karma-edge-launcher: 0.4.2_karma@5.1.1 karma-env-preprocessor: 0.1.1 karma-firefox-launcher: 1.3.0 @@ -10433,6 +11607,7 @@ packages: karma-mocha: 2.0.1 karma-mocha-reporter: 2.2.5_karma@5.1.1 karma-remap-istanbul: 0.6.0_karma@5.1.1 + karma-typescript: 5.0.3_karma@5.1.1+typescript@3.9.7 mocha: 7.2.0 mocha-junit-reporter: 1.23.3_mocha@7.2.0 nyc: 14.1.1 @@ -10442,41 +11617,41 @@ packages: rollup-plugin-shim: 1.0.0 rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-terser: 5.3.0_rollup@1.32.1 - rollup-plugin-visualizer: 4.0.4_rollup@1.32.1 - tslib: 2.0.0 - typescript: 3.9.6 + rollup-plugin-visualizer: 4.1.1_rollup@1.32.1 + tslib: 2.0.1 + typescript: 3.9.7 util: 0.12.3 dev: false name: '@rush-temp/template' resolution: - integrity: sha512-vJjr/veuy4Sq3JebCiXJbAIfE3F4yzb2kXpJOelmVFzJF96IY96rrXeCl+H96OTIhv5gzEp2iu3ub9/DhMcxEw== + integrity: sha512-hE8hxvkCHl7jN3xlQ9fsWQvKNs7h47NCd6ulQl9DbSGsxSh88snVWuJG7BkjYirIUhF6S2ZpszERBYMPJA/OyA== tarball: 'file:projects/template.tgz' version: 0.0.0 'file:projects/test-utils-perfstress.tgz': dependencies: '@opentelemetry/api': 0.10.2 '@types/minimist': 1.2.0 - '@types/node': 8.10.61 + '@types/node': 8.10.62 '@types/node-fetch': 2.5.7 - '@typescript-eslint/eslint-plugin': 2.34.0_3787943315ebc5ea524d5c102dc9e452 - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.6 + '@typescript-eslint/eslint-plugin': 2.34.0_5004700905763c91177aaa7d1d0d56ac + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.7 eslint: 6.8.0 eslint-plugin-no-only-tests: 2.4.0 eslint-plugin-promise: 4.2.1 karma: 5.1.1 karma-chrome-launcher: 3.1.0 - karma-coverage: 2.0.2 + karma-coverage: 2.0.3 karma-env-preprocessor: 0.1.1 minimist: 1.2.5 node-fetch: 2.6.0 prettier: 1.19.1 rimraf: 3.0.2 - tslib: 2.0.0 - typescript: 3.9.6 + tslib: 2.0.1 + typescript: 3.9.7 dev: false name: '@rush-temp/test-utils-perfstress' resolution: - integrity: sha512-aHqDHB2NxG32mo2bEmOAuws0f+mxo0Ii1iGrGe6Skn+bjTfGYDy31iRpFoG4ELvOttcqt6Y4MsAG2xgT0IBzog== + integrity: sha512-zOQDowpBABurBJejUvTKqdAp1LMTreQo15Q+wfAswJwqbVLLvqDWDVq35f0JGtysHZYbkGxllKNa7f5a/XKOxw== tarball: 'file:projects/test-utils-perfstress.tgz' version: 0.0.0 'file:projects/test-utils-recorder.tgz': @@ -10484,18 +11659,18 @@ packages: '@opentelemetry/api': 0.10.2 '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 - '@rollup/plugin-node-resolve': 8.1.0_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 '@rollup/plugin-replace': 2.3.3_rollup@1.32.1 - '@types/chai': 4.2.11 + '@types/chai': 4.2.12 '@types/fs-extra': 8.1.1 '@types/md5': 2.2.0 '@types/mocha': 7.0.2 '@types/mock-fs': 4.10.0 '@types/mock-require': 2.0.0 '@types/nise': 1.4.0 - '@types/node': 8.10.61 - '@typescript-eslint/eslint-plugin': 2.34.0_3787943315ebc5ea524d5c102dc9e452 - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.6 + '@types/node': 8.10.62 + '@typescript-eslint/eslint-plugin': 2.34.0_5004700905763c91177aaa7d1d0d56ac + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.7 chai: 4.2.0 eslint: 6.8.0 eslint-plugin-no-only-tests: 2.4.0 @@ -10503,7 +11678,7 @@ packages: fs-extra: 8.1.0 karma: 5.1.1 karma-chrome-launcher: 3.1.0 - karma-coverage: 2.0.2 + karma-coverage: 2.0.3 karma-edge-launcher: 0.4.2_karma@5.1.1 karma-env-preprocessor: 0.1.1 karma-firefox-launcher: 1.3.0 @@ -10514,10 +11689,10 @@ packages: karma-mocha: 2.0.1 karma-mocha-reporter: 2.2.5_karma@5.1.1 karma-remap-istanbul: 0.6.0_karma@5.1.1 - md5: 2.2.1 + md5: 2.3.0 mocha: 7.2.0 mocha-junit-reporter: 1.23.3_mocha@7.2.0 - mock-fs: 4.12.0 + mock-fs: 4.13.0 mock-require: 3.0.3 nise: 4.0.4 nock: 12.0.3 @@ -10529,35 +11704,35 @@ packages: rollup-plugin-shim: 1.0.0 rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-terser: 5.3.0_rollup@1.32.1 - rollup-plugin-visualizer: 4.0.4_rollup@1.32.1 - tslib: 2.0.0 - typescript: 3.9.6 + rollup-plugin-visualizer: 4.1.1_rollup@1.32.1 + tslib: 2.0.1 + typescript: 3.9.7 xhr-mock: 2.5.1 dev: false name: '@rush-temp/test-utils-recorder' resolution: - integrity: sha512-Oiq+7gA8N1lONF4O1xl+YKv9vjxCpYAbSLYntF3u3fYh54eYROhfDfaLQbd07oCoHDr0fw05Di4YLtg95EK2VQ== + integrity: sha512-jgRVA11kPh/vgHr6KAfqHmSK/J/cb/dnU77nxk02f8OlZ901ftda1v6IeuPY3M/UT8TZxlBz6Vv7XwlDpbtj6w== tarball: 'file:projects/test-utils-recorder.tgz' version: 0.0.0 'file:projects/testhub.tgz': dependencies: '@azure/event-hubs': 2.1.4 - '@types/node': 8.10.61 - '@types/uuid': 8.0.0 + '@types/node': 8.10.62 + '@types/uuid': 8.3.0 '@types/yargs': 15.0.5 async-lock: 1.2.4 death: 1.1.0 debug: 4.1.1 - rhea: 1.0.23 + rhea: 1.0.24 rimraf: 3.0.2 - tslib: 2.0.0 - typescript: 3.9.6 - uuid: 8.2.0 - yargs: 15.4.0 + tslib: 2.0.1 + typescript: 3.9.7 + uuid: 8.3.0 + yargs: 15.4.1 dev: false name: '@rush-temp/testhub' resolution: - integrity: sha512-wWCeWZLGFaZKJOdG2zTpsvZxIdzw5SSDZfCYo/gcI3i0/IK+ukijKncP1wy1SpQG7pnc0CRY3IaJ6UdaMI93bg== + integrity: sha512-uZaBXfZM1ISycMx+p8kUd/Yqui/KgjgUm/CyAzxK2wkOmqKF66JuLD5lbkH4tXBi+F5rL59UaMhjjxskb6qbzA== tarball: 'file:projects/testhub.tgz' version: 0.0.0 registry: '' @@ -10565,8 +11740,13 @@ specifiers: '@rush-temp/abort-controller': 'file:./projects/abort-controller.tgz' '@rush-temp/ai-anomaly-detector': 'file:./projects/ai-anomaly-detector.tgz' '@rush-temp/ai-form-recognizer': 'file:./projects/ai-form-recognizer.tgz' + '@rush-temp/ai-metrics-advisor': 'file:./projects/ai-metrics-advisor.tgz' '@rush-temp/ai-text-analytics': 'file:./projects/ai-text-analytics.tgz' '@rush-temp/app-configuration': 'file:./projects/app-configuration.tgz' + '@rush-temp/communication-administration': 'file:./projects/communication-administration.tgz' + '@rush-temp/communication-chat': 'file:./projects/communication-chat.tgz' + '@rush-temp/communication-common': 'file:./projects/communication-common.tgz' + '@rush-temp/communication-sms': 'file:./projects/communication-sms.tgz' '@rush-temp/core-amqp': 'file:./projects/core-amqp.tgz' '@rush-temp/core-arm': 'file:./projects/core-arm.tgz' '@rush-temp/core-asynciterator-polyfill': 'file:./projects/core-asynciterator-polyfill.tgz' @@ -10581,7 +11761,7 @@ specifiers: '@rush-temp/cosmos': 'file:./projects/cosmos.tgz' '@rush-temp/data-tables': 'file:./projects/data-tables.tgz' '@rush-temp/dev-tool': 'file:./projects/dev-tool.tgz' - '@rush-temp/digital-twins': 'file:./projects/digital-twins.tgz' + '@rush-temp/digital-twins-core': 'file:./projects/digital-twins-core.tgz' '@rush-temp/eslint-plugin-azure-sdk': 'file:./projects/eslint-plugin-azure-sdk.tgz' '@rush-temp/event-hubs': 'file:./projects/event-hubs.tgz' '@rush-temp/event-processor-host': 'file:./projects/event-processor-host.tgz' @@ -10609,5 +11789,3 @@ specifiers: '@rush-temp/test-utils-perfstress': 'file:./projects/test-utils-perfstress.tgz' '@rush-temp/test-utils-recorder': 'file:./projects/test-utils-recorder.tgz' '@rush-temp/testhub': 'file:./projects/testhub.tgz' - precise-commits: ^1.0.2 - prettier: ^1.16.4 diff --git a/common/smoke-test/.gitignore b/common/smoke-test/.gitignore deleted file mode 100644 index adc1525d93aa..000000000000 --- a/common/smoke-test/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -!package-lock.json - -*.js -*.js.map diff --git a/common/smoke-test/Initialize-SmokeTests.ps1 b/common/smoke-test/Initialize-SmokeTests.ps1 index 4a6801c6f95b..6515c647d6cf 100644 --- a/common/smoke-test/Initialize-SmokeTests.ps1 +++ b/common/smoke-test/Initialize-SmokeTests.ps1 @@ -45,29 +45,11 @@ param ( $RemainingArguments ) -function OutputWarning { - param([string] $Output) - - if ($CI) { - Write-Host "##vso[task.logissue type=warning]$Output" - } - else { - Write-Warning $Output - } - -} - -$previousEnvironmentVariables = @{ } - -function SetEnvironmentVariable { - param( - [string] $Name, - [string] $Value - ) +$repoRoot = Resolve-Path -Path "$PSScriptRoot../../../" +. "$repoRoot/eng/common/scripts/logging.ps1" - if ($previousEnvironmentVariables.ContainsKey($Name) -and $previousEnvironmentVariables[$Name] -ne $Value) { - OutputWarning "Environment variable already set: $Name with different value" - } +function Set-EnvironmentVariable { + param([string] $Name, [string] $Value) if ($CI) { Write-Host "##vso[task.setvariable variable=_$Name;issecret=true;]$($Value)" @@ -79,107 +61,59 @@ function SetEnvironmentVariable { } } -Write-Verbose "Setting AAD environment variables for Test Application..." -SetEnvironmentVariable -Name AZURE_CLIENT_ID -Value $TestApplicationId -SetEnvironmentVariable -Name AZURE_CLIENT_SECRET -Value $TestApplicationSecret -SetEnvironmentVariable -Name AZURE_TENANT_ID -Value $TenantId - -Write-Verbose "Setting cloud-specific environment variables" -$cloudEnvironment = Get-AzEnvironment -Name $Environment -SetEnvironmentVariable -Name AZURE_AUTHORITY_HOST -Value $cloudEnvironment.ActiveDirectoryAuthority - -$repoRoot = Resolve-Path -Path "$PSScriptRoot../../../" - -Write-Verbose "Detecting samples..." -$javascriptSamples = (Get-ChildItem -Path "$repoRoot/sdk/$ServiceDirectory/*/samples/javascript/" -Directory - | Where-Object { Test-Path "$_/package.json" }) - -$manifest = $javascriptSamples | ForEach-Object { - # Example: C:\code\azure-sdk-for-js\sdk\appconfiguration\app-configuration\samples\javascript - @{ - # Package name for example "app-configuration" - Name = ((Join-Path $_ ../../) | Get-Item).Name; +function Set-EnvironmentVariables { + Write-Verbose "Setting AAD environment variables for Test Application..." + Set-EnvironmentVariable -Name AZURE_CLIENT_ID -Value $TestApplicationId + Set-EnvironmentVariable -Name AZURE_CLIENT_SECRET -Value $TestApplicationSecret + Set-EnvironmentVariable -Name AZURE_TENANT_ID -Value $TenantId - # Path to "app-configuration" part from example - PackageDirectory = ((Join-Path $_ ../../) | Get-Item).FullName; - - # Service Directory for example "appconfiguration" - ResourcesDirectory = ((Join-Path $_ ../../../) | Get-Item).Name; - } + Write-Verbose "Setting cloud-specific environment variables" + $cloudEnvironment = Get-AzEnvironment -Name $Environment + Set-EnvironmentVariable -Name AZURE_AUTHORITY_HOST -Value $cloudEnvironment.ActiveDirectoryAuthority } -$deployedServiceDirectories = @{ } -$runManifest = @() -$dependencies = New-Object 'system.collections.generic.dictionary[string,string]' -$baseName = 't' + (New-Guid).ToString('n').Substring(0, 16) -$resourceGroupName = "rg-smoke-$baseName" +function New-DeployManifest { + Write-Verbose "Detecting samples..." + $javascriptSamples = (Get-ChildItem -Path "$repoRoot/sdk/$ServiceDirectory/*/samples/javascript/" -Directory + | Where-Object { Test-Path "$_/package.json" }) -# Use the same resource group name that New-TestResources.ps1 generates -SetEnvironmentVariable -Name 'AZURE_RESOURCEGROUP_NAME' -Value $resourceGroupName - -foreach ($entry in $manifest) { - if (!(Get-ChildItem -Path "$repoRoot/sdk/$($entry.ResourcesDirectory)" -Filter test-resources.json -Recurse)) { - Write-Verbose "Skipping $($entry.ResourcesDirectory): could not find test-resources.json" - continue - } + $manifest = $javascriptSamples | ForEach-Object { + # Example: azure-sdk-for-js/sdk/appconfiguration/app-configuration/samples/javascript + @{ + # Package name for example "app-configuration" + Name = ((Join-Path $_ ../../) | Get-Item).Name; - try { - Write-Verbose "Deploying resources for $($entry.Name)..." - if ($deployedServiceDirectories.ContainsKey($entry.ResourcesDirectory) -ne $true) { - - # Force -CI to false here. This is to have the script make use of - # -BaseName so that all resources are created within the same resource - # group for easier cleanup. All created environment variables are returned - # to $deployOutput so they can be set in the user's context or in CI. - $deployOutput = &"$repoRoot/eng/common/TestResources/New-TestResources.ps1" ` - -BaseName $baseName ` - -ResourceGroupName $resourceGroupName ` - -ServiceDirectory $entry.ResourcesDirectory ` - -TestApplicationId $TestApplicationId ` - -TestApplicationSecret $TestApplicationSecret ` - -ProvisionerApplicationId $TestApplicationId ` - -ProvisionerApplicationSecret $TestApplicationSecret ` - -TestApplicationOid $TestApplicationOid ` - -TenantId $TenantId ` - -SubscriptionId $SubscriptionId ` - -Location $Location ` - -Environment $Environment ` - -AdditionalParameters $AdditionalParameters ` - -DeleteAfterHours 24 ` - -Force ` - -Verbose ` - -CI:$CI - - $deployedServiceDirectories[$entry.ResourcesDirectory] = $true; + # Path to "app-configuration" part from example + PackageDirectory = ((Join-Path $_ ../../) | Get-Item).FullName; - foreach ($key in $deployOutput.Keys) { - SetEnvironmentVariable -Name $key -Value $deployOutput[$key] - } - } - else { - Write-Verbose "Skipping resource directory deployment (already deployed) for $($entry.ResourcesDirectory)" + # Service Directory for example "appconfiguration" + ResourcesDirectory = ((Join-Path $_ ../../../) | Get-Item).Name; } - - } - catch { - OutputWarning "Failed to deploy $($entry.Name) $($_.Exception.Message)" - Write-Warning "Failed to deploy $($entry.Name)" - Write-Host $_.Exception.Message - continue } + return $manifest +} + +function Update-SamplesForService { + Param([Parameter(Mandatory = $true)] $entry) + Write-Verbose "Preparing samples for $($entry.Name)" dev-tool samples prep --directory $entry.PackageDirectory --use-packages # Resolve full path for samples location. This has to be set after sample # prep because the directory will not resolve until the folder exists. $entry.SamplesDirectory = Join-Path -Path $entry.PackageDirectory -ChildPath 'dist-samples/javascript' -Resolve +} - # Set outputs - $runManifest += $entry +function Update-SampleDependencies { + Param( + [Parameter(Mandatory = $true)] $sample, + [Parameter(Mandatory = $true)] $dependencies + ) # Set sample's dependencies in all-up dependencies for smoke tests - $packageSpec = (Get-Content -Path "$($entry.SamplesDirectory)/package.json" + Write-Verbose "Updating local package.json with dependencies from smoke test for $($sample.Name)" + $packageSpec = (Get-Content -Path "$($sample.SamplesDirectory)/package.json" | ConvertFrom-Json -AsHashtable) foreach ($dep in $packageSpec.dependencies.Keys) { @@ -190,30 +124,136 @@ foreach ($entry in $manifest) { $dependencies[$dep] = $packageSpec.dependencies[$dep] } } +} + +function Start-NewTestResourcesJob { + Param( + [Parameter(Mandatory = $true)] [System.Collections.Hashtable]$entry, + [Parameter(Mandatory = $true)] [string]$baseName, + [Parameter(Mandatory = $true)] [string]$resourceGroupName + ) + + Start-Job -Name $entry.Name -ScriptBlock { + &"$using:repoRoot/eng/common/TestResources/New-TestResources.ps1" ` + -BaseName $using:baseName ` + -ResourceGroupName $using:resourceGroupName ` + -ServiceDirectory $using:entry.ResourcesDirectory ` + -TestApplicationId $using:TestApplicationId ` + -TestApplicationSecret $using:TestApplicationSecret ` + -ProvisionerApplicationId $using:TestApplicationId ` + -ProvisionerApplicationSecret $using:TestApplicationSecret ` + -TestApplicationOid $using:TestApplicationOid ` + -TenantId $using:TenantId ` + -SubscriptionId $using:SubscriptionId ` + -Location $using:Location ` + -Environment $using:Environment ` + -AdditionalParameters $using:AdditionalParameters ` + -DeleteAfterHours 24 ` + -Force ` + -Verbose ` + -CI:$using:CI + } +} + +function Deploy-TestResources { + Param([Parameter(Mandatory = $true)] $deployManifest) + + $deployedServiceDirectories = @{ } + $baseName = 't' + (New-Guid).ToString('n').Substring(0, 16) + $resourceGroupName = "rg-smoke-$baseName" + $dependencies = New-Object 'System.Collections.Generic.Dictionary[string,string]' + $runManifest = @() + + # Use the same resource group name that New-TestResources.ps1 generates + Set-EnvironmentVariable -Name 'AZURE_RESOURCEGROUP_NAME' -Value $resourceGroupName + + $entryDeployJobs = @() + + try { + foreach ($entry in $deployManifest) { + if (!(Get-ChildItem -Path "$repoRoot/sdk/$($entry.ResourcesDirectory)" -Filter test-resources.json -Recurse)) { + Write-Verbose "Skipping $($entry.ResourcesDirectory): could not find test-resources.json" + continue + } + + if ($deployedServiceDirectories.ContainsKey($entry.ResourcesDirectory) -ne $true) { + Write-Verbose "Starting deploy job for $($entry.ResourcesDirectory)" + $job = Start-NewTestResourcesJob $entry $baseName $resourceGroupName + $entryDeployJobs += $job + $deployedServiceDirectories[$entry.ResourcesDirectory] = $true; + } + else { + Write-Verbose "Skipping resource directory deployment (already deployed) for $($entry.ResourcesDirectory)" + } + Update-SamplesForService $entry + Update-SampleDependencies $entry $dependencies + $runManifest += $entry + } + + Write-Verbose "Waiting for all deploy jobs to finish (will timeout after 15 minutes)..." + $entryDeployJobs | Wait-Job -TimeoutSec (15*60) + if ($entryDeployJobs | Where-Object {$_.State -eq "Running"}) { + $entryDeployJobs + throw "Timed out waiting for deploy jobs to finish:" + } + + foreach ($job in $entryDeployJobs) { + if ($job.State -eq [System.Management.Automation.JobState]::Failed) { + $errorMsg = $job.ChildJobs[0].JobStateInfo.Reason.Message + LogWarning "Failed to deploy $($job.Name): $($errorMsg)" + Write-Host $errorMsg + continue + } + + Write-Verbose "setting env" + $deployOutput = Receive-Job -Id $job.Id + foreach ($key in $deployOutput.Keys) { + Set-EnvironmentVariable -Name $key -Value $deployOutput[$key] + } + } + } finally { + $entryDeployJobs | Remove-Job -Force + } + @{ Dependencies = $dependencies; RunManifest = $runManifest } } -Write-Verbose "Writing run-manifest.json" -($runManifest | ConvertTo-Json -AsArray | Set-Content -Path "$repoRoot/common/smoke-test/run-manifest.json" -Force) +function Export-Configs { + Param( + [Parameter(Mandatory = $true)] [System.Collections.Generic.Dictionary[string,string]]$dependencies, + [Parameter(Mandatory = $true)] $runManifest + ) + + Write-Verbose "Writing run-manifest.json" + ($runManifest | ConvertTo-Json -AsArray | Set-Content -Path "$repoRoot/common/smoke-test/run-manifest.json" -Force) -Write-Verbose "Writing dependencies into Smoke Test package.json" -$runnerPackageSpec = Get-Content "$repoRoot/common/smoke-test/package.json" | ConvertFrom-Json -AsHashtable -$runnerPackageSpec.dependencies = $dependencies -($runnerPackageSpec | ConvertTo-Json | Set-Content "$repoRoot/common/smoke-test/package.json") + Write-Verbose "Writing dependencies into Smoke Test package.json" + $runnerPackageSpec = Get-Content "$repoRoot/common/smoke-test/package.json" | ConvertFrom-Json -AsHashtable + $runnerPackageSpec.dependencies = $dependencies + ($runnerPackageSpec | ConvertTo-Json | Set-Content "$repoRoot/common/smoke-test/package.json") +} + +function Initialize-SmokeTests { + Set-EnvironmentVariables + $deployManifest = New-DeployManifest + $configs = Deploy-TestResources $deployManifest + Export-Configs $configs.Dependencies $configs.RunManifest -SetEnvironmentVariable -Name "NODE_PATH" -Value "$PSScriptRoot/node_modules" + Set-EnvironmentVariable -Name "NODE_PATH" -Value "$PSScriptRoot/node_modules" -if ($CI) { - # If in CI mark the task as successful even if there are warnings so the - # pipeline execution status shows up as red or green - Write-Host "##vso[task.complete result=Succeeded; ]DONE" + if ($CI) { + # If in CI mark the task as successful even if there are warnings so the + # pipeline execution status shows up as red or green + Write-Host "##vso[task.complete result=Succeeded; ]DONE" + } } +Initialize-SmokeTests <# .SYNOPSIS -Deploys resources, prepares onboarded samples, and creates run manifest for Smoke Tests +Deploys resources, discovers and generates samples, configures local dependencies, and creates run manifest for Smoke Tests .DESCRIPTION diff --git a/common/smoke-test/README.md b/common/smoke-test/README.md index f38e97f4b10d..85ddd6e85987 100644 --- a/common/smoke-test/README.md +++ b/common/smoke-test/README.md @@ -5,7 +5,7 @@ uses package dependencies, loads all packages into a single process, and executes code samples to ensure basic end to end scenarios work as expected. Smoke Tests are meant to be run periodically in an Azure DevOps pipeline. See -[`smoke-tests.yml`](./smoke-tests.yml) to configure Smoke Tests in an Azure +[`smoke-tests.yml`](https://github.com/Azure/azure-sdk-for-js/blob/master/common/smoke-test/smoke-tests.yml) to configure Smoke Tests in an Azure DevOps pipeline. When run in an Azure DevOps pipeline specify the `-CI` flag to ensure environment variables are properly set and error/warning messages are properly surfaced during the execution. @@ -22,8 +22,9 @@ package. - AAD Application with `Owner` permissions to an Azure subscription - PowerShell 7 +- [Azure Powershell cmdlets](https://docs.microsoft.com/powershell/azure/install-az-ps?view=azps-4.7.0) - Node 12.x -- Azure SDK for JS [`dev-tool`](../tools/dev-tool) +- Azure SDK for JS [`dev-tool`](https://github.com/Azure/azure-sdk-for-js/blob/master/common/tools/dev-tool) ## Configuring Samples @@ -63,9 +64,13 @@ not skipped will be included in smoke tests): ### Initialize Smoke Tests Run `Initialize-SmokeTests.ps1` to deploy resources and prepare samples. The -deploy script will search for packages that have samples, deploy resources -specified in `test-resources.json`, prep samples to execute in the JS Smoke Test -harness, and build the Smoke Test run manifest. +deploy script performs the following actions: + +1. Searches for packages that have samples. +1. Deploys resource definitions specified in `test-resources.json` via Azure Resource Manager (via `/eng/common/TestResources/New-TestResources.ps1`). +1. Preps samples to execute in the JS Smoke Test harness. This will take the form of `dist-samples` directories for included projects in `sdk/`. +1. Updates the local directory package.json to include dependencies required by smoke tests. +1. Generates the Smoke Test run manifest used by `run.js`, containing a list of smoke test directories to execute. Omit the `-CI` flag when running locally to have environment variables set in the context of your current PowerShell session. @@ -87,12 +92,16 @@ In the folder `common/smoke-tests/` ### Run tests -In the folder `common/smoke-tests/` +In the folder `common/smoke-test/` ```powershell -# Install collected dependencies +# Install generated dependencies for smoke-tests in run-manifest.json npm i -# Run smoke tests +# Run smoke tests defined in run-manifest.json node run.js ``` + +NOTE: `node run.js` must be run from within the same powershell session that Initialize-SmokeTests.ps1 was run, +since that script sets the NODE_PATH variable to the current directory (so that module imports from the samples will be redirected). +To run `node run.js` from a separate session, set/export the NODE_PATH variable to the `/node_modules`. diff --git a/common/smoke-test/smoke-tests.yml b/common/smoke-test/smoke-tests.yml index 06514518e0a2..8212f19f7144 100644 --- a/common/smoke-test/smoke-tests.yml +++ b/common/smoke-test/smoke-tests.yml @@ -2,34 +2,41 @@ jobs: - job: SmokeTest strategy: matrix: - Linux (AzureCloud): + Linux Node14 (AzureCloud): OSVmImage: "ubuntu-18.04" SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources) ArmTemplateParameters: $(AzureCloudArmTemplateParameters) - Windows (AzureCloud): + NodeTestVersion: "14.x" + Windows Node12 (AzureCloud): OSVmImage: "windows-2019" SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources) ArmTemplateParameters: $(AzureCloudArmTemplateParameters) - Mac (AzureCloud): + NodeTestVersion: "12.x" + Mac Node10 (AzureCloud): OSVmImage: "macOS-10.14" SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources) ArmTemplateParameters: $(AzureCloudArmTemplateParameters) - Linux (AzureUSGovernment): - OSVmImage: "ubuntu-18.04" - SubscriptionConfiguration: $(sub-config-gov-test-resources) - ArmTemplateParameters: $(AzureUSGovernmentArmTemplateParameters) - Windows (AzureUSGovernment): - OSVmImage: "windows-2019" - SubscriptionConfiguration: $(sub-config-gov-test-resources) - ArmTemplateParameters: $(AzureUSGovernmentArmTemplateParameters) - Linux (AzureChinaCloud): - OSVmImage: "ubuntu-18.04" - SubscriptionConfiguration: $(sub-config-cn-test-resources) - ArmTemplateParameters: $(AzureChinaCloudArmTemplateParameters) - Windows (AzureChinaCloud): - OSVmImage: "windows-2019" - SubscriptionConfiguration: $(sub-config-cn-test-resources) - ArmTemplateParameters: $(AzureChinaCloudArmTemplateParameters) + NodeTestVersion: "10.x" +# Linux Node10 (AzureUSGovernment): +# OSVmImage: "ubuntu-18.04" +# SubscriptionConfiguration: $(sub-config-gov-test-resources) +# ArmTemplateParameters: $(AzureUSGovernmentArmTemplateParameters) +# NodeTestVersion: "10.x" +# Windows Node14 (AzureUSGovernment): +# OSVmImage: "windows-2019" +# SubscriptionConfiguration: $(sub-config-gov-test-resources) +# ArmTemplateParameters: $(AzureUSGovernmentArmTemplateParameters) +# NodeTestVersion: "14.x" +# Linux Node12 (AzureChinaCloud): +# OSVmImage: "ubuntu-18.04" +# SubscriptionConfiguration: $(sub-config-cn-test-resources) +# ArmTemplateParameters: $(AzureChinaCloudArmTemplateParameters) +# NodeTestVersion: "12.x" +# Windows Node10 (AzureChinaCloud): +# OSVmImage: "windows-2019" +# SubscriptionConfiguration: $(sub-config-cn-test-resources) +# ArmTemplateParameters: $(AzureChinaCloudArmTemplateParameters) +# NodeTestVersion: "10.x" pool: vmImage: $(OSVmImage) @@ -48,20 +55,17 @@ jobs: steps: - template: ../../eng/pipelines/templates/steps/common.yml - - task: NodeTool@0 - displayName: Use Node $(NodeVersion) - inputs: - versionSpec: $(NodeVersion) + - template: ../../eng/pipelines/templates/steps/use-node-version.yml + parameters: + NodeVersion: $(NodeTestVersion) - pwsh: npm install -g workingDirectory: $(Build.SourcesDirectory)/common/tools/dev-tool displayName: Install dev-tool - # New-TestResources command requires Az module - - pwsh: Install-Module -Name Az -Scope CurrentUser -AllowClobber -Force -Verbose - displayName: Install Azure PowerShell module - - pwsh: | + $(Build.SourcesDirectory)/eng/common/TestResources/Import-AzModules.ps1 + $subscriptionConfiguration = @" $(SubscriptionConfiguration) "@ | ConvertFrom-Json -AsHashtable; @@ -69,6 +73,7 @@ jobs: ./Initialize-SmokeTests.ps1 ` -CI ` -Verbose ` + -Location '$(Location)' ` @subscriptionConfiguration ` -AdditionalParameters $(ArmTemplateParameters) workingDirectory: $(Build.SourcesDirectory)/common/smoke-test diff --git a/common/tools/dev-tool/package.json b/common/tools/dev-tool/package.json index a019a27f1272..a6e0be32152b 100644 --- a/common/tools/dev-tool/package.json +++ b/common/tools/dev-tool/package.json @@ -42,6 +42,10 @@ }, "devDependencies": { "@azure/eslint-plugin-azure-sdk": "^3.0.0", + "@rollup/plugin-commonjs": "11.0.2", + "@rollup/plugin-json": "^4.0.0", + "@rollup/plugin-multi-entry": "^3.0.0", + "@rollup/plugin-node-resolve": "^8.0.0", "@types/chai": "^4.1.6", "@types/chai-as-promised": "^7.1.0", "@types/chalk": "~2.2.0", @@ -52,10 +56,16 @@ "@types/prettier": "~2.0.1", "@typescript-eslint/eslint-plugin": "^2.0.0", "@typescript-eslint/parser": "^2.0.0", + "builtin-modules": "~3.1.0", "chai": "^4.2.0", "chai-as-promised": "^7.1.1", "eslint": "^6.1.0", "mocha": "^7.1.1", - "rimraf": "^3.0.0" + "rimraf": "^3.0.0", + "rollup": "^1.16.3", + "rollup-plugin-node-builtins": "~2.1.2", + "rollup-plugin-node-globals": "~1.4.0", + "rollup-plugin-sourcemaps": "^0.4.2", + "rollup-plugin-visualizer": "^4.0.4" } } diff --git a/common/tools/dev-tool/shared-config/rollup.js b/common/tools/dev-tool/shared-config/rollup.js new file mode 100644 index 000000000000..6e1ba578783f --- /dev/null +++ b/common/tools/dev-tool/shared-config/rollup.js @@ -0,0 +1,14 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +// This shim file simply loads ts-node and then requires the +// TypeScript file corresponding to the rollup base config + +const { join } = require("path"); + +require("ts-node").register({ + transpileOnly: true, + project: join(__dirname, "../tsconfig.json") +}); + +module.exports = require(join(__dirname, "../src/config/rollup.base.config.ts")); diff --git a/common/tools/dev-tool/src/ambient.d.ts b/common/tools/dev-tool/src/ambient.d.ts new file mode 100644 index 000000000000..63f7ab723bbf --- /dev/null +++ b/common/tools/dev-tool/src/ambient.d.ts @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation +// Licensed under the MIT license. + +/** + * Some delcarations for plugins that have missing/old declarations in + * NPM. + */ + +// #region rollup + +type Plugin = import("rollup").Plugin; + +/** + * An input defined by a set of files to be included and a set of + * files to exclude, where exclusion has priority. The final set + * of inputs will be the files matched by includes that are not + * also matched by excludes. + */ +interface ExtendedInput { + include: string[]; + exclude: string[]; +} + +/** + * Rollup Options, extended to support multi-entry + */ +type RollupOptions = Omit & { + input: string | string[] | ExtendedInput; +} + +declare module "rollup-plugin-sourcemaps" { + export default function(): Plugin; +} + +declare module "rollup-plugin-node-globals" { + export default function(): Plugin; +} + +declare module "rollup-plugin-node-builtins" { + export default function(): Plugin; +} + +declare module "@rollup/plugin-multi-entry" { + interface MultiEntryOptions { + exports: boolean; + } + export default function(opts: MultiEntryOptions): Plugin; +} + +// #endregion + diff --git a/common/tools/dev-tool/src/config/rollup.base.config.ts b/common/tools/dev-tool/src/config/rollup.base.config.ts new file mode 100644 index 000000000000..0bd8a057b220 --- /dev/null +++ b/common/tools/dev-tool/src/config/rollup.base.config.ts @@ -0,0 +1,137 @@ +import { RollupWarning, WarningHandler } from "rollup"; + +import nodeResolve from "@rollup/plugin-node-resolve"; +import cjs from "@rollup/plugin-commonjs"; +import sourcemaps from "rollup-plugin-sourcemaps"; +import multiEntry from "@rollup/plugin-multi-entry"; +import json from "@rollup/plugin-json"; +import nodeBuiltinsPlugin from "rollup-plugin-node-builtins"; +import nodeGlobals from "rollup-plugin-node-globals"; + +import nodeBuiltins from "builtin-modules"; + +interface PackageJson { + name: string; + module: string; + dependencies: Record; + devDependencies: Record; +} + +// #region Warning Handler + +function ignoreNiseSinonEvalWarnings(warning: RollupWarning): boolean { + return ( + warning.code === "EVAL" && + (warning.id?.includes("node_modules/nise") || warning.id?.includes("node_modules/sinon")) === + true + ); +} + +function ignoreChaiCircularDependencyWarnings(warning: RollupWarning): boolean { + return ( + warning.code === "CIRCULAR_DEPENDENCY" && + warning.importer?.includes("node_modules/chai") === true + ); +} + +const warningInhibitors: Array<(warning: RollupWarning) => boolean> = [ + ignoreChaiCircularDependencyWarnings, + ignoreNiseSinonEvalWarnings +]; + +/** + * Construct a warning handler for the shared rollup configuration + * that ignores certain warnings that are not relevant to testing. + */ +function makeOnWarnForTesting(): (warning: RollupWarning, warn: WarningHandler) => void { + return (warning, warn) => { + // If every inhibitor returns false (i.e. no inhibitors), then show the warning + if (warningInhibitors.every((inhib) => !inhib(warning))) { + warn(warning); + } + }; +} + +// #endregion + +function makeBrowserTestConfig() { + const config: RollupOptions = { + input: { + include: ["dist-esm/test/**/*.spec.js"], + exclude: ["dist-esm/test/**/node/*.spec.js"] + }, + output: { + file: `dist-test/index.browser.js`, + format: "umd", + sourcemap: true, + globals: { "fs-extra": "undefined" } + }, + preserveSymlinks: false, + // fs-extra must be marked as external in order to avoid an initialization error + external: ["fs-extra"], + plugins: [ + multiEntry({ exports: false }), + nodeResolve({ + mainFields: ["module", "browser"], + preferBuiltins: true + }), + cjs({ + namedExports: { + chai: ["assert", "use"], + "@opentelemetry/api": ["CanonicalCode", "SpanKind", "TraceFlags"] + } + }), + json(), + sourcemaps(), + nodeGlobals(), + nodeBuiltinsPlugin() + //viz({ filename: "dist-test/browser-stats.html", sourcemap: true }) + ], + onwarn: makeOnWarnForTesting(), + // Disable tree-shaking of test code. In rollup-plugin-node-resolve@5.0.0, + // rollup started respecting the "sideEffects" field in package.json. Since + // our package.json sets "sideEffects=false", this also applies to test + // code, which causes all tests to be removed by tree-shaking. + treeshake: false + }; + + // (config.external as string[]).push(...Object.keys(pkg.devDependencies)); + + return config; +} + +export interface ConfigurationOptions { + disableBrowserBundle: boolean; +} + +const defaultConfigurationOptions: ConfigurationOptions = { + disableBrowserBundle: false +}; + +export function makeConfig(pkg: PackageJson, options?: Partial) { + options = { + ...defaultConfigurationOptions, + ...(options ?? {}) + }; + + const baseConfig = { + // Use the package's module field if it has one + input: pkg["module"] ?? "dist-esm/src/index.js", + external: [ + ...nodeBuiltins, + ...Object.keys(pkg.dependencies), + ...Object.keys(pkg.devDependencies) + ], + output: { file: "dist/index.js", format: "cjs", sourcemap: true }, + preserveSymlinks: false, + plugins: [sourcemaps(), nodeResolve(), cjs()] + }; + + const config: RollupOptions[] = [baseConfig as RollupOptions]; + + if (!options.disableBrowserBundle) { + config.push(makeBrowserTestConfig()); + } + + return config; +} diff --git a/common/tools/eslint-plugin-azure-sdk/README.md b/common/tools/eslint-plugin-azure-sdk/README.md index bb56322a27fa..317656be5816 100644 --- a/common/tools/eslint-plugin-azure-sdk/README.md +++ b/common/tools/eslint-plugin-azure-sdk/README.md @@ -4,7 +4,7 @@ An ESLint plugin enforcing [design guidelines for the JavaScript/TypeScript Azur ## Installation -You'll first need to install [ESLint](http://eslint.org): +You'll first need to install [ESLint](https://eslint.org): ```shell npm i eslint --save-dev @@ -16,11 +16,9 @@ Next, install `@azure/eslint-plugin-azure-sdk`: npm install @azure/eslint-plugin-azure-sdk --save-dev ``` -## Usage +## Configuration -The `azure-sdk-for-js` repository contains a base `.eslintrc.json` file at the root of the `sdk` directory. - -To enable `@azure/eslint-plugin-azure-sdk`, you'll need to add another `.eslintrc.json` file at the same location as your `package.json` file as follows: (note that the path to the base `.eslintrc.json` file may be different) +To enable `@azure/eslint-plugin-azure-sdk`, you'll need to add it to the list of `devDependencies` in your `package.json`. ESLint will automatically use the configuration file `sdk/.eslintrc.json` as explained in the [docs](https://eslint.org/docs/user-guide/configuring#using-configuration-files-2). Optionally, you can have a custom `.eslintrc.json` file at the same location as your `package.json` file. A very simple one looks as follows: (note that the path to the base `.eslintrc.json` file may be different) ```json { diff --git a/common/tools/eslint-plugin-azure-sdk/docs/rules/ts-naming-options.md b/common/tools/eslint-plugin-azure-sdk/docs/rules/ts-naming-options.md index 2e24a43f564b..50c083796dc2 100644 --- a/common/tools/eslint-plugin-azure-sdk/docs/rules/ts-naming-options.md +++ b/common/tools/eslint-plugin-azure-sdk/docs/rules/ts-naming-options.md @@ -8,6 +8,9 @@ Requires client method options parameter types to be suffixed with `Options` and ```ts class ServiceClient { + constructor(options: ServiceClientOptions) { + /* code */ + } createItem(options: CreateItemOptions): Item { /* code to return instance of Item */ } @@ -21,6 +24,9 @@ class ServiceClient { ```ts class ServiceClient { + constructor(options: Options) { + /* code */ + } createItem(options: Options): Item { /* code to return instance of Item */ } diff --git a/common/tools/eslint-plugin-azure-sdk/docs/rules/ts-package-json-files-required.md b/common/tools/eslint-plugin-azure-sdk/docs/rules/ts-package-json-files-required.md index 0063af5de3f9..b18d680f1c59 100644 --- a/common/tools/eslint-plugin-azure-sdk/docs/rules/ts-package-json-files-required.md +++ b/common/tools/eslint-plugin-azure-sdk/docs/rules/ts-package-json-files-required.md @@ -12,41 +12,25 @@ This rule is fixable using the `--fix` option. ```json { - "files": [ - "dist", - "dist-esm/src" - "src" - ] + "files": ["dist", "dist-esm/src"] } ``` ```json { - "files": [ - "./dist", - "./dist-esm/src" - "./src" - ] + "files": ["./dist", "./dist-esm/src"] } ``` ```json { - "files": [ - "dist/", - "dist-esm/src/" - "src/" - ] + "files": ["dist/", "dist-esm/"] } ``` ```json { - "files": [ - "dist/lib", - "dist-esm/src/lib" - "src/lib" - ] + "files": ["dist/lib", "dist-esm/src/lib"] } ``` @@ -54,7 +38,7 @@ This rule is fixable using the `--fix` option. ```json { - "files": ["dist", "dist-esm/src"] + "files": ["dist", "src"] } ``` diff --git a/common/tools/eslint-plugin-azure-sdk/package.json b/common/tools/eslint-plugin-azure-sdk/package.json index 44bd6d4b2183..7127890b56db 100644 --- a/common/tools/eslint-plugin-azure-sdk/package.json +++ b/common/tools/eslint-plugin-azure-sdk/package.json @@ -21,14 +21,14 @@ } ], "license": "MIT", - "homepage": "https://github.com/Azure/azure-sdk-tools/tree/master/tools/eslint-plugin-azure-sdk", + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/common/tools/eslint-plugin-azure-sdk", "repository": { "type": "git", - "url": "https://github.com/Azure/azure-sdk-tools.git", - "directory": "tools/eslint-plugin-azure-sdk" + "url": "https://github.com/Azure/azure-sdk-for-js.git", + "directory": "common/tools/eslint-plugin-azure-sdk" }, "bugs": { - "url": "https://github.com/Azure/azure-sdk-tools/issues" + "url": "https://github.com/Azure/azure-sdk-for-js/issues" }, "main": "dist/index.js", "files": [ diff --git a/common/tools/eslint-plugin-azure-sdk/src/rules/ts-naming-options.ts b/common/tools/eslint-plugin-azure-sdk/src/rules/ts-naming-options.ts index afad7fee1208..1303e07ade0c 100644 --- a/common/tools/eslint-plugin-azure-sdk/src/rules/ts-naming-options.ts +++ b/common/tools/eslint-plugin-azure-sdk/src/rules/ts-naming-options.ts @@ -2,7 +2,7 @@ // Licensed under the MIT license. /** - * @file Rule to require client method option parameter type names to be suffixed with Options and prefixed with the method name. + * @file Rule to require client method option parameter type names to be suffixed with Options and prefixed with the class name if it is a class constructor and prefixed with the method name otherwise. * @author Arpan Laha */ @@ -33,7 +33,12 @@ export = { getPublicMethods(node).forEach((method: MethodDefinition): void => { const methodIdentifier = method.key as Identifier; const TSFunction = method.value as TSESTree.FunctionExpression; - + const optionsRegex = + // the null check will always succeed because we apply this only for + // classes where id.name=/Client$/. + method.kind === "constructor" && node.id !== null + ? new RegExp(`${node.id.name}Options`, "i") + : new RegExp(`${methodIdentifier.name}Options`, "i"); // look for parameters with types suffixed with Options TSFunction.params.forEach((param: TSESTree.Parameter): void => { // checks to validate parameter @@ -46,11 +51,11 @@ export = { const paramTypeName = typeAnnotation.typeName.name; if (paramTypeName.endsWith("Options")) { // check that parameter is prefixed with method name - const optionsRegex = new RegExp(`${methodIdentifier.name}Options`, "i"); if (!optionsRegex.test(paramTypeName)) { + const prefixKind = method.kind === "constructor" ? "class" : "method"; context.report({ node: param, - message: "options parameter type is not prefixed with the method name" + message: `options parameter type is not prefixed with the ${prefixKind} name` }); } } diff --git a/common/tools/eslint-plugin-azure-sdk/src/rules/ts-package-json-files-required.ts b/common/tools/eslint-plugin-azure-sdk/src/rules/ts-package-json-files-required.ts index f6e92ed265d4..64963cb8e4aa 100644 --- a/common/tools/eslint-plugin-azure-sdk/src/rules/ts-package-json-files-required.ts +++ b/common/tools/eslint-plugin-azure-sdk/src/rules/ts-package-json-files-required.ts @@ -2,7 +2,7 @@ // Licensed under the MIT license. /** - * @file Rule to force package.json's files value to contain paths to the package contents. + * @file Rule to force package.json's files value to contain paths to the package contents and excludes source code files. * @author Arpan Laha */ @@ -14,6 +14,21 @@ import { arrayToString, getRuleMetaData, getVerifiers, stripPath } from "../util // Rule Definition //------------------------------------------------------------------------------ +let requiredPatternSuggestionMap: Map = new Map(); +function addRequiredPattern(pattern: string, suggestion?: string): void { + requiredPatternSuggestionMap.set(pattern, suggestion); +} + +/** + * The rule is configurable by those two vars, where badPatterns is the list of + * patterns that should not be in package.json's files list and requiredPatterns + * is the list of patterns that should be. + */ +const badPatterns = ["src"]; +addRequiredPattern("dist"); +addRequiredPattern("dist-esm", "src"); +const requiredPatterns = Array.from(requiredPatternSuggestionMap.keys()); + export = { meta: getRuleMetaData( "ts-package-json-files-required", @@ -31,7 +46,6 @@ export = { // check to see if files exists at the outermost level "ExpressionStatement > ObjectExpression": verifiers.existsInFile, - // check that files contains dist, dist-esm, and src "ExpressionStatement > ObjectExpression > Property[key.value='files']": ( node: Property ): void => { @@ -44,40 +58,69 @@ export = { return; } + // sorting the patterns descendingly so in cases of overlap between + // pattern (e.g. dist and dist-esm), the regex tries to match the + // longer first. + const regExprStr = `^(?:.\/)?(${badPatterns + .concat(requiredPatterns) + .sort() + .reverse() + .join("|")})(?:\/)?(?:.+)?`; + const nodeValue = node.value; - const elements = nodeValue.elements as Literal[]; - const elementValues = elements.map((element: Literal): unknown => element.value); + let filesList = (nodeValue.elements as Literal[]).map( + (element): unknown => element.value + ); - // looks for 'dist' with optional leading './' and optional trailing '/' - if ( - elements.every( - (element: Literal): boolean => - !/^(.\/)?((dist\/)|(dist$))/.test(element.value as string) - ) - ) { - context.report({ - node: nodeValue, - message: "dist is not included in files", - fix: (fixer: Rule.RuleFixer): Rule.Fix => { - elementValues.push("dist"); - return fixer.replaceText(nodeValue, arrayToString(elementValues)); + let currBadPatterns: string[] = []; + let currRequiredPatterns = [...requiredPatterns]; + const fullMatchIndex = 0; + const patternRootMatchIndex = 1; + // Looking for both required and bad patterns + for (const filePattern of filesList) { + const patternMatchResult = (filePattern as string).match(regExprStr); + if (patternMatchResult !== null) { + const patternRoot = patternMatchResult[patternRootMatchIndex]; + if (badPatterns.indexOf(patternRoot) >= 0) { + currBadPatterns.push(patternMatchResult[fullMatchIndex]); + } else if (requiredPatterns.indexOf(patternRoot) >= 0) { + currRequiredPatterns.splice(currRequiredPatterns.indexOf(patternRoot), 1); } - }); + } } - - // looks for 'dist-esm/src' with optional leading './' and optional trailing '/' - if ( - elements.every( - (element: Literal): boolean => - !/^(.\/)?dist-esm\/((src\/)|(src$))/.test(element.value as string) - ) - ) { + let errorMessage = ""; + // Make sure there are no bad patterns, but if there are, create + // a meaningful error message for them and remove them from the + // files list + if (currBadPatterns.length > 0) { + errorMessage = `${currBadPatterns.join()} ${ + currBadPatterns.length === 1 ? "is" : "are" + } included in files`; + filesList = filesList.filter( + (filePattern) => currBadPatterns.indexOf(filePattern as string) < 0 + ); + } + // If there are required patterns missing from the files' list, + // create a meaningful error message and add them to the list (with + // the default suggestion) + if (currRequiredPatterns.length > 0) { + updateFixRequiredPatterns(currRequiredPatterns); + filesList = filesList.concat(currRequiredPatterns); + if (errorMessage.length > 0) { + errorMessage = errorMessage + " and "; + } + errorMessage = + errorMessage + + `${currRequiredPatterns.join()} ${ + currRequiredPatterns.length === 1 ? "is" : "are" + } not included in files`; + } + if (errorMessage.length > 0) { context.report({ node: nodeValue, - message: "dist-esm/src is not included in files", + message: errorMessage, fix: (fixer: Rule.RuleFixer): Rule.Fix => { - elementValues.push("dist-esm/src"); - return fixer.replaceText(nodeValue, arrayToString(elementValues)); + return fixer.replaceText(nodeValue, arrayToString(filesList)); } }); } @@ -86,3 +129,27 @@ export = { : {}; } }; + +/** + * Creates the more specific and recommended pattern that will be added to the + * files list by the fixer. + * @param pat - A pattern that is missing from the files list + */ +function buildFixRequiredPattern(pat: string): string { + return requiredPatternSuggestionMap.get(pat) !== undefined + ? pat + "/" + requiredPatternSuggestionMap.get(pat) + : pat; +} + +/** + * Updates the patterns in the input list to be the more specific and + * recommended patterns. + * @param currRequiredPatterns - A list of patterns that are required + * but missing from the files list + */ +function updateFixRequiredPatterns(currRequiredPatterns: string[]): void { + for (let i = 0; i < currRequiredPatterns.length; ++i) { + const pat = currRequiredPatterns[i]; + currRequiredPatterns[i] = buildFixRequiredPattern(pat); + } +} diff --git a/common/tools/eslint-plugin-azure-sdk/src/utils/metadata.ts b/common/tools/eslint-plugin-azure-sdk/src/utils/metadata.ts index f849aa75f257..e4e67fd677da 100644 --- a/common/tools/eslint-plugin-azure-sdk/src/utils/metadata.ts +++ b/common/tools/eslint-plugin-azure-sdk/src/utils/metadata.ts @@ -19,7 +19,7 @@ export const getRuleMetaData = ( description: ruleDescription, category: "Best Practices", recommended: true, - url: `https://github.com/Azure/azure-sdk-tools/blob/master/tools/eslint-plugin-azure-sdk/docs/rules/${ruleName}.md` + url: `https://github.com/Azure/azure-sdk-for-js/tree/master/common/tools/eslint-plugin-azure-sdk/docs/rules/${ruleName}.md` }, schema: [] }; diff --git a/common/tools/eslint-plugin-azure-sdk/tests/rules/ts-naming-options.ts b/common/tools/eslint-plugin-azure-sdk/tests/rules/ts-naming-options.ts index 2893856a73ec..128c8fe7a171 100644 --- a/common/tools/eslint-plugin-azure-sdk/tests/rules/ts-naming-options.ts +++ b/common/tools/eslint-plugin-azure-sdk/tests/rules/ts-naming-options.ts @@ -32,6 +32,10 @@ ruleTester.run("ts-naming-options", rule, { code: "class ExampleClient { createExample(options: CreateExampleOptions) {}; upsertExample(options: UpsertExampleOptions) {}; };" }, + // class constructor + { + code: "class ExampleClient { constructor(options: ExampleClientOptions) {}; };" + }, // not a client { code: "class Example { createExample(options: Options) {}; };" @@ -45,6 +49,14 @@ ruleTester.run("ts-naming-options", rule, { message: "options parameter type is not prefixed with the method name" } ] + }, + { + code: "class ExampleClient { constructor(options: Options) {}; };", + errors: [ + { + message: "options parameter type is not prefixed with the class name" + } + ] } ] }); diff --git a/common/tools/eslint-plugin-azure-sdk/tests/rules/ts-package-json-files-required.ts b/common/tools/eslint-plugin-azure-sdk/tests/rules/ts-package-json-files-required.ts index 9d272f537b78..d96ceb349ef9 100644 --- a/common/tools/eslint-plugin-azure-sdk/tests/rules/ts-package-json-files-required.ts +++ b/common/tools/eslint-plugin-azure-sdk/tests/rules/ts-package-json-files-required.ts @@ -309,20 +309,20 @@ ruleTester.run("ts-package-json-files-required", rule, { filename: "package.json", errors: [ { - message: "dist-esm/src is not included in files" + message: "src is included in files and dist-esm/src is not included in files" } ], - output: '{"files": ["dist", "src", "dist-esm/src"]}' + output: '{"files": ["dist", "dist-esm/src"]}' }, { code: '{"files": ["src", "dist-esm/src"]}', filename: "package.json", errors: [ { - message: "dist is not included in files" + message: "src is included in files and dist is not included in files" } ], - output: '{"files": ["src", "dist-esm/src", "dist"]}' + output: '{"files": ["dist-esm/src", "dist"]}' }, { code: '{"files": ["dist"]}', @@ -349,13 +349,10 @@ ruleTester.run("ts-package-json-files-required", rule, { filename: "package.json", errors: [ { - message: "dist is not included in files" - }, - { - message: "dist-esm/src is not included in files" + message: "dist,dist-esm/src are not included in files" } ], - output: '{"files": ["dist"]}' + output: '{"files": ["dist", "dist-esm/src"]}' }, { // example file with src not in files @@ -363,12 +360,9 @@ ruleTester.run("ts-package-json-files-required", rule, { filename: "package.json", errors: [ { - message: "dist is not included in files" - }, - { - message: "dist-esm/src is not included in files" + message: "dist,dist-esm/src are not included in files" } ] } ] -}); +}); \ No newline at end of file diff --git a/dataplane.code-workspace b/dataplane.code-workspace index 03a59dcee4d6..fd31357c4d8e 100644 --- a/dataplane.code-workspace +++ b/dataplane.code-workspace @@ -104,6 +104,10 @@ "name": "logger", "path": "sdk/core/logger" }, + { + "name": "metrics-advisor", + "path": "sdk\\metricsadvisor\\ai-metrics-advisor" + }, { "name": "search", "path": "sdk/search/search-documents" @@ -161,7 +165,7 @@ "path": "sdk/test-utils/perfstress" }, { - "path": "sdk\\digitaltwins\\digital-twins" + "path": "sdk\\digitaltwins\\digital-twins-core" } ], "settings": { diff --git a/documentation/Bundling.md b/documentation/Bundling.md index af10e646ab15..a521dacbb853 100644 --- a/documentation/Bundling.md +++ b/documentation/Bundling.md @@ -365,7 +365,7 @@ Once this is done, you can use parcel by configuring your project in the way tha ### Parcel with Javascript -Parcel uses [browserslist](https://github.com/browserslist/browserslist) to configure what polyfills are needed when bundling. Azure SDK libraries generally target the ES2015 version of JavaScript and use some modern features of JavaScript, including [generators](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function*), so let's edit `package.json` to target the latest version of three popular browsers: +Parcel uses [browserslist](https://github.com/browserslist/browserslist) to configure what polyfills are needed when bundling. Azure SDK libraries generally target the ES2015 version of JavaScript and use some modern features of JavaScript, including [generators](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function*), so let's edit `package.json` to target the latest version of three popular browsers: ```json "browserslist": [ @@ -413,7 +413,7 @@ This will emit a compiled version of `index.html`, as well as any included scrip ### Parcel with TypeScript -Parcel uses [browserslist](https://github.com/browserslist/browserslist) to configure what polyfills are needed when bundling. The Azure SDK uses some modern features of JavaScript, including [async functions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function), so let's edit `package.json` to target the latest version of three popular browsers: +Parcel uses [browserslist](https://github.com/browserslist/browserslist) to configure what polyfills are needed when bundling. The Azure SDK uses some modern features of JavaScript, including [async functions](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/async_function), so let's edit `package.json` to target the latest version of three popular browsers: ```json "browserslist": [ diff --git a/documentation/using-azure-identity.md b/documentation/using-azure-identity.md index 46a5c364e1b9..b32edfe0b715 100644 --- a/documentation/using-azure-identity.md +++ b/documentation/using-azure-identity.md @@ -2,10 +2,10 @@ This document intends to demystify the configuration and use of [Microsoft identity -platform](https://docs.microsoft.com/en-us/azure/active-directory/develop/), +platform](https://docs.microsoft.com/azure/active-directory/develop/), also known as Azure Active Directory v2, with the Azure SDK libraries. Microsoft identity platform implements the [OAuth 2.0 and OpenID Connect -standards](https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-v2-protocols) +standards](https://docs.microsoft.com/azure/active-directory/develop/active-directory-v2-protocols) to provide authentication for users and services who may be granted access to Azure services. @@ -26,12 +26,12 @@ tenant. A "tenant" is basically instance of Azure Active Directory associated with your Azure account. You can follow the instructions on [this quick start guide for setting up a -tenant](https://docs.microsoft.com/en-us/azure/active-directory/develop/quickstart-create-new-tenant) +tenant](https://docs.microsoft.com/azure/active-directory/develop/quickstart-create-new-tenant) to check if you have AAD tenant already or, if not, create one. Once you have a tenant, you can create an app registration by following [this quickstart guide for app -registrations](https://docs.microsoft.com/en-us/azure/active-directory/develop/quickstart-register-app). +registrations](https://docs.microsoft.com/azure/active-directory/develop/quickstart-register-app). Your app registration holds the configuration for how your application will authenticate users and services, so it's very important to it set up correctly before using any of the credential types below. The section on each credential @@ -47,7 +47,7 @@ inside of your AAD tenant or if you'd like other organizations and individuals to use it. The [app registration quickstart -guide](https://docs.microsoft.com/en-us/azure/active-directory/develop/quickstart-register-app#register-a-new-application-using-the-azure-portal) +guide](https://docs.microsoft.com/azure/active-directory/develop/quickstart-register-app#register-a-new-application-using-the-azure-portal) gives a helpful breakdown for the various tenancy options in the "Supported account types" documentation. @@ -62,7 +62,7 @@ serve different use cases and application types. A primary differentiator between these flows is whether the "client" that initiates the flow is running on a user device or on a system managed by the application developer (like a web server). The [Microsoft Authentication -Library](https://docs.microsoft.com/en-us/azure/active-directory/develop/msal-client-applications) +Library](https://docs.microsoft.com/azure/active-directory/develop/msal-client-applications) documentation describes this distinction as _public_ versus _confidential_ clients. @@ -70,7 +70,7 @@ Most of the credential types are strictly public or confidential as they serve a specific purpose, like authenticating a backend service for use with storage APIs. Some credentials may be both public or confidential depending on how you configure them. For example, the [authorization code -flow](https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-auth-code-flow) +flow](https://docs.microsoft.com/azure/active-directory/develop/v2-oauth2-auth-code-flow) can be initiated from a mobile application _or_ from within a web application running in a server. @@ -106,7 +106,7 @@ environment?** The identity platform provides an authorization model for Azure services with [two types of -permissions](https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-permissions-and-consent#troubleshooting-permissions-and-consent): +permissions](https://docs.microsoft.com/azure/active-directory/develop/v2-permissions-and-consent#troubleshooting-permissions-and-consent): - **Application permissions** authorize an application to access resources directly. Administrator consent must be granted to your application. @@ -120,7 +120,7 @@ with a _public credential_, you must configure API permissions for the Azure service you need to access (Key Vault, Storage, etc) so that user accounts can be authorized to use them through your application. The [quick start guide for configuring API -permissions](https://docs.microsoft.com/en-us/azure/active-directory/develop/quickstart-configure-app-access-web-apis) +permissions](https://docs.microsoft.com/azure/active-directory/develop/quickstart-configure-app-access-web-apis) explains how to do this in detail. ### User-Granted Consent @@ -130,19 +130,19 @@ delegated permissions, they may be presented with a consent screen that asks whether they want to grant your application permission to access resources on their behalf. An example of this consent flow can be found in the [consent framework documentation -page](https://docs.microsoft.com/en-us/azure/active-directory/develop/consent-framework). +page](https://docs.microsoft.com/azure/active-directory/develop/consent-framework). An administrator can also grant consent for your application on behalf of all users. In this case, users may never see a consent screen. If you'd like to make it easy for an administrator to grant access to all users, follow the instructions in the [admin consent endpoint request -documentation](https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-permissions-and-consent#request-the-permissions-from-a-directory-admin). +documentation](https://docs.microsoft.com/azure/active-directory/develop/v2-permissions-and-consent#request-the-permissions-from-a-directory-admin). There are some cases where a user may not be allowed to grant consent to an application. When this occurs, the user may have to speak with an administrator to have the permissions granted on their behalf. The [user consent troubleshooting -page](https://docs.microsoft.com/en-us/azure/active-directory/manage-apps/application-sign-in-unexpected-user-consent-error) +page](https://docs.microsoft.com/azure/active-directory/manage-apps/application-sign-in-unexpected-user-consent-error) provides more details on the consent errors a user might encounter. ## Credential Types in @azure/identity @@ -150,7 +150,7 @@ provides more details on the consent errors a user might encounter. ### ClientSecretCredential and ClientCertificateCredential The `ClientSecretCredential` implements the [client credentials -flow](https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-client-creds-grant-flow) +flow](https://docs.microsoft.com/azure/active-directory/develop/v2-oauth2-client-creds-grant-flow) to enable confidential clients, like web services, to access Azure resources. To use this credential, you will need to create a client secret using the "Certificates & secrets" page for your app registration. @@ -159,7 +159,7 @@ The `ClientCertificateCredential` implements the same client credentials flow, but instead uses a certificate as the means to authenticate the client. You must must generate your own PEM-formatted certificate for use in this flow and then [register -it](https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-certificate-credentials#register-your-certificate-with-azure-ad) +it](https://docs.microsoft.com/azure/active-directory/develop/active-directory-certificate-credentials#register-your-certificate-with-azure-ad) in the "Certificates & secrets" page for your app registration. Using a certificate to authenticate is recommended as it is generally more secure than using a client secret. @@ -174,7 +174,7 @@ on which credential you are using. ### UsernamePasswordCredential The `UsernamePasswordCredential` follows the [resource owner password credential -flow](https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth-ropc) +flow](https://docs.microsoft.com/azure/active-directory/develop/v2-oauth-ropc) to authenticate public or confidential clients. To use this credential, you will need the `tenantId` and `clientId` of your app and a `username` and `password` of the user you are authenticating. @@ -193,7 +193,7 @@ directly is a major security risk. > NOTE: This credential type does not work with personal Microsoft accounts or > multi-factor authentication at this time. See the -> [documentation](https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth-ropc) +> [documentation](https://docs.microsoft.com/azure/active-directory/develop/v2-oauth-ropc) > for more information. ### EnvironmentCredential @@ -228,7 +228,7 @@ application to learn how to configure environment variables for your deployment. The `ManagedIdentityCredential` takes advantage of authentication endpoints that are hosted within the virtual network of applications deployed to Azure virtual machines, App Services, Functions, Container Services, [and -more](https://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/services-support-managed-identities). +more](https://docs.microsoft.com/azure/active-directory/managed-identities-azure-resources/services-support-managed-identities). One important distinction of this credential compared to the others is that it _does not require an app registration_. This authentication scheme relates to @@ -240,10 +240,10 @@ to grant one of two types of managed identity to the resource that runs your code: - A [system-assigned - identity](https://docs.microsoft.com/en-us/azure/app-service/overview-managed-identity#adding-a-system-assigned-identity) + identity](https://docs.microsoft.com/azure/app-service/overview-managed-identity#adding-a-system-assigned-identity) which uniquely identifies your resource - A [user-assigned - identity](https://docs.microsoft.com/en-us/azure/app-service/overview-managed-identity#adding-a-user-assigned-identity) + identity](https://docs.microsoft.com/azure/app-service/overview-managed-identity#adding-a-user-assigned-identity) which can be assigned to your resource (and others) Once your resource has an identity assigned, that identity can be granted access @@ -256,15 +256,15 @@ the managed identity you wish to use for authentication. More information on configuring and using managed identities can be found in the [Managed identities for Azure -resources](https://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/overview) +resources](https://docs.microsoft.com/azure/active-directory/managed-identities-azure-resources/overview) documentation. There is also a [list of Azure -services](https://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/services-support-managed-identities#azure-services-that-support-azure-ad-authentication) +services](https://docs.microsoft.com/azure/active-directory/managed-identities-azure-resources/services-support-managed-identities#azure-services-that-support-azure-ad-authentication) that have been tested to confirm support for managed identity authentication. ### InteractiveBrowserCredential The `InteractiveBrowserCredential` follows the [implicit grant -flow](https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-implicit-grant-flow) +flow](https://docs.microsoft.com/azure/active-directory/develop/v2-oauth2-implicit-grant-flow) which enables authentication for clients that run completely in the browser. It is primarily useful for single-page web applications (SPAs) which need to authenticate to access Azure resources and APIs directly. @@ -285,7 +285,7 @@ creating an `InteractiveBrowserCredential`. ### DeviceCodeCredential The `DeviceCodeCredential` follows the [device code authorization -flow](https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-device-code) +flow](https://docs.microsoft.com/azure/active-directory/develop/v2-oauth2-device-code) which enables input-constrained devices, like TVs or IoT devices, to authenticate by having the user enter a provided "device code" into an authorization site that the user visits on another device. @@ -297,7 +297,7 @@ section of the **Authentication** page of your app registration. ### AuthorizationCodeCredential The `AuthorizationCodeCredential` follows the [authorization code -flow](https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-auth-code-flow) +flow](https://docs.microsoft.com/azure/active-directory/develop/v2-oauth2-auth-code-flow) which enables server-hosted web applications, native desktop and mobile applications, and web APIs to access resources on the user's behalf. diff --git a/eng/.docsettings.yml b/eng/.docsettings.yml index 586305ee5d71..1f7581423adb 100644 --- a/eng/.docsettings.yml +++ b/eng/.docsettings.yml @@ -3,6 +3,7 @@ omitted_paths: - eng/* - sdk/*/arm-* - sdk/cognitiveservices/* + - sdk/communication/*/test/README.md - sdk/identity/identity/test/manual/* - sdk/identity/identity/test/manual-integration/* - sdk/test-utils/perfstress/README.md @@ -12,12 +13,13 @@ omitted_paths: - sdk/eventhub/*/test/README.md - sdk/search/*/test/README.md - sdk/servicebus/*/test/README.md + - sdk/servicebus/service-bus/test/stress-test-track-2/* - sdk/schemaregistry/README.md - - sdk/servicebus/service-bus/samples-v1/* - sdk/storage/*/test/README.md - sdk/storage/storage-internal-avro/* - sdk/textanalytics/*/test/README.md - sdk/**/samples/* + - sdk/**/samples-*/* - sdk/**/swagger/* - common/* - samples/* diff --git a/eng/CHECKENFORCER b/eng/CHECKENFORCER index ff63052f2ef4..977d75d172ae 100644 --- a/eng/CHECKENFORCER +++ b/eng/CHECKENFORCER @@ -1,2 +1,58 @@ format: v0.1-alpha -minimumCheckRuns: 2 +minimumCheckRuns: 1 +timeout: 5 +message: > + This pull request is protected by [Check Enforcer](https://aka.ms/azsdk/check-enforcer). + + # What is Check Enforcer? + + Check Enforcer helps ensure all pull requests are covered by at least one + check-run (typically an Azure Pipeline). When all check-runs associated + with this pull request pass then Check Enforcer itself will pass. + + # Why am I getting this message? + + You are getting this message because Check Enforcer did not detect any + check-runs being associated with this pull request within five minutes. This + may indicate that your pull request is not covered by any pipelines and so + Check Enforcer is correctly blocking the pull request being merged. + + # What should I do now? + + If the **check-enforcer** check-run is not passing and all other check-runs + associated with this PR are passing (excluding _license-cla_) then you could + try telling _Check Enforcer_ to evaluate your pull request again. You can + do this by adding a comment to this pull request as follows: + + ``` + /check-enforcer evaluate + ``` + + Typically evaulation only takes a few seconds. If you know that your pull + request is not covered by a pipeline and this is expected you can override + Check Enforcer using the following command: + + ``` + /check-enforcer override + ``` + + Note that using the override command triggers alerts so that follow-up + investigations can occur (PRs still need to be approved as normal). + + # What if I am onboarding a new service? + + Often, new services do not have validation pipelines associated with them, + in order to bootstrap pipelines for a new service, you can issue the following + command as a pull request comment: + + ``` + /azp run prepare-pipelines + ``` + + This will run a pipeline that analyzes the source tree and creates the + pipelines necessary to build and validate your pull request. Once the pipeline + has been created you can trigger the pipeline using the following comment: + + ``` + /azp run js - [service] - ci + ``` diff --git a/eng/common/README.md b/eng/common/README.md index a8f013b05b74..f85e3396ae40 100644 --- a/eng/common/README.md +++ b/eng/common/README.md @@ -13,13 +13,14 @@ languages repos as they will be overwritten the next time an update is taken fro ### Workflow -The 'Sync eng/common directory' PRs will be created in the language repositories once a pull request that touches the eng/common directory is submitted against the master branch. This will make it easier for changes to be tested in each individual language repo before merging the changes in the azure-sdk-tools repo. The workflow is explained below: +The 'Sync eng/common directory' PRs will be created in the language repositories when a pull request that touches the eng/common directory is submitted against the master branch. This will make it easier for changes to be tested in each individual language repo before merging the changes in the azure-sdk-tools repo. The workflow is explained below: -1. Create a PR against Azure/azure-sdk-tools:master. This is the **Tools PR**. -2. `azure-sdk-tools - sync - eng-common` is run automatically. It creates **Sync PRs** in each of the connected language repositories using the format `Sync eng/common directory with azure-sdk-tools for PR {Tools PR Number}`. Each **Sync PR** will contain a link back to the **Tools PR** that triggered it. -3. More changes pushed to the **Tools PR**, will automatically triggered new pipeline runs in the respective **Sync PRs**. The **Sync PRs** are used to make sure the changes would not break any of the connected pipelines. -4. Once satisfied with the changes; - - First make sure all checks in the **Sync PRs** are green and approved. The **Tools PR** contains links to all the **Sync PRs**. If for some reason the PRs is blocked by a CI gate get someone with permission to override and manually merge the PR. - - To test the state of all the **Sync PRs**, you can download the `PRsCreated.txt` artifact from your `azure-sdk-tools - sync - eng-common` pipeline, then run `./eng/scripts/Verify-And-Merge.ps1 ` which will output the status of each associated PR. - - Next approve the `VerifyAndMerge` job for the `azure-sdk-tools - sync - eng-common` pipeline triggered by your **Tools PR** which will automatically merge all the **Sync PRs**. You need `azure-sdk` devops contributor permissions to reach the `azure-sdk-tools - sync - eng-common` pipeline. - - Finally merge the **Tools PR**. \ No newline at end of file +1. Create a PR (**Tools PR**) in the `azure-sdk-tools` repo with changes to eng/common directory. +2. `azure-sdk-tools - sync - eng-common` pipeline is triggered for the **Tools PR** +3. The `azure-sdk-tools - sync - eng-common` pipeline queues test runs for template pipelines in various languages. These help you test your changes in the **Tools PR**. +4. If there are changes in the **Tools PR** that will affect the release stage you should approve the release test pipelines by clicking the approval gate. The test (template) pipeline will automatically release the next eligible version without needing manual intervention for the versioning. Please approve your test releases as quickly as possible. A race condition may occur due to someone else queueing the pipeline and going all the way to release using your version while yours is still waiting. If this occurs manually rerun the pipeline that failed. +5. If you make additional changes to your **Tools PR** repeat steps 1 - 4 until you have completed the necessary testing of your changes. This includes full releases of the template package, if necessary. +6. Sign off on CreateSyncPRs stage of the sync pipeline using the approval gate. This stage will create the **Sync PRs** in the various language repos. A link to each of the **Sync PRs** will show up in the **Tools PR** for you to click and review. +7. Go review and approve each of your **Sync PRs**. +8. Sign Off on the VerifyAndMerge stage. This will merge any remaining open **Sync PR** and also append `auto-merge` to the **Tools PR**. + * If a **Sync PR** has any failing checks, it will need to be manually merged, even if `/check-enforcer override` has been run ([azure-sdk-tools#1147](https://github.com/Azure/azure-sdk-tools/issues/1147)). diff --git a/eng/common/TestResources/AzurePowerShellV4/Utility.ps1 b/eng/common/TestResources/AzurePowerShellV4/Utility.ps1 new file mode 100644 index 000000000000..0bac797fb14b --- /dev/null +++ b/eng/common/TestResources/AzurePowerShellV4/Utility.ps1 @@ -0,0 +1,153 @@ +# Copied from https://github.com/microsoft/azure-pipelines-tasks/blob/a1502bbe67561f5bec8402f32c997406f798a019/Tasks/AzurePowerShellV4/Utility.ps1 + +function Get-SavedModulePath { + [CmdletBinding()] + param([string] $azurePowerShellVersion) + $savedModulePath = $($env:SystemDrive + "\Modules\az_" + $azurePowerShellVersion) + Write-Verbose "The value of the module path is: $savedModulePath" + return $savedModulePath +} + +function Get-SavedModulePathLinux { + [CmdletBinding()] + param([string] $azurePowerShellVersion) + $savedModulePath = $("/usr/share/az_" + $azurePowerShellVersion) + Write-Verbose "The value of the module path is: $savedModulePath" + return $savedModulePath +} + +function Update-PSModulePathForHostedAgent { + [CmdletBinding()] + param([string] $targetAzurePs) + try { + if ($targetAzurePs) { + $hostedAgentAzModulePath = Get-SavedModulePath -azurePowerShellVersion $targetAzurePs + } + else { + $hostedAgentAzModulePath = Get-LatestModule -patternToMatch "^az_[0-9]+\.[0-9]+\.[0-9]+$" -patternToExtract "[0-9]+\.[0-9]+\.[0-9]+$" + } + $env:PSModulePath = $hostedAgentAzModulePath + ";" + $env:PSModulePath + $env:PSModulePath = $env:PSModulePath.TrimStart(';') + } finally { + Write-Verbose "The updated value of the PSModulePath is: $($env:PSModulePath)" + } +} + +function Update-PSModulePathForHostedAgentLinux { + [CmdletBinding()] + param([string] $targetAzurePs) + try { + if ($targetAzurePs) { + $hostedAgentAzModulePath = Get-SavedModulePathLinux -azurePowerShellVersion $targetAzurePs + if(!(Test-Path $hostedAgentAzModulePath)) { + Write-Verbose "No module path found with this name" + throw ("Could not find the module path with given version.") + } + } + else { + $hostedAgentAzModulePath = Get-LatestModuleLinux -patternToMatch "^az_[0-9]+\.[0-9]+\.[0-9]+$" -patternToExtract "[0-9]+\.[0-9]+\.[0-9]+$" + } + $env:PSModulePath = $hostedAgentAzModulePath + ":" + $env:PSModulePath + $env:PSModulePath = $env:PSModulePath.TrimStart(':') + } finally { + Write-Verbose "The updated value of the PSModulePath is: $($env:PSModulePath)" + } +} + +function Get-LatestModule { + [CmdletBinding()] + param([string] $patternToMatch, + [string] $patternToExtract) + + $resultFolder = "" + $regexToMatch = New-Object -TypeName System.Text.RegularExpressions.Regex -ArgumentList $patternToMatch + $regexToExtract = New-Object -TypeName System.Text.RegularExpressions.Regex -ArgumentList $patternToExtract + $maxVersion = [version] "0.0.0" + $modulePath = $env:SystemDrive + "\Modules"; + + try { + if (-not (Test-Path -Path $modulePath)) { + return $resultFolder + } + + $moduleFolders = Get-ChildItem -Directory -Path $modulePath | Where-Object { $regexToMatch.IsMatch($_.Name) } + foreach ($moduleFolder in $moduleFolders) { + $moduleVersion = [version] $($regexToExtract.Match($moduleFolder.Name).Groups[0].Value) + if($moduleVersion -gt $maxVersion) { + $modulePath = [System.IO.Path]::Combine($moduleFolder.FullName,"Az\$moduleVersion\Az.psm1") + + if(Test-Path -LiteralPath $modulePath -PathType Leaf) { + $maxVersion = $moduleVersion + $resultFolder = $moduleFolder.FullName + } else { + Write-Verbose "A folder matching the module folder pattern was found at $($moduleFolder.FullName) but didn't contain a valid module file" + } + } + } + } + catch { + Write-Verbose "Attempting to find the Latest Module Folder failed with the error: $($_.Exception.Message)" + $resultFolder = "" + } + Write-Verbose "Latest module folder detected: $resultFolder" + return $resultFolder +} + +function Get-LatestModuleLinux { + [CmdletBinding()] + param([string] $patternToMatch, + [string] $patternToExtract) + + $resultFolder = "" + $regexToMatch = New-Object -TypeName System.Text.RegularExpressions.Regex -ArgumentList $patternToMatch + $regexToExtract = New-Object -TypeName System.Text.RegularExpressions.Regex -ArgumentList $patternToExtract + $maxVersion = [version] "0.0.0" + + try { + $moduleFolders = Get-ChildItem -Directory -Path $("/usr/share") | Where-Object { $regexToMatch.IsMatch($_.Name) } + foreach ($moduleFolder in $moduleFolders) { + $moduleVersion = [version] $($regexToExtract.Match($moduleFolder.Name).Groups[0].Value) + if($moduleVersion -gt $maxVersion) { + $modulePath = [System.IO.Path]::Combine($moduleFolder.FullName,"Az/$moduleVersion/Az.psm1") + + if(Test-Path -LiteralPath $modulePath -PathType Leaf) { + $maxVersion = $moduleVersion + $resultFolder = $moduleFolder.FullName + } else { + Write-Verbose "A folder matching the module folder pattern was found at $($moduleFolder.FullName) but didn't contain a valid module file" + } + } + } + } + catch { + Write-Verbose "Attempting to find the Latest Module Folder failed with the error: $($_.Exception.Message)" + $resultFolder = "" + } + Write-Verbose "Latest module folder detected: $resultFolder" + return $resultFolder +} + +function CleanUp-PSModulePathForHostedAgent { + # Clean up PSModulePath for hosted agent + $azureRMModulePath = "C:\Modules\azurerm_2.1.0" + $azureModulePath = "C:\Modules\azure_2.1.0" + $azPSModulePath = $env:PSModulePath + + if ($azPSModulePath.split(";") -contains $azureRMModulePath) { + $azPSModulePath = (($azPSModulePath).Split(";") | ? { $_ -ne $azureRMModulePath }) -join ";" + write-verbose "$azureRMModulePath removed. Restart the prompt for the changes to take effect." + } + else { + write-verbose "$azureRMModulePath is not present in $azPSModulePath" + } + + if ($azPSModulePath.split(";") -contains $azureModulePath) { + $azPSModulePath = (($azPSModulePath).Split(";") | ? { $_ -ne $azureModulePath }) -join ";" + write-verbose "$azureModulePath removed. Restart the prompt for the changes to take effect." + } + else { + write-verbose "$azureModulePath is not present in $azPSModulePath" + } + + $env:PSModulePath = $azPSModulePath +} diff --git a/eng/common/TestResources/Import-AzModules.ps1 b/eng/common/TestResources/Import-AzModules.ps1 new file mode 100644 index 000000000000..3cd7b3124489 --- /dev/null +++ b/eng/common/TestResources/Import-AzModules.ps1 @@ -0,0 +1,11 @@ +. "$PSScriptRoot/AzurePowerShellV4/Utility.ps1" + +if ($IsWindows) { + # Copied from https://github.com/microsoft/azure-pipelines-tasks/blob/9cc8e1b3ee37dc023c81290de1dd522b77faccf7/Tasks/AzurePowerShellV4/AzurePowerShell.ps1#L57-L58 + CleanUp-PSModulePathForHostedAgent + Update-PSModulePathForHostedAgent +} +else { + # Copied from https://github.com/microsoft/azure-pipelines-tasks/blob/9cc8e1b3ee37dc023c81290de1dd522b77faccf7/Tasks/AzurePowerShellV4/InitializeAz.ps1#L16 + Update-PSModulePathForHostedAgentLinux +} diff --git a/eng/common/TestResources/New-TestResources.ps1 b/eng/common/TestResources/New-TestResources.ps1 index 0552f9dd5e7b..1fbb27309559 100644 --- a/eng/common/TestResources/New-TestResources.ps1 +++ b/eng/common/TestResources/New-TestResources.ps1 @@ -11,17 +11,17 @@ [CmdletBinding(DefaultParameterSetName = 'Default', SupportsShouldProcess = $true, ConfirmImpact = 'Medium')] param ( # Limit $BaseName to enough characters to be under limit plus prefixes, and https://docs.microsoft.com/azure/architecture/best-practices/resource-naming. - [Parameter(Mandatory = $true, Position = 0)] + [Parameter()] [ValidatePattern('^[-a-zA-Z0-9\.\(\)_]{0,80}(?<=[a-zA-Z0-9\(\)])$')] [string] $BaseName, [ValidatePattern('^[-\w\._\(\)]+$')] [string] $ResourceGroupName, - [Parameter(Mandatory = $true)] + [Parameter(Mandatory = $true, Position = 0)] [string] $ServiceDirectory, - [Parameter(Mandatory = $true)] + [Parameter()] [ValidatePattern('^[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}$')] [string] $TestApplicationId, @@ -55,7 +55,7 @@ param ( [string] $Location = '', [Parameter()] - [ValidateSet('AzureCloud', 'AzureUSGovernment', 'AzureChinaCloud')] + [ValidateSet('AzureCloud', 'AzureUSGovernment', 'AzureChinaCloud', 'Dogfood')] [string] $Environment = 'AzureCloud', [Parameter()] @@ -119,6 +119,8 @@ $root = [System.IO.Path]::Combine($repositoryRoot, "sdk", $ServiceDirectory) | R $templateFileName = 'test-resources.json' $templateFiles = @() $environmentVariables = @{} +# Azure SDK Developer Playground +$defaultSubscription = "faa080af-c1d8-40ad-9cce-e1a450ca5b57" Write-Verbose "Checking for '$templateFileName' files under '$root'" Get-ChildItem -Path $root -Filter $templateFileName -Recurse | ForEach-Object { @@ -133,6 +135,24 @@ if (!$templateFiles) { exit } +$UserName = if ($env:USER) { $env:USER } else { "${env:USERNAME}" } + +# If no base name is specified use current user name +if (!$BaseName) { + $BaseName = "$UserName$ServiceDirectory" + + Log "BaseName was not set. Using default base name: '$BaseName'" +} + +# Try detecting repos that support OutFile and defaulting to it +if (!$CI -and !$PSBoundParameters.ContainsKey('OutFile') -and $IsWindows) { + # TODO: find a better way to detect the language + if (Test-Path "$repositoryRoot/eng/service.proj") { + $OutFile = $true + Log "Detected .NET repository. Defaulting OutFile to true. Test environment settings would be stored into the file so you don't need to set environment variables manually." + } +} + # If no location is specified use safe default locations for the given # environment. If no matching environment is found $Location remains an empty # string. @@ -141,12 +161,38 @@ if (!$Location) { 'AzureCloud' = 'westus2'; 'AzureUSGovernment' = 'usgovvirginia'; 'AzureChinaCloud' = 'chinaeast2'; + 'Dogfood' = 'westus' }[$Environment] Write-Verbose "Location was not set. Using default location for environment: '$Location'" } -# Log in if requested; otherwise, the user is expected to already be authenticated via Connect-AzAccount. +# If no test application ID is specified during an interactive session, create a new service principal. +if (!$CI -and !$TestApplicationId) { + + # Make sure the user is logged in to create a service principal. + $context = Get-AzContext; + if (!$context) { + Log "You are not logged in; connecting to 'Azure SDK Developer Playground'" + $context = (Connect-AzAccount -Subscription $defaultSubscription).Context + } + + Log "TestApplicationId was not specified; creating a new service principal" + $servicePrincipal = New-AzADServicePrincipal -Role Owner + + $TestApplicationId = $servicePrincipal.ApplicationId + $TestApplicationSecret = (ConvertFrom-SecureString $servicePrincipal.Secret -AsPlainText); + + Log "Created service principal '$TestApplicationId'" + + if (!$ProvisionerApplicationId) { + $ProvisionerApplicationId = $TestApplicationId + $ProvisionerApplicationSecret = $TestApplicationSecret + $TenantId = $context.Tenant.Id + } +} + +# Log in as and run pre- and post-scripts as the provisioner service principal. if ($ProvisionerApplicationId) { $null = Disable-AzContextAutosave -Scope Process @@ -157,8 +203,7 @@ if ($ProvisionerApplicationId) { # Use the given subscription ID if provided. $subscriptionArgs = if ($SubscriptionId) { @{SubscriptionId = $SubscriptionId} - } - else { + } else { @{} } @@ -169,7 +214,7 @@ if ($ProvisionerApplicationId) { $exitActions += { Write-Verbose "Logging out of service principal '$($provisionerAccount.Context.Account)'" - # Only attempt to disconnect if the -WhatIf flag was not set. Otherwise, this call is not necessary and will fail. + # Only attempt to disconnect if the -WhatIf flag was not set. Otherwise, this call is not necessary and will fail. if ($PSCmdlet.ShouldProcess($ProvisionerApplicationId)) { $null = Disconnect-AzAccount -AzureContext $provisionerAccount.Context } @@ -214,7 +259,7 @@ $ResourceGroupName = if ($ResourceGroupName) { # Tag the resource group to be deleted after a certain number of hours if specified. $tags = @{ - Creator = if ($env:USER) { $env:USER } else { "${env:USERNAME}" } + Creator = $UserName ServiceDirectory = $ServiceDirectory } @@ -283,7 +328,7 @@ $shell, $shellExportFormat = if (($parentProcessName = (Get-Process -Id $PID).Pa } elseif (@('bash', 'csh', 'tcsh', 'zsh') -contains $parentProcessName) { 'shell', 'export {0}={1}' } else { - 'PowerShell', '$env:{0} = ''{1}''' + 'PowerShell', '${{env:{0}}} = ''{1}''' } # Deploy the templates @@ -345,10 +390,8 @@ foreach ($templateFile in $templateFiles) { } } - if ($OutFile) - { - if (!$IsWindows) - { + if ($OutFile) { + if (!$IsWindows) { Write-Host "File option is supported only on Windows" } @@ -361,17 +404,14 @@ foreach ($templateFile in $templateFiles) { Set-Content $outputFile -Value $protectedBytes -AsByteStream -Force Write-Host "Test environment settings`n $environmentText`nstored into encrypted $outputFile" - } - else - { + } else { if (!$CI) { # Write an extra new line to isolate the environment variables for easy reading. Log "Persist the following environment variables based on your detected shell ($shell):`n" } - foreach ($key in $deploymentOutputs.Keys) - { + foreach ($key in $deploymentOutputs.Keys) { $value = $deploymentOutputs[$key] $environmentVariables[$key] = $value @@ -402,7 +442,10 @@ foreach ($templateFile in $templateFiles) { $exitActions.Invoke() -return $environmentVariables +# Suppress output locally +if ($CI) { + return $environmentVariables +} <# .SYNOPSIS @@ -465,7 +508,7 @@ test resources (e.g. Role Assignments on resources). It is passed as to the ARM template as 'testApplicationOid' For more information on the relationship between AAD Applications and Service -Principals see: https://docs.microsoft.com/en-us/azure/active-directory/develop/app-objects-and-service-principals +Principals see: https://docs.microsoft.com/azure/active-directory/develop/app-objects-and-service-principals .PARAMETER TenantId The tenant ID of a service principal when a provisioner is specified. The same @@ -512,10 +555,11 @@ is based on the cloud to which the template is being deployed: * AzureCloud -> 'westus2' * AzureUSGovernment -> 'usgovvirginia' * AzureChinaCloud -> 'chinaeast2' +* Dogfood -> 'westus' .PARAMETER Environment Name of the cloud environment. The default is the Azure Public Cloud -('PublicCloud') +('AzureCloud') .PARAMETER AdditionalParameters Optional key-value pairs of parameters to pass to the ARM template(s). @@ -566,4 +610,4 @@ log redaction). .LINK Remove-TestResources.ps1 -#> \ No newline at end of file +#> diff --git a/eng/common/TestResources/New-TestResources.ps1.md b/eng/common/TestResources/New-TestResources.ps1.md index d4479294d381..c41693c87666 100644 --- a/eng/common/TestResources/New-TestResources.ps1.md +++ b/eng/common/TestResources/New-TestResources.ps1.md @@ -14,16 +14,16 @@ Deploys live test resources defined for a service directory to Azure. ### Default (Default) ``` -New-TestResources.ps1 [-BaseName] [-ResourceGroupName ] -ServiceDirectory - -TestApplicationId [-TestApplicationSecret ] [-TestApplicationOid ] +New-TestResources.ps1 [-BaseName ] [-ResourceGroupName ] [-ServiceDirectory] + [-TestApplicationId ] [-TestApplicationSecret ] [-TestApplicationOid ] [-DeleteAfterHours ] [-Location ] [-Environment ] [-AdditionalParameters ] [-CI] [-Force] [-OutFile] [-WhatIf] [-Confirm] [] ``` ### Provisioner ``` -New-TestResources.ps1 [-BaseName] [-ResourceGroupName ] -ServiceDirectory - -TestApplicationId [-TestApplicationSecret ] [-TestApplicationOid ] +New-TestResources.ps1 [-BaseName ] [-ResourceGroupName ] [-ServiceDirectory] + [-TestApplicationId ] [-TestApplicationSecret ] [-TestApplicationOid ] -TenantId [-SubscriptionId ] -ProvisionerApplicationId -ProvisionerApplicationSecret [-DeleteAfterHours ] [-Location ] [-Environment ] [-AdditionalParameters ] [-CI] [-Force] [-OutFile] [-WhatIf] [-Confirm] @@ -106,8 +106,8 @@ Type: String Parameter Sets: (All) Aliases: -Required: True -Position: 1 +Required: False +Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -140,7 +140,7 @@ Parameter Sets: (All) Aliases: Required: True -Position: Named +Position: 1 Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -159,7 +159,7 @@ Type: String Parameter Sets: (All) Aliases: -Required: True +Required: False Position: Named Default value: None Accept pipeline input: False @@ -197,7 +197,7 @@ It is passed as to the ARM template as 'testApplicationOid' For more information on the relationship between AAD Applications and Service -Principals see: https://docs.microsoft.com/en-us/azure/active-directory/develop/app-objects-and-service-principals +Principals see: https://docs.microsoft.com/azure/active-directory/develop/app-objects-and-service-principals ```yaml Type: String @@ -322,6 +322,7 @@ is based on the cloud to which the template is being deployed: * AzureCloud -\> 'westus2' * AzureUSGovernment -\> 'usgovvirginia' * AzureChinaCloud -\> 'chinaeast2' +* Dogfood -\> 'westus' ```yaml Type: String @@ -448,7 +449,7 @@ Accept wildcard characters: False ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -457,6 +458,3 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES ## RELATED LINKS - -[Remove-TestResources.ps1]() - diff --git a/eng/common/TestResources/README.md b/eng/common/TestResources/README.md index e02990d023e5..2e2d72c9b52b 100644 --- a/eng/common/TestResources/README.md +++ b/eng/common/TestResources/README.md @@ -27,16 +27,10 @@ is a member of multiple subscriptions. ```powershell Connect-AzAccount -Subscription 'YOUR SUBSCRIPTION ID' -$sp = New-AzADServicePrincipal -Role Owner -eng\common\TestResources\New-TestResources.ps1 ` - -BaseName 'myusername' ` - -ServiceDirectory 'search' ` - -TestApplicationId $sp.ApplicationId ` - -TestApplicationSecret (ConvertFrom-SecureString $sp.Secret -AsPlainText) +eng\common\TestResources\New-TestResources.ps1 -ServiceDirectory 'search' ``` -If you are running this for a .NET project on Windows, the recommended method is to -add the `-OutFile` switch to the above command. This will save test environment settings +The `OutFile` switch would be set if you are running this for a .NET project on Windows. This will save test environment settings into a test-resources.json.env file next to test-resources.json. The file is protected via DPAPI. The environment file would be scoped to the current repository directory and avoids the need to set environment variables or restart your IDE to recognize them. @@ -45,14 +39,14 @@ Along with some log messages, this will output environment variables based on your current shell like in the following example: ```powershell -$env:AZURE_TENANT_ID = '<>' -$env:AZURE_CLIENT_ID = '<>' -$env:AZURE_CLIENT_SECRET = '<>' -$env:AZURE_SUBSCRIPTION_ID = 'YOUR SUBSCRIPTION ID' -$env:AZURE_RESOURCE_GROUP = 'rg-myusername' -$env:AZURE_LOCATION = 'westus2' -$env:AZURE_SEARCH_STORAGE_NAME = 'myusernamestg' -$env:AZURE_SEARCH_STORAGE_KEY = '<>' +${env:AZURE_TENANT_ID} = '<>' +${env:AZURE_CLIENT_ID} = '<>' +${env:AZURE_CLIENT_SECRET} = '<>' +${env:AZURE_SUBSCRIPTION_ID} = 'YOUR SUBSCRIPTION ID' +${env:AZURE_RESOURCE_GROUP} = 'rg-myusername' +${env:AZURE_LOCATION} = 'westus2' +${env:AZURE_SEARCH_STORAGE_NAME} = 'myusernamestg' +${env:AZURE_SEARCH_STORAGE_KEY} = '<>' ``` For security reasons we do not set these environment variables automatically @@ -68,14 +62,14 @@ applications started outside the terminal, you could copy and paste the following commands: ```powershell -setx AZURE_TENANT_ID $env:AZURE_TENANT_ID -setx AZURE_CLIENT_ID $env:AZURE_CLIENT_ID -setx AZURE_CLIENT_SECRET $env:AZURE_CLIENT_SECRET -setx AZURE_SUBSCRIPTION_ID $env:AZURE_SUBSCRIPTION_ID -setx AZURE_RESOURCE_GROUP $env:AZURE_RESOURCE_GROUP -setx AZURE_LOCATION $env:AZURE_LOCATION -setx AZURE_SEARCH_STORAGE_NAME $env:AZURE_SEARCH_STORAGE_NAME -setx AZURE_SEARCH_STORAGE_KEY $env:AZURE_SEARCH_STORAGE_KEY +setx AZURE_TENANT_ID ${env:AZURE_TENANT_ID} +setx AZURE_CLIENT_ID ${env:AZURE_CLIENT_ID} +setx AZURE_CLIENT_SECRET ${env:AZURE_CLIENT_SECRET} +setx AZURE_SUBSCRIPTION_ID ${env:AZURE_SUBSCRIPTION_ID} +setx AZURE_RESOURCE_GROUP ${env:AZURE_RESOURCE_GROUP} +setx AZURE_LOCATION ${env:AZURE_LOCATION} +setx AZURE_SEARCH_STORAGE_NAME ${env:AZURE_SEARCH_STORAGE_NAME} +setx AZURE_SEARCH_STORAGE_KEY ${env:AZURE_SEARCH_STORAGE_KEY} ``` After running or recording live tests, if you do not plan on further testing @@ -125,8 +119,8 @@ New-MarkdownHelp -Command .\New-TestResources.ps1 -OutputFolder . -Force PowerShell markdown documentation created with [platyPS][]. - [New-TestResources.ps1]: ./New-TestResources.ps1.md - [Remove-TestResources.ps1]: ./Remove-TestResources.ps1.md + [New-TestResources.ps1]: https://github.com/Azure/azure-sdk-tools/blob/master/eng/common/TestResources/New-TestResources.ps1.md + [Remove-TestResources.ps1]: https://github.com/Azure/azure-sdk-tools/blob/master/eng/common/TestResources/Remove-TestResources.ps1.md [PowerShell]: https://github.com/PowerShell/PowerShell [PowerShellAz]: https://docs.microsoft.com/powershell/azure/install-az-ps [platyPS]: https://github.com/PowerShell/platyPS diff --git a/eng/common/TestResources/Remove-TestResources.ps1 b/eng/common/TestResources/Remove-TestResources.ps1 index 0c5c464bc870..83b1a58c347f 100644 --- a/eng/common/TestResources/Remove-TestResources.ps1 +++ b/eng/common/TestResources/Remove-TestResources.ps1 @@ -43,7 +43,7 @@ param ( [string] $ServiceDirectory, [Parameter()] - [ValidateSet('AzureCloud', 'AzureUSGovernment', 'AzureChinaCloud')] + [ValidateSet('AzureCloud', 'AzureUSGovernment', 'AzureChinaCloud', 'Dogfood')] [string] $Environment = 'AzureCloud', [Parameter()] @@ -137,9 +137,31 @@ if (![string]::IsNullOrWhiteSpace($ServiceDirectory)) { } } +$verifyDeleteScript = { + try { + $group = Get-AzResourceGroup -name $ResourceGroupName + } catch { + if ($_.ToString().Contains("Provided resource group does not exist")) { + Write-Verbose "Resource group '$ResourceGroupName' not found. Continuing..." + return + } + throw $_ + } + + if ($group.ProvisioningState -ne "Deleting") + { + throw "Resource group is in '$($group.ProvisioningState)' state, expected 'Deleting'" + } +} + Log "Deleting resource group '$ResourceGroupName'" -if (Retry { Remove-AzResourceGroup -Name "$ResourceGroupName" -Force:$Force }) { - Write-Verbose "Successfully deleted resource group '$ResourceGroupName'" +if ($Force) { + Remove-AzResourceGroup -Name "$ResourceGroupName" -Force:$Force -AsJob + Retry $verifyDeleteScript 3 + Write-Verbose "Requested async deletion of resource group '$ResourceGroupName'" +} else { + # Don't swallow interactive confirmation when Force is false + Remove-AzResourceGroup -Name "$ResourceGroupName" -Force:$Force } $exitActions.Invoke() @@ -194,4 +216,4 @@ resource group whose name is stored in the environment variable AZURE_RESOURCEGROUP_NAME. .LINK New-TestResources.ps1 -#> \ No newline at end of file +#> diff --git a/eng/common/TestResources/Remove-TestResources.ps1.md b/eng/common/TestResources/Remove-TestResources.ps1.md index 7a70923dcd0d..f0bcb0bdebe6 100644 --- a/eng/common/TestResources/Remove-TestResources.ps1.md +++ b/eng/common/TestResources/Remove-TestResources.ps1.md @@ -187,7 +187,7 @@ Accept wildcard characters: False ### -Environment Name of the cloud environment. The default is the Azure Public Cloud -('PublicCloud') +('AzureCloud') ```yaml Type: String @@ -263,7 +263,7 @@ Accept wildcard characters: False ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -272,6 +272,3 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES ## RELATED LINKS - -[New-TestResources.ps1]() - diff --git a/eng/common/TestResources/deploy-test-resources.yml b/eng/common/TestResources/deploy-test-resources.yml index 87438443d6aa..6f0db25d61a8 100644 --- a/eng/common/TestResources/deploy-test-resources.yml +++ b/eng/common/TestResources/deploy-test-resources.yml @@ -18,11 +18,11 @@ parameters: # } steps: - # New-TestResources command requires Az module - - pwsh: Install-Module -Name Az -Scope CurrentUser -AllowClobber -Force -Verbose - displayName: Install Azure PowerShell module + - template: /eng/common/TestResources/setup-az-modules.yml - pwsh: | + eng/common/TestResources/Import-AzModules.ps1 + $subscriptionConfiguration = @" ${{ parameters.SubscriptionConfiguration }} "@ | ConvertFrom-Json -AsHashtable; @@ -36,5 +36,5 @@ steps: @subscriptionConfiguration ` -CI ` -Force ` - -Verbose + -Verbose | Out-Null displayName: Deploy test resources diff --git a/eng/common/TestResources/remove-test-resources.yml b/eng/common/TestResources/remove-test-resources.yml index 01e9f64d5516..a0871a2ff7ad 100644 --- a/eng/common/TestResources/remove-test-resources.yml +++ b/eng/common/TestResources/remove-test-resources.yml @@ -21,6 +21,8 @@ parameters: steps: - pwsh: | + eng/common/TestResources/Import-AzModules.ps1 + $subscriptionConfiguration = @" ${{ parameters.SubscriptionConfiguration }} "@ | ConvertFrom-Json -AsHashtable; diff --git a/eng/common/TestResources/setup-az-modules.yml b/eng/common/TestResources/setup-az-modules.yml new file mode 100644 index 000000000000..b5369f433b90 --- /dev/null +++ b/eng/common/TestResources/setup-az-modules.yml @@ -0,0 +1,34 @@ +# Cloud Configuration will be splat into parameters of `Add-AzEnvironment`. It +# should be JSON in the form (not all fields are required): +# { +# "Name": "", +# "PublishSettingsFileUrl": "", +# "ServiceEndpoint": "", +# "ManagementPortalUrl": "", +# "ActiveDirectoryEndpoint": "", +# "ActiveDirectoryServiceEndpointResourceId": "", +# "ResourceManagerEndpoint": "", +# "GalleryEndpoint": "", +# "GraphEndpoint": "", +# "GraphAudience": "", +# "AzureKeyVaultDnsSuffix": "", +# "AzureKeyVaultServiceEndpointResourceId": "" +# } + +steps: + - bash: sudo chown -R runner ~/.Azure + displayName: (MacOS) Grant access to ~/.Azure + condition: contains(variables['OSVmImage'], 'mac') + + - task: Powershell@2 + inputs: + displayName: Register Dogfood environment + targetType: inline + pwsh: true + script: | + eng/common/TestResources/Import-AzModules.ps1 + + $environmentSpec = @" + $(env-config-dogfood) + "@ | ConvertFrom-Json -AsHashtable; + Add-AzEnvironment @environmentSpec diff --git a/eng/common/pipelines/templates/steps/create-pull-request.yml b/eng/common/pipelines/templates/steps/create-pull-request.yml index a60d26c8fe98..f3b32ae89cc9 100644 --- a/eng/common/pipelines/templates/steps/create-pull-request.yml +++ b/eng/common/pipelines/templates/steps/create-pull-request.yml @@ -15,8 +15,11 @@ parameters: ScriptDirectory: eng/common/scripts GHReviewersVariable: '' GHTeamReviewersVariable: '' + GHAssignessVariable: '' # Multiple labels seperated by comma, e.g. "bug, APIView" PRLabels: '' + SkipCheckingForChanges: false + CloseAfterOpenForTesting: false steps: @@ -35,15 +38,19 @@ steps: echo "##vso[task.setvariable variable=HasChanges]$false" echo "No changes so skipping code push" } + displayName: Check for changes + condition: and(succeeded(), eq(${{ parameters.SkipCheckingForChanges }}, false)) + workingDirectory: ${{ parameters.WorkingDirectory }} + ignoreLASTEXITCODE: true +- pwsh: | # Remove the repo owner from the front of the repo name if it exists there $repoName = "${{ parameters.RepoName }}" -replace "^${{ parameters.RepoOwner }}/", "" echo "##vso[task.setvariable variable=RepoNameWithoutOwner]$repoName" - echo "RepoName = $repName" - - displayName: Check for changes + echo "RepoName = $repoName" + displayName: Remove Repo Owner from Repo Name + condition: succeeded() workingDirectory: ${{ parameters.WorkingDirectory }} - ignoreLASTEXITCODE: true - task: PowerShell@2 displayName: Push changes @@ -57,6 +64,7 @@ steps: -CommitMsg "${{ parameters.CommitMsg }}" -GitUrl "https://$(azuresdk-github-pat)@github.com/${{ parameters.PROwner }}/$(RepoNameWithoutOwner).git" -PushArgs "${{ parameters.PushArgs }}" + -SkipCommit $${{ parameters.SkipCheckingForChanges }} - task: PowerShell@2 displayName: Create pull request @@ -74,20 +82,8 @@ steps: -AuthToken "$(azuresdk-github-pat)" -PRTitle "${{ parameters.PRTitle }}" -PRBody "${{ coalesce(parameters.PRBody, parameters.CommitMsg, parameters.PRTitle) }}" - -PRLabels "${{ parameters.PRLabels}}" - -- task: PowerShell@2 - displayName: Tag a Reviewer on PR - condition: and(succeeded(), eq(variables['HasChanges'], 'true')) - continueOnError: true - inputs: - pwsh: true - workingDirectory: ${{ parameters.WorkingDirectory }} - filePath: ${{ parameters.ScriptDirectory }}/add-pullrequest-reviewers.ps1 - arguments: > - -RepoOwner "${{ parameters.RepoOwner }}" - -RepoName "$(RepoNameWithoutOwner)" - -AuthToken "$(azuresdk-github-pat)" - -GitHubUsers "$(${{ parameters.GHReviewersVariable }})" - -GitHubTeams "$(${{ parameters.GHTeamReviewersVariable }})" - -PRNumber "$(Submitted.PullRequest.Number)" + -PRLabels "${{ parameters.PRLabels }}" + -UserReviewers "${{ parameters.GHReviewersVariable }}" + -TeamReviewers "${{ parameters.GHTeamReviewersVariable }}" + -Assignees "${{ parameters.GHAssignessVariable }}" + -CloseAfterOpenForTesting $${{ coalesce(parameters.CloseAfterOpenForTesting, 'false') }} diff --git a/eng/common/pipelines/templates/steps/docs-metadata-release.yml b/eng/common/pipelines/templates/steps/docs-metadata-release.yml index 182afaee91df..45f12580f10e 100644 --- a/eng/common/pipelines/templates/steps/docs-metadata-release.yml +++ b/eng/common/pipelines/templates/steps/docs-metadata-release.yml @@ -8,8 +8,8 @@ parameters: ScriptDirectory: eng/common/scripts TargetDocRepoName: '' TargetDocRepoOwner: '' - PRBranchName: 'smoke-test-rdme' - SourceBranchName: 'smoke-test' + PRBranchName: 'master-rdme' + SourceBranchName: 'master' PRLabels: 'auto-merge' ArtifactName: '' Language: '' @@ -18,6 +18,7 @@ parameters: GHReviewersVariable: '' GHTeamReviewersVariable: '' # externally set, as eng-common does not have the identity-resolver. Run as pre-step OnboardingBranch: '' + CloseAfterOpenForTesting: false steps: - pwsh: | @@ -83,6 +84,7 @@ steps: GHReviewersVariable: ${{ parameters.GHReviewersVariable }} GHTeamReviewersVariable: ${{ parameters.GHTeamReviewersVariable }} PRLabels: ${{ parameters.PRLabels }} + CloseAfterOpenForTesting: ${{ parameters.CloseAfterOpenForTesting }} - ${{if ne( parameters['OnboardingBranch'], '')}}: - pwsh: | @@ -122,4 +124,5 @@ steps: WorkingDirectory: ${{ parameters.WorkingDirectory }}/repo ScriptDirectory: ${{ parameters.WorkingDirectory }}/${{ parameters.ScriptDirectory }} GHReviewersVariable: ${{ parameters.GHReviewersVariable }} - GHTeamReviewersVariable: ${{ parameters.GHTeamReviewersVariable }} + GHTeamReviewersVariable: ${{ parameters.GHTeamReviewersVariable }} + CloseAfterOpenForTesting: ${{ parameters.CloseAfterOpenForTesting }} diff --git a/eng/common/pipelines/templates/steps/install-pipeline-generation.yml b/eng/common/pipelines/templates/steps/install-pipeline-generation.yml new file mode 100644 index 000000000000..4911726df204 --- /dev/null +++ b/eng/common/pipelines/templates/steps/install-pipeline-generation.yml @@ -0,0 +1,16 @@ +parameters: + ToolPath: $(Pipeline.Workspace)/pipeline-generator + +steps: + - script: > + mkdir pipeline-generator + workingDirectory: $(Pipeline.Workspace) + displayName: Setup working directory for pipeline generator. + - script: > + dotnet tool install + Azure.Sdk.Tools.PipelineGenerator + --version 1.0.2-dev.20201020.1 + --add-source https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk/nuget/v3/index.json + --tool-path ${{parameters.ToolPath}} + workingDirectory: $(Pipeline.Workspace)/pipeline-generator + displayName: 'Install pipeline generator tool' \ No newline at end of file diff --git a/eng/common/pipelines/templates/steps/prepare-pipelines.yml b/eng/common/pipelines/templates/steps/prepare-pipelines.yml new file mode 100644 index 000000000000..c2baf157e6b4 --- /dev/null +++ b/eng/common/pipelines/templates/steps/prepare-pipelines.yml @@ -0,0 +1,137 @@ +parameters: + - name: Repository + type: string + default: $(Build.Repository.Name) + - name: Prefix + type: string + - name: CIConventionOptions + type: string + default: '' + - name: UPConventionOptions + type: string + default: '' + - name: TestsConventionOptions + type: string + default: '' + +steps: + - template: install-pipeline-generation.yml + + # This covers our public repos. + - ${{ if not(endsWith(parameters.Repository, '-pr'))}}: + - script: > + $(Pipeline.Workspace)/pipeline-generator/pipeline-generator + --organization https://dev.azure.com/azure-sdk + --project public + --prefix ${{parameters.Prefix}} + --devopspath "\${{parameters.Prefix}}" + --path $(System.DefaultWorkingDirectory)/sdk + --endpoint Azure + --repository ${{parameters.Repository}} + --convention ci + --agentpool Hosted + --branch refs/heads/master + --patvar PATVAR + --debug + ${{parameters.CIConventionOptions}} + displayName: Create CI pipelines for public repository + env: + PATVAR: $(azuresdk-azure-sdk-devops-pipeline-generation-pat) + - script: > + $(Pipeline.Workspace)/pipeline-generator/pipeline-generator + --organization https://dev.azure.com/azure-sdk + --project internal + --prefix ${{parameters.Prefix}} + --devopspath "\${{parameters.Prefix}}" + --path $(System.DefaultWorkingDirectory)/sdk + --endpoint Azure + --repository ${{parameters.Repository}} + --convention up + --agentpool Hosted + --branch refs/heads/master + --patvar PATVAR + --debug + ${{parameters.UPConventionOptions}} + displayName: Create UP pipelines for public repository + env: + PATVAR: $(azuresdk-azure-sdk-devops-pipeline-generation-pat) + - script: > + $(Pipeline.Workspace)/pipeline-generator/pipeline-generator + --organization https://dev.azure.com/azure-sdk + --project internal + --prefix ${{parameters.Prefix}} + --devopspath "\${{parameters.Prefix}}" + --path $(System.DefaultWorkingDirectory)/sdk + --endpoint Azure + --repository ${{parameters.Repository}} + --convention tests + --agentpool Hosted + --branch refs/heads/master + --patvar PATVAR + --debug + ${{parameters.TestsConventionOptions}} + displayName: Create Live Test pipelines for public repository + condition: ne(variables['TestsConventionOptions'],'') + env: + PATVAR: $(azuresdk-azure-sdk-devops-pipeline-generation-pat) + + # This covers our -pr repositories. + - ${{ if endsWith(parameters.Repository, '-pr')}}: + - script: > + $(Pipeline.Workspace)/pipeline-generator/pipeline-generator + --organization https://dev.azure.com/azure-sdk + --project internal + --prefix ${{parameters.Prefix}}-pr + --devopspath "\${{parameters.Prefix}}\pr" + --path $(System.DefaultWorkingDirectory)/sdk + --endpoint Azure + --repository ${{parameters.Repository}} + --convention ci + --agentpool Hosted + --branch refs/heads/master + --patvar PATVAR + --debug + --no-schedule + ${{parameters.CIConventionOptions}} + displayName: Create CI pipelines for private repository + env: + PATVAR: $(azuresdk-azure-sdk-devops-pipeline-generation-pat) + - script: > + $(Pipeline.Workspace)/pipeline-generator/pipeline-generator + --organization https://dev.azure.com/azure-sdk + --project internal + --prefix ${{parameters.Prefix}}-pr + --devopspath "\${{parameters.Prefix}}\pr" + --path $(System.DefaultWorkingDirectory)/sdk + --endpoint Azure + --repository ${{parameters.Repository}} + --convention up + --agentpool Hosted + --branch refs/heads/master + --patvar PATVAR + --debug + --no-schedule + ${{parameters.UPConventionOptions}} + displayName: Create UP pipelines for private repository + env: + PATVAR: $(azuresdk-azure-sdk-devops-pipeline-generation-pat) + - script: > + $(Pipeline.Workspace)/pipeline-generator/pipeline-generator + --organization https://dev.azure.com/azure-sdk + --project internal + --prefix ${{parameters.Prefix}}-pr + --devopspath "\${{parameters.Prefix}}\pr" + --path $(System.DefaultWorkingDirectory)/sdk + --endpoint Azure + --repository ${{parameters.Repository}} + --convention tests + --agentpool Hosted + --branch refs/heads/master + --patvar PATVAR + --debug + --no-schedule + ${{parameters.TestsConventionOptions}} + displayName: Create Live Test pipelines for private repository + condition: ne(variables['TestsConventionOptions'],'') + env: + PATVAR: $(azuresdk-azure-sdk-devops-pipeline-generation-pat) diff --git a/eng/common/pipelines/templates/steps/publish-blobs.yml b/eng/common/pipelines/templates/steps/publish-blobs.yml index 5888edff87d1..7446c1af67f5 100644 --- a/eng/common/pipelines/templates/steps/publish-blobs.yml +++ b/eng/common/pipelines/templates/steps/publish-blobs.yml @@ -21,7 +21,6 @@ steps: -AzCopy $(Resolve-Path "$(Build.BinariesDirectory)/azcopy/azcopy_windows_amd64_*/azcopy.exe")[0] -DocLocation "${{ parameters.FolderForUpload }}" -SASKey "${{ parameters.BlobSASKey }}" - -Language "${{ parameters.TargetLanguage }}" -BlobName "${{ parameters.BlobName }}" -PublicArtifactLocation "${{ parameters.ArtifactLocation }}" -RepoReplaceRegex "(https://github.com/${{ parameters.RepoId }}/(?:blob|tree)/)master" diff --git a/eng/common/pipelines/templates/steps/verify-links.yml b/eng/common/pipelines/templates/steps/verify-links.yml index c9d76c99787e..b23a266ccae5 100644 --- a/eng/common/pipelines/templates/steps/verify-links.yml +++ b/eng/common/pipelines/templates/steps/verify-links.yml @@ -1,19 +1,27 @@ parameters: Directory: 'not-specified' - IgnoreLinksFile: "$(Build.SourcesDirectory)/eng/ignore-links.txt" - + IgnoreLinksFile: '$(Build.SourcesDirectory)/eng/ignore-links.txt' + WorkingDirectory: '$(System.DefaultWorkingDirectory)' + ScriptDirectory: 'eng/common/scripts' + Recursive: $false + CheckLinkGuidance: $true + Urls: '(Get-ChildItem -Path ./ -Recurse -Include *.md)' + BranchReplaceRegex: "^(${env:SYSTEM_PULLREQUEST_SOURCEREPOSITORYURI}.*/(?:blob|tree)/)master(/.*)$" + BranchReplacementName: "${env:SYSTEM_PULLREQUEST_SOURCECOMMITID}" + steps: -- task: PowerShell@2 - displayName: Link verification check - inputs: - pwsh: true - workingDirectory: $(Build.SourcesDirectory)/${{ parameters.Directory }} - filePath: eng/common/scripts/Verify-Links.ps1 - arguments: > - -urls $(dir -r -i *.md) - -rootUrl "file://$(Build.SourcesDirectory)/${{ parameters.Directory }}" - -recursive: $false - -ignoreLinksFile ${{ parameters.IgnoreLinksFile }} - -branchReplaceRegex "^($env:SYSTEM_PULLREQUEST_SOURCEREPOSITORYURI.*/(?:blob|tree)/)master(/.*)$" - -branchReplacementName $env:SYSTEM_PULLREQUEST_SOURCECOMMITID - -devOpsLogging: $true + - task: PowerShell@2 + displayName: Link verification check + inputs: + pwsh: true + workingDirectory: '${{ parameters.WorkingDirectory }}/${{ parameters.Directory }}' + filePath: ${{ parameters.ScriptDirectory }}/Verify-Links.ps1 + arguments: > + -urls ${{ parameters.Urls }} + -rootUrl "file://${{ parameters.WorkingDirectory }}/${{ parameters.Directory }}" + -recursive: ${{ parameters.Recursive }} + -ignoreLinksFile ${{ parameters.IgnoreLinksFile }} + -branchReplaceRegex "${{ parameters.BranchReplaceRegex }}" + -branchReplacementName ${{ parameters.BranchReplacementName }} + -devOpsLogging: $true + -checkLinkGuidance: ${{ parameters.CheckLinkGuidance }} diff --git a/eng/common/pipelines/templates/steps/verify-path-length.yml b/eng/common/pipelines/templates/steps/verify-path-length.yml index 79c598035e31..e79729216901 100644 --- a/eng/common/pipelines/templates/steps/verify-path-length.yml +++ b/eng/common/pipelines/templates/steps/verify-path-length.yml @@ -17,10 +17,6 @@ steps: import sys source_directory = r'${{ parameters.SourceDirectory }}' - longest_file_path = '' - longest_file_path_length = 0 - longest_dir_path = '' - longest_dir_path_length = 0 break_switch = False long_file_paths = [] long_dir_paths = [] @@ -32,17 +28,12 @@ steps: for root, dirs, files in os.walk('{0}'.format(source_directory)): for file in files: file_path = os.path.relpath(os.path.join(root, file), source_directory) - if ((len(file_path) + ${{ parameters.BasePathLength }}) > longest_file_path_length): - longest_file_path_length = len(file_path) + ${{ parameters.BasePathLength }} - longest_file_path = file_path - if (longest_file_path_length >= 260): - long_file_paths.append(longest_file_path) + if ((len(file_path) + ${{ parameters.BasePathLength }}) > 260): + long_file_paths.append(file_path) + dir_path = os.path.relpath(root, source_directory) - if ((len(dir_path) + ${{ parameters.BasePathLength }}) > longest_dir_path_length): - longest_dir_path_length = len(dir_path) + ${{ parameters.BasePathLength }} - longest_dir_path = dir_path - if (longest_dir_path_length >= 248): - long_dir_paths.append(longest_dir_path) + if ((len(dir_path) + ${{ parameters.BasePathLength }}) > 248): + long_dir_paths.append(dir_path) if (len(long_file_paths) > 0): print('With a base path length of {0} the following file path{1} exceed the allow path length of 260 characters'.format(${{ parameters.BasePathLength }}, pluralize('', 's', len(long_file_paths)))) diff --git a/eng/common/scripts/Add-IssueComment.ps1 b/eng/common/scripts/Add-IssueComment.ps1 new file mode 100644 index 000000000000..b1d8a649797c --- /dev/null +++ b/eng/common/scripts/Add-IssueComment.ps1 @@ -0,0 +1,28 @@ +[CmdletBinding(SupportsShouldProcess = $true)] +param( + [Parameter(Mandatory = $true)] + [string]$RepoOwner, + + [Parameter(Mandatory = $true)] + [string]$RepoName, + + [Parameter(Mandatory = $true)] + [string]$IssueNumber, + + [Parameter(Mandatory = $true)] + [string]$Comment, + + [Parameter(Mandatory = $true)] + [string]$AuthToken +) + +. "${PSScriptRoot}\common.ps1" + +try { + Add-GithubIssueComment -RepoOwner $RepoOwner -RepoName $RepoName ` + -IssueNumber $IssueNumber -Comment $Comment -AuthToken $AuthToken +} +catch { + LogError "Add-GithubIssueComment failed with exception:`n$_" + exit 1 +} \ No newline at end of file diff --git a/eng/common/scripts/Add-IssueLabels.ps1 b/eng/common/scripts/Add-IssueLabels.ps1 new file mode 100644 index 000000000000..0cd4837e69ad --- /dev/null +++ b/eng/common/scripts/Add-IssueLabels.ps1 @@ -0,0 +1,28 @@ +[CmdletBinding(SupportsShouldProcess = $true)] +param( + [Parameter(Mandatory = $true)] + [string]$RepoOwner, + + [Parameter(Mandatory = $true)] + [string]$RepoName, + + [Parameter(Mandatory = $true)] + [string]$IssueNumber, + + [Parameter(Mandatory = $true)] + [string]$Labels, + + [Parameter(Mandatory = $true)] + [string]$AuthToken +) + +. "${PSScriptRoot}\common.ps1" + +try { + Add-GithubIssueLabels -RepoOwner $RepoOwner -RepoName $RepoName ` + -IssueNumber $IssueNumber -Labels $Labels -AuthToken $AuthToken +} +catch { + LogError "Add-GithubIssueLabels failed with exception:`n$_" + exit 1 +} \ No newline at end of file diff --git a/eng/common/scripts/ChangeLog-Operations.ps1 b/eng/common/scripts/ChangeLog-Operations.ps1 index 8397e1d0a05a..d644d022658a 100644 --- a/eng/common/scripts/ChangeLog-Operations.ps1 +++ b/eng/common/scripts/ChangeLog-Operations.ps1 @@ -119,4 +119,12 @@ function Confirm-ChangeLogEntry { } } return $true +} + +function Set-TestChangeLog($TestVersion, $changeLogFile, $ReleaseEntry) { + Set-Content -Path $changeLogFile -Value @" +# Release History +## $TestVersion ($(Get-Date -f "yyyy-MM-dd")) +- $ReleaseEntry +"@ } \ No newline at end of file diff --git a/eng/common/scripts/Delete-RemoteBranches.ps1 b/eng/common/scripts/Delete-RemoteBranches.ps1 new file mode 100644 index 000000000000..222f8562e3ea --- /dev/null +++ b/eng/common/scripts/Delete-RemoteBranches.ps1 @@ -0,0 +1,46 @@ +param( + $RepoOwner, + $RepoName, + $BranchPrefix, + $AuthToken +) + +. "${PSScriptRoot}\common.ps1" + +LogDebug "Operating on Repo [ $RepoName ]" +try{ + $branches = (Get-GitHubSourceReferences -RepoOwner $RepoOwner -RepoName $RepoName -Ref "heads/$BranchPrefix" -AuthToken $AuthToken).ref +} +catch { + LogError "Get-GitHubSourceReferences failed with exception:`n$_" + exit 1 +} + +foreach ($branch in $branches) +{ + try { + $branchName = $branch.Replace("refs/heads/","") + $head = "${RepoOwner}/${RepoName}:${branchName}" + LogDebug "Operating on branch [ $branchName ]" + $pullRequests = Get-GitHubPullRequests -RepoOwner $RepoOwner -RepoName $RepoName -State "all" -Head $head -AuthToken $AuthToken + } + catch + { + LogError "Get-GitHubPullRequests failed with exception:`n$_" + exit 1 + } + + $openPullRequests = $pullRequests | ? { $_.State -eq "open" } + + if ($openPullRequests.Count -eq 0) + { + LogDebug "Branch [ $branchName ] in repo [ $RepoName ] has no associated open Pull Request. Deleting Branch" + try{ + Remove-GitHubSourceReferences -RepoOwner $RepoOwner -RepoName $RepoName -Ref ($branch.Remove(0,5)) -AuthToken $AuthToken + } + catch { + LogError "Remove-GitHubSourceReferences failed with exception:`n$_" + exit 1 + } + } +} \ No newline at end of file diff --git a/eng/common/scripts/Get-PullRequestCreator.ps1 b/eng/common/scripts/Get-PullRequestCreator.ps1 new file mode 100644 index 000000000000..1b531ad5ee70 --- /dev/null +++ b/eng/common/scripts/Get-PullRequestCreator.ps1 @@ -0,0 +1,24 @@ +param ( + [Parameter(Mandatory = $true)] + [string]$RepoOwner, + + [Parameter(Mandatory = $true)] + [string]$RepoName, + + [Parameter(Mandatory = $true)] + $PullRequestNumber +) + +. "${PSScriptRoot}\common.ps1" + +try +{ + $pullRequest = Get-GithubPullRequest -RepoOwner $RepoOwner -RepoName $RepoName -PullRequestNumber $PullRequestNumber + Write-Host "##vso[task.setvariable variable=System.PullRequest.Creator;]$($pullRequest.user.login)" +} +catch +{ + Write-Error "Get-PullRequest failed with exception:`n$_" + exit 1 +} + diff --git a/eng/common/scripts/Invoke-GitHubAPI.ps1 b/eng/common/scripts/Invoke-GitHubAPI.ps1 new file mode 100644 index 000000000000..b4a3d8971532 --- /dev/null +++ b/eng/common/scripts/Invoke-GitHubAPI.ps1 @@ -0,0 +1,429 @@ +if ((Get-ChildItem -Path Function: | ? { $_.Name -eq "LogWarning" }).Count -eq 0) { + . "${PSScriptRoot}\logging.ps1" +} + +$GithubAPIBaseURI = "https://api.github.com/repos" + +function Get-GitHubHeaders ($token) { + $headers = @{ + Authorization = "bearer $token" + } + return $headers +} + +function Invoke-GitHubAPIPost { + param ( + [Parameter(Mandatory = $true)] + $apiURI, + [Parameter(Mandatory = $true)] + $body, + [Parameter(Mandatory = $true)] + $token + ) + + try { + if ($body.Count -gt 0) { + $resp = Invoke-RestMethod ` + -Method POST ` + -Body ($body | ConvertTo-Json) ` + -Uri $apiURI ` + -Headers (Get-GitHubHeaders -token $token) ` + -MaximumRetryCount 3 + + return $resp + } + else { + $warning = "{0} with Uri [ $apiURI ] did not fire request because of empty body." -f (Get-PSCallStack)[1].FunctionName + LogWarning $warning + return $null + } + } + catch { + $warning = "{0} with Uri [ $apiURI ] failed. `nBody: [ {1} ]" -f (Get-PSCallStack)[1].FunctionName , ($body | Out-String) + LogWarning $warning + throw + } +} + +function Invoke-GitHubAPIPatch { + param ( + [Parameter(Mandatory = $true)] + $apiURI, + [Parameter(Mandatory = $true)] + $body, + [Parameter(Mandatory = $true)] + $token + ) + + try { + if ($body.Count -gt 0) { + $resp = Invoke-RestMethod ` + -Method PATCH ` + -Body ($body | ConvertTo-Json) ` + -Uri $apiURI ` + -Headers (Get-GitHubHeaders -token $token) ` + -MaximumRetryCount 3 + + return $resp + } + else { + $warning = "{0} with Uri [ $apiURI ] did not fire request because of empty body." -f (Get-PSCallStack)[1].FunctionName + LogWarning $warning + return $null + } + } + catch { + $warning = "{0} with Uri [ $apiURI ] failed. `nBody: [ {1} ]" -f (Get-PSCallStack)[1].FunctionName , ($body | Out-String) + LogWarning $warning + throw + } +} + +function Invoke-GitHubAPIDelete { + param ( + [Parameter(Mandatory = $true)] + $apiURI, + [Parameter(Mandatory = $true)] + $token + ) + + try { + $resp = Invoke-RestMethod ` + -Method DELETE ` + -Uri $apiURI ` + -Headers (Get-GitHubHeaders -token $token) ` + -MaximumRetryCount 3 + + return $resp + } + catch { + $warning = "{0} with Uri [ $apiURI ] failed." -f (Get-PSCallStack)[1].FunctionName + LogWarning $warning + throw + } +} + + +function Invoke-GitHubAPIGet { + param ( + [Parameter(Mandatory = $true)] + $apiURI, + $token + ) + + try { + if ($token) + { + $resp = Invoke-RestMethod ` + -Method GET ` + -Uri $apiURI ` + -Headers (Get-GitHubHeaders -token $token) ` + -MaximumRetryCount 3 + } + else { + $resp = Invoke-RestMethod ` + -Method GET ` + -Uri $apiURI ` + -MaximumRetryCount 3 + } + return $resp + } + catch { + $warning = "{0} with Uri [ $apiURI ] failed." -f (Get-PSCallStack)[1].FunctionName + LogWarning $warning + throw + } +} + +function Set-GitHubAPIParameters ($members, $parameterName, $parameters, $allowEmptyMembers=$false) { + if ($null -ne $members) { + if ($members -is [array]) + { + $parameters[$parameterName] = $members + } + else { + $memberAdditions = @($members.Split(",") | % { $_.Trim() } | ? { return $_ }) + if (($memberAdditions.Count -gt 0) -or $allowEmptyMembers) { + $parameters[$parameterName] = $memberAdditions + } + } + } + + return $parameters +} + +function Get-GitHubPullRequests { + param ( + [Parameter(Mandatory = $true)] + $RepoOwner, + [Parameter(Mandatory = $true)] + $RepoName, + [ValidateSet("open","closed","all")] + $State = "open", + $Head, + $Base, + [ValidateSet("created","updated","popularity","long-running")] + $Sort, + [ValidateSet("asc","desc")] + $Direction, + [ValidateNotNullOrEmpty()] + $AuthToken + ) + + $uri = "$GithubAPIBaseURI/$RepoOwner/$RepoName/pulls" + if ($State -or $Head -or $Base -or $Sort -or $Direction) { $uri += '?' } + if ($State) { $uri += "state=$State&" } + if ($Head) { $uri += "head=$Head&" } + if ($Base) { $uri += "base=$Base&" } + if ($Sort) { $uri += "sort=$Sort&" } + if ($Direction){ $uri += "direction=$Direction&" } + + return Invoke-GitHubAPIGet -apiURI $uri -token $AuthToken +} + +# +<# +.PARAMETER Ref +Ref to search for +Pass 'heads/ ,tags/, or nothing +#> +function Get-GitHubSourceReferences { + param ( + [Parameter(Mandatory = $true)] + $RepoOwner, + [Parameter(Mandatory = $true)] + $RepoName, + $Ref, + [ValidateNotNullOrEmpty()] + $AuthToken + ) + + $uri = "$GithubAPIBaseURI/$RepoOwner/$RepoName/git/matching-refs/" + if ($Ref) { $uri += "$Ref" } + + return Invoke-GitHubAPIGet -apiURI $uri -token $AuthToken +} + +function Get-GitHubPullRequest { + param ( + [Parameter(Mandatory = $true)] + $RepoOwner, + [Parameter(Mandatory = $true)] + $RepoName, + [Parameter(Mandatory = $true)] + $PullRequestNumber, + [ValidateNotNullOrEmpty()] + $AuthToken + ) + + $uri = "$GithubAPIBaseURI/$RepoOwner/$RepoName/pulls/$PullRequestNumber" + return Invoke-GitHubAPIGet -apiURI $uri -token $AuthToken +} + +function New-GitHubPullRequest { + param ( + [Parameter(Mandatory = $true)] + $RepoOwner, + [Parameter(Mandatory = $true)] + $RepoName, + [Parameter(Mandatory = $true)] + $Title, + [Parameter(Mandatory = $true)] + $Head, + [Parameter(Mandatory = $true)] + $Base, + $Body=$Title, + [Boolean]$Maintainer_Can_Modify=$false, + [Boolean]$Draft=$false, + [ValidateNotNullOrEmpty()] + [Parameter(Mandatory = $true)] + $AuthToken + ) + + $parameters = @{ + title = $Title + head = $Head + base = $Base + body = $Body + maintainer_can_modify = $Maintainer_Can_Modify + draft = $Draft + } + + $uri = "$GithubAPIBaseURI/$RepoOwner/$RepoName/pulls" + return Invoke-GitHubAPIPost -apiURI $uri -body $parameters -token $AuthToken +} + +function Add-GitHubIssueComment { + param ( + [Parameter(Mandatory = $true)] + $RepoOwner, + [Parameter(Mandatory = $true)] + $RepoName, + [Parameter(Mandatory = $true)] + $IssueNumber, + [Parameter(Mandatory = $true)] + $Comment, + [ValidateNotNullOrEmpty()] + [Parameter(Mandatory = $true)] + $AuthToken + + ) + $uri = "$GithubAPIBaseURI/$RepoOwner/$RepoName/issues/$IssueNumber/comments" + + $parameters = @{ + body = $Comment + } + + return Invoke-GitHubAPIPost -apiURI $uri -body $parameters -token $AuthToken +} + +# Will add labels to existing labels on the issue +function Add-GitHubIssueLabels { + param ( + [Parameter(Mandatory = $true)] + $RepoOwner, + [Parameter(Mandatory = $true)] + $RepoName, + [Parameter(Mandatory = $true)] + $IssueNumber, + [ValidateNotNullOrEmpty()] + [Parameter(Mandatory = $true)] + $Labels, + [ValidateNotNullOrEmpty()] + [Parameter(Mandatory = $true)] + $AuthToken + ) + + if ($Labels.Trim().Length -eq 0) + { + throw " The 'Labels' parameter should not not be whitespace. + Use the 'Update-Issue' function if you plan to reset the labels" + } + + $uri = "$GithubAPIBaseURI/$RepoOwner/$RepoName/issues/$IssueNumber/labels" + $parameters = @{} + $parameters = Set-GitHubAPIParameters -members $Labels -parameterName "labels" ` + -parameters $parameters + + return Invoke-GitHubAPIPost -apiURI $uri -body $parameters -token $AuthToken +} + +# Will add assignees to existing assignees on the issue +function Add-GitHubIssueAssignees { + param ( + [Parameter(Mandatory = $true)] + $RepoOwner, + [Parameter(Mandatory = $true)] + $RepoName, + [Parameter(Mandatory = $true)] + $IssueNumber, + [ValidateNotNullOrEmpty()] + [Parameter(Mandatory = $true)] + $Assignees, + [ValidateNotNullOrEmpty()] + [Parameter(Mandatory = $true)] + $AuthToken + ) + + if ($Assignees.Trim().Length -eq 0) + { + throw "The 'Assignees' parameter should not be whitespace. + You can use the 'Update-Issue' function if you plan to reset the Assignees" + } + + $uri = "$GithubAPIBaseURI/$RepoOwner/$RepoName/issues/$IssueNumber/assignees" + $parameters = @{} + $parameters = Set-GitHubAPIParameters -members $Assignees -parameterName "assignees" ` + -parameters $parameters + + return Invoke-GitHubAPIPost -apiURI $uri -body $parameters -token $AuthToken +} + +function Add-GitHubPullRequestReviewers { + param ( + [Parameter(Mandatory = $true)] + $RepoOwner, + [Parameter(Mandatory = $true)] + $RepoName, + [Parameter(Mandatory = $true)] + $PrNumber, + $Users, + $Teams, + [ValidateNotNullOrEmpty()] + [Parameter(Mandatory = $true)] + $AuthToken + ) + + $uri = "$GithubAPIBaseURI/$RepoOwner/$RepoName/pulls/$PrNumber/requested_reviewers" + $parameters = @{} + + $parameters = Set-GitHubAPIParameters -members $Users -parameterName "reviewers" ` + -parameters $parameters + + $parameters = Set-GitHubAPIParameters -members $Teams -parameterName "team_reviewers" ` + -parameters $parameters + + return Invoke-GitHubAPIPost -apiURI $uri -body $parameters -token $AuthToken +} + +# For labels and assignee pass comma delimited string, to replace existing labels or assignees. +# Or pass white space " " to remove all labels or assignees +function Update-GitHubIssue { + param ( + [Parameter(Mandatory = $true)] + $RepoOwner, + [Parameter(Mandatory = $true)] + $RepoName, + [Parameter(Mandatory = $true)] + $IssueNumber, + [string]$Title, + [string]$Body, + [ValidateSet("open","closed")] + [string]$State, + [int]$Milestome, + $Labels, + $Assignees, + [ValidateNotNullOrEmpty()] + [Parameter(Mandatory = $true)] + $AuthToken + ) + + $uri = "$GithubAPIBaseURI/$RepoOwner/$RepoName/issues/$IssueNumber" + $parameters = @{} + if ($Title) { $parameters["title"] = $Title } + if ($Body) { $parameters["body"] = $Body } + if ($State) { $parameters["state"] = $State } + if ($Milestone) { $parameters["milestone"] = $Milestone } + + $parameters = Set-GitHubAPIParameters -members $Labels -parameterName "labels" ` + -parameters $parameters -allowEmptyMembers $true + + $parameters = Set-GitHubAPIParameters -members $Assignees -parameterName "assignees" ` + -parameters $parameters -allowEmptyMembers $true + + return Invoke-GitHubAPIPatch -apiURI $uri -body $parameters -token $AuthToken +} + +function Remove-GitHubSourceReferences { + param ( + [Parameter(Mandatory = $true)] + $RepoOwner, + [Parameter(Mandatory = $true)] + $RepoName, + [ValidateNotNullOrEmpty()] + [Parameter(Mandatory = $true)] + $Ref, + [ValidateNotNullOrEmpty()] + [Parameter(Mandatory = $true)] + $AuthToken + ) + + if ($Ref.Trim().Length -eq 0) + { + throw "You must supply a valid 'Ref' Parameter to 'Delete-GithubSourceReferences'." + } + + $uri = "$GithubAPIBaseURI/$RepoOwner/$RepoName/git/refs/$Ref" + + return Invoke-GitHubAPIDelete -apiURI $uri -token $AuthToken +} \ No newline at end of file diff --git a/eng/common/scripts/New-ReleaseAsset.ps1 b/eng/common/scripts/New-ReleaseAsset.ps1 new file mode 100644 index 000000000000..83efcc097e9b --- /dev/null +++ b/eng/common/scripts/New-ReleaseAsset.ps1 @@ -0,0 +1,62 @@ +<# +.SYNOPSIS +Uploads the release asset and returns the resulting object from the upload + +.PARAMETER ReleaseTag +Tag to look up release + +.PARAMETER AssetPath +Location of the asset file to upload + +.PARAMETER GitHubRepo +Name of the GitHub repo to search (of the form Azure/azure-sdk-for-cpp) + +#> + +param ( + [Parameter(Mandatory = $true)] + [ValidateNotNullOrEmpty()] + [string] $ReleaseTag, + + [Parameter(Mandatory = $true)] + [ValidateNotNullOrEmpty()] + [string] $AssetPath, + + [Parameter(Mandatory = $true)] + [ValidateNotNullOrEmpty()] + [string] $GitHubRepo, + + [Parameter(Mandatory = $true)] + [ValidateNotNullOrEmpty()] + [string] $GitHubPat +) + +# Get information about release at $ReleaseTag +$releaseInfoUrl = "https://api.github.com/repos/$GitHubRepo/releases/tags/$ReleaseTag" +Write-Verbose "Requesting release info from $releaseInfoUrl" +$release = Invoke-RestMethod ` + -Uri $releaseInfoUrl ` + -Method GET + +$assetFilename = Split-Path $AssetPath -Leaf + +# Upload URL comes in the literal form (yes, those curly braces) of: +# https://uploads.github.com/repos/Azure/azure-sdk-for-cpp/releases/123/assets{?name,label} +# Converts to something like: +# https://uploads.github.com/repos/Azure/azure-sdk-for-cpp/releases/123/assets?name=foo.tar.gz +# Docs: https://docs.github.com/en/rest/reference/repos#get-a-release-by-tag-name +$uploadUrl = $release.upload_url.Split('{')[0] + "?name=$assetFilename" + +Write-Verbose "Uploading $assetFilename to $uploadUrl" + +$asset = Invoke-RestMethod ` + -Uri $uploadUrl ` + -Method POST ` + -InFile $AssetPath ` + -Credential $credentials ` + -Headers @{ Authorization = "token $GitHubPat" } ` + -ContentType "application/gzip" + +Write-Verbose "Upload complete. Browser download URL: $($asset.browser_download_url)" + +return $asset diff --git a/eng/common/scripts/Package-Properties.ps1 b/eng/common/scripts/Package-Properties.ps1 index 2ca4aacdbef1..f17b244f3f22 100644 --- a/eng/common/scripts/Package-Properties.ps1 +++ b/eng/common/scripts/Package-Properties.ps1 @@ -90,13 +90,14 @@ function Get-PkgProperties foreach ($directory in $directoriesPresent) { $pkgDirectoryPath = Join-Path $serviceDirectoryPath $directory.Name - if ($GetPackageInfoFromRepoFn) + + if ((Get-ChildItem -Path Function: | ? { $_.Name -eq $GetPackageInfoFromRepoFn }).Count -gt 0) { $pkgProps = &$GetPackageInfoFromRepoFn -pkgPath $pkgDirectoryPath -serviceDirectory $ServiceDirectory -pkgName $PackageName } else { - Write-Error "The function 'Get-${Language}-PackageInfoFromRepo' was not found." + Write-Error "The function '$GetPackageInfoFromRepoFn' was not found." } if ($pkgProps -ne $null) diff --git a/eng/common/scripts/Queue-Pipeline.ps1 b/eng/common/scripts/Queue-Pipeline.ps1 new file mode 100644 index 000000000000..4e0122ca9256 --- /dev/null +++ b/eng/common/scripts/Queue-Pipeline.ps1 @@ -0,0 +1,56 @@ +[CmdletBinding(SupportsShouldProcess = $true)] +param( + [Parameter(Mandatory = $true)] + [string]$Organization, + + [Parameter(Mandatory = $true)] + [string]$Project, + + [Parameter(Mandatory = $true)] + [string]$SourceBranch, + + [Parameter(Mandatory = $true)] + [int]$DefinitionId, + + [Parameter(Mandatory = $false)] + [string]$VsoQueuedPipelines, + + [Parameter(Mandatory = $true)] + [string]$AuthToken +) + +. "${PSScriptRoot}\logging.ps1" + +$headers = @{ + Authorization = "Basic $AuthToken" +} + +$apiUrl = "https://dev.azure.com/$Organization/$Project/_apis/build/builds?api-version=6.0" + +$body = @{ + sourceBranch = $SourceBranch + definition = @{ id = $DefinitionId } +} + +Write-Verbose ($body | ConvertTo-Json) + +try { + $resp = Invoke-RestMethod -Method POST -Headers $headers $apiUrl -Body ($body | ConvertTo-Json) -ContentType application/json +} +catch { + LogError "Invoke-RestMethod [ $apiUrl ] failed with exception:`n$_" + exit 1 +} + +LogDebug "Pipeline [ $($resp.definition.name) ] queued at [ $($resp._links.web.href) ]" + +if ($VsoQueuedPipelines) { + $enVarValue = [System.Environment]::GetEnvironmentVariable($VsoQueuedPipelines) + $QueuedPipelineLinks = if ($enVarValue) { + "$enVarValue
[$($resp.definition.name)]($($resp._links.web.href))" + }else { + "[$($resp.definition.name)]($($resp._links.web.href))" + } + $QueuedPipelineLinks + Write-Host "##vso[task.setvariable variable=$VsoQueuedPipelines]$QueuedPipelineLinks" +} \ No newline at end of file diff --git a/eng/common/scripts/Submit-PullRequest.ps1 b/eng/common/scripts/Submit-PullRequest.ps1 index 7f3f0a544e9a..bbb9c2e8ac30 100644 --- a/eng/common/scripts/Submit-PullRequest.ps1 +++ b/eng/common/scripts/Submit-PullRequest.ps1 @@ -48,81 +48,63 @@ param( [Parameter(Mandatory = $false)] [string]$PRBody = $PRTitle, - [Parameter(Mandatory = $false)] - [string]$PRLabels -) + [string]$PRLabels, -$headers = @{ - Authorization = "bearer $AuthToken" -} + [string]$UserReviewers, -$query = "state=open&head=${PROwner}:${PRBranch}&base=${BaseBranch}" + [string]$TeamReviewers, -function AddLabels([int] $prNumber, [string] $prLabelString) -{ - # Adding labels to the pr. - if (-not $prLabelString) { - Write-Verbose "There are no labels added to the PR." - return - } + [string]$Assignees, - # Parse the labels from string to array - $prLabelArray = @($prLabelString.Split(",") | % { $_.Trim() } | ? { return $_ }) - $prLabelUri = "https://api.github.com/repos/$RepoOwner/$RepoName/issues/$prNumber" - $labelRequestData = @{ - labels = $prLabelArray - } - try { - $resp = Invoke-RestMethod -Method PATCH -Headers $headers $prLabelUri -Body ($labelRequestData | ConvertTo-Json) - } - catch { - Write-Error "Invoke-RestMethod $prLabelUri failed with exception:`n$_" - } + [boolean]$CloseAfterOpenForTesting=$false +) - $resp | Write-Verbose - Write-Host -f green "Label(s) [$prLabelArray] added to pull request: https://github.com/$RepoOwner/$RepoName/pull/$prNumber" -} +. "${PSScriptRoot}\common.ps1" try { - $resp = Invoke-RestMethod -Headers $headers "https://api.github.com/repos/$RepoOwner/$RepoName/pulls?$query" + $resp = Get-GitHubPullRequests -RepoOwner $RepoOwner -RepoName $RepoName ` + -Head "${PROwner}:${PRBranch}" -Base $BaseBranch } catch { - Write-Error "Invoke-RestMethod [https://api.github.com/repos/$RepoOwner/$RepoName/pulls?$query] failed with exception:`n$_" + LogError "Get-GitHubPullRequests failed with exception:`n$_" exit 1 } + $resp | Write-Verbose if ($resp.Count -gt 0) { - Write-Host -f green "Pull request already exists $($resp[0].html_url)" - - # setting variable to reference the pull request by number - Write-Host "##vso[task.setvariable variable=Submitted.PullRequest.Number]$($resp[0].number)" - AddLabels $resp[0].number $PRLabels + LogDebug "Pull request already exists $($resp[0].html_url)" + # setting variable to reference the pull request by number + Write-Host "##vso[task.setvariable variable=Submitted.PullRequest.Number]$($resp[0].number)" } else { - $data = @{ - title = $PRTitle - head = "${PROwner}:${PRBranch}" - base = $BaseBranch - body = $PRBody - maintainer_can_modify = $true - } - try { - $resp = Invoke-RestMethod -Method POST -Headers $headers ` - "https://api.github.com/repos/$RepoOwner/$RepoName/pulls" ` - -Body ($data | ConvertTo-Json) + $resp = New-GitHubPullRequest -RepoOwner $RepoOwner -RepoName $RepoName -Title $PRTitle ` + -Head "${PROwner}:${PRBranch}" -Base $BaseBranch -Body $PRBody -Maintainer_Can_Modify $true ` + -AuthToken $AuthToken + + $resp | Write-Verbose + LogDebug "Pull request created https://github.com/$RepoOwner/$RepoName/pull/$($resp.number)" + + # setting variable to reference the pull request by number + Write-Host "##vso[task.setvariable variable=Submitted.PullRequest.Number]$($resp.number)" + + Add-GitHubPullRequestReviewers -RepoOwner $RepoOwner -RepoName $RepoName -PrNumber $resp.number ` + -Users $UserReviewers -Teams $TeamReviewers -AuthToken $AuthToken + + if ($CloseAfterOpenForTesting) { + $prState = "closed" + LogDebug "Updating https://github.com/$RepoOwner/$RepoName/pull/$($resp.number) state to closed because this was only testing." + } + else { + $prState = "open" + } + + Update-GitHubIssue -RepoOwner $RepoOwner -RepoName $RepoName -IssueNumber $resp.number ` + -State $prState -Labels $PRLabels -Assignees $Assignees -AuthToken $AuthToken } catch { - Write-Error "Invoke-RestMethod [https://api.github.com/repos/$RepoOwner/$RepoName/pulls] failed with exception:`n$_" + LogError "Call to GitHub API failed with exception:`n$_" exit 1 } - - $resp | Write-Verbose - Write-Host -f green "Pull request created https://github.com/$RepoOwner/$RepoName/pull/$($resp.number)" - - # setting variable to reference the pull request by number - Write-Host "##vso[task.setvariable variable=Submitted.PullRequest.Number]$($resp.number)" - - AddLabels $resp.number $PRLabels } diff --git a/eng/common/scripts/Verify-Links.ps1 b/eng/common/scripts/Verify-Links.ps1 index 946655b3fcd9..c9991a058894 100644 --- a/eng/common/scripts/Verify-Links.ps1 +++ b/eng/common/scripts/Verify-Links.ps1 @@ -1,5 +1,5 @@ param ( - # url list to verify links. Can either be a http address or a local file request. Local file paths support md and html files. + # url list to verify links. Can either be a http address or a local file request. Local file paths support md and html files. [string[]] $urls, # file that contains a set of links to ignore when verifying [string] $ignoreLinksFile = "$PSScriptRoot/ignore-links.txt", @@ -17,14 +17,14 @@ param ( [string] $branchReplaceRegex = "^(https://github.com/.*/(?:blob|tree)/)master(/.*)$", # the substitute branch name or SHA commit [string] $branchReplacementName = "", - # flag to allow checking against azure sdk link guidance. + # flag to allow checking against azure sdk link guidance. Check link guidance here: https://aka.ms/azsdk/guideline/links [bool] $checkLinkGuidance = $false ) $ProgressPreference = "SilentlyContinue"; # Disable invoke-webrequest progress dialog # Regex of the locale keywords. $locale = "/en-us/" - +$emptyLinkMessage = "There is at least one empty link in the page. Please replace with absolute link. Check here for more information: https://aka.ms/azsdk/guideline/links" function NormalizeUrl([string]$url){ if (Test-Path $url) { $url = "file://" + (Resolve-Path $url).ToString(); @@ -85,16 +85,18 @@ function ResolveUri ([System.Uri]$referralUri, [string]$link) $linkUri = [System.Uri]$link; # Our link guidelines do not allow relative links so only resolve them when we are not # validating links against our link guidelines (i.e. !$checkLinkGuideance) - if(!$checkLinkGuidance) { - if (!$linkUri.IsAbsoluteUri) { + if ($checkLinkGuidance -and !$linkUri.IsAbsoluteUri) { + return $linkUri + } + + if (!$linkUri.IsAbsoluteUri) { # For rooted paths resolve from the baseUrl - if ($link.StartsWith("/")) { - Write-Verbose "rooturl = $rootUrl" - $linkUri = new-object System.Uri([System.Uri]$rootUrl, ".$link"); - } - else { - $linkUri = new-object System.Uri($referralUri, $link); - } + if ($link.StartsWith("/")) { + Write-Verbose "rooturl = $rootUrl" + $linkUri = new-object System.Uri([System.Uri]$rootUrl, ".$link"); + } + else { + $linkUri = new-object System.Uri($referralUri, $link); } } @@ -134,6 +136,10 @@ function ParseLinks([string]$baseUri, [string]$htmlContent) function CheckLink ([System.Uri]$linkUri) { + if(!$linkUri.ToString().Trim()) { + LogWarning "Found Empty link. Please use absolute link instead. Check here for more information: https://aka.ms/azsdk/guideline/links" + return $false + } if ($checkedLinks.ContainsKey($linkUri)) { if (!$checkedLinks[$linkUri]) { LogWarning "broken link $linkUri" @@ -150,7 +156,7 @@ function CheckLink ([System.Uri]$linkUri) $linkValid = $false } } - else { + elseif ($linkUri.IsAbsoluteUri) { try { $headRequestSucceeded = $true try { @@ -193,11 +199,29 @@ function CheckLink ([System.Uri]$linkUri) } } - # Check if link uri includes locale info. - if ($checkLinkGuidance -and ($linkUri -match $locale)) { - LogWarning "DO NOT include locale $locale information in links: $linkUri." - $linkValid = $false + if ($checkLinkGuidance) { + if ($linkUri.Scheme -eq 'http') { + LogWarning "DO NOT use 'http' in $linkUri. Please use secure link with https instead. Check here for more information: https://aka.ms/azsdk/guideline/links" + $linkValid = $false + } + $link = $linkUri.ToString() + # Check if the url is relative links, suppress the archor link validation. + if (!$linkUri.IsAbsoluteUri -and !$link.StartsWith("#")) { + LogWarning "DO NOT use relative link $linkUri. Please use absolute link instead. Check here for more information: https://aka.ms/azsdk/guideline/links" + $linkValid = $false + } + # Check if the url is anchor link has any uppercase. + if ($link -cmatch '#[^?]*[A-Z]') { + LogWarning "Please lower case your anchor tags (i.e. anything after '#' in your link '$linkUri'. Check here for more information: https://aka.ms/azsdk/guideline/links" + $linkValid = $false + } + # Check if link uri includes locale info. + if ($linkUri -match $locale) { + LogWarning "DO NOT include locale $locale information in links: $linkUri. Check here for more information: https://aka.ms/azsdk/guideline/links" + $linkValid = $false + } } + $checkedLinks[$linkUri] = $linkValid return $linkValid } @@ -270,7 +294,6 @@ $checkedPages = @{}; $checkedLinks = @{}; $badLinks = @{}; $pageUrisToCheck = new-object System.Collections.Queue - foreach ($url in $urls) { $uri = NormalizeUrl $url $pageUrisToCheck.Enqueue($uri); @@ -286,9 +309,12 @@ while ($pageUrisToCheck.Count -ne 0) Write-Host "Found $($linkUris.Count) links on page $pageUri"; $badLinksPerPage = @(); foreach ($linkUri in $linkUris) { - $linkUri = ReplaceGithubLink $linkUri - $isLinkValid = CheckLink $linkUri + $replacedLink = ReplaceGithubLink $linkUri + $isLinkValid = CheckLink $replacedLink if (!$isLinkValid -and !$badLinksPerPage.Contains($linkUri)) { + if (!$linkUri.ToString().Trim()) { + $linkUri = $emptyLinkMessage + } $badLinksPerPage += $linkUri } if ($recursive -and $isLinkValid) { diff --git a/eng/common/scripts/add-pullrequest-reviewers.ps1 b/eng/common/scripts/add-pullrequest-reviewers.ps1 deleted file mode 100644 index 3198dcb40d2c..000000000000 --- a/eng/common/scripts/add-pullrequest-reviewers.ps1 +++ /dev/null @@ -1,61 +0,0 @@ -param( - [Parameter(Mandatory = $true)] - $RepoOwner, - - [Parameter(Mandatory = $true)] - $RepoName, - - [Parameter(Mandatory = $false)] - $GitHubUsers = "", - - [Parameter(Mandatory = $false)] - $GitHubTeams = "", - - [Parameter(Mandatory = $true)] - $PRNumber, - - [Parameter(Mandatory = $true)] - $AuthToken -) - -function AddMembers($memberName, $additionSet) { - $headers = @{ - Authorization = "bearer $AuthToken" - } - $uri = "https://api.github.com/repos/$RepoOwner/$RepoName/pulls/$PRNumber/requested_reviewers" - $errorOccurred = $false - - foreach ($id in $additionSet) { - try { - $postResp = @{} - $postResp[$memberName] = @($id) - $postResp = $postResp | ConvertTo-Json - - Write-Host $postResp - $resp = Invoke-RestMethod -Method Post -Headers $headers -Body $postResp -Uri $uri -MaximumRetryCount 3 - $resp | Write-Verbose - } - catch { - Write-Host "Error attempting to add $user `n$_" - $errorOccurred = $true - } - } - - return $errorOccurred -} - -# at least one of these needs to be populated -if (-not $GitHubUsers -and -not $GitHubTeams) { - Write-Host "No user provided for addition, exiting." - exit 0 -} - -$userAdditions = @($GitHubUsers.Split(",") | % { $_.Trim() } | ? { return $_ }) -$teamAdditions = @($GitHubTeams.Split(",") | % { $_.Trim() } | ? { return $_ }) - -$errorsOccurredAddingUsers = AddMembers -memberName "reviewers" -additionSet $userAdditions -$errorsOccurredAddingTeams = AddMembers -memberName "team_reviewers" -additionSet $teamAdditions - -if ($errorsOccurredAddingUsers -or $errorsOccurredAddingTeams) { - exit 1 -} diff --git a/eng/common/scripts/common.ps1 b/eng/common/scripts/common.ps1 index 6a1f1487832b..891821529c4e 100644 --- a/eng/common/scripts/common.ps1 +++ b/eng/common/scripts/common.ps1 @@ -8,6 +8,9 @@ $EngScriptsDir = Join-Path $EngDir "scripts" . (Join-Path $EngCommonScriptsDir SemVer.ps1) . (Join-Path $EngCommonScriptsDir ChangeLog-Operations.ps1) . (Join-Path $EngCommonScriptsDir Package-Properties.ps1) +. (Join-Path $EngCommonScriptsDir logging.ps1) +. (Join-Path $EngCommonScriptsDir Invoke-GitHubAPI.ps1) +. (Join-Path $EngCommonScriptsDir artifact-metadata-parsing.ps1) # Setting expected from common languages settings $Language = "Unknown" @@ -20,7 +23,7 @@ $EngScriptsLanguageSettings = Join-path $EngScriptsDir "Language-Settings.ps1" if (Test-Path $EngScriptsLanguageSettings) { . $EngScriptsLanguageSettings } -If ($LanguageShort -eq $null) +if (-not $LanguageShort) { $LangaugeShort = $Language } diff --git a/eng/common/scripts/copy-docs-to-blobstorage.ps1 b/eng/common/scripts/copy-docs-to-blobstorage.ps1 index 9b7dea48b1d5..a81fc485f953 100644 --- a/eng/common/scripts/copy-docs-to-blobstorage.ps1 +++ b/eng/common/scripts/copy-docs-to-blobstorage.ps1 @@ -4,16 +4,14 @@ param ( $AzCopy, $DocLocation, $SASKey, - $Language, $BlobName, $ExitOnError=1, $UploadLatest=1, $PublicArtifactLocation = "", $RepoReplaceRegex = "(https://github.com/.*/(?:blob|tree)/)master" ) -. (Join-Path $PSScriptRoot artifact-metadata-parsing.ps1) -$Language = $Language.ToLower() +. (Join-Path $PSScriptRoot common.ps1) # Regex inspired but simplified from https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string $SEMVER_REGEX = "^(?0|[1-9]\d*)\.(?0|[1-9]\d*)\.(?0|[1-9]\d*)(?:-?(?[a-zA-Z-]*)(?:\.?(?0|[1-9]\d*))?)?$" @@ -120,7 +118,7 @@ function Get-Existing-Versions [Parameter(Mandatory=$true)] [String]$PkgName ) $versionUri = "$($BlobName)/`$web/$($Language)/$($PkgName)/versioning/versions" - Write-Host "Heading to $versionUri to retrieve known versions" + LogDebug "Heading to $versionUri to retrieve known versions" try { return ((Invoke-RestMethod -Uri $versionUri -MaximumRetryCount 3 -RetryIntervalSec 5) -Split "\n" | % {$_.Trim()} | ? { return $_ }) @@ -128,12 +126,12 @@ function Get-Existing-Versions catch { # Handle 404. If it's 404, this is the first time we've published this package. if ($_.Exception.Response.StatusCode.value__ -eq 404){ - Write-Host "Version file does not exist. This is the first time we have published this package." + LogDebug "Version file does not exist. This is the first time we have published this package." } else { # If it's not a 404. exit. We don't know what's gone wrong. - Write-Host "Exception getting version file. Aborting" - Write-Host $_ + LogError "Exception getting version file. Aborting" + LogError $_ exit(1) } } @@ -148,18 +146,18 @@ function Update-Existing-Versions ) $existingVersions = @(Get-Existing-Versions -PkgName $PkgName) - Write-Host "Before I update anything, I am seeing $existingVersions" + LogDebug "Before I update anything, I am seeing $existingVersions" if (!$existingVersions) { $existingVersions = @() $existingVersions += $PkgVersion - Write-Host "No existing versions. Adding $PkgVersion." + LogDebug "No existing versions. Adding $PkgVersion." } else { $existingVersions += $pkgVersion - Write-Host "Already Existing Versions. Adding $PkgVersion." + LogDebug "Already Existing Versions. Adding $PkgVersion." } $existingVersions = $existingVersions | Select-Object -Unique @@ -167,9 +165,9 @@ function Update-Existing-Versions # newest first $sortedVersionObj = (Sort-Versions -VersionArray $existingVersions) - Write-Host $sortedVersionObj - Write-Host $sortedVersionObj.LatestGAPackage - Write-Host $sortedVersionObj.LatestPreviewPackage + LogDebug $sortedVersionObj + LogDebug $sortedVersionObj.LatestGAPackage + LogDebug $sortedVersionObj.LatestPreviewPackage # write to file. to get the correct performance with "actually empty" files, we gotta do the newline # join ourselves. This way we have absolute control over the trailing whitespace. @@ -177,10 +175,9 @@ function Update-Existing-Versions $sortedVersionObj.LatestGAPackage | Out-File -File "$($DocLocation)/latest-ga" -Force -NoNewLine $sortedVersionObj.LatestPreviewPackage | Out-File -File "$($DocLocation)/latest-preview" -Force -NoNewLine - & $($AzCopy) cp "$($DocLocation)/versions" "$($DocDest)/$($PkgName)/versioning/versions$($SASKey)" - & $($AzCopy) cp "$($DocLocation)/latest-preview" "$($DocDest)/$($PkgName)/versioning/latest-preview$($SASKey)" - & $($AzCopy) cp "$($DocLocation)/latest-ga" "$($DocDest)/$($PkgName)/versioning/latest-ga$($SASKey)" - + & $($AzCopy) cp "$($DocLocation)/versions" "$($DocDest)/$($PkgName)/versioning/versions$($SASKey)" --cache-control "max-age=300, must-revalidate" + & $($AzCopy) cp "$($DocLocation)/latest-preview" "$($DocDest)/$($PkgName)/versioning/latest-preview$($SASKey)" --cache-control "max-age=300, must-revalidate" + & $($AzCopy) cp "$($DocLocation)/latest-ga" "$($DocDest)/$($PkgName)/versioning/latest-ga$($SASKey)" --cache-control "max-age=300, must-revalidate" return $sortedVersionObj } @@ -195,32 +192,32 @@ function Upload-Blobs #eg : $BlobName = "https://azuresdkdocs.blob.core.windows.net" $DocDest = "$($BlobName)/`$web/$($Language)" - Write-Host "DocDest $($DocDest)" - Write-Host "PkgName $($PkgName)" - Write-Host "DocVersion $($DocVersion)" - Write-Host "DocDir $($DocDir)" - Write-Host "Final Dest $($DocDest)/$($PkgName)/$($DocVersion)" - Write-Host "Release Tag $($ReleaseTag)" + LogDebug "DocDest $($DocDest)" + LogDebug "PkgName $($PkgName)" + LogDebug "DocVersion $($DocVersion)" + LogDebug "DocDir $($DocDir)" + LogDebug "Final Dest $($DocDest)/$($PkgName)/$($DocVersion)" + LogDebug "Release Tag $($ReleaseTag)" # Use the step to replace master link to release tag link if ($ReleaseTag) { foreach ($htmlFile in (Get-ChildItem $DocDir -include *.html -r)) { - $fileContent = Get-Content -Path $htmlFile + $fileContent = Get-Content -Path $htmlFile -Raw $updatedFileContent = $fileContent -replace $RepoReplaceRegex, "`${1}$ReleaseTag" if ($updatedFileContent -ne $fileContent) { - Set-Content -Path $htmlFile -Value $updatedFileContent + Set-Content -Path $htmlFile -Value $updatedFileContent -NoNewLine } } } else { - Write-Warning "Not able to do the master link replacement, since no release tag found for the release. Please manually check." + LogWarning "Not able to do the master link replacement, since no release tag found for the release. Please manually check." } - Write-Host "Uploading $($PkgName)/$($DocVersion) to $($DocDest)..." - & $($AzCopy) cp "$($DocDir)/**" "$($DocDest)/$($PkgName)/$($DocVersion)$($SASKey)" --recursive=true + LogDebug "Uploading $($PkgName)/$($DocVersion) to $($DocDest)..." + & $($AzCopy) cp "$($DocDir)/**" "$($DocDest)/$($PkgName)/$($DocVersion)$($SASKey)" --recursive=true --cache-control "max-age=300, must-revalidate" - Write-Host "Handling versioning files under $($DocDest)/$($PkgName)/versioning/" + LogDebug "Handling versioning files under $($DocDest)/$($PkgName)/versioning/" $versionsObj = (Update-Existing-Versions -PkgName $PkgName -PkgVersion $DocVersion -DocDest $DocDest) # we can safely assume we have AT LEAST one version here. Reason being we just completed Update-Existing-Versions @@ -228,155 +225,18 @@ function Upload-Blobs if ($UploadLatest -and ($latestVersion -eq $DocVersion)) { - Write-Host "Uploading $($PkgName) to latest folder in $($DocDest)..." - & $($AzCopy) cp "$($DocDir)/**" "$($DocDest)/$($PkgName)/latest$($SASKey)" --recursive=true + LogDebug "Uploading $($PkgName) to latest folder in $($DocDest)..." + & $($AzCopy) cp "$($DocDir)/**" "$($DocDest)/$($PkgName)/latest$($SASKey)" --recursive=true --cache-control "max-age=300, must-revalidate" } } -if ($Language -eq "javascript") -{ - $PublishedDocs = Get-ChildItem "$($DocLocation)/documentation" | Where-Object -FilterScript {$_.Name.EndsWith(".zip")} - - foreach ($Item in $PublishedDocs) { - $PkgName = "azure-$($Item.BaseName)" - Write-Host $PkgName - Expand-Archive -Force -Path "$($DocLocation)/documentation/$($Item.Name)" -DestinationPath "$($DocLocation)/documentation/$($Item.BaseName)" - $dirList = Get-ChildItem "$($DocLocation)/documentation/$($Item.BaseName)/$($Item.BaseName)" -Attributes Directory - - if($dirList.Length -eq 1){ - $DocVersion = $dirList[0].Name - Write-Host "Uploading Doc for $($PkgName) Version:- $($DocVersion)..." - $releaseTag = RetrieveReleaseTag "NPM" $PublicArtifactLocation - Upload-Blobs -DocDir "$($DocLocation)/documentation/$($Item.BaseName)/$($Item.BaseName)/$($DocVersion)" -PkgName $PkgName -DocVersion $DocVersion -ReleaseTag $releaseTag - } - else{ - Write-Host "found more than 1 folder under the documentation for package - $($Item.Name)" - } - } -} -if ($Language -eq "dotnet") +if ((Get-ChildItem -Path Function: | ? { $_.Name -eq $PublishGithubIODocsFn }).Count -gt 0) { - $PublishedPkgs = Get-ChildItem "$($DocLocation)/packages" | Where-Object -FilterScript {$_.Name.EndsWith(".nupkg") -and -not $_.Name.EndsWith(".symbols.nupkg")} - $PublishedDocs = Get-ChildItem "$($DocLocation)" | Where-Object -FilterScript {$_.Name.StartsWith("Docs.")} - - foreach ($Item in $PublishedDocs) { - $PkgName = $Item.Name.Remove(0, 5) - $PkgFullName = $PublishedPkgs | Where-Object -FilterScript {$_.Name -match "$($PkgName).\d"} - - if (($PkgFullName | Measure-Object).count -eq 1) - { - $DocVersion = $PkgFullName[0].BaseName.Remove(0, $PkgName.Length + 1) - - Write-Host "Start Upload for $($PkgName)/$($DocVersion)" - Write-Host "DocDir $($Item)" - Write-Host "PkgName $($PkgName)" - Write-Host "DocVersion $($DocVersion)" - $releaseTag = RetrieveReleaseTag "Nuget" $PublicArtifactLocation - Upload-Blobs -DocDir "$($Item)" -PkgName $PkgName -DocVersion $DocVersion -ReleaseTag $releaseTag - } - else - { - Write-Host "Package with the same name Exists. Upload Skipped" - continue - } - } + &$PublishGithubIODocsFn -DocLocation $DocLocation -PublicArtifactLocation $PublicArtifactLocation } - -if ($Language -eq "python") +else { - $PublishedDocs = Get-ChildItem "$DocLocation" | Where-Object -FilterScript {$_.Name.EndsWith(".zip")} - - foreach ($Item in $PublishedDocs) { - $PkgName = $Item.BaseName - $ZippedDocumentationPath = Join-Path -Path $DocLocation -ChildPath $Item.Name - $UnzippedDocumentationPath = Join-Path -Path $DocLocation -ChildPath $PkgName - $VersionFileLocation = Join-Path -Path $UnzippedDocumentationPath -ChildPath "version.txt" - - Expand-Archive -Force -Path $ZippedDocumentationPath -DestinationPath $UnzippedDocumentationPath - - $Version = $(Get-Content $VersionFileLocation).Trim() - - Write-Host "Discovered Package Name: $PkgName" - Write-Host "Discovered Package Version: $Version" - Write-Host "Directory for Upload: $UnzippedDocumentationPath" - $releaseTag = RetrieveReleaseTag "PyPI" $PublicArtifactLocation - Upload-Blobs -DocDir $UnzippedDocumentationPath -PkgName $PkgName -DocVersion $Version -ReleaseTag $releaseTag - } -} - -if ($Language -eq "java") -{ - $PublishedDocs = Get-ChildItem "$DocLocation" | Where-Object -FilterScript {$_.Name.EndsWith("-javadoc.jar")} - foreach ($Item in $PublishedDocs) { - $UnjarredDocumentationPath = "" - try { - $PkgName = $Item.BaseName - # The jar's unpacking command doesn't allow specifying a target directory - # and will unjar all of the files in whatever the current directory is. - # Create a subdirectory to unjar into, set the location, unjar and then - # set the location back to its original location. - $UnjarredDocumentationPath = Join-Path -Path $DocLocation -ChildPath $PkgName - New-Item -ItemType directory -Path "$UnjarredDocumentationPath" - $CurrentLocation = Get-Location - Set-Location $UnjarredDocumentationPath - jar -xf "$($Item.FullName)" - Set-Location $CurrentLocation - - # If javadocs are produced for a library with source, there will always be an - # index.html. If this file doesn't exist in the UnjarredDocumentationPath then - # this is a sourceless library which means there are no javadocs and nothing - # should be uploaded to blob storage. - $IndexHtml = Join-Path -Path $UnjarredDocumentationPath -ChildPath "index.html" - if (!(Test-Path -path $IndexHtml)) - { - Write-Host "$($PkgName) does not have an index.html file, skippping." - continue - } - - # Get the POM file for the artifact we're processing - $PomFile = $Item.FullName.Substring(0,$Item.FullName.LastIndexOf(("-javadoc.jar"))) + ".pom" - Write-Host "PomFile $($PomFile)" - - # Pull the version from the POM - [xml]$PomXml = Get-Content $PomFile - $Version = $PomXml.project.version - $ArtifactId = $PomXml.project.artifactId - - Write-Host "Start Upload for $($PkgName)/$($Version)" - Write-Host "DocDir $($UnjarredDocumentationPath)" - Write-Host "PkgName $($ArtifactId)" - Write-Host "DocVersion $($Version)" - $releaseTag = RetrieveReleaseTag "Maven" $PublicArtifactLocation - Upload-Blobs -DocDir $UnjarredDocumentationPath -PkgName $ArtifactId -DocVersion $Version -ReleaseTag $releaseTag - - } Finally { - if (![string]::IsNullOrEmpty($UnjarredDocumentationPath)) { - if (Test-Path -Path $UnjarredDocumentationPath) { - Write-Host "Cleaning up $UnjarredDocumentationPath" - Remove-Item -Recurse -Force $UnjarredDocumentationPath - } - } - } - } -} - -if ($Language -eq "c") -{ - # The documentation publishing process for C differs from the other - # langauges in this file because this script is invoked for the whole SDK - # publishing. It is not, for example, invoked once per service publishing. - # There is a similar situation for other langauge publishing steps above... - # Those loops are left over from previous versions of this script which were - # used to publish multiple docs packages in a single invocation. - $pkgInfo = Get-Content $DocLocation/package-info.json | ConvertFrom-Json - $releaseTag = RetrieveReleaseTag "C" $PublicArtifactLocation - Upload-Blobs -DocDir $DocLocation -PkgName 'docs' -DocVersion $pkgInfo.version -ReleaseTag $releaseTag + LogWarning "The function '$PublishGithubIODocsFn' was not found." } -if ($Language -eq "cpp") -{ - $packageInfo = (Get-Content (Join-Path $DocLocation 'package-info.json') | ConvertFrom-Json) - $releaseTag = RetrieveReleaseTag "CPP" $PublicArtifactLocation - Upload-Blobs -DocDir $DocLocation -PkgName $packageInfo.name -DocVersion $packageInfo.version -ReleaseTag $releaseTag -} diff --git a/eng/common/scripts/git-branch-push.ps1 b/eng/common/scripts/git-branch-push.ps1 index 9b3d78345589..72c0df0f6b63 100644 --- a/eng/common/scripts/git-branch-push.ps1 +++ b/eng/common/scripts/git-branch-push.ps1 @@ -25,7 +25,15 @@ param( [string] $GitUrl, [Parameter(Mandatory = $false)] - [string] $PushArgs = "" + [string] $PushArgs = "", + + [string] $RemoteName = "azure-sdk-fork", + + [Parameter(Mandatory = $false)] + [boolean] $SkipCommit = $false, + + [Parameter(Mandatory = $false)] + [boolean] $AmendCommit = $false ) # This is necessay because of the janky git command output writing to stderr. @@ -33,16 +41,19 @@ param( # would fail the first time git wrote command output. $ErrorActionPreference = "Continue" -Write-Host "git remote add azure-sdk-fork $GitUrl" -git remote add azure-sdk-fork $GitUrl -if ($LASTEXITCODE -ne 0) +if (!(git remote | ? {$_ -eq $RemoteName})) { - Write-Error "Unable to add remote LASTEXITCODE=$($LASTEXITCODE), see command output above." - exit $LASTEXITCODE + Write-Host "git remote add $RemoteName $GitUrl" + git remote add $RemoteName $GitUrl + if ($LASTEXITCODE -ne 0) + { + Write-Error "Unable to add remote LASTEXITCODE=$($LASTEXITCODE), see command output above." + exit $LASTEXITCODE + } } -Write-Host "git fetch azure-sdk-fork" -git fetch azure-sdk-fork +Write-Host "git fetch $RemoteName" +git fetch $RemoteName if ($LASTEXITCODE -ne 0) { Write-Error "Unable to fetch remote LASTEXITCODE=$($LASTEXITCODE), see command output above." @@ -57,12 +68,23 @@ if ($LASTEXITCODE -ne 0) exit $LASTEXITCODE } -Write-Host "git -c user.name=`"azure-sdk`" -c user.email=`"azuresdk@microsoft.com`" commit -am `"$($CommitMsg)`"" -git -c user.name="azure-sdk" -c user.email="azuresdk@microsoft.com" commit -am "$($CommitMsg)" -if ($LASTEXITCODE -ne 0) -{ - Write-Error "Unable to add files and create commit LASTEXITCODE=$($LASTEXITCODE), see command output above." - exit $LASTEXITCODE +if (!$SkipCommit) { + if ($AmendCommit) { + $amendOption = "--amend" + } + else { + $amendOption = "" + } + Write-Host "git -c user.name=`"azure-sdk`" -c user.email=`"azuresdk@microsoft.com`" commit $amendOption -am `"$($CommitMsg)`"" + git -c user.name="azure-sdk" -c user.email="azuresdk@microsoft.com" commit $amendOption -am "$($CommitMsg)" + if ($LASTEXITCODE -ne 0) + { + Write-Error "Unable to add files and create commit LASTEXITCODE=$($LASTEXITCODE), see command output above." + exit $LASTEXITCODE + } +} +else { + Write-Host "Skipped applying commit" } # The number of retries can be increased if necessary. In theory, the number of retries @@ -76,15 +98,15 @@ $tryNumber = 0 do { $needsRetry = $false - Write-Host "git push azure-sdk-fork $PRBranchName $PushArgs" - git push azure-sdk-fork $PRBranchName $PushArgs + Write-Host "git push $RemoteName $PRBranchName $PushArgs" + git push $RemoteName $PRBranchName $PushArgs $tryNumber++ if ($LASTEXITCODE -ne 0) { $needsRetry = $true Write-Host "Git push failed with LASTEXITCODE=$($LASTEXITCODE) Need to fetch and rebase: attempt number=$($tryNumber)" - Write-Host "git fetch azure-sdk-fork" - git fetch azure-sdk-fork + Write-Host "git fetch $RemoteName" + git fetch $RemoteName if ($LASTEXITCODE -ne 0) { Write-Error "Unable to fetch remote LASTEXITCODE=$($LASTEXITCODE), see command output above." @@ -102,8 +124,8 @@ do continue } - Write-Host "git reset --hard azure-sdk-fork/${PRBranchName}" - git reset --hard azure-sdk-fork/${PRBranchName} + Write-Host "git reset --hard $RemoteName/${PRBranchName}" + git reset --hard $RemoteName/${PRBranchName} if ($LASTEXITCODE -ne 0) { Write-Error "Unable to hard reset branch LASTEXITCODE=$($LASTEXITCODE), see command output above." @@ -119,6 +141,7 @@ do exit $LASTEXITCODE } + Write-Host "git add -A" git add -A if ($LASTEXITCODE -ne 0) diff --git a/eng/common/scripts/logging.ps1 b/eng/common/scripts/logging.ps1 new file mode 100644 index 000000000000..9b327fd81c19 --- /dev/null +++ b/eng/common/scripts/logging.ps1 @@ -0,0 +1,40 @@ +if (-not $isDevOpsRun) +{ + $isDevOpsRun = ($null -ne $env:SYSTEM_TEAMPROJECTID) +} + +function LogWarning +{ + if ($isDevOpsRun) + { + Write-Host "##vso[task.LogIssue type=warning;]$args" + } + else + { + Write-Warning "$args" + } +} + +function LogError +{ + if ($isDevOpsRun) + { + Write-Host "##vso[task.LogIssue type=error;]$args" + } + else + { + Write-Error "$args" + } +} + +function LogDebug +{ + if ($isDevOpsRun) + { + Write-Host "[debug]$args" + } + else + { + Write-Debug "$args" + } +} \ No newline at end of file diff --git a/eng/common/scripts/modules/ChangeLog-Operations.psm1 b/eng/common/scripts/modules/ChangeLog-Operations.psm1 index 5aed584d018b..cba8a2631298 100644 --- a/eng/common/scripts/modules/ChangeLog-Operations.psm1 +++ b/eng/common/scripts/modules/ChangeLog-Operations.psm1 @@ -1,8 +1,5 @@ -# Common Changelog Operations - $RELEASE_TITLE_REGEX = "(?^\#+.*(?\b\d+\.\d+\.\d+([^0-9\s][^\s:]+)?)(\s(?\(Unreleased\)|\(\d{4}-\d{2}-\d{2}\)))?)" -# Returns a Collection of changeLogEntry object containing changelog info for all version present in the gived CHANGELOG function Get-ChangeLogEntries { param ( [Parameter(Mandatory = $true)] diff --git a/eng/common/scripts/modules/Package-Properties.psm1 b/eng/common/scripts/modules/Package-Properties.psm1 index b0572a71d449..61c45455f0d0 100644 --- a/eng/common/scripts/modules/Package-Properties.psm1 +++ b/eng/common/scripts/modules/Package-Properties.psm1 @@ -1,3 +1,4 @@ +# This Files has been retired # Helper functions for retireving useful information from azure-sdk-for-* repo # Example Use : Import-Module .\eng\common\scripts\modules class PackageProps diff --git a/eng/pipelines/aggregate-reports.yml b/eng/pipelines/aggregate-reports.yml index 947dcc40c871..294712a62d55 100644 --- a/eng/pipelines/aggregate-reports.yml +++ b/eng/pipelines/aggregate-reports.yml @@ -23,7 +23,8 @@ jobs: - template: ../common/pipelines/templates/steps/verify-links.yml parameters: Directory: "" - + CheckLinkGuidance: $true + - script: 'npm ci' workingDirectory: '$(Build.SourcesDirectory)/eng/tools/analyze-deps' displayName: 'Install tool dependencies' diff --git a/eng/pipelines/mgmt-ci.yml b/eng/pipelines/mgmt-ci.yml index 83d91d0acbf5..aa0d307de0ad 100644 --- a/eng/pipelines/mgmt-ci.yml +++ b/eng/pipelines/mgmt-ci.yml @@ -4,19 +4,53 @@ trigger: - master paths: exclude: - - sdk/core/ + - eng/common/ + - sdk/anomalydetector/ai-anomaly-detector/ + - sdk/appconfiguration/app-configuration/ + - sdk/communication/communication-administration/ + - sdk/communication/communication-chat/ + - sdk/communication/communication-common/ + - sdk/communication/communication-sms/ + - sdk/core/abort-controller/ + - sdk/core/core-amqp/ + - sdk/core/core-arm/ + - sdk/core/core-asynciterator-polyfill/ + - sdk/core/core-auth/ + - sdk/core/core-client/ + - sdk/core/core-http/ + - sdk/core/core-https/ + - sdk/core/core-lro/ + - sdk/core/core-paging/ + - sdk/core/core-tracing/ + - sdk/core/core-xml/ + - sdk/core/logger/ - sdk/cosmosdb/cosmos/ - - sdk/eventhub/ - - sdk/identity/ + - sdk/digitaltwins/digital-twins/ + - sdk/eventgrid/eventgrid/ + - sdk/eventhub/event-hubs/ + - sdk/eventhub/event-processor-host/ + - sdk/eventhub/eventhubs-checkpointstore-blob/ + - sdk/formrecognizer/ai-form-recognizer/ + - sdk/identity/identity/ + - sdk/keyvault/keyvault-admin/ - sdk/keyvault/keyvault-certificates/ - sdk/keyvault/keyvault-keys/ - sdk/keyvault/keyvault-secrets/ + - sdk/metricsadvisor/ai-metrics-advisor/ + - sdk/monitor/monitor-opentelemetry-exporter/ + - sdk/schemaregistry/schema-registry/ + - sdk/schemaregistry/schema-registry-avro/ + - sdk/search/search-documents/ - sdk/servicebus/service-bus/ - sdk/storage/storage-blob/ - - sdk/storage/storage-datalake/ + - sdk/storage/storage-blob-changefeed/ + - sdk/storage/storage-file-datalake/ - sdk/storage/storage-file-share/ - sdk/storage/storage-queue/ + - sdk/tables/data-tables/ - sdk/template/template/ + - sdk/test-utils/recorder/ + - sdk/textanalytics/ai-text-analytics/ pr: none diff --git a/eng/pipelines/mgmt-pr.yml b/eng/pipelines/mgmt-pr.yml index 11cb0ebff504..b333bc477991 100644 --- a/eng/pipelines/mgmt-pr.yml +++ b/eng/pipelines/mgmt-pr.yml @@ -4,20 +4,53 @@ pr: - '*' paths: exclude: - - sdk/core/ + - eng/common/ + - sdk/anomalydetector/ai-anomaly-detector/ + - sdk/appconfiguration/app-configuration/ + - sdk/communication/communication-administration/ + - sdk/communication/communication-chat/ + - sdk/communication/communication-common/ + - sdk/communication/communication-sms/ + - sdk/core/abort-controller/ + - sdk/core/core-amqp/ + - sdk/core/core-arm/ + - sdk/core/core-asynciterator-polyfill/ + - sdk/core/core-auth/ + - sdk/core/core-client/ + - sdk/core/core-http/ + - sdk/core/core-https/ + - sdk/core/core-lro/ + - sdk/core/core-paging/ + - sdk/core/core-tracing/ + - sdk/core/core-xml/ + - sdk/core/logger/ - sdk/cosmosdb/cosmos/ - - sdk/eventhub/ - - sdk/identity/ + - sdk/digitaltwins/digital-twins/ + - sdk/eventgrid/eventgrid/ + - sdk/eventhub/event-hubs/ + - sdk/eventhub/event-processor-host/ + - sdk/eventhub/eventhubs-checkpointstore-blob/ + - sdk/formrecognizer/ai-form-recognizer/ + - sdk/identity/identity/ + - sdk/keyvault/keyvault-admin/ - sdk/keyvault/keyvault-certificates/ - sdk/keyvault/keyvault-keys/ - sdk/keyvault/keyvault-secrets/ - - sdk/keyvault/keyvault/ + - sdk/metricsadvisor/ai-metrics-advisor/ + - sdk/monitor/monitor-opentelemetry-exporter/ + - sdk/schemaregistry/schema-registry/ + - sdk/schemaregistry/schema-registry-avro/ + - sdk/search/search-documents/ - sdk/servicebus/service-bus/ - sdk/storage/storage-blob/ - - sdk/storage/storage-datalake/ + - sdk/storage/storage-blob-changefeed/ + - sdk/storage/storage-file-datalake/ - sdk/storage/storage-file-share/ - sdk/storage/storage-queue/ + - sdk/tables/data-tables/ - sdk/template/template/ + - sdk/test-utils/recorder/ + - sdk/textanalytics/ai-text-analytics/ variables: NodeVersion: '10.x' diff --git a/eng/pipelines/npm-tasks.yml b/eng/pipelines/npm-tasks.yml new file mode 100644 index 000000000000..1b34282cd991 --- /dev/null +++ b/eng/pipelines/npm-tasks.yml @@ -0,0 +1,68 @@ +trigger: none + +# This pipeline helps to run NPM admin tasks like remove or add tag to a released package version or deprecate a pacakge version +# Following variables should be set at queue time to run this pipeline +# variable name: TaskType +# valid Options: 'AddTag', 'RemoveTag', 'Deprecate', 'Unpublish' + +# variable name: PackageName +# e.g. values: '@azure/storage-blob', '@azure/core-http' + +# variable name: 'PkgVersion' +# e.g. values '1.0.0', '2.1.0.beta.1' + +# variable name: 'TagName' +# e.g values: 'latest', 'next' + +parameters: + - name: TaskType + displayName: Task Type + type: string + default: AddTag + values: + - AddTag + - RemoveTag + - Deprecate + - Unpublish + + - name: PackageName + displayName: Package Name (e.g. @azure/template) + type: string + default: '' + + - name: PkgVersion + displayName: Package Version (e.g. 1.1.0) + type: string + default: '' + + - name: TagName + displayName: Tag (e.g. latest, next) + type: string + default: '' + + - name: Reason + displayName: Reason + type: string + default: '' + +jobs: +- job: 'NPM_Admin_Job' + displayName: NPM package management + + pool: + vmImage: 'windows-2019' + + steps: + - task: PowerShell@2 + displayName: 'Run Task' + inputs: + targetType: filePath + filePath: "eng/scripts/npm-admin-tasks.ps1" + arguments: > + -taskType ${{parameters.TaskType}} + -packageName ${{parameters.PackageName}} + -pkgVersion ${{parameters.PkgVersion}} + -tagName ${{parameters.TagName}} + -npmToken "$(azure-sdk-npm-token)" + -reason "${{parameters.Reason}}" + pwsh: true diff --git a/eng/pipelines/prepare-pipelines.yml b/eng/pipelines/prepare-pipelines.yml new file mode 100644 index 000000000000..b0a55319aef5 --- /dev/null +++ b/eng/pipelines/prepare-pipelines.yml @@ -0,0 +1,10 @@ +trigger: none + +extends: + template: /eng/common/pipelines/templates/steps/prepare-pipelines.yml + parameters: + Repository: $(Build.Repository.Name) + Prefix: js + CIConventionOptions: '' + UPConventionOptions: '--variablegroup 24 --variablegroup 58 --variablegroup 76 --variablegroup 56' + TestsConventionOptions: '' diff --git a/eng/pipelines/templates/jobs/archetype-sdk-client.yml b/eng/pipelines/templates/jobs/archetype-sdk-client.yml index c69644566ffb..cac096689f4f 100644 --- a/eng/pipelines/templates/jobs/archetype-sdk-client.yml +++ b/eng/pipelines/templates/jobs/archetype-sdk-client.yml @@ -1,5 +1,6 @@ parameters: Artifacts: [] + TestPipeline: false ServiceDirectory: not-specified Matrix: Linux_Node8: @@ -16,8 +17,12 @@ parameters: TestType: "node" Browser_Linux_Node12: OSVmImage: "ubuntu-18.04" - NodeTestVersion: "12.x" + NodeTestVersion: "$(NodeVersion)" TestType: "browser" + Linux_Node14: + OSVmImage: "ubuntu-18.04" + NodeTestVersion: "14.x" + TestType: "node" jobs: - job: "Build" @@ -37,8 +42,9 @@ jobs: - template: ../steps/build.yml parameters: - Artifacts: ${{parameters.Artifacts}} - ServiceDirectory: ${{parameters.ServiceDirectory}} + Artifacts: ${{ parameters.Artifacts }} + ServiceDirectory: ${{ parameters.ServiceDirectory }} + TestPipeline: ${{ parameters.TestPipeline }} - job: "Analyze" dependsOn: "Build" @@ -53,8 +59,8 @@ jobs: - template: ../steps/analyze.yml parameters: - Artifacts: ${{parameters.Artifacts}} - ServiceDirectory: ${{parameters.ServiceDirectory}} + Artifacts: ${{ parameters.Artifacts }} + ServiceDirectory: ${{ parameters.ServiceDirectory }} # Only run tests if the matrix has entries - ${{ if ne(parameters.RunUnitTests, false) }}: diff --git a/eng/pipelines/templates/jobs/archetype-sdk-integration.yml b/eng/pipelines/templates/jobs/archetype-sdk-integration.yml index 48d3211ac19c..d34afb4d5f70 100644 --- a/eng/pipelines/templates/jobs/archetype-sdk-integration.yml +++ b/eng/pipelines/templates/jobs/archetype-sdk-integration.yml @@ -29,6 +29,9 @@ parameters: - name: ResourceGroupLocation type: string default: "" +- name: ResourceGroupLocationCanary + type: string + default: "centraluseuap" - name: ArmTemplateParameters type: string default: "@{}" @@ -44,22 +47,29 @@ parameters: - name: TestSame type: boolean default: false +- name: TestCanary + type: boolean + default: false - name: Matrix type: object default: - Linux Node 8: - OSVmImage: "ubuntu-18.04" + Windows Node 8: + OSVmImage: "windows-2019" TestType: "node" NodeTestVersion: "8.x" PublishCodeCoverage: true - Windows Node 10: - OSVmImage: "windows-2019" + Linux Node 10: + OSVmImage: "ubuntu-18.04" TestType: "node" NodeTestVersion: "10.x" - MacOS Node 12: - OSVmImage: "macOS-10.15" + Linux Node 12: + OSVmImage: "ubuntu-18.04" TestType: "node" NodeTestVersion: "12.x" + MacOS Node 14: + OSVmImage: "macOS-10.15" + TestType: "node" + NodeTestVersion: "14.x" jobs: - job: "IntegrationTest" @@ -95,7 +105,7 @@ jobs: Windows Browser: OSVmImage: "windows-2019" TestType: "browser" - NodeTestVersion: "12.x" + NodeTestVersion: "$(NodeVersion)" TestResultsFiles: "**/test-results.browser.xml" # Add matrix entry for sample testing @@ -111,13 +121,13 @@ jobs: OSVmImage: "ubuntu-18.04" TestType: "node" DependencyVersion: max - NodeTestVersion: "12.x" + NodeTestVersion: "$(NodeVersion)" TestResultsFiles: "**/test-results.xml" MinVersion_Node: OSVmImage: "ubuntu-18.04" TestType: "node" DependencyVersion: min - NodeTestVersion: "12.x" + NodeTestVersion: "$(NodeVersion)" TestResultsFiles: "**/test-results.xml" # Add matrix entry for same dep testing @@ -126,8 +136,18 @@ jobs: OSVmImage: "ubuntu-18.04" TestType: "node" DependencyVersion: same - NodeTestVersion: "12.x" - TestResultsFiles: "**/test-results.xml" + NodeTestVersion: "$(NodeVersion)" + TestResultsFiles: "**/test-results.xml" + + # Add matrix entry for canary testing + ${{ if eq(parameters.TestCanary, 'true') }}: + CanaryTest_Node: + OSVmImage: "ubuntu-18.04" + TestType: "node" + NodeTestVersion: "$(NodeVersion)" + TestResultsFiles: "**/test-results.xml" + SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources-preview) + ResourceGroupLocation: ${{ parameters.ResourceGroupLocationCanary }} pool: vmImage: "$(OSVmImage)" diff --git a/eng/pipelines/templates/stages/archetype-js-release.yml b/eng/pipelines/templates/stages/archetype-js-release.yml index 72199cb2b2e2..00b8c208a97d 100644 --- a/eng/pipelines/templates/stages/archetype-js-release.yml +++ b/eng/pipelines/templates/stages/archetype-js-release.yml @@ -1,5 +1,6 @@ parameters: Artifacts: [] + TestPipeline: false ArtifactName: 'not-specified' DependsOn: Build Registry: 'https://registry.npmjs.org/' @@ -29,6 +30,14 @@ stages: deploy: steps: - checkout: self + - ${{if eq(parameters.TestPipeline, 'true')}}: + - task: PowerShell@2 + displayName: Prep template pipeline for release + condition: succeeded() + inputs: + pwsh: true + workingDirectory: $(Build.SourcesDirectory) + filePath: eng/scripts/SetTestPipelineVersion.ps1 - template: /eng/common/pipelines/templates/steps/verify-changelog.yml parameters: PackageName: ${{artifact.name}} @@ -38,7 +47,7 @@ stages: parameters: SourceFolder: ${{parameters.ArtifactName}} TargetFolder: ${{artifact.safeName}} - PackageName: ${{artifact.name}}-*.tgz + PackageName: ${{artifact.name}}-[0-9]*.[0-9]*.[0-9]*.tgz - pwsh: | Get-ChildItem -Recurse $(Pipeline.Workspace)/${{artifact.safeName}} workingDirectory: $(Pipeline.Workspace) @@ -67,7 +76,7 @@ stages: steps: - checkout: self - script: | - export DETECTED_PACKAGE_NAME=`ls $(Pipeline.Workspace)/${{parameters.ArtifactName}}/${{artifact.name}}-*.tgz` + export DETECTED_PACKAGE_NAME=`ls $(Pipeline.Workspace)/${{parameters.ArtifactName}}/${{artifact.name}}-[0-9]*[0-9]*.[0-9]*.tgz` echo "##vso[task.setvariable variable=Package.Archive]$DETECTED_PACKAGE_NAME" displayName: Detecting package archive @@ -100,7 +109,7 @@ stages: parameters: SourceFolder: ${{parameters.ArtifactName}} TargetFolder: ${{artifact.safeName}} - PackageName: ${{artifact.name}}-*.tgz + PackageName: ${{artifact.name}}-[0-9]*.[0-9]*.[0-9]*.tgz - pwsh: | Get-ChildItem -Recurse $(Pipeline.Workspace)/${{artifact.safeName}} workingDirectory: $(Pipeline.Workspace) @@ -124,6 +133,7 @@ stages: DocRepoDestinationPath: 'docs-ref-services/' GHReviewersVariable: 'OwningGHUser' CIConfigs: $(CIConfigs) + CloseAfterOpenForTesting: '${{ parameters.TestPipeline }}' - ${{if ne(artifact.skipPublishDocGithubIo, 'true')}}: - deployment: PublishDocsGitHubIO @@ -148,7 +158,7 @@ stages: parameters: SourceFolder: ${{parameters.ArtifactName}} TargetFolder: ${{artifact.safeName}} - PackageName: ${{artifact.name}}-*.tgz + PackageName: ${{artifact.name}}-[0-9]*.[0-9]*.[0-9]*.tgz - template: /eng/pipelines/templates/steps/stage-artifacts.yml parameters: SourceFolder: ${{parameters.DocArtifact}} @@ -198,12 +208,15 @@ stages: PRBranchName: increment-package-version-${{ parameters.ServiceDirectory }}-$(Build.BuildId) CommitMsg: "Increment package version after release of ${{ artifact.name }}" PRTitle: "Increment version for ${{ parameters.ServiceDirectory }} releases" + CloseAfterOpenForTesting: '${{ parameters.TestPipeline }}' - stage: Integration dependsOn: ${{parameters.DependsOn}} jobs: - job: PublishPackages - condition: or(eq(variables['SetDevVersion'], 'true'), and(eq(variables['Build.Reason'],'Schedule'), eq(variables['System.TeamProject'], 'internal'))) + # Run Integration job only if SetDevVersion is set to true or ( SetDevVersion is empty and job is a scheduled CI run) + # If SetDevVersion is set to false then we should skip integration job even for scheduled runs. + condition: or(eq(variables['SetDevVersion'], 'true'), and(eq(variables['SetDevVersion'], ''), eq(variables['Build.Reason'],'Schedule'), eq(variables['System.TeamProject'], 'internal'))) displayName: Publish package to daily feed pool: vmImage: ubuntu-18.04 @@ -215,7 +228,7 @@ stages: - ${{ each artifact in parameters.Artifacts }}: - ${{if ne(artifact.skipPublishDevFeed, 'true')}}: - pwsh: | - $detectedPackageName=Get-ChildItem $(Pipeline.Workspace)/${{parameters.ArtifactName}}/${{artifact.name}}-*-alpha*.tgz + $detectedPackageName=Get-ChildItem $(Pipeline.Workspace)/${{parameters.ArtifactName}}/${{artifact.name}}-[0-9]*.[0-9]*.[0-9]*-alpha*.tgz echo "##vso[task.setvariable variable=Package.Archive]$detectedPackageName" if ('$(Build.Repository.Name)' -eq 'Azure/azure-sdk-for-js') { $npmToken="$(azure-sdk-npm-token)" diff --git a/eng/pipelines/templates/stages/archetype-sdk-client.yml b/eng/pipelines/templates/stages/archetype-sdk-client.yml index 57d735b31955..0359c3958240 100644 --- a/eng/pipelines/templates/stages/archetype-sdk-client.yml +++ b/eng/pipelines/templates/stages/archetype-sdk-client.yml @@ -2,6 +2,9 @@ parameters: - name: Artifacts type: object default: [] +- name: TestPipeline + type: boolean + default: false - name: ServiceDirectory type: string default: not-specified @@ -23,17 +26,19 @@ stages: jobs: - template: ../jobs/archetype-sdk-client.yml parameters: - ServiceDirectory: ${{parameters.ServiceDirectory}} - Artifacts: ${{parameters.Artifacts}} - RunUnitTests: ${{parameters.RunUnitTests}} + ServiceDirectory: ${{ parameters.ServiceDirectory }} + Artifacts: ${{ parameters.Artifacts }} + TestPipeline: ${{ parameters.TestPipeline }} + RunUnitTests: ${{ parameters.RunUnitTests }} # The Prerelease and Release stages are conditioned on whether we are building a pull request and the branch. - ${{if and(ne(variables['Build.Reason'], 'PullRequest'), eq(variables['System.TeamProject'], 'internal'), eq(parameters.IncludeRelease,true))}}: - template: archetype-js-release.yml parameters: DependsOn: Build - ServiceDirectory: ${{parameters.ServiceDirectory}} - Artifacts: ${{parameters.Artifacts}} + ServiceDirectory: ${{ parameters.ServiceDirectory }} + Artifacts: ${{ parameters.Artifacts }} + TestPipeline: ${{ parameters.TestPipeline }} ArtifactName: packages TargetDocRepoOwner: ${{ parameters.TargetDocRepoOwner }} TargetDocRepoName: ${{ parameters.TargetDocRepoName }} diff --git a/eng/pipelines/templates/steps/analyze.yml b/eng/pipelines/templates/steps/analyze.yml index 2e274370299f..84ad85e2ad42 100644 --- a/eng/pipelines/templates/steps/analyze.yml +++ b/eng/pipelines/templates/steps/analyze.yml @@ -20,9 +20,14 @@ steps: parameters: SourceDirectory: $(Build.SourcesDirectory) - - template: ../../../common/pipelines/templates/steps/verify-links.yml + - template: /eng/common/pipelines/templates/steps/verify-links.yml parameters: - Directory: sdk/${{ parameters.ServiceDirectory }} + ${{ if eq(variables['Build.Reason'], 'PullRequest') }}: + Directory: "" + Urls: (git diff origin/${env:SYSTEM_PULLREQUEST_TARGETBRANCH} HEAD --name-only -- '*.md') + ${{ if ne(variables['Build.Reason'], 'PullRequest') }}: + Directory: sdk/${{ parameters.ServiceDirectory }} + CheckLinkGuidance: $true - script: | npm ci @@ -49,11 +54,11 @@ steps: displayName: "Audit libraries" - ${{ each artifact in parameters.Artifacts }}: - - template: /eng/common/pipelines/templates/steps/verify-changelog.yml - parameters: - PackageName: ${{artifact.name}} - ServiceName: ${{parameters.ServiceDirectory}} - ForRelease: false + - template: /eng/common/pipelines/templates/steps/verify-changelog.yml + parameters: + PackageName: ${{artifact.name}} + ServiceName: ${{parameters.ServiceDirectory}} + ForRelease: false - task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0 # ComponentGovernance is currently unable to run on pull requests of public projects. Running on non-PR diff --git a/eng/pipelines/templates/steps/build.yml b/eng/pipelines/templates/steps/build.yml index 54ef9c530112..5309b33da101 100644 --- a/eng/pipelines/templates/steps/build.yml +++ b/eng/pipelines/templates/steps/build.yml @@ -1,8 +1,18 @@ parameters: Artifacts: [] + TestPipeline: false ServiceDirectory: not-specified steps: + - ${{if eq(parameters.TestPipeline, 'true')}}: + - task: PowerShell@2 + displayName: Prep template pipeline for release + condition: succeeded() + inputs: + pwsh: true + workingDirectory: $(Build.SourcesDirectory) + filePath: eng/scripts/SetTestPipelineVersion.ps1 + - pwsh: | $folder = "${{parameters.ServiceDirectory}}" if ($folder -eq "*") { $folder = "" } @@ -23,13 +33,6 @@ steps: condition: and(succeeded(),ne(variables['SetDevVersion'],'true')) displayName: "Install dependencies" - - template: /eng/common/pipelines/templates/steps/replace-relative-links.yml - parameters: - TargetFolder: $(Build.SourcesDirectory)/sdk/$(folder) - RootFolder: $(Build.SourcesDirectory) - BuildSHA: $(Build.SourceVersion) - RepoId: "Azure/azure-sdk-for-js" - # Option "-p max" ensures parallelism is set to the number of cores on all platforms, which improves build times. # The default on Windows is "cores - 1" (microsoft/rushstack#436). - script: | @@ -37,7 +40,7 @@ steps: displayName: "Build libraries" - pwsh: | - eng/tools/check-api-warning.ps1 + eng/tools/check-api-warning.ps1 displayName: "Check api extractor output changes" - script: | diff --git a/eng/pipelines/templates/steps/test.yml b/eng/pipelines/templates/steps/test.yml index 4ba60e080cd2..0e1b1b857d73 100644 --- a/eng/pipelines/templates/steps/test.yml +++ b/eng/pipelines/templates/steps/test.yml @@ -1,7 +1,7 @@ parameters: Artifacts: [] ServiceDirectory: not-specified - + steps: - script: | node common/scripts/install-run-rush.js install @@ -27,7 +27,7 @@ steps: node eng/tools/rush-runner.js unit-test:node "${{parameters.ServiceDirectory}}" --verbose -p max displayName: "Test libraries" condition: and(succeeded(),eq(variables['TestType'], 'node')) - + # Option "-p max" ensures parallelism is set to the number of cores on all platforms, which improves build times. # The default on Windows is "cores - 1" (microsoft/rushstack#436). - script: | @@ -56,7 +56,7 @@ steps: # PublishTestResults.searchFolder only supports absolute paths, not relative. - task: PublishTestResults@2 inputs: - searchFolder: '$(System.DefaultWorkingDirectory)/sdk' + searchFolder: "$(System.DefaultWorkingDirectory)/sdk" testResultsFiles: "**/test-results.xml" testRunTitle: "$(OSName) - NodeJS - Unit Tests - [Node $(NodeTestVersion)]" condition: and(always(),eq(variables['TestType'], 'node')) @@ -66,7 +66,7 @@ steps: # PublishTestResults.searchFolder only supports absolute paths, not relative. - task: PublishTestResults@2 inputs: - searchFolder: '$(System.DefaultWorkingDirectory)/sdk' + searchFolder: "$(System.DefaultWorkingDirectory)/sdk" testResultsFiles: "**/test-results.browser.xml" testRunTitle: "$(OSName) - Browser - Unit Tests - [Node $(NodeTestVersion)]" condition: and(always(),eq(variables['TestType'], 'browser')) diff --git a/eng/scripts/SetTestPipelineVersion.ps1 b/eng/scripts/SetTestPipelineVersion.ps1 new file mode 100644 index 000000000000..d531836dc508 --- /dev/null +++ b/eng/scripts/SetTestPipelineVersion.ps1 @@ -0,0 +1,34 @@ +# Overides the project file and CHANGELOG.md for the template project using the next publishable version +# This is to help with testing the release pipeline. + +. "${PSScriptRoot}\..\common\scripts\common.ps1" +$latestTags = git tag -l "@azure/template_*" +$semVars = @() + +$packageDirectory = "${PSScriptRoot}\..\..\sdk\template\template" +$templatePackageFile = "${packageDirectory}\package.json" +$changeLogFile = "${packageDirectory}\CHANGELOG.md" + +Foreach ($tags in $latestTags) +{ + $semVars += $tags.Replace("@azure/template_", "") +} + +$semVarsSorted = [AzureEngSemanticVersion]::SortVersionStrings($semVars) +LogDebug "Last Published Version $($semVarsSorted[0])" + +$newVersion = [AzureEngSemanticVersion]::ParseVersionString($semVarsSorted[0]) +$newVersion.IncrementAndSetToPrerelease() +LogDebug "Version to publish [ $($newVersion.ToString()) ]" + +$packageFileContent = Get-Content -Path $templatePackageFile | ConvertFrom-Json +LogDebug "Version in Source $($packageFileContent.version)" +$packageFileContent.version = $newVersion.ToString() +LogDebug "Version to publish $($packageFileContent.version)" + +Set-Content -Path $templatePackageFile -Value ($packageFileContent | ConvertTo-Json) +Set-Content -Path $changeLogFile -Value @" +# Release History +## $($newVersion.ToString()) ($(Get-Date -f "yyyy-MM-dd")) +- Test Release Pipeline +"@ diff --git a/eng/scripts/npm-admin-tasks.ps1 b/eng/scripts/npm-admin-tasks.ps1 new file mode 100644 index 000000000000..442c8e25a9df --- /dev/null +++ b/eng/scripts/npm-admin-tasks.ps1 @@ -0,0 +1,70 @@ +param ( + [Parameter(mandatory = $true)] + $taskType, + [Parameter(mandatory = $true)] + $packageName, + [Parameter(mandatory = $true)] + $pkgVersion, + $tagName, + [Parameter(mandatory = $true)] + $npmToken, + $reason +) + +try { + Write-Host "Setting AuthToken Deployment" + $env:NPM_TOKEN = $npmToken + $regAuth = "//registry.npmjs.org/" + npm config set $regAuth`:_authToken=`$`{NPM_TOKEN`} + $nameAndVersion = $packageName + "@" + $pkgVersion + + # Verify that package name is not "@azure" + if ($packageName -eq '@azure') { + Write-Host "Invalid package name" + exit 1 + } + + switch ($taskType) { + "AddTag" { + Write-Host "Adding tag for package" + Write-Host "npm dist-tag add $($nameAndVersion) $tagName" + npm dist-tag add $nameAndVersion $tagName + } + + "RemoveTag" { + Write-Host "Removing tag for package" + Write-Host "npm dist-tag rm $($nameAndVersion) $tagName" + npm dist-tag rm $nameAndVersion $tagName + } + + "Deprecate" { + if ($reason -eq '') { + Write-Host "Reason cannot be empty to deprecate package version" + exit 1 + } + Write-Host "Deprecate package $nameAndVersion, reason: $reason" + Write-Host "npm deprecate $($nameAndVersion) $reason" + npm deprecate $nameAndVersion $reason + } + + "Unpublish" { + Write-Host "Unpublish package $nameAndVersion" + Write-Host "npm unpublish $($nameAndVersion)" + npm unpublish $nameAndVersion + } + + default { + Write-Host "Invalid taskType to run npm admin job." + exit 1 + } + } + + if ($LastExitCode -ne 0) { + Write-Host "Npm task failed" + exit 1 + } +} +finally { + npm config delete $regAuth`:_authToken + $env:NPM_TOKEN = "" +} diff --git a/eng/tools/generate-static-index/service-mapper.json b/eng/tools/generate-static-index/service-mapper.json index 6eea5e2ab086..f2c8b771365f 100644 --- a/eng/tools/generate-static-index/service-mapper.json +++ b/eng/tools/generate-static-index/service-mapper.json @@ -14,6 +14,7 @@ "botservice": "Bot Service", "cdn": "CDN", "cognitiveservices": "Cognitive Services", + "communication": "Communication", "commerce": "Commerce", "compute": "Compute", "consumption": "Consumption", @@ -64,6 +65,7 @@ "mariadb": "MariaDB", "marketplaceordering": "Marketplace Ordering", "mediaservices": "Media Services", + "metricsadvisor": "Metrics Advisor", "migrate": "Migrate", "mixedreality": "Mixed Reality", "monitor": "Monitor", diff --git a/rush.json b/rush.json index c816a9e34d11..579d19abf65e 100644 --- a/rush.json +++ b/rush.json @@ -347,11 +347,36 @@ "projectFolder": "sdk/textanalytics/ai-text-analytics", "versionPolicyName": "client" }, + { + "packageName": "@azure/ai-metrics-advisor", + "projectFolder": "sdk/metricsadvisor/ai-metrics-advisor", + "versionPolicyName": "client" + }, { "packageName": "@azure/search-documents", "projectFolder": "sdk/search/search-documents", "versionPolicyName": "client" }, + { + "packageName": "@azure/communication-administration", + "projectFolder": "sdk/communication/communication-administration", + "versionPolicyName": "client" + }, + { + "packageName": "@azure/communication-chat", + "projectFolder": "sdk/communication/communication-chat", + "versionPolicyName": "client" + }, + { + "packageName": "@azure/communication-common", + "projectFolder": "sdk/communication/communication-common", + "versionPolicyName": "client" + }, + { + "packageName": "@azure/communication-sms", + "projectFolder": "sdk/communication/communication-sms", + "versionPolicyName": "client" + }, { "packageName": "@azure/core-amqp", "projectFolder": "sdk/core/core-amqp", @@ -553,8 +578,8 @@ "versionPolicyName": "utility" }, { - "packageName": "@azure/digital-twins", - "projectFolder": "sdk/digitaltwins/digital-twins", + "packageName": "@azure/digital-twins-core", + "projectFolder": "sdk/digitaltwins/digital-twins-core", "versionPolicyName": "client" } ] diff --git a/.eslintrc.json b/sdk/.eslintrc.json similarity index 100% rename from .eslintrc.json rename to sdk/.eslintrc.json diff --git a/sdk/.eslintrc.old.json b/sdk/.eslintrc.old.json deleted file mode 100644 index 3f1408894b2d..000000000000 --- a/sdk/.eslintrc.old.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "parser": "@typescript-eslint/parser", - "parserOptions": { - "project": "./tsconfig.json" - }, - "plugins": ["@typescript-eslint", "no-only-tests", "promise"], - "extends": [ - "plugin:@typescript-eslint/recommended", - "eslint:recommended", - "plugin:promise/recommended", - "plugin:@typescript-eslint/eslint-recommended", - "prettier", - "prettier/@typescript-eslint" - ], - "env": { - "mocha": true - }, - "rules": { - "curly": ["error", "multi-line"], - "eol-last": ["error", "always"], - "eqeqeq": ["error", "always", { "null": "ignore" }], - "no-console": "off", - "no-dupe-class-members": "off", - "no-empty": "error", - "no-fallthrough": "error", - "no-invalid-this": "error", - "no-redeclare": ["error", { "builtinGlobals": true }], - "no-restricted-imports": ["error", { "paths": ["rhea", "rhea/.*"] }], - "no-return-await": "error", - "no-undef": "off", - "no-unsafe-finally": "error", - "no-unused-vars": "off", - "no-unused-expressions": "error", - "no-useless-constructor": "off", - "no-use-before-define": ["error", { "functions": false, "classes": false }], - "no-var": "error", - "one-var-declaration-per-line": "error", - "prefer-const": "error", - "spaced-comment": ["error", "always", { "markers": ["/"] }], - "space-infix-ops": ["error", { "int32Hint": false }], - "use-isnan": "error", - "no-only-tests/no-only-tests": "error", - "@typescript-eslint/camelcase": "off", - "@typescript-eslint/class-name-casing": "error", - "@typescript-eslint/no-angle-bracket-type-assertion": "off", - "@typescript-eslint/no-array-constructor": "off", - "@typescript-eslint/no-explicit-any": "off", - "@typescript-eslint/explicit-function-return-type": [ - "warn", - { "allowExpressions": true, "allowTypedFunctionExpressions": true } - ], - "@typescript-eslint/explicit-member-accessibility": "off", - "@typescript-eslint/no-inferrable-types": "off", - "@typescript-eslint/interface-name-prefix": ["error", "never"], - "@typescript-eslint/no-namespace": "off", - "@typescript-eslint/no-non-null-assertion": "off", - "@typescript-eslint/no-unused-vars": "warn", - "@typescript-eslint/no-useless-constructor": "error", - "@typescript-eslint/no-use-before-define": "off", - "@typescript-eslint/no-var-requires": "off", - "@typescript-eslint/member-ordering": [ - "error", - { - "default": [ - "instance-method", - "method", - "private-instance-method", - "private-method", - "private-static-method", - "protected-instance-method", - "protected-method", - "protected-static-method", - "public-instance-method", - "public-method", - "public-static-method", - "static-method" - ] - } - ] - } -} diff --git a/sdk/advisor/arm-advisor/LICENSE.txt b/sdk/advisor/arm-advisor/LICENSE.txt index a70e8cf66038..ea8fb1516028 100644 --- a/sdk/advisor/arm-advisor/LICENSE.txt +++ b/sdk/advisor/arm-advisor/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2018 Microsoft +Copyright (c) 2020 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/advisor/arm-advisor/README.md b/sdk/advisor/arm-advisor/README.md index 2794174bda52..6e851c5fd17e 100644 --- a/sdk/advisor/arm-advisor/README.md +++ b/sdk/advisor/arm-advisor/README.md @@ -9,23 +9,24 @@ This package contains an isomorphic SDK for AdvisorManagementClient. ### How to Install -``` +```bash npm install @azure/arm-advisor ``` ### How to use -#### nodejs - Authentication, client creation and listBySubscription configurations as an example written in TypeScript. +#### nodejs - Authentication, client creation and get recommendationMetadata as an example written in TypeScript. ##### Install @azure/ms-rest-nodeauth -``` -npm install @azure/ms-rest-nodeauth +- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. +```bash +npm install @azure/ms-rest-nodeauth@"^3.0.0" ``` ##### Sample code -```ts +```typescript import * as msRest from "@azure/ms-rest-js"; import * as msRestAzure from "@azure/ms-rest-azure-js"; import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; @@ -34,7 +35,8 @@ const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; msRestNodeAuth.interactiveLogin().then((creds) => { const client = new AdvisorManagementClient(creds, subscriptionId); - client.configurations.listBySubscription().then((result) => { + const name = "testname"; + client.recommendationMetadata.get(name).then((result) => { console.log("The result is:"); console.log(result); }); @@ -43,11 +45,11 @@ msRestNodeAuth.interactiveLogin().then((creds) => { }); ``` -#### browser - Authentication, client creation and listBySubscription configurations as an example written in JavaScript. +#### browser - Authentication, client creation and get recommendationMetadata as an example written in JavaScript. ##### Install @azure/ms-rest-browserauth -``` +```bash npm install @azure/ms-rest-browserauth ``` @@ -77,7 +79,8 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to authManager.login(); } const client = new Azure.ArmAdvisor.AdvisorManagementClient(res.creds, subscriptionId); - client.configurations.listBySubscription().then((result) => { + const name = "testname"; + client.recommendationMetadata.get(name).then((result) => { console.log("The result is:"); console.log(result); }).catch((err) => { @@ -95,5 +98,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fadvisor%2Farm-advisor%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/advisor/arm-advisor/README.png) diff --git a/sdk/advisor/arm-advisor/package.json b/sdk/advisor/arm-advisor/package.json index de6ba988cd47..a8157d573cae 100644 --- a/sdk/advisor/arm-advisor/package.json +++ b/sdk/advisor/arm-advisor/package.json @@ -2,11 +2,11 @@ "name": "@azure/arm-advisor", "author": "Microsoft Corporation", "description": "AdvisorManagementClient Library with typescript type definitions for node.js and browser.", - "version": "1.2.0", + "version": "2.0.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.1.0", - "@azure/ms-rest-js": "^1.1.0", - "tslib": "^1.9.3" + "@azure/ms-rest-azure-js": "^2.0.1", + "@azure/ms-rest-js": "^2.0.4", + "tslib": "^1.10.0" }, "keywords": [ "node", @@ -20,18 +20,19 @@ "module": "./esm/advisorManagementClient.js", "types": "./esm/advisorManagementClient.d.ts", "devDependencies": { - "typescript": "^3.1.1", - "rollup": "^0.66.2", - "rollup-plugin-node-resolve": "^3.4.0", - "uglify-js": "^3.4.9" + "typescript": "^3.5.3", + "rollup": "^1.18.0", + "rollup-plugin-node-resolve": "^5.2.0", + "rollup-plugin-sourcemaps": "^0.4.2", + "uglify-js": "^3.6.0" }, - "homepage": "https://github.com/azure/azure-sdk-for-js/tree/master/sdk/advisor/arm-advisor", + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/advisor/arm-advisor", "repository": { "type": "git", - "url": "https://github.com/azure/azure-sdk-for-js.git" + "url": "https://github.com/Azure/azure-sdk-for-js.git" }, "bugs": { - "url": "https://github.com/azure/azure-sdk-for-js/issues" + "url": "https://github.com/Azure/azure-sdk-for-js/issues" }, "files": [ "dist/**/*.js", @@ -43,6 +44,7 @@ "esm/**/*.d.ts", "esm/**/*.d.ts.map", "src/**/*.ts", + "README.md", "rollup.config.js", "tsconfig.json" ], diff --git a/sdk/advisor/arm-advisor/rollup.config.js b/sdk/advisor/arm-advisor/rollup.config.js index 19c4680fc09c..6d406ff2ce84 100644 --- a/sdk/advisor/arm-advisor/rollup.config.js +++ b/sdk/advisor/arm-advisor/rollup.config.js @@ -1,10 +1,16 @@ +import rollup from "rollup"; import nodeResolve from "rollup-plugin-node-resolve"; +import sourcemaps from "rollup-plugin-sourcemaps"; + /** - * @type {import('rollup').RollupFileOptions} + * @type {rollup.RollupFileOptions} */ const config = { - input: './esm/advisorManagementClient.js', - external: ["@azure/ms-rest-js", "@azure/ms-rest-azure-js"], + input: "./esm/advisorManagementClient.js", + external: [ + "@azure/ms-rest-js", + "@azure/ms-rest-azure-js" + ], output: { file: "./dist/arm-advisor.js", format: "umd", @@ -16,16 +22,16 @@ const config = { }, banner: `/* * 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. */` }, plugins: [ - nodeResolve({ module: true }) + nodeResolve({ mainFields: ['module', 'main'] }), + sourcemaps() ] }; + export default config; diff --git a/sdk/advisor/arm-advisor/src/advisorManagementClient.ts b/sdk/advisor/arm-advisor/src/advisorManagementClient.ts index 643eaf226574..a1de4884947a 100644 --- a/sdk/advisor/arm-advisor/src/advisorManagementClient.ts +++ b/sdk/advisor/arm-advisor/src/advisorManagementClient.ts @@ -17,6 +17,7 @@ import { AdvisorManagementClientContext } from "./advisorManagementClientContext class AdvisorManagementClient extends AdvisorManagementClientContext { // Operation groups + recommendationMetadata: operations.RecommendationMetadata; configurations: operations.Configurations; recommendations: operations.Recommendations; operations: operations.Operations; @@ -30,6 +31,7 @@ class AdvisorManagementClient extends AdvisorManagementClientContext { */ constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.AdvisorManagementClientOptions) { super(credentials, subscriptionId, options); + this.recommendationMetadata = new operations.RecommendationMetadata(this); this.configurations = new operations.Configurations(this); this.recommendations = new operations.Recommendations(this); this.operations = new operations.Operations(this); diff --git a/sdk/advisor/arm-advisor/src/advisorManagementClientContext.ts b/sdk/advisor/arm-advisor/src/advisorManagementClientContext.ts index 82f5adb2547f..e75f0e19b91c 100644 --- a/sdk/advisor/arm-advisor/src/advisorManagementClientContext.ts +++ b/sdk/advisor/arm-advisor/src/advisorManagementClientContext.ts @@ -13,7 +13,7 @@ import * as msRest from "@azure/ms-rest-js"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-advisor"; -const packageVersion = "0.1.0"; +const packageVersion = "2.0.0"; export class AdvisorManagementClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials; @@ -44,7 +44,7 @@ export class AdvisorManagementClientContext extends msRestAzure.AzureServiceClie super(credentials, options); - this.apiVersion = '2017-04-19'; + this.apiVersion = '2020-01-01'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; diff --git a/sdk/advisor/arm-advisor/src/models/configurationsMappers.ts b/sdk/advisor/arm-advisor/src/models/configurationsMappers.ts index 7e0bc956ab06..ff165cd05db1 100644 --- a/sdk/advisor/arm-advisor/src/models/configurationsMappers.ts +++ b/sdk/advisor/arm-advisor/src/models/configurationsMappers.ts @@ -1,18 +1,21 @@ /* * 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. */ export { - ConfigurationListResult, + ArmErrorResponse, + ARMErrorResponseBody, + BaseResource, ConfigData, - ConfigDataProperties, - CloudError, - ARMErrorResponseBody + ConfigurationListResult, + DigestConfig, + Resource, + ResourceMetadata, + ResourceRecommendationBase, + ShortDescription, + SuppressionContract } from "../models/mappers"; - diff --git a/sdk/advisor/arm-advisor/src/models/index.ts b/sdk/advisor/arm-advisor/src/models/index.ts index 21d9a82bd89e..aef287075a97 100644 --- a/sdk/advisor/arm-advisor/src/models/index.ts +++ b/sdk/advisor/arm-advisor/src/models/index.ts @@ -1,11 +1,9 @@ /* * 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. */ import { BaseResource, CloudError, AzureServiceClientOptions } from "@azure/ms-rest-azure-js"; @@ -13,392 +11,431 @@ import * as msRest from "@azure/ms-rest-js"; export { BaseResource, CloudError }; - /** - * @interface - * An interface representing ConfigDataProperties. - * The list of property name/value pairs. - * + * The metadata supported value detail. */ -export interface ConfigDataProperties { +export interface MetadataSupportedValueDetail { /** - * @member {boolean} [exclude] Exclude the resource from Advisor evaluations. - * Valid values: False (default) or True. + * The id. */ - exclude?: boolean; - /** - * @member {string} [lowCpuThreshold] Minimum percentage threshold for - * Advisor low CPU utilization evaluation. Valid only for subscriptions. - * Valid values: 5 (default), 10, 15 or 20. - */ - lowCpuThreshold?: string; + id?: string; /** - * @property Describes unknown properties. The value of an unknown property - * can be of "any" type. + * The display name. */ - [property: string]: any; + displayName?: string; } /** - * @interface - * An interface representing ConfigData. - * The Advisor configuration data structure. - * + * The metadata entity contract. */ -export interface ConfigData { +export interface MetadataEntity { /** - * @member {string} [id] The resource Id of the configuration resource. + * The resource Id of the metadata entity. */ id?: string; /** - * @member {string} [type] The type of the configuration resource. + * The type of the metadata entity. */ type?: string; /** - * @member {string} [name] The name of the configuration resource. + * The name of the metadata entity. */ name?: string; /** - * @member {ConfigDataProperties} [properties] The list of property - * name/value pairs. + * The display name. */ - properties?: ConfigDataProperties; + displayName?: string; + /** + * The list of keys on which this entity depends on. + */ + dependsOn?: string[]; + /** + * The list of scenarios applicable to this metadata entity. + */ + applicableScenarios?: Scenario[]; + /** + * The list of supported values. + */ + supportedValues?: MetadataSupportedValueDetail[]; +} + +/** + * Advisor Digest configuration entity + */ +export interface DigestConfig { + /** + * Name of digest configuration. Value is case-insensitive and must be unique within a + * subscription. + */ + name?: string; + /** + * Action group resource id used by digest. + */ + actionGroupResourceId?: string; + /** + * Frequency that digest will be triggered, in days. Value must be between 7 and 30 days + * inclusive. + */ + frequency?: number; + /** + * Categories to send digest for. If categories are not provided, then digest will be sent for + * all categories. + */ + categories?: Category[]; + /** + * Language for digest content body. Value must be ISO 639-1 code for one of Azure portal + * supported languages. Otherwise, it will be converted into one. Default value is English (en). + */ + language?: string; + /** + * State of digest configuration. Possible values include: 'Active', 'Disabled' + */ + state?: DigestConfigState; +} + +/** + * An Azure resource. + */ +export interface Resource extends BaseResource { + /** + * The resource ID. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * The name of the resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * The type of the resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; +} + +/** + * The Advisor configuration data structure. + */ +export interface ConfigData extends Resource { + /** + * Exclude the resource from Advisor evaluations. Valid values: False (default) or True. + */ + exclude?: boolean; + /** + * Minimum percentage threshold for Advisor low CPU utilization evaluation. Valid only for + * subscriptions. Valid values: 5 (default), 10, 15 or 20. Possible values include: '5', '10', + * '15', '20' + */ + lowCpuThreshold?: CpuThreshold; + /** + * Advisor digest configuration. Valid only for subscriptions + */ + digests?: DigestConfig[]; } /** - * @interface - * An interface representing ARMErrorResponseBody. * ARM error response body. - * */ export interface ARMErrorResponseBody { /** - * @member {string} [message] Gets or sets the string that describes the - * error in detail and provides debugging information. + * Gets or sets the string that describes the error in detail and provides debugging information. */ message?: string; /** - * @member {string} [code] Gets or sets the string that can be used to - * programmatically identify the error. + * Gets or sets the string that can be used to programmatically identify the error. */ code?: string; } /** - * @interface - * An interface representing ShortDescription. + * An interface representing ArmErrorResponse. + */ +export interface ArmErrorResponse { + error?: ARMErrorResponseBody; +} + +/** * A summary of the recommendation. - * */ export interface ShortDescription { /** - * @member {string} [problem] The issue or opportunity identified by the - * recommendation. + * The issue or opportunity identified by the recommendation. */ problem?: string; /** - * @member {string} [solution] The remediation action suggested by the - * recommendation. + * The remediation action suggested by the recommendation. */ solution?: string; } /** - * @interface - * An interface representing Resource. - * An Azure resource. - * - * @extends BaseResource + * Recommendation resource metadata */ -export interface Resource extends BaseResource { - /** - * @member {string} [id] The resource ID. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly id?: string; +export interface ResourceMetadata { /** - * @member {string} [name] The name of the resource. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Azure resource Id of the assessed resource */ - readonly name?: string; + resourceId?: string; /** - * @member {string} [type] The type of the resource. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Source from which recommendation is generated */ - readonly type?: string; + source?: string; } /** - * @interface - * An interface representing ResourceRecommendationBase. * Advisor Recommendation. - * - * @extends Resource */ export interface ResourceRecommendationBase extends Resource { /** - * @member {Category} [category] The category of the recommendation. Possible - * values include: 'HighAvailability', 'Security', 'Performance', 'Cost' + * The category of the recommendation. Possible values include: 'HighAvailability', 'Security', + * 'Performance', 'Cost', 'OperationalExcellence' */ category?: Category; /** - * @member {Impact} [impact] The business impact of the recommendation. - * Possible values include: 'High', 'Medium', 'Low' + * The business impact of the recommendation. Possible values include: 'High', 'Medium', 'Low' */ impact?: Impact; /** - * @member {string} [impactedField] The resource type identified by Advisor. + * The resource type identified by Advisor. */ impactedField?: string; /** - * @member {string} [impactedValue] The resource identified by Advisor. + * The resource identified by Advisor. */ impactedValue?: string; /** - * @member {Date} [lastUpdated] The most recent time that Advisor checked the - * validity of the recommendation. + * The most recent time that Advisor checked the validity of the recommendation. */ lastUpdated?: Date; /** - * @member {{ [propertyName: string]: any }} [metadata] The recommendation - * metadata. + * The recommendation metadata. */ metadata?: { [propertyName: string]: any }; /** - * @member {string} [recommendationTypeId] The recommendation-type GUID. + * The recommendation-type GUID. */ recommendationTypeId?: string; /** - * @member {Risk} [risk] The potential risk of not implementing the - * recommendation. Possible values include: 'Error', 'Warning', 'None' + * The potential risk of not implementing the recommendation. Possible values include: 'Error', + * 'Warning', 'None' */ risk?: Risk; /** - * @member {ShortDescription} [shortDescription] A summary of the - * recommendation. + * A summary of the recommendation. */ shortDescription?: ShortDescription; /** - * @member {string[]} [suppressionIds] The list of snoozed and dismissed - * rules for the recommendation. + * The list of snoozed and dismissed rules for the recommendation. */ suppressionIds?: string[]; /** - * @member {{ [propertyName: string]: string }} [extendedProperties] Extended - * properties + * Extended properties */ extendedProperties?: { [propertyName: string]: string }; + /** + * Metadata of resource that was assessed + */ + resourceMetadata?: ResourceMetadata; } /** - * @interface - * An interface representing OperationDisplayInfo. * The operation supported by Advisor. - * */ export interface OperationDisplayInfo { /** - * @member {string} [description] The description of the operation. + * The description of the operation. */ description?: string; /** - * @member {string} [operation] The action that users can perform, based on - * their permission level. + * The action that users can perform, based on their permission level. */ operation?: string; /** - * @member {string} [provider] Service provider: Microsoft Advisor. + * Service provider: Microsoft Advisor. */ provider?: string; /** - * @member {string} [resource] Resource on which the operation is performed. + * Resource on which the operation is performed. */ resource?: string; } /** - * @interface - * An interface representing OperationEntity. * The operation supported by Advisor. - * */ export interface OperationEntity { /** - * @member {string} [name] Operation name: {provider}/{resource}/{operation}. + * Operation name: {provider}/{resource}/{operation}. */ name?: string; /** - * @member {OperationDisplayInfo} [display] The operation supported by - * Advisor. + * The operation supported by Advisor. */ display?: OperationDisplayInfo; } /** - * @interface - * An interface representing SuppressionContract. - * The details of the snoozed or dismissed rule; for example, the duration, - * name, and GUID associated with the rule. - * - * @extends Resource + * The details of the snoozed or dismissed rule; for example, the duration, name, and GUID + * associated with the rule. */ export interface SuppressionContract extends Resource { /** - * @member {string} [suppressionId] The GUID of the suppression. + * The GUID of the suppression. */ suppressionId?: string; /** - * @member {string} [ttl] The duration for which the suppression is valid. + * The duration for which the suppression is valid. */ ttl?: string; } /** - * @interface - * An interface representing RecommendationsListOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ export interface RecommendationsListOptionalParams extends msRest.RequestOptionsBase { /** - * @member {string} [filter] The filter to apply to the recommendations. + * The filter to apply to the recommendations. */ filter?: string; /** - * @member {number} [top] The number of recommendations per page if a paged - * version of this API is being used. + * The number of recommendations per page if a paged version of this API is being used. */ top?: number; /** - * @member {string} [skipToken] The page-continuation token to use with a - * paged version of this API. + * The page-continuation token to use with a paged version of this API. */ skipToken?: string; } /** - * @interface - * An interface representing SuppressionsListOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ export interface SuppressionsListOptionalParams extends msRest.RequestOptionsBase { /** - * @member {number} [top] The number of suppressions per page if a paged - * version of this API is being used. + * The number of suppressions per page if a paged version of this API is being used. */ top?: number; /** - * @member {string} [skipToken] The page-continuation token to use with a - * paged version of this API. + * The page-continuation token to use with a paged version of this API. */ skipToken?: string; } /** - * @interface * An interface representing AdvisorManagementClientOptions. - * @extends AzureServiceClientOptions */ export interface AdvisorManagementClientOptions extends AzureServiceClientOptions { - /** - * @member {string} [baseUri] - */ baseUri?: string; } /** - * @interface - * An interface representing RecommendationsGenerateHeaders. * Defines headers for Generate operation. - * */ export interface RecommendationsGenerateHeaders { /** - * @member {string} [location] The URL where the status of the asynchronous - * operation can be checked. + * The URL where the status of the asynchronous operation can be checked. */ location: string; /** - * @member {string} [retryAfter] The amount of delay to use while the status - * of the operation is checked. The value is expressed in seconds. + * The amount of delay to use while the status of the operation is checked. The value is + * expressed in seconds. */ retryAfter: string; } +/** + * @interface + * The list of metadata entities + * @extends Array + */ +export interface MetadataEntityListResult extends Array { + /** + * The link used to get the next page of metadata. + */ + nextLink?: string; +} /** * @interface - * An interface representing the ConfigurationListResult. * The list of Advisor configurations. - * * @extends Array */ export interface ConfigurationListResult extends Array { /** - * @member {string} [nextLink] The link used to get the next page of - * configurations. + * The link used to get the next page of configurations. */ nextLink?: string; } /** * @interface - * An interface representing the ResourceRecommendationBaseListResult. * The list of Advisor recommendations. - * * @extends Array */ export interface ResourceRecommendationBaseListResult extends Array { /** - * @member {string} [nextLink] The link used to get the next page of - * recommendations. + * The link used to get the next page of recommendations. */ nextLink?: string; } /** * @interface - * An interface representing the OperationEntityListResult. * The list of Advisor operations. - * * @extends Array */ export interface OperationEntityListResult extends Array { /** - * @member {string} [nextLink] The link used to get the next page of - * operations. + * The link used to get the next page of operations. */ nextLink?: string; } /** * @interface - * An interface representing the SuppressionContractListResult. * The list of Advisor suppressions. - * * @extends Array */ export interface SuppressionContractListResult extends Array { /** - * @member {string} [nextLink] The link used to get the next page of - * suppressions. + * The link used to get the next page of suppressions. */ nextLink?: string; } +/** + * Defines values for Scenario. + * Possible values include: 'Alerts' + * @readonly + * @enum {string} + */ +export type Scenario = 'Alerts'; + +/** + * Defines values for CpuThreshold. + * Possible values include: '5', '10', '15', '20' + * @readonly + * @enum {string} + */ +export type CpuThreshold = '5' | '10' | '15' | '20'; + /** * Defines values for Category. - * Possible values include: 'HighAvailability', 'Security', 'Performance', 'Cost' + * Possible values include: 'HighAvailability', 'Security', 'Performance', 'Cost', + * 'OperationalExcellence' + * @readonly + * @enum {string} + */ +export type Category = 'HighAvailability' | 'Security' | 'Performance' | 'Cost' | 'OperationalExcellence'; + +/** + * Defines values for DigestConfigState. + * Possible values include: 'Active', 'Disabled' * @readonly * @enum {string} */ -export type Category = 'HighAvailability' | 'Security' | 'Performance' | 'Cost'; +export type DigestConfigState = 'Active' | 'Disabled'; /** * Defines values for Impact. @@ -416,6 +453,71 @@ export type Impact = 'High' | 'Medium' | 'Low'; */ export type Risk = 'Error' | 'Warning' | 'None'; +/** + * Contains response data for the get operation. + */ +export type RecommendationMetadataGetResponse = { + /** + * The parsed response body. + */ + body: any; + + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: any; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type RecommendationMetadataListResponse = MetadataEntityListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: MetadataEntityListResult; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type RecommendationMetadataListNextResponse = MetadataEntityListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: MetadataEntityListResult; + }; +}; + /** * Contains response data for the listBySubscription operation. */ @@ -428,6 +530,7 @@ export type ConfigurationsListBySubscriptionResponse = ConfigurationListResult & * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -438,7 +541,7 @@ export type ConfigurationsListBySubscriptionResponse = ConfigurationListResult & /** * Contains response data for the createInSubscription operation. */ -export type ConfigurationsCreateInSubscriptionResponse = ARMErrorResponseBody & { +export type ConfigurationsCreateInSubscriptionResponse = ConfigData & { /** * The underlying HTTP response. */ @@ -447,10 +550,11 @@ export type ConfigurationsCreateInSubscriptionResponse = ARMErrorResponseBody & * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: ARMErrorResponseBody; + parsedBody: ConfigData; }; }; @@ -466,6 +570,7 @@ export type ConfigurationsListByResourceGroupResponse = ConfigurationListResult * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -476,7 +581,7 @@ export type ConfigurationsListByResourceGroupResponse = ConfigurationListResult /** * Contains response data for the createInResourceGroup operation. */ -export type ConfigurationsCreateInResourceGroupResponse = ARMErrorResponseBody & { +export type ConfigurationsCreateInResourceGroupResponse = ConfigData & { /** * The underlying HTTP response. */ @@ -485,10 +590,11 @@ export type ConfigurationsCreateInResourceGroupResponse = ARMErrorResponseBody & * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: ARMErrorResponseBody; + parsedBody: ConfigData; }; }; @@ -504,6 +610,7 @@ export type ConfigurationsListBySubscriptionNextResponse = ConfigurationListResu * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -538,6 +645,7 @@ export type RecommendationsListResponse = ResourceRecommendationBaseListResult & * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -557,6 +665,7 @@ export type RecommendationsGetResponse = ResourceRecommendationBase & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -576,6 +685,7 @@ export type RecommendationsListNextResponse = ResourceRecommendationBaseListResu * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -595,6 +705,7 @@ export type OperationsListResponse = OperationEntityListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -614,6 +725,7 @@ export type OperationsListNextResponse = OperationEntityListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -633,6 +745,7 @@ export type SuppressionsGetResponse = SuppressionContract & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -652,6 +765,7 @@ export type SuppressionsCreateResponse = SuppressionContract & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -671,6 +785,7 @@ export type SuppressionsListResponse = SuppressionContractListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -690,6 +805,7 @@ export type SuppressionsListNextResponse = SuppressionContractListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ diff --git a/sdk/advisor/arm-advisor/src/models/mappers.ts b/sdk/advisor/arm-advisor/src/models/mappers.ts index ffd0fb954f60..38a96c10028f 100644 --- a/sdk/advisor/arm-advisor/src/models/mappers.ts +++ b/sdk/advisor/arm-advisor/src/models/mappers.ts @@ -1,11 +1,9 @@ /* * 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. */ import { CloudErrorMapper, BaseResourceMapper } from "@azure/ms-rest-azure-js"; @@ -14,38 +12,33 @@ import * as msRest from "@azure/ms-rest-js"; export const CloudError = CloudErrorMapper; export const BaseResource = BaseResourceMapper; -export const ConfigDataProperties: msRest.CompositeMapper = { - serializedName: "ConfigData_properties", +export const MetadataSupportedValueDetail: msRest.CompositeMapper = { + serializedName: "MetadataSupportedValueDetail", type: { name: "Composite", - className: "ConfigDataProperties", + className: "MetadataSupportedValueDetail", modelProperties: { - exclude: { - serializedName: "exclude", + id: { + serializedName: "id", type: { - name: "Boolean" + name: "String" } }, - lowCpuThreshold: { - serializedName: "low_cpu_threshold", + displayName: { + serializedName: "displayName", type: { name: "String" } } - }, - additionalProperties: { - type: { - name: "Object" - } } } }; -export const ConfigData: msRest.CompositeMapper = { - serializedName: "ConfigData", +export const MetadataEntity: msRest.CompositeMapper = { + serializedName: "MetadataEntity", type: { name: "Composite", - className: "ConfigData", + className: "MetadataEntity", modelProperties: { id: { serializedName: "id", @@ -65,14 +58,159 @@ export const ConfigData: msRest.CompositeMapper = { name: "String" } }, - properties: { - serializedName: "properties", + displayName: { + serializedName: "properties.displayName", type: { - name: "Composite", - className: "ConfigDataProperties", - additionalProperties: { + name: "String" + } + }, + dependsOn: { + serializedName: "properties.dependsOn", + type: { + name: "Sequence", + element: { type: { - name: "Object" + name: "String" + } + } + } + }, + applicableScenarios: { + serializedName: "properties.applicableScenarios", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + supportedValues: { + serializedName: "properties.supportedValues", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MetadataSupportedValueDetail" + } + } + } + } + } + } +}; + +export const DigestConfig: msRest.CompositeMapper = { + serializedName: "DigestConfig", + type: { + name: "Composite", + className: "DigestConfig", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + actionGroupResourceId: { + serializedName: "actionGroupResourceId", + type: { + name: "String" + } + }, + frequency: { + serializedName: "frequency", + type: { + name: "Number" + } + }, + categories: { + serializedName: "categories", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + language: { + serializedName: "language", + type: { + name: "String" + } + }, + state: { + serializedName: "state", + type: { + name: "String" + } + } + } + } +}; + +export const Resource: msRest.CompositeMapper = { + serializedName: "Resource", + type: { + name: "Composite", + className: "Resource", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const ConfigData: msRest.CompositeMapper = { + serializedName: "ConfigData", + type: { + name: "Composite", + className: "ConfigData", + modelProperties: { + ...Resource.type.modelProperties, + exclude: { + serializedName: "properties.exclude", + type: { + name: "Boolean" + } + }, + lowCpuThreshold: { + serializedName: "properties.lowCpuThreshold", + type: { + name: "String" + } + }, + digests: { + serializedName: "properties.digests", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DigestConfig" } } } @@ -103,6 +241,23 @@ export const ARMErrorResponseBody: msRest.CompositeMapper = { } }; +export const ArmErrorResponse: msRest.CompositeMapper = { + serializedName: "ArmErrorResponse", + type: { + name: "Composite", + className: "ArmErrorResponse", + modelProperties: { + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ARMErrorResponseBody" + } + } + } + } +}; + export const ShortDescription: msRest.CompositeMapper = { serializedName: "ShortDescription", type: { @@ -125,29 +280,20 @@ export const ShortDescription: msRest.CompositeMapper = { } }; -export const Resource: msRest.CompositeMapper = { - serializedName: "Resource", +export const ResourceMetadata: msRest.CompositeMapper = { + serializedName: "ResourceMetadata", type: { name: "Composite", - className: "Resource", + className: "ResourceMetadata", modelProperties: { - id: { - readOnly: true, - serializedName: "id", - type: { - name: "String" - } - }, - name: { - readOnly: true, - serializedName: "name", + resourceId: { + serializedName: "resourceId", type: { name: "String" } }, - type: { - readOnly: true, - serializedName: "type", + source: { + serializedName: "source", type: { name: "String" } @@ -244,6 +390,13 @@ export const ResourceRecommendationBase: msRest.CompositeMapper = { } } } + }, + resourceMetadata: { + serializedName: "properties.resourceMetadata", + type: { + name: "Composite", + className: "ResourceMetadata" + } } } } @@ -351,6 +504,34 @@ export const RecommendationsGenerateHeaders: msRest.CompositeMapper = { } }; +export const MetadataEntityListResult: msRest.CompositeMapper = { + serializedName: "MetadataEntityListResult", + type: { + name: "Composite", + className: "MetadataEntityListResult", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MetadataEntity" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + export const ConfigurationListResult: msRest.CompositeMapper = { serializedName: "ConfigurationListResult", type: { diff --git a/sdk/advisor/arm-advisor/src/models/operationsMappers.ts b/sdk/advisor/arm-advisor/src/models/operationsMappers.ts index aba5d8bf047b..c83dbeabcc21 100644 --- a/sdk/advisor/arm-advisor/src/models/operationsMappers.ts +++ b/sdk/advisor/arm-advisor/src/models/operationsMappers.ts @@ -1,17 +1,14 @@ /* * 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. */ export { - OperationEntityListResult, - OperationEntity, + CloudError, OperationDisplayInfo, - CloudError + OperationEntity, + OperationEntityListResult } from "../models/mappers"; - diff --git a/sdk/advisor/arm-advisor/src/models/parameters.ts b/sdk/advisor/arm-advisor/src/models/parameters.ts index 4c86c5e6de44..0a32fd06e64c 100644 --- a/sdk/advisor/arm-advisor/src/models/parameters.ts +++ b/sdk/advisor/arm-advisor/src/models/parameters.ts @@ -30,6 +30,18 @@ export const apiVersion: msRest.OperationQueryParameter = { } } }; +export const configurationName: msRest.OperationURLParameter = { + parameterPath: "configurationName", + mapper: { + required: true, + isConstant: true, + serializedName: "configurationName", + defaultValue: 'default', + type: { + name: "String" + } + } +}; export const filter: msRest.OperationQueryParameter = { parameterPath: [ "options", diff --git a/sdk/advisor/arm-advisor/src/models/recommendationMetadataMappers.ts b/sdk/advisor/arm-advisor/src/models/recommendationMetadataMappers.ts new file mode 100644 index 000000000000..fca081125f33 --- /dev/null +++ b/sdk/advisor/arm-advisor/src/models/recommendationMetadataMappers.ts @@ -0,0 +1,15 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + ARMErrorResponseBody, + CloudError, + MetadataEntity, + MetadataEntityListResult, + MetadataSupportedValueDetail +} from "../models/mappers"; diff --git a/sdk/advisor/arm-advisor/src/models/recommendationsMappers.ts b/sdk/advisor/arm-advisor/src/models/recommendationsMappers.ts index f7c5c9df26b7..d4cb0dcd832b 100644 --- a/sdk/advisor/arm-advisor/src/models/recommendationsMappers.ts +++ b/sdk/advisor/arm-advisor/src/models/recommendationsMappers.ts @@ -1,21 +1,21 @@ /* * 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. */ export { - RecommendationsGenerateHeaders, + BaseResource, CloudError, - ResourceRecommendationBaseListResult, - ResourceRecommendationBase, + ConfigData, + DigestConfig, + RecommendationsGenerateHeaders, Resource, - BaseResource, + ResourceMetadata, + ResourceRecommendationBase, + ResourceRecommendationBaseListResult, ShortDescription, SuppressionContract } from "../models/mappers"; - diff --git a/sdk/advisor/arm-advisor/src/models/suppressionsMappers.ts b/sdk/advisor/arm-advisor/src/models/suppressionsMappers.ts index dd0d5a4133d7..b15519119bc5 100644 --- a/sdk/advisor/arm-advisor/src/models/suppressionsMappers.ts +++ b/sdk/advisor/arm-advisor/src/models/suppressionsMappers.ts @@ -1,20 +1,20 @@ /* * 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. */ export { - SuppressionContract, - Resource, BaseResource, CloudError, - SuppressionContractListResult, + ConfigData, + DigestConfig, + Resource, + ResourceMetadata, ResourceRecommendationBase, - ShortDescription + ShortDescription, + SuppressionContract, + SuppressionContractListResult } from "../models/mappers"; - diff --git a/sdk/advisor/arm-advisor/src/operations/configurations.ts b/sdk/advisor/arm-advisor/src/operations/configurations.ts index 91d1ae84a445..9ea34dae1bff 100644 --- a/sdk/advisor/arm-advisor/src/operations/configurations.ts +++ b/sdk/advisor/arm-advisor/src/operations/configurations.ts @@ -65,14 +65,14 @@ export class Configurations { * @param configContract The Azure Advisor configuration data structure. * @param callback The callback */ - createInSubscription(configContract: Models.ConfigData, callback: msRest.ServiceCallback): void; + createInSubscription(configContract: Models.ConfigData, callback: msRest.ServiceCallback): void; /** * @param configContract The Azure Advisor configuration data structure. * @param options The optional parameters * @param callback The callback */ - createInSubscription(configContract: Models.ConfigData, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - createInSubscription(configContract: Models.ConfigData, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + createInSubscription(configContract: Models.ConfigData, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createInSubscription(configContract: Models.ConfigData, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { configContract, @@ -123,15 +123,15 @@ export class Configurations { * @param resourceGroup The name of the Azure resource group. * @param callback The callback */ - createInResourceGroup(configContract: Models.ConfigData, resourceGroup: string, callback: msRest.ServiceCallback): void; + createInResourceGroup(configContract: Models.ConfigData, resourceGroup: string, callback: msRest.ServiceCallback): void; /** * @param configContract The Azure Advisor configuration data structure. * @param resourceGroup The name of the Azure resource group. * @param options The optional parameters * @param callback The callback */ - createInResourceGroup(configContract: Models.ConfigData, resourceGroup: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - createInResourceGroup(configContract: Models.ConfigData, resourceGroup: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + createInResourceGroup(configContract: Models.ConfigData, resourceGroup: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createInResourceGroup(configContract: Models.ConfigData, resourceGroup: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { configContract, @@ -192,7 +192,7 @@ const listBySubscriptionOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.ConfigurationListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ArmErrorResponse } }, serializer @@ -200,9 +200,10 @@ const listBySubscriptionOperationSpec: msRest.OperationSpec = { const createInSubscriptionOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Advisor/configurations", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Advisor/configurations/{configurationName}", urlParameters: [ - Parameters.subscriptionId + Parameters.subscriptionId, + Parameters.configurationName ], queryParameters: [ Parameters.apiVersion @@ -218,12 +219,11 @@ const createInSubscriptionOperationSpec: msRest.OperationSpec = { } }, responses: { - 204: {}, - 400: { - bodyMapper: Mappers.ARMErrorResponseBody + 200: { + bodyMapper: Mappers.ConfigData }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ArmErrorResponse } }, serializer @@ -247,7 +247,7 @@ const listByResourceGroupOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.ConfigurationListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ArmErrorResponse } }, serializer @@ -255,9 +255,10 @@ const listByResourceGroupOperationSpec: msRest.OperationSpec = { const createInResourceGroupOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Advisor/configurations", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Advisor/configurations/{configurationName}", urlParameters: [ Parameters.subscriptionId, + Parameters.configurationName, Parameters.resourceGroup ], queryParameters: [ @@ -274,12 +275,11 @@ const createInResourceGroupOperationSpec: msRest.OperationSpec = { } }, responses: { - 204: {}, - 400: { - bodyMapper: Mappers.ARMErrorResponseBody + 200: { + bodyMapper: Mappers.ConfigData }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ArmErrorResponse } }, serializer @@ -300,7 +300,7 @@ const listBySubscriptionNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.ConfigurationListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ArmErrorResponse } }, serializer diff --git a/sdk/advisor/arm-advisor/src/operations/index.ts b/sdk/advisor/arm-advisor/src/operations/index.ts index 0b5134141fb7..1b2399089695 100644 --- a/sdk/advisor/arm-advisor/src/operations/index.ts +++ b/sdk/advisor/arm-advisor/src/operations/index.ts @@ -8,6 +8,7 @@ * regenerated. */ +export * from "./recommendationMetadata"; export * from "./configurations"; export * from "./recommendations"; export * from "./operations"; diff --git a/sdk/advisor/arm-advisor/src/operations/recommendationMetadata.ts b/sdk/advisor/arm-advisor/src/operations/recommendationMetadata.ts new file mode 100644 index 000000000000..487abe86bdca --- /dev/null +++ b/sdk/advisor/arm-advisor/src/operations/recommendationMetadata.ts @@ -0,0 +1,177 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * 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 * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/recommendationMetadataMappers"; +import * as Parameters from "../models/parameters"; +import { AdvisorManagementClientContext } from "../advisorManagementClientContext"; + +/** Class representing a RecommendationMetadata. */ +export class RecommendationMetadata { + private readonly client: AdvisorManagementClientContext; + + /** + * Create a RecommendationMetadata. + * @param {AdvisorManagementClientContext} client Reference to the service client. + */ + constructor(client: AdvisorManagementClientContext) { + this.client = client; + } + + /** + * @summary Gets the metadata entity. + * @param name Name of metadata entity. + * @param [options] The optional parameters + * @returns Promise + */ + get(name: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param name Name of metadata entity. + * @param callback The callback + */ + get(name: string, callback: msRest.ServiceCallback): void; + /** + * @param name Name of metadata entity. + * @param options The optional parameters + * @param callback The callback + */ + get(name: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(name: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + name, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * @summary Gets the list of metadata entities. + * @param [options] The optional parameters + * @returns Promise + */ + list(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + list(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * @summary Gets the list of metadata entities. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Advisor/metadata/{name}", + urlParameters: [ + Parameters.name + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.MetadataEntity + }, + 404: { + bodyMapper: Mappers.ARMErrorResponseBody + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Advisor/metadata", + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.MetadataEntityListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.MetadataEntityListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/advisor/arm-advisor/tsconfig.json b/sdk/advisor/arm-advisor/tsconfig.json index 87bbf5b5fa49..422b584abd5e 100644 --- a/sdk/advisor/arm-advisor/tsconfig.json +++ b/sdk/advisor/arm-advisor/tsconfig.json @@ -9,7 +9,7 @@ "esModuleInterop": true, "allowSyntheticDefaultImports": true, "forceConsistentCasingInFileNames": true, - "lib": ["es6"], + "lib": ["es6", "dom"], "declaration": true, "outDir": "./esm", "importHelpers": true diff --git a/sdk/analysisservices/arm-analysisservices/package.json b/sdk/analysisservices/arm-analysisservices/package.json index 706ec85792e4..c2c9afe9db53 100644 --- a/sdk/analysisservices/arm-analysisservices/package.json +++ b/sdk/analysisservices/arm-analysisservices/package.json @@ -2,7 +2,7 @@ "name": "@azure/arm-analysisservices", "author": "Microsoft Corporation", "description": "AnalysisServicesManagementClient Library with typescript type definitions for node.js and browser.", - "version": "2.3.0", + "version": "2.3.1", "dependencies": { "@azure/ms-rest-azure-js": "^1.1.0", "@azure/ms-rest-js": "^1.1.0", diff --git a/sdk/analysisservices/arm-analysisservices/src/analysisServicesManagementClientContext.ts b/sdk/analysisservices/arm-analysisservices/src/analysisServicesManagementClientContext.ts index 2655345e5084..32f4132eebab 100644 --- a/sdk/analysisservices/arm-analysisservices/src/analysisServicesManagementClientContext.ts +++ b/sdk/analysisservices/arm-analysisservices/src/analysisServicesManagementClientContext.ts @@ -13,7 +13,7 @@ import * as msRest from "@azure/ms-rest-js"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-analysisservices"; -const packageVersion = "0.1.0"; +const packageVersion = "2.3.1"; export class AnalysisServicesManagementClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials; diff --git a/sdk/analysisservices/arm-analysisservices/src/models/index.ts b/sdk/analysisservices/arm-analysisservices/src/models/index.ts index 3f9e871bceee..b3760e30eb5f 100644 --- a/sdk/analysisservices/arm-analysisservices/src/models/index.ts +++ b/sdk/analysisservices/arm-analysisservices/src/models/index.ts @@ -268,7 +268,7 @@ export interface IPv4FirewallSettings { */ firewallRules?: IPv4FirewallRule[]; /** - * @member {string} [enablePowerBIService] The indicator of enableing PBI + * @member {string} [enablePowerBIService] The indicator of enabling PBI * service. */ enablePowerBIService?: string; @@ -387,7 +387,7 @@ export interface CheckServerNameAvailabilityParameters { /** * @interface * An interface representing CheckServerNameAvailabilityResult. - * The checking result of server name availibility. + * The checking result of server name availability. * */ export interface CheckServerNameAvailabilityResult { @@ -590,15 +590,15 @@ export type ServersGetDetailsResponse = AnalysisServicesServer & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: AnalysisServicesServer; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: AnalysisServicesServer; + }; }; /** @@ -609,15 +609,15 @@ export type ServersCreateResponse = AnalysisServicesServer & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: AnalysisServicesServer; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: AnalysisServicesServer; + }; }; /** @@ -628,15 +628,15 @@ export type ServersUpdateResponse = AnalysisServicesServer & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: AnalysisServicesServer; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: AnalysisServicesServer; + }; }; /** @@ -647,15 +647,15 @@ export type ServersListByResourceGroupResponse = AnalysisServicesServers & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: AnalysisServicesServers; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: AnalysisServicesServers; + }; }; /** @@ -666,15 +666,15 @@ export type ServersListResponse = AnalysisServicesServers & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: AnalysisServicesServers; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: AnalysisServicesServers; + }; }; /** @@ -685,15 +685,15 @@ export type ServersListSkusForNewResponse = SkuEnumerationForNewResourceResult & * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: SkuEnumerationForNewResourceResult; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SkuEnumerationForNewResourceResult; + }; }; /** @@ -704,15 +704,15 @@ export type ServersListSkusForExistingResponse = SkuEnumerationForExistingResour * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: SkuEnumerationForExistingResourceResult; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SkuEnumerationForExistingResourceResult; + }; }; /** @@ -723,15 +723,15 @@ export type ServersListGatewayStatusResponse = GatewayListStatusLive & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: GatewayListStatusLive; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: GatewayListStatusLive; + }; }; /** @@ -742,15 +742,15 @@ export type ServersCheckNameAvailabilityResponse = CheckServerNameAvailabilityRe * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: CheckServerNameAvailabilityResult; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: CheckServerNameAvailabilityResult; + }; }; /** @@ -761,15 +761,15 @@ export type ServersListOperationStatusesResponse = OperationStatus & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationStatus; + }; }; /** @@ -780,15 +780,15 @@ export type ServersBeginCreateResponse = AnalysisServicesServer & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: AnalysisServicesServer; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: AnalysisServicesServer; + }; }; /** @@ -799,15 +799,15 @@ export type ServersBeginUpdateResponse = AnalysisServicesServer & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: AnalysisServicesServer; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: AnalysisServicesServer; + }; }; /** @@ -818,15 +818,15 @@ export type OperationsListResponse = OperationListResult & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationListResult; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationListResult; + }; }; /** @@ -837,13 +837,13 @@ export type OperationsListNextResponse = OperationListResult & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationListResult; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationListResult; + }; }; diff --git a/sdk/anomalydetector/ai-anomaly-detector/CHANGELOG.md b/sdk/anomalydetector/ai-anomaly-detector/CHANGELOG.md index c4d90d152ed9..150c86f2d487 100644 --- a/sdk/anomalydetector/ai-anomaly-detector/CHANGELOG.md +++ b/sdk/anomalydetector/ai-anomaly-detector/CHANGELOG.md @@ -1,8 +1,12 @@ # Release History -## 3.0.0-preview.2 (Unreleased) +## 3.0.0-beta.3 (Unreleased) +## 3.0.0-beta.2 (2020-09-18) + +- Fix missing types in package [#10916](https://github.com/Azure/azure-sdk-for-js/pull/10916) + ## 3.0.0-preview.1 (2020-08-27) - This release is a preview of our efforts to create a client library that is user friendly and diff --git a/sdk/anomalydetector/ai-anomaly-detector/README.md b/sdk/anomalydetector/ai-anomaly-detector/README.md index 9173e3d1e8be..be8219e991d0 100644 --- a/sdk/anomalydetector/ai-anomaly-detector/README.md +++ b/sdk/anomalydetector/ai-anomaly-detector/README.md @@ -5,12 +5,16 @@ [Source code](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/anomalydetector/ai-anomaly-detector/) | [Package (NPM)](https://www.npmjs.com/package/@azure/ai-anomaly-detector) | [API reference documentation](https://aka.ms/azsdk/net/docs/ref/anomalydetector) | -[Product documentation](https://docs.microsoft.com/en-us/azure/cognitive-services/anomaly-detector/) |[Samples](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/anomalydetector/ai-anomaly-detector/samples) +[Product documentation](https://docs.microsoft.com/azure/cognitive-services/anomaly-detector/) | [Samples](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/anomalydetector/ai-anomaly-detector/samples) ## Key concepts -Coming soon (#10865) +The `AnomalyDetectorClient` provides methods for anomaly detection: + +- `detectEntireSeries` - Detects anomalies on an entire data set +- `detectLastPoint` - Detects anomalies in the latest data point +- `detectChangePoint` - Evaluates change point score of every series point ## Getting started @@ -20,8 +24,8 @@ Coming soon (#10865) ### Prerequisites -- An [Azure subscription][azure_sub]. -- An existing [Cognitive Services][cognitive_resource] or Anomaly Detector resource. If you need to create the resource, you can use the [Azure Portal][azure_portal] or [Azure CLI][azure_cli]. +- An [Azure subscription](https://azure.microsoft.com/free/). +- An existing Anomaly Detector resource. If you use the Azure CLI, replace `` and `` with your own unique names: @@ -41,7 +45,7 @@ npm install @azure/ai-anomaly-detector To create a client object to access the Anomaly Detector API, you will need the `endpoint` of your Anomaly Detector resource and a `credential`. The Anomaly Detector client can use either Azure Active Directory credentials or an API key credential to authenticate. -You can find the endpoint for your Anomaly Detector resource either in the [Azure Portal][azure_portal] or by using the [Azure CLI][azure_cli] snippet below: +You can find the endpoint for your Anomaly Detector resource in the Azure Portal by clicking `Keys and Endpoint` under Resource Management in the menu or by using the Azure CLI snippet below: ```bash az cognitiveservices account show --name --resource-group --query "endpoint" @@ -49,7 +53,7 @@ az cognitiveservices account show --name --resource-group < #### Using an API Key -Use the [Azure Portal][azure_portal] to browse to your Anomaly Detector resource and retrieve an API key, or use the [Azure CLI][azure_cli] snippet below: +Use the Azure Portal to browse to your Anomaly Detector resource and retrieve an API key by clicking `Keys and Endpoint` under Resource Management, or use the Azure CLI snippet below: **Note:** Sometimes the API key is referred to as a "subscription key" or "subscription API key." @@ -67,14 +71,14 @@ const client = new AnomalyDetectorClient("", new AzureKeyCredential("< #### Using an Azure Active Directory Credential -Client API key authentication is used in most of the examples, but you can also authenticate with Azure Active Directory using the [Azure Identity library][azure_identity]. To use the [DefaultAzureCredential][defaultazurecredential] provider shown below, +Client API key authentication is used in most of the examples, but you can also authenticate with Azure Active Directory using the [Azure Identity library]. To use the DefaultAzureCredential provider shown below, or other credential providers provided with the Azure SDK, please install the `@azure/identity` package: ```bash npm install @azure/identity ``` -You will also need to [register a new AAD application][register_aad_app] and grant access to Anomaly Detector by assigning the `"Cognitive Services User"` role to your service principal (note: other roles such as `"Owner"` will not grant the necessary permissions, only `"Cognitive Services User"` will suffice to run the examples and the sample code). +You will also need to register a new AAD application and grant access to Anomaly Detector by assigning the `"Cognitive Services User"` role to your service principal (note: other roles such as `"Owner"` will not grant the necessary permissions, only `"Cognitive Services User"` will suffice to run the examples and the sample code). Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`. @@ -87,7 +91,69 @@ const client = new AnomalyDetectorClient("", new DefaultAzureCredentia ## Examples -Coming soon (#10865) +### Detect Change Points + +This sample demonstrates how to detect change points on entire series. + +```javascript +const { AnomalyDetectorClient, TimeGranularity } = require("@azure/ai-anomaly-detector"); +const { AzureKeyCredential } = require("@azure/core-auth"); + +// You will need to set this environment variables in .env file or edit the following values +const apiKey = process.env["API_KEY"] || ""; +const endpoint = process.env["ENDPOINT"] || ""; + +async function main() { + // create client + const client = new AnomalyDetectorClient(endpoint, new AzureKeyCredential(apiKey)); + + // construct request + const request = { + series: [ + { timestamp: new Date("2018-03-01T00:00:00Z"), value: 32858923 }, + { timestamp: new Date("2018-03-02T00:00:00Z"), value: 29615278 }, + { timestamp: new Date("2018-03-03T00:00:00Z"), value: 22839355 }, + { timestamp: new Date("2018-03-04T00:00:00Z"), value: 25948736 }, + { timestamp: new Date("2018-03-05T00:00:00Z"), value: 34139159 }, + { timestamp: new Date("2018-03-06T00:00:00Z"), value: 33843985 }, + { timestamp: new Date("2018-03-07T00:00:00Z"), value: 33637661 }, + { timestamp: new Date("2018-03-08T00:00:00Z"), value: 32627350 }, + { timestamp: new Date("2018-03-09T00:00:00Z"), value: 29881076 }, + { timestamp: new Date("2018-03-10T00:00:00Z"), value: 22681575 }, + { timestamp: new Date("2018-03-11T00:00:00Z"), value: 24629393 }, + { timestamp: new Date("2018-03-12T00:00:00Z"), value: 34010679 }, + { timestamp: new Date("2018-03-13T00:00:00Z"), value: 33893888 }, + { timestamp: new Date("2018-03-14T00:00:00Z"), value: 33760076 }, + { timestamp: new Date("2018-03-15T00:00:00Z"), value: 33093515 } + ], + granularity: TimeGranularity.daily + }; + + // get change point detect results + const result = await client.detectChangePoint(request); + const isChangePointDetected = result.isChangePoint.some((changePoint) => changePoint); + + if (isChangePointDetected) { + console.log("Change points were detected from the series at index:"); + result.isChangePoint.forEach((changePoint, index) => { + if (changePoint === true) { + console.log(index); + } + }); + } else { + console.log("There is no change point detected from the series."); + } + // output: + // Change points were detected from the series at index: + // 9 +} + +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); +``` + +More Samples can be found [here](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/anomalydetector/ai-anomaly-detector/samples) ## Troubleshooting diff --git a/sdk/anomalydetector/ai-anomaly-detector/package.json b/sdk/anomalydetector/ai-anomaly-detector/package.json index 59c6e9048bab..b69c2b08a492 100644 --- a/sdk/anomalydetector/ai-anomaly-detector/package.json +++ b/sdk/anomalydetector/ai-anomaly-detector/package.json @@ -1,6 +1,6 @@ { "name": "@azure/ai-anomaly-detector", - "version": "3.0.0-preview.2", + "version": "3.0.0-beta.3", "description": "An isomorphic client library for the Azure Anomaly Detector service.", "sdk-type": "client", "main": "dist/index.js", @@ -61,7 +61,7 @@ "sideEffects": false, "prettier": "@azure/eslint-plugin-azure-sdk/prettier.json", "dependencies": { - "@azure/core-http": "^1.1.6", + "@azure/core-http": "^1.2.0", "@azure/core-auth": "^1.1.3", "@azure/logger": "^1.0.0", "@opentelemetry/api": "^0.10.2", @@ -81,16 +81,10 @@ "@types/chai": "^4.1.6", "@types/mocha": "^7.0.2", "@types/node": "^8.0.0", - "@typescript-eslint/eslint-plugin": "^2.0.0", - "@typescript-eslint/parser": "^2.0.0", "chai": "^4.2.0", "cross-env": "^7.0.2", "dotenv": "^8.2.0", "eslint": "^6.1.0", - "eslint-config-prettier": "^6.0.0", - "eslint-plugin-no-null": "^1.0.2", - "eslint-plugin-no-only-tests": "^2.3.0", - "eslint-plugin-promise": "^4.1.1", "inherits": "^2.0.3", "karma": "^5.1.0", "karma-chrome-launcher": "^3.0.0", diff --git a/sdk/anomalydetector/ai-anomaly-detector/review/ai-anomaly-detector.api.md b/sdk/anomalydetector/ai-anomaly-detector/review/ai-anomaly-detector.api.md index 167a5b55f785..83fe35bdf105 100644 --- a/sdk/anomalydetector/ai-anomaly-detector/review/ai-anomaly-detector.api.md +++ b/sdk/anomalydetector/ai-anomaly-detector/review/ai-anomaly-detector.api.md @@ -13,9 +13,9 @@ import { TokenCredential } from '@azure/core-auth'; // @public export class AnomalyDetectorClient { constructor(endpointUrl: string, credential: TokenCredential | KeyCredential, options?: AnomalyDetectorClientOptions); - detectChangePoint(body: DetectChangePointRequest, options?: OperationOptions): Promise; - detectEntireSeries(body: DetectRequest, options?: OperationOptions): Promise; - detectLastPoint(body: DetectRequest, options?: OperationOptions): Promise; + detectChangePoint(body: DetectChangePointRequest, options?: DetectChangePointOptions): Promise; + detectEntireSeries(body: DetectRequest, options?: DetectEntireSeriesOptions): Promise; + detectLastPoint(body: DetectRequest, options?: DetectLastPointOptions): Promise; } // @public @@ -46,6 +46,9 @@ export type AnomalyDetectorClientDetectLastPointResponse = DetectLastPointRespon export interface AnomalyDetectorClientOptions extends PipelineOptions { } +// @public (undocumented) +export type DetectChangePointOptions = OperationOptions; + // @public (undocumented) export interface DetectChangePointRequest { customInterval?: number; @@ -74,6 +77,12 @@ export interface DetectEntireResponse { upperMargins: number[]; } +// @public (undocumented) +export type DetectEntireSeriesOptions = OperationOptions; + +// @public (undocumented) +export type DetectLastPointOptions = OperationOptions; + // @public (undocumented) export interface DetectLastPointResponse { expectedValue: number; diff --git a/sdk/anomalydetector/ai-anomaly-detector/src/AnomalyDetectorClient.ts b/sdk/anomalydetector/ai-anomaly-detector/src/AnomalyDetectorClient.ts index 9d53dd2dc420..bfe27c751715 100644 --- a/sdk/anomalydetector/ai-anomaly-detector/src/AnomalyDetectorClient.ts +++ b/sdk/anomalydetector/ai-anomaly-detector/src/AnomalyDetectorClient.ts @@ -29,6 +29,10 @@ import { logger } from "./logger"; import { createSpan } from "./tracing"; import { CanonicalCode } from "@opentelemetry/api"; +export type DetectEntireSeriesOptions = OperationOptions; +export type DetectLastPointOptions = OperationOptions; +export type DetectChangePointOptions = OperationOptions; + /** * Client class for interacting with Azure Anomaly Detector service. */ @@ -64,7 +68,6 @@ export class AnomalyDetectorClient { constructor( endpointUrl: string, credential: TokenCredential | KeyCredential, - // eslint-disable-next-line @azure/azure-sdk/ts-naming-options options?: AnomalyDetectorClientOptions ) { this.endpointUrl = endpointUrl; @@ -110,8 +113,7 @@ export class AnomalyDetectorClient { */ public detectEntireSeries( body: DetectRequest, - // eslint-disable-next-line @azure/azure-sdk/ts-naming-options - options?: OperationOptions + options?: DetectEntireSeriesOptions ): Promise { const realOptions = options || {}; const { span, updatedOptions: finalOptions } = createSpan( @@ -142,8 +144,7 @@ export class AnomalyDetectorClient { */ public detectLastPoint( body: DetectRequest, - // eslint-disable-next-line @azure/azure-sdk/ts-naming-options - options?: OperationOptions + options?: DetectLastPointOptions ): Promise { const realOptions = options || {}; const { span, updatedOptions: finalOptions } = createSpan( @@ -172,8 +173,7 @@ export class AnomalyDetectorClient { */ detectChangePoint( body: DetectChangePointRequest, - // eslint-disable-next-line @azure/azure-sdk/ts-naming-options - options?: OperationOptions + options?: DetectChangePointOptions ): Promise { const realOptions = options || {}; const { span, updatedOptions: finalOptions } = createSpan( diff --git a/sdk/anomalydetector/ai-anomaly-detector/src/constants.ts b/sdk/anomalydetector/ai-anomaly-detector/src/constants.ts index f2775bb63784..6641e5d73063 100644 --- a/sdk/anomalydetector/ai-anomaly-detector/src/constants.ts +++ b/sdk/anomalydetector/ai-anomaly-detector/src/constants.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -export const SDK_VERSION: string = "3.0.0-preview.2"; +export const SDK_VERSION: string = "3.0.0-beta.3"; export const DEFAULT_COGNITIVE_SCOPE = "https://cognitiveservices.azure.com/.default"; diff --git a/sdk/anomalydetector/ai-anomaly-detector/src/generated/generatedClientContext.ts b/sdk/anomalydetector/ai-anomaly-detector/src/generated/generatedClientContext.ts index 9c8416d5dd9a..a14774cead09 100644 --- a/sdk/anomalydetector/ai-anomaly-detector/src/generated/generatedClientContext.ts +++ b/sdk/anomalydetector/ai-anomaly-detector/src/generated/generatedClientContext.ts @@ -10,7 +10,7 @@ import * as coreHttp from "@azure/core-http"; import { GeneratedClientOptionalParams } from "./models"; const packageName = "@azure/ai-form-recognizer"; -const packageVersion = "3.0.0-preview.2"; +const packageVersion = "3.0.0-beta.3"; export class GeneratedClientContext extends coreHttp.ServiceClient { endpoint: string; diff --git a/sdk/anomalydetector/ai-anomaly-detector/src/index.ts b/sdk/anomalydetector/ai-anomaly-detector/src/index.ts index 52631785a055..1af5c1e09314 100644 --- a/sdk/anomalydetector/ai-anomaly-detector/src/index.ts +++ b/sdk/anomalydetector/ai-anomaly-detector/src/index.ts @@ -1,5 +1,10 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -export { AnomalyDetectorClient } from "./AnomalyDetectorClient"; +export { + AnomalyDetectorClient, + DetectEntireSeriesOptions, + DetectLastPointOptions, + DetectChangePointOptions +} from "./AnomalyDetectorClient"; export * from "./models"; diff --git a/sdk/appconfiguration/app-configuration/README.md b/sdk/appconfiguration/app-configuration/README.md index 0fbe9d7c3645..2e9e3e4de436 100644 --- a/sdk/appconfiguration/app-configuration/README.md +++ b/sdk/appconfiguration/app-configuration/README.md @@ -1,6 +1,6 @@ # App Configuration client library for JavaScript -[Azure App Configuration](https://docs.microsoft.com/en-us/azure/azure-app-configuration/overview) is a managed service that helps developers centralize their application and feature settings simply and securely. +[Azure App Configuration](https://docs.microsoft.com/azure/azure-app-configuration/overview) is a managed service that helps developers centralize their application and feature settings simply and securely. Use the client library for App Configuration to: @@ -11,7 +11,7 @@ Use the client library for App Configuration to: [Source code](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/appconfiguration/app-configuration/) | [Package (NPM)](https://www.npmjs.com/package/@azure/app-configuration) | [API reference documentation](https://docs.microsoft.com/javascript/api/@azure/app-configuration) | -[Product documentation](https://docs.microsoft.com/en-us/azure/azure-app-configuration/) | +[Product documentation](https://docs.microsoft.com/azure/azure-app-configuration/) | [Samples](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/appconfiguration/app-configuration/samples) ## Getting started @@ -24,7 +24,7 @@ npm install @azure/app-configuration ### Prerequisites -- You must have an [Azure Subscription](https://azure.microsoft.com) and an [App Configuration](https://docs.microsoft.com/en-us/azure/azure-app-configuration/) resource to use this package. +- You must have an [Azure Subscription](https://azure.microsoft.com) and an [App Configuration](https://docs.microsoft.com/azure/azure-app-configuration/) resource to use this package. - Node.js version 8.x.x or higher ### Create an App Configuration resource @@ -134,7 +134,7 @@ async function run() { value: "testvalue", // Labels allow you to create variants of a key tailored // for specific use-cases like supporting multiple environments. - // https://docs.microsoft.com/en-us/azure/azure-app-configuration/concept-key-value#label-keys + // https://docs.microsoft.com/azure/azure-app-configuration/concept-key-value#label-keys label: "optional-label" }); @@ -181,6 +181,6 @@ folder for more details. ## Related projects - [Microsoft Azure SDK for JavaScript](https://github.com/Azure/azure-sdk-for-js) -- [Azure App Configuration](https://docs.microsoft.com/en-us/azure/azure-app-configuration/overview) +- [Azure App Configuration](https://docs.microsoft.com/azure/azure-app-configuration/overview) ![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fappconfiguration%2Fapp-configuration%2FREADME.png) diff --git a/sdk/appconfiguration/app-configuration/package.json b/sdk/appconfiguration/app-configuration/package.json index 7798dbf3e25b..d08eb8e969f8 100644 --- a/sdk/appconfiguration/app-configuration/package.json +++ b/sdk/appconfiguration/app-configuration/package.json @@ -54,8 +54,8 @@ "execute:samples": "npm run build:samples && echo Skipped.", "extract-api": "tsc -p . && api-extractor run --local", "format": "prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"", - "lint:fix": "eslint -c ../../../.eslintrc.json src test samples --ext .ts --fix", - "lint": "eslint -c ../../../.eslintrc.json src test --ext .ts -f html -o template-lintReport.html || exit 0", + "lint:fix": "eslint package.json api-extractor.json src test --ext .ts --fix", + "lint": "eslint package.json api-extractor.json src test --ext .ts -f html -o app-configuration-lintReport.html || exit 0", "prebuild": "npm run clean", "pack": "npm pack 2>&1", "swagger": "autorest --typescript swagger/swagger.md", @@ -81,7 +81,7 @@ }, "dependencies": { "@azure/core-asynciterator-polyfill": "^1.0.0", - "@azure/core-http": "^1.1.6", + "@azure/core-http": "^1.2.0", "@azure/core-paging": "^1.1.1", "@azure/core-tracing": "1.0.0-preview.9", "@opentelemetry/api": "^0.10.2", @@ -103,16 +103,10 @@ "@types/mocha": "^7.0.2", "@types/node": "^8.0.0", "@types/sinon": "^9.0.4", - "@typescript-eslint/eslint-plugin": "^2.0.0", - "@typescript-eslint/parser": "^2.0.0", "assert": "^1.4.1", "chai": "^4.2.0", "dotenv": "^8.2.0", "eslint": "^6.1.0", - "eslint-config-prettier": "^6.0.0", - "eslint-plugin-no-null": "^1.0.2", - "eslint-plugin-no-only-tests": "^2.3.0", - "eslint-plugin-promise": "^4.1.1", "esm": "^3.2.18", "karma": "^5.1.0", "karma-chrome-launcher": "^3.0.0", diff --git a/sdk/appconfiguration/app-configuration/test/README.md b/sdk/appconfiguration/app-configuration/test/README.md index 36f4b682f04b..baeb1da9a780 100644 --- a/sdk/appconfiguration/app-configuration/test/README.md +++ b/sdk/appconfiguration/app-configuration/test/README.md @@ -6,7 +6,7 @@ You can use existing Azure resources for the live tests, or generate new ones by The Azure resource that is used by the tests in this project is: -- An [Azure App Configuration](https://docs.microsoft.com/en-us/azure/azure-app-configuration/overview). Your Azure application needs to be assigned as the **owner** of this Azure App Configuration resource. The steps are provided [below](#AAD-based-authentication). +- An [Azure App Configuration](https://docs.microsoft.com/azure/azure-app-configuration/overview). Your Azure application needs to be assigned as the **owner** of this Azure App Configuration resource. The steps are provided [below](#aad-based-authentication). To run the live tests, you will also need to set the below environment variables: @@ -25,7 +25,7 @@ The following steps will help you setup the AAD credentials. ### Register a new application in AAD -- Follow [Documentation to register a new application](https://docs.microsoft.com/en-us/azure/active-directory/develop/quickstart-register-app) in the Azure Active Directory (in the Azure portal). +- Follow [Documentation to register a new application](https://docs.microsoft.com/azure/active-directory/develop/quickstart-register-app) in the Azure Active Directory (in the Azure portal). - Note down the `CLIENT_ID` and `TENANT_ID`. - In the "Certificates & Secrets" tab, create a secret and note that down. @@ -34,6 +34,6 @@ The following steps will help you setup the AAD credentials. - In the Azure portal, go to your Azure App Configuration and assign the **Owner** role to the registered application. - This can be done from `Role assignment` section of `Access control (IAM)` tab (in the left-side-navbar of your Azure App Configuration in the Azure portal)
_Doing this would allow the registered application manage the resource, i.e., entity creation, deletion, etc.,_
-- For more information on securing your Azure App Configuration: [Learn more](https://docs.microsoft.com/en-us/azure/event-hubs/authorize-access-event-hubs) +- For more information on securing your Azure App Configuration: [Learn more](https://docs.microsoft.com/azure/event-hubs/authorize-access-event-hubs) ![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fappconfiguration%2Fapp-configuration%2Ftest%2FREADME.png) diff --git a/sdk/applicationinsights/arm-appinsights/LICENSE.txt b/sdk/applicationinsights/arm-appinsights/LICENSE.txt index a70e8cf66038..ea8fb1516028 100644 --- a/sdk/applicationinsights/arm-appinsights/LICENSE.txt +++ b/sdk/applicationinsights/arm-appinsights/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2018 Microsoft +Copyright (c) 2020 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/applicationinsights/arm-appinsights/README.md b/sdk/applicationinsights/arm-appinsights/README.md index 6be3c6ab9f88..a81a6333908d 100644 --- a/sdk/applicationinsights/arm-appinsights/README.md +++ b/sdk/applicationinsights/arm-appinsights/README.md @@ -9,7 +9,7 @@ This package contains an isomorphic SDK for ApplicationInsightsManagementClient. ### How to Install -``` +```bash npm install @azure/arm-appinsights ``` @@ -19,13 +19,14 @@ npm install @azure/arm-appinsights ##### Install @azure/ms-rest-nodeauth -``` -npm install @azure/ms-rest-nodeauth +- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. +```bash +npm install @azure/ms-rest-nodeauth@"^3.0.0" ``` ##### Sample code -```ts +```typescript import * as msRest from "@azure/ms-rest-js"; import * as msRestAzure from "@azure/ms-rest-azure-js"; import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; @@ -47,7 +48,7 @@ msRestNodeAuth.interactiveLogin().then((creds) => { ##### Install @azure/ms-rest-browserauth -``` +```bash npm install @azure/ms-rest-browserauth ``` @@ -95,5 +96,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fapplicationinsights%2Farm-appinsights%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/applicationinsights/arm-appinsights/README.png) diff --git a/sdk/applicationinsights/arm-appinsights/package.json b/sdk/applicationinsights/arm-appinsights/package.json index af5066cd1398..7c57385ff716 100644 --- a/sdk/applicationinsights/arm-appinsights/package.json +++ b/sdk/applicationinsights/arm-appinsights/package.json @@ -2,11 +2,11 @@ "name": "@azure/arm-appinsights", "author": "Microsoft Corporation", "description": "ApplicationInsightsManagementClient Library with typescript type definitions for node.js and browser.", - "version": "2.1.0", + "version": "3.0.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.1.0", - "@azure/ms-rest-js": "^1.1.0", - "tslib": "^1.9.3" + "@azure/ms-rest-azure-js": "^2.0.1", + "@azure/ms-rest-js": "^2.0.4", + "tslib": "^1.10.0" }, "keywords": [ "node", @@ -20,18 +20,19 @@ "module": "./esm/applicationInsightsManagementClient.js", "types": "./esm/applicationInsightsManagementClient.d.ts", "devDependencies": { - "typescript": "^3.1.1", - "rollup": "^0.66.2", - "rollup-plugin-node-resolve": "^3.4.0", - "uglify-js": "^3.4.9" + "typescript": "^3.5.3", + "rollup": "^1.18.0", + "rollup-plugin-node-resolve": "^5.2.0", + "rollup-plugin-sourcemaps": "^0.4.2", + "uglify-js": "^3.6.0" }, - "homepage": "https://github.com/azure/azure-sdk-for-js/tree/master/sdk/applicationinsights/arm-appinsights", + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/applicationinsights/arm-appinsights", "repository": { "type": "git", - "url": "https://github.com/azure/azure-sdk-for-js.git" + "url": "https://github.com/Azure/azure-sdk-for-js.git" }, "bugs": { - "url": "https://github.com/azure/azure-sdk-for-js/issues" + "url": "https://github.com/Azure/azure-sdk-for-js/issues" }, "files": [ "dist/**/*.js", @@ -43,6 +44,7 @@ "esm/**/*.d.ts", "esm/**/*.d.ts.map", "src/**/*.ts", + "README.md", "rollup.config.js", "tsconfig.json" ], diff --git a/sdk/applicationinsights/arm-appinsights/rollup.config.js b/sdk/applicationinsights/arm-appinsights/rollup.config.js index 78641ef3fe3c..034249a738d2 100644 --- a/sdk/applicationinsights/arm-appinsights/rollup.config.js +++ b/sdk/applicationinsights/arm-appinsights/rollup.config.js @@ -1,10 +1,16 @@ +import rollup from "rollup"; import nodeResolve from "rollup-plugin-node-resolve"; +import sourcemaps from "rollup-plugin-sourcemaps"; + /** - * @type {import('rollup').RollupFileOptions} + * @type {rollup.RollupFileOptions} */ const config = { - input: './esm/applicationInsightsManagementClient.js', - external: ["@azure/ms-rest-js", "@azure/ms-rest-azure-js"], + input: "./esm/applicationInsightsManagementClient.js", + external: [ + "@azure/ms-rest-js", + "@azure/ms-rest-azure-js" + ], output: { file: "./dist/arm-appinsights.js", format: "umd", @@ -16,16 +22,16 @@ const config = { }, banner: `/* * 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. */` }, plugins: [ - nodeResolve({ module: true }) + nodeResolve({ mainFields: ['module', 'main'] }), + sourcemaps() ] }; + export default config; diff --git a/sdk/applicationinsights/arm-appinsights/src/applicationInsightsManagementClient.ts b/sdk/applicationinsights/arm-appinsights/src/applicationInsightsManagementClient.ts index 1ad9a69a56ef..129814529633 100644 --- a/sdk/applicationinsights/arm-appinsights/src/applicationInsightsManagementClient.ts +++ b/sdk/applicationinsights/arm-appinsights/src/applicationInsightsManagementClient.ts @@ -26,18 +26,21 @@ class ApplicationInsightsManagementClient extends ApplicationInsightsManagementC componentFeatureCapabilities: operations.ComponentFeatureCapabilities; componentAvailableFeatures: operations.ComponentAvailableFeatures; proactiveDetectionConfigurations: operations.ProactiveDetectionConfigurations; - components: operations.Components; workItemConfigurations: operations.WorkItemConfigurations; favorites: operations.Favorites; webTestLocations: operations.WebTestLocations; webTests: operations.WebTests; analyticsItems: operations.AnalyticsItems; workbooks: operations.Workbooks; + myWorkbooks: operations.MyWorkbooks; + components: operations.Components; + componentLinkedStorageAccounts: operations.ComponentLinkedStorageAccountsOperations; + liveToken: operations.LiveToken; /** * Initializes a new instance of the ApplicationInsightsManagementClient class. * @param credentials Credentials needed for the client to connect to Azure. - * @param subscriptionId The Azure subscription ID. + * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.ApplicationInsightsManagementClientOptions) { @@ -51,13 +54,16 @@ class ApplicationInsightsManagementClient extends ApplicationInsightsManagementC this.componentFeatureCapabilities = new operations.ComponentFeatureCapabilities(this); this.componentAvailableFeatures = new operations.ComponentAvailableFeatures(this); this.proactiveDetectionConfigurations = new operations.ProactiveDetectionConfigurations(this); - this.components = new operations.Components(this); this.workItemConfigurations = new operations.WorkItemConfigurations(this); this.favorites = new operations.Favorites(this); this.webTestLocations = new operations.WebTestLocations(this); this.webTests = new operations.WebTests(this); this.analyticsItems = new operations.AnalyticsItems(this); this.workbooks = new operations.Workbooks(this); + this.myWorkbooks = new operations.MyWorkbooks(this); + this.components = new operations.Components(this); + this.componentLinkedStorageAccounts = new operations.ComponentLinkedStorageAccountsOperations(this); + this.liveToken = new operations.LiveToken(this); } } diff --git a/sdk/applicationinsights/arm-appinsights/src/applicationInsightsManagementClientContext.ts b/sdk/applicationinsights/arm-appinsights/src/applicationInsightsManagementClientContext.ts index 41cf05899c26..14021c83aee1 100644 --- a/sdk/applicationinsights/arm-appinsights/src/applicationInsightsManagementClientContext.ts +++ b/sdk/applicationinsights/arm-appinsights/src/applicationInsightsManagementClientContext.ts @@ -13,17 +13,16 @@ import * as msRest from "@azure/ms-rest-js"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-appinsights"; -const packageVersion = "0.1.0"; +const packageVersion = "3.0.0"; export class ApplicationInsightsManagementClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials; - apiVersion?: string; subscriptionId: string; /** * Initializes a new instance of the ApplicationInsightsManagementClient class. * @param credentials Credentials needed for the client to connect to Azure. - * @param subscriptionId The Azure subscription ID. + * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.ApplicationInsightsManagementClientOptions) { @@ -44,7 +43,6 @@ export class ApplicationInsightsManagementClientContext extends msRestAzure.Azur super(credentials, options); - this.apiVersion = '2015-05-01'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; diff --git a/sdk/applicationinsights/arm-appinsights/src/models/aPIKeysMappers.ts b/sdk/applicationinsights/arm-appinsights/src/models/aPIKeysMappers.ts index 1d4fc21adfe6..359b47866056 100644 --- a/sdk/applicationinsights/arm-appinsights/src/models/aPIKeysMappers.ts +++ b/sdk/applicationinsights/arm-appinsights/src/models/aPIKeysMappers.ts @@ -1,17 +1,14 @@ /* * 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. */ export { - ApplicationInsightsComponentAPIKeyListResult, + APIKeyRequest, ApplicationInsightsComponentAPIKey, - CloudError, - APIKeyRequest + ApplicationInsightsComponentAPIKeyListResult, + CloudError } from "../models/mappers"; - diff --git a/sdk/applicationinsights/arm-appinsights/src/models/analyticsItemsMappers.ts b/sdk/applicationinsights/arm-appinsights/src/models/analyticsItemsMappers.ts index b00875e33415..ec4ddeb966e1 100644 --- a/sdk/applicationinsights/arm-appinsights/src/models/analyticsItemsMappers.ts +++ b/sdk/applicationinsights/arm-appinsights/src/models/analyticsItemsMappers.ts @@ -1,11 +1,9 @@ /* * 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. */ export { @@ -13,4 +11,3 @@ export { ApplicationInsightsComponentAnalyticsItemProperties, CloudError } from "../models/mappers"; - diff --git a/sdk/applicationinsights/arm-appinsights/src/models/annotationsMappers.ts b/sdk/applicationinsights/arm-appinsights/src/models/annotationsMappers.ts index d5d9386a0d5e..dd86a501f412 100644 --- a/sdk/applicationinsights/arm-appinsights/src/models/annotationsMappers.ts +++ b/sdk/applicationinsights/arm-appinsights/src/models/annotationsMappers.ts @@ -1,18 +1,15 @@ /* * 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. */ export { - AnnotationsListResult, Annotation, AnnotationError, - InnerError, - CloudError + AnnotationsListResult, + CloudError, + InnerError } from "../models/mappers"; - diff --git a/sdk/applicationinsights/arm-appinsights/src/models/componentAvailableFeaturesMappers.ts b/sdk/applicationinsights/arm-appinsights/src/models/componentAvailableFeaturesMappers.ts index 778c0f8e27f8..077b32f04cad 100644 --- a/sdk/applicationinsights/arm-appinsights/src/models/componentAvailableFeaturesMappers.ts +++ b/sdk/applicationinsights/arm-appinsights/src/models/componentAvailableFeaturesMappers.ts @@ -1,11 +1,9 @@ /* * 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. */ export { @@ -14,4 +12,3 @@ export { ApplicationInsightsComponentFeatureCapability, CloudError } from "../models/mappers"; - diff --git a/sdk/applicationinsights/arm-appinsights/src/models/componentCurrentBillingFeaturesMappers.ts b/sdk/applicationinsights/arm-appinsights/src/models/componentCurrentBillingFeaturesMappers.ts index 3e6161210aec..b765b76a1921 100644 --- a/sdk/applicationinsights/arm-appinsights/src/models/componentCurrentBillingFeaturesMappers.ts +++ b/sdk/applicationinsights/arm-appinsights/src/models/componentCurrentBillingFeaturesMappers.ts @@ -1,11 +1,9 @@ /* * 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. */ export { @@ -13,4 +11,3 @@ export { ApplicationInsightsComponentDataVolumeCap, CloudError } from "../models/mappers"; - diff --git a/sdk/applicationinsights/arm-appinsights/src/models/componentFeatureCapabilitiesMappers.ts b/sdk/applicationinsights/arm-appinsights/src/models/componentFeatureCapabilitiesMappers.ts index 66534b06f77b..b13f2ae34a0c 100644 --- a/sdk/applicationinsights/arm-appinsights/src/models/componentFeatureCapabilitiesMappers.ts +++ b/sdk/applicationinsights/arm-appinsights/src/models/componentFeatureCapabilitiesMappers.ts @@ -1,15 +1,12 @@ /* * 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. */ export { ApplicationInsightsComponentFeatureCapabilities, CloudError } from "../models/mappers"; - diff --git a/sdk/applicationinsights/arm-appinsights/src/models/componentLinkedStorageAccountsOperationsMappers.ts b/sdk/applicationinsights/arm-appinsights/src/models/componentLinkedStorageAccountsOperationsMappers.ts new file mode 100644 index 000000000000..712871b162ad --- /dev/null +++ b/sdk/applicationinsights/arm-appinsights/src/models/componentLinkedStorageAccountsOperationsMappers.ts @@ -0,0 +1,31 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + ApplicationInsightsComponent, + ApplicationInsightsComponentProactiveDetectionConfiguration, + ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions, + AzureEntityResource, + BaseResource, + ComponentLinkedStorageAccounts, + ComponentLinkedStorageAccountsPatch, + ComponentsResource, + ErrorResponse, + MyWorkbook, + MyWorkbookResource, + PrivateLinkScopedResource, + ProxyResource, + Resource, + TrackedResource, + WebTest, + WebTestGeolocation, + WebTestPropertiesConfiguration, + WebtestsResource, + Workbook, + WorkbookResource +} from "../models/mappers"; diff --git a/sdk/applicationinsights/arm-appinsights/src/models/componentQuotaStatusMappers.ts b/sdk/applicationinsights/arm-appinsights/src/models/componentQuotaStatusMappers.ts index a3dfa8eaaa53..6b2bc91696da 100644 --- a/sdk/applicationinsights/arm-appinsights/src/models/componentQuotaStatusMappers.ts +++ b/sdk/applicationinsights/arm-appinsights/src/models/componentQuotaStatusMappers.ts @@ -1,15 +1,12 @@ /* * 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. */ export { ApplicationInsightsComponentQuotaStatus, CloudError } from "../models/mappers"; - diff --git a/sdk/applicationinsights/arm-appinsights/src/models/componentsMappers.ts b/sdk/applicationinsights/arm-appinsights/src/models/componentsMappers.ts index c3b85e5ea6cc..a145168e704e 100644 --- a/sdk/applicationinsights/arm-appinsights/src/models/componentsMappers.ts +++ b/sdk/applicationinsights/arm-appinsights/src/models/componentsMappers.ts @@ -1,31 +1,36 @@ /* * 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. */ export { - ApplicationInsightsComponentListResult, ApplicationInsightsComponent, - ComponentsResource, + ApplicationInsightsComponentListResult, + ApplicationInsightsComponentProactiveDetectionConfiguration, + ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions, + AzureEntityResource, BaseResource, CloudError, - TagsResource, + ComponentLinkedStorageAccounts, ComponentPurgeBody, ComponentPurgeBodyFilters, ComponentPurgeResponse, ComponentPurgeStatusResponse, - ApplicationInsightsComponentProactiveDetectionConfiguration, - ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions, - WebtestsResource, + ComponentsResource, + MyWorkbook, + MyWorkbookResource, + PrivateLinkScopedResource, + ProxyResource, + Resource, + TagsResource, + TrackedResource, WebTest, WebTestGeolocation, WebTestPropertiesConfiguration, - WorkbookResource, - Workbook + WebtestsResource, + Workbook, + WorkbookResource } from "../models/mappers"; - diff --git a/sdk/applicationinsights/arm-appinsights/src/models/exportConfigurationsMappers.ts b/sdk/applicationinsights/arm-appinsights/src/models/exportConfigurationsMappers.ts index a1919004b9d4..a5c3232aad4e 100644 --- a/sdk/applicationinsights/arm-appinsights/src/models/exportConfigurationsMappers.ts +++ b/sdk/applicationinsights/arm-appinsights/src/models/exportConfigurationsMappers.ts @@ -1,16 +1,13 @@ /* * 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. */ export { ApplicationInsightsComponentExportConfiguration, - CloudError, - ApplicationInsightsComponentExportRequest + ApplicationInsightsComponentExportRequest, + CloudError } from "../models/mappers"; - diff --git a/sdk/applicationinsights/arm-appinsights/src/models/favoritesMappers.ts b/sdk/applicationinsights/arm-appinsights/src/models/favoritesMappers.ts index f69c1f6d10e9..d927641eeede 100644 --- a/sdk/applicationinsights/arm-appinsights/src/models/favoritesMappers.ts +++ b/sdk/applicationinsights/arm-appinsights/src/models/favoritesMappers.ts @@ -1,15 +1,12 @@ /* * 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. */ export { ApplicationInsightsComponentFavorite, CloudError } from "../models/mappers"; - diff --git a/sdk/applicationinsights/arm-appinsights/src/models/index.ts b/sdk/applicationinsights/arm-appinsights/src/models/index.ts index ff9e140b9556..9b42aa4deac2 100644 --- a/sdk/applicationinsights/arm-appinsights/src/models/index.ts +++ b/sdk/applicationinsights/arm-appinsights/src/models/index.ts @@ -1,11 +1,9 @@ /* * 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. */ import { BaseResource, CloudError, AzureServiceClientOptions } from "@azure/ms-rest-azure-js"; @@ -13,1769 +11,1698 @@ import * as msRest from "@azure/ms-rest-js"; export { BaseResource, CloudError }; - /** - * @interface - * An interface representing ErrorResponse. - * Error reponse indicates Insights service is not able to process the incoming - * request. The reason is provided in the error message. - * + * Error response indicates Insights service is not able to process the incoming request. The + * reason is provided in the error message. */ export interface ErrorResponse { /** - * @member {string} [code] Error code. + * Error code. */ code?: string; /** - * @member {string} [message] Error message indicating why the operation - * failed. + * Error message indicating why the operation failed. */ message?: string; } /** - * @interface - * An interface representing OperationDisplay. * The object that represents the operation. - * */ export interface OperationDisplay { /** - * @member {string} [provider] Service provider: Microsoft.Cdn + * Service provider: Microsoft.Cdn */ provider?: string; /** - * @member {string} [resource] Resource on which the operation is performed: - * Profile, endpoint, etc. + * Resource on which the operation is performed: Profile, endpoint, etc. */ resource?: string; /** - * @member {string} [operation] Operation type: Read, write, delete, etc. + * Operation type: Read, write, delete, etc. */ operation?: string; } /** - * @interface - * An interface representing Operation. * CDN REST API operation - * */ export interface Operation { /** - * @member {string} [name] Operation name: {provider}/{resource}/{operation} + * Operation name: {provider}/{resource}/{operation} */ name?: string; /** - * @member {OperationDisplay} [display] The object that represents the - * operation. + * The object that represents the operation. */ display?: OperationDisplay; } /** - * @interface - * An interface representing Annotation. * Annotation associated with an application insights resource. - * */ export interface Annotation { /** - * @member {string} [annotationName] Name of annotation + * Name of annotation */ annotationName?: string; /** - * @member {string} [category] Category of annotation, free form + * Category of annotation, free form */ category?: string; /** - * @member {Date} [eventTime] Time when event occurred + * Time when event occurred */ eventTime?: Date; /** - * @member {string} [id] Unique Id for annotation + * Unique Id for annotation */ id?: string; /** - * @member {string} [properties] Serialized JSON object for detailed - * properties + * Serialized JSON object for detailed properties */ properties?: string; /** - * @member {string} [relatedAnnotation] Related parent annotation if any. - * Default value: 'null' . + * Related parent annotation if any. Default value: 'null'. */ relatedAnnotation?: string; } /** - * @interface - * An interface representing InnerError. * Inner error - * */ export interface InnerError { /** - * @member {string} [diagnosticcontext] Provides correlation for request + * Provides correlation for request */ diagnosticcontext?: string; /** - * @member {Date} [time] Request time + * Request time */ time?: Date; } /** - * @interface - * An interface representing AnnotationError. * Error associated with trying to create annotation with Id that already exist - * */ export interface AnnotationError { /** - * @member {string} [code] Error detail code and explanation + * Error detail code and explanation */ code?: string; /** - * @member {string} [message] Error message + * Error message */ message?: string; - /** - * @member {InnerError} [innererror] - */ innererror?: InnerError; } /** - * @interface - * An interface representing APIKeyRequest. - * An Application Insights component API Key createion request definition. - * + * An Application Insights component API Key creation request definition. */ export interface APIKeyRequest { /** - * @member {string} [name] The name of the API Key. + * The name of the API Key. */ name?: string; /** - * @member {string[]} [linkedReadProperties] The read access rights of this - * API Key. + * The read access rights of this API Key. */ linkedReadProperties?: string[]; /** - * @member {string[]} [linkedWriteProperties] The write access rights of this - * API Key. + * The write access rights of this API Key. */ linkedWriteProperties?: string[]; } /** - * @interface - * An interface representing ApplicationInsightsComponentAPIKey. * Properties that define an API key of an Application Insights Component. - * */ export interface ApplicationInsightsComponentAPIKey { /** - * @member {string} [id] The unique ID of the API key inside an Applciation - * Insights component. It is auto generated when the API key is created. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The unique ID of the API key inside an Application Insights component. It is auto generated + * when the API key is created. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; /** - * @member {string} [apiKey] The API key value. It will be only return once - * when the API Key was created. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The API key value. It will be only return once when the API Key was created. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly apiKey?: string; /** - * @member {string} [createdDate] The create date of this API key. + * The create date of this API key. */ createdDate?: string; /** - * @member {string} [name] The name of the API key. + * The name of the API key. */ name?: string; /** - * @member {string[]} [linkedReadProperties] The read access rights of this - * API Key. + * The read access rights of this API Key. */ linkedReadProperties?: string[]; /** - * @member {string[]} [linkedWriteProperties] The write access rights of this - * API Key. + * The write access rights of this API Key. */ linkedWriteProperties?: string[]; } /** - * @interface - * An interface representing ApplicationInsightsComponentExportRequest. - * An Application Insights component Continuous Export configuration request - * definition. - * + * An Application Insights component Continuous Export configuration request definition. */ export interface ApplicationInsightsComponentExportRequest { /** - * @member {string} [recordTypes] The document types to be exported, as comma - * separated values. Allowed values include 'Requests', 'Event', - * 'Exceptions', 'Metrics', 'PageViews', 'PageViewPerformance', 'Rdd', + * The document types to be exported, as comma separated values. Allowed values include + * 'Requests', 'Event', 'Exceptions', 'Metrics', 'PageViews', 'PageViewPerformance', 'Rdd', * 'PerformanceCounters', 'Availability', 'Messages'. */ recordTypes?: string; /** - * @member {string} [destinationType] The Continuous Export destination type. - * This has to be 'Blob'. + * The Continuous Export destination type. This has to be 'Blob'. */ destinationType?: string; /** - * @member {string} [destinationAddress] The SAS URL for the destination - * storage container. It must grant write permission. + * The SAS URL for the destination storage container. It must grant write permission. */ destinationAddress?: string; /** - * @member {string} [isEnabled] Set to 'true' to create a Continuous Export - * configuration as enabled, otherwise set it to 'false'. + * Set to 'true' to create a Continuous Export configuration as enabled, otherwise set it to + * 'false'. */ isEnabled?: string; /** - * @member {string} [notificationQueueEnabled] Deprecated + * Deprecated */ notificationQueueEnabled?: string; /** - * @member {string} [notificationQueueUri] Deprecated + * Deprecated */ notificationQueueUri?: string; /** - * @member {string} [destinationStorageSubscriptionId] The subscription ID of - * the destination storage container. + * The subscription ID of the destination storage container. */ destinationStorageSubscriptionId?: string; /** - * @member {string} [destinationStorageLocationId] The location ID of the - * destination storage container. + * The location ID of the destination storage container. */ destinationStorageLocationId?: string; /** - * @member {string} [destinationAccountId] The name of destination storage - * account. + * The name of destination storage account. */ destinationAccountId?: string; } /** - * @interface - * An interface representing ApplicationInsightsComponentExportConfiguration. * Properties that define a Continuous Export configuration. - * */ export interface ApplicationInsightsComponentExportConfiguration { /** - * @member {string} [exportId] The unique ID of the export configuration - * inside an Applciation Insights component. It is auto generated when the - * Continuous Export configuration is created. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The unique ID of the export configuration inside an Application Insights component. It is auto + * generated when the Continuous Export configuration is created. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly exportId?: string; /** - * @member {string} [instrumentationKey] The instrumentation key of the - * Application Insights component. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The instrumentation key of the Application Insights component. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly instrumentationKey?: string; /** - * @member {string} [recordTypes] This comma separated list of document types - * that will be exported. The possible values include 'Requests', 'Event', - * 'Exceptions', 'Metrics', 'PageViews', 'PageViewPerformance', 'Rdd', + * This comma separated list of document types that will be exported. The possible values include + * 'Requests', 'Event', 'Exceptions', 'Metrics', 'PageViews', 'PageViewPerformance', 'Rdd', * 'PerformanceCounters', 'Availability', 'Messages'. */ recordTypes?: string; /** - * @member {string} [applicationName] The name of the Application Insights - * component. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The name of the Application Insights component. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly applicationName?: string; /** - * @member {string} [subscriptionId] The subscription of the Application - * Insights component. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The subscription of the Application Insights component. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly subscriptionId?: string; /** - * @member {string} [resourceGroup] The resource group of the Application - * Insights component. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The resource group of the Application Insights component. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly resourceGroup?: string; /** - * @member {string} [destinationStorageSubscriptionId] The destination - * storage account subscription ID. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The destination storage account subscription ID. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly destinationStorageSubscriptionId?: string; /** - * @member {string} [destinationStorageLocationId] The destination account - * location ID. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The destination account location ID. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly destinationStorageLocationId?: string; /** - * @member {string} [destinationAccountId] The name of destination account. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The name of destination account. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly destinationAccountId?: string; /** - * @member {string} [destinationType] The destination type. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The destination type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly destinationType?: string; /** - * @member {string} [isUserEnabled] This will be 'true' if the Continuous - * Export configuration is enabled, otherwise it will be 'false'. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * This will be 'true' if the Continuous Export configuration is enabled, otherwise it will be + * 'false'. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly isUserEnabled?: string; /** - * @member {string} [lastUserUpdate] Last time the Continuous Export - * configuration was updated. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Last time the Continuous Export configuration was updated. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly lastUserUpdate?: string; /** - * @member {string} [notificationQueueEnabled] Deprecated + * Deprecated */ notificationQueueEnabled?: string; /** - * @member {string} [exportStatus] This indicates current Continuous Export - * configuration status. The possible values are 'Preparing', 'Success', - * 'Failure'. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * This indicates current Continuous Export configuration status. The possible values are + * 'Preparing', 'Success', 'Failure'. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly exportStatus?: string; /** - * @member {string} [lastSuccessTime] The last time data was successfully - * delivered to the destination storage container for this Continuous Export - * configuration. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The last time data was successfully delivered to the destination storage container for this + * Continuous Export configuration. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly lastSuccessTime?: string; /** - * @member {string} [lastGapTime] The last time the Continuous Export - * configuration started failing. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The last time the Continuous Export configuration started failing. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly lastGapTime?: string; /** - * @member {string} [permanentErrorReason] This is the reason the Continuous - * Export configuration started failing. It can be 'AzureStorageNotFound' or - * 'AzureStorageAccessDenied'. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * This is the reason the Continuous Export configuration started failing. It can be + * 'AzureStorageNotFound' or 'AzureStorageAccessDenied'. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly permanentErrorReason?: string; /** - * @member {string} [storageName] The name of the destination storage - * account. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The name of the destination storage account. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly storageName?: string; /** - * @member {string} [containerName] The name of the destination storage - * container. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The name of the destination storage container. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly containerName?: string; } /** - * @interface - * An interface representing ApplicationInsightsComponentDataVolumeCap. - * An Application Insights component daily data volumne cap - * + * An Application Insights component daily data volume cap */ export interface ApplicationInsightsComponentDataVolumeCap { /** - * @member {number} [cap] Daily data volume cap in GB. + * Daily data volume cap in GB. */ cap?: number; /** - * @member {number} [resetTime] Daily data volume cap UTC reset hour. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Daily data volume cap UTC reset hour. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly resetTime?: number; /** - * @member {number} [warningThreshold] Reserved, not used for now. + * Reserved, not used for now. */ warningThreshold?: number; /** - * @member {boolean} [stopSendNotificationWhenHitThreshold] Reserved, not - * used for now. + * Reserved, not used for now. */ stopSendNotificationWhenHitThreshold?: boolean; /** - * @member {boolean} [stopSendNotificationWhenHitCap] Do not send a - * notification email when the daily data volume cap is met. + * Do not send a notification email when the daily data volume cap is met. */ stopSendNotificationWhenHitCap?: boolean; /** - * @member {number} [maxHistoryCap] Maximum daily data volume cap that the - * user can set for this component. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Maximum daily data volume cap that the user can set for this component. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly maxHistoryCap?: number; } /** - * @interface - * An interface representing ApplicationInsightsComponentBillingFeatures. * An Application Insights component billing features - * */ export interface ApplicationInsightsComponentBillingFeatures { /** - * @member {ApplicationInsightsComponentDataVolumeCap} [dataVolumeCap] An - * Application Insights component daily data volumne cap + * An Application Insights component daily data volume cap */ dataVolumeCap?: ApplicationInsightsComponentDataVolumeCap; /** - * @member {string[]} [currentBillingFeatures] Current enabled pricing plan. - * When the component is in the Enterprise plan, this will list both 'Basic' - * and 'Application Insights Enterprise'. + * Current enabled pricing plan. When the component is in the Enterprise plan, this will list + * both 'Basic' and 'Application Insights Enterprise'. */ currentBillingFeatures?: string[]; } /** - * @interface - * An interface representing ApplicationInsightsComponentQuotaStatus. * An Application Insights component daily data volume cap status - * */ export interface ApplicationInsightsComponentQuotaStatus { /** - * @member {string} [appId] The Application ID for the Application Insights - * component. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The Application ID for the Application Insights component. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly appId?: string; /** - * @member {boolean} [shouldBeThrottled] The daily data volume cap is met, - * and data ingestion will be stopped. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The daily data volume cap is met, and data ingestion will be stopped. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly shouldBeThrottled?: boolean; /** - * @member {string} [expirationTime] Date and time when the daily data volume - * cap will be reset, and data ingestion will resume. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Date and time when the daily data volume cap will be reset, and data ingestion will resume. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly expirationTime?: string; } /** - * @interface - * An interface representing ApplicationInsightsComponentFeatureCapabilities. * An Application Insights component feature capabilities - * */ export interface ApplicationInsightsComponentFeatureCapabilities { /** - * @member {boolean} [supportExportData] Whether allow to use continuous - * export feature. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Whether allow to use continuous export feature. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly supportExportData?: boolean; /** - * @member {string} [burstThrottlePolicy] Reserved, not used now. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Reserved, not used now. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly burstThrottlePolicy?: string; /** - * @member {string} [metadataClass] Reserved, not used now. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Reserved, not used now. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly metadataClass?: string; /** - * @member {boolean} [liveStreamMetrics] Reserved, not used now. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Reserved, not used now. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly liveStreamMetrics?: boolean; /** - * @member {boolean} [applicationMap] Reserved, not used now. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Reserved, not used now. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly applicationMap?: boolean; /** - * @member {boolean} [workItemIntegration] Whether allow to use work item - * integration feature. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Whether allow to use work item integration feature. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly workItemIntegration?: boolean; /** - * @member {boolean} [powerBIIntegration] Reserved, not used now. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Reserved, not used now. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly powerBIIntegration?: boolean; /** - * @member {boolean} [openSchema] Reserved, not used now. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Reserved, not used now. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly openSchema?: boolean; /** - * @member {boolean} [proactiveDetection] Reserved, not used now. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Reserved, not used now. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly proactiveDetection?: boolean; /** - * @member {boolean} [analyticsIntegration] Reserved, not used now. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Reserved, not used now. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly analyticsIntegration?: boolean; /** - * @member {boolean} [multipleStepWebTest] Whether allow to use multiple - * steps web test feature. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Whether allow to use multiple steps web test feature. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly multipleStepWebTest?: boolean; /** - * @member {string} [apiAccessLevel] Reserved, not used now. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Reserved, not used now. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly apiAccessLevel?: string; /** - * @member {string} [trackingType] The applciation insights component used - * tracking type. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The application insights component used tracking type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly trackingType?: string; /** - * @member {number} [dailyCap] Daily data volume cap in GB. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Daily data volume cap in GB. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly dailyCap?: number; /** - * @member {number} [dailyCapResetTime] Daily data volume cap UTC reset hour. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Daily data volume cap UTC reset hour. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly dailyCapResetTime?: number; /** - * @member {number} [throttleRate] Reserved, not used now. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Reserved, not used now. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly throttleRate?: number; } /** - * @interface - * An interface representing ApplicationInsightsComponentFeatureCapability. * An Application Insights component feature capability - * */ export interface ApplicationInsightsComponentFeatureCapability { /** - * @member {string} [name] The name of the capability. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The name of the capability. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; /** - * @member {string} [description] The description of the capability. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The description of the capability. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly description?: string; /** - * @member {string} [value] The vaule of the capability. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The value of the capability. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly value?: string; /** - * @member {string} [unit] The unit of the capability. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The unit of the capability. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly unit?: string; /** - * @member {string} [meterId] The meter used for the capability. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The meter used for the capability. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly meterId?: string; /** - * @member {string} [meterRateFrequency] The meter rate of the meter. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The meter rate of the meter. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly meterRateFrequency?: string; } /** - * @interface - * An interface representing ApplicationInsightsComponentFeature. * An Application Insights component daily data volume cap status - * */ export interface ApplicationInsightsComponentFeature { /** - * @member {string} [featureName] The pricing feature name. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The pricing feature name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly featureName?: string; /** - * @member {string} [meterId] The meter id used for the feature. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The meter id used for the feature. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly meterId?: string; /** - * @member {string} [meterRateFrequency] The meter meter rate for the - * feature's meter. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The meter rate for the feature's meter. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly meterRateFrequency?: string; /** - * @member {string} [resouceId] Reserved, not used now. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Reserved, not used now. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly resouceId?: string; /** - * @member {boolean} [isHidden] Reserved, not used now. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Reserved, not used now. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly isHidden?: boolean; /** - * @member {ApplicationInsightsComponentFeatureCapability[]} [capabilities] A - * list of Application Insigths component feature capability. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * A list of Application Insights component feature capability. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly capabilities?: ApplicationInsightsComponentFeatureCapability[]; /** - * @member {string} [title] Desplay name of the feature. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Display name of the feature. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly title?: string; /** - * @member {boolean} [isMainFeature] Whether can apply addon feature on to - * it. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Whether can apply addon feature on to it. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly isMainFeature?: boolean; /** - * @member {string} [supportedAddonFeatures] The add on features on main - * feature. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The add on features on main feature. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly supportedAddonFeatures?: string; } /** - * @interface - * An interface representing ApplicationInsightsComponentAvailableFeatures. * An Application Insights component available features. - * */ export interface ApplicationInsightsComponentAvailableFeatures { /** - * @member {ApplicationInsightsComponentFeature[]} [result] A list of - * Application Insigths component feature. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * A list of Application Insights component feature. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly result?: ApplicationInsightsComponentFeature[]; } /** - * @interface - * An interface representing ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions. - * Static definitions of the ProactiveDetection configuration rule (same values - * for all components). - * + * Static definitions of the ProactiveDetection configuration rule (same values for all + * components). */ export interface ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions { /** - * @member {string} [name] The rule name + * The rule name */ name?: string; /** - * @member {string} [displayName] The rule name as it is displayed in UI + * The rule name as it is displayed in UI */ displayName?: string; /** - * @member {string} [description] The rule description + * The rule description */ description?: string; /** - * @member {string} [helpUrl] URL which displays aditional info about the - * proactive detection rule + * URL which displays additional info about the proactive detection rule */ helpUrl?: string; /** - * @member {boolean} [isHidden] A flag indicating whether the rule is hidden - * (from the UI) + * A flag indicating whether the rule is hidden (from the UI) */ isHidden?: boolean; /** - * @member {boolean} [isEnabledByDefault] A flag indicating whether the rule - * is enabled by default + * A flag indicating whether the rule is enabled by default */ isEnabledByDefault?: boolean; /** - * @member {boolean} [isInPreview] A flag indicating whether the rule is in - * preview + * A flag indicating whether the rule is in preview */ isInPreview?: boolean; /** - * @member {boolean} [supportsEmailNotifications] A flag indicating whether - * email notifications are supported for detections for this rule + * A flag indicating whether email notifications are supported for detections for this rule */ supportsEmailNotifications?: boolean; } /** - * @interface - * An interface representing ApplicationInsightsComponentProactiveDetectionConfiguration. * Properties that define a ProactiveDetection configuration. - * - * @extends BaseResource */ export interface ApplicationInsightsComponentProactiveDetectionConfiguration extends BaseResource { /** - * @member {string} [name] The rule name + * The rule name */ name?: string; /** - * @member {boolean} [enabled] A flag that indicates whether this rule is - * enabled by the user + * A flag that indicates whether this rule is enabled by the user */ enabled?: boolean; /** - * @member {boolean} [sendEmailsToSubscriptionOwners] A flag that indicated - * whether notifications on this rule should be sent to subscription owners + * A flag that indicated whether notifications on this rule should be sent to subscription owners */ sendEmailsToSubscriptionOwners?: boolean; /** - * @member {string[]} [customEmails] Custom email addresses for this rule - * notifications + * Custom email addresses for this rule notifications */ customEmails?: string[]; /** - * @member {string} [lastUpdatedTime] The last time this rule was updated + * The last time this rule was updated */ lastUpdatedTime?: string; /** - * @member - * {ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions} - * [ruleDefinitions] Static definitions of the ProactiveDetection - * configuration rule (same values for all components). + * Static definitions of the ProactiveDetection configuration rule (same values for all + * components). */ ruleDefinitions?: ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions; } /** - * @interface - * An interface representing ComponentsResource. - * An azure resource object - * - * @extends BaseResource - */ -export interface ComponentsResource extends BaseResource { - /** - * @member {string} [id] Azure resource Id - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly id?: string; - /** - * @member {string} [name] Azure resource name - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly name?: string; - /** - * @member {string} [type] Azure resource type - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly type?: string; - /** - * @member {string} location Resource location - */ - location: string; - /** - * @member {{ [propertyName: string]: string }} [tags] Resource tags - */ - tags?: { [propertyName: string]: string }; -} - -/** - * @interface - * An interface representing TagsResource. - * A container holding only the Tags for a resource, allowing the user to - * update the tags on a WebTest instance. - * - */ -export interface TagsResource { - /** - * @member {{ [propertyName: string]: string }} [tags] Resource tags - */ - tags?: { [propertyName: string]: string }; -} - -/** - * @interface - * An interface representing ApplicationInsightsComponent. - * An Application Insights component definition. - * - * @extends ComponentsResource - */ -export interface ApplicationInsightsComponent extends ComponentsResource { - /** - * @member {string} kind The kind of application that this component refers - * to, used to customize UI. This value is a freeform string, values should - * typically be one of the following: web, ios, other, store, java, phone. - */ - kind: string; - /** - * @member {string} [applicationId] The unique ID of your application. This - * field mirrors the 'Name' field and cannot be changed. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly applicationId?: string; - /** - * @member {string} [appId] Application Insights Unique ID for your - * Application. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly appId?: string; - /** - * @member {ApplicationType} applicationType Type of application being - * monitored. Possible values include: 'web', 'other'. Default value: 'web' . - */ - applicationType: ApplicationType; - /** - * @member {FlowType} [flowType] Used by the Application Insights system to - * determine what kind of flow this component was created by. This is to be - * set to 'Bluefield' when creating/updating a component via the REST API. - * Possible values include: 'Bluefield'. Default value: 'Bluefield' . - */ - flowType?: FlowType; - /** - * @member {RequestSource} [requestSource] Describes what tool created this - * Application Insights component. Customers using this API should set this - * to the default 'rest'. Possible values include: 'rest'. Default value: - * 'rest' . - */ - requestSource?: RequestSource; - /** - * @member {string} [instrumentationKey] Application Insights Instrumentation - * key. A read-only value that applications can use to identify the - * destination for all telemetry sent to Azure Application Insights. This - * value will be supplied upon construction of each new Application Insights - * component. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly instrumentationKey?: string; - /** - * @member {Date} [creationDate] Creation Date for the Application Insights - * component, in ISO 8601 format. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly creationDate?: Date; - /** - * @member {string} [tenantId] Azure Tenant Id. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly tenantId?: string; - /** - * @member {string} [hockeyAppId] The unique application ID created when a - * new application is added to HockeyApp, used for communications with - * HockeyApp. - */ - hockeyAppId?: string; - /** - * @member {string} [hockeyAppToken] Token used to authenticate - * communications with between Application Insights and HockeyApp. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly hockeyAppToken?: string; - /** - * @member {string} [provisioningState] Current state of this component: - * whether or not is has been provisioned within the resource group it is - * defined. Users cannot change this value but are able to read from it. - * Values will include Succeeded, Deploying, Canceled, and Failed. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly provisioningState?: string; - /** - * @member {number} [samplingPercentage] Percentage of the data produced by - * the application being monitored that is being sampled for Application - * Insights telemetry. - */ - samplingPercentage?: number; -} - -/** - * @interface - * An interface representing ComponentPurgeBodyFilters. - * User-defined filters to return data which will be purged from the table. - * - */ -export interface ComponentPurgeBodyFilters { - /** - * @member {string} [column] The column of the table over which the given - * query should run - */ - column?: string; - /** - * @member {string} [operator] A query operator to evaluate over the provided - * column and value(s). - */ - operator?: string; - /** - * @member {any} [value] the value for the operator to function over. This - * can be a number (e.g., > 100), a string (timestamp >= '2017-09-01') or - * array of values. - */ - value?: any; - /** - * @member {string} [key] When filtering over custom dimensions, this key - * will be used as the name of the custom dimension. - */ - key?: string; -} - -/** - * @interface - * An interface representing ComponentPurgeBody. - * Describes the body of a purge request for an App Insights component - * - */ -export interface ComponentPurgeBody { - /** - * @member {string} table Table from which to purge data. - */ - table: string; - /** - * @member {ComponentPurgeBodyFilters[]} filters The set of columns and - * filters (queries) to run over them to purge the resulting data. - */ - filters: ComponentPurgeBodyFilters[]; -} - -/** - * @interface - * An interface representing ComponentPurgeResponse. - * Response containing operationId for a specific purge action. - * - */ -export interface ComponentPurgeResponse { - /** - * @member {string} operationId Id to use when querying for status for a - * particular purge operation. - */ - operationId: string; -} - -/** - * @interface - * An interface representing ComponentPurgeStatusResponse. - * Response containing status for a specific purge operation. - * - */ -export interface ComponentPurgeStatusResponse { - /** - * @member {PurgeState} status Status of the operation represented by the - * requested Id. Possible values include: 'pending', 'completed' - */ - status: PurgeState; -} - -/** - * @interface - * An interface representing WorkItemConfiguration. * Work item configuration associated with an application insights resource. - * */ export interface WorkItemConfiguration { /** - * @member {string} [connectorId] Connector identifier where work item is - * created + * Connector identifier where work item is created */ connectorId?: string; /** - * @member {string} [configDisplayName] Configuration friendly name + * Configuration friendly name */ configDisplayName?: string; /** - * @member {boolean} [isDefault] Boolean value indicating whether - * configuration is default + * Boolean value indicating whether configuration is default */ isDefault?: boolean; /** - * @member {string} [id] Unique Id for work item + * Unique Id for work item */ id?: string; /** - * @member {string} [configProperties] Serialized JSON object for detailed - * properties + * Serialized JSON object for detailed properties */ configProperties?: string; } /** - * @interface - * An interface representing WorkItemCreateConfiguration. * Work item configuration creation payload - * */ export interface WorkItemCreateConfiguration { /** - * @member {string} [connectorId] Unique connector id + * Unique connector id */ connectorId?: string; /** - * @member {string} [connectorDataConfiguration] Serialized JSON object for - * detaile d properties + * Serialized JSON object for detailed properties */ connectorDataConfiguration?: string; /** - * @member {boolean} [validateOnly] Boolean indicating validate only + * Boolean indicating validate only */ validateOnly?: boolean; /** - * @member {string} [workItemProperties] Custom work item properties + * Custom work item properties */ - workItemProperties?: string; + workItemProperties?: { [propertyName: string]: string }; } /** - * @interface - * An interface representing WorkItemConfigurationError. - * Error associated with trying to get work item configuration or - * configurations - * + * Error associated with trying to get work item configuration or configurations */ export interface WorkItemConfigurationError { /** - * @member {string} [code] Error detail code and explanation + * Error detail code and explanation */ code?: string; /** - * @member {string} [message] Error message + * Error message */ message?: string; - /** - * @member {InnerError} [innererror] - */ innererror?: InnerError; } /** - * @interface - * An interface representing ApplicationInsightsComponentFavorite. - * Properties that define a favorite that is associated to an Application - * Insights component. - * + * Properties that define a favorite that is associated to an Application Insights component. */ export interface ApplicationInsightsComponentFavorite { /** - * @member {string} [name] The user-defined name of the favorite. + * The user-defined name of the favorite. */ name?: string; /** - * @member {string} [config] Configuration of this particular favorite, which - * are driven by the Azure portal UX. Configuration data is a string - * containing valid JSON + * Configuration of this particular favorite, which are driven by the Azure portal UX. + * Configuration data is a string containing valid JSON */ config?: string; /** - * @member {string} [version] This instance's version of the data model. This - * can change as new features are added that can be marked favorite. Current - * examples include MetricsExplorer (ME) and Search. + * This instance's version of the data model. This can change as new features are added that can + * be marked favorite. Current examples include MetricsExplorer (ME) and Search. */ version?: string; /** - * @member {string} [favoriteId] Internally assigned unique id of the - * favorite definition. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Internally assigned unique id of the favorite definition. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly favoriteId?: string; /** - * @member {FavoriteType} [favoriteType] Enum indicating if this favorite - * definition is owned by a specific user or is shared between all users with - * access to the Application Insights component. Possible values include: + * Enum indicating if this favorite definition is owned by a specific user or is shared between + * all users with access to the Application Insights component. Possible values include: * 'shared', 'user' */ favoriteType?: FavoriteType; /** - * @member {string} [sourceType] The source of the favorite definition. + * The source of the favorite definition. */ sourceType?: string; /** - * @member {string} [timeModified] Date and time in UTC of the last - * modification that was made to this favorite definition. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Date and time in UTC of the last modification that was made to this favorite definition. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly timeModified?: string; /** - * @member {string[]} [tags] A list of 0 or more tags that are associated - * with this favorite definition + * A list of 0 or more tags that are associated with this favorite definition */ tags?: string[]; /** - * @member {string} [category] Favorite category, as defined by the user at - * creation time. + * Favorite category, as defined by the user at creation time. */ category?: string; /** - * @member {boolean} [isGeneratedFromTemplate] Flag denoting wether or not - * this favorite was generated from a template. + * Flag denoting wether or not this favorite was generated from a template. */ isGeneratedFromTemplate?: boolean; /** - * @member {string} [userId] Unique user id of the specific user that owns - * this favorite. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Unique user id of the specific user that owns this favorite. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly userId?: string; } /** - * @interface - * An interface representing ApplicationInsightsComponentWebTestLocation. - * Properties that define a web test location available to an Application - * Insights Component. - * + * Properties that define a web test location available to an Application Insights Component. */ export interface ApplicationInsightsComponentWebTestLocation { /** - * @member {string} [displayName] The display name of the web test location. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The display name of the web test location. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly displayName?: string; /** - * @member {string} [tag] Internally defined geographic location tag. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Internally defined geographic location tag. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly tag?: string; } /** - * @interface - * An interface representing WebtestsResource. * An azure resource object - * - * @extends BaseResource */ export interface WebtestsResource extends BaseResource { /** - * @member {string} [id] Azure resource Id - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Azure resource Id + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; /** - * @member {string} [name] Azure resource name - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Azure resource name + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; /** - * @member {string} [type] Azure resource type - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Azure resource type + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly type?: string; /** - * @member {string} location Resource location + * Resource location */ location: string; /** - * @member {{ [propertyName: string]: string }} [tags] Resource tags + * Resource tags */ tags?: { [propertyName: string]: string }; } /** - * @interface - * An interface representing WebTestGeolocation. - * Geo-physical location to run a web test from. You must specify one or more - * locations for the test to run from. - * + * A container holding only the Tags for a resource, allowing the user to update the tags on a + * WebTest instance. + */ +export interface TagsResource { + /** + * Resource tags + */ + tags?: { [propertyName: string]: string }; +} + +/** + * Geo-physical location to run a web test from. You must specify one or more locations for the + * test to run from. */ export interface WebTestGeolocation { /** - * @member {string} [location] Location ID for the webtest to run from. + * Location ID for the webtest to run from. */ location?: string; } /** - * @interface - * An interface representing WebTestPropertiesConfiguration. * An XML configuration specification for a WebTest. - * */ export interface WebTestPropertiesConfiguration { /** - * @member {string} [webTest] The XML specification of a WebTest to run - * against an application. + * The XML specification of a WebTest to run against an application. */ webTest?: string; } /** - * @interface - * An interface representing WebTest. * An Application Insights web test definition. - * - * @extends WebtestsResource */ export interface WebTest extends WebtestsResource { /** - * @member {WebTestKind} [kind] The kind of web test that this web test - * watches. Choices are ping and multistep. Possible values include: 'ping', - * 'multistep'. Default value: 'ping' . + * The kind of web test that this web test watches. Choices are ping and multistep. Possible + * values include: 'ping', 'multistep'. Default value: 'ping'. */ kind?: WebTestKind; /** - * @member {string} syntheticMonitorId Unique ID of this WebTest. This is - * typically the same value as the Name field. + * Unique ID of this WebTest. This is typically the same value as the Name field. */ syntheticMonitorId: string; /** - * @member {string} webTestName User defined name if this WebTest. + * User defined name if this WebTest. */ webTestName: string; /** - * @member {string} [description] Purpose/user defined descriptive test for - * this WebTest. + * Purpose/user defined descriptive test for this WebTest. */ description?: string; /** - * @member {boolean} [enabled] Is the test actively being monitored. + * Is the test actively being monitored. */ enabled?: boolean; /** - * @member {number} [frequency] Interval in seconds between test runs for - * this WebTest. Default value is 300. Default value: 300 . + * Interval in seconds between test runs for this WebTest. Default value is 300. Default value: + * 300. */ frequency?: number; /** - * @member {number} [timeout] Seconds until this WebTest will timeout and - * fail. Default value is 30. Default value: 30 . + * Seconds until this WebTest will timeout and fail. Default value is 30. Default value: 30. */ timeout?: number; /** - * @member {WebTestKind} webTestKind The kind of web test this is, valid - * choices are ping and multistep. Possible values include: 'ping', - * 'multistep'. Default value: 'ping' . + * The kind of web test this is, valid choices are ping and multistep. Possible values include: + * 'ping', 'multistep'. Default value: 'ping'. */ webTestKind: WebTestKind; /** - * @member {boolean} [retryEnabled] Allow for retries should this WebTest - * fail. + * Allow for retries should this WebTest fail. */ retryEnabled?: boolean; /** - * @member {WebTestGeolocation[]} locations A list of where to physically run - * the tests from to give global coverage for accessibility of your - * application. + * A list of where to physically run the tests from to give global coverage for accessibility of + * your application. */ locations: WebTestGeolocation[]; /** - * @member {WebTestPropertiesConfiguration} [configuration] An XML - * configuration specification for a WebTest. + * An XML configuration specification for a WebTest. */ configuration?: WebTestPropertiesConfiguration; /** - * @member {string} [provisioningState] Current state of this component, - * whether or not is has been provisioned within the resource group it is - * defined. Users cannot change this value but are able to read from it. - * Values will include Succeeded, Deploying, Canceled, and Failed. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Current state of this component, whether or not is has been provisioned within the resource + * group it is defined. Users cannot change this value but are able to read from it. Values will + * include Succeeded, Deploying, Canceled, and Failed. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly provisioningState?: string; } /** - * @interface - * An interface representing ApplicationInsightsComponentAnalyticsItemProperties. - * A set of properties that can be defined in the context of a specific item - * type. Each type may have its own properties. - * + * A set of properties that can be defined in the context of a specific item type. Each type may + * have its own properties. */ export interface ApplicationInsightsComponentAnalyticsItemProperties { /** - * @member {string} [functionAlias] A function alias, used when the type of - * the item is Function + * A function alias, used when the type of the item is Function */ functionAlias?: string; } /** - * @interface - * An interface representing ApplicationInsightsComponentAnalyticsItem. - * Properties that define an Analytics item that is associated to an - * Application Insights component. - * + * Properties that define an Analytics item that is associated to an Application Insights + * component. */ export interface ApplicationInsightsComponentAnalyticsItem { /** - * @member {string} [id] Internally assigned unique id of the item - * definition. + * Internally assigned unique id of the item definition. */ id?: string; /** - * @member {string} [name] The user-defined name of the item. + * The user-defined name of the item. */ name?: string; /** - * @member {string} [content] The content of this item + * The content of this item */ content?: string; /** - * @member {string} [version] This instance's version of the data model. This - * can change as new features are added. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * This instance's version of the data model. This can change as new features are added. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly version?: string; /** - * @member {ItemScope} [scope] Enum indicating if this item definition is - * owned by a specific user or is shared between all users with access to the - * Application Insights component. Possible values include: 'shared', 'user' + * Enum indicating if this item definition is owned by a specific user or is shared between all + * users with access to the Application Insights component. Possible values include: 'shared', + * 'user' */ scope?: ItemScope; /** - * @member {ItemType} [type] Enum indicating the type of the Analytics item. - * Possible values include: 'query', 'function', 'folder', 'recent' + * Enum indicating the type of the Analytics item. Possible values include: 'query', 'function', + * 'folder', 'recent' */ type?: ItemType; /** - * @member {string} [timeCreated] Date and time in UTC when this item was - * created. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Date and time in UTC when this item was created. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly timeCreated?: string; /** - * @member {string} [timeModified] Date and time in UTC of the last - * modification that was made to this item. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Date and time in UTC of the last modification that was made to this item. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly timeModified?: string; - /** - * @member {ApplicationInsightsComponentAnalyticsItemProperties} [properties] - */ properties?: ApplicationInsightsComponentAnalyticsItemProperties; } /** - * @interface - * An interface representing WorkbookResource. * An azure resource object - * - * @extends BaseResource */ export interface WorkbookResource extends BaseResource { /** - * @member {string} [id] Azure resource Id - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Azure resource Id + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; /** - * @member {string} [name] Azure resource name - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Azure resource name + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; /** - * @member {string} [type] Azure resource type - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Azure resource type + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly type?: string; /** - * @member {string} [location] Resource location + * Resource location */ location?: string; /** - * @member {{ [propertyName: string]: string }} [tags] Resource tags + * Resource tags */ tags?: { [propertyName: string]: string }; } /** - * @interface - * An interface representing Workbook. * An Application Insights workbook definition. - * - * @extends WorkbookResource */ export interface Workbook extends WorkbookResource { /** - * @member {SharedTypeKind} [kind] The kind of workbook. Choices are user and - * shared. Possible values include: 'user', 'shared' + * The kind of workbook. Choices are user and shared. Possible values include: 'user', 'shared' */ kind?: SharedTypeKind; /** - * @member {string} workbookName The user-defined name of the workbook. + * The user-defined name of the workbook. */ workbookName: string; /** - * @member {string} serializedData Configuration of this particular workbook. - * Configuration data is a string containing valid JSON + * Configuration of this particular workbook. Configuration data is a string containing valid + * JSON */ serializedData: string; /** - * @member {string} [version] This instance's version of the data model. This - * can change as new features are added that can be marked workbook. + * This instance's version of the data model. This can change as new features are added that can + * be marked workbook. */ version?: string; /** - * @member {string} workbookId Internally assigned unique id of the workbook - * definition. + * Internally assigned unique id of the workbook definition. */ workbookId: string; /** - * @member {SharedTypeKind} sharedTypeKind Enum indicating if this workbook - * definition is owned by a specific user or is shared between all users with - * access to the Application Insights component. Possible values include: - * 'user', 'shared'. Default value: 'shared' . + * Enum indicating if this workbook definition is owned by a specific user or is shared between + * all users with access to the Application Insights component. Possible values include: 'user', + * 'shared'. Default value: 'shared'. */ sharedTypeKind: SharedTypeKind; /** - * @member {string} [timeModified] Date and time in UTC of the last - * modification that was made to this workbook definition. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Date and time in UTC of the last modification that was made to this workbook definition. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly timeModified?: string; /** - * @member {string} category Workbook category, as defined by the user at - * creation time. + * Workbook category, as defined by the user at creation time. */ category: string; /** - * @member {string[]} [workbookTags] A list of 0 or more tags that are - * associated with this workbook definition + * A list of 0 or more tags that are associated with this workbook definition */ workbookTags?: string[]; /** - * @member {string} userId Unique user id of the specific user that owns this - * workbook. + * Unique user id of the specific user that owns this workbook. */ userId: string; /** - * @member {string} [sourceResourceId] Optional resourceId for a source - * resource. + * Optional resourceId for a source resource. */ sourceResourceId?: string; } /** - * @interface - * An interface representing LinkProperties. * Contains a sourceId and workbook resource id to link two resources. - * */ export interface LinkProperties { /** - * @member {string} [sourceId] The source Azure resource id + * The source Azure resource id */ sourceId?: string; /** - * @member {string} [targetId] The workbook Azure resource id + * The workbook Azure resource id */ targetId?: string; /** - * @member {string} [category] The category of workbook + * The category of workbook */ category?: string; } /** - * @interface - * An interface representing ErrorFieldContract. * Error Field contract. - * */ export interface ErrorFieldContract { /** - * @member {string} [code] Property level error code. + * Property level error code. */ code?: string; /** - * @member {string} [message] Human-readable representation of property-level - * error. + * Human-readable representation of property-level error. */ message?: string; /** - * @member {string} [target] Property name. + * Property name. */ target?: string; } /** - * @interface - * An interface representing WorkbookError. * Error message body that will indicate why the operation failed. - * */ export interface WorkbookError { /** - * @member {string} [code] Service-defined error code. This code serves as a - * sub-status for the HTTP error code specified in the response. + * Service-defined error code. This code serves as a sub-status for the HTTP error code specified + * in the response. */ code?: string; /** - * @member {string} [message] Human-readable representation of the error. + * Human-readable representation of the error. */ message?: string; /** - * @member {ErrorFieldContract[]} [details] The list of invalid fields send - * in request, in case of validation error. + * The list of invalid fields send in request, in case of validation error. */ details?: ErrorFieldContract[]; } /** - * @interface - * An interface representing FavoritesListOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * An azure resource object */ -export interface FavoritesListOptionalParams extends msRest.RequestOptionsBase { +export interface MyWorkbookResource extends BaseResource { /** - * @member {FavoriteType} [favoriteType] The type of favorite. Value can be - * either shared or user. Possible values include: 'shared', 'user'. Default - * value: 'shared' . + * Azure resource Id */ - favoriteType?: FavoriteType; + id?: string; /** - * @member {FavoriteSourceType} [sourceType] Source type of favorite to - * return. When left out, the source type defaults to 'other' (not present in - * this enum). Possible values include: 'retention', 'notebook', 'sessions', - * 'events', 'userflows', 'funnel', 'impact', 'segmentation' + * Azure resource name */ - sourceType?: FavoriteSourceType; + name?: string; /** - * @member {boolean} [canFetchContent] Flag indicating whether or not to - * return the full content for each applicable favorite. If false, only - * return summary content for favorites. + * Azure resource type */ - canFetchContent?: boolean; + type?: string; /** - * @member {string[]} [tags] Tags that must be present on each favorite - * returned. + * Resource location */ - tags?: string[]; + location?: string; + /** + * Resource tags + */ + tags?: { [propertyName: string]: string }; } /** - * @interface - * An interface representing AnalyticsItemsListOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * An Application Insights private workbook definition. */ -export interface AnalyticsItemsListOptionalParams extends msRest.RequestOptionsBase { +export interface MyWorkbook extends MyWorkbookResource { /** - * @member {ItemScope} [scope] Enum indicating if this item definition is - * owned by a specific user or is shared between all users with access to the - * Application Insights component. Possible values include: 'shared', 'user'. - * Default value: 'shared' . + * The kind of workbook. Choices are user and shared. Possible values include: 'user', 'shared' */ - scope?: ItemScope; + kind?: SharedTypeKind; /** - * @member {ItemTypeParameter} [type] Enum indicating the type of the - * Analytics item. Possible values include: 'none', 'query', 'function', - * 'folder', 'recent'. Default value: 'none' . + * The user-defined name of the private workbook. */ - type?: ItemTypeParameter; + displayName: string; /** - * @member {boolean} [includeContent] Flag indicating whether or not to - * return the content of each applicable item. If false, only return the item - * information. + * Configuration of this particular private workbook. Configuration data is a string containing + * valid JSON */ - includeContent?: boolean; -} - -/** - * @interface - * An interface representing AnalyticsItemsGetOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase - */ -export interface AnalyticsItemsGetOptionalParams extends msRest.RequestOptionsBase { + serializedData: string; + /** + * This instance's version of the data model. This can change as new features are added that can + * be marked private workbook. + */ + version?: string; + /** + * Date and time in UTC of the last modification that was made to this private workbook + * definition. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly timeModified?: string; + /** + * Workbook category, as defined by the user at creation time. + */ + category: string; + /** + * A list of 0 or more tags that are associated with this private workbook definition + */ + myWorkbookTags?: string[]; + /** + * Unique user id of the specific user that owns this private workbook. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly userId?: string; + /** + * Optional resourceId for a source resource. + */ + sourceId?: string; +} + +/** + * Error message body that will indicate why the operation failed. + */ +export interface MyWorkbookError { + /** + * Service-defined error code. This code serves as a sub-status for the HTTP error code specified + * in the response. + */ + code?: string; + /** + * Human-readable representation of the error. + */ + message?: string; + /** + * The list of invalid fields send in request, in case of validation error. + */ + details?: ErrorFieldContract[]; +} + +/** + * An azure resource object + */ +export interface ComponentsResource extends BaseResource { + /** + * Azure resource Id + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * Azure resource name + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * Azure resource type + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * Resource location + */ + location: string; + /** + * Resource tags + */ + tags?: { [propertyName: string]: string }; +} + +/** + * The private link scope resource reference. + */ +export interface PrivateLinkScopedResource { + /** + * The full resource Id of the private link scope resource. + */ + resourceId?: string; + /** + * The private link scope unique Identifier. + */ + scopeId?: string; +} + +/** + * An Application Insights component definition. + */ +export interface ApplicationInsightsComponent extends ComponentsResource { + /** + * The kind of application that this component refers to, used to customize UI. This value is a + * freeform string, values should typically be one of the following: web, ios, other, store, + * java, phone. + */ + kind: string; + /** + * The unique ID of your application. This field mirrors the 'Name' field and cannot be changed. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly applicationId?: string; + /** + * Application Insights Unique ID for your Application. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly appId?: string; + /** + * Type of application being monitored. Possible values include: 'web', 'other'. Default value: + * 'web'. + */ + applicationType: ApplicationType; + /** + * Used by the Application Insights system to determine what kind of flow this component was + * created by. This is to be set to 'Bluefield' when creating/updating a component via the REST + * API. Possible values include: 'Bluefield'. Default value: 'Bluefield'. + */ + flowType?: FlowType; + /** + * Describes what tool created this Application Insights component. Customers using this API + * should set this to the default 'rest'. Possible values include: 'rest'. Default value: 'rest'. + */ + requestSource?: RequestSource; + /** + * Application Insights Instrumentation key. A read-only value that applications can use to + * identify the destination for all telemetry sent to Azure Application Insights. This value will + * be supplied upon construction of each new Application Insights component. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly instrumentationKey?: string; + /** + * Creation Date for the Application Insights component, in ISO 8601 format. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly creationDate?: Date; + /** + * Azure Tenant Id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly tenantId?: string; + /** + * The unique application ID created when a new application is added to HockeyApp, used for + * communications with HockeyApp. + */ + hockeyAppId?: string; + /** + * Token used to authenticate communications with between Application Insights and HockeyApp. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly hockeyAppToken?: string; /** - * @member {string} [id] The Id of a specific item defined in the Application - * Insights component + * Current state of this component: whether or not is has been provisioned within the resource + * group it is defined. Users cannot change this value but are able to read from it. Values will + * include Succeeded, Deploying, Canceled, and Failed. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: string; + /** + * Percentage of the data produced by the application being monitored that is being sampled for + * Application Insights telemetry. + */ + samplingPercentage?: number; + /** + * Application Insights component connection string. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly connectionString?: string; + /** + * Retention period in days. Default value: 90. + */ + retentionInDays?: number; + /** + * Disable IP masking. + */ + disableIpMasking?: boolean; + /** + * Purge data immediately after 30 days. + */ + immediatePurgeDataOn30Days?: boolean; + /** + * List of linked private link scope resources. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly privateLinkScopedResources?: PrivateLinkScopedResource[]; + /** + * The network access type for accessing Application Insights ingestion. Possible values include: + * 'Enabled', 'Disabled'. Default value: 'Enabled'. + */ + publicNetworkAccessForIngestion?: PublicNetworkAccessType; + /** + * The network access type for accessing Application Insights query. Possible values include: + * 'Enabled', 'Disabled'. Default value: 'Enabled'. + */ + publicNetworkAccessForQuery?: PublicNetworkAccessType; + /** + * Indicates the flow of the ingestion. Possible values include: 'ApplicationInsights', + * 'ApplicationInsightsWithDiagnosticSettings', 'LogAnalytics'. Default value: + * 'ApplicationInsights'. + */ + ingestionMode?: IngestionMode; +} + +/** + * User-defined filters to return data which will be purged from the table. + */ +export interface ComponentPurgeBodyFilters { + /** + * The column of the table over which the given query should run + */ + column?: string; + /** + * A query operator to evaluate over the provided column and value(s). Supported operators are + * ==, =~, in, in~, >, >=, <, <=, between, and have the same behavior as they would in a KQL + * query. + */ + operator?: string; + /** + * the value for the operator to function over. This can be a number (e.g., > 100), a string + * (timestamp >= '2017-09-01') or array of values. + */ + value?: any; + /** + * When filtering over custom dimensions, this key will be used as the name of the custom + * dimension. + */ + key?: string; +} + +/** + * Describes the body of a purge request for an App Insights component + */ +export interface ComponentPurgeBody { + /** + * Table from which to purge data. + */ + table: string; + /** + * The set of columns and filters (queries) to run over them to purge the resulting data. + */ + filters: ComponentPurgeBodyFilters[]; +} + +/** + * Response containing operationId for a specific purge action. + */ +export interface ComponentPurgeResponse { + /** + * Id to use when querying for status for a particular purge operation. + */ + operationId: string; +} + +/** + * Response containing status for a specific purge operation. + */ +export interface ComponentPurgeStatusResponse { + /** + * Status of the operation represented by the requested Id. Possible values include: 'pending', + * 'completed' + */ + status: PurgeState; +} + +/** + * An interface representing Resource. + */ +export interface Resource extends BaseResource { + /** + * Fully qualified resource Id for the resource. Ex - + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * The name of the resource + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * The type of the resource. Ex- Microsoft.Compute/virtualMachines or + * Microsoft.Storage/storageAccounts. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; +} + +/** + * The resource model definition for a ARM proxy resource. It will have everything other than + * required location and tags + */ +export interface ProxyResource extends Resource { +} + +/** + * An Application Insights component linked storage accounts + */ +export interface ComponentLinkedStorageAccounts extends ProxyResource { + /** + * Linked storage account resource ID + */ + linkedStorageAccount?: string; +} + +/** + * An Application Insights component linked storage accounts patch + */ +export interface ComponentLinkedStorageAccountsPatch { + /** + * Linked storage account resource ID + */ + linkedStorageAccount?: string; +} + +/** + * The resource model definition for a ARM tracked top level resource + */ +export interface TrackedResource extends Resource { + /** + * Resource tags. + */ + tags?: { [propertyName: string]: string }; + /** + * The geo-location where the resource lives + */ + location: string; +} + +/** + * The resource model definition for a Azure Resource Manager resource with an etag. + */ +export interface AzureEntityResource extends Resource { + /** + * Resource Etag. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly etag?: string; +} + +/** + * The response to a live token query. + */ +export interface LiveTokenResponse { + /** + * JWT token for accessing live metrics stream data. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly liveToken?: string; +} + +/** + * Information about an operation + */ +export interface OperationInfo { + /** + * Name of the provider + */ + provider?: string; + /** + * Name of the resource type + */ + resource?: string; + /** + * Name of the operation + */ + operation?: string; + /** + * Description of the operation + */ + description?: string; +} + +/** + * Represents an operation returned by the GetOperations request + */ +export interface OperationLive { + /** + * Name of the operation + */ + name?: string; + /** + * Display name of the operation + */ + display?: OperationInfo; + /** + * Origin of the operation + */ + origin?: string; + /** + * Properties of the operation + */ + properties?: any; +} + +/** + * Optional Parameters. + */ +export interface FavoritesListOptionalParams extends msRest.RequestOptionsBase { + /** + * The type of favorite. Value can be either shared or user. Possible values include: 'shared', + * 'user'. Default value: 'shared'. + */ + favoriteType?: FavoriteType; + /** + * Source type of favorite to return. When left out, the source type defaults to 'other' (not + * present in this enum). Possible values include: 'retention', 'notebook', 'sessions', 'events', + * 'userflows', 'funnel', 'impact', 'segmentation' + */ + sourceType?: FavoriteSourceType; + /** + * Flag indicating whether or not to return the full content for each applicable favorite. If + * false, only return summary content for favorites. + */ + canFetchContent?: boolean; + /** + * Tags that must be present on each favorite returned. + */ + tags?: string[]; +} + +/** + * Optional Parameters. + */ +export interface AnalyticsItemsListOptionalParams extends msRest.RequestOptionsBase { + /** + * Enum indicating if this item definition is owned by a specific user or is shared between all + * users with access to the Application Insights component. Possible values include: 'shared', + * 'user'. Default value: 'shared'. + */ + scope?: ItemScope; + /** + * Enum indicating the type of the Analytics item. Possible values include: 'none', 'query', + * 'function', 'folder', 'recent'. Default value: 'none'. + */ + type?: ItemTypeParameter; + /** + * Flag indicating whether or not to return the content of each applicable item. If false, only + * return the item information. + */ + includeContent?: boolean; +} + +/** + * Optional Parameters. + */ +export interface AnalyticsItemsGetOptionalParams extends msRest.RequestOptionsBase { + /** + * The Id of a specific item defined in the Application Insights component */ id?: string; /** - * @member {string} [name] The name of a specific item defined in the - * Application Insights component + * The name of a specific item defined in the Application Insights component */ name?: string; } /** - * @interface - * An interface representing AnalyticsItemsPutOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ export interface AnalyticsItemsPutOptionalParams extends msRest.RequestOptionsBase { /** - * @member {boolean} [overrideItem] Flag indicating whether or not to force - * save an item. This allows overriding an item if it already exists. + * Flag indicating whether or not to force save an item. This allows overriding an item if it + * already exists. */ overrideItem?: boolean; } /** - * @interface - * An interface representing AnalyticsItemsDeleteMethodOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ export interface AnalyticsItemsDeleteMethodOptionalParams extends msRest.RequestOptionsBase { /** - * @member {string} [id] The Id of a specific item defined in the Application - * Insights component + * The Id of a specific item defined in the Application Insights component */ id?: string; /** - * @member {string} [name] The name of a specific item defined in the - * Application Insights component + * The name of a specific item defined in the Application Insights component */ name?: string; } /** - * @interface - * An interface representing WorkbooksListByResourceGroupOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ export interface WorkbooksListByResourceGroupOptionalParams extends msRest.RequestOptionsBase { /** - * @member {string[]} [tags] Tags presents on each workbook returned. + * Tags presents on each workbook returned. */ tags?: string[]; /** - * @member {boolean} [canFetchContent] Flag indicating whether or not to - * return the full content for each applicable workbook. If false, only - * return summary content for workbooks. + * Flag indicating whether or not to return the full content for each applicable workbook. If + * false, only return summary content for workbooks. */ canFetchContent?: boolean; } /** - * @interface - * An interface representing ApplicationInsightsManagementClientOptions. - * @extends AzureServiceClientOptions + * Optional Parameters. */ -export interface ApplicationInsightsManagementClientOptions extends AzureServiceClientOptions { +export interface MyWorkbooksListByResourceGroupOptionalParams extends msRest.RequestOptionsBase { /** - * @member {string} [baseUri] + * Tags presents on each workbook returned. */ - baseUri?: string; + tags?: string[]; + /** + * Flag indicating whether or not to return the full content for each applicable workbook. If + * false, only return summary content for workbooks. + */ + canFetchContent?: boolean; } +/** + * Optional Parameters. + */ +export interface MyWorkbooksListBySubscriptionOptionalParams extends msRest.RequestOptionsBase { + /** + * Tags presents on each workbook returned. + */ + tags?: string[]; + /** + * Flag indicating whether or not to return the full content for each applicable workbook. If + * false, only return summary content for workbooks. + */ + canFetchContent?: boolean; +} + +/** + * An interface representing ApplicationInsightsManagementClientOptions. + */ +export interface ApplicationInsightsManagementClientOptions extends AzureServiceClientOptions { + baseUri?: string; +} /** * @interface - * An interface representing the OperationListResult. - * Result of the request to list CDN operations. It contains a list of - * operations and a URL link to get the next set of results. - * + * Result of the request to list CDN operations. It contains a list of operations and a URL link to + * get the next set of results. * @extends Array */ export interface OperationListResult extends Array { /** - * @member {string} [nextLink] URL to get the next set of operation list - * results if there are any. + * URL to get the next set of operation list results if there are any. + */ + nextLink?: string; +} + +/** + * @interface + * Result of the List Operations operation + * @extends Array + */ +export interface OperationsListResult extends Array { + /** + * URL to get the next set of operation list results if there are any. */ nextLink?: string; } /** * @interface - * An interface representing the AnnotationsListResult. * Annotations list result. - * * @extends Array */ export interface AnnotationsListResult extends Array { @@ -1783,9 +1710,7 @@ export interface AnnotationsListResult extends Array { /** * @interface - * An interface representing the ApplicationInsightsComponentAPIKeyListResult. * Describes the list of API Keys of an Application Insights Component. - * * @extends Array */ export interface ApplicationInsightsComponentAPIKeyListResult extends Array { @@ -1793,25 +1718,7 @@ export interface ApplicationInsightsComponentAPIKeyListResult extends Array - */ -export interface ApplicationInsightsComponentListResult extends Array { - /** - * @member {string} [nextLink] The URI to get the next set of Application - * Insights component defintions if too many components where returned in the - * result set. - */ - nextLink?: string; -} - -/** - * @interface - * An interface representing the WorkItemConfigurationsListResult. * Work item configuration list result. - * * @extends Array */ export interface WorkItemConfigurationsListResult extends Array { @@ -1819,10 +1726,7 @@ export interface WorkItemConfigurationsListResult extends Array */ export interface ApplicationInsightsWebTestLocationsListResult extends Array { @@ -1830,101 +1734,134 @@ export interface ApplicationInsightsWebTestLocationsListResult extends Array */ export interface WebTestListResult extends Array { /** - * @member {string} [nextLink] The link to get the next part of the returned - * list of web tests, should the return set be too large for a single - * request. May be null. + * The link to get the next part of the returned list of web tests, should the return set be too + * large for a single request. May be null. */ nextLink?: string; } /** * @interface - * An interface representing the WorkbooksListResult. * Workbook list result. - * * @extends Array */ export interface WorkbooksListResult extends Array { } /** - * Defines values for ApplicationType. - * Possible values include: 'web', 'other' + * @interface + * Workbook list result. + * @extends Array + */ +export interface MyWorkbooksListResult extends Array { +} + +/** + * @interface + * Describes the list of Application Insights Resources. + * @extends Array + */ +export interface ApplicationInsightsComponentListResult extends Array { + /** + * The URI to get the next set of Application Insights component definitions if too many + * components where returned in the result set. + */ + nextLink?: string; +} + +/** + * Defines values for FavoriteType. + * Possible values include: 'shared', 'user' * @readonly * @enum {string} */ -export type ApplicationType = 'web' | 'other'; +export type FavoriteType = 'shared' | 'user'; /** - * Defines values for FlowType. - * Possible values include: 'Bluefield' + * Defines values for WebTestKind. + * Possible values include: 'ping', 'multistep' * @readonly * @enum {string} */ -export type FlowType = 'Bluefield'; +export type WebTestKind = 'ping' | 'multistep'; /** - * Defines values for RequestSource. - * Possible values include: 'rest' + * Defines values for ItemScope. + * Possible values include: 'shared', 'user' * @readonly * @enum {string} */ -export type RequestSource = 'rest'; +export type ItemScope = 'shared' | 'user'; /** - * Defines values for PurgeState. - * Possible values include: 'pending', 'completed' + * Defines values for ItemType. + * Possible values include: 'query', 'function', 'folder', 'recent' + * @readonly + * @enum {string} + */ +export type ItemType = 'query' | 'function' | 'folder' | 'recent'; + +/** + * Defines values for SharedTypeKind. + * Possible values include: 'user', 'shared' + * @readonly + * @enum {string} + */ +export type SharedTypeKind = 'user' | 'shared'; + +/** + * Defines values for ApplicationType. + * Possible values include: 'web', 'other' * @readonly * @enum {string} */ -export type PurgeState = 'pending' | 'completed'; +export type ApplicationType = 'web' | 'other'; /** - * Defines values for FavoriteType. - * Possible values include: 'shared', 'user' + * Defines values for FlowType. + * Possible values include: 'Bluefield' * @readonly * @enum {string} */ -export type FavoriteType = 'shared' | 'user'; +export type FlowType = 'Bluefield'; /** - * Defines values for WebTestKind. - * Possible values include: 'ping', 'multistep' + * Defines values for RequestSource. + * Possible values include: 'rest' * @readonly * @enum {string} */ -export type WebTestKind = 'ping' | 'multistep'; +export type RequestSource = 'rest'; /** - * Defines values for ItemScope. - * Possible values include: 'shared', 'user' + * Defines values for PublicNetworkAccessType. + * Possible values include: 'Enabled', 'Disabled' * @readonly * @enum {string} */ -export type ItemScope = 'shared' | 'user'; +export type PublicNetworkAccessType = 'Enabled' | 'Disabled'; /** - * Defines values for ItemType. - * Possible values include: 'query', 'function', 'folder', 'recent' + * Defines values for IngestionMode. + * Possible values include: 'ApplicationInsights', 'ApplicationInsightsWithDiagnosticSettings', + * 'LogAnalytics' * @readonly * @enum {string} */ -export type ItemType = 'query' | 'function' | 'folder' | 'recent'; +export type IngestionMode = 'ApplicationInsights' | 'ApplicationInsightsWithDiagnosticSettings' | 'LogAnalytics'; /** - * Defines values for SharedTypeKind. - * Possible values include: 'user', 'shared' + * Defines values for PurgeState. + * Possible values include: 'pending', 'completed' * @readonly * @enum {string} */ -export type SharedTypeKind = 'user' | 'shared'; +export type PurgeState = 'pending' | 'completed'; /** * Defines values for FavoriteSourceType. @@ -1971,6 +1908,7 @@ export type OperationsListResponse = OperationListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1978,6 +1916,26 @@ export type OperationsListResponse = OperationListResult & { }; }; +/** + * Contains response data for the list1 operation. + */ +export type OperationsList1Response = OperationsListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationsListResult; + }; +}; + /** * Contains response data for the listNext operation. */ @@ -1990,6 +1948,7 @@ export type OperationsListNextResponse = OperationListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1998,9 +1957,9 @@ export type OperationsListNextResponse = OperationListResult & { }; /** - * Contains response data for the list operation. + * Contains response data for the list1Next operation. */ -export type AnnotationsListResponse = AnnotationsListResult & { +export type OperationsList1NextResponse = OperationsListResult & { /** * The underlying HTTP response. */ @@ -2009,17 +1968,18 @@ export type AnnotationsListResponse = AnnotationsListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: AnnotationsListResult; + parsedBody: OperationsListResult; }; }; /** - * Contains response data for the create operation. + * Contains response data for the list operation. */ -export type AnnotationsCreateResponse = Array & { +export type AnnotationsListResponse = AnnotationsListResult & { /** * The underlying HTTP response. */ @@ -2028,21 +1988,18 @@ export type AnnotationsCreateResponse = Array & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: Annotation[]; + parsedBody: AnnotationsListResult; }; }; /** - * Contains response data for the deleteMethod operation. + * Contains response data for the create operation. */ -export type AnnotationsDeleteMethodResponse = { - /** - * The parsed response body. - */ - body: any; +export type AnnotationsCreateResponse = Array & { /** * The underlying HTTP response. */ @@ -2051,10 +2008,11 @@ export type AnnotationsDeleteMethodResponse = { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: any; + parsedBody: Annotation[]; }; }; @@ -2070,6 +2028,7 @@ export type AnnotationsGetResponse = Array & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2089,6 +2048,7 @@ export type APIKeysListResponse = ApplicationInsightsComponentAPIKeyListResult & * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2108,6 +2068,7 @@ export type APIKeysCreateResponse = ApplicationInsightsComponentAPIKey & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2127,6 +2088,7 @@ export type APIKeysDeleteMethodResponse = ApplicationInsightsComponentAPIKey & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2146,6 +2108,7 @@ export type APIKeysGetResponse = ApplicationInsightsComponentAPIKey & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2165,6 +2128,7 @@ export type ExportConfigurationsListResponse = Array & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ApplicationInsightsComponentProactiveDetectionConfiguration[]; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type ProactiveDetectionConfigurationsGetResponse = ApplicationInsightsComponentProactiveDetectionConfiguration & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ApplicationInsightsComponentProactiveDetectionConfiguration; + }; +}; + /** * Contains response data for the update operation. */ -export type ComponentCurrentBillingFeaturesUpdateResponse = ApplicationInsightsComponentBillingFeatures & { +export type ProactiveDetectionConfigurationsUpdateResponse = ApplicationInsightsComponentProactiveDetectionConfiguration & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ApplicationInsightsComponentProactiveDetectionConfiguration; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type WorkItemConfigurationsListResponse = WorkItemConfigurationsListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WorkItemConfigurationsListResult; + }; +}; + +/** + * Contains response data for the create operation. + */ +export type WorkItemConfigurationsCreateResponse = WorkItemConfiguration & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WorkItemConfiguration; + }; +}; + +/** + * Contains response data for the getDefault operation. + */ +export type WorkItemConfigurationsGetDefaultResponse = WorkItemConfiguration & { /** * The underlying HTTP response. */ @@ -2279,17 +2428,18 @@ export type ComponentCurrentBillingFeaturesUpdateResponse = ApplicationInsightsC * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: ApplicationInsightsComponentBillingFeatures; + parsedBody: WorkItemConfiguration; }; }; /** - * Contains response data for the get operation. + * Contains response data for the getItem operation. */ -export type ComponentQuotaStatusGetResponse = ApplicationInsightsComponentQuotaStatus & { +export type WorkItemConfigurationsGetItemResponse = WorkItemConfiguration & { /** * The underlying HTTP response. */ @@ -2298,17 +2448,18 @@ export type ComponentQuotaStatusGetResponse = ApplicationInsightsComponentQuotaS * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: ApplicationInsightsComponentQuotaStatus; + parsedBody: WorkItemConfiguration; }; }; /** - * Contains response data for the get operation. + * Contains response data for the updateItem operation. */ -export type ComponentFeatureCapabilitiesGetResponse = ApplicationInsightsComponentFeatureCapabilities & { +export type WorkItemConfigurationsUpdateItemResponse = WorkItemConfiguration & { /** * The underlying HTTP response. */ @@ -2317,17 +2468,18 @@ export type ComponentFeatureCapabilitiesGetResponse = ApplicationInsightsCompone * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: ApplicationInsightsComponentFeatureCapabilities; + parsedBody: WorkItemConfiguration; }; }; /** - * Contains response data for the get operation. + * Contains response data for the list operation. */ -export type ComponentAvailableFeaturesGetResponse = ApplicationInsightsComponentAvailableFeatures & { +export type FavoritesListResponse = Array & { /** * The underlying HTTP response. */ @@ -2336,17 +2488,18 @@ export type ComponentAvailableFeaturesGetResponse = ApplicationInsightsComponent * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: ApplicationInsightsComponentAvailableFeatures; + parsedBody: ApplicationInsightsComponentFavorite[]; }; }; /** - * Contains response data for the list operation. + * Contains response data for the get operation. */ -export type ProactiveDetectionConfigurationsListResponse = Array & { +export type FavoritesGetResponse = ApplicationInsightsComponentFavorite & { /** * The underlying HTTP response. */ @@ -2355,17 +2508,18 @@ export type ProactiveDetectionConfigurationsListResponse = Array & { /** * The underlying HTTP response. */ @@ -2602,17 +2768,18 @@ export type WorkItemConfigurationsCreateResponse = WorkItemConfiguration & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: WorkItemConfiguration; + parsedBody: ApplicationInsightsComponentAnalyticsItem[]; }; }; /** - * Contains response data for the getDefault operation. + * Contains response data for the get operation. */ -export type WorkItemConfigurationsGetDefaultResponse = WorkItemConfiguration & { +export type AnalyticsItemsGetResponse = ApplicationInsightsComponentAnalyticsItem & { /** * The underlying HTTP response. */ @@ -2621,21 +2788,18 @@ export type WorkItemConfigurationsGetDefaultResponse = WorkItemConfiguration & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: WorkItemConfiguration; + parsedBody: ApplicationInsightsComponentAnalyticsItem; }; }; /** - * Contains response data for the deleteMethod operation. + * Contains response data for the put operation. */ -export type WorkItemConfigurationsDeleteMethodResponse = { - /** - * The parsed response body. - */ - body: any; +export type AnalyticsItemsPutResponse = ApplicationInsightsComponentAnalyticsItem & { /** * The underlying HTTP response. */ @@ -2644,17 +2808,18 @@ export type WorkItemConfigurationsDeleteMethodResponse = { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: any; + parsedBody: ApplicationInsightsComponentAnalyticsItem; }; }; /** - * Contains response data for the list operation. + * Contains response data for the listByResourceGroup operation. */ -export type FavoritesListResponse = Array & { +export type WorkbooksListByResourceGroupResponse = WorkbooksListResult & { /** * The underlying HTTP response. */ @@ -2663,17 +2828,18 @@ export type FavoritesListResponse = Array * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: ApplicationInsightsComponentFavorite[]; + parsedBody: WorkbooksListResult; }; }; /** * Contains response data for the get operation. */ -export type FavoritesGetResponse = ApplicationInsightsComponentFavorite & { +export type WorkbooksGetResponse = Workbook & { /** * The underlying HTTP response. */ @@ -2682,17 +2848,18 @@ export type FavoritesGetResponse = ApplicationInsightsComponentFavorite & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: ApplicationInsightsComponentFavorite; + parsedBody: Workbook; }; }; /** - * Contains response data for the add operation. + * Contains response data for the createOrUpdate operation. */ -export type FavoritesAddResponse = ApplicationInsightsComponentFavorite & { +export type WorkbooksCreateOrUpdateResponse = Workbook & { /** * The underlying HTTP response. */ @@ -2701,17 +2868,18 @@ export type FavoritesAddResponse = ApplicationInsightsComponentFavorite & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: ApplicationInsightsComponentFavorite; + parsedBody: Workbook; }; }; /** * Contains response data for the update operation. */ -export type FavoritesUpdateResponse = ApplicationInsightsComponentFavorite & { +export type WorkbooksUpdateResponse = Workbook & { /** * The underlying HTTP response. */ @@ -2720,17 +2888,18 @@ export type FavoritesUpdateResponse = ApplicationInsightsComponentFavorite & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: ApplicationInsightsComponentFavorite; + parsedBody: Workbook; }; }; /** - * Contains response data for the list operation. + * Contains response data for the listByResourceGroup operation. */ -export type WebTestLocationsListResponse = ApplicationInsightsWebTestLocationsListResult & { +export type MyWorkbooksListByResourceGroupResponse = MyWorkbooksListResult & { /** * The underlying HTTP response. */ @@ -2739,17 +2908,18 @@ export type WebTestLocationsListResponse = ApplicationInsightsWebTestLocationsLi * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: ApplicationInsightsWebTestLocationsListResult; + parsedBody: MyWorkbooksListResult; }; }; /** - * Contains response data for the listByResourceGroup operation. + * Contains response data for the listBySubscription operation. */ -export type WebTestsListByResourceGroupResponse = WebTestListResult & { +export type MyWorkbooksListBySubscriptionResponse = MyWorkbooksListResult & { /** * The underlying HTTP response. */ @@ -2758,17 +2928,18 @@ export type WebTestsListByResourceGroupResponse = WebTestListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: WebTestListResult; + parsedBody: MyWorkbooksListResult; }; }; /** * Contains response data for the get operation. */ -export type WebTestsGetResponse = WebTest & { +export type MyWorkbooksGetResponse = MyWorkbook & { /** * The underlying HTTP response. */ @@ -2777,17 +2948,18 @@ export type WebTestsGetResponse = WebTest & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: WebTest; + parsedBody: MyWorkbook; }; }; /** * Contains response data for the createOrUpdate operation. */ -export type WebTestsCreateOrUpdateResponse = WebTest & { +export type MyWorkbooksCreateOrUpdateResponse = MyWorkbook & { /** * The underlying HTTP response. */ @@ -2796,17 +2968,18 @@ export type WebTestsCreateOrUpdateResponse = WebTest & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: WebTest; + parsedBody: MyWorkbook; }; }; /** - * Contains response data for the updateTags operation. + * Contains response data for the update operation. */ -export type WebTestsUpdateTagsResponse = WebTest & { +export type MyWorkbooksUpdateResponse = MyWorkbook & { /** * The underlying HTTP response. */ @@ -2815,17 +2988,18 @@ export type WebTestsUpdateTagsResponse = WebTest & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: WebTest; + parsedBody: MyWorkbook; }; }; /** * Contains response data for the list operation. */ -export type WebTestsListResponse = WebTestListResult & { +export type ComponentsListResponse = ApplicationInsightsComponentListResult & { /** * The underlying HTTP response. */ @@ -2834,17 +3008,18 @@ export type WebTestsListResponse = WebTestListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: WebTestListResult; + parsedBody: ApplicationInsightsComponentListResult; }; }; /** - * Contains response data for the listByComponent operation. + * Contains response data for the listByResourceGroup operation. */ -export type WebTestsListByComponentResponse = WebTestListResult & { +export type ComponentsListByResourceGroupResponse = ApplicationInsightsComponentListResult & { /** * The underlying HTTP response. */ @@ -2853,17 +3028,18 @@ export type WebTestsListByComponentResponse = WebTestListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: WebTestListResult; + parsedBody: ApplicationInsightsComponentListResult; }; }; /** - * Contains response data for the listByResourceGroupNext operation. + * Contains response data for the get operation. */ -export type WebTestsListByResourceGroupNextResponse = WebTestListResult & { +export type ComponentsGetResponse = ApplicationInsightsComponent & { /** * The underlying HTTP response. */ @@ -2872,17 +3048,18 @@ export type WebTestsListByResourceGroupNextResponse = WebTestListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: WebTestListResult; + parsedBody: ApplicationInsightsComponent; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the createOrUpdate operation. */ -export type WebTestsListNextResponse = WebTestListResult & { +export type ComponentsCreateOrUpdateResponse = ApplicationInsightsComponent & { /** * The underlying HTTP response. */ @@ -2891,17 +3068,18 @@ export type WebTestsListNextResponse = WebTestListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: WebTestListResult; + parsedBody: ApplicationInsightsComponent; }; }; /** - * Contains response data for the listByComponentNext operation. + * Contains response data for the updateTags operation. */ -export type WebTestsListByComponentNextResponse = WebTestListResult & { +export type ComponentsUpdateTagsResponse = ApplicationInsightsComponent & { /** * The underlying HTTP response. */ @@ -2910,17 +3088,18 @@ export type WebTestsListByComponentNextResponse = WebTestListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: WebTestListResult; + parsedBody: ApplicationInsightsComponent; }; }; /** - * Contains response data for the list operation. + * Contains response data for the purge operation. */ -export type AnalyticsItemsListResponse = Array & { +export type ComponentsPurgeResponse = ComponentPurgeResponse & { /** * The underlying HTTP response. */ @@ -2929,17 +3108,18 @@ export type AnalyticsItemsListResponse = Array */ list(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param callback The callback */ list(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param options The optional parameters * @param callback The callback @@ -60,7 +60,7 @@ export class APIKeys { /** * Create an API Key of an Application Insights component. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param aPIKeyProperties Properties that need to be specified to create an API key of a * Application Insights component. @@ -69,7 +69,7 @@ export class APIKeys { */ create(resourceGroupName: string, resourceName: string, aPIKeyProperties: Models.APIKeyRequest, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param aPIKeyProperties Properties that need to be specified to create an API key of a * Application Insights component. @@ -77,7 +77,7 @@ export class APIKeys { */ create(resourceGroupName: string, resourceName: string, aPIKeyProperties: Models.APIKeyRequest, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param aPIKeyProperties Properties that need to be specified to create an API key of a * Application Insights component. @@ -99,7 +99,7 @@ export class APIKeys { /** * Delete an API Key of an Application Insights component. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param keyId The API Key ID. This is unique within a Application Insights component. * @param [options] The optional parameters @@ -107,14 +107,14 @@ export class APIKeys { */ deleteMethod(resourceGroupName: string, resourceName: string, keyId: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param keyId The API Key ID. This is unique within a Application Insights component. * @param callback The callback */ deleteMethod(resourceGroupName: string, resourceName: string, keyId: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param keyId The API Key ID. This is unique within a Application Insights component. * @param options The optional parameters @@ -135,7 +135,7 @@ export class APIKeys { /** * Get the API Key for this key id. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param keyId The API Key ID. This is unique within a Application Insights component. * @param [options] The optional parameters @@ -143,14 +143,14 @@ export class APIKeys { */ get(resourceGroupName: string, resourceName: string, keyId: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param keyId The API Key ID. This is unique within a Application Insights component. * @param callback The callback */ get(resourceGroupName: string, resourceName: string, keyId: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param keyId The API Key ID. This is unique within a Application Insights component. * @param options The optional parameters @@ -181,7 +181,7 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.resourceName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -206,7 +206,7 @@ const createOperationSpec: msRest.OperationSpec = { Parameters.resourceName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -239,7 +239,7 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { Parameters.keyId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -265,7 +265,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.keyId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/applicationinsights/arm-appinsights/src/operations/analyticsItems.ts b/sdk/applicationinsights/arm-appinsights/src/operations/analyticsItems.ts index bafbaa9326ea..6ab9ebbc360f 100644 --- a/sdk/applicationinsights/arm-appinsights/src/operations/analyticsItems.ts +++ b/sdk/applicationinsights/arm-appinsights/src/operations/analyticsItems.ts @@ -28,7 +28,7 @@ export class AnalyticsItems { /** * Gets a list of Analytics Items defined within an Application Insights component. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param scopePath Enum indicating if this item definition is owned by a specific user or is * shared between all users with access to the Application Insights component. Possible values @@ -38,7 +38,7 @@ export class AnalyticsItems { */ list(resourceGroupName: string, resourceName: string, scopePath: Models.ItemScopePath, options?: Models.AnalyticsItemsListOptionalParams): Promise; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param scopePath Enum indicating if this item definition is owned by a specific user or is * shared between all users with access to the Application Insights component. Possible values @@ -47,7 +47,7 @@ export class AnalyticsItems { */ list(resourceGroupName: string, resourceName: string, scopePath: Models.ItemScopePath, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param scopePath Enum indicating if this item definition is owned by a specific user or is * shared between all users with access to the Application Insights component. Possible values @@ -70,7 +70,7 @@ export class AnalyticsItems { /** * Gets a specific Analytics Items defined within an Application Insights component. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param scopePath Enum indicating if this item definition is owned by a specific user or is * shared between all users with access to the Application Insights component. Possible values @@ -80,7 +80,7 @@ export class AnalyticsItems { */ get(resourceGroupName: string, resourceName: string, scopePath: Models.ItemScopePath, options?: Models.AnalyticsItemsGetOptionalParams): Promise; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param scopePath Enum indicating if this item definition is owned by a specific user or is * shared between all users with access to the Application Insights component. Possible values @@ -89,7 +89,7 @@ export class AnalyticsItems { */ get(resourceGroupName: string, resourceName: string, scopePath: Models.ItemScopePath, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param scopePath Enum indicating if this item definition is owned by a specific user or is * shared between all users with access to the Application Insights component. Possible values @@ -112,7 +112,7 @@ export class AnalyticsItems { /** * Adds or Updates a specific Analytics Item within an Application Insights component. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param scopePath Enum indicating if this item definition is owned by a specific user or is * shared between all users with access to the Application Insights component. Possible values @@ -124,7 +124,7 @@ export class AnalyticsItems { */ put(resourceGroupName: string, resourceName: string, scopePath: Models.ItemScopePath, itemProperties: Models.ApplicationInsightsComponentAnalyticsItem, options?: Models.AnalyticsItemsPutOptionalParams): Promise; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param scopePath Enum indicating if this item definition is owned by a specific user or is * shared between all users with access to the Application Insights component. Possible values @@ -135,7 +135,7 @@ export class AnalyticsItems { */ put(resourceGroupName: string, resourceName: string, scopePath: Models.ItemScopePath, itemProperties: Models.ApplicationInsightsComponentAnalyticsItem, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param scopePath Enum indicating if this item definition is owned by a specific user or is * shared between all users with access to the Application Insights component. Possible values @@ -161,7 +161,7 @@ export class AnalyticsItems { /** * Deletes a specific Analytics Items defined within an Application Insights component. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param scopePath Enum indicating if this item definition is owned by a specific user or is * shared between all users with access to the Application Insights component. Possible values @@ -171,7 +171,7 @@ export class AnalyticsItems { */ deleteMethod(resourceGroupName: string, resourceName: string, scopePath: Models.ItemScopePath, options?: Models.AnalyticsItemsDeleteMethodOptionalParams): Promise; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param scopePath Enum indicating if this item definition is owned by a specific user or is * shared between all users with access to the Application Insights component. Possible values @@ -180,7 +180,7 @@ export class AnalyticsItems { */ deleteMethod(resourceGroupName: string, resourceName: string, scopePath: Models.ItemScopePath, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param scopePath Enum indicating if this item definition is owned by a specific user or is * shared between all users with access to the Application Insights component. Possible values @@ -214,7 +214,7 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.scopePath ], queryParameters: [ - Parameters.apiVersion, + Parameters.apiVersion0, Parameters.scope, Parameters.type, Parameters.includeContent @@ -254,7 +254,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.scopePath ], queryParameters: [ - Parameters.apiVersion, + Parameters.apiVersion0, Parameters.id, Parameters.name ], @@ -282,7 +282,7 @@ const putOperationSpec: msRest.OperationSpec = { Parameters.scopePath ], queryParameters: [ - Parameters.apiVersion, + Parameters.apiVersion0, Parameters.overrideItem ], headerParameters: [ @@ -316,7 +316,7 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { Parameters.scopePath ], queryParameters: [ - Parameters.apiVersion, + Parameters.apiVersion0, Parameters.id, Parameters.name ], diff --git a/sdk/applicationinsights/arm-appinsights/src/operations/annotations.ts b/sdk/applicationinsights/arm-appinsights/src/operations/annotations.ts index f36ded7ddd78..b9b3f4e1015d 100644 --- a/sdk/applicationinsights/arm-appinsights/src/operations/annotations.ts +++ b/sdk/applicationinsights/arm-appinsights/src/operations/annotations.ts @@ -28,7 +28,7 @@ export class Annotations { /** * Gets the list of annotations for a component for given time range - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param start The start time to query from for annotations, cannot be older than 90 days from * current date. @@ -38,7 +38,7 @@ export class Annotations { */ list(resourceGroupName: string, resourceName: string, start: string, end: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param start The start time to query from for annotations, cannot be older than 90 days from * current date. @@ -47,7 +47,7 @@ export class Annotations { */ list(resourceGroupName: string, resourceName: string, start: string, end: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param start The start time to query from for annotations, cannot be older than 90 days from * current date. @@ -71,7 +71,7 @@ export class Annotations { /** * Create an Annotation of an Application Insights component. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param annotationProperties Properties that need to be specified to create an annotation of a * Application Insights component. @@ -80,7 +80,7 @@ export class Annotations { */ create(resourceGroupName: string, resourceName: string, annotationProperties: Models.Annotation, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param annotationProperties Properties that need to be specified to create an annotation of a * Application Insights component. @@ -88,7 +88,7 @@ export class Annotations { */ create(resourceGroupName: string, resourceName: string, annotationProperties: Models.Annotation, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param annotationProperties Properties that need to be specified to create an annotation of a * Application Insights component. @@ -110,32 +110,32 @@ export class Annotations { /** * Delete an Annotation of an Application Insights component. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param annotationId The unique annotation ID. This is unique within a Application Insights * component. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - deleteMethod(resourceGroupName: string, resourceName: string, annotationId: string, options?: msRest.RequestOptionsBase): Promise; + deleteMethod(resourceGroupName: string, resourceName: string, annotationId: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param annotationId The unique annotation ID. This is unique within a Application Insights * component. * @param callback The callback */ - deleteMethod(resourceGroupName: string, resourceName: string, annotationId: string, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, resourceName: string, annotationId: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param annotationId The unique annotation ID. This is unique within a Application Insights * component. * @param options The optional parameters * @param callback The callback */ - deleteMethod(resourceGroupName: string, resourceName: string, annotationId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteMethod(resourceGroupName: string, resourceName: string, annotationId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + deleteMethod(resourceGroupName: string, resourceName: string, annotationId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, resourceName: string, annotationId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, @@ -144,12 +144,12 @@ export class Annotations { options }, deleteMethodOperationSpec, - callback) as Promise; + callback); } /** * Get the annotation for given id. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param annotationId The unique annotation ID. This is unique within a Application Insights * component. @@ -158,7 +158,7 @@ export class Annotations { */ get(resourceGroupName: string, resourceName: string, annotationId: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param annotationId The unique annotation ID. This is unique within a Application Insights * component. @@ -166,7 +166,7 @@ export class Annotations { */ get(resourceGroupName: string, resourceName: string, annotationId: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param annotationId The unique annotation ID. This is unique within a Application Insights * component. @@ -198,7 +198,7 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.resourceName ], queryParameters: [ - Parameters.apiVersion, + Parameters.apiVersion0, Parameters.start, Parameters.end ], @@ -225,7 +225,7 @@ const createOperationSpec: msRest.OperationSpec = { Parameters.resourceName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -269,20 +269,13 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { Parameters.annotationId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage ], responses: { - 200: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Object" - } - } - }, + 200: {}, default: { bodyMapper: Mappers.CloudError } @@ -300,7 +293,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.annotationId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/applicationinsights/arm-appinsights/src/operations/componentAvailableFeatures.ts b/sdk/applicationinsights/arm-appinsights/src/operations/componentAvailableFeatures.ts index 84cc340da70b..e5ce8d5f1604 100644 --- a/sdk/applicationinsights/arm-appinsights/src/operations/componentAvailableFeatures.ts +++ b/sdk/applicationinsights/arm-appinsights/src/operations/componentAvailableFeatures.ts @@ -28,20 +28,20 @@ export class ComponentAvailableFeatures { /** * Returns all available features of the application insights component. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param [options] The optional parameters * @returns Promise */ get(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param callback The callback */ get(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param options The optional parameters * @param callback The callback @@ -70,7 +70,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.resourceName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/applicationinsights/arm-appinsights/src/operations/componentCurrentBillingFeatures.ts b/sdk/applicationinsights/arm-appinsights/src/operations/componentCurrentBillingFeatures.ts index d4a36c61adb3..8c309bc2b2f2 100644 --- a/sdk/applicationinsights/arm-appinsights/src/operations/componentCurrentBillingFeatures.ts +++ b/sdk/applicationinsights/arm-appinsights/src/operations/componentCurrentBillingFeatures.ts @@ -28,20 +28,20 @@ export class ComponentCurrentBillingFeatures { /** * Returns current billing features for an Application Insights component. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param [options] The optional parameters * @returns Promise */ get(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param callback The callback */ get(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param options The optional parameters * @param callback The callback @@ -60,7 +60,7 @@ export class ComponentCurrentBillingFeatures { /** * Update current billing features for an Application Insights component. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param billingFeaturesProperties Properties that need to be specified to update billing features * for an Application Insights component. @@ -69,7 +69,7 @@ export class ComponentCurrentBillingFeatures { */ update(resourceGroupName: string, resourceName: string, billingFeaturesProperties: Models.ApplicationInsightsComponentBillingFeatures, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param billingFeaturesProperties Properties that need to be specified to update billing features * for an Application Insights component. @@ -77,7 +77,7 @@ export class ComponentCurrentBillingFeatures { */ update(resourceGroupName: string, resourceName: string, billingFeaturesProperties: Models.ApplicationInsightsComponentBillingFeatures, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param billingFeaturesProperties Properties that need to be specified to update billing features * for an Application Insights component. @@ -109,7 +109,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.resourceName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -134,7 +134,7 @@ const updateOperationSpec: msRest.OperationSpec = { Parameters.resourceName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/applicationinsights/arm-appinsights/src/operations/componentFeatureCapabilities.ts b/sdk/applicationinsights/arm-appinsights/src/operations/componentFeatureCapabilities.ts index 26e06651a059..de36f7cae22c 100644 --- a/sdk/applicationinsights/arm-appinsights/src/operations/componentFeatureCapabilities.ts +++ b/sdk/applicationinsights/arm-appinsights/src/operations/componentFeatureCapabilities.ts @@ -27,21 +27,21 @@ export class ComponentFeatureCapabilities { } /** - * Returns feature capabilites of the application insights component. - * @param resourceGroupName The name of the resource group. + * Returns feature capabilities of the application insights component. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param [options] The optional parameters * @returns Promise */ get(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param callback The callback */ get(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param options The optional parameters * @param callback The callback @@ -70,7 +70,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.resourceName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/applicationinsights/arm-appinsights/src/operations/componentLinkedStorageAccountsOperations.ts b/sdk/applicationinsights/arm-appinsights/src/operations/componentLinkedStorageAccountsOperations.ts new file mode 100644 index 000000000000..46a0e3ed40bf --- /dev/null +++ b/sdk/applicationinsights/arm-appinsights/src/operations/componentLinkedStorageAccountsOperations.ts @@ -0,0 +1,289 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * 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 * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/componentLinkedStorageAccountsOperationsMappers"; +import * as Parameters from "../models/parameters"; +import { ApplicationInsightsManagementClientContext } from "../applicationInsightsManagementClientContext"; + +/** Class representing a ComponentLinkedStorageAccountsOperations. */ +export class ComponentLinkedStorageAccountsOperations { + private readonly client: ApplicationInsightsManagementClientContext; + + /** + * Create a ComponentLinkedStorageAccountsOperations. + * @param {ApplicationInsightsManagementClientContext} client Reference to the service client. + */ + constructor(client: ApplicationInsightsManagementClientContext) { + this.client = client; + } + + /** + * Returns the current linked storage settings for an Application Insights component. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param callback The callback + */ + get(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Replace current linked storage account for an Application Insights component. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param linkedStorageAccountsProperties Properties that need to be specified to update linked + * storage accounts for an Application Insights component. + * @param [options] The optional parameters + * @returns Promise + */ + createAndUpdate(resourceGroupName: string, resourceName: string, linkedStorageAccountsProperties: Models.ComponentLinkedStorageAccounts, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param linkedStorageAccountsProperties Properties that need to be specified to update linked + * storage accounts for an Application Insights component. + * @param callback The callback + */ + createAndUpdate(resourceGroupName: string, resourceName: string, linkedStorageAccountsProperties: Models.ComponentLinkedStorageAccounts, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param linkedStorageAccountsProperties Properties that need to be specified to update linked + * storage accounts for an Application Insights component. + * @param options The optional parameters + * @param callback The callback + */ + createAndUpdate(resourceGroupName: string, resourceName: string, linkedStorageAccountsProperties: Models.ComponentLinkedStorageAccounts, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createAndUpdate(resourceGroupName: string, resourceName: string, linkedStorageAccountsProperties: Models.ComponentLinkedStorageAccounts, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + linkedStorageAccountsProperties, + options + }, + createAndUpdateOperationSpec, + callback) as Promise; + } + + /** + * Update linked storage accounts for an Application Insights component. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param linkedStorageAccountsProperties Properties that need to be specified to update a linked + * storage accounts for an Application Insights component. + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, resourceName: string, linkedStorageAccountsProperties: Models.ComponentLinkedStorageAccountsPatch, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param linkedStorageAccountsProperties Properties that need to be specified to update a linked + * storage accounts for an Application Insights component. + * @param callback The callback + */ + update(resourceGroupName: string, resourceName: string, linkedStorageAccountsProperties: Models.ComponentLinkedStorageAccountsPatch, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param linkedStorageAccountsProperties Properties that need to be specified to update a linked + * storage accounts for an Application Insights component. + * @param options The optional parameters + * @param callback The callback + */ + update(resourceGroupName: string, resourceName: string, linkedStorageAccountsProperties: Models.ComponentLinkedStorageAccountsPatch, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + update(resourceGroupName: string, resourceName: string, linkedStorageAccountsProperties: Models.ComponentLinkedStorageAccountsPatch, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + linkedStorageAccountsProperties, + options + }, + updateOperationSpec, + callback) as Promise; + } + + /** + * Delete linked storage accounts for an Application Insights component. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + options + }, + deleteMethodOperationSpec, + callback); + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/linkedStorageAccounts/{storageType}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.resourceName, + Parameters.storageType + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ComponentLinkedStorageAccounts + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const createAndUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/linkedStorageAccounts/{storageType}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.resourceName, + Parameters.storageType + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "linkedStorageAccountsProperties", + mapper: { + ...Mappers.ComponentLinkedStorageAccounts, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ComponentLinkedStorageAccounts + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const updateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/linkedStorageAccounts/{storageType}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.resourceName, + Parameters.storageType + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "linkedStorageAccountsProperties", + mapper: { + ...Mappers.ComponentLinkedStorageAccountsPatch, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ComponentLinkedStorageAccounts + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/linkedStorageAccounts/{storageType}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.resourceName, + Parameters.storageType + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/applicationinsights/arm-appinsights/src/operations/componentQuotaStatus.ts b/sdk/applicationinsights/arm-appinsights/src/operations/componentQuotaStatus.ts index 9c62a249142b..c94652a32949 100644 --- a/sdk/applicationinsights/arm-appinsights/src/operations/componentQuotaStatus.ts +++ b/sdk/applicationinsights/arm-appinsights/src/operations/componentQuotaStatus.ts @@ -28,20 +28,20 @@ export class ComponentQuotaStatus { /** * Returns daily data volume cap (quota) status for an Application Insights component. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param [options] The optional parameters * @returns Promise */ get(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param callback The callback */ get(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param options The optional parameters * @param callback The callback @@ -70,7 +70,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.resourceName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/applicationinsights/arm-appinsights/src/operations/components.ts b/sdk/applicationinsights/arm-appinsights/src/operations/components.ts index 5d5ab4a6b9c1..48c6618cbfe9 100644 --- a/sdk/applicationinsights/arm-appinsights/src/operations/components.ts +++ b/sdk/applicationinsights/arm-appinsights/src/operations/components.ts @@ -52,18 +52,18 @@ export class Components { /** * Gets a list of Application Insights components within a resource group. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param [options] The optional parameters * @returns Promise */ listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param callback The callback */ listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param options The optional parameters * @param callback The callback */ @@ -80,20 +80,20 @@ export class Components { /** * Deletes an Application Insights component. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param [options] The optional parameters * @returns Promise */ deleteMethod(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param callback The callback */ deleteMethod(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param options The optional parameters * @param callback The callback @@ -112,20 +112,20 @@ export class Components { /** * Returns an Application Insights component. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param [options] The optional parameters * @returns Promise */ get(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param callback The callback */ get(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param options The optional parameters * @param callback The callback @@ -145,7 +145,7 @@ export class Components { /** * Creates (or updates) an Application Insights component. Note: You cannot specify a different * value for InstrumentationKey nor AppId in the Put operation. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param insightProperties Properties that need to be specified to create an Application Insights * component. @@ -154,7 +154,7 @@ export class Components { */ createOrUpdate(resourceGroupName: string, resourceName: string, insightProperties: Models.ApplicationInsightsComponent, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param insightProperties Properties that need to be specified to create an Application Insights * component. @@ -162,7 +162,7 @@ export class Components { */ createOrUpdate(resourceGroupName: string, resourceName: string, insightProperties: Models.ApplicationInsightsComponent, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param insightProperties Properties that need to be specified to create an Application Insights * component. @@ -184,7 +184,7 @@ export class Components { /** * Updates an existing component's tags. To update other fields use the CreateOrUpdate method. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param componentTags Updated tag information to set into the component instance. * @param [options] The optional parameters @@ -192,14 +192,14 @@ export class Components { */ updateTags(resourceGroupName: string, resourceName: string, componentTags: Models.TagsResource, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param componentTags Updated tag information to set into the component instance. * @param callback The callback */ updateTags(resourceGroupName: string, resourceName: string, componentTags: Models.TagsResource, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param componentTags Updated tag information to set into the component instance. * @param options The optional parameters @@ -220,7 +220,13 @@ export class Components { /** * Purges data in an Application Insights component by a set of user-defined filters. - * @param resourceGroupName The name of the resource group. + * + * In order to manage system resources, purge requests are throttled at 50 requests per hour. You + * should batch the execution of purge requests by sending a single command whose predicate + * includes all user identities that require purging. Use the in operator to specify multiple + * identities. You should run the query prior to using for a purge request to verify that the + * results are expected. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param body Describes the body of a request to purge data in a single table of an Application * Insights component @@ -229,7 +235,7 @@ export class Components { */ purge(resourceGroupName: string, resourceName: string, body: Models.ComponentPurgeBody, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param body Describes the body of a request to purge data in a single table of an Application * Insights component @@ -237,7 +243,7 @@ export class Components { */ purge(resourceGroupName: string, resourceName: string, body: Models.ComponentPurgeBody, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param body Describes the body of a request to purge data in a single table of an Application * Insights component @@ -259,7 +265,7 @@ export class Components { /** * Get status for an ongoing purge operation. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param purgeId In a purge status request, this is the Id of the operation the status of which is * returned. @@ -268,7 +274,7 @@ export class Components { */ getPurgeStatus(resourceGroupName: string, resourceName: string, purgeId: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param purgeId In a purge status request, this is the Id of the operation the status of which is * returned. @@ -276,7 +282,7 @@ export class Components { */ getPurgeStatus(resourceGroupName: string, resourceName: string, purgeId: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param purgeId In a purge status request, this is the Id of the operation the status of which is * returned. @@ -362,7 +368,7 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion2 ], headerParameters: [ Parameters.acceptLanguage @@ -386,7 +392,7 @@ const listByResourceGroupOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion2 ], headerParameters: [ Parameters.acceptLanguage @@ -411,7 +417,7 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { Parameters.resourceName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion2 ], headerParameters: [ Parameters.acceptLanguage @@ -435,7 +441,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.resourceName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion2 ], headerParameters: [ Parameters.acceptLanguage @@ -460,7 +466,7 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { Parameters.resourceName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion2 ], headerParameters: [ Parameters.acceptLanguage @@ -476,6 +482,9 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { 200: { bodyMapper: Mappers.ApplicationInsightsComponent }, + 201: { + bodyMapper: Mappers.ApplicationInsightsComponent + }, default: { bodyMapper: Mappers.CloudError } @@ -492,7 +501,7 @@ const updateTagsOperationSpec: msRest.OperationSpec = { Parameters.resourceName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion2 ], headerParameters: [ Parameters.acceptLanguage @@ -508,6 +517,9 @@ const updateTagsOperationSpec: msRest.OperationSpec = { 200: { bodyMapper: Mappers.ApplicationInsightsComponent }, + 201: { + bodyMapper: Mappers.ApplicationInsightsComponent + }, default: { bodyMapper: Mappers.CloudError } @@ -524,7 +536,7 @@ const purgeOperationSpec: msRest.OperationSpec = { Parameters.resourceName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion2 ], headerParameters: [ Parameters.acceptLanguage @@ -557,7 +569,7 @@ const getPurgeStatusOperationSpec: msRest.OperationSpec = { Parameters.purgeId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion2 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/applicationinsights/arm-appinsights/src/operations/exportConfigurations.ts b/sdk/applicationinsights/arm-appinsights/src/operations/exportConfigurations.ts index a7985ea6e265..940a447fdb0b 100644 --- a/sdk/applicationinsights/arm-appinsights/src/operations/exportConfigurations.ts +++ b/sdk/applicationinsights/arm-appinsights/src/operations/exportConfigurations.ts @@ -28,20 +28,20 @@ export class ExportConfigurations { /** * Gets a list of Continuous Export configuration of an Application Insights component. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param [options] The optional parameters * @returns Promise */ list(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param callback The callback */ list(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param options The optional parameters * @param callback The callback @@ -60,7 +60,7 @@ export class ExportConfigurations { /** * Create a Continuous Export configuration of an Application Insights component. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param exportProperties Properties that need to be specified to create a Continuous Export * configuration of a Application Insights component. @@ -69,7 +69,7 @@ export class ExportConfigurations { */ create(resourceGroupName: string, resourceName: string, exportProperties: Models.ApplicationInsightsComponentExportRequest, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param exportProperties Properties that need to be specified to create a Continuous Export * configuration of a Application Insights component. @@ -77,7 +77,7 @@ export class ExportConfigurations { */ create(resourceGroupName: string, resourceName: string, exportProperties: Models.ApplicationInsightsComponentExportRequest, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param exportProperties Properties that need to be specified to create a Continuous Export * configuration of a Application Insights component. @@ -99,7 +99,7 @@ export class ExportConfigurations { /** * Delete a Continuous Export configuration of an Application Insights component. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param exportId The Continuous Export configuration ID. This is unique within a Application * Insights component. @@ -108,7 +108,7 @@ export class ExportConfigurations { */ deleteMethod(resourceGroupName: string, resourceName: string, exportId: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param exportId The Continuous Export configuration ID. This is unique within a Application * Insights component. @@ -116,7 +116,7 @@ export class ExportConfigurations { */ deleteMethod(resourceGroupName: string, resourceName: string, exportId: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param exportId The Continuous Export configuration ID. This is unique within a Application * Insights component. @@ -138,7 +138,7 @@ export class ExportConfigurations { /** * Get the Continuous Export configuration for this export id. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param exportId The Continuous Export configuration ID. This is unique within a Application * Insights component. @@ -147,7 +147,7 @@ export class ExportConfigurations { */ get(resourceGroupName: string, resourceName: string, exportId: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param exportId The Continuous Export configuration ID. This is unique within a Application * Insights component. @@ -155,7 +155,7 @@ export class ExportConfigurations { */ get(resourceGroupName: string, resourceName: string, exportId: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param exportId The Continuous Export configuration ID. This is unique within a Application * Insights component. @@ -177,7 +177,7 @@ export class ExportConfigurations { /** * Update the Continuous Export configuration for this export id. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param exportId The Continuous Export configuration ID. This is unique within a Application * Insights component. @@ -188,7 +188,7 @@ export class ExportConfigurations { */ update(resourceGroupName: string, resourceName: string, exportId: string, exportProperties: Models.ApplicationInsightsComponentExportRequest, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param exportId The Continuous Export configuration ID. This is unique within a Application * Insights component. @@ -198,7 +198,7 @@ export class ExportConfigurations { */ update(resourceGroupName: string, resourceName: string, exportId: string, exportProperties: Models.ApplicationInsightsComponentExportRequest, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param exportId The Continuous Export configuration ID. This is unique within a Application * Insights component. @@ -233,7 +233,7 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.resourceName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -269,7 +269,7 @@ const createOperationSpec: msRest.OperationSpec = { Parameters.resourceName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -313,7 +313,7 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { Parameters.exportId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -339,7 +339,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.exportId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -365,7 +365,7 @@ const updateOperationSpec: msRest.OperationSpec = { Parameters.exportId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/applicationinsights/arm-appinsights/src/operations/favorites.ts b/sdk/applicationinsights/arm-appinsights/src/operations/favorites.ts index b7d321659714..f825ea158c5a 100644 --- a/sdk/applicationinsights/arm-appinsights/src/operations/favorites.ts +++ b/sdk/applicationinsights/arm-appinsights/src/operations/favorites.ts @@ -28,20 +28,20 @@ export class Favorites { /** * Gets a list of favorites defined within an Application Insights component. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param [options] The optional parameters * @returns Promise */ list(resourceGroupName: string, resourceName: string, options?: Models.FavoritesListOptionalParams): Promise; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param callback The callback */ list(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param options The optional parameters * @param callback The callback @@ -60,7 +60,7 @@ export class Favorites { /** * Get a single favorite by its FavoriteId, defined within an Application Insights component. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param favoriteId The Id of a specific favorite defined in the Application Insights component * @param [options] The optional parameters @@ -68,14 +68,14 @@ export class Favorites { */ get(resourceGroupName: string, resourceName: string, favoriteId: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param favoriteId The Id of a specific favorite defined in the Application Insights component * @param callback The callback */ get(resourceGroupName: string, resourceName: string, favoriteId: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param favoriteId The Id of a specific favorite defined in the Application Insights component * @param options The optional parameters @@ -96,7 +96,7 @@ export class Favorites { /** * Adds a new favorites to an Application Insights component. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param favoriteId The Id of a specific favorite defined in the Application Insights component * @param favoriteProperties Properties that need to be specified to create a new favorite and add @@ -106,7 +106,7 @@ export class Favorites { */ add(resourceGroupName: string, resourceName: string, favoriteId: string, favoriteProperties: Models.ApplicationInsightsComponentFavorite, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param favoriteId The Id of a specific favorite defined in the Application Insights component * @param favoriteProperties Properties that need to be specified to create a new favorite and add @@ -115,7 +115,7 @@ export class Favorites { */ add(resourceGroupName: string, resourceName: string, favoriteId: string, favoriteProperties: Models.ApplicationInsightsComponentFavorite, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param favoriteId The Id of a specific favorite defined in the Application Insights component * @param favoriteProperties Properties that need to be specified to create a new favorite and add @@ -139,7 +139,7 @@ export class Favorites { /** * Updates a favorite that has already been added to an Application Insights component. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param favoriteId The Id of a specific favorite defined in the Application Insights component * @param favoriteProperties Properties that need to be specified to update the existing favorite. @@ -148,7 +148,7 @@ export class Favorites { */ update(resourceGroupName: string, resourceName: string, favoriteId: string, favoriteProperties: Models.ApplicationInsightsComponentFavorite, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param favoriteId The Id of a specific favorite defined in the Application Insights component * @param favoriteProperties Properties that need to be specified to update the existing favorite. @@ -156,7 +156,7 @@ export class Favorites { */ update(resourceGroupName: string, resourceName: string, favoriteId: string, favoriteProperties: Models.ApplicationInsightsComponentFavorite, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param favoriteId The Id of a specific favorite defined in the Application Insights component * @param favoriteProperties Properties that need to be specified to update the existing favorite. @@ -179,7 +179,7 @@ export class Favorites { /** * Remove a favorite that is associated to an Application Insights component. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param favoriteId The Id of a specific favorite defined in the Application Insights component * @param [options] The optional parameters @@ -187,14 +187,14 @@ export class Favorites { */ deleteMethod(resourceGroupName: string, resourceName: string, favoriteId: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param favoriteId The Id of a specific favorite defined in the Application Insights component * @param callback The callback */ deleteMethod(resourceGroupName: string, resourceName: string, favoriteId: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param favoriteId The Id of a specific favorite defined in the Application Insights component * @param options The optional parameters @@ -225,7 +225,7 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.resourceName ], queryParameters: [ - Parameters.apiVersion, + Parameters.apiVersion0, Parameters.favoriteType, Parameters.sourceType, Parameters.canFetchContent, @@ -266,7 +266,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.favoriteId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -292,7 +292,7 @@ const addOperationSpec: msRest.OperationSpec = { Parameters.favoriteId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -325,7 +325,7 @@ const updateOperationSpec: msRest.OperationSpec = { Parameters.favoriteId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -358,7 +358,7 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { Parameters.favoriteId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/applicationinsights/arm-appinsights/src/operations/index.ts b/sdk/applicationinsights/arm-appinsights/src/operations/index.ts index 081347db5f2d..c3c6ae147129 100644 --- a/sdk/applicationinsights/arm-appinsights/src/operations/index.ts +++ b/sdk/applicationinsights/arm-appinsights/src/operations/index.ts @@ -17,10 +17,13 @@ export * from "./componentQuotaStatus"; export * from "./componentFeatureCapabilities"; export * from "./componentAvailableFeatures"; export * from "./proactiveDetectionConfigurations"; -export * from "./components"; export * from "./workItemConfigurations"; export * from "./favorites"; export * from "./webTestLocations"; export * from "./webTests"; export * from "./analyticsItems"; export * from "./workbooks"; +export * from "./myWorkbooks"; +export * from "./components"; +export * from "./componentLinkedStorageAccountsOperations"; +export * from "./liveToken"; diff --git a/sdk/applicationinsights/arm-appinsights/src/operations/liveToken.ts b/sdk/applicationinsights/arm-appinsights/src/operations/liveToken.ts new file mode 100644 index 000000000000..ed95ae3dd28b --- /dev/null +++ b/sdk/applicationinsights/arm-appinsights/src/operations/liveToken.ts @@ -0,0 +1,81 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * 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 * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/liveTokenMappers"; +import * as Parameters from "../models/parameters"; +import { ApplicationInsightsManagementClientContext } from "../applicationInsightsManagementClientContext"; + +/** Class representing a LiveToken. */ +export class LiveToken { + private readonly client: ApplicationInsightsManagementClientContext; + + /** + * Create a LiveToken. + * @param {ApplicationInsightsManagementClientContext} client Reference to the service client. + */ + constructor(client: ApplicationInsightsManagementClientContext) { + this.client = client; + } + + /** + * **Gets an access token for live metrics stream data.** + * @param resourceUri The identifier of the resource. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceUri: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceUri The identifier of the resource. + * @param callback The callback + */ + get(resourceUri: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceUri The identifier of the resource. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceUri: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceUri: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceUri, + options + }, + getOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "{resourceUri}/providers/microsoft.insights/generatelivetoken", + urlParameters: [ + Parameters.resourceUri + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.LiveTokenResponse + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/applicationinsights/arm-appinsights/src/operations/myWorkbooks.ts b/sdk/applicationinsights/arm-appinsights/src/operations/myWorkbooks.ts new file mode 100644 index 000000000000..bbd47c344ea6 --- /dev/null +++ b/sdk/applicationinsights/arm-appinsights/src/operations/myWorkbooks.ts @@ -0,0 +1,401 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * 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 * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/myWorkbooksMappers"; +import * as Parameters from "../models/parameters"; +import { ApplicationInsightsManagementClientContext } from "../applicationInsightsManagementClientContext"; + +/** Class representing a MyWorkbooks. */ +export class MyWorkbooks { + private readonly client: ApplicationInsightsManagementClientContext; + + /** + * Create a MyWorkbooks. + * @param {ApplicationInsightsManagementClientContext} client Reference to the service client. + */ + constructor(client: ApplicationInsightsManagementClientContext) { + this.client = client; + } + + /** + * Get all private workbooks defined within a specified resource group and category. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param category Category of workbook to return. Possible values include: 'workbook', 'TSG', + * 'performance', 'retention' + * @param [options] The optional parameters + * @returns Promise + */ + listByResourceGroup(resourceGroupName: string, category: Models.CategoryType, options?: Models.MyWorkbooksListByResourceGroupOptionalParams): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param category Category of workbook to return. Possible values include: 'workbook', 'TSG', + * 'performance', 'retention' + * @param callback The callback + */ + listByResourceGroup(resourceGroupName: string, category: Models.CategoryType, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param category Category of workbook to return. Possible values include: 'workbook', 'TSG', + * 'performance', 'retention' + * @param options The optional parameters + * @param callback The callback + */ + listByResourceGroup(resourceGroupName: string, category: Models.CategoryType, options: Models.MyWorkbooksListByResourceGroupOptionalParams, callback: msRest.ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, category: Models.CategoryType, options?: Models.MyWorkbooksListByResourceGroupOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + category, + options + }, + listByResourceGroupOperationSpec, + callback) as Promise; + } + + /** + * Get all private workbooks defined within a specified subscription and category. + * @param category Category of workbook to return. Possible values include: 'workbook', 'TSG', + * 'performance', 'retention' + * @param [options] The optional parameters + * @returns Promise + */ + listBySubscription(category: Models.CategoryType, options?: Models.MyWorkbooksListBySubscriptionOptionalParams): Promise; + /** + * @param category Category of workbook to return. Possible values include: 'workbook', 'TSG', + * 'performance', 'retention' + * @param callback The callback + */ + listBySubscription(category: Models.CategoryType, callback: msRest.ServiceCallback): void; + /** + * @param category Category of workbook to return. Possible values include: 'workbook', 'TSG', + * 'performance', 'retention' + * @param options The optional parameters + * @param callback The callback + */ + listBySubscription(category: Models.CategoryType, options: Models.MyWorkbooksListBySubscriptionOptionalParams, callback: msRest.ServiceCallback): void; + listBySubscription(category: Models.CategoryType, options?: Models.MyWorkbooksListBySubscriptionOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + category, + options + }, + listBySubscriptionOperationSpec, + callback) as Promise; + } + + /** + * Get a single private workbook by its resourceName. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param callback The callback + */ + get(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Delete a private workbook. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * Create a new private workbook. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param workbookProperties Properties that need to be specified to create a new private workbook. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, resourceName: string, workbookProperties: Models.MyWorkbook, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param workbookProperties Properties that need to be specified to create a new private workbook. + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, resourceName: string, workbookProperties: Models.MyWorkbook, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param workbookProperties Properties that need to be specified to create a new private workbook. + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, resourceName: string, workbookProperties: Models.MyWorkbook, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, resourceName: string, workbookProperties: Models.MyWorkbook, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + workbookProperties, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; + } + + /** + * Updates a private workbook that has already been added. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param workbookProperties Properties that need to be specified to create a new private workbook. + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, resourceName: string, workbookProperties: Models.MyWorkbook, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param workbookProperties Properties that need to be specified to create a new private workbook. + * @param callback The callback + */ + update(resourceGroupName: string, resourceName: string, workbookProperties: Models.MyWorkbook, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param workbookProperties Properties that need to be specified to create a new private workbook. + * @param options The optional parameters + * @param callback The callback + */ + update(resourceGroupName: string, resourceName: string, workbookProperties: Models.MyWorkbook, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + update(resourceGroupName: string, resourceName: string, workbookProperties: Models.MyWorkbook, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + workbookProperties, + options + }, + updateOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByResourceGroupOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/myWorkbooks", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.category, + Parameters.tags, + Parameters.canFetchContent, + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.MyWorkbooksListResult + }, + default: { + bodyMapper: Mappers.MyWorkbookError + } + }, + serializer +}; + +const listBySubscriptionOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Insights/myWorkbooks", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.category, + Parameters.tags, + Parameters.canFetchContent, + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.MyWorkbooksListResult + }, + default: { + bodyMapper: Mappers.MyWorkbookError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/myWorkbooks/{resourceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.MyWorkbook + }, + default: { + bodyMapper: Mappers.MyWorkbookError + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/myWorkbooks/{resourceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 201: {}, + 204: {}, + default: { + bodyMapper: Mappers.MyWorkbookError + } + }, + serializer +}; + +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/myWorkbooks/{resourceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "workbookProperties", + mapper: { + ...Mappers.MyWorkbook, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.MyWorkbook + }, + 201: { + bodyMapper: Mappers.MyWorkbook + }, + default: { + bodyMapper: Mappers.MyWorkbookError + } + }, + serializer +}; + +const updateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/myWorkbooks/{resourceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "workbookProperties", + mapper: { + ...Mappers.MyWorkbook, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.MyWorkbook + }, + default: { + bodyMapper: Mappers.MyWorkbookError + } + }, + serializer +}; diff --git a/sdk/applicationinsights/arm-appinsights/src/operations/operations.ts b/sdk/applicationinsights/arm-appinsights/src/operations/operations.ts index 2b5a6ac42961..a21e656b1639 100644 --- a/sdk/applicationinsights/arm-appinsights/src/operations/operations.ts +++ b/sdk/applicationinsights/arm-appinsights/src/operations/operations.ts @@ -50,6 +50,31 @@ export class Operations { callback) as Promise; } + /** + * List the available operations supported by the resource provider. + * @summary List available operations. + * @param [options] The optional parameters + * @returns Promise + */ + list1(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + list1(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + list1(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list1(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + list1OperationSpec, + callback) as Promise; + } + /** * Lists all of the available insights REST API operations. * @param nextPageLink The NextLink from the previous successful call to List operation. @@ -77,6 +102,35 @@ export class Operations { listNextOperationSpec, callback) as Promise; } + + /** + * List the available operations supported by the resource provider. + * @summary List available operations. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + list1Next(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + list1Next(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + list1Next(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list1Next(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + list1NextOperationSpec, + callback) as Promise; + } } // Operation Specifications @@ -85,7 +139,7 @@ const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "providers/Microsoft.Insights/operations", queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -101,6 +155,26 @@ const listOperationSpec: msRest.OperationSpec = { serializer }; +const list1OperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/microsoft.insights/operations", + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.OperationsListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + const listNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", @@ -121,3 +195,24 @@ const listNextOperationSpec: msRest.OperationSpec = { }, serializer }; + +const list1NextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.OperationsListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/applicationinsights/arm-appinsights/src/operations/proactiveDetectionConfigurations.ts b/sdk/applicationinsights/arm-appinsights/src/operations/proactiveDetectionConfigurations.ts index ca6f6dcbe202..79b5a581c019 100644 --- a/sdk/applicationinsights/arm-appinsights/src/operations/proactiveDetectionConfigurations.ts +++ b/sdk/applicationinsights/arm-appinsights/src/operations/proactiveDetectionConfigurations.ts @@ -28,20 +28,20 @@ export class ProactiveDetectionConfigurations { /** * Gets a list of ProactiveDetection configurations of an Application Insights component. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param [options] The optional parameters * @returns Promise */ list(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param callback The callback */ list(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param options The optional parameters * @param callback The callback @@ -60,7 +60,7 @@ export class ProactiveDetectionConfigurations { /** * Get the ProactiveDetection configuration for this configuration id. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param configurationId The ProactiveDetection configuration ID. This is unique within a * Application Insights component. @@ -69,7 +69,7 @@ export class ProactiveDetectionConfigurations { */ get(resourceGroupName: string, resourceName: string, configurationId: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param configurationId The ProactiveDetection configuration ID. This is unique within a * Application Insights component. @@ -77,7 +77,7 @@ export class ProactiveDetectionConfigurations { */ get(resourceGroupName: string, resourceName: string, configurationId: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param configurationId The ProactiveDetection configuration ID. This is unique within a * Application Insights component. @@ -99,7 +99,7 @@ export class ProactiveDetectionConfigurations { /** * Update the ProactiveDetection configuration for this configuration id. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param configurationId The ProactiveDetection configuration ID. This is unique within a * Application Insights component. @@ -110,7 +110,7 @@ export class ProactiveDetectionConfigurations { */ update(resourceGroupName: string, resourceName: string, configurationId: string, proactiveDetectionProperties: Models.ApplicationInsightsComponentProactiveDetectionConfiguration, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param configurationId The ProactiveDetection configuration ID. This is unique within a * Application Insights component. @@ -120,7 +120,7 @@ export class ProactiveDetectionConfigurations { */ update(resourceGroupName: string, resourceName: string, configurationId: string, proactiveDetectionProperties: Models.ApplicationInsightsComponentProactiveDetectionConfiguration, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param configurationId The ProactiveDetection configuration ID. This is unique within a * Application Insights component. @@ -155,7 +155,7 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.resourceName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -192,7 +192,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.configurationId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -218,7 +218,7 @@ const updateOperationSpec: msRest.OperationSpec = { Parameters.configurationId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/applicationinsights/arm-appinsights/src/operations/webTestLocations.ts b/sdk/applicationinsights/arm-appinsights/src/operations/webTestLocations.ts index 95fbad790bb0..ef40c1e72fab 100644 --- a/sdk/applicationinsights/arm-appinsights/src/operations/webTestLocations.ts +++ b/sdk/applicationinsights/arm-appinsights/src/operations/webTestLocations.ts @@ -28,20 +28,20 @@ export class WebTestLocations { /** * Gets a list of web test locations available to this Application Insights component. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param [options] The optional parameters * @returns Promise */ list(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param callback The callback */ list(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param options The optional parameters * @param callback The callback @@ -70,7 +70,7 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.resourceName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/applicationinsights/arm-appinsights/src/operations/webTests.ts b/sdk/applicationinsights/arm-appinsights/src/operations/webTests.ts index 85311b4d629b..cc6634172d90 100644 --- a/sdk/applicationinsights/arm-appinsights/src/operations/webTests.ts +++ b/sdk/applicationinsights/arm-appinsights/src/operations/webTests.ts @@ -28,18 +28,18 @@ export class WebTests { /** * Get all Application Insights web tests defined within a specified resource group. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param [options] The optional parameters * @returns Promise */ listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param callback The callback */ listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param options The optional parameters * @param callback The callback */ @@ -56,20 +56,20 @@ export class WebTests { /** * Get a specific Application Insights web test definition. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param webTestName The name of the Application Insights webtest resource. * @param [options] The optional parameters * @returns Promise */ get(resourceGroupName: string, webTestName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param webTestName The name of the Application Insights webtest resource. * @param callback The callback */ get(resourceGroupName: string, webTestName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param webTestName The name of the Application Insights webtest resource. * @param options The optional parameters * @param callback The callback @@ -88,7 +88,7 @@ export class WebTests { /** * Creates or updates an Application Insights web test definition. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param webTestName The name of the Application Insights webtest resource. * @param webTestDefinition Properties that need to be specified to create or update an Application * Insights web test definition. @@ -97,7 +97,7 @@ export class WebTests { */ createOrUpdate(resourceGroupName: string, webTestName: string, webTestDefinition: Models.WebTest, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param webTestName The name of the Application Insights webtest resource. * @param webTestDefinition Properties that need to be specified to create or update an Application * Insights web test definition. @@ -105,7 +105,7 @@ export class WebTests { */ createOrUpdate(resourceGroupName: string, webTestName: string, webTestDefinition: Models.WebTest, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param webTestName The name of the Application Insights webtest resource. * @param webTestDefinition Properties that need to be specified to create or update an Application * Insights web test definition. @@ -127,7 +127,7 @@ export class WebTests { /** * Creates or updates an Application Insights web test definition. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param webTestName The name of the Application Insights webtest resource. * @param webTestTags Updated tag information to set into the web test instance. * @param [options] The optional parameters @@ -135,14 +135,14 @@ export class WebTests { */ updateTags(resourceGroupName: string, webTestName: string, webTestTags: Models.TagsResource, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param webTestName The name of the Application Insights webtest resource. * @param webTestTags Updated tag information to set into the web test instance. * @param callback The callback */ updateTags(resourceGroupName: string, webTestName: string, webTestTags: Models.TagsResource, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param webTestName The name of the Application Insights webtest resource. * @param webTestTags Updated tag information to set into the web test instance. * @param options The optional parameters @@ -163,20 +163,20 @@ export class WebTests { /** * Deletes an Application Insights web test. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param webTestName The name of the Application Insights webtest resource. * @param [options] The optional parameters * @returns Promise */ deleteMethod(resourceGroupName: string, webTestName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param webTestName The name of the Application Insights webtest resource. * @param callback The callback */ deleteMethod(resourceGroupName: string, webTestName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param webTestName The name of the Application Insights webtest resource. * @param options The optional parameters * @param callback The callback @@ -194,7 +194,7 @@ export class WebTests { } /** - * Get all Application Insights web test alerts definitioned within a subscription. + * Get all Application Insights web test alerts definitions within a subscription. * @param [options] The optional parameters * @returns Promise */ @@ -220,20 +220,20 @@ export class WebTests { /** * Get all Application Insights web tests defined for the specified component. * @param componentName The name of the Application Insights component resource. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param [options] The optional parameters * @returns Promise */ listByComponent(componentName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param componentName The name of the Application Insights component resource. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param callback The callback */ listByComponent(componentName: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; /** * @param componentName The name of the Application Insights component resource. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param options The optional parameters * @param callback The callback */ @@ -278,7 +278,7 @@ export class WebTests { } /** - * Get all Application Insights web test alerts definitioned within a subscription. + * Get all Application Insights web test alerts definitions within a subscription. * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters * @returns Promise @@ -344,7 +344,7 @@ const listByResourceGroupOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -369,7 +369,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.webTestName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -394,7 +394,7 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { Parameters.webTestName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -426,7 +426,7 @@ const updateTagsOperationSpec: msRest.OperationSpec = { Parameters.webTestName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -458,7 +458,7 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { Parameters.webTestName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -480,7 +480,7 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -505,7 +505,7 @@ const listByComponentOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/applicationinsights/arm-appinsights/src/operations/workItemConfigurations.ts b/sdk/applicationinsights/arm-appinsights/src/operations/workItemConfigurations.ts index 5d8318641273..f3d0751cbcde 100644 --- a/sdk/applicationinsights/arm-appinsights/src/operations/workItemConfigurations.ts +++ b/sdk/applicationinsights/arm-appinsights/src/operations/workItemConfigurations.ts @@ -28,20 +28,20 @@ export class WorkItemConfigurations { /** * Gets the list work item configurations that exist for the application - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param [options] The optional parameters * @returns Promise */ list(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param callback The callback */ list(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param options The optional parameters * @param callback The callback @@ -60,7 +60,7 @@ export class WorkItemConfigurations { /** * Create a work item configuration for an Application Insights component. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param workItemConfigurationProperties Properties that need to be specified to create a work * item configuration of a Application Insights component. @@ -69,7 +69,7 @@ export class WorkItemConfigurations { */ create(resourceGroupName: string, resourceName: string, workItemConfigurationProperties: Models.WorkItemCreateConfiguration, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param workItemConfigurationProperties Properties that need to be specified to create a work * item configuration of a Application Insights component. @@ -77,7 +77,7 @@ export class WorkItemConfigurations { */ create(resourceGroupName: string, resourceName: string, workItemConfigurationProperties: Models.WorkItemCreateConfiguration, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param workItemConfigurationProperties Properties that need to be specified to create a work * item configuration of a Application Insights component. @@ -99,20 +99,20 @@ export class WorkItemConfigurations { /** * Gets default work item configurations that exist for the application - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param [options] The optional parameters * @returns Promise */ getDefault(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param callback The callback */ getDefault(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param options The optional parameters * @param callback The callback @@ -130,33 +130,33 @@ export class WorkItemConfigurations { } /** - * Delete an workitem configuration of an Application Insights component. - * @param resourceGroupName The name of the resource group. + * Delete a work item configuration of an Application Insights component. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param workItemConfigId The unique work item configuration Id. This can be either friendly name * of connector as defined in connector configuration * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - deleteMethod(resourceGroupName: string, resourceName: string, workItemConfigId: string, options?: msRest.RequestOptionsBase): Promise; + deleteMethod(resourceGroupName: string, resourceName: string, workItemConfigId: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param workItemConfigId The unique work item configuration Id. This can be either friendly name * of connector as defined in connector configuration * @param callback The callback */ - deleteMethod(resourceGroupName: string, resourceName: string, workItemConfigId: string, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, resourceName: string, workItemConfigId: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param workItemConfigId The unique work item configuration Id. This can be either friendly name * of connector as defined in connector configuration * @param options The optional parameters * @param callback The callback */ - deleteMethod(resourceGroupName: string, resourceName: string, workItemConfigId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteMethod(resourceGroupName: string, resourceName: string, workItemConfigId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + deleteMethod(resourceGroupName: string, resourceName: string, workItemConfigId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, resourceName: string, workItemConfigId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, @@ -165,7 +165,92 @@ export class WorkItemConfigurations { options }, deleteMethodOperationSpec, - callback) as Promise; + callback); + } + + /** + * Gets specified work item configuration for an Application Insights component. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param workItemConfigId The unique work item configuration Id. This can be either friendly name + * of connector as defined in connector configuration + * @param [options] The optional parameters + * @returns Promise + */ + getItem(resourceGroupName: string, resourceName: string, workItemConfigId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param workItemConfigId The unique work item configuration Id. This can be either friendly name + * of connector as defined in connector configuration + * @param callback The callback + */ + getItem(resourceGroupName: string, resourceName: string, workItemConfigId: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param workItemConfigId The unique work item configuration Id. This can be either friendly name + * of connector as defined in connector configuration + * @param options The optional parameters + * @param callback The callback + */ + getItem(resourceGroupName: string, resourceName: string, workItemConfigId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getItem(resourceGroupName: string, resourceName: string, workItemConfigId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + workItemConfigId, + options + }, + getItemOperationSpec, + callback) as Promise; + } + + /** + * Update a work item configuration for an Application Insights component. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param workItemConfigId The unique work item configuration Id. This can be either friendly name + * of connector as defined in connector configuration + * @param workItemConfigurationProperties Properties that need to be specified to update a work + * item configuration for this Application Insights component. + * @param [options] The optional parameters + * @returns Promise + */ + updateItem(resourceGroupName: string, resourceName: string, workItemConfigId: string, workItemConfigurationProperties: Models.WorkItemCreateConfiguration, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param workItemConfigId The unique work item configuration Id. This can be either friendly name + * of connector as defined in connector configuration + * @param workItemConfigurationProperties Properties that need to be specified to update a work + * item configuration for this Application Insights component. + * @param callback The callback + */ + updateItem(resourceGroupName: string, resourceName: string, workItemConfigId: string, workItemConfigurationProperties: Models.WorkItemCreateConfiguration, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param workItemConfigId The unique work item configuration Id. This can be either friendly name + * of connector as defined in connector configuration + * @param workItemConfigurationProperties Properties that need to be specified to update a work + * item configuration for this Application Insights component. + * @param options The optional parameters + * @param callback The callback + */ + updateItem(resourceGroupName: string, resourceName: string, workItemConfigId: string, workItemConfigurationProperties: Models.WorkItemCreateConfiguration, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + updateItem(resourceGroupName: string, resourceName: string, workItemConfigId: string, workItemConfigurationProperties: Models.WorkItemCreateConfiguration, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + workItemConfigId, + workItemConfigurationProperties, + options + }, + updateItemOperationSpec, + callback) as Promise; } } @@ -180,7 +265,7 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.resourceName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -205,7 +290,7 @@ const createOperationSpec: msRest.OperationSpec = { Parameters.resourceName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -237,7 +322,7 @@ const getDefaultOperationSpec: msRest.OperationSpec = { Parameters.resourceName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -263,19 +348,71 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { Parameters.workItemConfigId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getItemOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/WorkItemConfigs/{workItemConfigId}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.resourceName, + Parameters.workItemConfigId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.WorkItemConfiguration + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const updateItemOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/WorkItemConfigs/{workItemConfigId}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.resourceName, + Parameters.workItemConfigId + ], + queryParameters: [ + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage ], + requestBody: { + parameterPath: "workItemConfigurationProperties", + mapper: { + ...Mappers.WorkItemCreateConfiguration, + required: true + } + }, responses: { 200: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Object" - } - } + bodyMapper: Mappers.WorkItemConfiguration }, default: { bodyMapper: Mappers.CloudError diff --git a/sdk/applicationinsights/arm-appinsights/src/operations/workbooks.ts b/sdk/applicationinsights/arm-appinsights/src/operations/workbooks.ts index 7fa139f6e407..7d11428584ba 100644 --- a/sdk/applicationinsights/arm-appinsights/src/operations/workbooks.ts +++ b/sdk/applicationinsights/arm-appinsights/src/operations/workbooks.ts @@ -28,7 +28,7 @@ export class Workbooks { /** * Get all Workbooks defined within a specified resource group and category. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param category Category of workbook to return. Possible values include: 'workbook', 'TSG', * 'performance', 'retention' * @param [options] The optional parameters @@ -36,14 +36,14 @@ export class Workbooks { */ listByResourceGroup(resourceGroupName: string, category: Models.CategoryType, options?: Models.WorkbooksListByResourceGroupOptionalParams): Promise; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param category Category of workbook to return. Possible values include: 'workbook', 'TSG', * 'performance', 'retention' * @param callback The callback */ listByResourceGroup(resourceGroupName: string, category: Models.CategoryType, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param category Category of workbook to return. Possible values include: 'workbook', 'TSG', * 'performance', 'retention' * @param options The optional parameters @@ -63,20 +63,20 @@ export class Workbooks { /** * Get a single workbook by its resourceName. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param [options] The optional parameters * @returns Promise */ get(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param callback The callback */ get(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param options The optional parameters * @param callback The callback @@ -95,20 +95,20 @@ export class Workbooks { /** * Delete a workbook. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param [options] The optional parameters * @returns Promise */ deleteMethod(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param callback The callback */ deleteMethod(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param options The optional parameters * @param callback The callback @@ -127,7 +127,7 @@ export class Workbooks { /** * Create a new workbook. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param workbookProperties Properties that need to be specified to create a new workbook. * @param [options] The optional parameters @@ -135,14 +135,14 @@ export class Workbooks { */ createOrUpdate(resourceGroupName: string, resourceName: string, workbookProperties: Models.Workbook, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param workbookProperties Properties that need to be specified to create a new workbook. * @param callback The callback */ createOrUpdate(resourceGroupName: string, resourceName: string, workbookProperties: Models.Workbook, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param workbookProperties Properties that need to be specified to create a new workbook. * @param options The optional parameters @@ -163,7 +163,7 @@ export class Workbooks { /** * Updates a workbook that has already been added. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param workbookProperties Properties that need to be specified to create a new workbook. * @param [options] The optional parameters @@ -171,14 +171,14 @@ export class Workbooks { */ update(resourceGroupName: string, resourceName: string, workbookProperties: Models.Workbook, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param workbookProperties Properties that need to be specified to create a new workbook. * @param callback The callback */ update(resourceGroupName: string, resourceName: string, workbookProperties: Models.Workbook, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param workbookProperties Properties that need to be specified to create a new workbook. * @param options The optional parameters @@ -202,7 +202,7 @@ export class Workbooks { const serializer = new msRest.Serializer(Mappers); const listByResourceGroupOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/workbooks", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName @@ -211,7 +211,7 @@ const listByResourceGroupOperationSpec: msRest.OperationSpec = { Parameters.category, Parameters.tags, Parameters.canFetchContent, - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -229,14 +229,14 @@ const listByResourceGroupOperationSpec: msRest.OperationSpec = { const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.resourceName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -254,14 +254,14 @@ const getOperationSpec: msRest.OperationSpec = { const deleteMethodOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.resourceName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -278,14 +278,14 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { const createOrUpdateOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.resourceName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -313,14 +313,14 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { const updateOperationSpec: msRest.OperationSpec = { httpMethod: "PATCH", - path: "subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.resourceName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/applicationinsights/arm-appinsights/tsconfig.json b/sdk/applicationinsights/arm-appinsights/tsconfig.json index 87bbf5b5fa49..422b584abd5e 100644 --- a/sdk/applicationinsights/arm-appinsights/tsconfig.json +++ b/sdk/applicationinsights/arm-appinsights/tsconfig.json @@ -9,7 +9,7 @@ "esModuleInterop": true, "allowSyntheticDefaultImports": true, "forceConsistentCasingInFileNames": true, - "lib": ["es6"], + "lib": ["es6", "dom"], "declaration": true, "outDir": "./esm", "importHelpers": true diff --git a/sdk/appservice/arm-appservice/package.json b/sdk/appservice/arm-appservice/package.json index 61154fedf137..68fdad93c39b 100644 --- a/sdk/appservice/arm-appservice/package.json +++ b/sdk/appservice/arm-appservice/package.json @@ -2,7 +2,7 @@ "name": "@azure/arm-appservice", "author": "Microsoft Corporation", "description": "WebSiteManagementClient Library with typescript type definitions for node.js and browser.", - "version": "6.0.0", + "version": "6.1.0", "dependencies": { "@azure/ms-rest-azure-js": "^2.0.1", "@azure/ms-rest-js": "^2.0.4", diff --git a/sdk/appservice/arm-appservice/src/models/appServiceCertificateOrdersMappers.ts b/sdk/appservice/arm-appservice/src/models/appServiceCertificateOrdersMappers.ts index 65d6971efb4b..602615db47d6 100644 --- a/sdk/appservice/arm-appservice/src/models/appServiceCertificateOrdersMappers.ts +++ b/sdk/appservice/arm-appservice/src/models/appServiceCertificateOrdersMappers.ts @@ -29,6 +29,7 @@ export { AppServiceEnvironmentResource, AppServicePlan, AppServicePlanPatchResource, + ArmIdWrapper, AutoHealActions, AutoHealCustomAction, AutoHealRules, @@ -62,6 +63,8 @@ export { ContainerThrottlingData, ContinuousWebJob, CorsSettings, + CsmPublishingCredentialsPoliciesCollection, + CsmPublishingCredentialsPoliciesEntity, CustomHostnameAnalysisResult, DatabaseBackupSetting, DataSource, @@ -126,6 +129,9 @@ export { PrivateAccess, PrivateAccessSubnet, PrivateAccessVirtualNetwork, + PrivateEndpointConnectionResource, + PrivateLinkConnectionApprovalRequestResource, + PrivateLinkConnectionState, ProcessInfo, ProcessModuleInfo, ProcessThreadInfo, diff --git a/sdk/appservice/arm-appservice/src/models/appServiceEnvironmentsMappers.ts b/sdk/appservice/arm-appservice/src/models/appServiceEnvironmentsMappers.ts index 30dea6df1d7f..24322870e614 100644 --- a/sdk/appservice/arm-appservice/src/models/appServiceEnvironmentsMappers.ts +++ b/sdk/appservice/arm-appservice/src/models/appServiceEnvironmentsMappers.ts @@ -29,6 +29,7 @@ export { AppServicePlan, AppServicePlanCollection, AppServicePlanPatchResource, + ArmIdWrapper, AutoHealActions, AutoHealCustomAction, AutoHealRules, @@ -62,6 +63,8 @@ export { ContainerThrottlingData, ContinuousWebJob, CorsSettings, + CsmPublishingCredentialsPoliciesCollection, + CsmPublishingCredentialsPoliciesEntity, CsmUsageQuota, CsmUsageQuotaCollection, CustomHostnameAnalysisResult, @@ -136,6 +139,9 @@ export { PrivateAccess, PrivateAccessSubnet, PrivateAccessVirtualNetwork, + PrivateEndpointConnectionResource, + PrivateLinkConnectionApprovalRequestResource, + PrivateLinkConnectionState, ProcessInfo, ProcessModuleInfo, ProcessThreadInfo, diff --git a/sdk/appservice/arm-appservice/src/models/appServicePlansMappers.ts b/sdk/appservice/arm-appservice/src/models/appServicePlansMappers.ts index 4ba280f3dc30..89f827a39725 100644 --- a/sdk/appservice/arm-appservice/src/models/appServicePlansMappers.ts +++ b/sdk/appservice/arm-appservice/src/models/appServicePlansMappers.ts @@ -28,6 +28,7 @@ export { AppServicePlan, AppServicePlanCollection, AppServicePlanPatchResource, + ArmIdWrapper, AutoHealActions, AutoHealCustomAction, AutoHealRules, @@ -61,6 +62,8 @@ export { ContainerThrottlingData, ContinuousWebJob, CorsSettings, + CsmPublishingCredentialsPoliciesCollection, + CsmPublishingCredentialsPoliciesEntity, CsmUsageQuota, CsmUsageQuotaCollection, CustomHostnameAnalysisResult, @@ -128,6 +131,9 @@ export { PrivateAccess, PrivateAccessSubnet, PrivateAccessVirtualNetwork, + PrivateEndpointConnectionResource, + PrivateLinkConnectionApprovalRequestResource, + PrivateLinkConnectionState, ProcessInfo, ProcessModuleInfo, ProcessThreadInfo, diff --git a/sdk/appservice/arm-appservice/src/models/certificatesMappers.ts b/sdk/appservice/arm-appservice/src/models/certificatesMappers.ts index 8b93b8bc9d7b..2c69e05c0aca 100644 --- a/sdk/appservice/arm-appservice/src/models/certificatesMappers.ts +++ b/sdk/appservice/arm-appservice/src/models/certificatesMappers.ts @@ -27,6 +27,7 @@ export { AppServiceEnvironmentResource, AppServicePlan, AppServicePlanPatchResource, + ArmIdWrapper, AutoHealActions, AutoHealCustomAction, AutoHealRules, @@ -61,6 +62,8 @@ export { ContainerThrottlingData, ContinuousWebJob, CorsSettings, + CsmPublishingCredentialsPoliciesCollection, + CsmPublishingCredentialsPoliciesEntity, CustomHostnameAnalysisResult, DatabaseBackupSetting, DataSource, @@ -124,6 +127,9 @@ export { PrivateAccess, PrivateAccessSubnet, PrivateAccessVirtualNetwork, + PrivateEndpointConnectionResource, + PrivateLinkConnectionApprovalRequestResource, + PrivateLinkConnectionState, ProcessInfo, ProcessModuleInfo, ProcessThreadInfo, diff --git a/sdk/appservice/arm-appservice/src/models/deletedWebAppsMappers.ts b/sdk/appservice/arm-appservice/src/models/deletedWebAppsMappers.ts index 4ef20c6965c2..7d7900181c96 100644 --- a/sdk/appservice/arm-appservice/src/models/deletedWebAppsMappers.ts +++ b/sdk/appservice/arm-appservice/src/models/deletedWebAppsMappers.ts @@ -27,6 +27,7 @@ export { AppServiceEnvironmentResource, AppServicePlan, AppServicePlanPatchResource, + ArmIdWrapper, AutoHealActions, AutoHealCustomAction, AutoHealRules, @@ -60,6 +61,8 @@ export { ContainerThrottlingData, ContinuousWebJob, CorsSettings, + CsmPublishingCredentialsPoliciesCollection, + CsmPublishingCredentialsPoliciesEntity, CustomHostnameAnalysisResult, DatabaseBackupSetting, DataSource, @@ -124,6 +127,9 @@ export { PrivateAccess, PrivateAccessSubnet, PrivateAccessVirtualNetwork, + PrivateEndpointConnectionResource, + PrivateLinkConnectionApprovalRequestResource, + PrivateLinkConnectionState, ProcessInfo, ProcessModuleInfo, ProcessThreadInfo, diff --git a/sdk/appservice/arm-appservice/src/models/diagnosticsMappers.ts b/sdk/appservice/arm-appservice/src/models/diagnosticsMappers.ts index b948362a85a0..80b2ffdc8f6e 100644 --- a/sdk/appservice/arm-appservice/src/models/diagnosticsMappers.ts +++ b/sdk/appservice/arm-appservice/src/models/diagnosticsMappers.ts @@ -27,6 +27,7 @@ export { AppServiceEnvironmentResource, AppServicePlan, AppServicePlanPatchResource, + ArmIdWrapper, AutoHealActions, AutoHealCustomAction, AutoHealRules, @@ -60,6 +61,8 @@ export { ContainerThrottlingData, ContinuousWebJob, CorsSettings, + CsmPublishingCredentialsPoliciesCollection, + CsmPublishingCredentialsPoliciesEntity, CustomHostnameAnalysisResult, DatabaseBackupSetting, DataSource, @@ -127,6 +130,9 @@ export { PrivateAccess, PrivateAccessSubnet, PrivateAccessVirtualNetwork, + PrivateEndpointConnectionResource, + PrivateLinkConnectionApprovalRequestResource, + PrivateLinkConnectionState, ProcessInfo, ProcessModuleInfo, ProcessThreadInfo, diff --git a/sdk/appservice/arm-appservice/src/models/domainsMappers.ts b/sdk/appservice/arm-appservice/src/models/domainsMappers.ts index 0a5574a3c3d6..d63dc90e1df5 100644 --- a/sdk/appservice/arm-appservice/src/models/domainsMappers.ts +++ b/sdk/appservice/arm-appservice/src/models/domainsMappers.ts @@ -27,6 +27,7 @@ export { AppServiceEnvironmentResource, AppServicePlan, AppServicePlanPatchResource, + ArmIdWrapper, AutoHealActions, AutoHealCustomAction, AutoHealRules, @@ -60,6 +61,8 @@ export { ContainerThrottlingData, ContinuousWebJob, CorsSettings, + CsmPublishingCredentialsPoliciesCollection, + CsmPublishingCredentialsPoliciesEntity, CustomHostnameAnalysisResult, DatabaseBackupSetting, DataSource, @@ -130,6 +133,9 @@ export { PrivateAccess, PrivateAccessSubnet, PrivateAccessVirtualNetwork, + PrivateEndpointConnectionResource, + PrivateLinkConnectionApprovalRequestResource, + PrivateLinkConnectionState, ProcessInfo, ProcessModuleInfo, ProcessThreadInfo, diff --git a/sdk/appservice/arm-appservice/src/models/index.ts b/sdk/appservice/arm-appservice/src/models/index.ts index d6c41d772b85..d40a8d07d381 100644 --- a/sdk/appservice/arm-appservice/src/models/index.ts +++ b/sdk/appservice/arm-appservice/src/models/index.ts @@ -759,8 +759,8 @@ export interface ManagedServiceIdentityUserAssignedIdentitiesValue { */ export interface ManagedServiceIdentity { /** - * Type of managed service identity. Possible values include: 'None', 'SystemAssigned', - * 'UserAssigned' + * Type of managed service identity. Possible values include: 'SystemAssigned', 'UserAssigned', + * 'SystemAssigned, UserAssigned', 'None' */ type?: ManagedServiceIdentityType; /** @@ -1313,6 +1313,10 @@ export interface SiteConfig { * Version of Node.js. */ nodeVersion?: string; + /** + * Version of PowerShell. + */ + powerShellVersion?: string; /** * Linux App Framework and version */ @@ -1341,6 +1345,14 @@ export interface SiteConfig { * true if HTTP logging is enabled; otherwise, false. */ httpLoggingEnabled?: boolean; + /** + * Flag to use Managed Identity Creds for ACR pull + */ + acrUseManagedIdentityCreds?: boolean; + /** + * If using user managed identity, the user managed identity ClientId + */ + acrUserManagedIdentityID?: string; /** * HTTP logs directory size limit. */ @@ -4286,7 +4298,8 @@ export interface ApiKVReference { secretName?: string; secretVersion?: string; /** - * Possible values include: 'None', 'SystemAssigned', 'UserAssigned' + * Possible values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', + * 'None' */ identityType?: ManagedServiceIdentityType; details?: string; @@ -4363,6 +4376,16 @@ export interface ApplicationLogsConfig { azureBlobStorage?: AzureBlobStorageApplicationLogsConfig; } +/** + * A wrapper for an ARM resource id + */ +export interface ArmIdWrapper { + /** + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; +} + /** * Http logs to azure blob storage configuration. */ @@ -4744,6 +4767,30 @@ export interface CsmCopySlotEntity { siteConfig: SiteConfig; } +/** + * Publishing Credentials Policies parameters. + */ +export interface CsmPublishingCredentialsPoliciesEntity extends ProxyOnlyResource { + /** + * true to allow access to a publishing method; otherwise, false. + */ + allow: boolean; +} + +/** + * Publishing Credentials Policies collection. + */ +export interface CsmPublishingCredentialsPoliciesCollection extends ProxyOnlyResource { + /** + * Whether FTP is allowed. + */ + ftp: CsmPublishingCredentialsPoliciesEntity; + /** + * Whether Scm Basic Auth is allowed. + */ + scm: CsmPublishingCredentialsPoliciesEntity; +} + /** * Publishing options for requested profile. */ @@ -5115,7 +5162,8 @@ export interface KeyVaultReferenceResource extends ProxyOnlyResource { secretName?: string; secretVersion?: string; /** - * Possible values include: 'None', 'SystemAssigned', 'UserAssigned' + * Possible values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', + * 'None' */ identityType?: ManagedServiceIdentityType; details?: string; @@ -5491,6 +5539,90 @@ export interface PrivateAccess extends ProxyOnlyResource { virtualNetworks?: PrivateAccessVirtualNetwork[]; } +/** + * The state of a private link connection + */ +export interface PrivateLinkConnectionState { + /** + * Status of a private link connection + */ + status?: string; + /** + * Description of a private link connection + */ + description?: string; + /** + * ActionsRequired for a private link connection + */ + actionsRequired?: string; +} + +/** + * Private Endpoint Connection ARM resource. + */ +export interface PrivateEndpointConnectionResource extends ProxyOnlyResource { + /** + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: string; + /** + * PrivateEndpoint of a remote private endpoint connection + */ + privateEndpoint?: ArmIdWrapper; + privateLinkServiceConnectionState?: PrivateLinkConnectionState; +} + +/** + * Private Endpoint Connection Approval ARM resource. + */ +export interface PrivateLinkConnectionApprovalRequestResource extends ProxyOnlyResource { + privateLinkServiceConnectionState?: PrivateLinkConnectionState; +} + +/** + * Properties of a private link resource + */ +export interface PrivateLinkResourceProperties { + /** + * GroupId of a private link resource + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly groupId?: string; + /** + * RequiredMembers of a private link resource + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly requiredMembers?: string[]; + /** + * RequiredZoneNames of a private link resource + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly requiredZoneNames?: string[]; +} + +/** + * A private link resource + */ +export interface PrivateLinkResource { + id: string; + /** + * Name of a private link resource + */ + name: string; + type: string; + /** + * Properties of a private link resource + */ + properties: PrivateLinkResourceProperties; +} + +/** + * Wrapper for a collection of private link resources + */ +export interface PrivateLinkResourcesWrapper { + value: PrivateLinkResource[]; +} + /** * Process Thread Information. */ @@ -6056,6 +6188,10 @@ export interface SiteConfigResource extends ProxyOnlyResource { * Version of Node.js. */ nodeVersion?: string; + /** + * Version of PowerShell. + */ + powerShellVersion?: string; /** * Linux App Framework and version */ @@ -6084,6 +6220,14 @@ export interface SiteConfigResource extends ProxyOnlyResource { * true if HTTP logging is enabled; otherwise, false. */ httpLoggingEnabled?: boolean; + /** + * Flag to use Managed Identity Creds for ACR pull + */ + acrUseManagedIdentityCreds?: boolean; + /** + * If using user managed identity, the user managed identity ClientId + */ + acrUserManagedIdentityID?: string; /** * HTTP logs directory size limit. */ @@ -7876,8 +8020,9 @@ export interface AppServicePlanPatchResource extends ProxyOnlyResource { */ readonly resourceGroup?: string; /** - * If Linux app service plan true, false otherwise. Default value: - * false. + * This needs to set to true when creating a Linux App Service Plan, along with + * kind set to Linux. It should be false otherwise. + * Default value: false. */ reserved?: boolean; /** @@ -9554,11 +9699,12 @@ export type RouteType = 'DEFAULT' | 'INHERITED' | 'STATIC'; /** * Defines values for ManagedServiceIdentityType. - * Possible values include: 'None', 'SystemAssigned', 'UserAssigned' + * Possible values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', + * 'None' * @readonly * @enum {string} */ -export type ManagedServiceIdentityType = 'None' | 'SystemAssigned' | 'UserAssigned'; +export type ManagedServiceIdentityType = 'SystemAssigned' | 'UserAssigned' | 'SystemAssigned, UserAssigned' | 'None'; /** * Defines values for IpFilterTag. @@ -12755,6 +12901,106 @@ export type WebAppsListBackupStatusSecretsResponse = BackupItem & { }; }; +/** + * Contains response data for the getBasicPublishingCredentialsPolicies operation. + */ +export type WebAppsGetBasicPublishingCredentialsPoliciesResponse = CsmPublishingCredentialsPoliciesCollection & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: CsmPublishingCredentialsPoliciesCollection; + }; +}; + +/** + * Contains response data for the getFtpAllowed operation. + */ +export type WebAppsGetFtpAllowedResponse = CsmPublishingCredentialsPoliciesEntity & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: CsmPublishingCredentialsPoliciesEntity; + }; +}; + +/** + * Contains response data for the updateFtpAllowed operation. + */ +export type WebAppsUpdateFtpAllowedResponse = CsmPublishingCredentialsPoliciesEntity & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: CsmPublishingCredentialsPoliciesEntity; + }; +}; + +/** + * Contains response data for the getScmAllowed operation. + */ +export type WebAppsGetScmAllowedResponse = CsmPublishingCredentialsPoliciesEntity & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: CsmPublishingCredentialsPoliciesEntity; + }; +}; + +/** + * Contains response data for the updateScmAllowed operation. + */ +export type WebAppsUpdateScmAllowedResponse = CsmPublishingCredentialsPoliciesEntity & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: CsmPublishingCredentialsPoliciesEntity; + }; +}; + /** * Contains response data for the listConfigurations operation. */ @@ -17063,6 +17309,91 @@ export type WebAppsPutPrivateAccessVnetSlotResponse = PrivateAccess & { }; }; +/** + * Contains response data for the getPrivateEndpointConnection operation. + */ +export type WebAppsGetPrivateEndpointConnectionResponse = PrivateEndpointConnectionResource & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PrivateEndpointConnectionResource; + }; +}; + +/** + * Contains response data for the approveOrRejectPrivateEndpointConnection operation. + */ +export type WebAppsApproveOrRejectPrivateEndpointConnectionResponse = PrivateEndpointConnectionResource & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PrivateEndpointConnectionResource; + }; +}; + +/** + * Contains response data for the deletePrivateEndpointConnection operation. + */ +export type WebAppsDeletePrivateEndpointConnectionResponse = { + /** + * The parsed response body. + */ + body: any; + + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: any; + }; +}; + +/** + * Contains response data for the getPrivateLinkResources operation. + */ +export type WebAppsGetPrivateLinkResourcesResponse = PrivateLinkResourcesWrapper & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PrivateLinkResourcesWrapper; + }; +}; + /** * Contains response data for the listProcessesSlot operation. */ @@ -18475,6 +18806,51 @@ export type WebAppsBeginStartWebSiteNetworkTraceOperationSlotResponse = Array lroPoller.pollUntilFinished()); } + /** + * Description for Returns whether Scm basic auth is allowed and whether Ftp is allowed for a given + * site. + * @summary Returns whether Scm basic auth is allowed and whether Ftp is allowed for a given site. + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param [options] The optional parameters + * @returns Promise + */ + getBasicPublishingCredentialsPolicies(resourceGroupName: string, name: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param callback The callback + */ + getBasicPublishingCredentialsPolicies(resourceGroupName: string, name: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param options The optional parameters + * @param callback The callback + */ + getBasicPublishingCredentialsPolicies(resourceGroupName: string, name: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getBasicPublishingCredentialsPolicies(resourceGroupName: string, name: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + name, + options + }, + getBasicPublishingCredentialsPoliciesOperationSpec, + callback) as Promise; + } + + /** + * Description for Returns whether FTP is allowed on the site or not. + * @summary Returns whether FTP is allowed on the site or not. + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param [options] The optional parameters + * @returns Promise + */ + getFtpAllowed(resourceGroupName: string, name: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param callback The callback + */ + getFtpAllowed(resourceGroupName: string, name: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param options The optional parameters + * @param callback The callback + */ + getFtpAllowed(resourceGroupName: string, name: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getFtpAllowed(resourceGroupName: string, name: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + name, + options + }, + getFtpAllowedOperationSpec, + callback) as Promise; + } + + /** + * Description for Updates whether FTP is allowed on the site or not. + * @summary Updates whether FTP is allowed on the site or not. + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param csmPublishingAccessPoliciesEntity + * @param [options] The optional parameters + * @returns Promise + */ + updateFtpAllowed(resourceGroupName: string, name: string, csmPublishingAccessPoliciesEntity: Models.CsmPublishingCredentialsPoliciesEntity, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param csmPublishingAccessPoliciesEntity + * @param callback The callback + */ + updateFtpAllowed(resourceGroupName: string, name: string, csmPublishingAccessPoliciesEntity: Models.CsmPublishingCredentialsPoliciesEntity, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param csmPublishingAccessPoliciesEntity + * @param options The optional parameters + * @param callback The callback + */ + updateFtpAllowed(resourceGroupName: string, name: string, csmPublishingAccessPoliciesEntity: Models.CsmPublishingCredentialsPoliciesEntity, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + updateFtpAllowed(resourceGroupName: string, name: string, csmPublishingAccessPoliciesEntity: Models.CsmPublishingCredentialsPoliciesEntity, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + name, + csmPublishingAccessPoliciesEntity, + options + }, + updateFtpAllowedOperationSpec, + callback) as Promise; + } + + /** + * Description for Returns whether Scm basic auth is allowed on the site or not. + * @summary Returns whether Scm basic auth is allowed on the site or not. + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param [options] The optional parameters + * @returns Promise + */ + getScmAllowed(resourceGroupName: string, name: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param callback The callback + */ + getScmAllowed(resourceGroupName: string, name: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param options The optional parameters + * @param callback The callback + */ + getScmAllowed(resourceGroupName: string, name: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getScmAllowed(resourceGroupName: string, name: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + name, + options + }, + getScmAllowedOperationSpec, + callback) as Promise; + } + + /** + * Description for Updates whether user publishing credentials are allowed on the site or not. + * @summary Updates whether user publishing credentials are allowed on the site or not. + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param csmPublishingAccessPoliciesEntity + * @param [options] The optional parameters + * @returns Promise + */ + updateScmAllowed(resourceGroupName: string, name: string, csmPublishingAccessPoliciesEntity: Models.CsmPublishingCredentialsPoliciesEntity, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param csmPublishingAccessPoliciesEntity + * @param callback The callback + */ + updateScmAllowed(resourceGroupName: string, name: string, csmPublishingAccessPoliciesEntity: Models.CsmPublishingCredentialsPoliciesEntity, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param csmPublishingAccessPoliciesEntity + * @param options The optional parameters + * @param callback The callback + */ + updateScmAllowed(resourceGroupName: string, name: string, csmPublishingAccessPoliciesEntity: Models.CsmPublishingCredentialsPoliciesEntity, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + updateScmAllowed(resourceGroupName: string, name: string, csmPublishingAccessPoliciesEntity: Models.CsmPublishingCredentialsPoliciesEntity, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + name, + csmPublishingAccessPoliciesEntity, + options + }, + updateScmAllowedOperationSpec, + callback) as Promise; + } + /** * Description for List the configurations of an app * @summary List the configurations of an app @@ -10635,6 +10809,105 @@ export class WebApps { callback) as Promise; } + /** + * Description for Gets a private endpoint connection + * @summary Gets a private endpoint connection + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName + * @param [options] The optional parameters + * @returns Promise + */ + getPrivateEndpointConnection(resourceGroupName: string, name: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName + * @param callback The callback + */ + getPrivateEndpointConnection(resourceGroupName: string, name: string, privateEndpointConnectionName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName + * @param options The optional parameters + * @param callback The callback + */ + getPrivateEndpointConnection(resourceGroupName: string, name: string, privateEndpointConnectionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getPrivateEndpointConnection(resourceGroupName: string, name: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + name, + privateEndpointConnectionName, + options + }, + getPrivateEndpointConnectionOperationSpec, + callback) as Promise; + } + + /** + * Description for Approves or rejects a private endpoint connection + * @summary Approves or rejects a private endpoint connection + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName + * @param privateEndpointWrapper + * @param [options] The optional parameters + * @returns Promise + */ + approveOrRejectPrivateEndpointConnection(resourceGroupName: string, name: string, privateEndpointConnectionName: string, privateEndpointWrapper: Models.PrivateLinkConnectionApprovalRequestResource, options?: msRest.RequestOptionsBase): Promise { + return this.beginApproveOrRejectPrivateEndpointConnection(resourceGroupName,name,privateEndpointConnectionName,privateEndpointWrapper,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Description for Deletes a private endpoint connection + * @summary Deletes a private endpoint connection + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName + * @param [options] The optional parameters + * @returns Promise + */ + deletePrivateEndpointConnection(resourceGroupName: string, name: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeletePrivateEndpointConnection(resourceGroupName,name,privateEndpointConnectionName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Description for Gets the private link resources + * @summary Gets the private link resources + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param [options] The optional parameters + * @returns Promise + */ + getPrivateLinkResources(resourceGroupName: string, name: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param callback The callback + */ + getPrivateLinkResources(resourceGroupName: string, name: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param options The optional parameters + * @param callback The callback + */ + getPrivateLinkResources(resourceGroupName: string, name: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getPrivateLinkResources(resourceGroupName: string, name: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + name, + options + }, + getPrivateLinkResourcesOperationSpec, + callback) as Promise; + } + /** * Description for Get list of processes for a web site, or a deployment slot, or for a specific * scaled-out instance in a web site. @@ -14251,6 +14524,50 @@ export class WebApps { options); } + /** + * Description for Approves or rejects a private endpoint connection + * @summary Approves or rejects a private endpoint connection + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName + * @param privateEndpointWrapper + * @param [options] The optional parameters + * @returns Promise + */ + beginApproveOrRejectPrivateEndpointConnection(resourceGroupName: string, name: string, privateEndpointConnectionName: string, privateEndpointWrapper: Models.PrivateLinkConnectionApprovalRequestResource, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + name, + privateEndpointConnectionName, + privateEndpointWrapper, + options + }, + beginApproveOrRejectPrivateEndpointConnectionOperationSpec, + options); + } + + /** + * Description for Deletes a private endpoint connection + * @summary Deletes a private endpoint connection + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName + * @param [options] The optional parameters + * @returns Promise + */ + beginDeletePrivateEndpointConnection(resourceGroupName: string, name: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + name, + privateEndpointConnectionName, + options + }, + beginDeletePrivateEndpointConnectionOperationSpec, + options); + } + /** * Description for Restores an app from a backup blob in Azure Storage. * @summary Restores an app from a backup blob in Azure Storage. @@ -16460,6 +16777,145 @@ const listBackupStatusSecretsOperationSpec: msRest.OperationSpec = { serializer }; +const getBasicPublishingCredentialsPoliciesOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.name, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.CsmPublishingCredentialsPoliciesCollection + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + serializer +}; + +const getFtpAllowedOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.name, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.CsmPublishingCredentialsPoliciesEntity + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + serializer +}; + +const updateFtpAllowedOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.name, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "csmPublishingAccessPoliciesEntity", + mapper: { + ...Mappers.CsmPublishingCredentialsPoliciesEntity, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.CsmPublishingCredentialsPoliciesEntity + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + serializer +}; + +const getScmAllowedOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.name, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.CsmPublishingCredentialsPoliciesEntity + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + serializer +}; + +const updateScmAllowedOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.name, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "csmPublishingAccessPoliciesEntity", + mapper: { + ...Mappers.CsmPublishingCredentialsPoliciesEntity, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.CsmPublishingCredentialsPoliciesEntity + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + serializer +}; + const listConfigurationsOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config", @@ -23499,6 +23955,57 @@ const putPrivateAccessVnetSlotOperationSpec: msRest.OperationSpec = { serializer }; +const getPrivateEndpointConnectionOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.name, + Parameters.privateEndpointConnectionName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnectionResource + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + serializer +}; + +const getPrivateLinkResourcesOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateLinkResources", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.name, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResourcesWrapper + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + serializer +}; + const listProcessesSlotOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes", @@ -26274,6 +26781,89 @@ const beginStartWebSiteNetworkTraceOperationSlotOperationSpec: msRest.OperationS serializer }; +const beginApproveOrRejectPrivateEndpointConnectionOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.name, + Parameters.privateEndpointConnectionName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "privateEndpointWrapper", + mapper: { + ...Mappers.PrivateLinkConnectionApprovalRequestResource, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnectionResource + }, + 202: { + bodyMapper: Mappers.PrivateEndpointConnectionResource + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + serializer +}; + +const beginDeletePrivateEndpointConnectionOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.name, + Parameters.privateEndpointConnectionName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: { + serializedName: "parsedResponse", + type: { + name: "Object" + } + } + }, + 202: { + bodyMapper: { + serializedName: "parsedResponse", + type: { + name: "Object" + } + } + }, + 204: { + bodyMapper: { + serializedName: "parsedResponse", + type: { + name: "Object" + } + } + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + serializer +}; + const beginRestoreFromBackupBlobSlotOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob", diff --git a/sdk/appservice/arm-appservice/src/webSiteManagementClientContext.ts b/sdk/appservice/arm-appservice/src/webSiteManagementClientContext.ts index 937742eb5665..6313700b1278 100644 --- a/sdk/appservice/arm-appservice/src/webSiteManagementClientContext.ts +++ b/sdk/appservice/arm-appservice/src/webSiteManagementClientContext.ts @@ -13,7 +13,7 @@ import * as msRest from "@azure/ms-rest-js"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-appservice"; -const packageVersion = "6.0.0"; +const packageVersion = "6.1.0"; export class WebSiteManagementClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials; diff --git a/sdk/digitaltwins/digital-twins/LICENSE.txt b/sdk/azurestackhci/arm-azurestackhci/LICENSE.txt similarity index 100% rename from sdk/digitaltwins/digital-twins/LICENSE.txt rename to sdk/azurestackhci/arm-azurestackhci/LICENSE.txt diff --git a/sdk/azurestackhci/arm-azurestackhci/README.md b/sdk/azurestackhci/arm-azurestackhci/README.md new file mode 100644 index 000000000000..54ed8d33c65a --- /dev/null +++ b/sdk/azurestackhci/arm-azurestackhci/README.md @@ -0,0 +1,99 @@ +## Azure AzureStackHCIClient SDK for JavaScript + +This package contains an isomorphic SDK for AzureStackHCIClient. + +### Currently supported environments + +- Node.js version 6.x.x or higher +- Browser JavaScript + +### How to Install + +```bash +npm install @azure/arm-azurestackhci +``` + +### How to use + +#### nodejs - Authentication, client creation and list operations as an example written in TypeScript. + +##### Install @azure/ms-rest-nodeauth + +- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. +```bash +npm install @azure/ms-rest-nodeauth@"^3.0.0" +``` + +##### Sample code + +```typescript +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; +import { AzureStackHCIClient, AzureStackHCIModels, AzureStackHCIMappers } from "@azure/arm-azurestackhci"; +const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; + +msRestNodeAuth.interactiveLogin().then((creds) => { + const client = new AzureStackHCIClient(creds, subscriptionId); + client.operations.list().then((result) => { + console.log("The result is:"); + console.log(result); + }); +}).catch((err) => { + console.error(err); +}); +``` + +#### browser - Authentication, client creation and list operations as an example written in JavaScript. + +##### Install @azure/ms-rest-browserauth + +```bash +npm install @azure/ms-rest-browserauth +``` + +##### Sample code + +See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. + +- index.html +```html + + + + @azure/arm-azurestackhci sample + + + + + + + + +``` + +## Related projects + +- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/azurestackhci/arm-azurestackhci/README.png) diff --git a/sdk/azurestackhci/arm-azurestackhci/package.json b/sdk/azurestackhci/arm-azurestackhci/package.json new file mode 100644 index 000000000000..95df5ac728c2 --- /dev/null +++ b/sdk/azurestackhci/arm-azurestackhci/package.json @@ -0,0 +1,58 @@ +{ + "name": "@azure/arm-azurestackhci", + "author": "Microsoft Corporation", + "description": "AzureStackHCIClient Library with typescript type definitions for node.js and browser.", + "version": "1.0.0", + "dependencies": { + "@azure/ms-rest-azure-js": "^2.0.1", + "@azure/ms-rest-js": "^2.0.4", + "tslib": "^1.10.0" + }, + "keywords": [ + "node", + "azure", + "typescript", + "browser", + "isomorphic" + ], + "license": "MIT", + "main": "./dist/arm-azurestackhci.js", + "module": "./esm/azureStackHCIClient.js", + "types": "./esm/azureStackHCIClient.d.ts", + "devDependencies": { + "typescript": "^3.5.3", + "rollup": "^1.18.0", + "rollup-plugin-node-resolve": "^5.2.0", + "rollup-plugin-sourcemaps": "^0.4.2", + "uglify-js": "^3.6.0" + }, + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/azurestackhci/arm-azurestackhci", + "repository": { + "type": "git", + "url": "https://github.com/Azure/azure-sdk-for-js.git" + }, + "bugs": { + "url": "https://github.com/Azure/azure-sdk-for-js/issues" + }, + "files": [ + "dist/**/*.js", + "dist/**/*.js.map", + "dist/**/*.d.ts", + "dist/**/*.d.ts.map", + "esm/**/*.js", + "esm/**/*.js.map", + "esm/**/*.d.ts", + "esm/**/*.d.ts.map", + "src/**/*.ts", + "README.md", + "rollup.config.js", + "tsconfig.json" + ], + "scripts": { + "build": "tsc && rollup -c rollup.config.js && npm run minify", + "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/arm-azurestackhci.js.map'\" -o ./dist/arm-azurestackhci.min.js ./dist/arm-azurestackhci.js", + "prepack": "npm install && npm run build" + }, + "sideEffects": false, + "autoPublish": true +} diff --git a/sdk/azurestackhci/arm-azurestackhci/rollup.config.js b/sdk/azurestackhci/arm-azurestackhci/rollup.config.js new file mode 100644 index 000000000000..06178ceba9e5 --- /dev/null +++ b/sdk/azurestackhci/arm-azurestackhci/rollup.config.js @@ -0,0 +1,37 @@ +import rollup from "rollup"; +import nodeResolve from "rollup-plugin-node-resolve"; +import sourcemaps from "rollup-plugin-sourcemaps"; + +/** + * @type {rollup.RollupFileOptions} + */ +const config = { + input: "./esm/azureStackHCIClient.js", + external: [ + "@azure/ms-rest-js", + "@azure/ms-rest-azure-js" + ], + output: { + file: "./dist/arm-azurestackhci.js", + format: "umd", + name: "Azure.ArmAzurestackhci", + sourcemap: true, + globals: { + "@azure/ms-rest-js": "msRest", + "@azure/ms-rest-azure-js": "msRestAzure" + }, + banner: `/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */` + }, + plugins: [ + nodeResolve({ mainFields: ['module', 'main'] }), + sourcemaps() + ] +}; + +export default config; diff --git a/sdk/azurestackhci/arm-azurestackhci/src/azureStackHCIClient.ts b/sdk/azurestackhci/arm-azurestackhci/src/azureStackHCIClient.ts new file mode 100644 index 000000000000..1d411dcbd664 --- /dev/null +++ b/sdk/azurestackhci/arm-azurestackhci/src/azureStackHCIClient.ts @@ -0,0 +1,44 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * 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 * as msRest from "@azure/ms-rest-js"; +import * as Models from "./models"; +import * as Mappers from "./models/mappers"; +import * as operations from "./operations"; +import { AzureStackHCIClientContext } from "./azureStackHCIClientContext"; + + +class AzureStackHCIClient extends AzureStackHCIClientContext { + // Operation groups + operations: operations.Operations; + clusters: operations.Clusters; + + /** + * Initializes a new instance of the AzureStackHCIClient class. + * @param credentials Credentials needed for the client to connect to Azure. + * @param subscriptionId The ID of the target subscription. + * @param [options] The parameter options + */ + constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.AzureStackHCIClientOptions) { + super(credentials, subscriptionId, options); + this.operations = new operations.Operations(this); + this.clusters = new operations.Clusters(this); + } +} + +// Operation Specifications + +export { + AzureStackHCIClient, + AzureStackHCIClientContext, + Models as AzureStackHCIModels, + Mappers as AzureStackHCIMappers +}; +export * from "./operations"; diff --git a/sdk/azurestackhci/arm-azurestackhci/src/azureStackHCIClientContext.ts b/sdk/azurestackhci/arm-azurestackhci/src/azureStackHCIClientContext.ts new file mode 100644 index 000000000000..b820335844ca --- /dev/null +++ b/sdk/azurestackhci/arm-azurestackhci/src/azureStackHCIClientContext.ts @@ -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 * as Models from "./models"; +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; + +const packageName = "@azure/arm-azurestackhci"; +const packageVersion = "1.0.0"; + +export class AzureStackHCIClientContext extends msRestAzure.AzureServiceClient { + credentials: msRest.ServiceClientCredentials; + apiVersion?: string; + subscriptionId: string; + + /** + * Initializes a new instance of the AzureStackHCIClient class. + * @param credentials Credentials needed for the client to connect to Azure. + * @param subscriptionId The ID of the target subscription. + * @param [options] The parameter options + */ + constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.AzureStackHCIClientOptions) { + if (credentials == undefined) { + throw new Error('\'credentials\' cannot be null.'); + } + if (subscriptionId == undefined) { + throw new Error('\'subscriptionId\' cannot be null.'); + } + + if (!options) { + options = {}; + } + if(!options.userAgent) { + const defaultUserAgent = msRestAzure.getDefaultUserAgentValue(); + options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`; + } + + super(credentials, options); + + this.apiVersion = '2020-03-01-preview'; + this.acceptLanguage = 'en-US'; + this.longRunningOperationRetryTimeout = 30; + this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; + this.requestContentType = "application/json; charset=utf-8"; + this.credentials = credentials; + this.subscriptionId = subscriptionId; + + if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) { + this.acceptLanguage = options.acceptLanguage; + } + if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { + this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout; + } + } +} diff --git a/sdk/azurestackhci/arm-azurestackhci/src/models/clustersMappers.ts b/sdk/azurestackhci/arm-azurestackhci/src/models/clustersMappers.ts new file mode 100644 index 000000000000..5eff99898d82 --- /dev/null +++ b/sdk/azurestackhci/arm-azurestackhci/src/models/clustersMappers.ts @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + AzureEntityResource, + BaseResource, + Cluster, + ClusterList, + ClusterNode, + ClusterReportedProperties, + ClusterUpdate, + ErrorAdditionalInfo, + ErrorResponse, + ErrorResponseError, + ProxyResource, + Resource, + TrackedResource +} from "../models/mappers"; diff --git a/sdk/azurestackhci/arm-azurestackhci/src/models/index.ts b/sdk/azurestackhci/arm-azurestackhci/src/models/index.ts new file mode 100644 index 000000000000..a72c11439ebe --- /dev/null +++ b/sdk/azurestackhci/arm-azurestackhci/src/models/index.ts @@ -0,0 +1,546 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for 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 { BaseResource, CloudError, AzureServiceClientOptions } from "@azure/ms-rest-azure-js"; +import * as msRest from "@azure/ms-rest-js"; + +export { BaseResource, CloudError }; + +/** + * Cluster node details. + */ +export interface ClusterNode { + /** + * Name of the cluster node. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * Id of the node in the cluster. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: number; + /** + * Manufacturer of the cluster node hardware. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly manufacturer?: string; + /** + * Model name of the cluster node hardware. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly model?: string; + /** + * Operating system running on the cluster node. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly osName?: string; + /** + * Version of the operating system running on the cluster node. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly osVersion?: string; + /** + * Immutable id of the cluster node. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly serialNumber?: string; + /** + * Number of physical cores on the cluster node. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly coreCount?: number; + /** + * Total available memory on the cluster node (in GiB). + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly memoryInGiB?: number; +} + +/** + * Properties reported by cluster agent. + */ +export interface ClusterReportedProperties { + /** + * Name of the on-prem cluster connected to this resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly clusterName?: string; + /** + * Unique id generated by the on-prem cluster. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly clusterId?: string; + /** + * Version of the cluster software. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly clusterVersion?: string; + /** + * List of nodes reported by the cluster. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nodes?: ClusterNode[]; + /** + * Last time the cluster reported the data. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly lastUpdated?: Date; +} + +/** + * An interface representing Resource. + */ +export interface Resource extends BaseResource { + /** + * Fully qualified resource Id for the resource. Ex - + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * The name of the resource + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * The type of the resource. Ex- Microsoft.Compute/virtualMachines or + * Microsoft.Storage/storageAccounts. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; +} + +/** + * The resource model definition for a ARM tracked top level resource + */ +export interface TrackedResource extends Resource { + /** + * Resource tags. + */ + tags?: { [propertyName: string]: string }; + /** + * The geo-location where the resource lives + */ + location: string; +} + +/** + * Cluster details. + */ +export interface Cluster extends TrackedResource { + /** + * Provisioning state. Possible values include: 'Succeeded', 'Failed', 'Canceled', 'Accepted', + * 'Provisioning' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: ProvisioningState; + /** + * Status of the cluster agent. Possible values include: 'NotYetRegistered', 'ConnectedRecently', + * 'NotConnectedRecently', 'Disconnected', 'Error' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly status?: Status; + /** + * Unique, immutable resource id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly cloudId?: string; + /** + * App id of cluster AAD identity. + */ + aadClientId: string; + /** + * Tenant id of cluster AAD identity. + */ + aadTenantId: string; + /** + * Properties reported by cluster agent. + */ + reportedProperties?: ClusterReportedProperties; + /** + * Number of days remaining in the trial period. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly trialDaysRemaining?: number; + /** + * Type of billing applied to the resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingModel?: string; + /** + * First cluster sync timestamp. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly registrationTimestamp?: Date; + /** + * Most recent cluster sync timestamp. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly lastSyncTimestamp?: Date; + /** + * Most recent billing meter timestamp. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly lastBillingTimestamp?: Date; +} + +/** + * Cluster details to update. + */ +export interface ClusterUpdate { + /** + * Resource tags. + */ + tags?: { [propertyName: string]: string }; +} + +/** + * Operation display payload + */ +export interface OperationDisplay { + /** + * Resource provider of the operation + */ + provider?: string; + /** + * Resource of the operation + */ + resource?: string; + /** + * Localized friendly name for the operation + */ + operation?: string; + /** + * Localized friendly description for the operation + */ + description?: string; +} + +/** + * Operation detail payload + */ +export interface OperationDetail { + /** + * Name of the operation + */ + name?: string; + /** + * Indicates whether the operation is a data action + */ + isDataAction?: boolean; + /** + * Display of the operation + */ + display?: OperationDisplay; + /** + * Origin of the operation + */ + origin?: string; + /** + * Properties of the operation + */ + properties?: any; +} + +/** + * Available operations of the service + */ +export interface AvailableOperations { + /** + * Collection of available operation details + */ + value?: OperationDetail[]; + /** + * URL client should use to fetch the next page (per server side paging). + * It's null for now, added for future use. + */ + nextLink?: string; +} + +/** + * The resource model definition for a ARM proxy resource. It will have everything other than + * required location and tags + */ +export interface ProxyResource extends Resource { +} + +/** + * The resource model definition for a Azure Resource Manager resource with an etag. + */ +export interface AzureEntityResource extends Resource { + /** + * Resource Etag. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly etag?: string; +} + +/** + * The resource management error additional info. + */ +export interface ErrorAdditionalInfo { + /** + * The additional info type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * The additional info. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly info?: any; +} + +/** + * The error object. + */ +export interface ErrorResponseError { + /** + * The error code. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly code?: string; + /** + * The error message. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly message?: string; + /** + * The error target. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly target?: string; + /** + * The error details. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly details?: ErrorResponse[]; + /** + * The error additional info. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly additionalInfo?: ErrorAdditionalInfo[]; +} + +/** + * The resource management error response. + */ +export interface ErrorResponse { + /** + * The error object. + */ + error?: ErrorResponseError; +} + +/** + * Optional Parameters. + */ +export interface ClustersUpdateOptionalParams extends msRest.RequestOptionsBase { + /** + * Resource tags. + */ + tags?: { [propertyName: string]: string }; +} + +/** + * An interface representing AzureStackHCIClientOptions. + */ +export interface AzureStackHCIClientOptions extends AzureServiceClientOptions { + baseUri?: string; +} + +/** + * @interface + * List of clusters. + * @extends Array + */ +export interface ClusterList extends Array { + /** + * Link to the next set of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * Defines values for ProvisioningState. + * Possible values include: 'Succeeded', 'Failed', 'Canceled', 'Accepted', 'Provisioning' + * @readonly + * @enum {string} + */ +export type ProvisioningState = 'Succeeded' | 'Failed' | 'Canceled' | 'Accepted' | 'Provisioning'; + +/** + * Defines values for Status. + * Possible values include: 'NotYetRegistered', 'ConnectedRecently', 'NotConnectedRecently', + * 'Disconnected', 'Error' + * @readonly + * @enum {string} + */ +export type Status = 'NotYetRegistered' | 'ConnectedRecently' | 'NotConnectedRecently' | 'Disconnected' | 'Error'; + +/** + * Contains response data for the list operation. + */ +export type OperationsListResponse = AvailableOperations & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: AvailableOperations; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type ClustersListResponse = ClusterList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ClusterList; + }; +}; + +/** + * Contains response data for the listByResourceGroup operation. + */ +export type ClustersListByResourceGroupResponse = ClusterList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ClusterList; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type ClustersGetResponse = Cluster & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Cluster; + }; +}; + +/** + * Contains response data for the create operation. + */ +export type ClustersCreateResponse = Cluster & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Cluster; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type ClustersUpdateResponse = Cluster & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Cluster; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type ClustersListNextResponse = ClusterList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ClusterList; + }; +}; + +/** + * Contains response data for the listByResourceGroupNext operation. + */ +export type ClustersListByResourceGroupNextResponse = ClusterList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ClusterList; + }; +}; diff --git a/sdk/azurestackhci/arm-azurestackhci/src/models/mappers.ts b/sdk/azurestackhci/arm-azurestackhci/src/models/mappers.ts new file mode 100644 index 000000000000..79dcf481ddc1 --- /dev/null +++ b/sdk/azurestackhci/arm-azurestackhci/src/models/mappers.ts @@ -0,0 +1,565 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for 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 { CloudErrorMapper, BaseResourceMapper } from "@azure/ms-rest-azure-js"; +import * as msRest from "@azure/ms-rest-js"; + +export const CloudError = CloudErrorMapper; +export const BaseResource = BaseResourceMapper; + +export const ClusterNode: msRest.CompositeMapper = { + serializedName: "ClusterNode", + type: { + name: "Composite", + className: "ClusterNode", + modelProperties: { + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + id: { + readOnly: true, + serializedName: "id", + type: { + name: "Number" + } + }, + manufacturer: { + readOnly: true, + serializedName: "manufacturer", + type: { + name: "String" + } + }, + model: { + readOnly: true, + serializedName: "model", + type: { + name: "String" + } + }, + osName: { + readOnly: true, + serializedName: "osName", + type: { + name: "String" + } + }, + osVersion: { + readOnly: true, + serializedName: "osVersion", + type: { + name: "String" + } + }, + serialNumber: { + readOnly: true, + serializedName: "serialNumber", + type: { + name: "String" + } + }, + coreCount: { + readOnly: true, + serializedName: "coreCount", + type: { + name: "Number" + } + }, + memoryInGiB: { + readOnly: true, + serializedName: "memoryInGiB", + type: { + name: "Number" + } + } + } + } +}; + +export const ClusterReportedProperties: msRest.CompositeMapper = { + serializedName: "ClusterReportedProperties", + type: { + name: "Composite", + className: "ClusterReportedProperties", + modelProperties: { + clusterName: { + readOnly: true, + serializedName: "clusterName", + type: { + name: "String" + } + }, + clusterId: { + readOnly: true, + serializedName: "clusterId", + type: { + name: "String" + } + }, + clusterVersion: { + readOnly: true, + serializedName: "clusterVersion", + type: { + name: "String" + } + }, + nodes: { + readOnly: true, + serializedName: "nodes", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ClusterNode" + } + } + } + }, + lastUpdated: { + readOnly: true, + serializedName: "lastUpdated", + type: { + name: "DateTime" + } + } + } + } +}; + +export const Resource: msRest.CompositeMapper = { + serializedName: "Resource", + type: { + name: "Composite", + className: "Resource", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const TrackedResource: msRest.CompositeMapper = { + serializedName: "TrackedResource", + type: { + name: "Composite", + className: "TrackedResource", + modelProperties: { + ...Resource.type.modelProperties, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + location: { + required: true, + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const Cluster: msRest.CompositeMapper = { + serializedName: "Cluster", + type: { + name: "Composite", + className: "Cluster", + modelProperties: { + ...TrackedResource.type.modelProperties, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + }, + status: { + readOnly: true, + serializedName: "properties.status", + type: { + name: "String" + } + }, + cloudId: { + readOnly: true, + serializedName: "properties.cloudId", + type: { + name: "String" + } + }, + aadClientId: { + required: true, + serializedName: "properties.aadClientId", + type: { + name: "String" + } + }, + aadTenantId: { + required: true, + serializedName: "properties.aadTenantId", + type: { + name: "String" + } + }, + reportedProperties: { + serializedName: "properties.reportedProperties", + type: { + name: "Composite", + className: "ClusterReportedProperties" + } + }, + trialDaysRemaining: { + readOnly: true, + serializedName: "properties.trialDaysRemaining", + type: { + name: "Number" + } + }, + billingModel: { + readOnly: true, + serializedName: "properties.billingModel", + type: { + name: "String" + } + }, + registrationTimestamp: { + readOnly: true, + serializedName: "properties.registrationTimestamp", + type: { + name: "DateTime" + } + }, + lastSyncTimestamp: { + readOnly: true, + serializedName: "properties.lastSyncTimestamp", + type: { + name: "DateTime" + } + }, + lastBillingTimestamp: { + readOnly: true, + serializedName: "properties.lastBillingTimestamp", + type: { + name: "DateTime" + } + } + } + } +}; + +export const ClusterUpdate: msRest.CompositeMapper = { + serializedName: "ClusterUpdate", + type: { + name: "Composite", + className: "ClusterUpdate", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const OperationDisplay: msRest.CompositeMapper = { + serializedName: "OperationDisplay", + type: { + name: "Composite", + className: "OperationDisplay", + modelProperties: { + provider: { + serializedName: "provider", + type: { + name: "String" + } + }, + resource: { + serializedName: "resource", + type: { + name: "String" + } + }, + operation: { + serializedName: "operation", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + } + } + } +}; + +export const OperationDetail: msRest.CompositeMapper = { + serializedName: "OperationDetail", + type: { + name: "Composite", + className: "OperationDetail", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + isDataAction: { + serializedName: "isDataAction", + type: { + name: "Boolean" + } + }, + display: { + serializedName: "display", + type: { + name: "Composite", + className: "OperationDisplay" + } + }, + origin: { + serializedName: "origin", + type: { + name: "String" + } + }, + properties: { + serializedName: "properties", + type: { + name: "Object" + } + } + } + } +}; + +export const AvailableOperations: msRest.CompositeMapper = { + serializedName: "AvailableOperations", + type: { + name: "Composite", + className: "AvailableOperations", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "OperationDetail" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const ProxyResource: msRest.CompositeMapper = { + serializedName: "ProxyResource", + type: { + name: "Composite", + className: "ProxyResource", + modelProperties: { + ...Resource.type.modelProperties + } + } +}; + +export const AzureEntityResource: msRest.CompositeMapper = { + serializedName: "AzureEntityResource", + type: { + name: "Composite", + className: "AzureEntityResource", + modelProperties: { + ...Resource.type.modelProperties, + etag: { + readOnly: true, + serializedName: "etag", + type: { + name: "String" + } + } + } + } +}; + +export const ErrorAdditionalInfo: msRest.CompositeMapper = { + serializedName: "ErrorAdditionalInfo", + type: { + name: "Composite", + className: "ErrorAdditionalInfo", + modelProperties: { + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + info: { + readOnly: true, + serializedName: "info", + type: { + name: "Object" + } + } + } + } +}; + +export const ErrorResponseError: msRest.CompositeMapper = { + serializedName: "ErrorResponse_error", + type: { + name: "Composite", + className: "ErrorResponseError", + modelProperties: { + code: { + readOnly: true, + serializedName: "code", + type: { + name: "String" + } + }, + message: { + readOnly: true, + serializedName: "message", + type: { + name: "String" + } + }, + target: { + readOnly: true, + serializedName: "target", + type: { + name: "String" + } + }, + details: { + readOnly: true, + serializedName: "details", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorResponse" + } + } + } + }, + additionalInfo: { + readOnly: true, + serializedName: "additionalInfo", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorAdditionalInfo" + } + } + } + } + } + } +}; + +export const ErrorResponse: msRest.CompositeMapper = { + serializedName: "ErrorResponse", + type: { + name: "Composite", + className: "ErrorResponse", + modelProperties: { + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorResponseError" + } + } + } + } +}; + +export const ClusterList: msRest.CompositeMapper = { + serializedName: "ClusterList", + type: { + name: "Composite", + className: "ClusterList", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Cluster" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; diff --git a/sdk/azurestackhci/arm-azurestackhci/src/models/operationsMappers.ts b/sdk/azurestackhci/arm-azurestackhci/src/models/operationsMappers.ts new file mode 100644 index 000000000000..ee870560220e --- /dev/null +++ b/sdk/azurestackhci/arm-azurestackhci/src/models/operationsMappers.ts @@ -0,0 +1,16 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + AvailableOperations, + ErrorAdditionalInfo, + ErrorResponse, + ErrorResponseError, + OperationDetail, + OperationDisplay +} from "../models/mappers"; diff --git a/sdk/azurestackhci/arm-azurestackhci/src/models/parameters.ts b/sdk/azurestackhci/arm-azurestackhci/src/models/parameters.ts new file mode 100644 index 000000000000..2d791ec70bf2 --- /dev/null +++ b/sdk/azurestackhci/arm-azurestackhci/src/models/parameters.ts @@ -0,0 +1,84 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * 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 * as msRest from "@azure/ms-rest-js"; + +export const acceptLanguage: msRest.OperationParameter = { + parameterPath: "acceptLanguage", + mapper: { + serializedName: "accept-language", + defaultValue: 'en-US', + type: { + name: "String" + } + } +}; +export const apiVersion: msRest.OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + required: true, + serializedName: "api-version", + constraints: { + MinLength: 1 + }, + type: { + name: "String" + } + } +}; +export const clusterName: msRest.OperationURLParameter = { + parameterPath: "clusterName", + mapper: { + required: true, + serializedName: "clusterName", + type: { + name: "String" + } + } +}; +export const nextPageLink: msRest.OperationURLParameter = { + parameterPath: "nextPageLink", + mapper: { + required: true, + serializedName: "nextLink", + type: { + name: "String" + } + }, + skipEncoding: true +}; +export const resourceGroupName: msRest.OperationURLParameter = { + parameterPath: "resourceGroupName", + mapper: { + required: true, + serializedName: "resourceGroupName", + constraints: { + MaxLength: 90, + MinLength: 1, + Pattern: /^[-\w\._\(\)]+$/ + }, + type: { + name: "String" + } + } +}; +export const subscriptionId: msRest.OperationURLParameter = { + parameterPath: "subscriptionId", + mapper: { + required: true, + serializedName: "subscriptionId", + constraints: { + MinLength: 1 + }, + type: { + name: "String" + } + } +}; diff --git a/sdk/azurestackhci/arm-azurestackhci/src/operations/clusters.ts b/sdk/azurestackhci/arm-azurestackhci/src/operations/clusters.ts new file mode 100644 index 000000000000..154cb11025a8 --- /dev/null +++ b/sdk/azurestackhci/arm-azurestackhci/src/operations/clusters.ts @@ -0,0 +1,477 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * 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 * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/clustersMappers"; +import * as Parameters from "../models/parameters"; +import { AzureStackHCIClientContext } from "../azureStackHCIClientContext"; + +/** Class representing a Clusters. */ +export class Clusters { + private readonly client: AzureStackHCIClientContext; + + /** + * Create a Clusters. + * @param {AzureStackHCIClientContext} client Reference to the service client. + */ + constructor(client: AzureStackHCIClientContext) { + this.client = client; + } + + /** + * List all HCI clusters in a subscription. + * @param [options] The optional parameters + * @returns Promise + */ + list(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + list(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * List all HCI clusters in a resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param [options] The optional parameters + * @returns Promise + */ + listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param callback The callback + */ + listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The optional parameters + * @param callback The callback + */ + listByResourceGroup(resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + options + }, + listByResourceGroupOperationSpec, + callback) as Promise; + } + + /** + * Get HCI cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, clusterName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param callback The callback + */ + get(resourceGroupName: string, clusterName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, clusterName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, clusterName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + clusterName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Create an HCI cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param cluster Details of the HCI cluster. + * @param [options] The optional parameters + * @returns Promise + */ + create(resourceGroupName: string, clusterName: string, cluster: Models.Cluster, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param cluster Details of the HCI cluster. + * @param callback The callback + */ + create(resourceGroupName: string, clusterName: string, cluster: Models.Cluster, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param cluster Details of the HCI cluster. + * @param options The optional parameters + * @param callback The callback + */ + create(resourceGroupName: string, clusterName: string, cluster: Models.Cluster, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + create(resourceGroupName: string, clusterName: string, cluster: Models.Cluster, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + clusterName, + cluster, + options + }, + createOperationSpec, + callback) as Promise; + } + + /** + * Update an HCI cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, clusterName: string, options?: Models.ClustersUpdateOptionalParams): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param callback The callback + */ + update(resourceGroupName: string, clusterName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param options The optional parameters + * @param callback The callback + */ + update(resourceGroupName: string, clusterName: string, options: Models.ClustersUpdateOptionalParams, callback: msRest.ServiceCallback): void; + update(resourceGroupName: string, clusterName: string, options?: Models.ClustersUpdateOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + clusterName, + options + }, + updateOperationSpec, + callback) as Promise; + } + + /** + * Delete an HCI cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, clusterName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, clusterName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, clusterName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, clusterName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + clusterName, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * List all HCI clusters in a subscription. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } + + /** + * List all HCI clusters in a resource group. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByResourceGroupNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByResourceGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByResourceGroupNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.AzureStackHCI/clusters", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ClusterList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByResourceGroupOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ClusterList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Cluster + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const createOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "cluster", + mapper: { + ...Mappers.Cluster, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.Cluster + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const updateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: { + tags: [ + "options", + "tags" + ] + }, + mapper: { + ...Mappers.ClusterUpdate, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.Cluster + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ClusterList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ClusterList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/azurestackhci/arm-azurestackhci/src/operations/index.ts b/sdk/azurestackhci/arm-azurestackhci/src/operations/index.ts new file mode 100644 index 000000000000..a0c122fdd7b8 --- /dev/null +++ b/sdk/azurestackhci/arm-azurestackhci/src/operations/index.ts @@ -0,0 +1,12 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export * from "./operations"; +export * from "./clusters"; diff --git a/sdk/azurestackhci/arm-azurestackhci/src/operations/operations.ts b/sdk/azurestackhci/arm-azurestackhci/src/operations/operations.ts new file mode 100644 index 000000000000..5ed4e1a70696 --- /dev/null +++ b/sdk/azurestackhci/arm-azurestackhci/src/operations/operations.ts @@ -0,0 +1,74 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * 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 * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/operationsMappers"; +import * as Parameters from "../models/parameters"; +import { AzureStackHCIClientContext } from "../azureStackHCIClientContext"; + +/** Class representing a Operations. */ +export class Operations { + private readonly client: AzureStackHCIClientContext; + + /** + * Create a Operations. + * @param {AzureStackHCIClientContext} client Reference to the service client. + */ + constructor(client: AzureStackHCIClientContext) { + this.client = client; + } + + /** + * List all available Microsoft.AzureStackHCI provider operations + * @param [options] The optional parameters + * @returns Promise + */ + list(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + list(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.AzureStackHCI/operations", + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AvailableOperations + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/azurestackhci/arm-azurestackhci/tsconfig.json b/sdk/azurestackhci/arm-azurestackhci/tsconfig.json new file mode 100644 index 000000000000..422b584abd5e --- /dev/null +++ b/sdk/azurestackhci/arm-azurestackhci/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "es6", + "moduleResolution": "node", + "strict": true, + "target": "es5", + "sourceMap": true, + "declarationMap": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "forceConsistentCasingInFileNames": true, + "lib": ["es6", "dom"], + "declaration": true, + "outDir": "./esm", + "importHelpers": true + }, + "include": ["./src/**/*.ts"], + "exclude": ["node_modules"] +} diff --git a/sdk/batch/arm-batch/LICENSE.txt b/sdk/batch/arm-batch/LICENSE.txt index a70e8cf66038..ea8fb1516028 100644 --- a/sdk/batch/arm-batch/LICENSE.txt +++ b/sdk/batch/arm-batch/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2018 Microsoft +Copyright (c) 2020 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/batch/arm-batch/README.md b/sdk/batch/arm-batch/README.md index 290c100c9267..9347522bf353 100644 --- a/sdk/batch/arm-batch/README.md +++ b/sdk/batch/arm-batch/README.md @@ -9,7 +9,7 @@ This package contains an isomorphic SDK for BatchManagementClient. ### How to Install -``` +```bash npm install @azure/arm-batch ``` @@ -19,13 +19,14 @@ npm install @azure/arm-batch ##### Install @azure/ms-rest-nodeauth -``` -npm install @azure/ms-rest-nodeauth +- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. +```bash +npm install @azure/ms-rest-nodeauth@"^3.0.0" ``` ##### Sample code -```ts +```typescript import * as msRest from "@azure/ms-rest-js"; import * as msRestAzure from "@azure/ms-rest-azure-js"; import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; @@ -49,7 +50,7 @@ msRestNodeAuth.interactiveLogin().then((creds) => { ##### Install @azure/ms-rest-browserauth -``` +```bash npm install @azure/ms-rest-browserauth ``` @@ -99,5 +100,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fbatch%2Farm-batch%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/README.png) diff --git a/sdk/batch/arm-batch/package.json b/sdk/batch/arm-batch/package.json index 7429dddfb759..de26495de767 100644 --- a/sdk/batch/arm-batch/package.json +++ b/sdk/batch/arm-batch/package.json @@ -2,11 +2,11 @@ "name": "@azure/arm-batch", "author": "Microsoft Corporation", "description": "BatchManagementClient Library with typescript type definitions for node.js and browser.", - "version": "4.0.0", + "version": "5.0.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.1.0", - "@azure/ms-rest-js": "^1.1.0", - "tslib": "^1.9.3" + "@azure/ms-rest-azure-js": "^2.0.1", + "@azure/ms-rest-js": "^2.0.4", + "tslib": "^2.0.0" }, "keywords": [ "node", @@ -20,18 +20,27 @@ "module": "./esm/batchManagementClient.js", "types": "./esm/batchManagementClient.d.ts", "devDependencies": { - "typescript": "^3.1.1", - "rollup": "^0.66.2", - "rollup-plugin-node-resolve": "^3.4.0", + "@types/chai": "^4.1.6", + "@types/jssha": "^2.0.0", + "@types/mocha": "^7.0.2", + "chai": "^4.2.0", + "dotenv": "^8.2.0", + "mocha": "^7.1.1", + "rollup": "^1.16.3", + "rollup-plugin-node-resolve": "^5.2.0", + "rollup-plugin-sourcemaps": "^0.4.2", + "esm": "^3.2.25", + "ts-node": "^8.3.0", + "typescript": "~3.9.3", "uglify-js": "^3.4.9" }, - "homepage": "https://github.com/azure/azure-sdk-for-js/tree/master/sdk/batch/arm-batch", + "homepage": "https://github.com/Azure/azure-sdk-for-js", "repository": { "type": "git", - "url": "https://github.com/azure/azure-sdk-for-js.git" + "url": "https://github.com/Azure/azure-sdk-for-js.git" }, "bugs": { - "url": "https://github.com/azure/azure-sdk-for-js/issues" + "url": "https://github.com/Azure/azure-sdk-for-js/issues" }, "files": [ "dist/**/*.js", @@ -43,13 +52,15 @@ "esm/**/*.d.ts", "esm/**/*.d.ts.map", "src/**/*.ts", + "README.md", "rollup.config.js", "tsconfig.json" ], "scripts": { "build": "tsc && rollup -c rollup.config.js && npm run minify", "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/arm-batch.js.map'\" -o ./dist/arm-batch.min.js ./dist/arm-batch.js", - "prepack": "npm install && npm run build" + "prepack": "npm install && npm run build", + "test": "mocha -r esm --require ts-node/register test/*.spec.ts --timeout 1200000 --full-trace" }, "sideEffects": false, "autoPublish": true diff --git a/sdk/batch/arm-batch/rollup.config.js b/sdk/batch/arm-batch/rollup.config.js index 75e829947f0f..8d1bc25e71ac 100644 --- a/sdk/batch/arm-batch/rollup.config.js +++ b/sdk/batch/arm-batch/rollup.config.js @@ -1,10 +1,16 @@ +import rollup from "rollup"; import nodeResolve from "rollup-plugin-node-resolve"; +import sourcemaps from "rollup-plugin-sourcemaps"; + /** - * @type {import('rollup').RollupFileOptions} + * @type {rollup.RollupFileOptions} */ const config = { - input: './esm/batchManagementClient.js', - external: ["@azure/ms-rest-js", "@azure/ms-rest-azure-js"], + input: "./esm/batchManagementClient.js", + external: [ + "@azure/ms-rest-js", + "@azure/ms-rest-azure-js" + ], output: { file: "./dist/arm-batch.js", format: "umd", @@ -16,16 +22,16 @@ const config = { }, banner: `/* * 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. */` }, plugins: [ - nodeResolve({ module: true }) + nodeResolve({ mainFields: ['module', 'main'] }), + sourcemaps() ] }; + export default config; diff --git a/sdk/batch/arm-batch/src/batchManagementClient.ts b/sdk/batch/arm-batch/src/batchManagementClient.ts index b921e4ae2937..e5c88e5186c8 100644 --- a/sdk/batch/arm-batch/src/batchManagementClient.ts +++ b/sdk/batch/arm-batch/src/batchManagementClient.ts @@ -23,6 +23,8 @@ class BatchManagementClient extends BatchManagementClientContext { location: operations.Location; operations: operations.Operations; certificate: operations.CertificateOperations; + privateLinkResource: operations.PrivateLinkResourceOperations; + privateEndpointConnection: operations.PrivateEndpointConnectionOperations; pool: operations.PoolOperations; /** @@ -40,6 +42,8 @@ class BatchManagementClient extends BatchManagementClientContext { this.location = new operations.Location(this); this.operations = new operations.Operations(this); this.certificate = new operations.CertificateOperations(this); + this.privateLinkResource = new operations.PrivateLinkResourceOperations(this); + this.privateEndpointConnection = new operations.PrivateEndpointConnectionOperations(this); this.pool = new operations.PoolOperations(this); } } diff --git a/sdk/batch/arm-batch/src/batchManagementClientContext.ts b/sdk/batch/arm-batch/src/batchManagementClientContext.ts index 0116fb7ba18f..239857a63782 100644 --- a/sdk/batch/arm-batch/src/batchManagementClientContext.ts +++ b/sdk/batch/arm-batch/src/batchManagementClientContext.ts @@ -13,7 +13,7 @@ import * as msRest from "@azure/ms-rest-js"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-batch"; -const packageVersion = "0.1.0"; +const packageVersion = "5.0.0"; export class BatchManagementClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials; @@ -45,7 +45,7 @@ export class BatchManagementClientContext extends msRestAzure.AzureServiceClient super(credentials, options); - this.apiVersion = '2017-09-01'; + this.apiVersion = '2020-09-01'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; diff --git a/sdk/batch/arm-batch/src/models/applicationOperationsMappers.ts b/sdk/batch/arm-batch/src/models/applicationOperationsMappers.ts index 97048ac844f6..5a3c50ebbc1b 100644 --- a/sdk/batch/arm-batch/src/models/applicationOperationsMappers.ts +++ b/sdk/batch/arm-batch/src/models/applicationOperationsMappers.ts @@ -1,19 +1,72 @@ /* * 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. */ export { - ApplicationCreateParameters, Application, ApplicationPackage, + ApplicationPackageReference, + AutoScaleRun, + AutoScaleRunError, + AutoScaleSettings, + AutoStorageBaseProperties, + AutoStorageProperties, + AutoUserSpecification, + AzureBlobFileSystemConfiguration, + AzureFileShareConfiguration, + BaseResource, + BatchAccount, + BatchAccountIdentity, + Certificate, + CertificateCreateOrUpdateParameters, + CertificateReference, + CIFSMountConfiguration, CloudError, - ApplicationUpdateParameters, - ListApplicationsResult + CloudServiceConfiguration, + ContainerConfiguration, + ContainerRegistry, + DataDisk, + DeleteCertificateError, + DeploymentConfiguration, + DiskEncryptionConfiguration, + EncryptionProperties, + EnvironmentSetting, + FixedScaleSettings, + ImageReference, + InboundNatPool, + KeyVaultProperties, + KeyVaultReference, + LinuxUserConfiguration, + ListApplicationsResult, + MetadataItem, + MountConfiguration, + NetworkConfiguration, + NetworkSecurityGroupRule, + NFSMountConfiguration, + Pool, + PoolEndpointConfiguration, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateLinkResource, + PrivateLinkServiceConnectionState, + ProxyResource, + PublicIPAddressConfiguration, + ResizeError, + ResizeOperationStatus, + Resource, + ResourceFile, + ScaleSettings, + StartTask, + TaskContainerSettings, + TaskSchedulingPolicy, + UserAccount, + UserIdentity, + VirtualMachineConfiguration, + VirtualMachineFamilyCoreQuota, + WindowsConfiguration, + WindowsUserConfiguration } from "../models/mappers"; - diff --git a/sdk/batch/arm-batch/src/models/applicationPackageOperationsMappers.ts b/sdk/batch/arm-batch/src/models/applicationPackageOperationsMappers.ts index eae5abb1fca9..a498cd5da71f 100644 --- a/sdk/batch/arm-batch/src/models/applicationPackageOperationsMappers.ts +++ b/sdk/batch/arm-batch/src/models/applicationPackageOperationsMappers.ts @@ -1,16 +1,73 @@ /* * 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. */ export { ActivateApplicationPackageParameters, + Application, + ApplicationPackage, + ApplicationPackageReference, + AutoScaleRun, + AutoScaleRunError, + AutoScaleSettings, + AutoStorageBaseProperties, + AutoStorageProperties, + AutoUserSpecification, + AzureBlobFileSystemConfiguration, + AzureFileShareConfiguration, + BaseResource, + BatchAccount, + BatchAccountIdentity, + Certificate, + CertificateCreateOrUpdateParameters, + CertificateReference, + CIFSMountConfiguration, CloudError, - ApplicationPackage + CloudServiceConfiguration, + ContainerConfiguration, + ContainerRegistry, + DataDisk, + DeleteCertificateError, + DeploymentConfiguration, + DiskEncryptionConfiguration, + EncryptionProperties, + EnvironmentSetting, + FixedScaleSettings, + ImageReference, + InboundNatPool, + KeyVaultProperties, + KeyVaultReference, + LinuxUserConfiguration, + ListApplicationPackagesResult, + MetadataItem, + MountConfiguration, + NetworkConfiguration, + NetworkSecurityGroupRule, + NFSMountConfiguration, + Pool, + PoolEndpointConfiguration, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateLinkResource, + PrivateLinkServiceConnectionState, + ProxyResource, + PublicIPAddressConfiguration, + ResizeError, + ResizeOperationStatus, + Resource, + ResourceFile, + ScaleSettings, + StartTask, + TaskContainerSettings, + TaskSchedulingPolicy, + UserAccount, + UserIdentity, + VirtualMachineConfiguration, + VirtualMachineFamilyCoreQuota, + WindowsConfiguration, + WindowsUserConfiguration } from "../models/mappers"; - diff --git a/sdk/batch/arm-batch/src/models/batchAccountOperationsMappers.ts b/sdk/batch/arm-batch/src/models/batchAccountOperationsMappers.ts index b864b899da67..4488249bd7f1 100644 --- a/sdk/batch/arm-batch/src/models/batchAccountOperationsMappers.ts +++ b/sdk/batch/arm-batch/src/models/batchAccountOperationsMappers.ts @@ -1,61 +1,78 @@ /* * 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. */ export { - BatchAccountCreateParameters, + Application, + ApplicationPackage, + ApplicationPackageReference, + AutoScaleRun, + AutoScaleRunError, + AutoScaleSettings, AutoStorageBaseProperties, - KeyVaultReference, - BatchAccount, - Resource, - BaseResource, AutoStorageProperties, + AutoUserSpecification, + AzureBlobFileSystemConfiguration, + AzureFileShareConfiguration, + BaseResource, + BatchAccount, BatchAccountCreateHeaders, - CloudError, - BatchAccountUpdateParameters, + BatchAccountCreateParameters, BatchAccountDeleteHeaders, + BatchAccountIdentity, + BatchAccountKeys, BatchAccountListResult, BatchAccountRegenerateKeyParameters, - BatchAccountKeys, - ProxyResource, + BatchAccountUpdateParameters, Certificate, - DeleteCertificateError, CertificateCreateOrUpdateParameters, - Pool, - DeploymentConfiguration, + CertificateReference, + CIFSMountConfiguration, + CloudError, CloudServiceConfiguration, - VirtualMachineConfiguration, - ImageReference, - OSDisk, - WindowsConfiguration, + ContainerConfiguration, + ContainerRegistry, DataDisk, - ScaleSettings, + DeleteCertificateError, + DeploymentConfiguration, + DiskEncryptionConfiguration, + EncryptionProperties, + EnvironmentSetting, FixedScaleSettings, - AutoScaleSettings, - AutoScaleRun, - AutoScaleRunError, - NetworkConfiguration, - PoolEndpointConfiguration, + ImageReference, InboundNatPool, - NetworkSecurityGroupRule, - TaskSchedulingPolicy, - UserAccount, + KeyVaultProperties, + KeyVaultReference, LinuxUserConfiguration, MetadataItem, - StartTask, + MountConfiguration, + NetworkConfiguration, + NetworkSecurityGroupRule, + NFSMountConfiguration, + Pool, + PoolEndpointConfiguration, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateLinkResource, + PrivateLinkServiceConnectionState, + ProxyResource, + PublicIPAddressConfiguration, + ResizeError, + ResizeOperationStatus, + Resource, ResourceFile, - EnvironmentSetting, + ScaleSettings, + StartTask, + TaskContainerSettings, + TaskSchedulingPolicy, + UserAccount, UserIdentity, - AutoUserSpecification, - CertificateReference, - ApplicationPackageReference, - ResizeOperationStatus, - ResizeError + VirtualMachineConfiguration, + VirtualMachineFamilyCoreQuota, + WindowsConfiguration, + WindowsUserConfiguration } from "../models/mappers"; - diff --git a/sdk/batch/arm-batch/src/models/certificateOperationsMappers.ts b/sdk/batch/arm-batch/src/models/certificateOperationsMappers.ts index d6bdab0a770e..65fd32d7dd8f 100644 --- a/sdk/batch/arm-batch/src/models/certificateOperationsMappers.ts +++ b/sdk/batch/arm-batch/src/models/certificateOperationsMappers.ts @@ -1,60 +1,77 @@ /* * 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. */ export { - ListCertificatesResult, - Certificate, - ProxyResource, + Application, + ApplicationPackage, + ApplicationPackageReference, + AutoScaleRun, + AutoScaleRunError, + AutoScaleSettings, + AutoStorageBaseProperties, + AutoStorageProperties, + AutoUserSpecification, + AzureBlobFileSystemConfiguration, + AzureFileShareConfiguration, BaseResource, - DeleteCertificateError, - CloudError, - CertificateCreateOrUpdateParameters, + BatchAccount, + BatchAccountIdentity, + Certificate, + CertificateCancelDeletionHeaders, CertificateCreateHeaders, - CertificateUpdateHeaders, + CertificateCreateOrUpdateParameters, CertificateDeleteHeaders, CertificateGetHeaders, - CertificateCancelDeletionHeaders, - Resource, - Pool, - DeploymentConfiguration, + CertificateReference, + CertificateUpdateHeaders, + CIFSMountConfiguration, + CloudError, CloudServiceConfiguration, - VirtualMachineConfiguration, - ImageReference, - OSDisk, - WindowsConfiguration, + ContainerConfiguration, + ContainerRegistry, DataDisk, - ScaleSettings, + DeleteCertificateError, + DeploymentConfiguration, + DiskEncryptionConfiguration, + EncryptionProperties, + EnvironmentSetting, FixedScaleSettings, - AutoScaleSettings, - AutoScaleRun, - AutoScaleRunError, - NetworkConfiguration, - PoolEndpointConfiguration, + ImageReference, InboundNatPool, - NetworkSecurityGroupRule, - TaskSchedulingPolicy, - UserAccount, + KeyVaultProperties, + KeyVaultReference, LinuxUserConfiguration, + ListCertificatesResult, MetadataItem, - StartTask, + MountConfiguration, + NetworkConfiguration, + NetworkSecurityGroupRule, + NFSMountConfiguration, + Pool, + PoolEndpointConfiguration, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateLinkResource, + PrivateLinkServiceConnectionState, + ProxyResource, + PublicIPAddressConfiguration, + ResizeError, + ResizeOperationStatus, + Resource, ResourceFile, - EnvironmentSetting, + ScaleSettings, + StartTask, + TaskContainerSettings, + TaskSchedulingPolicy, + UserAccount, UserIdentity, - AutoUserSpecification, - CertificateReference, - ApplicationPackageReference, - ResizeOperationStatus, - ResizeError, - BatchAccount, - KeyVaultReference, - AutoStorageProperties, - AutoStorageBaseProperties + VirtualMachineConfiguration, + VirtualMachineFamilyCoreQuota, + WindowsConfiguration, + WindowsUserConfiguration } from "../models/mappers"; - diff --git a/sdk/batch/arm-batch/src/models/index.ts b/sdk/batch/arm-batch/src/models/index.ts index ca1259a449ac..6db72910d857 100644 --- a/sdk/batch/arm-batch/src/models/index.ts +++ b/sdk/batch/arm-batch/src/models/index.ts @@ -1,11 +1,9 @@ /* * 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. */ import { BaseResource, CloudError, AzureServiceClientOptions } from "@azure/ms-rest-azure-js"; @@ -13,2007 +11,2089 @@ import * as msRest from "@azure/ms-rest-js"; export { BaseResource, CloudError }; - /** - * @interface - * An interface representing AutoStorageBaseProperties. * The properties related to the auto-storage account. - * */ export interface AutoStorageBaseProperties { /** - * @member {string} storageAccountId The resource ID of the storage account - * to be used for auto-storage account. + * The resource ID of the storage account to be used for auto-storage account. */ storageAccountId: string; } /** - * @interface - * An interface representing KeyVaultReference. + * KeyVault configuration when using an encryption KeySource of Microsoft.KeyVault. + */ +export interface KeyVaultProperties { + /** + * Full path to the versioned secret. Example + * https://mykeyvault.vault.azure.net/keys/testkey/6e34a81fef704045975661e297a4c053. To be usable + * the following prerequisites must be met: + * + * The Batch Account has a System Assigned identity + * The account identity has been granted Key/Get, Key/Unwrap and Key/Wrap permissions + * The KeyVault has soft-delete and purge protection enabled + */ + keyIdentifier?: string; +} + +/** + * Configures how customer data is encrypted inside the Batch account. By default, accounts are + * encrypted using a Microsoft managed key. For additional control, a customer-managed key can be + * used instead. + */ +export interface EncryptionProperties { + /** + * Type of the key source. Possible values include: 'Microsoft.Batch', 'Microsoft.KeyVault' + */ + keySource?: KeySource; + /** + * Additional details when using Microsoft.KeyVault + */ + keyVaultProperties?: KeyVaultProperties; +} + +/** * Identifies the Azure key vault associated with a Batch account. - * */ export interface KeyVaultReference { /** - * @member {string} id The resource ID of the Azure key vault associated with - * the Batch account. + * The resource ID of the Azure key vault associated with the Batch account. */ id: string; /** - * @member {string} url The URL of the Azure key vault associated with the - * Batch account. + * The URL of the Azure key vault associated with the Batch account. */ url: string; } /** - * @interface - * An interface representing BatchAccountCreateParameters. + * The identity of the Batch account, if configured. This is only used when the user specifies + * 'Microsoft.KeyVault' as their Batch account encryption configuration. + */ +export interface BatchAccountIdentity { + /** + * The principal id of the Batch account. This property will only be provided for a system + * assigned identity. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly principalId?: string; + /** + * The tenant id associated with the Batch account. This property will only be provided for a + * system assigned identity. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly tenantId?: string; + /** + * The type of identity used for the Batch account. Possible values include: 'SystemAssigned', + * 'None' + */ + type: ResourceIdentityType; +} + +/** * Parameters supplied to the Create operation. - * */ export interface BatchAccountCreateParameters { /** - * @member {string} location The region in which to create the account. + * The region in which to create the account. */ location: string; /** - * @member {{ [propertyName: string]: string }} [tags] The user-specified - * tags associated with the account. + * The user-specified tags associated with the account. */ tags?: { [propertyName: string]: string }; /** - * @member {AutoStorageBaseProperties} [autoStorage] The properties related - * to the auto-storage account. + * The properties related to the auto-storage account. */ autoStorage?: AutoStorageBaseProperties; /** - * @member {PoolAllocationMode} [poolAllocationMode] The allocation mode to - * use for creating pools in the Batch account. The pool allocation mode also - * affects how clients may authenticate to the Batch Service API. If the mode - * is BatchService, clients may authenticate using access keys or Azure - * Active Directory. If the mode is UserSubscription, clients must use Azure - * Active Directory. The default is BatchService. Possible values include: - * 'BatchService', 'UserSubscription' + * The allocation mode to use for creating pools in the Batch account. The pool allocation mode + * also affects how clients may authenticate to the Batch Service API. If the mode is + * BatchService, clients may authenticate using access keys or Azure Active Directory. If the + * mode is UserSubscription, clients must use Azure Active Directory. The default is + * BatchService. Possible values include: 'BatchService', 'UserSubscription' */ poolAllocationMode?: PoolAllocationMode; /** - * @member {KeyVaultReference} [keyVaultReference] A reference to the Azure - * key vault associated with the Batch account. + * A reference to the Azure key vault associated with the Batch account. */ keyVaultReference?: KeyVaultReference; + /** + * The network access type for accessing Azure Batch account. If not specified, the default value + * is 'enabled'. Possible values include: 'Enabled', 'Disabled'. Default value: 'Enabled'. + */ + publicNetworkAccess?: PublicNetworkAccessType; + /** + * The encryption configuration for the Batch account. Configures how customer data is encrypted + * inside the Batch account. By default, accounts are encrypted using a Microsoft managed key. + * For additional control, a customer-managed key can be used instead. + */ + encryption?: EncryptionProperties; + /** + * The identity of the Batch account. + */ + identity?: BatchAccountIdentity; } /** - * @interface - * An interface representing AutoStorageProperties. - * Contains information about the auto-storage account associated with a Batch - * account. - * - * @extends AutoStorageBaseProperties + * Contains information about the auto-storage account associated with a Batch account. */ export interface AutoStorageProperties extends AutoStorageBaseProperties { /** - * @member {Date} lastKeySync The UTC time at which storage keys were last - * synchronized with the Batch account. + * The UTC time at which storage keys were last synchronized with the Batch account. */ lastKeySync: Date; } /** - * @interface - * An interface representing Resource. + * A VM Family and its associated core quota for the Batch account. + */ +export interface VirtualMachineFamilyCoreQuota { + /** + * The Virtual Machine family name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * The core quota for the VM family for the Batch account. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly coreQuota?: number; +} + +/** + * The private endpoint of the private endpoint connection. + */ +export interface PrivateEndpoint { + /** + * The ARM resource identifier of the private endpoint. This is of the form + * /subscriptions/{subscription}/resourceGroups/{group}/providers/Microsoft.Network/privateEndpoints/{privateEndpoint}. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; +} + +/** + * The private link service connection state of the private endpoint connection + */ +export interface PrivateLinkServiceConnectionState { + /** + * The status for the private endpoint connection of Batch account. Possible values include: + * 'Approved', 'Pending', 'Rejected', 'Disconnected' + */ + status: PrivateLinkServiceConnectionStatus; + /** + * Description of the private Connection state. + */ + description?: string; + /** + * Action required on the private connection state. **NOTE: This property will not be serialized. + * It can only be populated by the server.** + */ + readonly actionRequired?: string; +} + +/** + * A definition of an Azure resource. + */ +export interface ProxyResource extends BaseResource { + /** + * The ID of the resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * The name of the resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * The type of the resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * The ETag of the resource, used for concurrency statements. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly etag?: string; +} + +/** + * Contains information about a private link resource. + */ +export interface PrivateEndpointConnection extends ProxyResource { + /** + * The provisioning state of the private endpoint connection. Possible values include: + * 'Succeeded', 'Updating', 'Failed' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: PrivateEndpointConnectionProvisioningState; + /** + * The ARM resource identifier of the private endpoint. + */ + privateEndpoint?: PrivateEndpoint; + /** + * The private link service connection state of the private endpoint connection. + */ + privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; +} + +/** * A definition of an Azure resource. - * - * @extends BaseResource */ export interface Resource extends BaseResource { /** - * @member {string} [id] The ID of the resource. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The ID of the resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; /** - * @member {string} [name] The name of the resource. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The name of the resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; /** - * @member {string} [type] The type of the resource. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The type of the resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly type?: string; /** - * @member {string} [location] The location of the resource. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The location of the resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly location?: string; /** - * @member {{ [propertyName: string]: string }} [tags] The tags of the - * resource. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The tags of the resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly tags?: { [propertyName: string]: string }; } /** - * @interface - * An interface representing BatchAccount. * Contains information about an Azure Batch account. - * - * @extends Resource */ export interface BatchAccount extends Resource { /** - * @member {string} [accountEndpoint] The account endpoint used to interact - * with the Batch service. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The account endpoint used to interact with the Batch service. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly accountEndpoint?: string; /** - * @member {ProvisioningState} [provisioningState] The provisioned state of - * the resource. Possible values include: 'Invalid', 'Creating', 'Deleting', - * 'Succeeded', 'Failed', 'Cancelled' - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The provisioned state of the resource. Possible values include: 'Invalid', 'Creating', + * 'Deleting', 'Succeeded', 'Failed', 'Cancelled' + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly provisioningState?: ProvisioningState; /** - * @member {PoolAllocationMode} [poolAllocationMode] The allocation mode to - * use for creating pools in the Batch account. Possible values include: + * The allocation mode to use for creating pools in the Batch account. Possible values include: * 'BatchService', 'UserSubscription' - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly poolAllocationMode?: PoolAllocationMode; /** - * @member {KeyVaultReference} [keyVaultReference] A reference to the Azure - * key vault associated with the Batch account. **NOTE: This property will - * not be serialized. It can only be populated by the server.** + * A reference to the Azure key vault associated with the Batch account. **NOTE: This property + * will not be serialized. It can only be populated by the server.** */ readonly keyVaultReference?: KeyVaultReference; /** - * @member {AutoStorageProperties} [autoStorage] The properties and status of - * any auto-storage account associated with the Batch account. **NOTE: This - * property will not be serialized. It can only be populated by the server.** + * The network interface type for accessing Azure Batch service and Batch account operations. If + * not specified, the default value is 'enabled'. Possible values include: 'Enabled', 'Disabled' + * **NOTE: This property will not be serialized. It can only be populated by the server.**. + * Default value: 'Enabled'. + */ + readonly publicNetworkAccess?: PublicNetworkAccessType; + /** + * List of private endpoint connections associated with the Batch account + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly privateEndpointConnections?: PrivateEndpointConnection[]; + /** + * The properties and status of any auto-storage account associated with the Batch account. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly autoStorage?: AutoStorageProperties; /** - * @member {number} [dedicatedCoreQuota] The dedicated core quota for this - * Batch account. **NOTE: This property will not be serialized. It can only - * be populated by the server.** + * The encryption configuration for the Batch account. Configures how customer data is encrypted + * inside the Batch account. By default, accounts are encrypted using a Microsoft managed key. + * For additional control, a customer-managed key can be used instead. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly encryption?: EncryptionProperties; + /** + * The dedicated core quota for the Batch account. For accounts with PoolAllocationMode set to + * UserSubscription, quota is managed on the subscription so this value is not returned. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly dedicatedCoreQuota?: number; /** - * @member {number} [lowPriorityCoreQuota] The low-priority core quota for - * this Batch account. **NOTE: This property will not be serialized. It can - * only be populated by the server.** + * The low-priority core quota for the Batch account. For accounts with PoolAllocationMode set to + * UserSubscription, quota is managed on the subscription so this value is not returned. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly lowPriorityCoreQuota?: number; /** - * @member {number} [poolQuota] The pool quota for this Batch account. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * A list of the dedicated core quota per Virtual Machine family for the Batch account. For + * accounts with PoolAllocationMode set to UserSubscription, quota is managed on the subscription + * so this value is not returned. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly dedicatedCoreQuotaPerVMFamily?: VirtualMachineFamilyCoreQuota[]; + /** + * A value indicating whether the core quota for the Batch Account is enforced per Virtual + * Machine family or not. Batch is transitioning its core quota system for dedicated cores to be + * enforced per Virtual Machine family. During this transitional phase, the dedicated core quota + * per Virtual Machine family may not yet be enforced. If this flag is false, dedicated core + * quota is enforced via the old dedicatedCoreQuota property on the account and does not consider + * Virtual Machine family. If this flag is true, dedicated core quota is enforced via the + * dedicatedCoreQuotaPerVMFamily property on the account, and the old dedicatedCoreQuota does not + * apply. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly dedicatedCoreQuotaPerVMFamilyEnforced?: boolean; + /** + * The pool quota for the Batch account. **NOTE: This property will not be serialized. It can + * only be populated by the server.** */ readonly poolQuota?: number; /** - * @member {number} [activeJobAndJobScheduleQuota] The active job and job - * schedule quota for this Batch account. **NOTE: This property will not be + * The active job and job schedule quota for the Batch account. **NOTE: This property will not be * serialized. It can only be populated by the server.** */ readonly activeJobAndJobScheduleQuota?: number; + /** + * The identity of the Batch account. + */ + identity?: BatchAccountIdentity; } /** - * @interface - * An interface representing BatchAccountUpdateParameters. * Parameters for updating an Azure Batch account. - * */ export interface BatchAccountUpdateParameters { /** - * @member {{ [propertyName: string]: string }} [tags] The user-specified - * tags associated with the account. + * The user-specified tags associated with the account. */ tags?: { [propertyName: string]: string }; /** - * @member {AutoStorageBaseProperties} [autoStorage] The properties related - * to the auto-storage account. + * The properties related to the auto-storage account. */ autoStorage?: AutoStorageBaseProperties; + /** + * The encryption configuration for the Batch account. Configures how customer data is encrypted + * inside the Batch account. By default, accounts are encrypted using a Microsoft managed key. + * For additional control, a customer-managed key can be used instead. + */ + encryption?: EncryptionProperties; + /** + * The identity of the Batch account. + */ + identity?: BatchAccountIdentity; } /** - * @interface - * An interface representing BatchAccountRegenerateKeyParameters. * Parameters supplied to the RegenerateKey operation. - * */ export interface BatchAccountRegenerateKeyParameters { /** - * @member {AccountKeyType} keyName The type of account key to regenerate. - * Possible values include: 'Primary', 'Secondary' + * The type of account key to regenerate. Possible values include: 'Primary', 'Secondary' */ keyName: AccountKeyType; } /** - * @interface - * An interface representing BatchAccountKeys. * A set of Azure Batch account keys. - * */ export interface BatchAccountKeys { /** - * @member {string} [accountName] The Batch account name. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The Batch account name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly accountName?: string; /** - * @member {string} [primary] The primary key associated with the account. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The primary key associated with the account. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly primary?: string; /** - * @member {string} [secondary] The secondary key associated with the - * account. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The secondary key associated with the account. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly secondary?: string; } /** - * @interface - * An interface representing ActivateApplicationPackageParameters. * Parameters for an activating an application package. - * */ export interface ActivateApplicationPackageParameters { /** - * @member {string} format The format of the application package binary file. + * The format of the application package binary file. */ format: string; } /** - * @interface - * An interface representing ApplicationCreateParameters. - * Parameters for adding an Application. - * + * Contains information about an application in a Batch account. */ -export interface ApplicationCreateParameters { +export interface Application extends ProxyResource { + /** + * The display name for the application. + */ + displayName?: string; /** - * @member {boolean} [allowUpdates] A value indicating whether packages - * within the application may be overwritten using the same version string. + * A value indicating whether packages within the application may be overwritten using the same + * version string. */ allowUpdates?: boolean; /** - * @member {string} [displayName] The display name for the application. + * The package to use if a client requests the application but does not specify a version. This + * property can only be set to the name of an existing package. */ - displayName?: string; + defaultVersion?: string; } /** - * @interface - * An interface representing ApplicationPackage. - * An application package which represents a particular version of an - * application. - * + * An application package which represents a particular version of an application. */ -export interface ApplicationPackage { - /** - * @member {string} [id] The ID of the application. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly id?: string; +export interface ApplicationPackage extends ProxyResource { /** - * @member {string} [version] The version of the application package. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly version?: string; - /** - * @member {PackageState} [state] The current state of the application - * package. Possible values include: 'Pending', 'Active', 'Unmapped' - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The current state of the application package. Possible values include: 'Pending', 'Active' + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly state?: PackageState; /** - * @member {string} [format] The format of the application package, if the - * package is active. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The format of the application package, if the package is active. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly format?: string; /** - * @member {string} [storageUrl] The URL for the application package in Azure - * Storage. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The URL for the application package in Azure Storage. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly storageUrl?: string; /** - * @member {Date} [storageUrlExpiry] The UTC time at which the Azure Storage - * URL will expire. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The UTC time at which the Azure Storage URL will expire. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly storageUrlExpiry?: Date; /** - * @member {Date} [lastActivationTime] The time at which the package was last - * activated, if the package is active. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The time at which the package was last activated, if the package is active. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly lastActivationTime?: Date; } /** - * @interface - * An interface representing Application. - * Contains information about an application in a Batch account. - * - */ -export interface Application { - /** - * @member {string} [id] A string that uniquely identifies the application - * within the account. - */ - id?: string; - /** - * @member {string} [displayName] The display name for the application. - */ - displayName?: string; - /** - * @member {ApplicationPackage[]} [packages] The list of packages under this - * application. - */ - packages?: ApplicationPackage[]; - /** - * @member {boolean} [allowUpdates] A value indicating whether packages - * within the application may be overwritten using the same version string. - */ - allowUpdates?: boolean; - /** - * @member {string} [defaultVersion] The package to use if a client requests - * the application but does not specify a version. - */ - defaultVersion?: string; -} - -/** - * @interface - * An interface representing ApplicationUpdateParameters. - * Parameters for an update application request. - * - */ -export interface ApplicationUpdateParameters { - /** - * @member {boolean} [allowUpdates] A value indicating whether packages - * within the application may be overwritten using the same version string. - */ - allowUpdates?: boolean; - /** - * @member {string} [defaultVersion] The package to use if a client requests - * the application but does not specify a version. - */ - defaultVersion?: string; - /** - * @member {string} [displayName] The display name for the application. - */ - displayName?: string; -} - -/** - * @interface - * An interface representing BatchLocationQuota. * Quotas associated with a Batch region for a particular subscription. - * */ export interface BatchLocationQuota { /** - * @member {number} [accountQuota] The number of Batch accounts that may be - * created under the subscription in the specified region. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The number of Batch accounts that may be created under the subscription in the specified + * region. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly accountQuota?: number; } /** - * @interface - * An interface representing ProxyResource. - * A definition of an Azure resource. - * - * @extends BaseResource - */ -export interface ProxyResource extends BaseResource { - /** - * @member {string} [id] The ID of the resource. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly id?: string; - /** - * @member {string} [name] The name of the resource. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly name?: string; - /** - * @member {string} [type] The type of the resource. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly type?: string; - /** - * @member {string} [etag] The ETag of the resource, used for concurrency - * statements. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly etag?: string; -} - -/** - * @interface * An interface representing CertificateBaseProperties. */ export interface CertificateBaseProperties { /** - * @member {string} [thumbprintAlgorithm] The algorithm of the certificate - * thumbprint. This must match the first portion of the certificate name. - * Currently required to be 'SHA1'. + * The algorithm of the certificate thumbprint. This must match the first portion of the + * certificate name. Currently required to be 'SHA1'. */ thumbprintAlgorithm?: string; /** - * @member {string} [thumbprint] The thumbprint of the certificate. This must - * match the thumbprint from the name. + * The thumbprint of the certificate. This must match the thumbprint from the name. */ thumbprint?: string; /** - * @member {CertificateFormat} [format] The format of the certificate - - * either Pfx or Cer. If omitted, the default is Pfx. Possible values - * include: 'Pfx', 'Cer' + * The format of the certificate - either Pfx or Cer. If omitted, the default is Pfx. Possible + * values include: 'Pfx', 'Cer' */ format?: CertificateFormat; } /** - * @interface - * An interface representing DeleteCertificateError. * An error response from the Batch service. - * */ export interface DeleteCertificateError { /** - * @member {string} code An identifier for the error. Codes are invariant and - * are intended to be consumed programmatically. + * An identifier for the error. Codes are invariant and are intended to be consumed + * programmatically. */ code: string; /** - * @member {string} message A message describing the error, intended to be - * suitable for display in a user interface. + * A message describing the error, intended to be suitable for display in a user interface. */ message: string; /** - * @member {string} [target] The target of the particular error. For example, - * the name of the property in error. + * The target of the particular error. For example, the name of the property in error. */ target?: string; /** - * @member {DeleteCertificateError[]} [details] A list of additional details - * about the error. + * A list of additional details about the error. */ details?: DeleteCertificateError[]; } /** - * @interface - * An interface representing Certificate. * Contains information about a certificate. - * - * @extends ProxyResource */ export interface Certificate extends ProxyResource { /** - * @member {string} [thumbprintAlgorithm] The algorithm of the certificate - * thumbprint. This must match the first portion of the certificate name. - * Currently required to be 'SHA1'. + * The algorithm of the certificate thumbprint. This must match the first portion of the + * certificate name. Currently required to be 'SHA1'. */ thumbprintAlgorithm?: string; /** - * @member {string} [thumbprint] The thumbprint of the certificate. This must - * match the thumbprint from the name. + * The thumbprint of the certificate. This must match the thumbprint from the name. */ thumbprint?: string; /** - * @member {CertificateFormat} [format] The format of the certificate - - * either Pfx or Cer. If omitted, the default is Pfx. Possible values - * include: 'Pfx', 'Cer' + * The format of the certificate - either Pfx or Cer. If omitted, the default is Pfx. Possible + * values include: 'Pfx', 'Cer' */ format?: CertificateFormat; /** - * @member {CertificateProvisioningState} [provisioningState] The provisioned - * state of the resource. Values are: - * - * Succeeded - The certificate is available for use in pools. - * Deleting - The user has requested that the certificate be deleted, but the - * delete operation has not yet completed. You may not reference the - * certificate when creating or updating pools. - * Failed - The user requested that the certificate be deleted, but there are - * pools that still have references to the certificate, or it is still - * installed on one or more compute nodes. (The latter can occur if the - * certificate has been removed from the pool, but the node has not yet - * restarted. Nodes refresh their certificates only when they restart.) You - * may use the cancel certificate delete operation to cancel the delete, or - * the delete certificate operation to retry the delete. Possible values - * include: 'Succeeded', 'Deleting', 'Failed' - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The provisioned state of the resource. Possible values include: 'Succeeded', 'Deleting', + * 'Failed' + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly provisioningState?: CertificateProvisioningState; /** - * @member {Date} [provisioningStateTransitionTime] The time at which the - * certificate entered its current state. **NOTE: This property will not be + * The time at which the certificate entered its current state. **NOTE: This property will not be * serialized. It can only be populated by the server.** */ readonly provisioningStateTransitionTime?: Date; /** - * @member {CertificateProvisioningState} [previousProvisioningState] The - * previous provisioned state of the resource. Possible values include: - * 'Succeeded', 'Deleting', 'Failed' - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The previous provisioned state of the resource. Possible values include: 'Succeeded', + * 'Deleting', 'Failed' + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly previousProvisioningState?: CertificateProvisioningState; /** - * @member {Date} [previousProvisioningStateTransitionTime] The time at which - * the certificate entered its previous state. **NOTE: This property will not + * The time at which the certificate entered its previous state. **NOTE: This property will not * be serialized. It can only be populated by the server.** */ readonly previousProvisioningStateTransitionTime?: Date; /** - * @member {string} [publicData] The public key of the certificate. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The public key of the certificate. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly publicData?: string; /** - * @member {DeleteCertificateError} [deleteCertificateError] The error which - * occurred while deleting the certificate. This is only returned when the + * The error which occurred while deleting the certificate. This is only returned when the * certificate provisioningState is 'Failed'. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly deleteCertificateError?: DeleteCertificateError; } /** - * @interface - * An interface representing CertificateCreateOrUpdateParameters. * Contains information about a certificate. - * - * @extends ProxyResource */ export interface CertificateCreateOrUpdateParameters extends ProxyResource { /** - * @member {string} [thumbprintAlgorithm] The algorithm of the certificate - * thumbprint. This must match the first portion of the certificate name. - * Currently required to be 'SHA1'. + * The algorithm of the certificate thumbprint. This must match the first portion of the + * certificate name. Currently required to be 'SHA1'. */ thumbprintAlgorithm?: string; /** - * @member {string} [thumbprint] The thumbprint of the certificate. This must - * match the thumbprint from the name. + * The thumbprint of the certificate. This must match the thumbprint from the name. */ thumbprint?: string; /** - * @member {CertificateFormat} [format] The format of the certificate - - * either Pfx or Cer. If omitted, the default is Pfx. Possible values - * include: 'Pfx', 'Cer' + * The format of the certificate - either Pfx or Cer. If omitted, the default is Pfx. Possible + * values include: 'Pfx', 'Cer' */ format?: CertificateFormat; /** - * @member {string} data The base64-encoded contents of the certificate. The - * maximum size is 10KB. + * The base64-encoded contents of the certificate. The maximum size is 10KB. */ data: string; /** - * @member {string} [password] The password to access the certificate's - * private key. This is required if the certificate format is pfx and must be - * omitted if the certificate format is cer. + * The password to access the certificate's private key. This must not be specified if the + * certificate format is Cer. */ password?: string; } /** - * @interface + * Contains information about a private link resource. + */ +export interface PrivateLinkResource extends ProxyResource { + /** + * The group id of the private link resource. The group id is used to establish the private link + * connection. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly groupId?: string; + /** + * The list of required members that are used to establish the private link connection. **NOTE: + * This property will not be serialized. It can only be populated by the server.** + */ + readonly requiredMembers?: string[]; + /** + * The list of required zone names for the private DNS resource name. **NOTE: This property will + * not be serialized. It can only be populated by the server.** + */ + readonly requiredZoneNames?: string[]; +} + +/** * An interface representing CloudServiceConfiguration. - * @summary The configuration for nodes in a pool based on the Azure Cloud - * Services platform. - * + * @summary The configuration for nodes in a pool based on the Azure Cloud Services platform. */ export interface CloudServiceConfiguration { /** - * @member {string} osFamily The Azure Guest OS family to be installed on the - * virtual machines in the pool. Possible values are: 2 - OS Family 2, - * equivalent to Windows Server 2008 R2 SP1. 3 - OS Family 3, equivalent to - * Windows Server 2012. 4 - OS Family 4, equivalent to Windows Server 2012 - * R2. 5 - OS Family 5, equivalent to Windows Server 2016. For more - * information, see Azure Guest OS Releases + * The Azure Guest OS family to be installed on the virtual machines in the pool. Possible values + * are: 2 - OS Family 2, equivalent to Windows Server 2008 R2 SP1. 3 - OS Family 3, equivalent to + * Windows Server 2012. 4 - OS Family 4, equivalent to Windows Server 2012 R2. 5 - OS Family 5, + * equivalent to Windows Server 2016. 6 - OS Family 6, equivalent to Windows Server 2019. For + * more information, see Azure Guest OS Releases * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). */ osFamily: string; /** - * @member {string} [targetOSVersion] The Azure Guest OS version to be - * installed on the virtual machines in the pool. The default value is * - * which specifies the latest operating system version for the specified OS - * family. - */ - targetOSVersion?: string; - /** - * @member {string} [currentOSVersion] The Azure Guest OS Version currently - * installed on the virtual machines in the pool. This may differ from - * targetOSVersion if the pool state is Upgrading. In this case some virtual - * machines may be on the targetOSVersion and some may be on the - * currentOSVersion during the upgrade process. Once all virtual machines - * have upgraded, currentOSVersion is updated to be the same as - * targetOSVersion. + * The Azure Guest OS version to be installed on the virtual machines in the pool. The default + * value is * which specifies the latest operating system version for the specified OS family. */ - currentOSVersion?: string; + osVersion?: string; } /** - * @interface * An interface representing ImageReference. - * @summary A reference to an Azure Virtual Machines Marketplace image or the - * Azure Image resource of a custom Virtual Machine. To get the list of all - * imageReferences verified by Azure Batch, see the 'List supported node agent - * SKUs' operation. - * + * @summary A reference to an Azure Virtual Machines Marketplace image or the Azure Image resource + * of a custom Virtual Machine. To get the list of all imageReferences verified by Azure Batch, see + * the 'List supported node agent SKUs' operation. */ export interface ImageReference { /** - * @member {string} [publisher] The publisher of the Azure Virtual Machines - * Marketplace image. For example, Canonical or MicrosoftWindowsServer. + * The publisher of the Azure Virtual Machines Marketplace image. For example, Canonical or + * MicrosoftWindowsServer. */ publisher?: string; /** - * @member {string} [offer] The offer type of the Azure Virtual Machines - * Marketplace image. For example, UbuntuServer or WindowsServer. + * The offer type of the Azure Virtual Machines Marketplace image. For example, UbuntuServer or + * WindowsServer. */ offer?: string; /** - * @member {string} [sku] The SKU of the Azure Virtual Machines Marketplace - * image. For example, 14.04.0-LTS or 2012-R2-Datacenter. + * The SKU of the Azure Virtual Machines Marketplace image. For example, 18.04-LTS or + * 2019-Datacenter. */ sku?: string; /** - * @member {string} [version] The version of the Azure Virtual Machines - * Marketplace image. A value of 'latest' can be specified to select the - * latest version of an image. If omitted, the default is 'latest'. + * The version of the Azure Virtual Machines Marketplace image. A value of 'latest' can be + * specified to select the latest version of an image. If omitted, the default is 'latest'. */ version?: string; /** - * @member {string} [id] The ARM resource identifier of the virtual machine - * image. Computes nodes of the pool will be created using this custom image. - * This is of the form - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}. - * This property is mutually exclusive with other properties. The virtual - * machine image must be in the same region and subscription as the Azure - * Batch account. For information about the firewall settings for Batch node - * agent to communicate with Batch service see - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration - * . + * The ARM resource identifier of the Shared Image Gallery Image. Compute Nodes in the Pool will + * be created using this Image Id. This is of the form + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageDefinitionName}/versions/{versionId}. + * This property is mutually exclusive with other properties. The Shared Image Gallery image must + * have replicas in the same region as the Azure Batch account. For information about the + * firewall settings for the Batch node agent to communicate with the Batch service see + * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. */ id?: string; } /** - * @interface - * An interface representing OSDisk. - * @summary Settings for the operating system disk of the virtual machine. - * - */ -export interface OSDisk { - /** - * @member {CachingType} [caching] The type of caching to be enabled for the - * data disks. none - The caching mode for the disk is not enabled. readOnly - * - The caching mode for the disk is read only. readWrite - The caching mode - * for the disk is read and write. Default value is none. Possible values - * include: 'None', 'ReadOnly', 'ReadWrite' - */ - caching?: CachingType; -} - -/** - * @interface * An interface representing WindowsConfiguration. * @summary Windows operating system settings to apply to the virtual machine. - * */ export interface WindowsConfiguration { /** - * @member {boolean} [enableAutomaticUpdates] Whether automatic updates are - * enabled on the virtual machine. If omitted, the default value is true. + * Whether automatic updates are enabled on the virtual machine. If omitted, the default value is + * true. */ enableAutomaticUpdates?: boolean; } /** - * @interface - * An interface representing DataDisk. - * Data Disk settings which will be used by the data disks associated to - * Compute Nodes in the pool. - * + * Settings which will be used by the data disks associated to Compute Nodes in the Pool. When + * using attached data disks, you need to mount and format the disks from within a VM to use them. */ export interface DataDisk { /** - * @member {number} lun The logical unit number. The lun is used to uniquely - * identify each data disk. If attaching multiple disks, each should have a - * distinct lun. + * The logical unit number. The lun is used to uniquely identify each data disk. If attaching + * multiple disks, each should have a distinct lun. The value must be between 0 and 63, + * inclusive. */ lun: number; /** - * @member {CachingType} [caching] The type of caching to be enabled for the - * data disks. Values are: + * The type of caching to be enabled for the data disks. Values are: * * none - The caching mode for the disk is not enabled. * readOnly - The caching mode for the disk is read only. * readWrite - The caching mode for the disk is read and write. * - * The default value for caching is none. For information about the caching - * options see: + * The default value for caching is none. For information about the caching options see: * https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. * Possible values include: 'None', 'ReadOnly', 'ReadWrite' */ caching?: CachingType; /** - * @member {number} diskSizeGB The initial disk size in GB when creating new - * data disk. + * The initial disk size in GB when creating new data disk. */ diskSizeGB: number; /** - * @member {StorageAccountType} [storageAccountType] The storage account type - * to be used for the data disk. If omitted, the default is "Standard_LRS". - * Values are: + * The storage account type to be used for the data disk. If omitted, the default is + * "Standard_LRS". Values are: * - * Standard_LRS - The data disk should use standard locally redundant - * storage. - * Premium_LRS - The data disk should use premium locally redundant storage. - * Possible values include: 'Standard_LRS', 'Premium_LRS' + * Standard_LRS - The data disk should use standard locally redundant storage. + * Premium_LRS - The data disk should use premium locally redundant storage. Possible values + * include: 'Standard_LRS', 'Premium_LRS' */ storageAccountType?: StorageAccountType; } /** - * @interface + * An interface representing ContainerRegistry. + * @summary A private container registry. + */ +export interface ContainerRegistry { + /** + * The registry URL. If omitted, the default is "docker.io". + */ + registryServer?: string; + /** + * The user name to log into the registry server. + */ + userName: string; + /** + * The password to log into the registry server. + */ + password: string; +} + +/** + * An interface representing ContainerConfiguration. + * @summary The configuration for container-enabled pools. + */ +export interface ContainerConfiguration { + /** + * The collection of container image names. This is the full image reference, as would be + * specified to "docker pull". An image will be sourced from the default Docker registry unless + * the image is fully qualified with an alternative registry. + */ + containerImageNames?: string[]; + /** + * Additional private registries from which containers can be pulled. If any images must be + * downloaded from a private registry which requires credentials, then those credentials must be + * provided here. + */ + containerRegistries?: ContainerRegistry[]; +} + +/** + * The disk encryption configuration applied on compute nodes in the pool. Disk encryption + * configuration is not supported on Linux pool created with Virtual Machine Image or Shared Image + * Gallery Image. + */ +export interface DiskEncryptionConfiguration { + /** + * The list of disk targets Batch Service will encrypt on the compute node. On Linux pool, only + * "TemporaryDisk" is supported; on Windows pool, "OsDisk" and "TemporaryDisk" must be specified. + */ + targets?: DiskEncryptionTarget[]; +} + +/** * An interface representing VirtualMachineConfiguration. - * @summary The configuration for compute nodes in a pool based on the Azure - * Virtual Machines infrastructure. - * + * @summary The configuration for compute nodes in a pool based on the Azure Virtual Machines + * infrastructure. */ export interface VirtualMachineConfiguration { /** - * @member {ImageReference} imageReference A reference to the Azure Virtual - * Machines Marketplace Image or the custom Virtual Machine Image to use. + * A reference to the Azure Virtual Machines Marketplace Image or the custom Virtual Machine + * Image to use. */ imageReference: ImageReference; /** - * @member {OSDisk} [osDisk] Settings for the operating system disk of the - * Virtual Machine. - */ - osDisk?: OSDisk; - /** - * @member {string} nodeAgentSkuId The SKU of the Batch node agent to be - * provisioned on compute nodes in the pool. The Batch node agent is a - * program that runs on each node in the pool, and provides the - * command-and-control interface between the node and the Batch service. - * There are different implementations of the node agent, known as SKUs, for - * different operating systems. You must specify a node agent SKU which - * matches the selected image reference. To get the list of supported node - * agent SKUs along with their list of verified image references, see the - * 'List supported node agent SKUs' operation. + * The SKU of the Batch node agent to be provisioned on compute nodes in the pool. The Batch node + * agent is a program that runs on each node in the pool, and provides the command-and-control + * interface between the node and the Batch service. There are different implementations of the + * node agent, known as SKUs, for different operating systems. You must specify a node agent SKU + * which matches the selected image reference. To get the list of supported node agent SKUs along + * with their list of verified image references, see the 'List supported node agent SKUs' + * operation. */ nodeAgentSkuId: string; /** - * @member {WindowsConfiguration} [windowsConfiguration] Windows operating - * system settings on the virtual machine. This property must not be - * specified if the imageReference specifies a Linux OS image. + * Windows operating system settings on the virtual machine. This property must not be specified + * if the imageReference specifies a Linux OS image. */ windowsConfiguration?: WindowsConfiguration; /** - * @member {DataDisk[]} [dataDisks] The configuration for data disks attached - * to the compute nodes in the pool. This property must be specified if the - * compute nodes in the pool need to have empty data disks attached to them. + * The configuration for data disks attached to the compute nodes in the pool. This property must + * be specified if the compute nodes in the pool need to have empty data disks attached to them. */ dataDisks?: DataDisk[]; /** - * @member {string} [licenseType] The type of on-premises license to be used - * when deploying the operating system. This only applies to images that - * contain the Windows operating system, and should only be used when you - * hold valid on-premises licenses for the nodes which will be deployed. If - * omitted, no on-premises licensing discount is applied. Values are: + * The type of on-premises license to be used when deploying the operating system. This only + * applies to images that contain the Windows operating system, and should only be used when you + * hold valid on-premises licenses for the nodes which will be deployed. If omitted, no + * on-premises licensing discount is applied. Values are: * * Windows_Server - The on-premises license is for Windows Server. * Windows_Client - The on-premises license is for Windows Client. */ licenseType?: string; + /** + * The container configuration for the pool. If specified, setup is performed on each node in the + * pool to allow tasks to run in containers. All regular tasks and job manager tasks run on this + * pool must specify the containerSettings property, and all other tasks may specify it. + */ + containerConfiguration?: ContainerConfiguration; + /** + * The disk encryption configuration for the pool. If specified, encryption is performed on each + * node in the pool during node provisioning. + */ + diskEncryptionConfiguration?: DiskEncryptionConfiguration; } /** - * @interface * An interface representing DeploymentConfiguration. * @summary Deployment configuration properties. - * */ export interface DeploymentConfiguration { /** - * @member {CloudServiceConfiguration} [cloudServiceConfiguration] The cloud - * service configuration for the pool. This property and - * virtualMachineConfiguration are mutually exclusive and one of the - * properties must be specified. This property cannot be specified if the - * Batch account was created with its poolAllocationMode property set to + * The cloud service configuration for the pool. This property and virtualMachineConfiguration + * are mutually exclusive and one of the properties must be specified. This property cannot be + * specified if the Batch account was created with its poolAllocationMode property set to * 'UserSubscription'. */ cloudServiceConfiguration?: CloudServiceConfiguration; /** - * @member {VirtualMachineConfiguration} [virtualMachineConfiguration] The - * virtual machine configuration for the pool. This property and - * cloudServiceConfiguration are mutually exclusive and one of the properties - * must be specified. + * The virtual machine configuration for the pool. This property and cloudServiceConfiguration + * are mutually exclusive and one of the properties must be specified. */ virtualMachineConfiguration?: VirtualMachineConfiguration; } /** - * @interface * An interface representing FixedScaleSettings. * @summary Fixed scale settings for the pool. - * */ export interface FixedScaleSettings { /** - * @member {string} [resizeTimeout] The timeout for allocation of compute - * nodes to the pool. The default value is 15 minutes. Timeout values use ISO - * 8601 format. For example, use PT10M for 10 minutes. The minimum value is 5 - * minutes. If you specify a value less than 5 minutes, the Batch service - * rejects the request with an error; if you are calling the REST API - * directly, the HTTP status code is 400 (Bad Request). + * The timeout for allocation of compute nodes to the pool. The default value is 15 minutes. + * Timeout values use ISO 8601 format. For example, use PT10M for 10 minutes. The minimum value + * is 5 minutes. If you specify a value less than 5 minutes, the Batch service rejects the + * request with an error; if you are calling the REST API directly, the HTTP status code is 400 + * (Bad Request). */ resizeTimeout?: string; /** - * @member {number} [targetDedicatedNodes] The desired number of dedicated - * compute nodes in the pool. At least one of targetDedicatedNodes, - * targetLowPriority nodes must be set. + * The desired number of dedicated compute nodes in the pool. At least one of + * targetDedicatedNodes, targetLowPriorityNodes must be set. */ targetDedicatedNodes?: number; /** - * @member {number} [targetLowPriorityNodes] The desired number of - * low-priority compute nodes in the pool. At least one of - * targetDedicatedNodes, targetLowPriority nodes must be set. + * The desired number of low-priority compute nodes in the pool. At least one of + * targetDedicatedNodes, targetLowPriorityNodes must be set. */ targetLowPriorityNodes?: number; /** - * @member {ComputeNodeDeallocationOption} [nodeDeallocationOption] - * Determines what to do with a node and its running task(s) if the pool size - * is decreasing. If omitted, the default value is Requeue. Possible values - * include: 'Requeue', 'Terminate', 'TaskCompletion', 'RetainedData' + * Determines what to do with a node and its running task(s) if the pool size is decreasing. If + * omitted, the default value is Requeue. Possible values include: 'Requeue', 'Terminate', + * 'TaskCompletion', 'RetainedData' */ nodeDeallocationOption?: ComputeNodeDeallocationOption; } /** - * @interface * An interface representing AutoScaleSettings. * @summary AutoScale settings for the pool. - * */ export interface AutoScaleSettings { /** - * @member {string} formula A formula for the desired number of compute nodes - * in the pool. + * A formula for the desired number of compute nodes in the pool. */ formula: string; /** - * @member {string} [evaluationInterval] The time interval at which to - * automatically adjust the pool size according to the autoscale formula. If - * omitted, the default value is 15 minutes (PT15M). + * The time interval at which to automatically adjust the pool size according to the autoscale + * formula. If omitted, the default value is 15 minutes (PT15M). */ evaluationInterval?: string; } /** - * @interface - * An interface representing ScaleSettings. + * Defines the desired size of the pool. This can either be 'fixedScale' where the requested + * targetDedicatedNodes is specified, or 'autoScale' which defines a formula which is periodically + * reevaluated. If this property is not specified, the pool will have a fixed scale with 0 + * targetDedicatedNodes. * @summary Scale settings for the pool - * - * Defines the desired size of the pool. This can either be 'fixedScale' where - * the requested targetDedicatedNodes is specified, or 'autoScale' which - * defines a formula which is periodically reevaluated. If this property is not - * specified, the pool will have a fixed scale with 0 targetDedicatedNodes. - * */ export interface ScaleSettings { /** - * @member {FixedScaleSettings} [fixedScale] Fixed scale settings for the - * pool. This property and autoScale are mutually exclusive and one of the - * properties must be specified. + * Fixed scale settings for the pool. This property and autoScale are mutually exclusive and one + * of the properties must be specified. */ fixedScale?: FixedScaleSettings; /** - * @member {AutoScaleSettings} [autoScale] AutoScale settings for the pool. - * This property and fixedScale are mutually exclusive and one of the - * properties must be specified. + * AutoScale settings for the pool. This property and fixedScale are mutually exclusive and one + * of the properties must be specified. */ autoScale?: AutoScaleSettings; } /** - * @interface * An interface representing AutoScaleRunError. * @summary An error that occurred when autoscaling a pool. - * */ export interface AutoScaleRunError { /** - * @member {string} code An identifier for the error. Codes are invariant and - * are intended to be consumed programmatically. + * An identifier for the error. Codes are invariant and are intended to be consumed + * programmatically. */ code: string; /** - * @member {string} message A message describing the error, intended to be - * suitable for display in a user interface. + * A message describing the error, intended to be suitable for display in a user interface. */ message: string; /** - * @member {AutoScaleRunError[]} [details] Additional details about the - * error. + * Additional details about the error. */ details?: AutoScaleRunError[]; } /** - * @interface * An interface representing AutoScaleRun. - * @summary The results and errors from an execution of a pool autoscale - * formula. - * + * @summary The results and errors from an execution of a pool autoscale formula. */ export interface AutoScaleRun { /** - * @member {Date} evaluationTime The time at which the autoscale formula was - * last evaluated. + * The time at which the autoscale formula was last evaluated. */ evaluationTime: Date; /** - * @member {string} [results] The final values of all variables used in the - * evaluation of the autoscale formula. Each variable value is returned in - * the form $variable=value, and variables are separated by semicolons. + * The final values of all variables used in the evaluation of the autoscale formula. Each + * variable value is returned in the form $variable=value, and variables are separated by + * semicolons. */ results?: string; /** - * @member {AutoScaleRunError} [error] Details of the error encountered - * evaluating the autoscale formula on the pool, if the evaluation was - * unsuccessful. + * Details of the error encountered evaluating the autoscale formula on the pool, if the + * evaluation was unsuccessful. */ error?: AutoScaleRunError; } /** - * @interface * An interface representing NetworkSecurityGroupRule. * @summary A network security group rule to apply to an inbound endpoint. - * */ export interface NetworkSecurityGroupRule { /** - * @member {number} priority The priority for this rule. Priorities within a - * pool must be unique and are evaluated in order of priority. The lower the - * number the higher the priority. For example, rules could be specified with - * order numbers of 150, 250, and 350. The rule with the order number of 150 - * takes precedence over the rule that has an order of 250. Allowed - * priorities are 150 to 3500. If any reserved or duplicate values are - * provided the request fails with HTTP status code 400. + * The priority for this rule. Priorities within a pool must be unique and are evaluated in order + * of priority. The lower the number the higher the priority. For example, rules could be + * specified with order numbers of 150, 250, and 350. The rule with the order number of 150 takes + * precedence over the rule that has an order of 250. Allowed priorities are 150 to 4096. If any + * reserved or duplicate values are provided the request fails with HTTP status code 400. */ priority: number; /** - * @member {NetworkSecurityGroupRuleAccess} access The action that should be - * taken for a specified IP address, subnet range or tag. Possible values - * include: 'Allow', 'Deny' + * The action that should be taken for a specified IP address, subnet range or tag. Possible + * values include: 'Allow', 'Deny' */ access: NetworkSecurityGroupRuleAccess; /** - * @member {string} sourceAddressPrefix The source address prefix or tag to - * match for the rule. Valid values are a single IP address (i.e. - * 10.10.10.10), IP subnet (i.e. 192.168.1.0/24), default tag, or * (for all - * addresses). If any other values are provided the request fails with HTTP - * status code 400. + * The source address prefix or tag to match for the rule. Valid values are a single IP address + * (i.e. 10.10.10.10), IP subnet (i.e. 192.168.1.0/24), default tag, or * (for all addresses). + * If any other values are provided the request fails with HTTP status code 400. */ sourceAddressPrefix: string; + /** + * The source port ranges to match for the rule. Valid values are '*' (for all ports 0 - 65535) + * or arrays of ports or port ranges (i.e. 100-200). The ports should in the range of 0 to 65535 + * and the port ranges or ports can't overlap. If any other values are provided the request fails + * with HTTP status code 400. Default value will be *. + */ + sourcePortRanges?: string[]; } /** - * @interface * An interface representing InboundNatPool. - * @summary A inbound NAT pool that can be used to address specific ports on - * compute nodes in a Batch pool externally. - * + * @summary A inbound NAT pool that can be used to address specific ports on compute nodes in a + * Batch pool externally. */ export interface InboundNatPool { /** - * @member {string} name The name of the endpoint. The name must be unique - * within a Batch pool, can contain letters, numbers, underscores, periods, - * and hyphens. Names must start with a letter or number, must end with a - * letter, number, or underscore, and cannot exceed 77 characters. If any - * invalid values are provided the request fails with HTTP status code 400. + * The name of the endpoint. The name must be unique within a Batch pool, can contain letters, + * numbers, underscores, periods, and hyphens. Names must start with a letter or number, must end + * with a letter, number, or underscore, and cannot exceed 77 characters. If any invalid values + * are provided the request fails with HTTP status code 400. */ name: string; /** - * @member {InboundEndpointProtocol} protocol The protocol of the endpoint. - * Possible values include: 'TCP', 'UDP' + * The protocol of the endpoint. Possible values include: 'TCP', 'UDP' */ protocol: InboundEndpointProtocol; /** - * @member {number} backendPort The port number on the compute node. This - * must be unique within a Batch pool. Acceptable values are between 1 and - * 65535 except for 22, 3389, 29876 and 29877 as these are reserved. If any - * reserved values are provided the request fails with HTTP status code 400. + * The port number on the compute node. This must be unique within a Batch pool. Acceptable + * values are between 1 and 65535 except for 22, 3389, 29876 and 29877 as these are reserved. If + * any reserved values are provided the request fails with HTTP status code 400. */ backendPort: number; /** - * @member {number} frontendPortRangeStart The first port number in the range - * of external ports that will be used to provide inbound access to the - * backendPort on individual compute nodes. Acceptable values range between 1 - * and 65534 except ports from 50000 to 55000 which are reserved. All ranges - * within a pool must be distinct and cannot overlap. If any reserved or - * overlapping values are provided the request fails with HTTP status code - * 400. + * The first port number in the range of external ports that will be used to provide inbound + * access to the backendPort on individual compute nodes. Acceptable values range between 1 and + * 65534 except ports from 50000 to 55000 which are reserved. All ranges within a pool must be + * distinct and cannot overlap. If any reserved or overlapping values are provided the request + * fails with HTTP status code 400. */ frontendPortRangeStart: number; /** - * @member {number} frontendPortRangeEnd The last port number in the range of - * external ports that will be used to provide inbound access to the - * backendPort on individual compute nodes. Acceptable values range between 1 - * and 65534 except ports from 50000 to 55000 which are reserved by the Batch - * service. All ranges within a pool must be distinct and cannot overlap. If - * any reserved or overlapping values are provided the request fails with - * HTTP status code 400. + * The last port number in the range of external ports that will be used to provide inbound + * access to the backendPort on individual compute nodes. Acceptable values range between 1 and + * 65534 except ports from 50000 to 55000 which are reserved by the Batch service. All ranges + * within a pool must be distinct and cannot overlap. If any reserved or overlapping values are + * provided the request fails with HTTP status code 400. */ frontendPortRangeEnd: number; /** - * @member {NetworkSecurityGroupRule[]} [networkSecurityGroupRules] A list of - * network security group rules that will be applied to the endpoint. The - * maximum number of rules that can be specified across all the endpoints on - * a Batch pool is 25. If no network security group rules are specified, a - * default rule will be created to allow inbound access to the specified - * backendPort. If the maximum number of network security group rules is + * A list of network security group rules that will be applied to the endpoint. The maximum + * number of rules that can be specified across all the endpoints on a Batch pool is 25. If no + * network security group rules are specified, a default rule will be created to allow inbound + * access to the specified backendPort. If the maximum number of network security group rules is * exceeded the request fails with HTTP status code 400. */ networkSecurityGroupRules?: NetworkSecurityGroupRule[]; } /** - * @interface * An interface representing PoolEndpointConfiguration. * @summary The endpoint configuration for a pool. - * */ export interface PoolEndpointConfiguration { /** - * @member {InboundNatPool[]} inboundNatPools A list of inbound NAT pools - * that can be used to address specific ports on an individual compute node - * externally. The maximum number of inbound NAT pools per Batch pool is 5. - * If the maximum number of inbound NAT pools is exceeded the request fails - * with HTTP status code 400. + * A list of inbound NAT pools that can be used to address specific ports on an individual + * compute node externally. The maximum number of inbound NAT pools per Batch pool is 5. If the + * maximum number of inbound NAT pools is exceeded the request fails with HTTP status code 400. + * This cannot be specified if the IPAddressProvisioningType is NoPublicIPAddresses. */ inboundNatPools: InboundNatPool[]; } /** - * @interface - * An interface representing NetworkConfiguration. + * The public IP Address configuration of the networking configuration of a Pool. + */ +export interface PublicIPAddressConfiguration { + /** + * The provisioning type for Public IP Addresses for the pool. The default value is BatchManaged. + * Possible values include: 'BatchManaged', 'UserManaged', 'NoPublicIPAddresses' + */ + provision?: IPAddressProvisioningType; + /** + * The list of public IPs which the Batch service will use when provisioning Compute Nodes. The + * number of IPs specified here limits the maximum size of the Pool - 100 dedicated nodes or 100 + * low-priority nodes can be allocated for each public IP. For example, a pool needing 250 + * dedicated VMs would need at least 3 public IPs specified. Each element of this collection is + * of the form: + * /subscriptions/{subscription}/resourceGroups/{group}/providers/Microsoft.Network/publicIPAddresses/{ip}. + */ + ipAddressIds?: string[]; +} + +/** * The network configuration for a pool. - * */ export interface NetworkConfiguration { /** - * @member {string} [subnetId] The ARM resource identifier of the virtual - * network subnet which the compute nodes of the pool will join. This is of - * the form + * The ARM resource identifier of the virtual network subnet which the compute nodes of the pool + * will join. This is of the form * /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. - * The virtual network must be in the same region and subscription as the - * Azure Batch account. The specified subnet should have enough free IP - * addresses to accommodate the number of nodes in the pool. If the subnet - * doesn't have enough free IP addresses, the pool will partially allocate - * compute nodes, and a resize error will occur. The 'MicrosoftAzureBatch' - * service principal must have the 'Classic Virtual Machine Contributor' - * Role-Based Access Control (RBAC) role for the specified VNet. The - * specified subnet must allow communication from the Azure Batch service to - * be able to schedule tasks on the compute nodes. This can be verified by - * checking if the specified VNet has any associated Network Security Groups - * (NSG). If communication to the compute nodes in the specified subnet is - * denied by an NSG, then the Batch service will set the state of the compute - * nodes to unusable. For pools created via virtualMachineConfiguration the - * Batch account must have poolAllocationMode userSubscription in order to - * use a VNet. If the specified VNet has any associated Network Security - * Groups (NSG), then a few reserved system ports must be enabled for inbound - * communication. For pools created with a virtual machine configuration, - * enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 - * for Windows. For pools created with a cloud service configuration, enable - * ports 10100, 20100, and 30100. Also enable outbound connections to Azure - * Storage on port 443. For more details see: + * The virtual network must be in the same region and subscription as the Azure Batch account. + * The specified subnet should have enough free IP addresses to accommodate the number of nodes + * in the pool. If the subnet doesn't have enough free IP addresses, the pool will partially + * allocate compute nodes and a resize error will occur. The 'MicrosoftAzureBatch' service + * principal must have the 'Classic Virtual Machine Contributor' Role-Based Access Control (RBAC) + * role for the specified VNet. The specified subnet must allow communication from the Azure + * Batch service to be able to schedule tasks on the compute nodes. This can be verified by + * checking if the specified VNet has any associated Network Security Groups (NSG). If + * communication to the compute nodes in the specified subnet is denied by an NSG, then the Batch + * service will set the state of the compute nodes to unusable. If the specified VNet has any + * associated Network Security Groups (NSG), then a few reserved system ports must be enabled for + * inbound communication. For pools created with a virtual machine configuration, enable ports + * 29876 and 29877, as well as port 22 for Linux and port 3389 for Windows. For pools created + * with a cloud service configuration, enable ports 10100, 20100, and 30100. Also enable outbound + * connections to Azure Storage on port 443. For cloudServiceConfiguration pools, only 'classic' + * VNETs are supported. For more details see: * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration */ subnetId?: string; /** - * @member {PoolEndpointConfiguration} [endpointConfiguration] The - * configuration for endpoints on compute nodes in the Batch pool. Pool - * endpoint configuration is only supported on pools with the - * virtualMachineConfiguration property. + * The configuration for endpoints on compute nodes in the Batch pool. Pool endpoint + * configuration is only supported on pools with the virtualMachineConfiguration property. */ endpointConfiguration?: PoolEndpointConfiguration; + /** + * The Public IPAddress configuration for Compute Nodes in the Batch Pool. This property is only + * supported on Pools with the virtualMachineConfiguration property. + */ + publicIPAddressConfiguration?: PublicIPAddressConfiguration; } /** - * @interface * An interface representing TaskSchedulingPolicy. * @summary Specifies how tasks should be distributed across compute nodes. - * */ export interface TaskSchedulingPolicy { /** - * @member {ComputeNodeFillType} nodeFillType How tasks should be distributed - * across compute nodes. Possible values include: 'Spread', 'Pack' + * How tasks should be distributed across compute nodes. Possible values include: 'Spread', + * 'Pack' */ nodeFillType: ComputeNodeFillType; } /** - * @interface * An interface representing LinuxUserConfiguration. * @summary Properties used to create a user account on a Linux node. - * */ export interface LinuxUserConfiguration { /** - * @member {number} [uid] The user ID of the user account. The uid and gid - * properties must be specified together or not at all. If not specified the - * underlying operating system picks the uid. + * The user ID of the user account. The uid and gid properties must be specified together or not + * at all. If not specified the underlying operating system picks the uid. */ uid?: number; /** - * @member {number} [gid] The group ID for the user account. The uid and gid - * properties must be specified together or not at all. If not specified the - * underlying operating system picks the gid. + * The group ID for the user account. The uid and gid properties must be specified together or + * not at all. If not specified the underlying operating system picks the gid. */ gid?: number; /** - * @member {string} [sshPrivateKey] The SSH private key for the user account. - * The private key must not be password protected. The private key is used to - * automatically configure asymmetric-key based authentication for SSH - * between nodes in a Linux pool when the pool's enableInterNodeCommunication - * property is true (it is ignored if enableInterNodeCommunication is false). - * It does this by placing the key pair into the user's .ssh directory. If - * not specified, password-less SSH is not configured between nodes (no - * modification of the user's .ssh directory is done). + * The SSH private key for the user account. The private key must not be password protected. The + * private key is used to automatically configure asymmetric-key based authentication for SSH + * between nodes in a Linux pool when the pool's enableInterNodeCommunication property is true + * (it is ignored if enableInterNodeCommunication is false). It does this by placing the key pair + * into the user's .ssh directory. If not specified, password-less SSH is not configured between + * nodes (no modification of the user's .ssh directory is done). */ sshPrivateKey?: string; } /** - * @interface + * An interface representing WindowsUserConfiguration. + * @summary Properties used to create a user account on a Windows node. + */ +export interface WindowsUserConfiguration { + /** + * Login mode for user. Specifies login mode for the user. The default value for + * VirtualMachineConfiguration pools is interactive mode and for CloudServiceConfiguration pools + * is batch mode. Possible values include: 'Batch', 'Interactive' + */ + loginMode?: LoginMode; +} + +/** * An interface representing UserAccount. * @summary Properties used to create a user on an Azure Batch node. - * */ export interface UserAccount { /** - * @member {string} name The name of the user account. + * The name of the user account. */ name: string; /** - * @member {string} password The password for the user account. + * The password for the user account. */ password: string; /** - * @member {ElevationLevel} [elevationLevel] The elevation level of the user - * account. nonAdmin - The auto user is a standard user without elevated - * access. admin - The auto user is a user with elevated access and operates - * with full Administrator permissions. The default value is nonAdmin. - * Possible values include: 'NonAdmin', 'Admin' + * The elevation level of the user account. nonAdmin - The auto user is a standard user without + * elevated access. admin - The auto user is a user with elevated access and operates with full + * Administrator permissions. The default value is nonAdmin. Possible values include: 'NonAdmin', + * 'Admin' */ elevationLevel?: ElevationLevel; /** - * @member {LinuxUserConfiguration} [linuxUserConfiguration] The - * Linux-specific user configuration for the user account. This property is - * ignored if specified on a Windows pool. If not specified, the user is - * created with the default options. + * The Linux-specific user configuration for the user account. This property is ignored if + * specified on a Windows pool. If not specified, the user is created with the default options. */ linuxUserConfiguration?: LinuxUserConfiguration; + /** + * The Windows-specific user configuration for the user account. This property can only be + * specified if the user is on a Windows pool. If not specified and on a Windows pool, the user + * is created with the default options. + */ + windowsUserConfiguration?: WindowsUserConfiguration; } /** - * @interface - * An interface representing MetadataItem. + * The Batch service does not assign any meaning to this metadata; it is solely for the use of user + * code. * @summary A name-value pair associated with a Batch service resource. - * - * The Batch service does not assign any meaning to this metadata; it is solely - * for the use of user code. - * */ export interface MetadataItem { /** - * @member {string} name The name of the metadata item. + * The name of the metadata item. */ name: string; /** - * @member {string} value The value of the metadata item. + * The value of the metadata item. */ value: string; } /** - * @interface * An interface representing ResourceFile. - * @summary A file to be downloaded from Azure blob storage to a compute node. - * + * @summary A single file or multiple files to be downloaded to a compute node. */ export interface ResourceFile { /** - * @member {string} blobSource The URL of the file within Azure Blob Storage. - * This URL must be readable using anonymous access; that is, the Batch - * service does not present any credentials when downloading the blob. There - * are two ways to get such a URL for a blob in Azure storage: include a - * Shared Access Signature (SAS) granting read permissions on the blob, or - * set the ACL for the blob or its container to allow public access. + * The storage container name in the auto storage account. The autoStorageContainerName, + * storageContainerUrl and httpUrl properties are mutually exclusive and one of them must be + * specified. + */ + autoStorageContainerName?: string; + /** + * The URL of the blob container within Azure Blob Storage. The autoStorageContainerName, + * storageContainerUrl and httpUrl properties are mutually exclusive and one of them must be + * specified. This URL must be readable and listable using anonymous access; that is, the Batch + * service does not present any credentials when downloading the blob. There are two ways to get + * such a URL for a blob in Azure storage: include a Shared Access Signature (SAS) granting read + * and list permissions on the blob, or set the ACL for the blob or its container to allow public + * access. + */ + storageContainerUrl?: string; + /** + * The URL of the file to download. The autoStorageContainerName, storageContainerUrl and httpUrl + * properties are mutually exclusive and one of them must be specified. If the URL is Azure Blob + * Storage, it must be readable using anonymous access; that is, the Batch service does not + * present any credentials when downloading the blob. There are two ways to get such a URL for a + * blob in Azure storage: include a Shared Access Signature (SAS) granting read permissions on + * the blob, or set the ACL for the blob or its container to allow public access. + */ + httpUrl?: string; + /** + * The blob prefix to use when downloading blobs from an Azure Storage container. Only the blobs + * whose names begin with the specified prefix will be downloaded. The property is valid only + * when autoStorageContainerName or storageContainerUrl is used. This prefix can be a partial + * filename or a subdirectory. If a prefix is not specified, all the files in the container will + * be downloaded. */ - blobSource: string; + blobPrefix?: string; /** - * @member {string} filePath The location on the compute node to which to - * download the file, relative to the task's working directory. + * The location on the compute node to which to download the file, relative to the task's working + * directory. If the httpUrl property is specified, the filePath is required and describes the + * path which the file will be downloaded to, including the filename. Otherwise, if the + * autoStorageContainerName or storageContainerUrl property is specified, filePath is optional + * and is the directory to download the files to. In the case where filePath is used as a + * directory, any directory structure already associated with the input data will be retained in + * full and appended to the specified filePath directory. The specified relative path cannot + * break out of the task's working directory (for example by using '..'). */ - filePath: string; + filePath?: string; /** - * @member {string} [fileMode] The file permission mode attribute in octal - * format. This property applies only to files being downloaded to Linux - * compute nodes. It will be ignored if it is specified for a resourceFile - * which will be downloaded to a Windows node. If this property is not - * specified for a Linux node, then a default value of 0770 is applied to the - * file. + * The file permission mode attribute in octal format. This property applies only to files being + * downloaded to Linux compute nodes. It will be ignored if it is specified for a resourceFile + * which will be downloaded to a Windows node. If this property is not specified for a Linux + * node, then a default value of 0770 is applied to the file. */ fileMode?: string; } /** - * @interface * An interface representing EnvironmentSetting. * @summary An environment variable to be set on a task process. - * */ export interface EnvironmentSetting { /** - * @member {string} name The name of the environment variable. + * The name of the environment variable. */ name: string; /** - * @member {string} [value] The value of the environment variable. + * The value of the environment variable. */ value?: string; } /** - * @interface * An interface representing AutoUserSpecification. - * @summary Specifies the parameters for the auto user that runs a task on the - * Batch service. - * + * @summary Specifies the parameters for the auto user that runs a task on the Batch service. */ export interface AutoUserSpecification { /** - * @member {AutoUserScope} [scope] The scope for the auto user. pool - - * specifies that the task runs as the common auto user account which is - * created on every node in a pool. task - specifies that the service should - * create a new user for the task. The default value is task. Possible values - * include: 'Task', 'Pool' + * The scope for the auto user. The default value is Pool. If the pool is running Windows a value + * of Task should be specified if stricter isolation between tasks is required. For example, if + * the task mutates the registry in a way which could impact other tasks, or if certificates have + * been specified on the pool which should not be accessible by normal tasks but should be + * accessible by start tasks. Possible values include: 'Task', 'Pool' */ scope?: AutoUserScope; /** - * @member {ElevationLevel} [elevationLevel] The elevation level of the auto - * user. nonAdmin - The auto user is a standard user without elevated access. - * admin - The auto user is a user with elevated access and operates with - * full Administrator permissions. The default value is nonAdmin. Possible - * values include: 'NonAdmin', 'Admin' + * The elevation level of the auto user. The default value is nonAdmin. Possible values include: + * 'NonAdmin', 'Admin' */ elevationLevel?: ElevationLevel; } /** - * @interface - * An interface representing UserIdentity. - * @summary The definition of the user identity under which the task is run. - * * Specify either the userName or autoUser property, but not both. - * + * @summary The definition of the user identity under which the task is run. */ export interface UserIdentity { /** - * @member {string} [userName] The name of the user identity under which the - * task is run. The userName and autoUser properties are mutually exclusive; - * you must specify one but not both. + * The name of the user identity under which the task is run. The userName and autoUser + * properties are mutually exclusive; you must specify one but not both. */ userName?: string; /** - * @member {AutoUserSpecification} [autoUser] The auto user under which the - * task is run. The userName and autoUser properties are mutually exclusive; - * you must specify one but not both. + * The auto user under which the task is run. The userName and autoUser properties are mutually + * exclusive; you must specify one but not both. */ autoUser?: AutoUserSpecification; } /** - * @interface - * An interface representing StartTask. - * @summary A task which is run when a compute node joins a pool in the Azure - * Batch service, or when the compute node is rebooted or reimaged. - * + * An interface representing TaskContainerSettings. + * @summary The container settings for a task. + */ +export interface TaskContainerSettings { + /** + * Additional options to the container create command. These additional options are supplied as + * arguments to the "docker create" command, in addition to those controlled by the Batch + * Service. + */ + containerRunOptions?: string; + /** + * The image to use to create the container in which the task will run. This is the full image + * reference, as would be specified to "docker pull". If no tag is provided as part of the image + * name, the tag ":latest" is used as a default. + */ + imageName: string; + /** + * The private registry which contains the container image. This setting can be omitted if was + * already provided at pool creation. + */ + registry?: ContainerRegistry; + /** + * A flag to indicate where the container task working directory is. The default is + * 'taskWorkingDirectory'. Possible values include: 'TaskWorkingDirectory', + * 'ContainerImageDefault' + */ + workingDirectory?: ContainerWorkingDirectory; +} + +/** + * In some cases the start task may be re-run even though the node was not rebooted. Due to this, + * start tasks should be idempotent and exit gracefully if the setup they're performing has already + * been done. Special care should be taken to avoid start tasks which create breakaway process or + * install/launch services from the start task working directory, as this will block Batch from + * being able to re-run the start task. + * @summary A task which is run when a compute node joins a pool in the Azure Batch service, or + * when the compute node is rebooted or reimaged. + */ +export interface StartTask { + /** + * The command line of the start task. The command line does not run under a shell, and therefore + * cannot take advantage of shell features such as environment variable expansion. If you want to + * take advantage of such features, you should invoke the shell in the command line, for example + * using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. Required if any other + * properties of the startTask are specified. + */ + commandLine?: string; + /** + * A list of files that the Batch service will download to the compute node before running the + * command line. + */ + resourceFiles?: ResourceFile[]; + /** + * A list of environment variable settings for the start task. + */ + environmentSettings?: EnvironmentSetting[]; + /** + * The user identity under which the start task runs. If omitted, the task runs as a + * non-administrative user unique to the task. + */ + userIdentity?: UserIdentity; + /** + * The maximum number of times the task may be retried. The Batch service retries a task if its + * exit code is nonzero. Note that this value specifically controls the number of retries. The + * Batch service will try the task once, and may then retry up to this limit. For example, if the + * maximum retry count is 3, Batch tries the task up to 4 times (one initial try and 3 retries). + * If the maximum retry count is 0, the Batch service does not retry the task. If the maximum + * retry count is -1, the Batch service retries the task without limit. + */ + maxTaskRetryCount?: number; + /** + * Whether the Batch service should wait for the start task to complete successfully (that is, to + * exit with exit code 0) before scheduling any tasks on the compute node. If true and the start + * task fails on a compute node, the Batch service retries the start task up to its maximum retry + * count (maxTaskRetryCount). If the task has still not completed successfully after all retries, + * then the Batch service marks the compute node unusable, and will not schedule tasks to it. + * This condition can be detected via the node state and scheduling error detail. If false, the + * Batch service will not wait for the start task to complete. In this case, other tasks can + * start executing on the compute node while the start task is still running; and even if the + * start task fails, new tasks will continue to be scheduled on the node. The default is true. + */ + waitForSuccess?: boolean; + /** + * The settings for the container under which the start task runs. When this is specified, all + * directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories + * on the node) are mapped into the container, all task environment variables are mapped into the + * container, and the task command line is executed in the container. + */ + containerSettings?: TaskContainerSettings; +} + +/** + * An interface representing CertificateReference. + * @summary A reference to a certificate to be installed on compute nodes in a pool. This must + * exist inside the same account as the pool. + */ +export interface CertificateReference { + /** + * The fully qualified ID of the certificate to install on the pool. This must be inside the same + * batch account as the pool. + */ + id: string; + /** + * The location of the certificate store on the compute node into which to install the + * certificate. The default value is currentUser. This property is applicable only for pools + * configured with Windows nodes (that is, created with cloudServiceConfiguration, or with + * virtualMachineConfiguration using a Windows image reference). For Linux compute nodes, the + * certificates are stored in a directory inside the task working directory and an environment + * variable AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this location. For + * certificates with visibility of 'remoteUser', a 'certs' directory is created in the user's + * home directory (e.g., /home/{user-name}/certs) and certificates are placed in that directory. + * Possible values include: 'CurrentUser', 'LocalMachine' + */ + storeLocation?: CertificateStoreLocation; + /** + * The name of the certificate store on the compute node into which to install the certificate. + * This property is applicable only for pools configured with Windows nodes (that is, created + * with cloudServiceConfiguration, or with virtualMachineConfiguration using a Windows image + * reference). Common store names include: My, Root, CA, Trust, Disallowed, TrustedPeople, + * TrustedPublisher, AuthRoot, AddressBook, but any custom store name can also be used. The + * default value is My. + */ + storeName?: string; + /** + * Which user accounts on the compute node should have access to the private data of the + * certificate. + */ + visibility?: CertificateVisibility[]; +} + +/** + * An interface representing ApplicationPackageReference. + * @summary Link to an application package inside the batch account + */ +export interface ApplicationPackageReference { + /** + * The ID of the application package to install. This must be inside the same batch account as + * the pool. This can either be a reference to a specific version or the default version if one + * exists. + */ + id: string; + /** + * The version of the application to deploy. If omitted, the default version is deployed. If this + * is omitted, and no default version is specified for this application, the request fails with + * the error code InvalidApplicationPackageReferences. If you are calling the REST API directly, + * the HTTP status code is 409. + */ + version?: string; +} + +/** + * An interface representing ResizeError. + * @summary An error that occurred when resizing a pool. + */ +export interface ResizeError { + /** + * An identifier for the error. Codes are invariant and are intended to be consumed + * programmatically. + */ + code: string; + /** + * A message describing the error, intended to be suitable for display in a user interface. + */ + message: string; + /** + * Additional details about the error. + */ + details?: ResizeError[]; +} + +/** + * Describes either the current operation (if the pool AllocationState is Resizing) or the + * previously completed operation (if the AllocationState is Steady). + * @summary Details about the current or last completed resize operation. + */ +export interface ResizeOperationStatus { + /** + * The desired number of dedicated compute nodes in the pool. + */ + targetDedicatedNodes?: number; + /** + * The desired number of low-priority compute nodes in the pool. + */ + targetLowPriorityNodes?: number; + /** + * The timeout for allocation of compute nodes to the pool or removal of compute nodes from the + * pool. The default value is 15 minutes. The minimum value is 5 minutes. If you specify a value + * less than 5 minutes, the Batch service returns an error; if you are calling the REST API + * directly, the HTTP status code is 400 (Bad Request). + */ + resizeTimeout?: string; + /** + * Determines what to do with a node and its running task(s) if the pool size is decreasing. The + * default value is requeue. Possible values include: 'Requeue', 'Terminate', 'TaskCompletion', + * 'RetainedData' + */ + nodeDeallocationOption?: ComputeNodeDeallocationOption; + /** + * The time when this resize operation was started. + */ + startTime?: Date; + /** + * Details of any errors encountered while performing the last resize on the pool. This property + * is set only if an error occurred during the last pool resize, and only when the pool + * allocationState is Steady. + */ + errors?: ResizeError[]; +} + +/** + * An interface representing AzureBlobFileSystemConfiguration. + * @summary Information used to connect to an Azure Storage Container using Blobfuse. */ -export interface StartTask { +export interface AzureBlobFileSystemConfiguration { /** - * @member {string} [commandLine] The command line of the start task. The - * command line does not run under a shell, and therefore cannot take - * advantage of shell features such as environment variable expansion. If you - * want to take advantage of such features, you should invoke the shell in - * the command line, for example using "cmd /c MyCommand" in Windows or - * "/bin/sh -c MyCommand" in Linux. Required if any other properties of the - * startTask are specified. + * The Azure Storage Account name. */ - commandLine?: string; + accountName: string; /** - * @member {ResourceFile[]} [resourceFiles] A list of files that the Batch - * service will download to the compute node before running the command line. + * The Azure Blob Storage Container name. */ - resourceFiles?: ResourceFile[]; + containerName: string; /** - * @member {EnvironmentSetting[]} [environmentSettings] A list of environment - * variable settings for the start task. + * The Azure Storage Account key. This property is mutually exclusive with sasKey and one must be + * specified. */ - environmentSettings?: EnvironmentSetting[]; + accountKey?: string; /** - * @member {UserIdentity} [userIdentity] The user identity under which the - * start task runs. If omitted, the task runs as a non-administrative user - * unique to the task. + * The Azure Storage SAS token. This property is mutually exclusive with accountKey and one must + * be specified. */ - userIdentity?: UserIdentity; + sasKey?: string; /** - * @member {number} [maxTaskRetryCount] The maximum number of times the task - * may be retried. The Batch service retries a task if its exit code is - * nonzero. Note that this value specifically controls the number of retries. - * The Batch service will try the task once, and may then retry up to this - * limit. For example, if the maximum retry count is 3, Batch tries the task - * up to 4 times (one initial try and 3 retries). If the maximum retry count - * is 0, the Batch service does not retry the task. If the maximum retry - * count is -1, the Batch service retries the task without limit. + * Additional command line options to pass to the mount command. These are 'net use' options in + * Windows and 'mount' options in Linux. */ - maxTaskRetryCount?: number; + blobfuseOptions?: string; /** - * @member {boolean} [waitForSuccess] Whether the Batch service should wait - * for the start task to complete successfully (that is, to exit with exit - * code 0) before scheduling any tasks on the compute node. If true and the - * start task fails on a compute node, the Batch service retries the start - * task up to its maximum retry count (maxTaskRetryCount). If the task has - * still not completed successfully after all retries, then the Batch service - * marks the compute node unusable, and will not schedule tasks to it. This - * condition can be detected via the node state and scheduling error detail. - * If false, the Batch service will not wait for the start task to complete. - * In this case, other tasks can start executing on the compute node while - * the start task is still running; and even if the start task fails, new - * tasks will continue to be scheduled on the node. The default is false. + * The relative path on the compute node where the file system will be mounted. All file systems + * are mounted relative to the Batch mounts directory, accessible via the + * AZ_BATCH_NODE_MOUNTS_DIR environment variable. */ - waitForSuccess?: boolean; + relativeMountPath: string; } /** - * @interface - * An interface representing CertificateReference. - * @summary A reference to a certificate to be installed on compute nodes in a - * pool. This must exist inside the same account as the pool. - * + * An interface representing NFSMountConfiguration. + * @summary Information used to connect to an NFS file system. */ -export interface CertificateReference { - /** - * @member {string} id The fully qualified ID of the certificate to install - * on the pool. This must be inside the same batch account as the pool. - */ - id: string; +export interface NFSMountConfiguration { /** - * @member {CertificateStoreLocation} [storeLocation] The location of the - * certificate store on the compute node into which to install the - * certificate. The default value is currentUser. This property is applicable - * only for pools configured with Windows nodes (that is, created with - * cloudServiceConfiguration, or with virtualMachineConfiguration using a - * Windows image reference). For Linux compute nodes, the certificates are - * stored in a directory inside the task working directory and an environment - * variable AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for - * this location. For certificates with visibility of 'remoteUser', a 'certs' - * directory is created in the user's home directory (e.g., - * /home/{user-name}/certs) and certificates are placed in that directory. - * Possible values include: 'CurrentUser', 'LocalMachine' + * The URI of the file system to mount. */ - storeLocation?: CertificateStoreLocation; + source: string; /** - * @member {string} [storeName] The name of the certificate store on the - * compute node into which to install the certificate. This property is - * applicable only for pools configured with Windows nodes (that is, created - * with cloudServiceConfiguration, or with virtualMachineConfiguration using - * a Windows image reference). Common store names include: My, Root, CA, - * Trust, Disallowed, TrustedPeople, TrustedPublisher, AuthRoot, AddressBook, - * but any custom store name can also be used. The default value is My. + * The relative path on the compute node where the file system will be mounted. All file systems + * are mounted relative to the Batch mounts directory, accessible via the + * AZ_BATCH_NODE_MOUNTS_DIR environment variable. */ - storeName?: string; + relativeMountPath: string; /** - * @member {CertificateVisibility[]} [visibility] Which user accounts on the - * compute node should have access to the private data of the certificate. - * Values are: - * - * starttask - The user account under which the start task is run. - * task - The accounts under which job tasks are run. - * remoteuser - The accounts under which users remotely access the node. - * - * You can specify more than one visibility in this collection. The default - * is all accounts. + * Additional command line options to pass to the mount command. These are 'net use' options in + * Windows and 'mount' options in Linux. */ - visibility?: CertificateVisibility[]; + mountOptions?: string; } /** - * @interface - * An interface representing ApplicationPackageReference. - * @summary Link to an application package inside the batch account - * + * An interface representing CIFSMountConfiguration. + * @summary Information used to connect to a CIFS file system. */ -export interface ApplicationPackageReference { +export interface CIFSMountConfiguration { /** - * @member {string} id The ID of the application package to install. This - * must be inside the same batch account as the pool. This can either be a - * reference to a specific version or the default version if one exists. + * The user to use for authentication against the CIFS file system. */ - id: string; + username: string; /** - * @member {string} [version] The version of the application to deploy. If - * omitted, the default version is deployed. If this is omitted, and no - * default version is specified for this application, the request fails with - * the error code InvalidApplicationPackageReferences. If you are calling the - * REST API directly, the HTTP status code is 409. + * The URI of the file system to mount. */ - version?: string; -} - -/** - * @interface - * An interface representing ResizeError. - * @summary An error that occurred when resizing a pool. - * - */ -export interface ResizeError { + source: string; /** - * @member {string} code An identifier for the error. Codes are invariant and - * are intended to be consumed programmatically. + * The relative path on the compute node where the file system will be mounted. All file systems + * are mounted relative to the Batch mounts directory, accessible via the + * AZ_BATCH_NODE_MOUNTS_DIR environment variable. */ - code: string; + relativeMountPath: string; /** - * @member {string} message A message describing the error, intended to be - * suitable for display in a user interface. + * Additional command line options to pass to the mount command. These are 'net use' options in + * Windows and 'mount' options in Linux. */ - message: string; + mountOptions?: string; /** - * @member {ResizeError[]} [details] Additional details about the error. + * The password to use for authentication against the CIFS file system. */ - details?: ResizeError[]; + password: string; } /** - * @interface - * An interface representing ResizeOperationStatus. - * @summary Details about the current or last completed resize operation. - * - * Describes either the current operation (if the pool AllocationState is - * Resizing) or the previously completed operation (if the AllocationState is - * Steady). - * + * An interface representing AzureFileShareConfiguration. + * @summary Information used to connect to an Azure Fileshare. */ -export interface ResizeOperationStatus { +export interface AzureFileShareConfiguration { /** - * @member {number} [targetDedicatedNodes] The desired number of dedicated - * compute nodes in the pool. + * The Azure Storage account name. */ - targetDedicatedNodes?: number; + accountName: string; /** - * @member {number} [targetLowPriorityNodes] The desired number of - * low-priority compute nodes in the pool. + * The Azure Files URL. This is of the form 'https://{account}.file.core.windows.net/'. */ - targetLowPriorityNodes?: number; + azureFileUrl: string; /** - * @member {string} [resizeTimeout] The timeout for allocation of compute - * nodes to the pool or removal of compute nodes from the pool. The default - * value is 15 minutes. The minimum value is 5 minutes. If you specify a - * value less than 5 minutes, the Batch service returns an error; if you are - * calling the REST API directly, the HTTP status code is 400 (Bad Request). + * The Azure Storage account key. */ - resizeTimeout?: string; + accountKey: string; /** - * @member {ComputeNodeDeallocationOption} [nodeDeallocationOption] - * Determines what to do with a node and its running task(s) if the pool size - * is decreasing. The default value is requeue. Possible values include: - * 'Requeue', 'Terminate', 'TaskCompletion', 'RetainedData' + * The relative path on the compute node where the file system will be mounted. All file systems + * are mounted relative to the Batch mounts directory, accessible via the + * AZ_BATCH_NODE_MOUNTS_DIR environment variable. */ - nodeDeallocationOption?: ComputeNodeDeallocationOption; + relativeMountPath: string; /** - * @member {Date} [startTime] The time when this resize operation was - * started. + * Additional command line options to pass to the mount command. These are 'net use' options in + * Windows and 'mount' options in Linux. */ - startTime?: Date; + mountOptions?: string; +} + +/** + * An interface representing MountConfiguration. + * @summary The file system to mount on each node. + */ +export interface MountConfiguration { /** - * @member {ResizeError[]} [errors] Details of any errors encountered while - * performing the last resize on the pool. This property is set only if an - * error occurred during the last pool resize, and only when the pool - * allocationState is Steady. + * The Azure Storage Container to mount using blob FUSE on each node. This property is mutually + * exclusive with all other properties. */ - errors?: ResizeError[]; + azureBlobFileSystemConfiguration?: AzureBlobFileSystemConfiguration; + /** + * The NFS file system to mount on each node. This property is mutually exclusive with all other + * properties. + */ + nfsMountConfiguration?: NFSMountConfiguration; + /** + * The CIFS/SMB file system to mount on each node. This property is mutually exclusive with all + * other properties. + */ + cifsMountConfiguration?: CIFSMountConfiguration; + /** + * The Azure File Share to mount on each node. This property is mutually exclusive with all other + * properties. + */ + azureFileShareConfiguration?: AzureFileShareConfiguration; } /** - * @interface - * An interface representing Pool. * Contains information about a pool. - * - * @extends ProxyResource */ export interface Pool extends ProxyResource { /** - * @member {string} [displayName] The display name for the pool. The display - * name need not be unique and can contain any Unicode characters up to a - * maximum length of 1024. + * The display name for the pool. The display name need not be unique and can contain any Unicode + * characters up to a maximum length of 1024. */ displayName?: string; /** - * @member {Date} [lastModified] The last modified time of the pool. This is - * the last time at which the pool level data, such as the - * targetDedicatedNodes or autoScaleSettings, changed. It does not factor in - * node-level changes such as a compute node changing state. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The last modified time of the pool. This is the last time at which the pool level data, such + * as the targetDedicatedNodes or autoScaleSettings, changed. It does not factor in node-level + * changes such as a compute node changing state. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly lastModified?: Date; /** - * @member {Date} [creationTime] The creation time of the pool. **NOTE: This - * property will not be serialized. It can only be populated by the server.** + * The creation time of the pool. **NOTE: This property will not be serialized. It can only be + * populated by the server.** */ readonly creationTime?: Date; /** - * @member {PoolProvisioningState} [provisioningState] The current state of - * the pool. Values are: - * - * Succeeded - The pool is available to run tasks subject to the availability - * of compute nodes. - * Deleting - The user has requested that the pool be deleted, but the delete - * operation has not yet completed. Possible values include: 'Succeeded', - * 'Deleting' - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The current state of the pool. Possible values include: 'Succeeded', 'Deleting' + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly provisioningState?: PoolProvisioningState; /** - * @member {Date} [provisioningStateTransitionTime] The time at which the - * pool entered its current state. **NOTE: This property will not be + * The time at which the pool entered its current state. **NOTE: This property will not be * serialized. It can only be populated by the server.** */ readonly provisioningStateTransitionTime?: Date; /** - * @member {AllocationState} [allocationState] Whether the pool is resizing. - * Values are: - * - * Steady - The pool is not resizing. There are no changes to the number of - * nodes in the pool in progress. A pool enters this state when it is created - * and when no operations are being performed on the pool to change the - * number of dedicated nodes. - * Resizing - The pool is resizing; that is, compute nodes are being added to - * or removed from the pool. - * Stopping - The pool was resizing, but the user has requested that the - * resize be stopped, but the stop request has not yet been completed. - * Possible values include: 'Steady', 'Resizing', 'Stopping' - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Whether the pool is resizing. Possible values include: 'Steady', 'Resizing', 'Stopping' + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly allocationState?: AllocationState; /** - * @member {Date} [allocationStateTransitionTime] The time at which the pool - * entered its current allocation state. **NOTE: This property will not be - * serialized. It can only be populated by the server.** + * The time at which the pool entered its current allocation state. **NOTE: This property will + * not be serialized. It can only be populated by the server.** */ readonly allocationStateTransitionTime?: Date; /** - * @member {string} [vmSize] The size of virtual machines in the pool. All - * VMs in a pool are the same size. For information about available sizes of - * virtual machines for Cloud Services pools (pools created with + * The size of virtual machines in the pool. All VMs in a pool are the same size. For information + * about available sizes of virtual machines for Cloud Services pools (pools created with * cloudServiceConfiguration), see Sizes for Cloud Services - * (http://azure.microsoft.com/documentation/articles/cloud-services-sizes-specs/). - * Batch supports all Cloud Services VM sizes except ExtraSmall. For - * information about available VM sizes for pools using images from the - * Virtual Machines Marketplace (pools created with + * (https://azure.microsoft.com/documentation/articles/cloud-services-sizes-specs/). Batch + * supports all Cloud Services VM sizes except ExtraSmall. For information about available VM + * sizes for pools using images from the Virtual Machines Marketplace (pools created with * virtualMachineConfiguration) see Sizes for Virtual Machines (Linux) - * (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) - * or Sizes for Virtual Machines (Windows) - * (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). - * Batch supports all Azure VM sizes except STANDARD_A0 and those with - * premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series). + * (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) or Sizes + * for Virtual Machines (Windows) + * (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). Batch + * supports all Azure VM sizes except STANDARD_A0 and those with premium storage (STANDARD_GS, + * STANDARD_DS, and STANDARD_DSV2 series). */ vmSize?: string; /** - * @member {DeploymentConfiguration} [deploymentConfiguration] This property - * describes how the pool nodes will be deployed - using Cloud Services or - * Virtual Machines. Using CloudServiceConfiguration specifies that the nodes - * should be creating using Azure Cloud Services (PaaS), while - * VirtualMachineConfiguration uses Azure Virtual Machines (IaaS). + * This property describes how the pool nodes will be deployed - using Cloud Services or Virtual + * Machines. Using CloudServiceConfiguration specifies that the nodes should be creating using + * Azure Cloud Services (PaaS), while VirtualMachineConfiguration uses Azure Virtual Machines + * (IaaS). */ deploymentConfiguration?: DeploymentConfiguration; /** - * @member {number} [currentDedicatedNodes] The number of compute nodes - * currently in the pool. **NOTE: This property will not be serialized. It - * can only be populated by the server.** + * The number of compute nodes currently in the pool. **NOTE: This property will not be + * serialized. It can only be populated by the server.** */ readonly currentDedicatedNodes?: number; /** - * @member {number} [currentLowPriorityNodes] The number of low priority - * compute nodes currently in the pool. **NOTE: This property will not be - * serialized. It can only be populated by the server.** + * The number of low priority compute nodes currently in the pool. **NOTE: This property will not + * be serialized. It can only be populated by the server.** */ readonly currentLowPriorityNodes?: number; /** - * @member {ScaleSettings} [scaleSettings] Settings which configure the - * number of nodes in the pool. + * Settings which configure the number of nodes in the pool. */ scaleSettings?: ScaleSettings; /** - * @member {AutoScaleRun} [autoScaleRun] The results and errors from the last - * execution of the autoscale formula. This property is set only if the pool - * automatically scales, i.e. autoScaleSettings are used. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The results and errors from the last execution of the autoscale formula. This property is set + * only if the pool automatically scales, i.e. autoScaleSettings are used. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly autoScaleRun?: AutoScaleRun; /** - * @member {InterNodeCommunicationState} [interNodeCommunication] Whether the - * pool permits direct communication between nodes. This imposes restrictions - * on which nodes can be assigned to the pool. Enabling this value can reduce - * the chance of the requested number of nodes to be allocated in the pool. - * If not specified, this value defaults to 'Disabled'. Possible values - * include: 'Enabled', 'Disabled' + * Whether the pool permits direct communication between nodes. This imposes restrictions on + * which nodes can be assigned to the pool. Enabling this value can reduce the chance of the + * requested number of nodes to be allocated in the pool. If not specified, this value defaults + * to 'Disabled'. Possible values include: 'Enabled', 'Disabled' */ interNodeCommunication?: InterNodeCommunicationState; /** - * @member {NetworkConfiguration} [networkConfiguration] The network - * configuration for the pool. + * The network configuration for the pool. */ networkConfiguration?: NetworkConfiguration; /** - * @member {number} [maxTasksPerNode] The maximum number of tasks that can - * run concurrently on a single compute node in the pool. + * The number of task slots that can be used to run concurrent tasks on a single compute node in + * the pool. The default value is 1. The maximum value is the smaller of 4 times the number of + * cores of the vmSize of the pool or 256. */ - maxTasksPerNode?: number; + taskSlotsPerNode?: number; /** - * @member {TaskSchedulingPolicy} [taskSchedulingPolicy] How tasks are - * distributed across compute nodes in a pool. + * How tasks are distributed across compute nodes in a pool. If not specified, the default is + * spread. */ taskSchedulingPolicy?: TaskSchedulingPolicy; /** - * @member {UserAccount[]} [userAccounts] The list of user accounts to be - * created on each node in the pool. + * The list of user accounts to be created on each node in the pool. */ userAccounts?: UserAccount[]; /** - * @member {MetadataItem[]} [metadata] A list of name-value pairs associated - * with the pool as metadata. The Batch service does not assign any meaning - * to metadata; it is solely for the use of user code. + * A list of name-value pairs associated with the pool as metadata. The Batch service does not + * assign any meaning to metadata; it is solely for the use of user code. */ metadata?: MetadataItem[]; /** - * @member {StartTask} [startTask] A task specified to run on each compute - * node as it joins the pool. In an PATCH (update) operation, this property - * can be set to an empty object to remove the start task from the pool. + * A task specified to run on each compute node as it joins the pool. In an PATCH (update) + * operation, this property can be set to an empty object to remove the start task from the pool. */ startTask?: StartTask; /** - * @member {CertificateReference[]} [certificates] The list of certificates - * to be installed on each compute node in the pool. For Windows compute - * nodes, the Batch service installs the certificates to the specified - * certificate store and location. For Linux compute nodes, the certificates - * are stored in a directory inside the task working directory and an - * environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the task to - * query for this location. For certificates with visibility of 'remoteUser', - * a 'certs' directory is created in the user's home directory (e.g., - * /home/{user-name}/certs) and certificates are placed in that directory. + * The list of certificates to be installed on each compute node in the pool. For Windows compute + * nodes, the Batch service installs the certificates to the specified certificate store and + * location. For Linux compute nodes, the certificates are stored in a directory inside the task + * working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the + * task to query for this location. For certificates with visibility of 'remoteUser', a 'certs' + * directory is created in the user's home directory (e.g., /home/{user-name}/certs) and + * certificates are placed in that directory. */ certificates?: CertificateReference[]; /** - * @member {ApplicationPackageReference[]} [applicationPackages] The list of - * application packages to be installed on each compute node in the pool. - * Changes to application packages affect all new compute nodes joining the - * pool, but do not affect compute nodes that are already in the pool until - * they are rebooted or reimaged. + * The list of application packages to be installed on each compute node in the pool. Changes to + * application package references affect all new compute nodes joining the pool, but do not + * affect compute nodes that are already in the pool until they are rebooted or reimaged. There + * is a maximum of 10 application package references on any given pool. */ applicationPackages?: ApplicationPackageReference[]; /** - * @member {string[]} [applicationLicenses] The list of application licenses - * the Batch service will make available on each compute node in the pool. - * The list of application licenses must be a subset of available Batch - * service application licenses. If a license is requested which is not - * supported, pool creation will fail. + * The list of application licenses the Batch service will make available on each compute node in + * the pool. The list of application licenses must be a subset of available Batch service + * application licenses. If a license is requested which is not supported, pool creation will + * fail. */ applicationLicenses?: string[]; /** - * @member {ResizeOperationStatus} [resizeOperationStatus] Contains details - * about the current or last completed resize operation. **NOTE: This - * property will not be serialized. It can only be populated by the server.** + * Contains details about the current or last completed resize operation. **NOTE: This property + * will not be serialized. It can only be populated by the server.** */ readonly resizeOperationStatus?: ResizeOperationStatus; + /** + * A list of file systems to mount on each node in the pool. This supports Azure Files, NFS, + * CIFS/SMB, and Blobfuse. + */ + mountConfiguration?: MountConfiguration[]; } /** - * @interface * An interface representing OperationDisplay. * @summary The object that describes the operation. - * */ export interface OperationDisplay { /** - * @member {string} [provider] Friendly name of the resource provider. + * Friendly name of the resource provider. */ provider?: string; /** - * @member {string} [operation] The operation type. For example: read, write, - * delete, or listKeys/action + * The operation type. For example: read, write, delete, or listKeys/action */ operation?: string; /** - * @member {string} [resource] The resource type on which the operation is - * performed. + * The resource type on which the operation is performed. */ resource?: string; /** - * @member {string} [description] The friendly name of the operation. + * The friendly name of the operation. */ description?: string; } /** - * @interface * An interface representing Operation. * @summary A REST API operation - * */ export interface Operation { /** - * @member {string} [name] The operation name. This is of the format - * {provider}/{resource}/{operation} + * The operation name. This is of the format {provider}/{resource}/{operation} */ name?: string; /** - * @member {OperationDisplay} [display] The object that describes the - * operation. + * The object that describes the operation. */ display?: OperationDisplay; /** - * @member {string} [origin] The intended executor of the operation. + * The intended executor of the operation. */ origin?: string; /** - * @member {any} [properties] Properties of the operation. + * Properties of the operation. */ properties?: any; } /** - * @interface - * An interface representing CheckNameAvailabilityParameters. * Parameters for a check name availability request. - * */ export interface CheckNameAvailabilityParameters { /** - * @member {string} name The name to check for availability + * The name to check for availability */ name: string; } /** - * @interface - * An interface representing CheckNameAvailabilityResult. * The CheckNameAvailability operation response. - * */ export interface CheckNameAvailabilityResult { /** - * @member {boolean} [nameAvailable] Gets a boolean value that indicates - * whether the name is available for you to use. If true, the name is - * available. If false, the name has already been taken or invalid and cannot - * be used. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Gets a boolean value that indicates whether the name is available for you to use. If true, the + * name is available. If false, the name has already been taken or invalid and cannot be used. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly nameAvailable?: boolean; /** - * @member {NameAvailabilityReason} [reason] Gets the reason that a Batch - * account name could not be used. The Reason element is only returned if - * NameAvailable is false. Possible values include: 'Invalid', - * 'AlreadyExists' - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Gets the reason that a Batch account name could not be used. The Reason element is only + * returned if NameAvailable is false. Possible values include: 'Invalid', 'AlreadyExists' + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly reason?: NameAvailabilityReason; /** - * @member {string} [message] Gets an error message explaining the Reason - * value in more detail. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Gets an error message explaining the Reason value in more detail. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly message?: string; } /** - * @interface - * An interface representing ApplicationCreateOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase + */ +export interface ApplicationPackageListOptionalParams extends msRest.RequestOptionsBase { + /** + * The maximum number of items to return in the response. + */ + maxresults?: number; +} + +/** + * Optional Parameters. */ export interface ApplicationCreateOptionalParams extends msRest.RequestOptionsBase { /** - * @member {ApplicationCreateParameters} [parameters] The parameters for the - * request. + * The parameters for the request. */ - parameters?: ApplicationCreateParameters; + parameters?: Application; } /** - * @interface - * An interface representing ApplicationListOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ export interface ApplicationListOptionalParams extends msRest.RequestOptionsBase { /** - * @member {number} [maxresults] The maximum number of items to return in the - * response. + * The maximum number of items to return in the response. */ maxresults?: number; } /** - * @interface - * An interface representing CertificateListByBatchAccountOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ export interface CertificateListByBatchAccountOptionalParams extends msRest.RequestOptionsBase { /** - * @member {number} [maxresults] The maximum number of items to return in the - * response. + * The maximum number of items to return in the response. */ maxresults?: number; /** - * @member {string} [select] Comma separated list of properties that should - * be returned. e.g. "properties/provisioningState". Only top level - * properties under properties/ are valid for selection. + * Comma separated list of properties that should be returned. e.g. + * "properties/provisioningState". Only top level properties under properties/ are valid for + * selection. */ select?: string; /** - * @member {string} [filter] OData filter expression. Valid properties for - * filtering are "properties/provisioningState", + * OData filter expression. Valid properties for filtering are "properties/provisioningState", * "properties/provisioningStateTransitionTime", "name". */ filter?: string; } /** - * @interface - * An interface representing CertificateCreateOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ export interface CertificateCreateOptionalParams extends msRest.RequestOptionsBase { /** - * @member {string} [ifMatch] The entity state (ETag) version of the - * certificate to update. A value of "*" can be used to apply the operation - * only if the certificate already exists. If omitted, this operation will + * The entity state (ETag) version of the certificate to update. A value of "*" can be used to + * apply the operation only if the certificate already exists. If omitted, this operation will * always be applied. */ ifMatch?: string; /** - * @member {string} [ifNoneMatch] Set to '*' to allow a new certificate to be - * created, but to prevent updating an existing certificate. Other values - * will be ignored. + * Set to '*' to allow a new certificate to be created, but to prevent updating an existing + * certificate. Other values will be ignored. */ ifNoneMatch?: string; } /** - * @interface - * An interface representing CertificateUpdateOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ export interface CertificateUpdateOptionalParams extends msRest.RequestOptionsBase { /** - * @member {string} [ifMatch] The entity state (ETag) version of the - * certificate to update. This value can be omitted or set to "*" to apply - * the operation unconditionally. + * The entity state (ETag) version of the certificate to update. This value can be omitted or set + * to "*" to apply the operation unconditionally. */ ifMatch?: string; } /** - * @interface - * An interface representing CertificateBeginCreateOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ export interface CertificateBeginCreateOptionalParams extends msRest.RequestOptionsBase { /** - * @member {string} [ifMatch] The entity state (ETag) version of the - * certificate to update. A value of "*" can be used to apply the operation - * only if the certificate already exists. If omitted, this operation will + * The entity state (ETag) version of the certificate to update. A value of "*" can be used to + * apply the operation only if the certificate already exists. If omitted, this operation will * always be applied. */ ifMatch?: string; /** - * @member {string} [ifNoneMatch] Set to '*' to allow a new certificate to be - * created, but to prevent updating an existing certificate. Other values - * will be ignored. + * Set to '*' to allow a new certificate to be created, but to prevent updating an existing + * certificate. Other values will be ignored. */ ifNoneMatch?: string; } /** - * @interface - * An interface representing PoolListByBatchAccountOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase + */ +export interface PrivateLinkResourceListByBatchAccountOptionalParams extends msRest.RequestOptionsBase { + /** + * The maximum number of items to return in the response. + */ + maxresults?: number; +} + +/** + * Optional Parameters. + */ +export interface PrivateEndpointConnectionListByBatchAccountOptionalParams extends msRest.RequestOptionsBase { + /** + * The maximum number of items to return in the response. + */ + maxresults?: number; +} + +/** + * Optional Parameters. + */ +export interface PrivateEndpointConnectionUpdateOptionalParams extends msRest.RequestOptionsBase { + /** + * The state (ETag) version of the private endpoint connection to update. This value can be + * omitted or set to "*" to apply the operation unconditionally. + */ + ifMatch?: string; +} + +/** + * Optional Parameters. + */ +export interface PrivateEndpointConnectionBeginUpdateOptionalParams extends msRest.RequestOptionsBase { + /** + * The state (ETag) version of the private endpoint connection to update. This value can be + * omitted or set to "*" to apply the operation unconditionally. + */ + ifMatch?: string; +} + +/** + * Optional Parameters. */ export interface PoolListByBatchAccountOptionalParams extends msRest.RequestOptionsBase { /** - * @member {number} [maxresults] The maximum number of items to return in the - * response. + * The maximum number of items to return in the response. */ maxresults?: number; /** - * @member {string} [select] Comma separated list of properties that should - * be returned. e.g. "properties/provisioningState". Only top level - * properties under properties/ are valid for selection. + * Comma separated list of properties that should be returned. e.g. + * "properties/provisioningState". Only top level properties under properties/ are valid for + * selection. */ select?: string; /** - * @member {string} [filter] OData filter expression. Valid properties for - * filtering are: + * OData filter expression. Valid properties for filtering are: * * name * properties/allocationState @@ -2031,326 +2111,270 @@ export interface PoolListByBatchAccountOptionalParams extends msRest.RequestOpti } /** - * @interface - * An interface representing PoolCreateOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ export interface PoolCreateOptionalParams extends msRest.RequestOptionsBase { /** - * @member {string} [ifMatch] The entity state (ETag) version of the pool to - * update. A value of "*" can be used to apply the operation only if the pool - * already exists. If omitted, this operation will always be applied. + * The entity state (ETag) version of the pool to update. A value of "*" can be used to apply the + * operation only if the pool already exists. If omitted, this operation will always be applied. */ ifMatch?: string; /** - * @member {string} [ifNoneMatch] Set to '*' to allow a new pool to be - * created, but to prevent updating an existing pool. Other values will be - * ignored. + * Set to '*' to allow a new pool to be created, but to prevent updating an existing pool. Other + * values will be ignored. */ ifNoneMatch?: string; } /** - * @interface - * An interface representing PoolUpdateOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ export interface PoolUpdateOptionalParams extends msRest.RequestOptionsBase { /** - * @member {string} [ifMatch] The entity state (ETag) version of the pool to - * update. This value can be omitted or set to "*" to apply the operation - * unconditionally. + * The entity state (ETag) version of the pool to update. This value can be omitted or set to "*" + * to apply the operation unconditionally. */ ifMatch?: string; } /** - * @interface - * An interface representing PoolBeginCreateOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ export interface PoolBeginCreateOptionalParams extends msRest.RequestOptionsBase { /** - * @member {string} [ifMatch] The entity state (ETag) version of the pool to - * update. A value of "*" can be used to apply the operation only if the pool - * already exists. If omitted, this operation will always be applied. + * The entity state (ETag) version of the pool to update. A value of "*" can be used to apply the + * operation only if the pool already exists. If omitted, this operation will always be applied. */ ifMatch?: string; /** - * @member {string} [ifNoneMatch] Set to '*' to allow a new pool to be - * created, but to prevent updating an existing pool. Other values will be - * ignored. + * Set to '*' to allow a new pool to be created, but to prevent updating an existing pool. Other + * values will be ignored. */ ifNoneMatch?: string; } /** - * @interface * An interface representing BatchManagementClientOptions. - * @extends AzureServiceClientOptions */ export interface BatchManagementClientOptions extends AzureServiceClientOptions { - /** - * @member {string} [baseUri] - */ baseUri?: string; } /** - * @interface - * An interface representing BatchAccountCreateHeaders. * Defines headers for Create operation. - * */ export interface BatchAccountCreateHeaders { /** - * @member {string} [locationHeader] The URL of the resource used to check - * the status of the asynchronous operation. + * The URL of the resource used to check the status of the asynchronous operation. */ locationHeader: string; /** - * @member {number} [retryAfter] Suggested delay to check the status of the - * asynchronous operation. The value is an integer that specifies the delay - * in seconds. + * Suggested delay to check the status of the asynchronous operation. The value is an integer + * that specifies the delay in seconds. */ retryAfter: number; } /** - * @interface - * An interface representing BatchAccountDeleteHeaders. * Defines headers for Delete operation. - * */ export interface BatchAccountDeleteHeaders { /** - * @member {string} [location] The URL of the resource used to check the - * status of the asynchronous operation. + * The URL of the resource used to check the status of the asynchronous operation. */ location: string; /** - * @member {number} [retryAfter] Suggested delay to check the status of the - * asynchronous operation. The value is an integer that specifies the delay - * in seconds. + * Suggested delay to check the status of the asynchronous operation. The value is an integer + * that specifies the delay in seconds. */ retryAfter: number; } /** - * @interface - * An interface representing CertificateCreateHeaders. * Defines headers for Create operation. - * */ export interface CertificateCreateHeaders { /** - * @member {string} [eTag] The ETag HTTP response header. This is an opaque - * string. You can use it to detect whether the resource has changed between - * requests. In particular, you can pass the ETag to one of the If-Match or - * If-None-Match headers. + * The ETag HTTP response header. This is an opaque string. You can use it to detect whether the + * resource has changed between requests. In particular, you can pass the ETag to one of the + * If-Match or If-None-Match headers. */ eTag: string; } /** - * @interface - * An interface representing CertificateUpdateHeaders. * Defines headers for Update operation. - * */ export interface CertificateUpdateHeaders { /** - * @member {string} [eTag] The ETag HTTP response header. This is an opaque - * string. You can use it to detect whether the resource has changed between - * requests. In particular, you can pass the ETag to one of the If-Match or - * If-None-Match headers. + * The ETag HTTP response header. This is an opaque string. You can use it to detect whether the + * resource has changed between requests. In particular, you can pass the ETag to one of the + * If-Match or If-None-Match headers. */ eTag: string; } /** - * @interface - * An interface representing CertificateDeleteHeaders. * Defines headers for Delete operation. - * */ export interface CertificateDeleteHeaders { /** - * @member {string} [location] The URL of the resource used to check the - * status of the asynchronous operation. + * The URL of the resource used to check the status of the asynchronous operation. */ location: string; /** - * @member {number} [retryAfter] Suggested delay to check the status of the - * asynchronous operation. The value is an integer that represents the - * seconds. + * Suggested delay to check the status of the asynchronous operation. The value is an integer + * that represents the seconds. */ retryAfter: number; } /** - * @interface - * An interface representing CertificateGetHeaders. * Defines headers for Get operation. - * */ export interface CertificateGetHeaders { /** - * @member {string} [eTag] The ETag HTTP response header. This is an opaque - * string. You can use it to detect whether the resource has changed between - * requests. In particular, you can pass the ETag to one of the If-Match or - * If-None-Match headers. + * The ETag HTTP response header. This is an opaque string. You can use it to detect whether the + * resource has changed between requests. In particular, you can pass the ETag to one of the + * If-Match or If-None-Match headers. */ eTag: string; } /** - * @interface - * An interface representing CertificateCancelDeletionHeaders. * Defines headers for CancelDeletion operation. - * */ export interface CertificateCancelDeletionHeaders { /** - * @member {string} [eTag] The ETag HTTP response header. This is an opaque - * string. You can use it to detect whether the resource has changed between - * requests. In particular, you can pass the ETag to one of the If-Match or - * If-None-Match headers. + * The ETag HTTP response header. This is an opaque string. You can use it to detect whether the + * resource has changed between requests. In particular, you can pass the ETag to one of the + * If-Match or If-None-Match headers. */ eTag: string; } /** - * @interface - * An interface representing PoolCreateHeaders. + * Defines headers for Update operation. + */ +export interface PrivateEndpointConnectionUpdateHeaders { + /** + * The URL of the resource used to check the status of the asynchronous operation. + */ + location: string; + /** + * Suggested delay to check the status of the asynchronous operation. The value is an integer + * that represents the seconds. + */ + retryAfter: number; +} + +/** * Defines headers for Create operation. - * */ export interface PoolCreateHeaders { /** - * @member {string} [eTag] The ETag HTTP response header. This is an opaque - * string. You can use it to detect whether the resource has changed between - * requests. In particular, you can pass the ETag to one of the If-Match or - * If-None-Match headers. + * The ETag HTTP response header. This is an opaque string. You can use it to detect whether the + * resource has changed between requests. In particular, you can pass the ETag to one of the + * If-Match or If-None-Match headers. */ eTag: string; } /** - * @interface - * An interface representing PoolUpdateHeaders. * Defines headers for Update operation. - * */ export interface PoolUpdateHeaders { /** - * @member {string} [eTag] The ETag HTTP response header. This is an opaque - * string. You can use it to detect whether the resource has changed between - * requests. In particular, you can pass the ETag to one of the If-Match or - * If-None-Match headers. + * The ETag HTTP response header. This is an opaque string. You can use it to detect whether the + * resource has changed between requests. In particular, you can pass the ETag to one of the + * If-Match or If-None-Match headers. */ eTag: string; } /** - * @interface - * An interface representing PoolDeleteHeaders. * Defines headers for Delete operation. - * */ export interface PoolDeleteHeaders { /** - * @member {string} [location] The URL of the resource used to check the - * status of the asynchronous operation. + * The URL of the resource used to check the status of the asynchronous operation. */ location: string; /** - * @member {number} [retryAfter] Suggested delay to check the status of the - * asynchronous operation. The value is an integer that represents the - * seconds. + * Suggested delay to check the status of the asynchronous operation. The value is an integer + * that represents the seconds. */ retryAfter: number; } /** - * @interface - * An interface representing PoolGetHeaders. * Defines headers for Get operation. - * */ export interface PoolGetHeaders { /** - * @member {string} [eTag] The ETag HTTP response header. This is an opaque - * string. You can use it to detect whether the resource has changed between - * requests. In particular, you can pass the ETag to one of the If-Match or - * If-None-Match headers. + * The ETag HTTP response header. This is an opaque string. You can use it to detect whether the + * resource has changed between requests. In particular, you can pass the ETag to one of the + * If-Match or If-None-Match headers. */ eTag: string; } /** - * @interface - * An interface representing PoolDisableAutoScaleHeaders. * Defines headers for DisableAutoScale operation. - * */ export interface PoolDisableAutoScaleHeaders { /** - * @member {string} [eTag] The ETag HTTP response header. This is an opaque - * string. You can use it to detect whether the resource has changed between - * requests. In particular, you can pass the ETag to one of the If-Match or - * If-None-Match headers. + * The ETag HTTP response header. This is an opaque string. You can use it to detect whether the + * resource has changed between requests. In particular, you can pass the ETag to one of the + * If-Match or If-None-Match headers. */ eTag: string; } /** - * @interface - * An interface representing PoolStopResizeHeaders. * Defines headers for StopResize operation. - * */ export interface PoolStopResizeHeaders { /** - * @member {string} [eTag] The ETag HTTP response header. This is an opaque - * string. You can use it to detect whether the resource has changed between - * requests. In particular, you can pass the ETag to one of the If-Match or - * If-None-Match headers. + * The ETag HTTP response header. This is an opaque string. You can use it to detect whether the + * resource has changed between requests. In particular, you can pass the ETag to one of the + * If-Match or If-None-Match headers. */ eTag: string; } - /** * @interface - * An interface representing the BatchAccountListResult. * Values returned by the List operation. - * * @extends Array */ export interface BatchAccountListResult extends Array { /** - * @member {string} [nextLink] The continuation token. + * The continuation token. + */ + nextLink?: string; +} + +/** + * @interface + * The result of performing list application packages. + * @extends Array + */ +export interface ListApplicationPackagesResult extends Array { + /** + * The URL to get the next set of results. */ nextLink?: string; } /** * @interface - * An interface representing the ListApplicationsResult. * The result of performing list applications. - * * @extends Array */ export interface ListApplicationsResult extends Array { /** - * @member {string} [nextLink] The URL to get the next set of results. + * The URL to get the next set of results. */ nextLink?: string; } @@ -2358,46 +2382,70 @@ export interface ListApplicationsResult extends Array { /** * @interface * An interface representing the OperationListResult. - * @summary Result of the request to list REST API operations. It contains a - * list of operations and a URL nextLink to get the next set of results. - * + * @summary Result of the request to list REST API operations. It contains a list of operations and + * a URL nextLink to get the next set of results. * @extends Array */ export interface OperationListResult extends Array { - /** - * @member {string} [nextLink] - */ nextLink?: string; } /** * @interface - * An interface representing the ListCertificatesResult. * Values returned by the List operation. - * * @extends Array */ export interface ListCertificatesResult extends Array { /** - * @member {string} [nextLink] The continuation token. + * The continuation token. + */ + nextLink?: string; +} + +/** + * @interface + * Values returned by the List operation. + * @extends Array + */ +export interface ListPrivateLinkResourcesResult extends Array { + /** + * The continuation token. + */ + nextLink?: string; +} + +/** + * @interface + * Values returned by the List operation. + * @extends Array + */ +export interface ListPrivateEndpointConnectionsResult extends Array { + /** + * The continuation token. */ nextLink?: string; } /** * @interface - * An interface representing the ListPoolsResult. * Values returned by the List operation. - * * @extends Array */ export interface ListPoolsResult extends Array { /** - * @member {string} [nextLink] The continuation token. + * The continuation token. */ nextLink?: string; } +/** + * Defines values for KeySource. + * Possible values include: 'Microsoft.Batch', 'Microsoft.KeyVault' + * @readonly + * @enum {string} + */ +export type KeySource = 'Microsoft.Batch' | 'Microsoft.KeyVault'; + /** * Defines values for PoolAllocationMode. * Possible values include: 'BatchService', 'UserSubscription' @@ -2406,6 +2454,22 @@ export interface ListPoolsResult extends Array { */ export type PoolAllocationMode = 'BatchService' | 'UserSubscription'; +/** + * Defines values for PublicNetworkAccessType. + * Possible values include: 'Enabled', 'Disabled' + * @readonly + * @enum {string} + */ +export type PublicNetworkAccessType = 'Enabled' | 'Disabled'; + +/** + * Defines values for ResourceIdentityType. + * Possible values include: 'SystemAssigned', 'None' + * @readonly + * @enum {string} + */ +export type ResourceIdentityType = 'SystemAssigned' | 'None'; + /** * Defines values for ProvisioningState. * Possible values include: 'Invalid', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Cancelled' @@ -2414,6 +2478,22 @@ export type PoolAllocationMode = 'BatchService' | 'UserSubscription'; */ export type ProvisioningState = 'Invalid' | 'Creating' | 'Deleting' | 'Succeeded' | 'Failed' | 'Cancelled'; +/** + * Defines values for PrivateEndpointConnectionProvisioningState. + * Possible values include: 'Succeeded', 'Updating', 'Failed' + * @readonly + * @enum {string} + */ +export type PrivateEndpointConnectionProvisioningState = 'Succeeded' | 'Updating' | 'Failed'; + +/** + * Defines values for PrivateLinkServiceConnectionStatus. + * Possible values include: 'Approved', 'Pending', 'Rejected', 'Disconnected' + * @readonly + * @enum {string} + */ +export type PrivateLinkServiceConnectionStatus = 'Approved' | 'Pending' | 'Rejected' | 'Disconnected'; + /** * Defines values for AccountKeyType. * Possible values include: 'Primary', 'Secondary' @@ -2424,11 +2504,11 @@ export type AccountKeyType = 'Primary' | 'Secondary'; /** * Defines values for PackageState. - * Possible values include: 'Pending', 'Active', 'Unmapped' + * Possible values include: 'Pending', 'Active' * @readonly * @enum {string} */ -export type PackageState = 'Pending' | 'Active' | 'Unmapped'; +export type PackageState = 'Pending' | 'Active'; /** * Defines values for CertificateFormat. @@ -2478,6 +2558,14 @@ export type CachingType = 'None' | 'ReadOnly' | 'ReadWrite'; */ export type StorageAccountType = 'Standard_LRS' | 'Premium_LRS'; +/** + * Defines values for DiskEncryptionTarget. + * Possible values include: 'OsDisk', 'TemporaryDisk' + * @readonly + * @enum {string} + */ +export type DiskEncryptionTarget = 'OsDisk' | 'TemporaryDisk'; + /** * Defines values for ComputeNodeDeallocationOption. * Possible values include: 'Requeue', 'Terminate', 'TaskCompletion', 'RetainedData' @@ -2508,7 +2596,15 @@ export type InboundEndpointProtocol = 'TCP' | 'UDP'; * @readonly * @enum {string} */ -export type NetworkSecurityGroupRuleAccess = 'Allow' | 'Deny'; +export type NetworkSecurityGroupRuleAccess = 'Allow' | 'Deny'; + +/** + * Defines values for IPAddressProvisioningType. + * Possible values include: 'BatchManaged', 'UserManaged', 'NoPublicIPAddresses' + * @readonly + * @enum {string} + */ +export type IPAddressProvisioningType = 'BatchManaged' | 'UserManaged' | 'NoPublicIPAddresses'; /** * Defines values for ComputeNodeFillType. @@ -2526,6 +2622,14 @@ export type ComputeNodeFillType = 'Spread' | 'Pack'; */ export type ElevationLevel = 'NonAdmin' | 'Admin'; +/** + * Defines values for LoginMode. + * Possible values include: 'Batch', 'Interactive' + * @readonly + * @enum {string} + */ +export type LoginMode = 'Batch' | 'Interactive'; + /** * Defines values for AutoUserScope. * Possible values include: 'Task', 'Pool' @@ -2534,6 +2638,14 @@ export type ElevationLevel = 'NonAdmin' | 'Admin'; */ export type AutoUserScope = 'Task' | 'Pool'; +/** + * Defines values for ContainerWorkingDirectory. + * Possible values include: 'TaskWorkingDirectory', 'ContainerImageDefault' + * @readonly + * @enum {string} + */ +export type ContainerWorkingDirectory = 'TaskWorkingDirectory' | 'ContainerImageDefault'; + /** * Defines values for CertificateStoreLocation. * Possible values include: 'CurrentUser', 'LocalMachine' @@ -2570,10 +2682,12 @@ export type BatchAccountCreateResponse = BatchAccount & BatchAccountCreateHeader * The parsed HTTP response headers. */ parsedHeaders: BatchAccountCreateHeaders; + /** * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2593,6 +2707,7 @@ export type BatchAccountUpdateResponse = BatchAccount & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2627,6 +2742,7 @@ export type BatchAccountGetResponse = BatchAccount & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2646,6 +2762,7 @@ export type BatchAccountListResponse = BatchAccountListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2665,6 +2782,7 @@ export type BatchAccountListByResourceGroupResponse = BatchAccountListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2684,6 +2802,7 @@ export type BatchAccountRegenerateKeyResponse = BatchAccountKeys & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2703,6 +2822,7 @@ export type BatchAccountGetKeysResponse = BatchAccountKeys & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2722,6 +2842,7 @@ export type BatchAccountListNextResponse = BatchAccountListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2741,6 +2862,7 @@ export type BatchAccountListByResourceGroupNextResponse = BatchAccountListResult * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2748,6 +2870,26 @@ export type BatchAccountListByResourceGroupNextResponse = BatchAccountListResult }; }; +/** + * Contains response data for the activate operation. + */ +export type ApplicationPackageActivateResponse = ApplicationPackage & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ApplicationPackage; + }; +}; + /** * Contains response data for the create operation. */ @@ -2760,6 +2902,7 @@ export type ApplicationPackageCreateResponse = ApplicationPackage & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2779,6 +2922,7 @@ export type ApplicationPackageGetResponse = ApplicationPackage & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2786,6 +2930,46 @@ export type ApplicationPackageGetResponse = ApplicationPackage & { }; }; +/** + * Contains response data for the list operation. + */ +export type ApplicationPackageListResponse = ListApplicationPackagesResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ListApplicationPackagesResult; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type ApplicationPackageListNextResponse = ListApplicationPackagesResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ListApplicationPackagesResult; + }; +}; + /** * Contains response data for the create operation. */ @@ -2798,6 +2982,7 @@ export type ApplicationCreateResponse = Application & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2817,6 +3002,27 @@ export type ApplicationGetResponse = Application & { * The response body as text (string format) */ bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Application; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type ApplicationUpdateResponse = Application & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2836,6 +3042,7 @@ export type ApplicationListResponse = ListApplicationsResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2855,6 +3062,7 @@ export type ApplicationListNextResponse = ListApplicationsResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2874,6 +3082,7 @@ export type LocationGetQuotasResponse = BatchLocationQuota & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2893,6 +3102,7 @@ export type LocationCheckNameAvailabilityResponse = CheckNameAvailabilityResult * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2912,6 +3122,7 @@ export type OperationsListResponse = OperationListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2931,6 +3142,7 @@ export type OperationsListNextResponse = OperationListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2950,6 +3162,7 @@ export type CertificateListByBatchAccountResponse = ListCertificatesResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2969,10 +3182,12 @@ export type CertificateCreateResponse = Certificate & CertificateCreateHeaders & * The parsed HTTP response headers. */ parsedHeaders: CertificateCreateHeaders; + /** * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2992,10 +3207,12 @@ export type CertificateUpdateResponse = Certificate & CertificateUpdateHeaders & * The parsed HTTP response headers. */ parsedHeaders: CertificateUpdateHeaders; + /** * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -3030,10 +3247,12 @@ export type CertificateGetResponse = Certificate & CertificateGetHeaders & { * The parsed HTTP response headers. */ parsedHeaders: CertificateGetHeaders; + /** * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -3053,10 +3272,12 @@ export type CertificateCancelDeletionResponse = Certificate & CertificateCancelD * The parsed HTTP response headers. */ parsedHeaders: CertificateCancelDeletionHeaders; + /** * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -3076,6 +3297,7 @@ export type CertificateListByBatchAccountNextResponse = ListCertificatesResult & * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -3083,6 +3305,151 @@ export type CertificateListByBatchAccountNextResponse = ListCertificatesResult & }; }; +/** + * Contains response data for the listByBatchAccount operation. + */ +export type PrivateLinkResourceListByBatchAccountResponse = ListPrivateLinkResourcesResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ListPrivateLinkResourcesResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type PrivateLinkResourceGetResponse = PrivateLinkResource & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PrivateLinkResource; + }; +}; + +/** + * Contains response data for the listByBatchAccountNext operation. + */ +export type PrivateLinkResourceListByBatchAccountNextResponse = ListPrivateLinkResourcesResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ListPrivateLinkResourcesResult; + }; +}; + +/** + * Contains response data for the listByBatchAccount operation. + */ +export type PrivateEndpointConnectionListByBatchAccountResponse = ListPrivateEndpointConnectionsResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ListPrivateEndpointConnectionsResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type PrivateEndpointConnectionGetResponse = PrivateEndpointConnection & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PrivateEndpointConnection; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type PrivateEndpointConnectionUpdateResponse = PrivateEndpointConnection & PrivateEndpointConnectionUpdateHeaders & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: PrivateEndpointConnectionUpdateHeaders; + + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PrivateEndpointConnection; + }; +}; + +/** + * Contains response data for the listByBatchAccountNext operation. + */ +export type PrivateEndpointConnectionListByBatchAccountNextResponse = ListPrivateEndpointConnectionsResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ListPrivateEndpointConnectionsResult; + }; +}; + /** * Contains response data for the listByBatchAccount operation. */ @@ -3095,6 +3462,7 @@ export type PoolListByBatchAccountResponse = ListPoolsResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -3114,10 +3482,12 @@ export type PoolCreateResponse = Pool & PoolCreateHeaders & { * The parsed HTTP response headers. */ parsedHeaders: PoolCreateHeaders; + /** * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -3137,10 +3507,12 @@ export type PoolUpdateResponse = Pool & PoolUpdateHeaders & { * The parsed HTTP response headers. */ parsedHeaders: PoolUpdateHeaders; + /** * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -3175,10 +3547,12 @@ export type PoolGetResponse = Pool & PoolGetHeaders & { * The parsed HTTP response headers. */ parsedHeaders: PoolGetHeaders; + /** * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -3198,10 +3572,12 @@ export type PoolDisableAutoScaleResponse = Pool & PoolDisableAutoScaleHeaders & * The parsed HTTP response headers. */ parsedHeaders: PoolDisableAutoScaleHeaders; + /** * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -3221,10 +3597,12 @@ export type PoolStopResizeResponse = Pool & PoolStopResizeHeaders & { * The parsed HTTP response headers. */ parsedHeaders: PoolStopResizeHeaders; + /** * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -3244,6 +3622,7 @@ export type PoolListByBatchAccountNextResponse = ListPoolsResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ diff --git a/sdk/batch/arm-batch/src/models/locationMappers.ts b/sdk/batch/arm-batch/src/models/locationMappers.ts index 97dbbc6cc3db..ddbec3b47f94 100644 --- a/sdk/batch/arm-batch/src/models/locationMappers.ts +++ b/sdk/batch/arm-batch/src/models/locationMappers.ts @@ -1,17 +1,14 @@ /* * 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. */ export { BatchLocationQuota, - CloudError, CheckNameAvailabilityParameters, - CheckNameAvailabilityResult + CheckNameAvailabilityResult, + CloudError } from "../models/mappers"; - diff --git a/sdk/batch/arm-batch/src/models/mappers.ts b/sdk/batch/arm-batch/src/models/mappers.ts index 7698eb57ba77..cc7d3296b2d5 100644 --- a/sdk/batch/arm-batch/src/models/mappers.ts +++ b/sdk/batch/arm-batch/src/models/mappers.ts @@ -1,11 +1,9 @@ /* * 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. */ import { CloudErrorMapper, BaseResourceMapper } from "@azure/ms-rest-azure-js"; @@ -31,6 +29,49 @@ export const AutoStorageBaseProperties: msRest.CompositeMapper = { } }; +export const KeyVaultProperties: msRest.CompositeMapper = { + serializedName: "KeyVaultProperties", + type: { + name: "Composite", + className: "KeyVaultProperties", + modelProperties: { + keyIdentifier: { + serializedName: "keyIdentifier", + type: { + name: "String" + } + } + } + } +}; + +export const EncryptionProperties: msRest.CompositeMapper = { + serializedName: "EncryptionProperties", + type: { + name: "Composite", + className: "EncryptionProperties", + modelProperties: { + keySource: { + serializedName: "keySource", + type: { + name: "Enum", + allowedValues: [ + "Microsoft.Batch", + "Microsoft.KeyVault" + ] + } + }, + keyVaultProperties: { + serializedName: "keyVaultProperties", + type: { + name: "Composite", + className: "KeyVaultProperties" + } + } + } + } +}; + export const KeyVaultReference: msRest.CompositeMapper = { serializedName: "KeyVaultReference", type: { @@ -55,6 +96,41 @@ export const KeyVaultReference: msRest.CompositeMapper = { } }; +export const BatchAccountIdentity: msRest.CompositeMapper = { + serializedName: "BatchAccountIdentity", + type: { + name: "Composite", + className: "BatchAccountIdentity", + modelProperties: { + principalId: { + readOnly: true, + serializedName: "principalId", + type: { + name: "String" + } + }, + tenantId: { + readOnly: true, + serializedName: "tenantId", + type: { + name: "String" + } + }, + type: { + required: true, + serializedName: "type", + type: { + name: "Enum", + allowedValues: [ + "SystemAssigned", + "None" + ] + } + } + } + } +}; + export const BatchAccountCreateParameters: msRest.CompositeMapper = { serializedName: "BatchAccountCreateParameters", type: { @@ -102,6 +178,31 @@ export const BatchAccountCreateParameters: msRest.CompositeMapper = { name: "Composite", className: "KeyVaultReference" } + }, + publicNetworkAccess: { + serializedName: "properties.publicNetworkAccess", + defaultValue: 'Enabled', + type: { + name: "Enum", + allowedValues: [ + "Enabled", + "Disabled" + ] + } + }, + encryption: { + serializedName: "properties.encryption", + type: { + name: "Composite", + className: "EncryptionProperties" + } + }, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "BatchAccountIdentity" + } } } } @@ -125,6 +226,161 @@ export const AutoStorageProperties: msRest.CompositeMapper = { } }; +export const VirtualMachineFamilyCoreQuota: msRest.CompositeMapper = { + serializedName: "VirtualMachineFamilyCoreQuota", + type: { + name: "Composite", + className: "VirtualMachineFamilyCoreQuota", + modelProperties: { + name: { + nullable: false, + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + coreQuota: { + nullable: false, + readOnly: true, + serializedName: "coreQuota", + type: { + name: "Number" + } + } + } + } +}; + +export const PrivateEndpoint: msRest.CompositeMapper = { + serializedName: "PrivateEndpoint", + type: { + name: "Composite", + className: "PrivateEndpoint", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateLinkServiceConnectionState: msRest.CompositeMapper = { + serializedName: "PrivateLinkServiceConnectionState", + type: { + name: "Composite", + className: "PrivateLinkServiceConnectionState", + modelProperties: { + status: { + required: true, + serializedName: "status", + type: { + name: "Enum", + allowedValues: [ + "Approved", + "Pending", + "Rejected", + "Disconnected" + ] + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + }, + actionRequired: { + readOnly: true, + serializedName: "actionRequired", + type: { + name: "String" + } + } + } + } +}; + +export const ProxyResource: msRest.CompositeMapper = { + serializedName: "ProxyResource", + type: { + name: "Composite", + className: "ProxyResource", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + etag: { + readOnly: true, + serializedName: "etag", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateEndpointConnection: msRest.CompositeMapper = { + serializedName: "PrivateEndpointConnection", + type: { + name: "Composite", + className: "PrivateEndpointConnection", + modelProperties: { + ...ProxyResource.type.modelProperties, + provisioningState: { + nullable: false, + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "Enum", + allowedValues: [ + "Succeeded", + "Updating", + "Failed" + ] + } + }, + privateEndpoint: { + serializedName: "properties.privateEndpoint", + type: { + name: "Composite", + className: "PrivateEndpoint" + } + }, + privateLinkServiceConnectionState: { + serializedName: "properties.privateLinkServiceConnectionState", + type: { + name: "Composite", + className: "PrivateLinkServiceConnectionState" + } + } + } + } +}; + export const Resource: msRest.CompositeMapper = { serializedName: "Resource", type: { @@ -224,6 +480,32 @@ export const BatchAccount: msRest.CompositeMapper = { className: "KeyVaultReference" } }, + publicNetworkAccess: { + readOnly: true, + serializedName: "properties.publicNetworkAccess", + defaultValue: 'Enabled', + type: { + name: "Enum", + allowedValues: [ + "Enabled", + "Disabled" + ] + } + }, + privateEndpointConnections: { + nullable: true, + readOnly: true, + serializedName: "properties.privateEndpointConnections", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateEndpointConnection" + } + } + } + }, autoStorage: { readOnly: true, serializedName: "properties.autoStorage", @@ -232,8 +514,16 @@ export const BatchAccount: msRest.CompositeMapper = { className: "AutoStorageProperties" } }, + encryption: { + readOnly: true, + serializedName: "properties.encryption", + type: { + name: "Composite", + className: "EncryptionProperties" + } + }, dedicatedCoreQuota: { - nullable: false, + nullable: true, readOnly: true, serializedName: "properties.dedicatedCoreQuota", type: { @@ -241,13 +531,35 @@ export const BatchAccount: msRest.CompositeMapper = { } }, lowPriorityCoreQuota: { - nullable: false, + nullable: true, readOnly: true, serializedName: "properties.lowPriorityCoreQuota", type: { name: "Number" } }, + dedicatedCoreQuotaPerVMFamily: { + nullable: true, + readOnly: true, + serializedName: "properties.dedicatedCoreQuotaPerVMFamily", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VirtualMachineFamilyCoreQuota" + } + } + } + }, + dedicatedCoreQuotaPerVMFamilyEnforced: { + nullable: false, + readOnly: true, + serializedName: "properties.dedicatedCoreQuotaPerVMFamilyEnforced", + type: { + name: "Boolean" + } + }, poolQuota: { nullable: false, readOnly: true, @@ -263,6 +575,13 @@ export const BatchAccount: msRest.CompositeMapper = { type: { name: "Number" } + }, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "BatchAccountIdentity" + } } } } @@ -291,6 +610,20 @@ export const BatchAccountUpdateParameters: msRest.CompositeMapper = { name: "Composite", className: "AutoStorageBaseProperties" } + }, + encryption: { + serializedName: "properties.encryption", + type: { + name: "Composite", + className: "EncryptionProperties" + } + }, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "BatchAccountIdentity" + } } } } @@ -365,20 +698,27 @@ export const ActivateApplicationPackageParameters: msRest.CompositeMapper = { } }; -export const ApplicationCreateParameters: msRest.CompositeMapper = { - serializedName: "ApplicationCreateParameters", +export const Application: msRest.CompositeMapper = { + serializedName: "Application", type: { name: "Composite", - className: "ApplicationCreateParameters", + className: "Application", modelProperties: { + ...ProxyResource.type.modelProperties, + displayName: { + serializedName: "properties.displayName", + type: { + name: "String" + } + }, allowUpdates: { - serializedName: "allowUpdates", + serializedName: "properties.allowUpdates", type: { name: "Boolean" } }, - displayName: { - serializedName: "displayName", + defaultVersion: { + serializedName: "properties.defaultVersion", type: { name: "String" } @@ -393,187 +733,61 @@ export const ApplicationPackage: msRest.CompositeMapper = { name: "Composite", className: "ApplicationPackage", modelProperties: { - id: { - readOnly: true, - serializedName: "id", - type: { - name: "String" - } - }, - version: { - readOnly: true, - serializedName: "version", - type: { - name: "String" - } - }, + ...ProxyResource.type.modelProperties, state: { readOnly: true, - serializedName: "state", + serializedName: "properties.state", type: { name: "Enum", allowedValues: [ "Pending", - "Active", - "Unmapped" + "Active" ] } }, format: { readOnly: true, - serializedName: "format", + serializedName: "properties.format", type: { name: "String" } }, storageUrl: { readOnly: true, - serializedName: "storageUrl", + serializedName: "properties.storageUrl", type: { name: "String" } }, storageUrlExpiry: { readOnly: true, - serializedName: "storageUrlExpiry", - type: { - name: "DateTime" - } - }, - lastActivationTime: { - readOnly: true, - serializedName: "lastActivationTime", + serializedName: "properties.storageUrlExpiry", type: { name: "DateTime" } - } - } - } -}; - -export const Application: msRest.CompositeMapper = { - serializedName: "Application", - type: { - name: "Composite", - className: "Application", - modelProperties: { - id: { - serializedName: "id", - type: { - name: "String" - } - }, - displayName: { - serializedName: "displayName", - type: { - name: "String" - } - }, - packages: { - serializedName: "packages", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApplicationPackage" - } - } - } - }, - allowUpdates: { - serializedName: "allowUpdates", - type: { - name: "Boolean" - } - }, - defaultVersion: { - serializedName: "defaultVersion", - type: { - name: "String" - } - } - } - } -}; - -export const ApplicationUpdateParameters: msRest.CompositeMapper = { - serializedName: "ApplicationUpdateParameters", - type: { - name: "Composite", - className: "ApplicationUpdateParameters", - modelProperties: { - allowUpdates: { - serializedName: "allowUpdates", - type: { - name: "Boolean" - } - }, - defaultVersion: { - serializedName: "defaultVersion", - type: { - name: "String" - } - }, - displayName: { - serializedName: "displayName", - type: { - name: "String" - } - } - } - } -}; - -export const BatchLocationQuota: msRest.CompositeMapper = { - serializedName: "BatchLocationQuota", - type: { - name: "Composite", - className: "BatchLocationQuota", - modelProperties: { - accountQuota: { - readOnly: true, - serializedName: "accountQuota", - type: { - name: "Number" - } - } - } - } -}; - -export const ProxyResource: msRest.CompositeMapper = { - serializedName: "ProxyResource", - type: { - name: "Composite", - className: "ProxyResource", - modelProperties: { - id: { - readOnly: true, - serializedName: "id", - type: { - name: "String" - } - }, - name: { - readOnly: true, - serializedName: "name", - type: { - name: "String" - } }, - type: { + lastActivationTime: { readOnly: true, - serializedName: "type", + serializedName: "properties.lastActivationTime", type: { - name: "String" + name: "DateTime" } - }, - etag: { + } + } + } +}; + +export const BatchLocationQuota: msRest.CompositeMapper = { + serializedName: "BatchLocationQuota", + type: { + name: "Composite", + className: "BatchLocationQuota", + modelProperties: { + accountQuota: { readOnly: true, - serializedName: "etag", + serializedName: "accountQuota", type: { - name: "String" + name: "Number" } } } @@ -791,6 +1005,48 @@ export const CertificateCreateOrUpdateParameters: msRest.CompositeMapper = { } }; +export const PrivateLinkResource: msRest.CompositeMapper = { + serializedName: "PrivateLinkResource", + type: { + name: "Composite", + className: "PrivateLinkResource", + modelProperties: { + ...ProxyResource.type.modelProperties, + groupId: { + readOnly: true, + serializedName: "properties.groupId", + type: { + name: "String" + } + }, + requiredMembers: { + readOnly: true, + serializedName: "properties.requiredMembers", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + requiredZoneNames: { + readOnly: true, + serializedName: "properties.requiredZoneNames", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + export const CloudServiceConfiguration: msRest.CompositeMapper = { serializedName: "CloudServiceConfiguration", type: { @@ -804,14 +1060,8 @@ export const CloudServiceConfiguration: msRest.CompositeMapper = { name: "String" } }, - targetOSVersion: { - serializedName: "targetOSVersion", - type: { - name: "String" - } - }, - currentOSVersion: { - serializedName: "currentOSVersion", + osVersion: { + serializedName: "osVersion", type: { name: "String" } @@ -860,27 +1110,6 @@ export const ImageReference: msRest.CompositeMapper = { } }; -export const OSDisk: msRest.CompositeMapper = { - serializedName: "OSDisk", - type: { - name: "Composite", - className: "OSDisk", - modelProperties: { - caching: { - serializedName: "caching", - type: { - name: "Enum", - allowedValues: [ - "None", - "ReadOnly", - "ReadWrite" - ] - } - } - } - } -}; - export const WindowsConfiguration: msRest.CompositeMapper = { serializedName: "WindowsConfiguration", type: { @@ -942,6 +1171,103 @@ export const DataDisk: msRest.CompositeMapper = { } }; +export const ContainerRegistry: msRest.CompositeMapper = { + serializedName: "ContainerRegistry", + type: { + name: "Composite", + className: "ContainerRegistry", + modelProperties: { + registryServer: { + serializedName: "registryServer", + type: { + name: "String" + } + }, + userName: { + required: true, + serializedName: "username", + type: { + name: "String" + } + }, + password: { + required: true, + serializedName: "password", + type: { + name: "String" + } + } + } + } +}; + +export const ContainerConfiguration: msRest.CompositeMapper = { + serializedName: "ContainerConfiguration", + type: { + name: "Composite", + className: "ContainerConfiguration", + modelProperties: { + type: { + required: true, + isConstant: true, + serializedName: "type", + defaultValue: 'DockerCompatible', + type: { + name: "String" + } + }, + containerImageNames: { + serializedName: "containerImageNames", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + containerRegistries: { + serializedName: "containerRegistries", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ContainerRegistry" + } + } + } + } + } + } +}; + +export const DiskEncryptionConfiguration: msRest.CompositeMapper = { + serializedName: "DiskEncryptionConfiguration", + type: { + name: "Composite", + className: "DiskEncryptionConfiguration", + modelProperties: { + targets: { + serializedName: "targets", + type: { + name: "Sequence", + element: { + type: { + name: "Enum", + allowedValues: [ + "OsDisk", + "TemporaryDisk" + ] + } + } + } + } + } + } +}; + export const VirtualMachineConfiguration: msRest.CompositeMapper = { serializedName: "VirtualMachineConfiguration", type: { @@ -956,13 +1282,6 @@ export const VirtualMachineConfiguration: msRest.CompositeMapper = { className: "ImageReference" } }, - osDisk: { - serializedName: "osDisk", - type: { - name: "Composite", - className: "OSDisk" - } - }, nodeAgentSkuId: { required: true, serializedName: "nodeAgentSkuId", @@ -994,6 +1313,20 @@ export const VirtualMachineConfiguration: msRest.CompositeMapper = { type: { name: "String" } + }, + containerConfiguration: { + serializedName: "containerConfiguration", + type: { + name: "Composite", + className: "ContainerConfiguration" + } + }, + diskEncryptionConfiguration: { + serializedName: "diskEncryptionConfiguration", + type: { + name: "Composite", + className: "DiskEncryptionConfiguration" + } } } } @@ -1206,6 +1539,17 @@ export const NetworkSecurityGroupRule: msRest.CompositeMapper = { type: { name: "String" } + }, + sourcePortRanges: { + serializedName: "sourcePortRanges", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } } } } @@ -1295,6 +1639,38 @@ export const PoolEndpointConfiguration: msRest.CompositeMapper = { } }; +export const PublicIPAddressConfiguration: msRest.CompositeMapper = { + serializedName: "PublicIPAddressConfiguration", + type: { + name: "Composite", + className: "PublicIPAddressConfiguration", + modelProperties: { + provision: { + serializedName: "provision", + type: { + name: "Enum", + allowedValues: [ + "BatchManaged", + "UserManaged", + "NoPublicIPAddresses" + ] + } + }, + ipAddressIds: { + serializedName: "ipAddressIds", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + export const NetworkConfiguration: msRest.CompositeMapper = { serializedName: "NetworkConfiguration", type: { @@ -1313,6 +1689,13 @@ export const NetworkConfiguration: msRest.CompositeMapper = { name: "Composite", className: "PoolEndpointConfiguration" } + }, + publicIPAddressConfiguration: { + serializedName: "publicIPAddressConfiguration", + type: { + name: "Composite", + className: "PublicIPAddressConfiguration" + } } } } @@ -1367,6 +1750,26 @@ export const LinuxUserConfiguration: msRest.CompositeMapper = { } }; +export const WindowsUserConfiguration: msRest.CompositeMapper = { + serializedName: "WindowsUserConfiguration", + type: { + name: "Composite", + className: "WindowsUserConfiguration", + modelProperties: { + loginMode: { + serializedName: "loginMode", + type: { + name: "Enum", + allowedValues: [ + "Batch", + "Interactive" + ] + } + } + } + } +}; + export const UserAccount: msRest.CompositeMapper = { serializedName: "UserAccount", type: { @@ -1403,6 +1806,13 @@ export const UserAccount: msRest.CompositeMapper = { name: "Composite", className: "LinuxUserConfiguration" } + }, + windowsUserConfiguration: { + serializedName: "windowsUserConfiguration", + type: { + name: "Composite", + className: "WindowsUserConfiguration" + } } } } @@ -1438,15 +1848,31 @@ export const ResourceFile: msRest.CompositeMapper = { name: "Composite", className: "ResourceFile", modelProperties: { - blobSource: { - required: true, - serializedName: "blobSource", + autoStorageContainerName: { + serializedName: "autoStorageContainerName", + type: { + name: "String" + } + }, + storageContainerUrl: { + serializedName: "storageContainerUrl", + type: { + name: "String" + } + }, + httpUrl: { + serializedName: "httpUrl", + type: { + name: "String" + } + }, + blobPrefix: { + serializedName: "blobPrefix", type: { name: "String" } }, filePath: { - required: true, serializedName: "filePath", type: { name: "String" @@ -1530,8 +1956,48 @@ export const UserIdentity: msRest.CompositeMapper = { autoUser: { serializedName: "autoUser", type: { - name: "Composite", - className: "AutoUserSpecification" + name: "Composite", + className: "AutoUserSpecification" + } + } + } + } +}; + +export const TaskContainerSettings: msRest.CompositeMapper = { + serializedName: "TaskContainerSettings", + type: { + name: "Composite", + className: "TaskContainerSettings", + modelProperties: { + containerRunOptions: { + serializedName: "containerRunOptions", + type: { + name: "String" + } + }, + imageName: { + required: true, + serializedName: "imageName", + type: { + name: "String" + } + }, + registry: { + serializedName: "registry", + type: { + name: "Composite", + className: "ContainerRegistry" + } + }, + workingDirectory: { + serializedName: "workingDirectory", + type: { + name: "Enum", + allowedValues: [ + "TaskWorkingDirectory", + "ContainerImageDefault" + ] } } } @@ -1592,6 +2058,13 @@ export const StartTask: msRest.CompositeMapper = { type: { name: "Boolean" } + }, + containerSettings: { + serializedName: "containerSettings", + type: { + name: "Composite", + className: "TaskContainerSettings" + } } } } @@ -1763,6 +2236,211 @@ export const ResizeOperationStatus: msRest.CompositeMapper = { } }; +export const AzureBlobFileSystemConfiguration: msRest.CompositeMapper = { + serializedName: "AzureBlobFileSystemConfiguration", + type: { + name: "Composite", + className: "AzureBlobFileSystemConfiguration", + modelProperties: { + accountName: { + required: true, + serializedName: "accountName", + type: { + name: "String" + } + }, + containerName: { + required: true, + serializedName: "containerName", + type: { + name: "String" + } + }, + accountKey: { + serializedName: "accountKey", + type: { + name: "String" + } + }, + sasKey: { + serializedName: "sasKey", + type: { + name: "String" + } + }, + blobfuseOptions: { + serializedName: "blobfuseOptions", + type: { + name: "String" + } + }, + relativeMountPath: { + required: true, + serializedName: "relativeMountPath", + type: { + name: "String" + } + } + } + } +}; + +export const NFSMountConfiguration: msRest.CompositeMapper = { + serializedName: "NFSMountConfiguration", + type: { + name: "Composite", + className: "NFSMountConfiguration", + modelProperties: { + source: { + required: true, + serializedName: "source", + type: { + name: "String" + } + }, + relativeMountPath: { + required: true, + serializedName: "relativeMountPath", + type: { + name: "String" + } + }, + mountOptions: { + serializedName: "mountOptions", + type: { + name: "String" + } + } + } + } +}; + +export const CIFSMountConfiguration: msRest.CompositeMapper = { + serializedName: "CIFSMountConfiguration", + type: { + name: "Composite", + className: "CIFSMountConfiguration", + modelProperties: { + username: { + required: true, + serializedName: "username", + type: { + name: "String" + } + }, + source: { + required: true, + serializedName: "source", + type: { + name: "String" + } + }, + relativeMountPath: { + required: true, + serializedName: "relativeMountPath", + type: { + name: "String" + } + }, + mountOptions: { + serializedName: "mountOptions", + type: { + name: "String" + } + }, + password: { + required: true, + serializedName: "password", + type: { + name: "String" + } + } + } + } +}; + +export const AzureFileShareConfiguration: msRest.CompositeMapper = { + serializedName: "AzureFileShareConfiguration", + type: { + name: "Composite", + className: "AzureFileShareConfiguration", + modelProperties: { + accountName: { + required: true, + serializedName: "accountName", + type: { + name: "String" + } + }, + azureFileUrl: { + required: true, + serializedName: "azureFileUrl", + type: { + name: "String" + } + }, + accountKey: { + required: true, + serializedName: "accountKey", + type: { + name: "String" + } + }, + relativeMountPath: { + required: true, + serializedName: "relativeMountPath", + type: { + name: "String" + } + }, + mountOptions: { + serializedName: "mountOptions", + type: { + name: "String" + } + } + } + } +}; + +export const MountConfiguration: msRest.CompositeMapper = { + serializedName: "MountConfiguration", + type: { + name: "Composite", + className: "MountConfiguration", + modelProperties: { + azureBlobFileSystemConfiguration: { + serializedName: "azureBlobFileSystemConfiguration", + type: { + name: "Composite", + className: "AzureBlobFileSystemConfiguration" + } + }, + nfsMountConfiguration: { + serializedName: "nfsMountConfiguration", + type: { + name: "Composite", + className: "NFSMountConfiguration" + } + }, + cifsMountConfiguration: { + serializedName: "cifsMountConfiguration", + type: { + name: "Composite", + className: "CIFSMountConfiguration" + } + }, + azureFileShareConfiguration: { + serializedName: "azureFileShareConfiguration", + type: { + name: "Composite", + className: "AzureFileShareConfiguration" + } + } + } + } +}; + export const Pool: msRest.CompositeMapper = { serializedName: "Pool", type: { @@ -1886,8 +2564,8 @@ export const Pool: msRest.CompositeMapper = { className: "NetworkConfiguration" } }, - maxTasksPerNode: { - serializedName: "properties.maxTasksPerNode", + taskSlotsPerNode: { + serializedName: "properties.taskSlotsPerNode", type: { name: "Number" } @@ -1972,6 +2650,18 @@ export const Pool: msRest.CompositeMapper = { name: "Composite", className: "ResizeOperationStatus" } + }, + mountConfiguration: { + serializedName: "properties.mountConfiguration", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MountConfiguration" + } + } + } } } } @@ -2237,6 +2927,28 @@ export const CertificateCancelDeletionHeaders: msRest.CompositeMapper = { } }; +export const PrivateEndpointConnectionUpdateHeaders: msRest.CompositeMapper = { + serializedName: "privateendpointconnection-update-headers", + type: { + name: "Composite", + className: "PrivateEndpointConnectionUpdateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number" + } + } + } + } +}; + export const PoolCreateHeaders: msRest.CompositeMapper = { serializedName: "pool-create-headers", type: { @@ -2367,6 +3079,34 @@ export const BatchAccountListResult: msRest.CompositeMapper = { } }; +export const ListApplicationPackagesResult: msRest.CompositeMapper = { + serializedName: "ListApplicationPackagesResult", + type: { + name: "Composite", + className: "ListApplicationPackagesResult", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ApplicationPackage" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + export const ListApplicationsResult: msRest.CompositeMapper = { serializedName: "ListApplicationsResult", type: { @@ -2451,6 +3191,62 @@ export const ListCertificatesResult: msRest.CompositeMapper = { } }; +export const ListPrivateLinkResourcesResult: msRest.CompositeMapper = { + serializedName: "ListPrivateLinkResourcesResult", + type: { + name: "Composite", + className: "ListPrivateLinkResourcesResult", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateLinkResource" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const ListPrivateEndpointConnectionsResult: msRest.CompositeMapper = { + serializedName: "ListPrivateEndpointConnectionsResult", + type: { + name: "Composite", + className: "ListPrivateEndpointConnectionsResult", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateEndpointConnection" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + export const ListPoolsResult: msRest.CompositeMapper = { serializedName: "ListPoolsResult", type: { diff --git a/sdk/batch/arm-batch/src/models/operationsMappers.ts b/sdk/batch/arm-batch/src/models/operationsMappers.ts index 2edcc577920e..689688180be7 100644 --- a/sdk/batch/arm-batch/src/models/operationsMappers.ts +++ b/sdk/batch/arm-batch/src/models/operationsMappers.ts @@ -1,17 +1,14 @@ /* * 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. */ export { - OperationListResult, + CloudError, Operation, OperationDisplay, - CloudError + OperationListResult } from "../models/mappers"; - diff --git a/sdk/batch/arm-batch/src/models/parameters.ts b/sdk/batch/arm-batch/src/models/parameters.ts index 6c72e7bf6552..519b835471af 100644 --- a/sdk/batch/arm-batch/src/models/parameters.ts +++ b/sdk/batch/arm-batch/src/models/parameters.ts @@ -20,7 +20,7 @@ export const acceptLanguage: msRest.OperationParameter = { } } }; -export const accountName: msRest.OperationURLParameter = { +export const accountName0: msRest.OperationURLParameter = { parameterPath: "accountName", mapper: { required: true, @@ -28,7 +28,22 @@ export const accountName: msRest.OperationURLParameter = { constraints: { MaxLength: 24, MinLength: 3, - Pattern: /^[-\w\._]+$/ + Pattern: /^[a-z0-9]+$/ + }, + type: { + name: "String" + } + } +}; +export const accountName1: msRest.OperationURLParameter = { + parameterPath: "accountName", + mapper: { + required: true, + serializedName: "accountName", + constraints: { + MaxLength: 24, + MinLength: 3, + Pattern: /^[a-zA-Z0-9]+$/ }, type: { name: "String" @@ -45,11 +60,16 @@ export const apiVersion: msRest.OperationQueryParameter = { } } }; -export const applicationId: msRest.OperationURLParameter = { - parameterPath: "applicationId", +export const applicationName: msRest.OperationURLParameter = { + parameterPath: "applicationName", mapper: { required: true, - serializedName: "applicationId", + serializedName: "applicationName", + constraints: { + MaxLength: 64, + MinLength: 1, + Pattern: /^[a-zA-Z0-9_-]+$/ + }, type: { name: "String" } @@ -154,6 +174,36 @@ export const poolName: msRest.OperationURLParameter = { } } }; +export const privateEndpointConnectionName: msRest.OperationURLParameter = { + parameterPath: "privateEndpointConnectionName", + mapper: { + required: true, + serializedName: "privateEndpointConnectionName", + constraints: { + MaxLength: 101, + MinLength: 1, + Pattern: /^[a-zA-Z0-9_-]+\.?[a-fA-F0-9-]*$/ + }, + type: { + name: "String" + } + } +}; +export const privateLinkResourceName: msRest.OperationURLParameter = { + parameterPath: "privateLinkResourceName", + mapper: { + required: true, + serializedName: "privateLinkResourceName", + constraints: { + MaxLength: 101, + MinLength: 1, + Pattern: /^[a-zA-Z0-9_-]+\.?[a-fA-F0-9-]*$/ + }, + type: { + name: "String" + } + } +}; export const resourceGroupName: msRest.OperationURLParameter = { parameterPath: "resourceGroupName", mapper: { @@ -186,11 +236,16 @@ export const subscriptionId: msRest.OperationURLParameter = { } } }; -export const version: msRest.OperationURLParameter = { - parameterPath: "version", +export const versionName: msRest.OperationURLParameter = { + parameterPath: "versionName", mapper: { required: true, - serializedName: "version", + serializedName: "versionName", + constraints: { + MaxLength: 64, + MinLength: 1, + Pattern: /^[a-zA-Z0-9_-][a-zA-Z0-9_.-]*$/ + }, type: { name: "String" } diff --git a/sdk/batch/arm-batch/src/models/poolOperationsMappers.ts b/sdk/batch/arm-batch/src/models/poolOperationsMappers.ts index 08c626ddd96d..ea9ca581dd23 100644 --- a/sdk/batch/arm-batch/src/models/poolOperationsMappers.ts +++ b/sdk/batch/arm-batch/src/models/poolOperationsMappers.ts @@ -1,61 +1,78 @@ /* * 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. */ export { - ListPoolsResult, - Pool, - ProxyResource, + Application, + ApplicationPackage, + ApplicationPackageReference, + AutoScaleRun, + AutoScaleRunError, + AutoScaleSettings, + AutoStorageBaseProperties, + AutoStorageProperties, + AutoUserSpecification, + AzureBlobFileSystemConfiguration, + AzureFileShareConfiguration, BaseResource, - DeploymentConfiguration, + BatchAccount, + BatchAccountIdentity, + Certificate, + CertificateCreateOrUpdateParameters, + CertificateReference, + CIFSMountConfiguration, + CloudError, CloudServiceConfiguration, - VirtualMachineConfiguration, - ImageReference, - OSDisk, - WindowsConfiguration, + ContainerConfiguration, + ContainerRegistry, DataDisk, - ScaleSettings, + DeleteCertificateError, + DeploymentConfiguration, + DiskEncryptionConfiguration, + EncryptionProperties, + EnvironmentSetting, FixedScaleSettings, - AutoScaleSettings, - AutoScaleRun, - AutoScaleRunError, - NetworkConfiguration, - PoolEndpointConfiguration, + ImageReference, InboundNatPool, - NetworkSecurityGroupRule, - TaskSchedulingPolicy, - UserAccount, + KeyVaultProperties, + KeyVaultReference, LinuxUserConfiguration, + ListPoolsResult, MetadataItem, - StartTask, - ResourceFile, - EnvironmentSetting, - UserIdentity, - AutoUserSpecification, - CertificateReference, - ApplicationPackageReference, - ResizeOperationStatus, - ResizeError, - CloudError, + MountConfiguration, + NetworkConfiguration, + NetworkSecurityGroupRule, + NFSMountConfiguration, + Pool, PoolCreateHeaders, - PoolUpdateHeaders, PoolDeleteHeaders, - PoolGetHeaders, PoolDisableAutoScaleHeaders, + PoolEndpointConfiguration, + PoolGetHeaders, PoolStopResizeHeaders, + PoolUpdateHeaders, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateLinkResource, + PrivateLinkServiceConnectionState, + ProxyResource, + PublicIPAddressConfiguration, + ResizeError, + ResizeOperationStatus, Resource, - Certificate, - DeleteCertificateError, - CertificateCreateOrUpdateParameters, - BatchAccount, - KeyVaultReference, - AutoStorageProperties, - AutoStorageBaseProperties + ResourceFile, + ScaleSettings, + StartTask, + TaskContainerSettings, + TaskSchedulingPolicy, + UserAccount, + UserIdentity, + VirtualMachineConfiguration, + VirtualMachineFamilyCoreQuota, + WindowsConfiguration, + WindowsUserConfiguration } from "../models/mappers"; - diff --git a/sdk/batch/arm-batch/src/models/privateEndpointConnectionOperationsMappers.ts b/sdk/batch/arm-batch/src/models/privateEndpointConnectionOperationsMappers.ts new file mode 100644 index 000000000000..a5159c1d441e --- /dev/null +++ b/sdk/batch/arm-batch/src/models/privateEndpointConnectionOperationsMappers.ts @@ -0,0 +1,73 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + Application, + ApplicationPackage, + ApplicationPackageReference, + AutoScaleRun, + AutoScaleRunError, + AutoScaleSettings, + AutoStorageBaseProperties, + AutoStorageProperties, + AutoUserSpecification, + AzureBlobFileSystemConfiguration, + AzureFileShareConfiguration, + BaseResource, + BatchAccount, + BatchAccountIdentity, + Certificate, + CertificateCreateOrUpdateParameters, + CertificateReference, + CIFSMountConfiguration, + CloudError, + CloudServiceConfiguration, + ContainerConfiguration, + ContainerRegistry, + DataDisk, + DeleteCertificateError, + DeploymentConfiguration, + DiskEncryptionConfiguration, + EncryptionProperties, + EnvironmentSetting, + FixedScaleSettings, + ImageReference, + InboundNatPool, + KeyVaultProperties, + KeyVaultReference, + LinuxUserConfiguration, + ListPrivateEndpointConnectionsResult, + MetadataItem, + MountConfiguration, + NetworkConfiguration, + NetworkSecurityGroupRule, + NFSMountConfiguration, + Pool, + PoolEndpointConfiguration, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateEndpointConnectionUpdateHeaders, + PrivateLinkResource, + PrivateLinkServiceConnectionState, + ProxyResource, + PublicIPAddressConfiguration, + ResizeError, + ResizeOperationStatus, + Resource, + ResourceFile, + ScaleSettings, + StartTask, + TaskContainerSettings, + TaskSchedulingPolicy, + UserAccount, + UserIdentity, + VirtualMachineConfiguration, + VirtualMachineFamilyCoreQuota, + WindowsConfiguration, + WindowsUserConfiguration +} from "../models/mappers"; diff --git a/sdk/batch/arm-batch/src/models/privateLinkResourceOperationsMappers.ts b/sdk/batch/arm-batch/src/models/privateLinkResourceOperationsMappers.ts new file mode 100644 index 000000000000..69b3e26378ec --- /dev/null +++ b/sdk/batch/arm-batch/src/models/privateLinkResourceOperationsMappers.ts @@ -0,0 +1,72 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + Application, + ApplicationPackage, + ApplicationPackageReference, + AutoScaleRun, + AutoScaleRunError, + AutoScaleSettings, + AutoStorageBaseProperties, + AutoStorageProperties, + AutoUserSpecification, + AzureBlobFileSystemConfiguration, + AzureFileShareConfiguration, + BaseResource, + BatchAccount, + BatchAccountIdentity, + Certificate, + CertificateCreateOrUpdateParameters, + CertificateReference, + CIFSMountConfiguration, + CloudError, + CloudServiceConfiguration, + ContainerConfiguration, + ContainerRegistry, + DataDisk, + DeleteCertificateError, + DeploymentConfiguration, + DiskEncryptionConfiguration, + EncryptionProperties, + EnvironmentSetting, + FixedScaleSettings, + ImageReference, + InboundNatPool, + KeyVaultProperties, + KeyVaultReference, + LinuxUserConfiguration, + ListPrivateLinkResourcesResult, + MetadataItem, + MountConfiguration, + NetworkConfiguration, + NetworkSecurityGroupRule, + NFSMountConfiguration, + Pool, + PoolEndpointConfiguration, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateLinkResource, + PrivateLinkServiceConnectionState, + ProxyResource, + PublicIPAddressConfiguration, + ResizeError, + ResizeOperationStatus, + Resource, + ResourceFile, + ScaleSettings, + StartTask, + TaskContainerSettings, + TaskSchedulingPolicy, + UserAccount, + UserIdentity, + VirtualMachineConfiguration, + VirtualMachineFamilyCoreQuota, + WindowsConfiguration, + WindowsUserConfiguration +} from "../models/mappers"; diff --git a/sdk/batch/arm-batch/src/operations/applicationOperations.ts b/sdk/batch/arm-batch/src/operations/applicationOperations.ts index 9a9a538c61a9..c96802c24e7e 100644 --- a/sdk/batch/arm-batch/src/operations/applicationOperations.ts +++ b/sdk/batch/arm-batch/src/operations/applicationOperations.ts @@ -30,32 +30,32 @@ export class ApplicationOperations { * Adds an application to the specified Batch account. * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. - * @param applicationId The ID of the application. + * @param applicationName The name of the application. This must be unique within the account. * @param [options] The optional parameters * @returns Promise */ - create(resourceGroupName: string, accountName: string, applicationId: string, options?: Models.ApplicationCreateOptionalParams): Promise; + create(resourceGroupName: string, accountName: string, applicationName: string, options?: Models.ApplicationCreateOptionalParams): Promise; /** * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. - * @param applicationId The ID of the application. + * @param applicationName The name of the application. This must be unique within the account. * @param callback The callback */ - create(resourceGroupName: string, accountName: string, applicationId: string, callback: msRest.ServiceCallback): void; + create(resourceGroupName: string, accountName: string, applicationName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. - * @param applicationId The ID of the application. + * @param applicationName The name of the application. This must be unique within the account. * @param options The optional parameters * @param callback The callback */ - create(resourceGroupName: string, accountName: string, applicationId: string, options: Models.ApplicationCreateOptionalParams, callback: msRest.ServiceCallback): void; - create(resourceGroupName: string, accountName: string, applicationId: string, options?: Models.ApplicationCreateOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + create(resourceGroupName: string, accountName: string, applicationName: string, options: Models.ApplicationCreateOptionalParams, callback: msRest.ServiceCallback): void; + create(resourceGroupName: string, accountName: string, applicationName: string, options?: Models.ApplicationCreateOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, accountName, - applicationId, + applicationName, options }, createOperationSpec, @@ -66,32 +66,32 @@ export class ApplicationOperations { * Deletes an application. * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. - * @param applicationId The ID of the application. + * @param applicationName The name of the application. This must be unique within the account. * @param [options] The optional parameters * @returns Promise */ - deleteMethod(resourceGroupName: string, accountName: string, applicationId: string, options?: msRest.RequestOptionsBase): Promise; + deleteMethod(resourceGroupName: string, accountName: string, applicationName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. - * @param applicationId The ID of the application. + * @param applicationName The name of the application. This must be unique within the account. * @param callback The callback */ - deleteMethod(resourceGroupName: string, accountName: string, applicationId: string, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, accountName: string, applicationName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. - * @param applicationId The ID of the application. + * @param applicationName The name of the application. This must be unique within the account. * @param options The optional parameters * @param callback The callback */ - deleteMethod(resourceGroupName: string, accountName: string, applicationId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteMethod(resourceGroupName: string, accountName: string, applicationId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + deleteMethod(resourceGroupName: string, accountName: string, applicationName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, accountName: string, applicationName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, accountName, - applicationId, + applicationName, options }, deleteMethodOperationSpec, @@ -102,32 +102,32 @@ export class ApplicationOperations { * Gets information about the specified application. * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. - * @param applicationId The ID of the application. + * @param applicationName The name of the application. This must be unique within the account. * @param [options] The optional parameters * @returns Promise */ - get(resourceGroupName: string, accountName: string, applicationId: string, options?: msRest.RequestOptionsBase): Promise; + get(resourceGroupName: string, accountName: string, applicationName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. - * @param applicationId The ID of the application. + * @param applicationName The name of the application. This must be unique within the account. * @param callback The callback */ - get(resourceGroupName: string, accountName: string, applicationId: string, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, accountName: string, applicationName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. - * @param applicationId The ID of the application. + * @param applicationName The name of the application. This must be unique within the account. * @param options The optional parameters * @param callback The callback */ - get(resourceGroupName: string, accountName: string, applicationId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, accountName: string, applicationId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get(resourceGroupName: string, accountName: string, applicationName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, accountName: string, applicationName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, accountName, - applicationId, + applicationName, options }, getOperationSpec, @@ -138,40 +138,40 @@ export class ApplicationOperations { * Updates settings for the specified application. * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. - * @param applicationId The ID of the application. + * @param applicationName The name of the application. This must be unique within the account. * @param parameters The parameters for the request. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - update(resourceGroupName: string, accountName: string, applicationId: string, parameters: Models.ApplicationUpdateParameters, options?: msRest.RequestOptionsBase): Promise; + update(resourceGroupName: string, accountName: string, applicationName: string, parameters: Models.Application, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. - * @param applicationId The ID of the application. + * @param applicationName The name of the application. This must be unique within the account. * @param parameters The parameters for the request. * @param callback The callback */ - update(resourceGroupName: string, accountName: string, applicationId: string, parameters: Models.ApplicationUpdateParameters, callback: msRest.ServiceCallback): void; + update(resourceGroupName: string, accountName: string, applicationName: string, parameters: Models.Application, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. - * @param applicationId The ID of the application. + * @param applicationName The name of the application. This must be unique within the account. * @param parameters The parameters for the request. * @param options The optional parameters * @param callback The callback */ - update(resourceGroupName: string, accountName: string, applicationId: string, parameters: Models.ApplicationUpdateParameters, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - update(resourceGroupName: string, accountName: string, applicationId: string, parameters: Models.ApplicationUpdateParameters, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + update(resourceGroupName: string, accountName: string, applicationName: string, parameters: Models.Application, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + update(resourceGroupName: string, accountName: string, applicationName: string, parameters: Models.Application, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, accountName, - applicationId, + applicationName, parameters, options }, updateOperationSpec, - callback); + callback) as Promise; } /** @@ -239,11 +239,11 @@ export class ApplicationOperations { const serializer = new msRest.Serializer(Mappers); const createOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationId}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}", urlParameters: [ Parameters.resourceGroupName, - Parameters.accountName, - Parameters.applicationId, + Parameters.accountName1, + Parameters.applicationName, Parameters.subscriptionId ], queryParameters: [ @@ -257,10 +257,10 @@ const createOperationSpec: msRest.OperationSpec = { "options", "parameters" ], - mapper: Mappers.ApplicationCreateParameters + mapper: Mappers.Application }, responses: { - 201: { + 200: { bodyMapper: Mappers.Application }, default: { @@ -272,11 +272,11 @@ const createOperationSpec: msRest.OperationSpec = { const deleteMethodOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationId}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}", urlParameters: [ Parameters.resourceGroupName, - Parameters.accountName, - Parameters.applicationId, + Parameters.accountName1, + Parameters.applicationName, Parameters.subscriptionId ], queryParameters: [ @@ -286,6 +286,7 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { Parameters.acceptLanguage ], responses: { + 200: {}, 204: {}, default: { bodyMapper: Mappers.CloudError @@ -296,11 +297,11 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationId}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}", urlParameters: [ Parameters.resourceGroupName, - Parameters.accountName, - Parameters.applicationId, + Parameters.accountName1, + Parameters.applicationName, Parameters.subscriptionId ], queryParameters: [ @@ -322,11 +323,11 @@ const getOperationSpec: msRest.OperationSpec = { const updateOperationSpec: msRest.OperationSpec = { httpMethod: "PATCH", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationId}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}", urlParameters: [ Parameters.resourceGroupName, - Parameters.accountName, - Parameters.applicationId, + Parameters.accountName1, + Parameters.applicationName, Parameters.subscriptionId ], queryParameters: [ @@ -338,12 +339,14 @@ const updateOperationSpec: msRest.OperationSpec = { requestBody: { parameterPath: "parameters", mapper: { - ...Mappers.ApplicationUpdateParameters, + ...Mappers.Application, required: true } }, responses: { - 204: {}, + 200: { + bodyMapper: Mappers.Application + }, default: { bodyMapper: Mappers.CloudError } @@ -356,7 +359,7 @@ const listOperationSpec: msRest.OperationSpec = { path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications", urlParameters: [ Parameters.resourceGroupName, - Parameters.accountName, + Parameters.accountName1, Parameters.subscriptionId ], queryParameters: [ diff --git a/sdk/batch/arm-batch/src/operations/applicationPackageOperations.ts b/sdk/batch/arm-batch/src/operations/applicationPackageOperations.ts index 2e24b21cebcd..6ec032190c81 100644 --- a/sdk/batch/arm-batch/src/operations/applicationPackageOperations.ts +++ b/sdk/batch/arm-batch/src/operations/applicationPackageOperations.ts @@ -27,83 +27,87 @@ export class ApplicationPackageOperations { } /** - * Activates the specified application package. + * Activates the specified application package. This should be done after the `ApplicationPackage` + * was created and uploaded. This needs to be done before an `ApplicationPackage` can be used on + * Pools or Tasks. * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. - * @param applicationId The ID of the application. - * @param version The version of the application to activate. + * @param applicationName The name of the application. This must be unique within the account. + * @param versionName The version of the application. * @param format The format of the application package binary file. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - activate(resourceGroupName: string, accountName: string, applicationId: string, version: string, format: string, options?: msRest.RequestOptionsBase): Promise; + activate(resourceGroupName: string, accountName: string, applicationName: string, versionName: string, format: string, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. - * @param applicationId The ID of the application. - * @param version The version of the application to activate. + * @param applicationName The name of the application. This must be unique within the account. + * @param versionName The version of the application. * @param format The format of the application package binary file. * @param callback The callback */ - activate(resourceGroupName: string, accountName: string, applicationId: string, version: string, format: string, callback: msRest.ServiceCallback): void; + activate(resourceGroupName: string, accountName: string, applicationName: string, versionName: string, format: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. - * @param applicationId The ID of the application. - * @param version The version of the application to activate. + * @param applicationName The name of the application. This must be unique within the account. + * @param versionName The version of the application. * @param format The format of the application package binary file. * @param options The optional parameters * @param callback The callback */ - activate(resourceGroupName: string, accountName: string, applicationId: string, version: string, format: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - activate(resourceGroupName: string, accountName: string, applicationId: string, version: string, format: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + activate(resourceGroupName: string, accountName: string, applicationName: string, versionName: string, format: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + activate(resourceGroupName: string, accountName: string, applicationName: string, versionName: string, format: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, accountName, - applicationId, - version, + applicationName, + versionName, format, options }, activateOperationSpec, - callback); + callback) as Promise; } /** - * Creates an application package record. + * Creates an application package record. The record contains the SAS where the package should be + * uploaded to. Once it is uploaded the `ApplicationPackage` needs to be activated using + * `ApplicationPackageActive` before it can be used. * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. - * @param applicationId The ID of the application. - * @param version The version of the application. + * @param applicationName The name of the application. This must be unique within the account. + * @param versionName The version of the application. * @param [options] The optional parameters * @returns Promise */ - create(resourceGroupName: string, accountName: string, applicationId: string, version: string, options?: msRest.RequestOptionsBase): Promise; + create(resourceGroupName: string, accountName: string, applicationName: string, versionName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. - * @param applicationId The ID of the application. - * @param version The version of the application. + * @param applicationName The name of the application. This must be unique within the account. + * @param versionName The version of the application. * @param callback The callback */ - create(resourceGroupName: string, accountName: string, applicationId: string, version: string, callback: msRest.ServiceCallback): void; + create(resourceGroupName: string, accountName: string, applicationName: string, versionName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. - * @param applicationId The ID of the application. - * @param version The version of the application. + * @param applicationName The name of the application. This must be unique within the account. + * @param versionName The version of the application. * @param options The optional parameters * @param callback The callback */ - create(resourceGroupName: string, accountName: string, applicationId: string, version: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - create(resourceGroupName: string, accountName: string, applicationId: string, version: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + create(resourceGroupName: string, accountName: string, applicationName: string, versionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + create(resourceGroupName: string, accountName: string, applicationName: string, versionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, accountName, - applicationId, - version, + applicationName, + versionName, options }, createOperationSpec, @@ -114,36 +118,36 @@ export class ApplicationPackageOperations { * Deletes an application package record and its associated binary file. * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. - * @param applicationId The ID of the application. - * @param version The version of the application to delete. + * @param applicationName The name of the application. This must be unique within the account. + * @param versionName The version of the application. * @param [options] The optional parameters * @returns Promise */ - deleteMethod(resourceGroupName: string, accountName: string, applicationId: string, version: string, options?: msRest.RequestOptionsBase): Promise; + deleteMethod(resourceGroupName: string, accountName: string, applicationName: string, versionName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. - * @param applicationId The ID of the application. - * @param version The version of the application to delete. + * @param applicationName The name of the application. This must be unique within the account. + * @param versionName The version of the application. * @param callback The callback */ - deleteMethod(resourceGroupName: string, accountName: string, applicationId: string, version: string, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, accountName: string, applicationName: string, versionName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. - * @param applicationId The ID of the application. - * @param version The version of the application to delete. + * @param applicationName The name of the application. This must be unique within the account. + * @param versionName The version of the application. * @param options The optional parameters * @param callback The callback */ - deleteMethod(resourceGroupName: string, accountName: string, applicationId: string, version: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteMethod(resourceGroupName: string, accountName: string, applicationId: string, version: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + deleteMethod(resourceGroupName: string, accountName: string, applicationName: string, versionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, accountName: string, applicationName: string, versionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, accountName, - applicationId, - version, + applicationName, + versionName, options }, deleteMethodOperationSpec, @@ -154,53 +158,117 @@ export class ApplicationPackageOperations { * Gets information about the specified application package. * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. - * @param applicationId The ID of the application. - * @param version The version of the application. + * @param applicationName The name of the application. This must be unique within the account. + * @param versionName The version of the application. * @param [options] The optional parameters * @returns Promise */ - get(resourceGroupName: string, accountName: string, applicationId: string, version: string, options?: msRest.RequestOptionsBase): Promise; + get(resourceGroupName: string, accountName: string, applicationName: string, versionName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. - * @param applicationId The ID of the application. - * @param version The version of the application. + * @param applicationName The name of the application. This must be unique within the account. + * @param versionName The version of the application. * @param callback The callback */ - get(resourceGroupName: string, accountName: string, applicationId: string, version: string, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, accountName: string, applicationName: string, versionName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. - * @param applicationId The ID of the application. - * @param version The version of the application. + * @param applicationName The name of the application. This must be unique within the account. + * @param versionName The version of the application. * @param options The optional parameters * @param callback The callback */ - get(resourceGroupName: string, accountName: string, applicationId: string, version: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, accountName: string, applicationId: string, version: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get(resourceGroupName: string, accountName: string, applicationName: string, versionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, accountName: string, applicationName: string, versionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, accountName, - applicationId, - version, + applicationName, + versionName, options }, getOperationSpec, callback) as Promise; } + + /** + * Lists all of the application packages in the specified application. + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param applicationName The name of the application. This must be unique within the account. + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, accountName: string, applicationName: string, options?: Models.ApplicationPackageListOptionalParams): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param applicationName The name of the application. This must be unique within the account. + * @param callback The callback + */ + list(resourceGroupName: string, accountName: string, applicationName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param applicationName The name of the application. This must be unique within the account. + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, accountName: string, applicationName: string, options: Models.ApplicationPackageListOptionalParams, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, accountName: string, applicationName: string, options?: Models.ApplicationPackageListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + applicationName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Lists all of the application packages in the specified application. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } } // Operation Specifications const serializer = new msRest.Serializer(Mappers); const activateOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationId}/versions/{version}/activate", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}/versions/{versionName}/activate", urlParameters: [ Parameters.resourceGroupName, - Parameters.accountName, - Parameters.applicationId, - Parameters.version, + Parameters.accountName1, + Parameters.applicationName, + Parameters.versionName, Parameters.subscriptionId ], queryParameters: [ @@ -219,7 +287,9 @@ const activateOperationSpec: msRest.OperationSpec = { } }, responses: { - 204: {}, + 200: { + bodyMapper: Mappers.ApplicationPackage + }, default: { bodyMapper: Mappers.CloudError } @@ -229,12 +299,12 @@ const activateOperationSpec: msRest.OperationSpec = { const createOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationId}/versions/{version}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}/versions/{versionName}", urlParameters: [ Parameters.resourceGroupName, - Parameters.accountName, - Parameters.applicationId, - Parameters.version, + Parameters.accountName1, + Parameters.applicationName, + Parameters.versionName, Parameters.subscriptionId ], queryParameters: [ @@ -243,8 +313,15 @@ const createOperationSpec: msRest.OperationSpec = { headerParameters: [ Parameters.acceptLanguage ], + requestBody: { + parameterPath: [ + "options", + "parameters" + ], + mapper: Mappers.ApplicationPackage + }, responses: { - 201: { + 200: { bodyMapper: Mappers.ApplicationPackage }, default: { @@ -256,12 +333,12 @@ const createOperationSpec: msRest.OperationSpec = { const deleteMethodOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationId}/versions/{version}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}/versions/{versionName}", urlParameters: [ Parameters.resourceGroupName, - Parameters.accountName, - Parameters.applicationId, - Parameters.version, + Parameters.accountName1, + Parameters.applicationName, + Parameters.versionName, Parameters.subscriptionId ], queryParameters: [ @@ -271,6 +348,7 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { Parameters.acceptLanguage ], responses: { + 200: {}, 204: {}, default: { bodyMapper: Mappers.CloudError @@ -281,12 +359,12 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationId}/versions/{version}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}/versions/{versionName}", urlParameters: [ Parameters.resourceGroupName, - Parameters.accountName, - Parameters.applicationId, - Parameters.version, + Parameters.accountName1, + Parameters.applicationName, + Parameters.versionName, Parameters.subscriptionId ], queryParameters: [ @@ -305,3 +383,51 @@ const getOperationSpec: msRest.OperationSpec = { }, serializer }; + +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}/versions", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.accountName1, + Parameters.applicationName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.maxresults, + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ListApplicationPackagesResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ListApplicationPackagesResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/batch/arm-batch/src/operations/batchAccountOperations.ts b/sdk/batch/arm-batch/src/operations/batchAccountOperations.ts index ea91ec70b39e..318548de4ed5 100644 --- a/sdk/batch/arm-batch/src/operations/batchAccountOperations.ts +++ b/sdk/batch/arm-batch/src/operations/batchAccountOperations.ts @@ -392,7 +392,7 @@ const updateOperationSpec: msRest.OperationSpec = { path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}", urlParameters: [ Parameters.resourceGroupName, - Parameters.accountName, + Parameters.accountName1, Parameters.subscriptionId ], queryParameters: [ @@ -424,7 +424,7 @@ const getOperationSpec: msRest.OperationSpec = { path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}", urlParameters: [ Parameters.resourceGroupName, - Parameters.accountName, + Parameters.accountName1, Parameters.subscriptionId ], queryParameters: [ @@ -496,7 +496,7 @@ const synchronizeAutoStorageKeysOperationSpec: msRest.OperationSpec = { path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/syncAutoStorageKeys", urlParameters: [ Parameters.resourceGroupName, - Parameters.accountName, + Parameters.accountName1, Parameters.subscriptionId ], queryParameters: [ @@ -519,7 +519,7 @@ const regenerateKeyOperationSpec: msRest.OperationSpec = { path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/regenerateKeys", urlParameters: [ Parameters.resourceGroupName, - Parameters.accountName, + Parameters.accountName1, Parameters.subscriptionId ], queryParameters: [ @@ -553,7 +553,7 @@ const getKeysOperationSpec: msRest.OperationSpec = { path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/listKeys", urlParameters: [ Parameters.resourceGroupName, - Parameters.accountName, + Parameters.accountName1, Parameters.subscriptionId ], queryParameters: [ @@ -578,7 +578,7 @@ const beginCreateOperationSpec: msRest.OperationSpec = { path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}", urlParameters: [ Parameters.resourceGroupName, - Parameters.accountName, + Parameters.accountName0, Parameters.subscriptionId ], queryParameters: [ @@ -603,7 +603,8 @@ const beginCreateOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.BatchAccountCreateHeaders }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.CloudError, + headersMapper: Mappers.BatchAccountCreateHeaders } }, serializer @@ -614,7 +615,7 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}", urlParameters: [ Parameters.resourceGroupName, - Parameters.accountName, + Parameters.accountName1, Parameters.subscriptionId ], queryParameters: [ @@ -634,7 +635,8 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.BatchAccountDeleteHeaders }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.CloudError, + headersMapper: Mappers.BatchAccountDeleteHeaders } }, serializer diff --git a/sdk/batch/arm-batch/src/operations/certificateOperations.ts b/sdk/batch/arm-batch/src/operations/certificateOperations.ts index 5b9198143766..f8517e31854e 100644 --- a/sdk/batch/arm-batch/src/operations/certificateOperations.ts +++ b/sdk/batch/arm-batch/src/operations/certificateOperations.ts @@ -308,7 +308,7 @@ const listByBatchAccountOperationSpec: msRest.OperationSpec = { path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates", urlParameters: [ Parameters.resourceGroupName, - Parameters.accountName, + Parameters.accountName1, Parameters.subscriptionId ], queryParameters: [ @@ -336,7 +336,7 @@ const updateOperationSpec: msRest.OperationSpec = { path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates/{certificateName}", urlParameters: [ Parameters.resourceGroupName, - Parameters.accountName, + Parameters.accountName1, Parameters.certificateName, Parameters.subscriptionId ], @@ -360,7 +360,8 @@ const updateOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.CertificateUpdateHeaders }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.CloudError, + headersMapper: Mappers.CertificateUpdateHeaders } }, serializer @@ -371,7 +372,7 @@ const getOperationSpec: msRest.OperationSpec = { path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates/{certificateName}", urlParameters: [ Parameters.resourceGroupName, - Parameters.accountName, + Parameters.accountName1, Parameters.certificateName, Parameters.subscriptionId ], @@ -387,7 +388,8 @@ const getOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.CertificateGetHeaders }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.CloudError, + headersMapper: Mappers.CertificateGetHeaders } }, serializer @@ -398,7 +400,7 @@ const cancelDeletionOperationSpec: msRest.OperationSpec = { path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates/{certificateName}/cancelDelete", urlParameters: [ Parameters.resourceGroupName, - Parameters.accountName, + Parameters.accountName1, Parameters.certificateName, Parameters.subscriptionId ], @@ -414,7 +416,8 @@ const cancelDeletionOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.CertificateCancelDeletionHeaders }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.CloudError, + headersMapper: Mappers.CertificateCancelDeletionHeaders } }, serializer @@ -425,7 +428,7 @@ const beginCreateOperationSpec: msRest.OperationSpec = { path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates/{certificateName}", urlParameters: [ Parameters.resourceGroupName, - Parameters.accountName, + Parameters.accountName1, Parameters.certificateName, Parameters.subscriptionId ], @@ -450,7 +453,8 @@ const beginCreateOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.CertificateCreateHeaders }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.CloudError, + headersMapper: Mappers.CertificateCreateHeaders } }, serializer @@ -461,7 +465,7 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates/{certificateName}", urlParameters: [ Parameters.resourceGroupName, - Parameters.accountName, + Parameters.accountName1, Parameters.certificateName, Parameters.subscriptionId ], @@ -482,7 +486,8 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.CertificateDeleteHeaders }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.CloudError, + headersMapper: Mappers.CertificateDeleteHeaders } }, serializer diff --git a/sdk/batch/arm-batch/src/operations/index.ts b/sdk/batch/arm-batch/src/operations/index.ts index 9af241e11a01..f67d0e2219db 100644 --- a/sdk/batch/arm-batch/src/operations/index.ts +++ b/sdk/batch/arm-batch/src/operations/index.ts @@ -14,4 +14,6 @@ export * from "./applicationOperations"; export * from "./location"; export * from "./operations"; export * from "./certificateOperations"; +export * from "./privateLinkResourceOperations"; +export * from "./privateEndpointConnectionOperations"; export * from "./poolOperations"; diff --git a/sdk/batch/arm-batch/src/operations/poolOperations.ts b/sdk/batch/arm-batch/src/operations/poolOperations.ts index 02c071ab662a..14511c788af0 100644 --- a/sdk/batch/arm-batch/src/operations/poolOperations.ts +++ b/sdk/batch/arm-batch/src/operations/poolOperations.ts @@ -321,7 +321,7 @@ const listByBatchAccountOperationSpec: msRest.OperationSpec = { path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools", urlParameters: [ Parameters.resourceGroupName, - Parameters.accountName, + Parameters.accountName1, Parameters.subscriptionId ], queryParameters: [ @@ -349,7 +349,7 @@ const updateOperationSpec: msRest.OperationSpec = { path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools/{poolName}", urlParameters: [ Parameters.resourceGroupName, - Parameters.accountName, + Parameters.accountName1, Parameters.poolName, Parameters.subscriptionId ], @@ -373,7 +373,8 @@ const updateOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.PoolUpdateHeaders }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.CloudError, + headersMapper: Mappers.PoolUpdateHeaders } }, serializer @@ -384,7 +385,7 @@ const getOperationSpec: msRest.OperationSpec = { path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools/{poolName}", urlParameters: [ Parameters.resourceGroupName, - Parameters.accountName, + Parameters.accountName1, Parameters.poolName, Parameters.subscriptionId ], @@ -400,7 +401,8 @@ const getOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.PoolGetHeaders }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.CloudError, + headersMapper: Mappers.PoolGetHeaders } }, serializer @@ -411,7 +413,7 @@ const disableAutoScaleOperationSpec: msRest.OperationSpec = { path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools/{poolName}/disableAutoScale", urlParameters: [ Parameters.resourceGroupName, - Parameters.accountName, + Parameters.accountName1, Parameters.poolName, Parameters.subscriptionId ], @@ -427,7 +429,8 @@ const disableAutoScaleOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.PoolDisableAutoScaleHeaders }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.CloudError, + headersMapper: Mappers.PoolDisableAutoScaleHeaders } }, serializer @@ -438,7 +441,7 @@ const stopResizeOperationSpec: msRest.OperationSpec = { path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools/{poolName}/stopResize", urlParameters: [ Parameters.resourceGroupName, - Parameters.accountName, + Parameters.accountName1, Parameters.poolName, Parameters.subscriptionId ], @@ -454,7 +457,8 @@ const stopResizeOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.PoolStopResizeHeaders }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.CloudError, + headersMapper: Mappers.PoolStopResizeHeaders } }, serializer @@ -465,7 +469,7 @@ const beginCreateOperationSpec: msRest.OperationSpec = { path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools/{poolName}", urlParameters: [ Parameters.resourceGroupName, - Parameters.accountName, + Parameters.accountName1, Parameters.poolName, Parameters.subscriptionId ], @@ -490,7 +494,8 @@ const beginCreateOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.PoolCreateHeaders }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.CloudError, + headersMapper: Mappers.PoolCreateHeaders } }, serializer @@ -501,7 +506,7 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools/{poolName}", urlParameters: [ Parameters.resourceGroupName, - Parameters.accountName, + Parameters.accountName1, Parameters.poolName, Parameters.subscriptionId ], @@ -522,7 +527,8 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.PoolDeleteHeaders }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.CloudError, + headersMapper: Mappers.PoolDeleteHeaders } }, serializer diff --git a/sdk/batch/arm-batch/src/operations/privateEndpointConnectionOperations.ts b/sdk/batch/arm-batch/src/operations/privateEndpointConnectionOperations.ts new file mode 100644 index 000000000000..3b6040a9c642 --- /dev/null +++ b/sdk/batch/arm-batch/src/operations/privateEndpointConnectionOperations.ts @@ -0,0 +1,285 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * 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 * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/privateEndpointConnectionOperationsMappers"; +import * as Parameters from "../models/parameters"; +import { BatchManagementClientContext } from "../batchManagementClientContext"; + +/** Class representing a PrivateEndpointConnectionOperations. */ +export class PrivateEndpointConnectionOperations { + private readonly client: BatchManagementClientContext; + + /** + * Create a PrivateEndpointConnectionOperations. + * @param {BatchManagementClientContext} client Reference to the service client. + */ + constructor(client: BatchManagementClientContext) { + this.client = client; + } + + /** + * Lists all of the private endpoint connections in the specified account. + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param [options] The optional parameters + * @returns Promise + */ + listByBatchAccount(resourceGroupName: string, accountName: string, options?: Models.PrivateEndpointConnectionListByBatchAccountOptionalParams): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param callback The callback + */ + listByBatchAccount(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param options The optional parameters + * @param callback The callback + */ + listByBatchAccount(resourceGroupName: string, accountName: string, options: Models.PrivateEndpointConnectionListByBatchAccountOptionalParams, callback: msRest.ServiceCallback): void; + listByBatchAccount(resourceGroupName: string, accountName: string, options?: Models.PrivateEndpointConnectionListByBatchAccountOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + options + }, + listByBatchAccountOperationSpec, + callback) as Promise; + } + + /** + * Gets information about the specified private endpoint connection. + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param privateEndpointConnectionName The private endpoint connection name. This must be unique + * within the account. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, accountName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param privateEndpointConnectionName The private endpoint connection name. This must be unique + * within the account. + * @param callback The callback + */ + get(resourceGroupName: string, accountName: string, privateEndpointConnectionName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param privateEndpointConnectionName The private endpoint connection name. This must be unique + * within the account. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, accountName: string, privateEndpointConnectionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, accountName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + privateEndpointConnectionName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Updates the properties of an existing private endpoint connection. + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param privateEndpointConnectionName The private endpoint connection name. This must be unique + * within the account. + * @param parameters PrivateEndpointConnection properties that should be updated. Properties that + * are supplied will be updated, any property not supplied will be unchanged. + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, accountName: string, privateEndpointConnectionName: string, parameters: Models.PrivateEndpointConnection, options?: Models.PrivateEndpointConnectionUpdateOptionalParams): Promise { + return this.beginUpdate(resourceGroupName,accountName,privateEndpointConnectionName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Updates the properties of an existing private endpoint connection. + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param privateEndpointConnectionName The private endpoint connection name. This must be unique + * within the account. + * @param parameters PrivateEndpointConnection properties that should be updated. Properties that + * are supplied will be updated, any property not supplied will be unchanged. + * @param [options] The optional parameters + * @returns Promise + */ + beginUpdate(resourceGroupName: string, accountName: string, privateEndpointConnectionName: string, parameters: Models.PrivateEndpointConnection, options?: Models.PrivateEndpointConnectionBeginUpdateOptionalParams): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + accountName, + privateEndpointConnectionName, + parameters, + options + }, + beginUpdateOperationSpec, + options); + } + + /** + * Lists all of the private endpoint connections in the specified account. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByBatchAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByBatchAccountNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByBatchAccountNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBatchAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByBatchAccountNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByBatchAccountOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/privateEndpointConnections", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName1 + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.maxresults + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ListPrivateEndpointConnectionsResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName1, + Parameters.privateEndpointConnectionName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName1, + Parameters.privateEndpointConnectionName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.ifMatch, + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.PrivateEndpointConnection, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection, + headersMapper: Mappers.PrivateEndpointConnectionUpdateHeaders + }, + 202: { + headersMapper: Mappers.PrivateEndpointConnectionUpdateHeaders + }, + 204: { + headersMapper: Mappers.PrivateEndpointConnectionUpdateHeaders + }, + default: { + bodyMapper: Mappers.CloudError, + headersMapper: Mappers.PrivateEndpointConnectionUpdateHeaders + } + }, + serializer +}; + +const listByBatchAccountNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ListPrivateEndpointConnectionsResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/batch/arm-batch/src/operations/privateLinkResourceOperations.ts b/sdk/batch/arm-batch/src/operations/privateLinkResourceOperations.ts new file mode 100644 index 000000000000..d27dfdc6ccfc --- /dev/null +++ b/sdk/batch/arm-batch/src/operations/privateLinkResourceOperations.ts @@ -0,0 +1,202 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * 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 * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/privateLinkResourceOperationsMappers"; +import * as Parameters from "../models/parameters"; +import { BatchManagementClientContext } from "../batchManagementClientContext"; + +/** Class representing a PrivateLinkResourceOperations. */ +export class PrivateLinkResourceOperations { + private readonly client: BatchManagementClientContext; + + /** + * Create a PrivateLinkResourceOperations. + * @param {BatchManagementClientContext} client Reference to the service client. + */ + constructor(client: BatchManagementClientContext) { + this.client = client; + } + + /** + * Lists all of the private link resources in the specified account. + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param [options] The optional parameters + * @returns Promise + */ + listByBatchAccount(resourceGroupName: string, accountName: string, options?: Models.PrivateLinkResourceListByBatchAccountOptionalParams): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param callback The callback + */ + listByBatchAccount(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param options The optional parameters + * @param callback The callback + */ + listByBatchAccount(resourceGroupName: string, accountName: string, options: Models.PrivateLinkResourceListByBatchAccountOptionalParams, callback: msRest.ServiceCallback): void; + listByBatchAccount(resourceGroupName: string, accountName: string, options?: Models.PrivateLinkResourceListByBatchAccountOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + options + }, + listByBatchAccountOperationSpec, + callback) as Promise; + } + + /** + * Gets information about the specified private link resource. + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param privateLinkResourceName The private link resource name. This must be unique within the + * account. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, accountName: string, privateLinkResourceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param privateLinkResourceName The private link resource name. This must be unique within the + * account. + * @param callback The callback + */ + get(resourceGroupName: string, accountName: string, privateLinkResourceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param privateLinkResourceName The private link resource name. This must be unique within the + * account. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, accountName: string, privateLinkResourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, accountName: string, privateLinkResourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + privateLinkResourceName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Lists all of the private link resources in the specified account. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByBatchAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByBatchAccountNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByBatchAccountNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBatchAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByBatchAccountNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByBatchAccountOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/privateLinkResources", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName1 + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.maxresults + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ListPrivateLinkResourcesResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/privateLinkResources/{privateLinkResourceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName1, + Parameters.privateLinkResourceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResource + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByBatchAccountNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ListPrivateLinkResourcesResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/batch/arm-batch/test/batchManagementClient.spec.ts b/sdk/batch/arm-batch/test/batchManagementClient.spec.ts new file mode 100644 index 000000000000..974f8dd717bd --- /dev/null +++ b/sdk/batch/arm-batch/test/batchManagementClient.spec.ts @@ -0,0 +1,576 @@ +/* eslint-disable @typescript-eslint/no-non-null-assertion */ +import { BatchManagementClient, BatchManagementModels } from "../src/batchManagementClient"; +import { describe, beforeEach } from "mocha"; +import { assert } from "chai"; +import * as dotenv from "dotenv"; +import * as util from "util"; +import * as fs from "fs"; +import { AuthenticationContext } from "adal-node"; +import { TokenCredentials, RestError, ServiceClient, WebResource } from "@azure/ms-rest-js"; +import { CertificateCreateOrUpdateParameters } from "../src/models"; + +dotenv.config(); + +describe("Batch Management Service", () => { + let client: BatchManagementClient; + let subscriptionId: string; + let clientId: string; + let secret: string; + let tenant: string; + let location: string; + let autoStorage: string; + let batchAccount: string; + let groupName: string; + + async function getAppOnlyToken(clientId, secret) { + const authContext = new AuthenticationContext( + "https://login.microsoftonline.com/microsoft.onmicrosoft.com" + ); + return new Promise((resolve, reject) => { + authContext.acquireTokenWithClientCredentials( + "https://management.core.windows.net/", + clientId, + secret, + (err, token) => { + if (err) { + reject(err); + } else { + resolve(token.accessToken); + } + } + ); + }); + } + + beforeEach(async () => { + subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]!; + location = process.env["AZURE_TEST_LOCATION"]!; + autoStorage = process.env["AZURE_AUTOSTORAGE"]!; + batchAccount = "batchtestnodesdk"; + groupName = util.format("default-azurebatch-%s", location); + clientId = process.env["AZURE_CLIENT_ID"]; + secret = process.env["AZURE_CLIENT_SECRET"]; + tenant = process.env["AZURE_TENANT_ID"]; + + const token = await getAppOnlyToken(clientId, secret); + const tokenCreds = new TokenCredentials(token, "Bearer"); + client = new BatchManagementClient(tokenCreds, subscriptionId); + }); + + describe("operations", () => { + it("should list Batch operations successfully", async () => { + const result = await client.operations.list(); + assert.isNotNull(result); + assert.isAtLeast(result.length, 50); + assert.equal( + result[0].name, + "Microsoft.Batch/batchAccounts/providers/Microsoft.Insights/diagnosticSettings/read" + ); + assert.equal(result[0].origin, "system"); + assert.equal(result[0].display.provider, "Microsoft Batch"); + assert.equal(result[0].display.operation, "Read diagnostic setting"); + }); + + it("should get subscription quota successfully", async () => { + const result = await client.location.getQuotas(location); + assert.exists(result); + assert.equal(result.accountQuota, 1); + }); + + it("should check name available successfully", async () => { + let name = "randombatch8374652387"; + const result = await client.location.checkNameAvailability(location, name); + assert.exists(result); + assert.isTrue(result.nameAvailable); + }); + + it("should create a batch account successfully", async () => { + var resource = util.format( + "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Storage/storageAccounts/%s", + subscriptionId, + groupName, + autoStorage + ); + var params = { location: location, autoStorage: { storageAccountId: resource } }; + const result = await client.batchAccount.create(groupName, batchAccount, params); + assert.exists(result); + assert.equal(result.location, location); + assert.equal(result.poolQuota, 100); + assert.equal(result.dedicatedCoreQuota, 700); + assert.equal(result.lowPriorityCoreQuota, 500); + }); + + it("should add application successfully", async () => { + var params = { allowUpdates: true, displayName: "my_application_name" }; + var options = { parameters: params }; + const result = await client.application.create( + groupName, + batchAccount, + "my_application_id", + options + ); + assert.exists(result); + assert.equal(result.name, "my_application_id"); + }); + + it("should get application successfully", async () => { + const result = await client.application.get(groupName, batchAccount, "my_application_id"); + assert.exists(result); + assert.equal(result.name, "my_application_id"); + assert.equal(result.displayName, "my_application_name"); + }); + + it("should get a list of applications successfully", async () => { + const result = await client.application.list(groupName, batchAccount); + assert.exists(result); + assert.isAtLeast(result.length, 1); + }); + + it("should add application package successfully", async () => { + const result = await client.applicationPackage.create( + groupName, + batchAccount, + "my_application_id", + "v1.0" + ); + assert.exists(result); + assert.equal(result._response.status, 200); + assert.equal(result.name, "v1.0"); + console.log(result); + console.log(__dirname); + fs.writeFileSync(__dirname + "/test_package.zip", "Hey there!"); + var fileContent = fs.createReadStream(__dirname + "/test_package.zip"); + var httpRequest = new WebResource(); + var serviceClient = new ServiceClient(); + httpRequest.method = "PUT"; + httpRequest.headers = {}; + httpRequest.headers["x-ms-blob-type"] = "BlockBlob"; + httpRequest.headers["Content-Length"] = "10"; + httpRequest.url = result.storageUrl; + httpRequest.body = fileContent; + httpRequest.streamedResponse = true; + var upload = serviceClient.sendRequest(httpRequest, function(err, response) { + assert.exists(response); + assert.equal(response.statusCode, 201); + }); + }); + + it("should add second application package successfully", async () => { + const result = await client.applicationPackage.create( + groupName, + batchAccount, + "my_application_id", + "v2.0" + ); + assert.exists(result); + assert.equal(result._response.status, 200); + }); + + it("should list application packages successfully", async () => { + const result = await client.applicationPackage.list( + groupName, + batchAccount, + "my_application_id" + ); + assert.isAtLeast(result.length, 1); + }); + + it("should activate application package successfully", async () => { + const result = await client.applicationPackage.activate( + groupName, + batchAccount, + "my_application_id", + "v1.0", + "zip" + ); + assert.exists(result); + assert.equal(result._response.status, 200); + }); + + it("should fail to activate application package", async () => { + try { + await client.applicationPackage.activate( + groupName, + batchAccount, + "my_application_id", + "v2.0", + "zip" + ); + assert.fail("No error thrown"); + } catch (err) { + if (err instanceof RestError) { + assert.equal(err.response.status, 409); + assert.equal(err.body.code, "ApplicationPackageBlobNotFound"); + } else { + assert.fail(`Caught error but wasn't a RestError: ${err}`); + } + } + }); + + it("should fail to update application", async () => { + var params = { allowUpdates: false, displayName: "my_updated_name", defaultVersion: "v2.0" }; + try { + await client.application.update(groupName, batchAccount, "my_application_id", params); + assert.fail("No error thrown"); + } catch (err) { + if (err instanceof RestError) { + assert.equal(err.response.status, 409); + assert.equal(err.body.code, "RequestedDefaultVersionNotActive"); + } else { + assert.fail(`Caught error but wasn't a RestError: ${err}`); + } + } + }); + + it("should update application successfully", async () => { + var params = { allowUpdates: false, displayName: "my_updated_name", defaultVersion: "v1.0" }; + const result = await client.application.update( + groupName, + batchAccount, + "my_application_id", + params + ); + assert.equal(result._response.status, 200); + }); + + it("should get application package successfully", async () => { + const result = await client.applicationPackage.get( + groupName, + batchAccount, + "my_application_id", + "v1.0" + ); + assert.exists(result); + assert.equal(result._response.status, 200); + }); + + it("should delete application package successfully", async () => { + const result = await client.applicationPackage.deleteMethod( + groupName, + batchAccount, + "my_application_id", + "v1.0" + ); + assert.equal(result._response.status, 200); + }); + + it("should fail to delete application", async () => { + try { + await client.application.deleteMethod(groupName, batchAccount, "my_application_id"); + assert.fail("No error thrown"); + } catch (err) { + if (err instanceof RestError) { + assert.equal(err.response.status, 409); + assert.equal(err.body.code, "ApplicationPackagesNotEmpty"); + } else { + assert.fail(`Caught error but wasn't a RestError: ${err}`); + } + } + }); + + it("should delete second application package successfully", async () => { + const result = await client.applicationPackage.deleteMethod( + groupName, + batchAccount, + "my_application_id", + "v2.0" + ); + assert.equal(result._response.status, 200); + }); + + it("should delete application successfully", async () => { + const result = await client.application.deleteMethod( + groupName, + batchAccount, + "my_application_id" + ); + assert.equal(result._response.status, 200); + }); + + it("should fail to create a batch account due to dupilcate location", async () => { + var params = { location: location }; + try { + await client.batchAccount.create(groupName, "batchtestnodesdk2", params); + assert.fail("No error thrown"); + } catch (err) { + console.log(err); + } + //This fails after the initial create request - so error isn't surfaced. + }); + + it("should fail to create a batch account due to invalid resource group", async () => { + var params = { location: location }; + try { + await client.batchAccount.create("does-not-exist", batchAccount, params); + assert.fail("No error thrown"); + } catch (err) { + if (err instanceof RestError) { + assert.equal(err.response.status, 404); + assert.equal(err.body.code, "ResourceGroupNotFound"); + } else { + assert.fail(`Caught error but wasn't a RestError: ${err}`); + } + } + //This fails on the initial create request - so we can check the error. + }); + + it("should get a specific account info successfully", async () => { + const result = await client.batchAccount.get(groupName, batchAccount); + assert.exists(result); + assert.equal(result.name, batchAccount); + assert.equal(result.location, location); + assert.equal(result._response.status, 200); + }); + + it("should list accounts successfully", async () => { + const result = await client.batchAccount.list(); + assert.exists(result); + assert.isAtLeast(result.length, 1); + var sorted = result.sort(function(a, b) { + if (a.name < b.name) { + return -1; + } + return 1; + }); + assert.equal(sorted[0].name, batchAccount); + assert.equal(sorted[0].location, location); + }); + + it("should list accounts by resource group successfully", async () => { + const result = await client.batchAccount.listByResourceGroup(groupName); + assert.exists(result); + assert.isAtLeast(result.length, 1); + assert.equal(result[0].name, batchAccount); + assert.equal(result[0].location, location); + }); + + it("should get account keys successfully", async () => { + const result = await client.batchAccount.getKeys(groupName, batchAccount); + assert.exists(result); + assert.exists(result.accountName); + assert.exists(result.primary); + assert.exists(result.secondary); + }); + + it("should regenerate keys successfully", async () => { + const result = await client.batchAccount.regenerateKey(groupName, batchAccount, "Primary"); + assert.exists(result); + assert.exists(result.primary); + assert.exists(result.secondary); + }); + + it("should sync auto storage keys successfully", async () => { + const result = await client.batchAccount.synchronizeAutoStorageKeys(groupName, batchAccount); + assert.equal(result._response.status, 204); + }); + + it("should update account successfully", async () => { + var tags = { tags: { Name: "tagName", Value: "tagValue" } }; + const result = await client.batchAccount.update(groupName, batchAccount, tags); + assert.exists(result); + assert.equal(result.tags.Name, "tagName"); + assert.equal(result.tags.Value, "tagValue"); + }); + + it("should add certificate successfully", async () => { + var certificate = "SHA1-cff2ab63c8c955aaf71989efa641b906558d9fb7"; + var parameters: CertificateCreateOrUpdateParameters = { + thumbprint: "cff2ab63c8c955aaf71989efa641b906558d9fb7", + thumbprintAlgorithm: "sha1", + data: + "MIIGMQIBAzCCBe0GCSqGSIb3DQEHAaCCBd4EggXaMIIF1jCCA8AGCSqGSIb3DQEHAaCCA7EEggOtMIIDqTCCA6UGCyqGSIb3DQEMCgECoIICtjCCArIwHAYKKoZIhvcNAQwBAzAOBAhyd3xCtln3iQICB9AEggKQhe5P10V9iV1BsDlwWT561Yu2hVq3JT8ae/ebx1ZR/gMApVereDKkS9Zg4vFyssusHebbK5pDpU8vfAqle0TM4m7wGsRj453ZorSPUfMpHvQnAOn+2pEpWdMThU7xvZ6DVpwhDOQk9166z+KnKdHGuJKh4haMT7Rw/6xZ1rsBt2423cwTrQVMQyACrEkianpuujubKltN99qRoFAxhQcnYE2KlYKw7lRcExq6mDSYAyk5xJZ1ZFdLj6MAryZroQit/0g5eyhoNEKwWbi8px5j71pRTf7yjN+deMGQKwbGl+3OgaL1UZ5fCjypbVL60kpIBxLZwIJ7p3jJ+q9pbq9zSdzshPYor5lxyUfXqaso/0/91ayNoBzg4hQGh618PhFI6RMGjwkzhB9xk74iweJ9HQyIHf8yx2RCSI22JuCMitPMWSGvOszhbNx3AEDLuiiAOHg391mprEtKZguOIr9LrJwem/YmcHbwyz5YAbZmiseKPkllfC7dafFfCFEkj6R2oegIsZo0pEKYisAXBqT0g+6/jGwuhlZcBo0f7UIZm88iA3MrJCjlXEgV5OcQdoWj+hq0lKEdnhtCKr03AIfukN6+4vjjarZeW1bs0swq0l3XFf5RHa11otshMS4mpewshB9iO9MuKWpRxuxeng4PlKZ/zuBqmPeUrjJ9454oK35Pq+dghfemt7AUpBH/KycDNIZgfdEWUZrRKBGnc519C+RTqxyt5hWL18nJk4LvSd3QKlJ1iyJxClhhb/NWEzPqNdyA5cxen+2T9bd/EqJ2KzRv5/BPVwTQkHH9W/TZElFyvFfOFIW2+03RKbVGw72Mr/0xKZ+awAnEfoU+SL/2Gj2m6PHkqFX2sOCi/tN9EA4xgdswEwYJKoZIhvcNAQkVMQYEBAEAAAAwXQYJKwYBBAGCNxEBMVAeTgBNAGkAYwByAG8AcwBvAGYAdAAgAFMAdAByAG8AbgBnACAAQwByAHkAcAB0AG8AZwByAGEAcABoAGkAYwAgAFAAcgBvAHYAaQBkAGUAcjBlBgkqhkiG9w0BCRQxWB5WAFAAdgBrAFQAbQBwADoANABjAGUANgAwADQAZABhAC0AMAA2ADgAMQAtADQANAAxADUALQBhADIAYwBhAC0ANQA3ADcAMwAwADgAZQA2AGQAOQBhAGMwggIOBgkqhkiG9w0BBwGgggH/BIIB+zCCAfcwggHzBgsqhkiG9w0BDAoBA6CCAcswggHHBgoqhkiG9w0BCRYBoIIBtwSCAbMwggGvMIIBXaADAgECAhAdka3aTQsIsUphgIXGUmeRMAkGBSsOAwIdBQAwFjEUMBIGA1UEAxMLUm9vdCBBZ2VuY3kwHhcNMTYwMTAxMDcwMDAwWhcNMTgwMTAxMDcwMDAwWjASMRAwDgYDVQQDEwdub2Rlc2RrMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC5fhcxbJHxxBEIDzVOMc56s04U6k4GPY7yMR1m+rBGVRiAyV4RjY6U936dqXHCVD36ps2Q0Z+OeEgyCInkIyVeB1EwXcToOcyeS2YcUb0vRWZDouC3tuFdHwiK1Ed5iW/LksmXDotyV7kpqzaPhOFiMtBuMEwNJcPge9k17hRgRQIDAQABo0swSTBHBgNVHQEEQDA+gBAS5AktBh0dTwCNYSHcFmRjoRgwFjEUMBIGA1UEAxMLUm9vdCBBZ2VuY3mCEAY3bACqAGSKEc+41KpcNfQwCQYFKw4DAh0FAANBAHl2M97QbpzdnwO5HoRBsiEExOcLTNg+GKCr7HUsbzfvrUivw+JLL7qjHAIc5phnK+F5bQ8HKe0L9YXBSKl+fvwxFTATBgkqhkiG9w0BCRUxBgQEAQAAADA7MB8wBwYFKw4DAhoEFGVtyGMqiBd32fGpzlGZQoRM6UQwBBTI0YHFFqTS4Go8CoLgswn29EiuUQICB9A=", + format: "Pfx", + password: "nodesdk" + }; + const result = await client.certificate.create( + groupName, + batchAccount, + certificate, + parameters + ); + assert.exists(result); + assert.equal(result.name, "sha1-cff2ab63c8c955aaf71989efa641b906558d9fb7"); + }); + + it("should list certificates successfully", async () => { + const result = await client.certificate.listByBatchAccount(groupName, batchAccount); + assert.exists(result); + assert.equal(result.length, 1); + }); + + it("should get certificate successfully", async () => { + var certificate = "SHA1-cff2ab63c8c955aaf71989efa641b906558d9fb7"; + const result = await client.certificate.get(groupName, batchAccount, certificate); + assert.exists(result); + assert.equal(result.name, "sha1-cff2ab63c8c955aaf71989efa641b906558d9fb7"); + assert.equal(result.thumbprintAlgorithm, "sha1"); + assert.equal(result.thumbprint, "cff2ab63c8c955aaf71989efa641b906558d9fb7"); + }); + + it("should update certificate successfully", async () => { + var certificate = "SHA1-cff2ab63c8c955aaf71989efa641b906558d9fb7"; + var parameters: CertificateCreateOrUpdateParameters = { + password: "nodesdk", + data: + "MIIGMQIBAzCCBe0GCSqGSIb3DQEHAaCCBd4EggXaMIIF1jCCA8AGCSqGSIb3DQEHAaCCA7EEggOtMIIDqTCCA6UGCyqGSIb3DQEMCgECoIICtjCCArIwHAYKKoZIhvcNAQwBAzAOBAhyd3xCtln3iQICB9AEggKQhe5P10V9iV1BsDlwWT561Yu2hVq3JT8ae/ebx1ZR/gMApVereDKkS9Zg4vFyssusHebbK5pDpU8vfAqle0TM4m7wGsRj453ZorSPUfMpHvQnAOn+2pEpWdMThU7xvZ6DVpwhDOQk9166z+KnKdHGuJKh4haMT7Rw/6xZ1rsBt2423cwTrQVMQyACrEkianpuujubKltN99qRoFAxhQcnYE2KlYKw7lRcExq6mDSYAyk5xJZ1ZFdLj6MAryZroQit/0g5eyhoNEKwWbi8px5j71pRTf7yjN+deMGQKwbGl+3OgaL1UZ5fCjypbVL60kpIBxLZwIJ7p3jJ+q9pbq9zSdzshPYor5lxyUfXqaso/0/91ayNoBzg4hQGh618PhFI6RMGjwkzhB9xk74iweJ9HQyIHf8yx2RCSI22JuCMitPMWSGvOszhbNx3AEDLuiiAOHg391mprEtKZguOIr9LrJwem/YmcHbwyz5YAbZmiseKPkllfC7dafFfCFEkj6R2oegIsZo0pEKYisAXBqT0g+6/jGwuhlZcBo0f7UIZm88iA3MrJCjlXEgV5OcQdoWj+hq0lKEdnhtCKr03AIfukN6+4vjjarZeW1bs0swq0l3XFf5RHa11otshMS4mpewshB9iO9MuKWpRxuxeng4PlKZ/zuBqmPeUrjJ9454oK35Pq+dghfemt7AUpBH/KycDNIZgfdEWUZrRKBGnc519C+RTqxyt5hWL18nJk4LvSd3QKlJ1iyJxClhhb/NWEzPqNdyA5cxen+2T9bd/EqJ2KzRv5/BPVwTQkHH9W/TZElFyvFfOFIW2+03RKbVGw72Mr/0xKZ+awAnEfoU+SL/2Gj2m6PHkqFX2sOCi/tN9EA4xgdswEwYJKoZIhvcNAQkVMQYEBAEAAAAwXQYJKwYBBAGCNxEBMVAeTgBNAGkAYwByAG8AcwBvAGYAdAAgAFMAdAByAG8AbgBnACAAQwByAHkAcAB0AG8AZwByAGEAcABoAGkAYwAgAFAAcgBvAHYAaQBkAGUAcjBlBgkqhkiG9w0BCRQxWB5WAFAAdgBrAFQAbQBwADoANABjAGUANgAwADQAZABhAC0AMAA2ADgAMQAtADQANAAxADUALQBhADIAYwBhAC0ANQA3ADcAMwAwADgAZQA2AGQAOQBhAGMwggIOBgkqhkiG9w0BBwGgggH/BIIB+zCCAfcwggHzBgsqhkiG9w0BDAoBA6CCAcswggHHBgoqhkiG9w0BCRYBoIIBtwSCAbMwggGvMIIBXaADAgECAhAdka3aTQsIsUphgIXGUmeRMAkGBSsOAwIdBQAwFjEUMBIGA1UEAxMLUm9vdCBBZ2VuY3kwHhcNMTYwMTAxMDcwMDAwWhcNMTgwMTAxMDcwMDAwWjASMRAwDgYDVQQDEwdub2Rlc2RrMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC5fhcxbJHxxBEIDzVOMc56s04U6k4GPY7yMR1m+rBGVRiAyV4RjY6U936dqXHCVD36ps2Q0Z+OeEgyCInkIyVeB1EwXcToOcyeS2YcUb0vRWZDouC3tuFdHwiK1Ed5iW/LksmXDotyV7kpqzaPhOFiMtBuMEwNJcPge9k17hRgRQIDAQABo0swSTBHBgNVHQEEQDA+gBAS5AktBh0dTwCNYSHcFmRjoRgwFjEUMBIGA1UEAxMLUm9vdCBBZ2VuY3mCEAY3bACqAGSKEc+41KpcNfQwCQYFKw4DAh0FAANBAHl2M97QbpzdnwO5HoRBsiEExOcLTNg+GKCr7HUsbzfvrUivw+JLL7qjHAIc5phnK+F5bQ8HKe0L9YXBSKl+fvwxFTATBgkqhkiG9w0BCRUxBgQEAQAAADA7MB8wBwYFKw4DAhoEFGVtyGMqiBd32fGpzlGZQoRM6UQwBBTI0YHFFqTS4Go8CoLgswn29EiuUQICB9A=" + }; + const result = await client.certificate.update( + groupName, + batchAccount, + certificate, + parameters + ); + assert.exists(result); + assert.equal(result.name, "sha1-cff2ab63c8c955aaf71989efa641b906558d9fb7"); + }); + + it("shoud delete certificate successfully", async () => { + var certificate = "SHA1-cff2ab63c8c955aaf71989efa641b906558d9fb7"; + const result = await client.certificate.deleteMethod(groupName, batchAccount, certificate); + }); + + it("should create a paas pool successfully", async () => { + var paas_pool = "test_paas_pool"; + var parameters = { + displayName: "test_pool", + vmSize: "small", + deploymentConfiguration: { + cloudServiceConfiguration: { + osFamily: "5" + } + }, + startTask: { + commandLine: 'cmd.exe /c "echo hello world"', + resourceFiles: [{ httpUrl: "https://blobsource.com", filePath: "filename.txt" }], + environmentSettings: [{ name: "ENV_VAR", value: "foo" }], + userIdentity: { + autoUser: { + elevationLevel: "admin" + } + } + }, + userAccounts: [{ name: "UserName", password: "p@55wOrd" }], + scaleSettings: { + fixedScale: { + targetDedicatedNodes: 0, + targetLowPriorityNodes: 0 + } + } + }; + const result = await client.pool.create(groupName, batchAccount, paas_pool, parameters); + assert.exists(result); + assert.equal(result.name, paas_pool); + }); + + it("should create a iaas pool successfully", async () => { + var iaas_pool = "test_iaas_pool"; + var parameters = { + displayName: "test_pool", + vmSize: "Standard_A1", + deploymentConfiguration: { + virtualMachineConfiguration: { + imageReference: { + publisher: "MicrosoftWindowsServer", + offer: "WindowsServer", + sku: "2016-Datacenter-smalldisk" + }, + nodeAgentSkuId: "batch.node.windows amd64", + windowsConfiguration: { enableAutomaticUpdates: true } + } + }, + scaleSettings: { + fixedScale: { + targetDedicatedNodes: 0, + targetLowPriorityNodes: 0 + } + } + }; + const result = await client.pool.create(groupName, batchAccount, iaas_pool, parameters); + assert.exists(result); + assert.equal(result.name, iaas_pool); + }); + + it("should list pools successfully", async () => { + const result = await client.pool.listByBatchAccount(groupName, batchAccount); + assert.exists(result); + assert.equal(result.length, 2); + }); + + it("should update pool successfully", async () => { + var iaas_pool = "test_iaas_pool"; + var parameters = { + autoScale: { + formula: "$TargetDedicatedNodes=1" + } + }; + const result = await client.pool.update(groupName, batchAccount, iaas_pool, parameters); + assert.exists(result); + assert.equal(result.name, iaas_pool); + }); + + it("should get pool successfully", async () => { + var iaas_pool = "test_iaas_pool"; + const result = await client.pool.get(groupName, batchAccount, iaas_pool); + assert.exists(result); + assert.equal(result.name, iaas_pool); + assert.equal(result.vmSize, "STANDARD_A1"); + }); + + it("should delete pool successfully", async () => { + var iaas_pool = "test_iaas_pool"; + await client.pool.deleteMethod(groupName, batchAccount, iaas_pool); + var paas_pool = "test_paas_pool"; + await client.pool.deleteMethod(groupName, batchAccount, paas_pool); + }); + + it("should delete a batch account successfully", async () => { + const result = await client.batchAccount.deleteMethod(groupName, batchAccount); + }); + + it("should fail to create a BYOS account with bad KeyVault properties", async () => { + var byosAccountName = "batchtestnodesdkbyos"; + var allocationMode = "UserSubscription"; + + // Omit keyVaultReference + var params = { + location: location, + poolAllocationMode: allocationMode + }; + + try { + await client.batchAccount.create(groupName, byosAccountName, params); + assert.fail("No error thrown"); + } catch (err) { + if (err instanceof RestError) { + assert.equal(err.response.status, 400); + assert.equal(err.body.code, "InvalidRequestBody"); + } else { + assert.fail(`Caught error but wasn't a RestError: ${err}`); + } + } + + // Use malformed key vault parameter values + var params1 = { + location: location, + poolAllocationMode: allocationMode, + keyVaultReference: { + id: "abc", + url: "def" + } + }; + + try { + await client.batchAccount.create(groupName, byosAccountName, params1); + assert.fail("No error thrown"); + } catch (err) { + console.log(err); + if (err instanceof RestError) { + assert.equal(err.response.status, 400); + assert.equal(err.body.code, "LinkedInvalidPropertyId"); + } else { + assert.fail(`Caught error but wasn't a RestError: ${err}`); + } + } + }); + }); +}); diff --git a/sdk/batch/arm-batch/test/sample.env b/sdk/batch/arm-batch/test/sample.env new file mode 100644 index 000000000000..d5472d5d1ed2 --- /dev/null +++ b/sdk/batch/arm-batch/test/sample.env @@ -0,0 +1,15 @@ +# First create a Service Principal for the subscription you wish to test against. +# Follow the instructions here on creating a Service Principal using the Azure CLI: +# https://github.com/Azure/azure-sdk-for-node/blob/master/Documentation/Authentication.md +AZURE_SUBSCRIPTION_ID= +AZURE_CLIENT_ID= +AZURE_CLIENT_SECRET= +AZURE_TENANT_ID= +# The tests are configured by default to run with in japaneast, using a resource group of +# 'default-azurebatch-japaneast'. To change this location set: +AZURE_TEST_LOCATION="japaneast" +# The tests require a storage account to be configured. Using the CLI: +# >> az storage account create -n -l -g --sku Standard_LRS +# The tests have been configured against nodesdkteststorage. If you have set up +# a different name, then set this var: +AZURE_AUTOSTORAGE="nodesdkteststorage" \ No newline at end of file diff --git a/sdk/batch/arm-batch/tsconfig.json b/sdk/batch/arm-batch/tsconfig.json index 87bbf5b5fa49..422b584abd5e 100644 --- a/sdk/batch/arm-batch/tsconfig.json +++ b/sdk/batch/arm-batch/tsconfig.json @@ -9,7 +9,7 @@ "esModuleInterop": true, "allowSyntheticDefaultImports": true, "forceConsistentCasingInFileNames": true, - "lib": ["es6"], + "lib": ["es6", "dom"], "declaration": true, "outDir": "./esm", "importHelpers": true diff --git a/sdk/batch/batch/LICENSE.txt b/sdk/batch/batch/LICENSE.txt index b73b4a1293c3..ea8fb1516028 100644 --- a/sdk/batch/batch/LICENSE.txt +++ b/sdk/batch/batch/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2019 Microsoft +Copyright (c) 2020 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/batch/batch/README.md b/sdk/batch/batch/README.md index 34d2c09f30b6..2c54839b6c94 100644 --- a/sdk/batch/batch/README.md +++ b/sdk/batch/batch/README.md @@ -29,6 +29,7 @@ npm install @azure/ms-rest-nodeauth **Please make sure to install Azure CLI and login using `az login`.** ```typescript +import { BatchServiceClient } from "@azure/batch"; import { AzureCliCredentials } from "@azure/ms-rest-nodeauth"; const batchEndpoint = process.env["AZURE_BATCH_ENDPOINT"] || ""; @@ -64,13 +65,14 @@ async function main(): Promise { 3. Use the `MSIVmTokenCredentials` exported from `@azure/ms-rest-nodeauth`. ```typescript -import { MSIVmTokenCredentials } from "@azure/ms-rest-nodeauth"; +import { BatchServiceClient } from "@azure/batch"; +import { loginWithVmMSI } from "@azure/ms-rest-nodeauth"; const batchEndpoint = process.env["AZURE_BATCH_ENDPOINT"] || ""; async function main(): Promise { try { - const creds = await msRestNodeAuth.loginWithVmMSI({ + const creds = await loginWithVmMSI({ resource: "https://batch.core.windows.net/" }); const client = new BatchServiceClient(creds, batchEndpoint); diff --git a/sdk/batch/batch/package.json b/sdk/batch/batch/package.json index 2f86413f6100..3f310a104523 100644 --- a/sdk/batch/batch/package.json +++ b/sdk/batch/batch/package.json @@ -2,13 +2,14 @@ "name": "@azure/batch", "author": "Microsoft Corporation", "description": "BatchServiceClient Library with typescript type definitions for node.js and browser.", - "version": "7.0.0", + "version": "8.0.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.3.4", - "@azure/ms-rest-js": "^1.8.7", + "@azure/ms-rest-azure-js": "^2.0.1", + "@azure/ms-rest-js": "^2.0.4", + "@types/uuid": "^8.0.0", "buffer": "^5.2.1", "jssha": "^2.3.1", - "tslib": "^1.9.3", + "tslib": "^1.10.0", "url-parse": "^1.4.7" }, "keywords": [ @@ -23,24 +24,36 @@ "module": "./esm/batchIndex.js", "types": "./esm/batchIndex.d.ts", "devDependencies": { + "@azure/ms-rest-nodeauth": "^3.0.3", + "@types/chai": "^4.2.11", "@types/jssha": "^2.0.0", + "@types/mocha": "^7.0.2", "@types/url-parse": "^1.4.3", - "typescript": "^3.1.1", - "rollup": "^0.66.2", - "rollup-plugin-commonjs": "^9.2.0", - "rollup-plugin-inject": "^2.2.0", - "rollup-plugin-json": "^3.1.0", - "rollup-plugin-node-resolve": "^3.4.0", + "adal-node": "^0.2.1", + "chai": "^4.2.0", + "dotenv": "^8.2.0", + "mocha": "^7.2.0", + "moment": "^2.24.0", + "rollup": "^1.18.0", + "rollup-plugin-commonjs": "^10.1.0", + "rollup-plugin-inject": "^3.0.2", + "rollup-plugin-json": "^4.0.0", + "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", - "uglify-js": "^3.4.9" + "ts-mocha": "^7.0.0", + "typescript": "^3.9.5", + "uglify-js": "^3.4.9", + "uuid": "^7.0.3", + "esm": "^3.2.25", + "ts-node": "^8.3.0" }, "homepage": "https://github.com/azure/azure-sdk-for-js/tree/master/sdk/batch/batch", "repository": { "type": "git", - "url": "https://github.com/azure/azure-sdk-for-js.git" + "url": "https://github.com/Azure/azure-sdk-for-js.git" }, "bugs": { - "url": "https://github.com/azure/azure-sdk-for-js/issues" + "url": "https://github.com/Azure/azure-sdk-for-js/issues" }, "files": [ "dist/**/*.js", @@ -58,8 +71,10 @@ ], "scripts": { "build": "tsc && rollup -c rollup.config.js && npm run minify", + "clean": "find src -type f -name \"*.js\" -delete", "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/batch.js.map'\" -o ./dist/batch.min.js ./dist/batch.js", - "prepack": "npm install && npm run build" + "prepack": "npm install && npm run build", + "test": "mocha -r esm --require ts-node/register test/*.spec.ts --timeout 1200000 --full-trace" }, "sideEffects": false, "autoPublish": true diff --git a/sdk/batch/batch/src/batchServiceClientContext.ts b/sdk/batch/batch/src/batchServiceClientContext.ts index c8b3c9197f14..b522242929f9 100644 --- a/sdk/batch/batch/src/batchServiceClientContext.ts +++ b/sdk/batch/batch/src/batchServiceClientContext.ts @@ -12,7 +12,7 @@ import * as msRest from "@azure/ms-rest-js"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/batch"; -const packageVersion = "7.0.0"; +const packageVersion = "8.0.0"; export class BatchServiceClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials; @@ -43,7 +43,7 @@ export class BatchServiceClientContext extends msRestAzure.AzureServiceClient { super(credentials, options); - this.apiVersion = '2018-12-01.8.0'; + this.apiVersion = '2020-09-01.12.0'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = "{batchUrl}"; diff --git a/sdk/batch/batch/src/batchSharedKeyCredentials.ts b/sdk/batch/batch/src/batchSharedKeyCredentials.ts index fab8f5b80bab..07914d918e3c 100644 --- a/sdk/batch/batch/src/batchSharedKeyCredentials.ts +++ b/sdk/batch/batch/src/batchSharedKeyCredentials.ts @@ -8,8 +8,8 @@ import { Constants, WebResource, ServiceClientCredentials, - HttpHeaders, - HttpMethods + HttpHeadersLike, + HttpMethods, } from "@azure/ms-rest-js"; import { HmacSha256Sign } from "./hmacSha256"; import url from "url-parse"; @@ -55,7 +55,7 @@ export class BatchSharedKeyCredentials implements ServiceClientCredentials { */ signRequest(webResource: WebResource): Promise { // Help function to get header value, if header without value, append a newline - function getvalueToAppend(value: HttpHeaders, headerName: string): string { + function getvalueToAppend(value: HttpHeadersLike, headerName: string): string { if (!value || !value.get(headerName)) { return "\n"; } else { @@ -64,17 +64,21 @@ export class BatchSharedKeyCredentials implements ServiceClientCredentials { } // Help function to get content length - function getContentLengthToAppend(value: HttpHeaders, method: HttpMethods, body: any): string { + function getContentLengthToAppend( + value: HttpHeadersLike, + method: HttpMethods, + body: any + ): string { if (!value || !value.get("Content-Length")) { // Get content length from body if available if (body) { return Buffer.byteLength(body) + "\n"; } // For GET verb, do not add content-length - if (method === "GET") { - return "\n"; - } else { + if (method === "POST") { return "0\n"; + } else { + return "\n"; } } else { return value.get("Content-Length") + "\n"; diff --git a/sdk/batch/batch/src/models/accountMappers.ts b/sdk/batch/batch/src/models/accountMappers.ts index 629450373d4d..42c721b464b3 100644 --- a/sdk/batch/batch/src/models/accountMappers.ts +++ b/sdk/batch/batch/src/models/accountMappers.ts @@ -7,14 +7,14 @@ */ export { - AccountListNodeAgentSkusHeaders, - AccountListNodeAgentSkusResult, AccountListPoolNodeCountsHeaders, + AccountListSupportedImagesHeaders, + AccountListSupportedImagesResult, BatchError, BatchErrorDetail, ErrorMessage, + ImageInformation, ImageReference, - NodeAgentSku, NodeCounts, PoolNodeCounts, PoolNodeCountsListResult diff --git a/sdk/batch/batch/src/models/index.ts b/sdk/batch/batch/src/models/index.ts index 83858b5a3c1a..1e1e9bfbc33f 100644 --- a/sdk/batch/batch/src/models/index.ts +++ b/sdk/batch/batch/src/models/index.ts @@ -13,11 +13,11 @@ export { BaseResource, CloudError }; /** * An interface representing PoolUsageMetrics. - * @summary Usage metrics for a pool across an aggregation interval. + * @summary Usage metrics for a Pool across an aggregation interval. */ export interface PoolUsageMetrics { /** - * The ID of the pool whose metrics are aggregated in this entry. + * The ID of the Pool whose metrics are aggregated in this entry. */ poolId: string; /** @@ -29,96 +29,114 @@ export interface PoolUsageMetrics { */ endTime: Date; /** - * The size of virtual machines in the pool. All VMs in a pool are the same size. For information - * about available sizes of virtual machines in pools, see Choose a VM size for compute nodes in - * an Azure Batch pool (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). + * The size of virtual machines in the Pool. All VMs in a Pool are the same size. For information + * about available sizes of virtual machines in Pools, see Choose a VM size for Compute Nodes in + * an Azure Batch Pool (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). */ vmSize: string; /** - * The total core hours used in the pool during this aggregation interval. + * The total core hours used in the Pool during this aggregation interval. */ totalCoreHours: number; } /** * An interface representing ImageReference. - * @summary A reference to an Azure Virtual Machines Marketplace image or a custom Azure Virtual - * Machine image. To get the list of all Azure Marketplace image references verified by Azure - * Batch, see the 'List node agent SKUs' operation. + * @summary A reference to an Azure Virtual Machines Marketplace Image or a Shared Image Gallery + * Image. To get the list of all Azure Marketplace Image references verified by Azure Batch, see + * the 'List Supported Images' operation. */ export interface ImageReference { /** - * The publisher of the Azure Virtual Machines Marketplace image. For example, Canonical or + * The publisher of the Azure Virtual Machines Marketplace Image. For example, Canonical or * MicrosoftWindowsServer. */ publisher?: string; /** - * The offer type of the Azure Virtual Machines Marketplace image. For example, UbuntuServer or + * The offer type of the Azure Virtual Machines Marketplace Image. For example, UbuntuServer or * WindowsServer. */ offer?: string; /** - * The SKU of the Azure Virtual Machines Marketplace image. For example, 14.04.0-LTS or - * 2012-R2-Datacenter. + * The SKU of the Azure Virtual Machines Marketplace Image. For example, 18.04-LTS or + * 2019-Datacenter. */ sku?: string; /** - * The version of the Azure Virtual Machines Marketplace image. A value of 'latest' can be - * specified to select the latest version of an image. If omitted, the default is 'latest'. + * The version of the Azure Virtual Machines Marketplace Image. A value of 'latest' can be + * specified to select the latest version of an Image. If omitted, the default is 'latest'. */ version?: string; /** - * The ARM resource identifier of the virtual machine image. Computes nodes of the pool will be - * created using this custom image. This is of the form - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}. - * This property is mutually exclusive with other ImageReference properties. The virtual machine - * image must be in the same region and subscription as the Azure Batch account. For more - * details, see https://docs.microsoft.com/azure/batch/batch-custom-images. + * The ARM resource identifier of the Shared Image Gallery Image. Compute Nodes in the Pool will + * be created using this Image Id. This is of the form + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageDefinitionName}/versions/{VersionId} + * or + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageDefinitionName} + * for always defaulting to the latest image version. This property is mutually exclusive with + * other ImageReference properties. The Shared Image Gallery Image must have replicas in the same + * region and must be in the same subscription as the Azure Batch account. If the image version + * is not specified in the imageId, the latest version will be used. For information about the + * firewall settings for the Batch Compute Node agent to communicate with the Batch service see + * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. */ virtualMachineImageId?: string; } /** - * The Batch node agent is a program that runs on each node in the pool, and provides the - * command-and-control interface between the node and the Batch service. There are different - * implementations of the node agent, known as SKUs, for different operating systems. - * @summary A node agent SKU supported by the Batch service. + * An interface representing ImageInformation. + * @summary A reference to the Azure Virtual Machines Marketplace Image and additional information + * about the Image. */ -export interface NodeAgentSku { +export interface ImageInformation { /** - * The ID of the node agent SKU. + * The ID of the Compute Node agent SKU which the Image supports. */ - id?: string; + nodeAgentSKUId: string; + /** + * The reference to the Azure Virtual Machine's Marketplace Image. + */ + imageReference: ImageReference; /** - * The list of Azure Marketplace images verified to be compatible with this node agent SKU. This - * collection is not exhaustive (the node agent may be compatible with other images). + * The type of operating system (e.g. Windows or Linux) of the Image. Possible values include: + * 'linux', 'windows' */ - verifiedImageReferences?: ImageReference[]; + osType: OSType; /** - * The type of operating system (e.g. Windows or Linux) compatible with the node agent SKU. - * Possible values include: 'linux', 'windows' + * The capabilities or features which the Image supports. Not every capability of the Image is + * listed. Capabilities in this list are considered of special interest and are generally related + * to integration with other features in the Azure Batch service. */ - osType?: OSType; + capabilities?: string[]; + /** + * The time when the Azure Batch service will stop accepting create Pool requests for the Image. + */ + batchSupportEndOfLife?: Date; + /** + * Whether the Azure Batch service actively verifies that the Image is compatible with the + * associated Compute Node agent SKU. Possible values include: 'verified', 'unverified' + */ + verificationType: VerificationType; } /** * An interface representing AuthenticationTokenSettings. - * @summary The settings for an authentication token that the task can use to perform Batch service + * @summary The settings for an authentication token that the Task can use to perform Batch service * operations. */ export interface AuthenticationTokenSettings { /** * The Batch resources to which the token grants access. The authentication token grants access * to a limited set of Batch service operations. Currently the only supported value for the - * access property is 'job', which grants access to all operations related to the job which - * contains the task. + * access property is 'job', which grants access to all operations related to the Job which + * contains the Task. */ access?: AccessScope[]; } /** * An interface representing UsageStatistics. - * @summary Statistics related to pool usage information. + * @summary Statistics related to Pool usage information. */ export interface UsageStatistics { /** @@ -131,14 +149,14 @@ export interface UsageStatistics { */ lastUpdateTime: Date; /** - * The aggregated wall-clock time of the dedicated compute node cores being part of the pool. + * The aggregated wall-clock time of the dedicated Compute Node cores being part of the Pool. */ dedicatedCoreTime: string; } /** * An interface representing ResourceStatistics. - * @summary Statistics related to resource consumption by compute nodes in a pool. + * @summary Statistics related to resource consumption by Compute Nodes in a Pool. */ export interface ResourceStatistics { /** @@ -151,54 +169,54 @@ export interface ResourceStatistics { */ lastUpdateTime: Date; /** - * The average CPU usage across all nodes in the pool (percentage per node). + * The average CPU usage across all Compute Nodes in the Pool (percentage per node). */ avgCPUPercentage: number; /** - * The average memory usage in GiB across all nodes in the pool. + * The average memory usage in GiB across all Compute Nodes in the Pool. */ avgMemoryGiB: number; /** - * The peak memory usage in GiB across all nodes in the pool. + * The peak memory usage in GiB across all Compute Nodes in the Pool. */ peakMemoryGiB: number; /** - * The average used disk space in GiB across all nodes in the pool. + * The average used disk space in GiB across all Compute Nodes in the Pool. */ avgDiskGiB: number; /** - * The peak used disk space in GiB across all nodes in the pool. + * The peak used disk space in GiB across all Compute Nodes in the Pool. */ peakDiskGiB: number; /** - * The total number of disk read operations across all nodes in the pool. + * The total number of disk read operations across all Compute Nodes in the Pool. */ diskReadIOps: number; /** - * The total number of disk write operations across all nodes in the pool. + * The total number of disk write operations across all Compute Nodes in the Pool. */ diskWriteIOps: number; /** - * The total amount of data in GiB of disk reads across all nodes in the pool. + * The total amount of data in GiB of disk reads across all Compute Nodes in the Pool. */ diskReadGiB: number; /** - * The total amount of data in GiB of disk writes across all nodes in the pool. + * The total amount of data in GiB of disk writes across all Compute Nodes in the Pool. */ diskWriteGiB: number; /** - * The total amount of data in GiB of network reads across all nodes in the pool. + * The total amount of data in GiB of network reads across all Compute Nodes in the Pool. */ networkReadGiB: number; /** - * The total amount of data in GiB of network writes across all nodes in the pool. + * The total amount of data in GiB of network writes across all Compute Nodes in the Pool. */ networkWriteGiB: number; } /** * An interface representing PoolStatistics. - * @summary Contains utilization and resource usage statistics for the lifetime of a pool. + * @summary Contains utilization and resource usage statistics for the lifetime of a Pool. */ export interface PoolStatistics { /** @@ -215,18 +233,18 @@ export interface PoolStatistics { */ lastUpdateTime: Date; /** - * Statistics related to pool usage, such as the amount of core-time used. + * Statistics related to Pool usage, such as the amount of core-time used. */ usageStats?: UsageStatistics; /** - * Statistics related to resource consumption by compute nodes in the pool. + * Statistics related to resource consumption by Compute Nodes in the Pool. */ resourceStats?: ResourceStatistics; } /** * An interface representing JobStatistics. - * @summary Resource usage statistics for a job. + * @summary Resource usage statistics for a Job. */ export interface JobStatistics { /** @@ -243,57 +261,57 @@ export interface JobStatistics { */ lastUpdateTime: Date; /** - * The total user mode CPU time (summed across all cores and all compute nodes) consumed by all - * tasks in the job. + * The total user mode CPU time (summed across all cores and all Compute Nodes) consumed by all + * Tasks in the Job. */ userCPUTime: string; /** - * The total kernel mode CPU time (summed across all cores and all compute nodes) consumed by all - * tasks in the job. + * The total kernel mode CPU time (summed across all cores and all Compute Nodes) consumed by all + * Tasks in the Job. */ kernelCPUTime: string; /** - * The total wall clock time of all tasks in the job. The wall clock time is the elapsed time - * from when the task started running on a compute node to when it finished (or to the last time - * the statistics were updated, if the task had not finished by then). If a task was retried, - * this includes the wall clock time of all the task retries. + * The total wall clock time of all Tasks in the Job. The wall clock time is the elapsed time + * from when the Task started running on a Compute Node to when it finished (or to the last time + * the statistics were updated, if the Task had not finished by then). If a Task was retried, + * this includes the wall clock time of all the Task retries. */ wallClockTime: string; /** - * The total number of disk read operations made by all tasks in the job. + * The total number of disk read operations made by all Tasks in the Job. */ readIOps: number; /** - * The total number of disk write operations made by all tasks in the job. + * The total number of disk write operations made by all Tasks in the Job. */ writeIOps: number; /** - * The total amount of data in GiB read from disk by all tasks in the job. + * The total amount of data in GiB read from disk by all Tasks in the Job. */ readIOGiB: number; /** - * The total amount of data in GiB written to disk by all tasks in the job. + * The total amount of data in GiB written to disk by all Tasks in the Job. */ writeIOGiB: number; /** - * The total number of tasks successfully completed in the job during the given time range. A - * task completes successfully if it returns exit code 0. + * The total number of Tasks successfully completed in the Job during the given time range. A + * Task completes successfully if it returns exit code 0. */ numSucceededTasks: number; /** - * The total number of tasks in the job that failed during the given time range. A task fails if + * The total number of Tasks in the Job that failed during the given time range. A Task fails if * it exhausts its maximum retry count without returning exit code 0. */ numFailedTasks: number; /** - * The total number of retries on all the tasks in the job during the given time range. + * The total number of retries on all the Tasks in the Job during the given time range. */ numTaskRetries: number; /** - * The total wait time of all tasks in the job. The wait time for a task is defined as the - * elapsed time between the creation of the task and the start of task execution. (If the task is - * retried due to failures, the wait time is the time to the most recent task execution.) This - * value is only reported in the account lifetime statistics; it is not included in the job + * The total wait time of all Tasks in the Job. The wait time for a Task is defined as the + * elapsed time between the creation of the Task and the start of Task execution. (If the Task is + * retried due to failures, the wait time is the time to the most recent Task execution.) This + * value is only reported in the Account lifetime statistics; it is not included in the Job * statistics. */ waitTime: string; @@ -316,35 +334,35 @@ export interface NameValuePair { /** * An interface representing DeleteCertificateError. - * @summary An error encountered by the Batch service when deleting a certificate. + * @summary An error encountered by the Batch service when deleting a Certificate. */ export interface DeleteCertificateError { /** - * An identifier for the certificate deletion error. Codes are invariant and are intended to be + * An identifier for the Certificate deletion error. Codes are invariant and are intended to be * consumed programmatically. */ code?: string; /** - * A message describing the certificate deletion error, intended to be suitable for display in a + * A message describing the Certificate deletion error, intended to be suitable for display in a * user interface. */ message?: string; /** - * A list of additional error details related to the certificate deletion error. This list - * includes details such as the active pools and nodes referencing this certificate. However, if - * a large number of resources reference the certificate, the list contains only about the first - * hundred. + * A list of additional error details related to the Certificate deletion error. This list + * includes details such as the active Pools and Compute Nodes referencing this Certificate. + * However, if a large number of resources reference the Certificate, the list contains only + * about the first hundred. */ values?: NameValuePair[]; } /** - * A certificate that can be installed on compute nodes and can be used to authenticate operations + * A Certificate that can be installed on Compute Nodes and can be used to authenticate operations * on the machine. */ export interface Certificate { /** - * The X.509 thumbprint of the certificate. This is a sequence of up to 40 hex digits. + * The X.509 thumbprint of the Certificate. This is a sequence of up to 40 hex digits. */ thumbprint?: string; /** @@ -352,42 +370,42 @@ export interface Certificate { */ thumbprintAlgorithm?: string; /** - * The URL of the certificate. + * The URL of the Certificate. */ url?: string; /** - * The current state of the certificate. Possible values include: 'active', 'deleting', + * The current state of the Certificate. Possible values include: 'active', 'deleting', * 'deleteFailed' */ state?: CertificateState; /** - * The time at which the certificate entered its current state. + * The time at which the Certificate entered its current state. */ stateTransitionTime?: Date; /** - * The previous state of the certificate. This property is not set if the certificate is in its + * The previous state of the Certificate. This property is not set if the Certificate is in its * initial active state. Possible values include: 'active', 'deleting', 'deleteFailed' */ previousState?: CertificateState; /** - * The time at which the certificate entered its previous state. This property is not set if the - * certificate is in its initial Active state. + * The time at which the Certificate entered its previous state. This property is not set if the + * Certificate is in its initial Active state. */ previousStateTransitionTime?: Date; /** - * The public part of the certificate as a base-64 encoded .cer file. + * The public part of the Certificate as a base-64 encoded .cer file. */ publicData?: string; /** - * The error that occurred on the last attempt to delete this certificate. This property is set - * only if the certificate is in the DeleteFailed state. + * The error that occurred on the last attempt to delete this Certificate. This property is set + * only if the Certificate is in the DeleteFailed state. */ deleteCertificateError?: DeleteCertificateError; } /** * An interface representing ApplicationPackageReference. - * @summary A reference to an application package to be deployed to compute nodes. + * @summary A reference to an Package to be deployed to Compute Nodes. */ export interface ApplicationPackageReference { /** @@ -396,9 +414,9 @@ export interface ApplicationPackageReference { applicationId: string; /** * The version of the application to deploy. If omitted, the default version is deployed. If this - * is omitted on a pool, and no default version is specified for this application, the request + * is omitted on a Pool, and no default version is specified for this application, the request * fails with the error code InvalidApplicationPackageReferences and HTTP status code 409. If - * this is omitted on a task, and no default version is specified for this application, the task + * this is omitted on a Task, and no default version is specified for this application, the Task * fails with a pre-processing error. */ version?: string; @@ -406,11 +424,11 @@ export interface ApplicationPackageReference { /** * An interface representing ApplicationSummary. - * @summary Contains information about an application in an Azure Batch account. + * @summary Contains information about an application in an Azure Batch Account. */ export interface ApplicationSummary { /** - * A string that uniquely identifies the application within the account. + * A string that uniquely identifies the application within the Account. */ id: string; /** @@ -425,12 +443,12 @@ export interface ApplicationSummary { /** * An interface representing CertificateAddParameter. - * @summary A certificate that can be installed on compute nodes and can be used to authenticate + * @summary A Certificate that can be installed on Compute Nodes and can be used to authenticate * operations on the machine. */ export interface CertificateAddParameter { /** - * The X.509 thumbprint of the certificate. This is a sequence of up to 40 hex digits (it may + * The X.509 thumbprint of the Certificate. This is a sequence of up to 40 hex digits (it may * include spaces but these are removed). */ thumbprint: string; @@ -439,27 +457,27 @@ export interface CertificateAddParameter { */ thumbprintAlgorithm: string; /** - * The base64-encoded contents of the certificate. The maximum size is 10KB. + * The base64-encoded contents of the Certificate. The maximum size is 10KB. */ data: string; /** - * The format of the certificate data. Possible values include: 'pfx', 'cer' + * The format of the Certificate data. Possible values include: 'pfx', 'cer' */ certificateFormat?: CertificateFormat; /** - * The password to access the certificate's private key. This is required if the certificate - * format is pfx. It should be omitted if the certificate format is cer. + * The password to access the Certificate's private key. This must be omitted if the Certificate + * format is cer. */ password?: string; } /** * An interface representing FileProperties. - * @summary The properties of a file on a compute node. + * @summary The properties of a file on a Compute Node. */ export interface FileProperties { /** - * The file creation time. The creation time is not returned for files on Linux compute nodes. + * The file creation time. The creation time is not returned for files on Linux Compute Nodes. */ creationTime?: Date; /** @@ -476,14 +494,14 @@ export interface FileProperties { contentType?: string; /** * The file mode attribute in octal format. The file mode is returned only for files on Linux - * compute nodes. + * Compute Nodes. */ fileMode?: string; } /** * An interface representing NodeFile. - * @summary Information about a file or directory on a compute node. + * @summary Information about a file or directory on a Compute Node. */ export interface NodeFile { /** @@ -506,27 +524,27 @@ export interface NodeFile { /** * An interface representing Schedule. - * @summary The schedule according to which jobs will be created + * @summary The schedule according to which Jobs will be created */ export interface Schedule { /** - * The earliest time at which any job may be created under this job schedule. If you do not - * specify a doNotRunUntil time, the schedule becomes ready to create jobs immediately. + * The earliest time at which any Job may be created under this Job Schedule. If you do not + * specify a doNotRunUntil time, the schedule becomes ready to create Jobs immediately. */ doNotRunUntil?: Date; /** - * A time after which no job will be created under this job schedule. The schedule will move to - * the completed state as soon as this deadline is past and there is no active job under this job - * schedule. If you do not specify a doNotRunAfter time, and you are creating a recurring job - * schedule, the job schedule will remain active until you explicitly terminate it. + * A time after which no Job will be created under this Job Schedule. The schedule will move to + * the completed state as soon as this deadline is past and there is no active Job under this Job + * Schedule. If you do not specify a doNotRunAfter time, and you are creating a recurring Job + * Schedule, the Job Schedule will remain active until you explicitly terminate it. */ doNotRunAfter?: Date; /** - * The time interval, starting from the time at which the schedule indicates a job should be - * created, within which a job must be created. If a job is not created within the startWindow - * interval, then the 'opportunity' is lost; no job will be created until the next recurrence of + * The time interval, starting from the time at which the schedule indicates a Job should be + * created, within which a Job must be created. If a Job is not created within the startWindow + * interval, then the 'opportunity' is lost; no Job will be created until the next recurrence of * the schedule. If the schedule is recurring, and the startWindow is longer than the recurrence - * interval, then this is equivalent to an infinite startWindow, because the job that is 'due' in + * interval, then this is equivalent to an infinite startWindow, because the Job that is 'due' in * one recurrenceInterval is not carried forward into the next recurrence interval. The default * is infinite. The minimum value is 1 minute. If you specify a lower value, the Batch service * rejects the schedule with an error; if you are calling the REST API directly, the HTTP status @@ -534,17 +552,17 @@ export interface Schedule { */ startWindow?: string; /** - * The time interval between the start times of two successive jobs under the job schedule. A job - * schedule can have at most one active job under it at any given time. Because a job schedule - * can have at most one active job under it at any given time, if it is time to create a new job - * under a job schedule, but the previous job is still running, the Batch service will not create - * the new job until the previous job finishes. If the previous job does not finish within the - * startWindow period of the new recurrenceInterval, then no new job will be scheduled for that - * interval. For recurring jobs, you should normally specify a jobManagerTask in the + * The time interval between the start times of two successive Jobs under the Job Schedule. A Job + * Schedule can have at most one active Job under it at any given time. Because a Job Schedule + * can have at most one active Job under it at any given time, if it is time to create a new Job + * under a Job Schedule, but the previous Job is still running, the Batch service will not create + * the new Job until the previous Job finishes. If the previous Job does not finish within the + * startWindow period of the new recurrenceInterval, then no new Job will be scheduled for that + * interval. For recurring Jobs, you should normally specify a jobManagerTask in the * jobSpecification. If you do not use jobManagerTask, you will need an external process to - * monitor when jobs are created, add tasks to the jobs and terminate the jobs ready for the next - * recurrence. The default is that the schedule does not recur: one job is created, within the - * startWindow after the doNotRunUntil time, and the schedule is complete as soon as that job + * monitor when Jobs are created, add Tasks to the Jobs and terminate the Jobs ready for the next + * recurrence. The default is that the schedule does not recur: one Job is created, within the + * startWindow after the doNotRunUntil time, and the schedule is complete as soon as that Job * finishes. The minimum value is 1 minute. If you specify a lower value, the Batch service * rejects the schedule with an error; if you are calling the REST API directly, the HTTP status * code is 400 (Bad Request). @@ -554,23 +572,23 @@ export interface Schedule { /** * An interface representing JobConstraints. - * @summary The execution constraints for a job. + * @summary The execution constraints for a Job. */ export interface JobConstraints { /** - * The maximum elapsed time that the job may run, measured from the time the job is created. If - * the job does not complete within the time limit, the Batch service terminates it and any tasks + * The maximum elapsed time that the Job may run, measured from the time the Job is created. If + * the Job does not complete within the time limit, the Batch service terminates it and any Tasks * that are still running. In this case, the termination reason will be MaxWallClockTimeExpiry. - * If this property is not specified, there is no time limit on how long the job may run. + * If this property is not specified, there is no time limit on how long the Job may run. */ maxWallClockTime?: string; /** - * The maximum number of times each task may be retried. The Batch service retries a task if its + * The maximum number of times each Task may be retried. The Batch service retries a Task if its * exit code is nonzero. Note that this value specifically controls the number of retries. The - * Batch service will try each task once, and may then retry up to this limit. For example, if - * the maximum retry count is 3, Batch tries a task up to 4 times (one initial try and 3 - * retries). If the maximum retry count is 0, the Batch service does not retry tasks. If the - * maximum retry count is -1, the Batch service retries tasks without limit. The default value is + * Batch service will try each Task once, and may then retry up to this limit. For example, if + * the maximum retry count is 3, Batch tries a Task up to 4 times (one initial try and 3 + * retries). If the maximum retry count is 0, the Batch service does not retry Tasks. If the + * maximum retry count is -1, the Batch service retries Tasks without limit. The default value is * 0 (no retries). */ maxTaskRetryCount?: number; @@ -578,18 +596,28 @@ export interface JobConstraints { /** * An interface representing JobNetworkConfiguration. - * @summary The network configuration for the job. + * @summary The network configuration for the Job. */ export interface JobNetworkConfiguration { /** - * The ARM resource identifier of the virtual network subnet which nodes running tasks from the - * job will join for the duration of the task. This is only supported for jobs running on - * VirtualMachineConfiguration pools. This is of the form + * The ARM resource identifier of the virtual network subnet which Compute Nodes running Tasks + * from the Job will join for the duration of the Task. This will only work with a + * VirtualMachineConfiguration Pool. The virtual network must be in the same region and + * subscription as the Azure Batch Account. The specified subnet should have enough free IP + * addresses to accommodate the number of Compute Nodes which will run Tasks from the Job. This + * can be up to the number of Compute Nodes in the Pool. The 'MicrosoftAzureBatch' service + * principal must have the 'Classic Virtual Machine Contributor' Role-Based Access Control (RBAC) + * role for the specified VNet so that Azure Batch service can schedule Tasks on the Nodes. This + * can be verified by checking if the specified VNet has any associated Network Security Groups + * (NSG). If communication to the Nodes in the specified subnet is denied by an NSG, then the + * Batch service will set the state of the Compute Nodes to unusable. This is of the form * /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. - * The virtual network must be in the same region and subscription as the Azure Batch account. - * The specified subnet should have enough free IP addresses to accommodate the number of nodes - * which will run tasks from the job. For more details, see - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. + * If the specified VNet has any associated Network Security Groups (NSG), then a few reserved + * system ports must be enabled for inbound communication from the Azure Batch service. For Pools + * created with a Virtual Machine configuration, enable ports 29876 and 29877, as well as port 22 + * for Linux and port 3389 for Windows. Port 443 is also required to be open for outbound + * connections for communications to Azure Storage. For more details see: + * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration */ subnetId: string; } @@ -615,7 +643,7 @@ export interface ContainerRegistry { /** * An interface representing TaskContainerSettings. - * @summary The container settings for a task. + * @summary The container settings for a Task. */ export interface TaskContainerSettings { /** @@ -625,25 +653,30 @@ export interface TaskContainerSettings { */ containerRunOptions?: string; /** - * The image to use to create the container in which the task will run. This is the full image - * reference, as would be specified to "docker pull". If no tag is provided as part of the image + * The Image to use to create the container in which the Task will run. This is the full Image + * reference, as would be specified to "docker pull". If no tag is provided as part of the Image * name, the tag ":latest" is used as a default. */ imageName: string; /** - * The private registry which contains the container image. This setting can be omitted if was - * already provided at pool creation. + * The private registry which contains the container Image. This setting can be omitted if was + * already provided at Pool creation. */ registry?: ContainerRegistry; + /** + * The location of the container Task working directory. The default is 'taskWorkingDirectory'. + * Possible values include: 'taskWorkingDirectory', 'containerImageDefault' + */ + workingDirectory?: ContainerWorkingDirectory; } /** * An interface representing ResourceFile. - * @summary A single file or multiple files to be downloaded to a compute node. + * @summary A single file or multiple files to be downloaded to a Compute Node. */ export interface ResourceFile { /** - * The storage container name in the auto storage account. The autoStorageContainerName, + * The storage container name in the auto storage Account. The autoStorageContainerName, * storageContainerUrl and httpUrl properties are mutually exclusive and one of them must be * specified. */ @@ -676,28 +709,28 @@ export interface ResourceFile { */ blobPrefix?: string; /** - * The location on the compute node to which to download the file(s), relative to the task's + * The location on the Compute Node to which to download the file(s), relative to the Task's * working directory. If the httpUrl property is specified, the filePath is required and * describes the path which the file will be downloaded to, including the filename. Otherwise, if * the autoStorageContainerName or storageContainerUrl property is specified, filePath is * optional and is the directory to download the files to. In the case where filePath is used as * a directory, any directory structure already associated with the input data will be retained * in full and appended to the specified filePath directory. The specified relative path cannot - * break out of the task's working directory (for example by using '..'). + * break out of the Task's working directory (for example by using '..'). */ filePath?: string; /** * The file permission mode attribute in octal format. This property applies only to files being - * downloaded to Linux compute nodes. It will be ignored if it is specified for a resourceFile - * which will be downloaded to a Windows node. If this property is not specified for a Linux - * node, then a default value of 0770 is applied to the file. + * downloaded to Linux Compute Nodes. It will be ignored if it is specified for a resourceFile + * which will be downloaded to a Windows Compute Node. If this property is not specified for a + * Linux Compute Node, then a default value of 0770 is applied to the file. */ fileMode?: string; } /** * An interface representing EnvironmentSetting. - * @summary An environment variable to be set on a task process. + * @summary An environment variable to be set on a Task process. */ export interface EnvironmentSetting { /** @@ -716,28 +749,26 @@ export interface EnvironmentSetting { */ export interface ExitOptions { /** - * An action to take on the job containing the task, if the task completes with the given exit - * condition and the job's onTaskFailed property is 'performExitOptionsJobAction'. The default is - * none for exit code 0 and terminate for all other exit conditions. If the job's onTaskFailed - * property is noaction, then specifying this property returns an error and the add task request + * An action to take on the Job containing the Task, if the Task completes with the given exit + * condition and the Job's onTaskFailed property is 'performExitOptionsJobAction'. The default is + * none for exit code 0 and terminate for all other exit conditions. If the Job's onTaskFailed + * property is noaction, then specifying this property returns an error and the add Task request * fails with an invalid property value error; if you are calling the REST API directly, the HTTP * status code is 400 (Bad Request). Possible values include: 'none', 'disable', 'terminate' */ jobAction?: JobAction; /** - * An action that the Batch service performs on tasks that depend on this task. The default is - * 'satisfy' for exit code 0, and 'block' for all other exit conditions. If the job's - * usesTaskDependencies property is set to false, then specifying the dependencyAction property - * returns an error and the add task request fails with an invalid property value error; if you - * are calling the REST API directly, the HTTP status code is 400 (Bad Request). Possible values - * include: 'satisfy', 'block' + * An action that the Batch service performs on Tasks that depend on this Task. Possible values + * are 'satisfy' (allowing dependent tasks to progress) and 'block' (dependent tasks continue to + * wait). Batch does not yet support cancellation of dependent tasks. Possible values include: + * 'satisfy', 'block' */ dependencyAction?: DependencyAction; } /** * An interface representing ExitCodeMapping. - * @summary How the Batch service should respond if a task exits with a particular exit code. + * @summary How the Batch service should respond if a Task exits with a particular exit code. */ export interface ExitCodeMapping { /** @@ -745,7 +776,7 @@ export interface ExitCodeMapping { */ code: number; /** - * How the Batch service should respond if the task exits with this exit code. + * How the Batch service should respond if the Task exits with this exit code. */ exitOptions: ExitOptions; } @@ -765,7 +796,7 @@ export interface ExitCodeRangeMapping { */ end: number; /** - * How the Batch service should respond if the task exits with an exit code in the range start to + * How the Batch service should respond if the Task exits with an exit code in the range start to * end (inclusive). */ exitOptions: ExitOptions; @@ -773,30 +804,30 @@ export interface ExitCodeRangeMapping { /** * An interface representing ExitConditions. - * @summary Specifies how the Batch service should respond when the task completes. + * @summary Specifies how the Batch service should respond when the Task completes. */ export interface ExitConditions { /** - * A list of individual task exit codes and how the Batch service should respond to them. + * A list of individual Task exit codes and how the Batch service should respond to them. */ exitCodes?: ExitCodeMapping[]; /** - * A list of task exit code ranges and how the Batch service should respond to them. + * A list of Task exit code ranges and how the Batch service should respond to them. */ exitCodeRanges?: ExitCodeRangeMapping[]; /** - * How the Batch service should respond if the task fails to start due to an error. + * How the Batch service should respond if the Task fails to start due to an error. */ preProcessingError?: ExitOptions; /** - * How the Batch service should respond if a file upload error occurs. If the task exited with an + * How the Batch service should respond if a file upload error occurs. If the Task exited with an * exit code that was specified via exitCodes or exitCodeRanges, and then encountered a file * upload error, then the action specified by the exit code takes precedence. */ fileUploadError?: ExitOptions; /** - * How the Batch service should respond if the task fails with an exit condition not covered by - * any of the other properties. This value is used if the task exits with any nonzero exit code + * How the Batch service should respond if the Task fails with an exit condition not covered by + * any of the other properties. This value is used if the Task exits with any nonzero exit code * not listed in the exitCodes or exitCodeRanges collection, with a pre-processing error if the * preProcessingError property is not present, or with a file upload error if the fileUploadError * property is not present. If you want non-default behavior on exit code 0, you must list it @@ -807,12 +838,15 @@ export interface ExitConditions { /** * An interface representing AutoUserSpecification. - * @summary Specifies the parameters for the auto user that runs a task on the Batch service. + * @summary Specifies the parameters for the auto user that runs a Task on the Batch service. */ export interface AutoUserSpecification { /** - * The scope for the auto user. The default value is task. Possible values include: 'task', - * 'pool' + * The scope for the auto user. The default value is pool. If the pool is running Windows a value + * of Task should be specified if stricter isolation between tasks is required. For example, if + * the task mutates the registry in a way which could impact other tasks, or if certificates have + * been specified on the pool which should not be accessible by normal tasks but should be + * accessible by StartTasks. Possible values include: 'task', 'pool' */ scope?: AutoUserScope; /** @@ -824,16 +858,16 @@ export interface AutoUserSpecification { /** * Specify either the userName or autoUser property, but not both. - * @summary The definition of the user identity under which the task is run. + * @summary The definition of the user identity under which the Task is run. */ export interface UserIdentity { /** - * The name of the user identity under which the task is run. The userName and autoUser + * The name of the user identity under which the Task is run. The userName and autoUser * properties are mutually exclusive; you must specify one but not both. */ userName?: string; /** - * The auto user under which the task is run. The userName and autoUser properties are mutually + * The auto user under which the Task is run. The userName and autoUser properties are mutually * exclusive; you must specify one but not both. */ autoUser?: AutoUserSpecification; @@ -841,69 +875,69 @@ export interface UserIdentity { /** * An interface representing LinuxUserConfiguration. - * @summary Properties used to create a user account on a Linux node. + * @summary Properties used to create a user Account on a Linux Compute Node. */ export interface LinuxUserConfiguration { /** - * The user ID of the user account. The uid and gid properties must be specified together or not + * The user ID of the user Account. The uid and gid properties must be specified together or not * at all. If not specified the underlying operating system picks the uid. */ uid?: number; /** - * The group ID for the user account. The uid and gid properties must be specified together or + * The group ID for the user Account. The uid and gid properties must be specified together or * not at all. If not specified the underlying operating system picks the gid. */ gid?: number; /** - * The SSH private key for the user account. The private key must not be password protected. The + * The SSH private key for the user Account. The private key must not be password protected. The * private key is used to automatically configure asymmetric-key based authentication for SSH - * between nodes in a Linux pool when the pool's enableInterNodeCommunication property is true - * (it is ignored if enableInterNodeCommunication is false). It does this by placing the key pair - * into the user's .ssh directory. If not specified, password-less SSH is not configured between - * nodes (no modification of the user's .ssh directory is done). + * between Compute Nodes in a Linux Pool when the Pool's enableInterNodeCommunication property is + * true (it is ignored if enableInterNodeCommunication is false). It does this by placing the key + * pair into the user's .ssh directory. If not specified, password-less SSH is not configured + * between Compute Nodes (no modification of the user's .ssh directory is done). */ sshPrivateKey?: string; } /** * An interface representing WindowsUserConfiguration. - * @summary Properties used to create a user account on a Windows node. + * @summary Properties used to create a user Account on a Windows Compute Node. */ export interface WindowsUserConfiguration { /** - * The login mode for the user. The default value for VirtualMachineConfiguration pools is batch - * and for CloudServiceConfiguration pools is interactive. Possible values include: 'batch', - * 'interactive' + * The login mode for the user. The default value for VirtualMachineConfiguration Pools is + * 'batch' and for CloudServiceConfiguration Pools is 'interactive'. Possible values include: + * 'batch', 'interactive' */ loginMode?: LoginMode; } /** * An interface representing UserAccount. - * @summary Properties used to create a user used to execute tasks on an Azure Batch node. + * @summary Properties used to create a user used to execute Tasks on an Azure Batch Compute Node. */ export interface UserAccount { /** - * The name of the user account. + * The name of the user Account. */ name: string; /** - * The password for the user account. + * The password for the user Account. */ password: string; /** - * The elevation level of the user account. The default value is nonAdmin. Possible values + * The elevation level of the user Account. The default value is nonAdmin. Possible values * include: 'nonAdmin', 'admin' */ elevationLevel?: ElevationLevel; /** - * The Linux-specific user configuration for the user account. This property is ignored if - * specified on a Windows pool. If not specified, the user is created with the default options. + * The Linux-specific user configuration for the user Account. This property is ignored if + * specified on a Windows Pool. If not specified, the user is created with the default options. */ linuxUserConfiguration?: LinuxUserConfiguration; /** - * The Windows-specific user configuration for the user account. This property can only be - * specified if the user is on a Windows pool. If not specified and on a Windows pool, the user + * The Windows-specific user configuration for the user Account. This property can only be + * specified if the user is on a Windows Pool. If not specified and on a Windows Pool, the user * is created with the default options. */ windowsUserConfiguration?: WindowsUserConfiguration; @@ -911,30 +945,30 @@ export interface UserAccount { /** * An interface representing TaskConstraints. - * @summary Execution constraints to apply to a task. + * @summary Execution constraints to apply to a Task. */ export interface TaskConstraints { /** - * The maximum elapsed time that the task may run, measured from the time the task starts. If the - * task does not complete within the time limit, the Batch service terminates it. If this is not - * specified, there is no time limit on how long the task may run. + * The maximum elapsed time that the Task may run, measured from the time the Task starts. If the + * Task does not complete within the time limit, the Batch service terminates it. If this is not + * specified, there is no time limit on how long the Task may run. */ maxWallClockTime?: string; /** - * The minimum time to retain the task directory on the compute node where it ran, from the time - * it completes execution. After this time, the Batch service may delete the task directory and - * all its contents. The default is 7 days, i.e. the task directory will be retained for 7 days - * unless the compute node is removed or the job is deleted. + * The minimum time to retain the Task directory on the Compute Node where it ran, from the time + * it completes execution. After this time, the Batch service may delete the Task directory and + * all its contents. The default is 7 days, i.e. the Task directory will be retained for 7 days + * unless the Compute Node is removed or the Job is deleted. */ retentionTime?: string; /** - * The maximum number of times the task may be retried. The Batch service retries a task if its + * The maximum number of times the Task may be retried. The Batch service retries a Task if its * exit code is nonzero. Note that this value specifically controls the number of retries for the - * task executable due to a nonzero exit code. The Batch service will try the task once, and may + * Task executable due to a nonzero exit code. The Batch service will try the Task once, and may * then retry up to this limit. For example, if the maximum retry count is 3, Batch tries the - * task up to 4 times (one initial try and 3 retries). If the maximum retry count is 0, the Batch - * service does not retry the task after the first attempt. If the maximum retry count is -1, the - * Batch service retries the task without limit. + * Task up to 4 times (one initial try and 3 retries). If the maximum retry count is 0, the Batch + * service does not retry the Task after the first attempt. If the maximum retry count is -1, the + * Batch service retries the Task without limit. */ maxTaskRetryCount?: number; } @@ -978,7 +1012,7 @@ export interface OutputFileDestination { */ export interface OutputFileUploadOptions { /** - * The conditions under which the task output file or set of files should be uploaded. The + * The conditions under which the Task output file or set of files should be uploaded. The * default is taskcompletion. Possible values include: 'taskSuccess', 'taskFailure', * 'taskCompletion' */ @@ -986,21 +1020,23 @@ export interface OutputFileUploadOptions { } /** - * An interface representing OutputFile. - * @summary A specification for uploading files from an Azure Batch node to another location after - * the Batch service has finished executing the task process. + * On every file uploads, Batch service writes two log files to the compute node, + * 'fileuploadout.txt' and 'fileuploaderr.txt'. These log files are used to learn more about a + * specific failure. + * @summary A specification for uploading files from an Azure Batch Compute Node to another + * location after the Batch service has finished executing the Task process. */ export interface OutputFile { /** * A pattern indicating which file(s) to upload. Both relative and absolute paths are supported. - * Relative paths are relative to the task working directory. The following wildcards are + * Relative paths are relative to the Task working directory. The following wildcards are * supported: * matches 0 or more characters (for example pattern abc* would match abc or * abcdef), ** matches any directory, ? matches any single character, [abc] matches one character * in the brackets, and [a-c] matches one character in the range. Brackets can include a negation * to match any character not specified (for example [!abc] matches any character but a, b, or * c). If a file name starts with "." it is ignored by default but may be matched by specifying * it explicitly (for example *.gif will not match .a.gif, but .*.gif will). A simple example: - * **\*.txt matches any file that does not start in '.' and ends with .txt in the task working + * **\*.txt matches any file that does not start in '.' and ends with .txt in the Task working * directory or any subdirectory. If the filename contains a wildcard character it can be escaped * using brackets (for example abc[*] would match a file named abc*). Note that both \ and / are * treated as directory separators on Windows, but only / is on Linux. Environment variables @@ -1019,60 +1055,62 @@ export interface OutputFile { } /** - * The Job Manager task is automatically started when the job is created. The Batch service tries - * to schedule the Job Manager task before any other tasks in the job. When shrinking a pool, the - * Batch service tries to preserve compute nodes where Job Manager tasks are running for as long as - * possible (that is, nodes running 'normal' tasks are removed before nodes running Job Manager - * tasks). When a Job Manager task fails and needs to be restarted, the system tries to schedule it - * at the highest priority. If there are no idle nodes available, the system may terminate one of - * the running tasks in the pool and return it to the queue in order to make room for the Job - * Manager task to restart. Note that a Job Manager task in one job does not have priority over - * tasks in other jobs. Across jobs, only job level priorities are observed. For example, if a Job - * Manager in a priority 0 job needs to be restarted, it will not displace tasks of a priority 1 - * job. Batch will retry tasks when a recovery operation is triggered on a compute node. Examples - * of recovery operations include (but are not limited to) when an unhealthy compute node is - * rebooted or a compute node disappeared due to host failure. Retries due to recovery operations + * The Job Manager Task is automatically started when the Job is created. The Batch service tries + * to schedule the Job Manager Task before any other Tasks in the Job. When shrinking a Pool, the + * Batch service tries to preserve Nodes where Job Manager Tasks are running for as long as + * possible (that is, Compute Nodes running 'normal' Tasks are removed before Compute Nodes running + * Job Manager Tasks). When a Job Manager Task fails and needs to be restarted, the system tries to + * schedule it at the highest priority. If there are no idle Compute Nodes available, the system + * may terminate one of the running Tasks in the Pool and return it to the queue in order to make + * room for the Job Manager Task to restart. Note that a Job Manager Task in one Job does not have + * priority over Tasks in other Jobs. Across Jobs, only Job level priorities are observed. For + * example, if a Job Manager in a priority 0 Job needs to be restarted, it will not displace Tasks + * of a priority 1 Job. Batch will retry Tasks when a recovery operation is triggered on a Node. + * Examples of recovery operations include (but are not limited to) when an unhealthy Node is + * rebooted or a Compute Node disappeared due to host failure. Retries due to recovery operations * are independent of and are not counted against the maxTaskRetryCount. Even if the * maxTaskRetryCount is 0, an internal retry due to a recovery operation may occur. Because of - * this, all tasks should be idempotent. This means tasks need to tolerate being interrupted and + * this, all Tasks should be idempotent. This means Tasks need to tolerate being interrupted and * restarted without causing any corruption or duplicate data. The best practice for long running - * tasks is to use some form of checkpointing. - * @summary Specifies details of a Job Manager task. + * Tasks is to use some form of checkpointing. + * @summary Specifies details of a Job Manager Task. */ export interface JobManagerTask { /** - * A string that uniquely identifies the Job Manager task within the job. The ID can contain any + * A string that uniquely identifies the Job Manager Task within the Job. The ID can contain any * combination of alphanumeric characters including hyphens and underscores and cannot contain * more than 64 characters. */ id: string; /** - * The display name of the Job Manager task. It need not be unique and can contain any Unicode + * The display name of the Job Manager Task. It need not be unique and can contain any Unicode * characters up to a maximum length of 1024. */ displayName?: string; /** - * The command line of the Job Manager task. The command line does not run under a shell, and + * The command line of the Job Manager Task. The command line does not run under a shell, and * therefore cannot take advantage of shell features such as environment variable expansion. If * you want to take advantage of such features, you should invoke the shell in the command line, * for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the - * command line refers to file paths, it should use a relative path (relative to the task working + * command line refers to file paths, it should use a relative path (relative to the Task working * directory), or use the Batch provided environment variable * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). */ commandLine: string; /** - * The settings for the container under which the Job Manager task runs. If the pool that will - * run this task has containerConfiguration set, this must be set as well. If the pool that will - * run this task doesn't have containerConfiguration set, this must not be set. When this is + * The settings for the container under which the Job Manager Task runs. If the Pool that will + * run this Task has containerConfiguration set, this must be set as well. If the Pool that will + * run this Task doesn't have containerConfiguration set, this must not be set. When this is * specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure - * Batch directories on the node) are mapped into the container, all task environment variables - * are mapped into the container, and the task command line is executed in the container. + * Batch directories on the node) are mapped into the container, all Task environment variables + * are mapped into the container, and the Task command line is executed in the container. Files + * produced in the container outside of AZ_BATCH_NODE_ROOT_DIR might not be reflected to the host + * disk, meaning that Batch file APIs will not be able to access those files. */ containerSettings?: TaskContainerSettings; /** - * A list of files that the Batch service will download to the compute node before running the - * command line. Files listed under this element are located in the task's working directory. + * A list of files that the Batch service will download to the Compute Node before running the + * command line. Files listed under this element are located in the Task's working directory. * There is a maximum size for the list of resource files. When the max size is exceeded, the * request will fail and the response error code will be RequestEntityTooLarge. If this occurs, * the collection of ResourceFiles must be reduced in size. This can be achieved using .zip @@ -1080,126 +1118,133 @@ export interface JobManagerTask { */ resourceFiles?: ResourceFile[]; /** - * A list of files that the Batch service will upload from the compute node after running the - * command line. For multi-instance tasks, the files will only be uploaded from the compute node - * on which the primary task is executed. + * A list of files that the Batch service will upload from the Compute Node after running the + * command line. For multi-instance Tasks, the files will only be uploaded from the Compute Node + * on which the primary Task is executed. */ outputFiles?: OutputFile[]; /** - * A list of environment variable settings for the Job Manager task. + * A list of environment variable settings for the Job Manager Task. */ environmentSettings?: EnvironmentSetting[]; /** - * Constraints that apply to the Job Manager task. + * Constraints that apply to the Job Manager Task. */ constraints?: TaskConstraints; /** - * Whether completion of the Job Manager task signifies completion of the entire job. If true, - * when the Job Manager task completes, the Batch service marks the job as complete. If any tasks - * are still running at this time (other than Job Release), those tasks are terminated. If false, - * the completion of the Job Manager task does not affect the job status. In this case, you - * should either use the onAllTasksComplete attribute to terminate the job, or have a client or - * user terminate the job explicitly. An example of this is if the Job Manager creates a set of - * tasks but then takes no further role in their execution. The default value is true. If you are - * using the onAllTasksComplete and onTaskFailure attributes to control job lifetime, and using - * the Job Manager task only to create the tasks for the job (not to monitor progress), then it + * The number of scheduling slots that the Task requires to run. The default is 1. A Task can + * only be scheduled to run on a compute node if the node has enough free scheduling slots + * available. For multi-instance Tasks, this must be 1. + */ + requiredSlots?: number; + /** + * Whether completion of the Job Manager Task signifies completion of the entire Job. If true, + * when the Job Manager Task completes, the Batch service marks the Job as complete. If any Tasks + * are still running at this time (other than Job Release), those Tasks are terminated. If false, + * the completion of the Job Manager Task does not affect the Job status. In this case, you + * should either use the onAllTasksComplete attribute to terminate the Job, or have a client or + * user terminate the Job explicitly. An example of this is if the Job Manager creates a set of + * Tasks but then takes no further role in their execution. The default value is true. If you are + * using the onAllTasksComplete and onTaskFailure attributes to control Job lifetime, and using + * the Job Manager Task only to create the Tasks for the Job (not to monitor progress), then it * is important to set killJobOnCompletion to false. */ killJobOnCompletion?: boolean; /** - * The user identity under which the Job Manager task runs. If omitted, the task runs as a - * non-administrative user unique to the task. + * The user identity under which the Job Manager Task runs. If omitted, the Task runs as a + * non-administrative user unique to the Task. */ userIdentity?: UserIdentity; /** - * Whether the Job Manager task requires exclusive use of the compute node where it runs. If - * true, no other tasks will run on the same compute node for as long as the Job Manager is - * running. If false, other tasks can run simultaneously with the Job Manager on a compute node. - * The Job Manager task counts normally against the node's concurrent task limit, so this is only - * relevant if the node allows multiple concurrent tasks. The default value is true. + * Whether the Job Manager Task requires exclusive use of the Compute Node where it runs. If + * true, no other Tasks will run on the same Node for as long as the Job Manager is running. If + * false, other Tasks can run simultaneously with the Job Manager on a Compute Node. The Job + * Manager Task counts normally against the Compute Node's concurrent Task limit, so this is only + * relevant if the Compute Node allows multiple concurrent Tasks. The default value is true. */ runExclusive?: boolean; /** - * A list of application packages that the Batch service will deploy to the compute node before - * running the command line. Application packages are downloaded and deployed to a shared - * directory, not the task working directory. Therefore, if a referenced package is already on - * the compute node, and is up to date, then it is not re-downloaded; the existing copy on the - * compute node is used. If a referenced application package cannot be installed, for example - * because the package has been deleted or because download failed, the task fails. + * A list of Application Packages that the Batch service will deploy to the Compute Node before + * running the command line. Application Packages are downloaded and deployed to a shared + * directory, not the Task working directory. Therefore, if a referenced Application Package is + * already on the Compute Node, and is up to date, then it is not re-downloaded; the existing + * copy on the Compute Node is used. If a referenced Application Package cannot be installed, for + * example because the package has been deleted or because download failed, the Task fails. */ applicationPackageReferences?: ApplicationPackageReference[]; /** - * The settings for an authentication token that the task can use to perform Batch service - * operations. If this property is set, the Batch service provides the task with an + * The settings for an authentication token that the Task can use to perform Batch service + * operations. If this property is set, the Batch service provides the Task with an * authentication token which can be used to authenticate Batch service operations without - * requiring an account access key. The token is provided via the AZ_BATCH_AUTHENTICATION_TOKEN - * environment variable. The operations that the task can carry out using the token depend on the - * settings. For example, a task can request job permissions in order to add other tasks to the - * job, or check the status of the job or of other tasks under the job. + * requiring an Account access key. The token is provided via the AZ_BATCH_AUTHENTICATION_TOKEN + * environment variable. The operations that the Task can carry out using the token depend on the + * settings. For example, a Task can request Job permissions in order to add other Tasks to the + * Job, or check the status of the Job or of other Tasks under the Job. */ authenticationTokenSettings?: AuthenticationTokenSettings; /** - * Whether the Job Manager task may run on a low-priority compute node. The default value is + * Whether the Job Manager Task may run on a low-priority Compute Node. The default value is * true. */ allowLowPriorityNode?: boolean; } /** - * You can use Job Preparation to prepare a compute node to run tasks for the job. Activities - * commonly performed in Job Preparation include: Downloading common resource files used by all the - * tasks in the job. The Job Preparation task can download these common resource files to the - * shared location on the compute node. (AZ_BATCH_NODE_ROOT_DIR\shared), or starting a local - * service on the compute node so that all tasks of that job can communicate with it. If the Job - * Preparation task fails (that is, exhausts its retry count before exiting with exit code 0), - * Batch will not run tasks of this job on the compute node. The node remains ineligible to run - * tasks of this job until it is reimaged. The node remains active and can be used for other jobs. - * The Job Preparation task can run multiple times on the same compute node. Therefore, you should - * write the Job Preparation task to handle re-execution. If the compute node is rebooted, the Job - * Preparation task is run again on the node before scheduling any other task of the job, if - * rerunOnNodeRebootAfterSuccess is true or if the Job Preparation task did not previously - * complete. If the compute node is reimaged, the Job Preparation task is run again before - * scheduling any task of the job. Batch will retry tasks when a recovery operation is triggered on - * a compute node. Examples of recovery operations include (but are not limited to) when an - * unhealthy compute node is rebooted or a compute node disappeared due to host failure. Retries - * due to recovery operations are independent of and are not counted against the maxTaskRetryCount. - * Even if the maxTaskRetryCount is 0, an internal retry due to a recovery operation may occur. - * Because of this, all tasks should be idempotent. This means tasks need to tolerate being - * interrupted and restarted without causing any corruption or duplicate data. The best practice - * for long running tasks is to use some form of checkpointing. - * @summary A Job Preparation task to run before any tasks of the job on any given compute node. + * You can use Job Preparation to prepare a Node to run Tasks for the Job. Activities commonly + * performed in Job Preparation include: Downloading common resource files used by all the Tasks in + * the Job. The Job Preparation Task can download these common resource files to the shared + * location on the Node. (AZ_BATCH_NODE_ROOT_DIR\shared), or starting a local service on the Node + * so that all Tasks of that Job can communicate with it. If the Job Preparation Task fails (that + * is, exhausts its retry count before exiting with exit code 0), Batch will not run Tasks of this + * Job on the Node. The Compute Node remains ineligible to run Tasks of this Job until it is + * reimaged. The Compute Node remains active and can be used for other Jobs. The Job Preparation + * Task can run multiple times on the same Node. Therefore, you should write the Job Preparation + * Task to handle re-execution. If the Node is rebooted, the Job Preparation Task is run again on + * the Compute Node before scheduling any other Task of the Job, if rerunOnNodeRebootAfterSuccess + * is true or if the Job Preparation Task did not previously complete. If the Node is reimaged, the + * Job Preparation Task is run again before scheduling any Task of the Job. Batch will retry Tasks + * when a recovery operation is triggered on a Node. Examples of recovery operations include (but + * are not limited to) when an unhealthy Node is rebooted or a Compute Node disappeared due to host + * failure. Retries due to recovery operations are independent of and are not counted against the + * maxTaskRetryCount. Even if the maxTaskRetryCount is 0, an internal retry due to a recovery + * operation may occur. Because of this, all Tasks should be idempotent. This means Tasks need to + * tolerate being interrupted and restarted without causing any corruption or duplicate data. The + * best practice for long running Tasks is to use some form of checkpointing. + * @summary A Job Preparation Task to run before any Tasks of the Job on any given Compute Node. */ export interface JobPreparationTask { /** - * A string that uniquely identifies the Job Preparation task within the job. The ID can contain + * A string that uniquely identifies the Job Preparation Task within the Job. The ID can contain * any combination of alphanumeric characters including hyphens and underscores and cannot * contain more than 64 characters. If you do not specify this property, the Batch service - * assigns a default value of 'jobpreparation'. No other task in the job can have the same ID as - * the Job Preparation task. If you try to submit a task with the same id, the Batch service + * assigns a default value of 'jobpreparation'. No other Task in the Job can have the same ID as + * the Job Preparation Task. If you try to submit a Task with the same id, the Batch service * rejects the request with error code TaskIdSameAsJobPreparationTask; if you are calling the * REST API directly, the HTTP status code is 409 (Conflict). */ id?: string; /** - * The command line of the Job Preparation task. The command line does not run under a shell, and + * The command line of the Job Preparation Task. The command line does not run under a shell, and * therefore cannot take advantage of shell features such as environment variable expansion. If * you want to take advantage of such features, you should invoke the shell in the command line, * for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the - * command line refers to file paths, it should use a relative path (relative to the task working + * command line refers to file paths, it should use a relative path (relative to the Task working * directory), or use the Batch provided environment variable * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). */ commandLine: string; /** - * The settings for the container under which the Job Preparation task runs. When this is + * The settings for the container under which the Job Preparation Task runs. When this is * specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure - * Batch directories on the node) are mapped into the container, all task environment variables - * are mapped into the container, and the task command line is executed in the container. + * Batch directories on the node) are mapped into the container, all Task environment variables + * are mapped into the container, and the Task command line is executed in the container. Files + * produced in the container outside of AZ_BATCH_NODE_ROOT_DIR might not be reflected to the host + * disk, meaning that Batch file APIs will not be able to access those files. */ containerSettings?: TaskContainerSettings; /** - * A list of files that the Batch service will download to the compute node before running the - * command line. Files listed under this element are located in the task's working directory. + * A list of files that the Batch service will download to the Compute Node before running the + * command line. Files listed under this element are located in the Task's working directory. * There is a maximum size for the list of resource files. When the max size is exceeded, the * request will fail and the response error code will be RequestEntityTooLarge. If this occurs, * the collection of ResourceFiles must be reduced in size. This can be achieved using .zip @@ -1207,215 +1252,218 @@ export interface JobPreparationTask { */ resourceFiles?: ResourceFile[]; /** - * A list of environment variable settings for the Job Preparation task. + * A list of environment variable settings for the Job Preparation Task. */ environmentSettings?: EnvironmentSetting[]; /** - * Constraints that apply to the Job Preparation task. + * Constraints that apply to the Job Preparation Task. */ constraints?: TaskConstraints; /** - * Whether the Batch service should wait for the Job Preparation task to complete successfully - * before scheduling any other tasks of the job on the compute node. A Job Preparation task has - * completed successfully if it exits with exit code 0. If true and the Job Preparation task - * fails on a compute node, the Batch service retries the Job Preparation task up to its maximum - * retry count (as specified in the constraints element). If the task has still not completed - * successfully after all retries, then the Batch service will not schedule tasks of the job to - * the compute node. The compute node remains active and eligible to run tasks of other jobs. If - * false, the Batch service will not wait for the Job Preparation task to complete. In this case, - * other tasks of the job can start executing on the compute node while the Job Preparation task - * is still running; and even if the Job Preparation task fails, new tasks will continue to be - * scheduled on the node. The default value is true. + * Whether the Batch service should wait for the Job Preparation Task to complete successfully + * before scheduling any other Tasks of the Job on the Compute Node. A Job Preparation Task has + * completed successfully if it exits with exit code 0. If true and the Job Preparation Task + * fails on a Node, the Batch service retries the Job Preparation Task up to its maximum retry + * count (as specified in the constraints element). If the Task has still not completed + * successfully after all retries, then the Batch service will not schedule Tasks of the Job to + * the Node. The Node remains active and eligible to run Tasks of other Jobs. If false, the Batch + * service will not wait for the Job Preparation Task to complete. In this case, other Tasks of + * the Job can start executing on the Compute Node while the Job Preparation Task is still + * running; and even if the Job Preparation Task fails, new Tasks will continue to be scheduled + * on the Compute Node. The default value is true. */ waitForSuccess?: boolean; /** - * The user identity under which the Job Preparation task runs. If omitted, the task runs as a - * non-administrative user unique to the task on Windows nodes, or a non-administrative user - * unique to the pool on Linux nodes. + * The user identity under which the Job Preparation Task runs. If omitted, the Task runs as a + * non-administrative user unique to the Task on Windows Compute Nodes, or a non-administrative + * user unique to the Pool on Linux Compute Nodes. */ userIdentity?: UserIdentity; /** - * Whether the Batch service should rerun the Job Preparation task after a compute node reboots. - * The Job Preparation task is always rerun if a compute node is reimaged, or if the Job - * Preparation task did not complete (e.g. because the reboot occurred while the task was - * running). Therefore, you should always write a Job Preparation task to be idempotent and to + * Whether the Batch service should rerun the Job Preparation Task after a Compute Node reboots. + * The Job Preparation Task is always rerun if a Compute Node is reimaged, or if the Job + * Preparation Task did not complete (e.g. because the reboot occurred while the Task was + * running). Therefore, you should always write a Job Preparation Task to be idempotent and to * behave correctly if run multiple times. The default value is true. */ rerunOnNodeRebootAfterSuccess?: boolean; } /** - * The Job Release task runs when the job ends, because of one of the following: The user calls the - * Terminate Job API, or the Delete Job API while the job is still active, the job's maximum wall - * clock time constraint is reached, and the job is still active, or the job's Job Manager task - * completed, and the job is configured to terminate when the Job Manager completes. The Job - * Release task runs on each compute node where tasks of the job have run and the Job Preparation - * task ran and completed. If you reimage a compute node after it has run the Job Preparation task, - * and the job ends without any further tasks of the job running on that compute node (and hence - * the Job Preparation task does not re-run), then the Job Release task does not run on that node. - * If a compute node reboots while the Job Release task is still running, the Job Release task runs - * again when the compute node starts up. The job is not marked as complete until all Job Release - * tasks have completed. The Job Release task runs in the background. It does not occupy a - * scheduling slot; that is, it does not count towards the maxTasksPerNode limit specified on the - * pool. - * @summary A Job Release task to run on job completion on any compute node where the job has run. + * The Job Release Task runs when the Job ends, because of one of the following: The user calls the + * Terminate Job API, or the Delete Job API while the Job is still active, the Job's maximum wall + * clock time constraint is reached, and the Job is still active, or the Job's Job Manager Task + * completed, and the Job is configured to terminate when the Job Manager completes. The Job + * Release Task runs on each Node where Tasks of the Job have run and the Job Preparation Task ran + * and completed. If you reimage a Node after it has run the Job Preparation Task, and the Job ends + * without any further Tasks of the Job running on that Node (and hence the Job Preparation Task + * does not re-run), then the Job Release Task does not run on that Compute Node. If a Node reboots + * while the Job Release Task is still running, the Job Release Task runs again when the Compute + * Node starts up. The Job is not marked as complete until all Job Release Tasks have completed. + * The Job Release Task runs in the background. It does not occupy a scheduling slot; that is, it + * does not count towards the taskSlotsPerNode limit specified on the Pool. + * @summary A Job Release Task to run on Job completion on any Compute Node where the Job has run. */ export interface JobReleaseTask { /** - * A string that uniquely identifies the Job Release task within the job. The ID can contain any + * A string that uniquely identifies the Job Release Task within the Job. The ID can contain any * combination of alphanumeric characters including hyphens and underscores and cannot contain * more than 64 characters. If you do not specify this property, the Batch service assigns a - * default value of 'jobrelease'. No other task in the job can have the same ID as the Job - * Release task. If you try to submit a task with the same id, the Batch service rejects the + * default value of 'jobrelease'. No other Task in the Job can have the same ID as the Job + * Release Task. If you try to submit a Task with the same id, the Batch service rejects the * request with error code TaskIdSameAsJobReleaseTask; if you are calling the REST API directly, * the HTTP status code is 409 (Conflict). */ id?: string; /** - * The command line of the Job Release task. The command line does not run under a shell, and + * The command line of the Job Release Task. The command line does not run under a shell, and * therefore cannot take advantage of shell features such as environment variable expansion. If * you want to take advantage of such features, you should invoke the shell in the command line, * for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the - * command line refers to file paths, it should use a relative path (relative to the task working + * command line refers to file paths, it should use a relative path (relative to the Task working * directory), or use the Batch provided environment variable * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). */ commandLine: string; /** - * The settings for the container under which the Job Release task runs. When this is specified, + * The settings for the container under which the Job Release Task runs. When this is specified, * all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch - * directories on the node) are mapped into the container, all task environment variables are - * mapped into the container, and the task command line is executed in the container. + * directories on the node) are mapped into the container, all Task environment variables are + * mapped into the container, and the Task command line is executed in the container. Files + * produced in the container outside of AZ_BATCH_NODE_ROOT_DIR might not be reflected to the host + * disk, meaning that Batch file APIs will not be able to access those files. */ containerSettings?: TaskContainerSettings; /** - * A list of files that the Batch service will download to the compute node before running the + * A list of files that the Batch service will download to the Compute Node before running the * command line. There is a maximum size for the list of resource files. When the max size is * exceeded, the request will fail and the response error code will be RequestEntityTooLarge. If * this occurs, the collection of ResourceFiles must be reduced in size. This can be achieved * using .zip files, Application Packages, or Docker Containers. Files listed under this element - * are located in the task's working directory. + * are located in the Task's working directory. */ resourceFiles?: ResourceFile[]; /** - * A list of environment variable settings for the Job Release task. + * A list of environment variable settings for the Job Release Task. */ environmentSettings?: EnvironmentSetting[]; /** - * The maximum elapsed time that the Job Release task may run on a given compute node, measured - * from the time the task starts. If the task does not complete within the time limit, the Batch + * The maximum elapsed time that the Job Release Task may run on a given Compute Node, measured + * from the time the Task starts. If the Task does not complete within the time limit, the Batch * service terminates it. The default value is 15 minutes. You may not specify a timeout longer * than 15 minutes. If you do, the Batch service rejects it with an error; if you are calling the * REST API directly, the HTTP status code is 400 (Bad Request). */ maxWallClockTime?: string; /** - * The minimum time to retain the task directory for the Job Release task on the compute node. - * After this time, the Batch service may delete the task directory and all its contents. The - * default is 7 days, i.e. the task directory will be retained for 7 days unless the compute node - * is removed or the job is deleted. + * The minimum time to retain the Task directory for the Job Release Task on the Compute Node. + * After this time, the Batch service may delete the Task directory and all its contents. The + * default is 7 days, i.e. the Task directory will be retained for 7 days unless the Compute Node + * is removed or the Job is deleted. */ retentionTime?: string; /** - * The user identity under which the Job Release task runs. If omitted, the task runs as a - * non-administrative user unique to the task. + * The user identity under which the Job Release Task runs. If omitted, the Task runs as a + * non-administrative user unique to the Task. */ userIdentity?: UserIdentity; } /** * An interface representing TaskSchedulingPolicy. - * @summary Specifies how tasks should be distributed across compute nodes. + * @summary Specifies how Tasks should be distributed across Compute Nodes. */ export interface TaskSchedulingPolicy { /** - * How tasks are distributed across compute nodes in a pool. Possible values include: 'spread', - * 'pack' + * How Tasks are distributed across Compute Nodes in a Pool. If not specified, the default is + * spread. Possible values include: 'spread', 'pack' */ nodeFillType: ComputeNodeFillType; } /** - * Batch will retry tasks when a recovery operation is triggered on a compute node. Examples of - * recovery operations include (but are not limited to) when an unhealthy compute node is rebooted - * or a compute node disappeared due to host failure. Retries due to recovery operations are - * independent of and are not counted against the maxTaskRetryCount. Even if the maxTaskRetryCount - * is 0, an internal retry due to a recovery operation may occur. Because of this, all tasks should - * be idempotent. This means tasks need to tolerate being interrupted and restarted without causing - * any corruption or duplicate data. The best practice for long running tasks is to use some form - * of checkpointing. In some cases the start task may be re-run even though the node was not - * rebooted. Special care should be taken to avoid start tasks which create breakaway process or - * install/launch services from the start task working directory, as this will block Batch from - * being able to re-run the start task. - * @summary A task which is run when a compute node joins a pool in the Azure Batch service, or - * when the compute node is rebooted or reimaged. + * Batch will retry Tasks when a recovery operation is triggered on a Node. Examples of recovery + * operations include (but are not limited to) when an unhealthy Node is rebooted or a Compute Node + * disappeared due to host failure. Retries due to recovery operations are independent of and are + * not counted against the maxTaskRetryCount. Even if the maxTaskRetryCount is 0, an internal retry + * due to a recovery operation may occur. Because of this, all Tasks should be idempotent. This + * means Tasks need to tolerate being interrupted and restarted without causing any corruption or + * duplicate data. The best practice for long running Tasks is to use some form of checkpointing. + * In some cases the StartTask may be re-run even though the Compute Node was not rebooted. Special + * care should be taken to avoid StartTasks which create breakaway process or install/launch + * services from the StartTask working directory, as this will block Batch from being able to + * re-run the StartTask. + * @summary A Task which is run when a Node joins a Pool in the Azure Batch service, or when the + * Compute Node is rebooted or reimaged. */ export interface StartTask { /** - * The command line of the start task. The command line does not run under a shell, and therefore + * The command line of the StartTask. The command line does not run under a shell, and therefore * cannot take advantage of shell features such as environment variable expansion. If you want to * take advantage of such features, you should invoke the shell in the command line, for example * using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line - * refers to file paths, it should use a relative path (relative to the task working directory), + * refers to file paths, it should use a relative path (relative to the Task working directory), * or use the Batch provided environment variable * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). */ commandLine: string; /** - * The settings for the container under which the start task runs. When this is specified, all + * The settings for the container under which the StartTask runs. When this is specified, all * directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories - * on the node) are mapped into the container, all task environment variables are mapped into the - * container, and the task command line is executed in the container. + * on the node) are mapped into the container, all Task environment variables are mapped into the + * container, and the Task command line is executed in the container. Files produced in the + * container outside of AZ_BATCH_NODE_ROOT_DIR might not be reflected to the host disk, meaning + * that Batch file APIs will not be able to access those files. */ containerSettings?: TaskContainerSettings; /** - * A list of files that the Batch service will download to the compute node before running the + * A list of files that the Batch service will download to the Compute Node before running the * command line. There is a maximum size for the list of resource files. When the max size is * exceeded, the request will fail and the response error code will be RequestEntityTooLarge. If * this occurs, the collection of ResourceFiles must be reduced in size. This can be achieved * using .zip files, Application Packages, or Docker Containers. Files listed under this element - * are located in the task's working directory. + * are located in the Task's working directory. */ resourceFiles?: ResourceFile[]; /** - * A list of environment variable settings for the start task. + * A list of environment variable settings for the StartTask. */ environmentSettings?: EnvironmentSetting[]; /** - * The user identity under which the start task runs. If omitted, the task runs as a - * non-administrative user unique to the task. + * The user identity under which the StartTask runs. If omitted, the Task runs as a + * non-administrative user unique to the Task. */ userIdentity?: UserIdentity; /** - * The maximum number of times the task may be retried. The Batch service retries a task if its + * The maximum number of times the Task may be retried. The Batch service retries a Task if its * exit code is nonzero. Note that this value specifically controls the number of retries. The - * Batch service will try the task once, and may then retry up to this limit. For example, if the - * maximum retry count is 3, Batch tries the task up to 4 times (one initial try and 3 retries). - * If the maximum retry count is 0, the Batch service does not retry the task. If the maximum - * retry count is -1, the Batch service retries the task without limit. + * Batch service will try the Task once, and may then retry up to this limit. For example, if the + * maximum retry count is 3, Batch tries the Task up to 4 times (one initial try and 3 retries). + * If the maximum retry count is 0, the Batch service does not retry the Task. If the maximum + * retry count is -1, the Batch service retries the Task without limit. */ maxTaskRetryCount?: number; /** - * Whether the Batch service should wait for the start task to complete successfully (that is, to - * exit with exit code 0) before scheduling any tasks on the compute node. If true and the start - * task fails on a compute node, the Batch service retries the start task up to its maximum retry - * count (maxTaskRetryCount). If the task has still not completed successfully after all retries, - * then the Batch service marks the compute node unusable, and will not schedule tasks to it. - * This condition can be detected via the node state and failure info details. If false, the - * Batch service will not wait for the start task to complete. In this case, other tasks can - * start executing on the compute node while the start task is still running; and even if the - * start task fails, new tasks will continue to be scheduled on the node. The default is false. + * Whether the Batch service should wait for the StartTask to complete successfully (that is, to + * exit with exit code 0) before scheduling any Tasks on the Compute Node. If true and the + * StartTask fails on a Node, the Batch service retries the StartTask up to its maximum retry + * count (maxTaskRetryCount). If the Task has still not completed successfully after all retries, + * then the Batch service marks the Node unusable, and will not schedule Tasks to it. This + * condition can be detected via the Compute Node state and failure info details. If false, the + * Batch service will not wait for the StartTask to complete. In this case, other Tasks can start + * executing on the Compute Node while the StartTask is still running; and even if the StartTask + * fails, new Tasks will continue to be scheduled on the Compute Node. The default is true. */ waitForSuccess?: boolean; } /** * An interface representing CertificateReference. - * @summary A reference to a certificate to be installed on compute nodes in a pool. + * @summary A reference to a Certificate to be installed on Compute Nodes in a Pool. */ export interface CertificateReference { /** - * The thumbprint of the certificate. + * The thumbprint of the Certificate. */ thumbprint: string; /** @@ -1423,30 +1471,30 @@ export interface CertificateReference { */ thumbprintAlgorithm: string; /** - * The location of the certificate store on the compute node into which to install the - * certificate. The default value is currentuser. This property is applicable only for pools - * configured with Windows nodes (that is, created with cloudServiceConfiguration, or with - * virtualMachineConfiguration using a Windows image reference). For Linux compute nodes, the - * certificates are stored in a directory inside the task working directory and an environment - * variable AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this location. For - * certificates with visibility of 'remoteUser', a 'certs' directory is created in the user's - * home directory (e.g., /home/{user-name}/certs) and certificates are placed in that directory. - * Possible values include: 'currentUser', 'localMachine' + * The location of the Certificate store on the Compute Node into which to install the + * Certificate. The default value is currentuser. This property is applicable only for Pools + * configured with Windows Compute Nodes (that is, created with cloudServiceConfiguration, or + * with virtualMachineConfiguration using a Windows Image reference). For Linux Compute Nodes, + * the Certificates are stored in a directory inside the Task working directory and an + * environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the Task to query for this + * location. For Certificates with visibility of 'remoteUser', a 'certs' directory is created in + * the user's home directory (e.g., /home/{user-name}/certs) and Certificates are placed in that + * directory. Possible values include: 'currentUser', 'localMachine' */ storeLocation?: CertificateStoreLocation; /** - * The name of the certificate store on the compute node into which to install the certificate. - * This property is applicable only for pools configured with Windows nodes (that is, created - * with cloudServiceConfiguration, or with virtualMachineConfiguration using a Windows image - * reference). Common store names include: My, Root, CA, Trust, Disallowed, TrustedPeople, + * The name of the Certificate store on the Compute Node into which to install the Certificate. + * This property is applicable only for Pools configured with Windows Compute Nodes (that is, + * created with cloudServiceConfiguration, or with virtualMachineConfiguration using a Windows + * Image reference). Common store names include: My, Root, CA, Trust, Disallowed, TrustedPeople, * TrustedPublisher, AuthRoot, AddressBook, but any custom store name can also be used. The * default value is My. */ storeName?: string; /** - * Which user accounts on the compute node should have access to the private data of the - * certificate. You can specify more than one visibility in this collection. The default is all - * accounts. + * Which user Accounts on the Compute Node should have access to the private data of the + * Certificate. You can specify more than one visibility in this collection. The default is all + * Accounts. */ visibility?: CertificateVisibility[]; } @@ -1469,11 +1517,12 @@ export interface MetadataItem { /** * An interface representing CloudServiceConfiguration. - * @summary The configuration for nodes in a pool based on the Azure Cloud Services platform. + * @summary The configuration for Compute Nodes in a Pool based on the Azure Cloud Services + * platform. */ export interface CloudServiceConfiguration { /** - * The Azure Guest OS family to be installed on the virtual machines in the pool. Possible values + * The Azure Guest OS family to be installed on the virtual machines in the Pool. Possible values * are: * 2 - OS Family 2, equivalent to Windows Server 2008 R2 SP1. * 3 - OS Family 3, equivalent to Windows Server 2012. @@ -1485,7 +1534,7 @@ export interface CloudServiceConfiguration { */ osFamily: string; /** - * The Azure Guest OS version to be installed on the virtual machines in the pool. The default + * The Azure Guest OS version to be installed on the virtual machines in the Pool. The default * value is * which specifies the latest operating system version for the specified OS family. */ osVersion?: string; @@ -1505,12 +1554,15 @@ export interface WindowsConfiguration { /** * An interface representing DataDisk. - * @summary Settings which will be used by the data disks associated to compute nodes in the pool. + * @summary Settings which will be used by the data disks associated to Compute Nodes in the Pool. + * When using attached data disks, you need to mount and format the disks from within a VM to use + * them. */ export interface DataDisk { /** * The logical unit number. The lun is used to uniquely identify each data disk. If attaching - * multiple disks, each should have a distinct lun. + * multiple disks, each should have a distinct lun. The value must be between 0 and 63, + * inclusive. */ lun: number; /** @@ -1525,7 +1577,7 @@ export interface DataDisk { */ diskSizeGB: number; /** - * The storage account type to be used for the data disk. If omitted, the default is + * The storage Account type to be used for the data disk. If omitted, the default is * "standard_lrs". Possible values include: 'StandardLRS', 'PremiumLRS' */ storageAccountType?: StorageAccountType; @@ -1533,56 +1585,69 @@ export interface DataDisk { /** * An interface representing ContainerConfiguration. - * @summary The configuration for container-enabled pools. + * @summary The configuration for container-enabled Pools. */ export interface ContainerConfiguration { /** - * The collection of container image names. This is the full image reference, as would be - * specified to "docker pull". An image will be sourced from the default Docker registry unless - * the image is fully qualified with an alternative registry. + * The collection of container Image names. This is the full Image reference, as would be + * specified to "docker pull". An Image will be sourced from the default Docker registry unless + * the Image is fully qualified with an alternative registry. */ containerImageNames?: string[]; /** - * Additional private registries from which containers can be pulled. If any images must be + * Additional private registries from which containers can be pulled. If any Images must be * downloaded from a private registry which requires credentials, then those credentials must be * provided here. */ containerRegistries?: ContainerRegistry[]; } +/** + * The disk encryption configuration applied on compute nodes in the pool. Disk encryption + * configuration is not supported on Linux pool created with Shared Image Gallery Image. + */ +export interface DiskEncryptionConfiguration { + /** + * The list of disk targets Batch Service will encrypt on the compute node. If omitted, no disks + * on the compute nodes in the pool will be encrypted. On Linux pool, only "TemporaryDisk" is + * supported; on Windows pool, "OsDisk" and "TemporaryDisk" must be specified. + */ + targets?: DiskEncryptionTarget[]; +} + /** * An interface representing VirtualMachineConfiguration. - * @summary The configuration for compute nodes in a pool based on the Azure Virtual Machines + * @summary The configuration for Compute Nodes in a Pool based on the Azure Virtual Machines * infrastructure. */ export interface VirtualMachineConfiguration { /** - * A reference to the Azure Virtual Machines Marketplace image or the custom Virtual Machine - * image to use. + * A reference to the Azure Virtual Machines Marketplace Image or the custom Virtual Machine + * Image to use. */ imageReference: ImageReference; /** - * The SKU of the Batch node agent to be provisioned on compute nodes in the pool. The Batch node - * agent is a program that runs on each node in the pool, and provides the command-and-control - * interface between the node and the Batch service. There are different implementations of the - * node agent, known as SKUs, for different operating systems. You must specify a node agent SKU - * which matches the selected image reference. To get the list of supported node agent SKUs along - * with their list of verified image references, see the 'List supported node agent SKUs' - * operation. + * The SKU of the Batch Compute Node agent to be provisioned on Compute Nodes in the Pool. The + * Batch Compute Node agent is a program that runs on each Compute Node in the Pool, and provides + * the command-and-control interface between the Compute Node and the Batch service. There are + * different implementations of the Compute Node agent, known as SKUs, for different operating + * systems. You must specify a Compute Node agent SKU which matches the selected Image reference. + * To get the list of supported Compute Node agent SKUs along with their list of verified Image + * references, see the 'List supported Compute Node agent SKUs' operation. */ nodeAgentSKUId: string; /** * Windows operating system settings on the virtual machine. This property must not be specified - * if the imageReference property specifies a Linux OS image. + * if the imageReference property specifies a Linux OS Image. */ windowsConfiguration?: WindowsConfiguration; /** - * The configuration for data disks attached to the compute nodes in the pool. This property must - * be specified if the compute nodes in the pool need to have empty data disks attached to them. - * This cannot be updated. Each node gets its own disk (the disk is not a file share). Existing - * disks cannot be attached, each attached disk is empty. When the node is removed from the pool, - * the disk and all data associated with it is also deleted. The disk is not formatted after - * being attached, it must be formatted before use - for more information see + * The configuration for data disks attached to the Compute Nodes in the Pool. This property must + * be specified if the Compute Nodes in the Pool need to have empty data disks attached to them. + * This cannot be updated. Each Compute Node gets its own disk (the disk is not a file share). + * Existing disks cannot be attached, each attached disk is empty. When the Compute Node is + * removed from the Pool, the disk and all data associated with it is also deleted. The disk is + * not formatted after being attached, it must be formatted before use - for more information see * https://docs.microsoft.com/en-us/azure/virtual-machines/linux/classic/attach-disk#initialize-a-new-data-disk-in-linux * and * https://docs.microsoft.com/en-us/azure/virtual-machines/windows/attach-disk-ps#add-an-empty-data-disk-to-a-virtual-machine. @@ -1590,8 +1655,8 @@ export interface VirtualMachineConfiguration { dataDisks?: DataDisk[]; /** * The type of on-premises license to be used when deploying the operating system. This only - * applies to images that contain the Windows operating system, and should only be used when you - * hold valid on-premises licenses for the nodes which will be deployed. If omitted, no + * applies to Images that contain the Windows operating system, and should only be used when you + * hold valid on-premises licenses for the Compute Nodes which will be deployed. If omitted, no * on-premises licensing discount is applied. Values are: * * Windows_Server - The on-premises license is for Windows Server. @@ -1599,11 +1664,17 @@ export interface VirtualMachineConfiguration { */ licenseType?: string; /** - * The container configuration for the pool. If specified, setup is performed on each node in the - * pool to allow tasks to run in containers. All regular tasks and job manager tasks run on this - * pool must specify the containerSettings property, and all other tasks may specify it. + * The container configuration for the Pool. If specified, setup is performed on each Compute + * Node in the Pool to allow Tasks to run in containers. All regular Tasks and Job manager Tasks + * run on this Pool must specify the containerSettings property, and all other Tasks may specify + * it. */ containerConfiguration?: ContainerConfiguration; + /** + * The disk encryption configuration for the pool. If specified, encryption is performed on each + * node in the pool during node provisioning. + */ + diskEncryptionConfiguration?: DiskEncryptionConfiguration; } /** @@ -1612,10 +1683,10 @@ export interface VirtualMachineConfiguration { */ export interface NetworkSecurityGroupRule { /** - * The priority for this rule. Priorities within a pool must be unique and are evaluated in order + * The priority for this rule. Priorities within a Pool must be unique and are evaluated in order * of priority. The lower the number the higher the priority. For example, rules could be * specified with order numbers of 150, 250, and 350. The rule with the order number of 150 takes - * precedence over the rule that has an order of 250. Allowed priorities are 150 to 3500. If any + * precedence over the rule that has an order of 250. Allowed priorities are 150 to 4096. If any * reserved or duplicate values are provided the request fails with HTTP status code 400. */ priority: number; @@ -1630,16 +1701,24 @@ export interface NetworkSecurityGroupRule { * If any other values are provided the request fails with HTTP status code 400. */ sourceAddressPrefix: string; + /** + * The source port ranges to match for the rule. Valid values are '*' (for all ports 0 - 65535), + * a specific port (i.e. 22), or a port range (i.e. 100-200). The ports must be in the range of 0 + * to 65535. Each entry in this collection must not overlap any other entry (either a range or an + * individual port). If any other values are provided the request fails with HTTP status code + * 400. The default value is '*'. + */ + sourcePortRanges?: string[]; } /** * An interface representing InboundNATPool. - * @summary A inbound NAT pool that can be used to address specific ports on compute nodes in a - * Batch pool externally. + * @summary A inbound NAT Pool that can be used to address specific ports on Compute Nodes in a + * Batch Pool externally. */ export interface InboundNATPool { /** - * The name of the endpoint. The name must be unique within a Batch pool, can contain letters, + * The name of the endpoint. The name must be unique within a Batch Pool, can contain letters, * numbers, underscores, periods, and hyphens. Names must start with a letter or number, must end * with a letter, number, or underscore, and cannot exceed 77 characters. If any invalid values * are provided the request fails with HTTP status code 400. @@ -1650,31 +1729,31 @@ export interface InboundNATPool { */ protocol: InboundEndpointProtocol; /** - * The port number on the compute node. This must be unique within a Batch pool. Acceptable + * The port number on the Compute Node. This must be unique within a Batch Pool. Acceptable * values are between 1 and 65535 except for 22, 3389, 29876 and 29877 as these are reserved. If * any reserved values are provided the request fails with HTTP status code 400. */ backendPort: number; /** * The first port number in the range of external ports that will be used to provide inbound - * access to the backendPort on individual compute nodes. Acceptable values range between 1 and - * 65534 except ports from 50000 to 55000 which are reserved. All ranges within a pool must be + * access to the backendPort on individual Compute Nodes. Acceptable values range between 1 and + * 65534 except ports from 50000 to 55000 which are reserved. All ranges within a Pool must be * distinct and cannot overlap. Each range must contain at least 40 ports. If any reserved or * overlapping values are provided the request fails with HTTP status code 400. */ frontendPortRangeStart: number; /** * The last port number in the range of external ports that will be used to provide inbound - * access to the backendPort on individual compute nodes. Acceptable values range between 1 and + * access to the backendPort on individual Compute Nodes. Acceptable values range between 1 and * 65534 except ports from 50000 to 55000 which are reserved by the Batch service. All ranges - * within a pool must be distinct and cannot overlap. Each range must contain at least 40 ports. + * within a Pool must be distinct and cannot overlap. Each range must contain at least 40 ports. * If any reserved or overlapping values are provided the request fails with HTTP status code * 400. */ frontendPortRangeEnd: number; /** * A list of network security group rules that will be applied to the endpoint. The maximum - * number of rules that can be specified across all the endpoints on a Batch pool is 25. If no + * number of rules that can be specified across all the endpoints on a Batch Pool is 25. If no * network security group rules are specified, a default rule will be created to allow inbound * access to the specified backendPort. If the maximum number of network security group rules is * exceeded the request fails with HTTP status code 400. @@ -1684,32 +1763,63 @@ export interface InboundNATPool { /** * An interface representing PoolEndpointConfiguration. - * @summary The endpoint configuration for a pool. + * @summary The endpoint configuration for a Pool. */ export interface PoolEndpointConfiguration { /** - * A list of inbound NAT pools that can be used to address specific ports on an individual - * compute node externally. The maximum number of inbound NAT pools per Batch pool is 5. If the - * maximum number of inbound NAT pools is exceeded the request fails with HTTP status code 400. + * A list of inbound NAT Pools that can be used to address specific ports on an individual + * Compute Node externally. The maximum number of inbound NAT Pools per Batch Pool is 5. If the + * maximum number of inbound NAT Pools is exceeded the request fails with HTTP status code 400. + * This cannot be specified if the IPAddressProvisioningType is NoPublicIPAddresses. */ inboundNATPools: InboundNATPool[]; } /** - * The network configuration for a pool. + * The public IP Address configuration of the networking configuration of a Pool. + */ +export interface PublicIPAddressConfiguration { + /** + * The provisioning type for Public IP Addresses for the Pool. The default value is BatchManaged. + * Possible values include: 'batchManaged', 'userManaged', 'noPublicIPAddresses' + */ + provision?: IPAddressProvisioningType; + /** + * The list of public IPs which the Batch service will use when provisioning Compute Nodes. The + * number of IPs specified here limits the maximum size of the Pool - 100 dedicated nodes or 100 + * low-priority nodes can be allocated for each public IP. For example, a pool needing 250 + * dedicated VMs would need at least 3 public IPs specified. Each element of this collection is + * of the form: + * /subscriptions/{subscription}/resourceGroups/{group}/providers/Microsoft.Network/publicIPAddresses/{ip}. + */ + ipAddressIds?: string[]; +} + +/** + * The network configuration for a Pool. */ export interface NetworkConfiguration { /** - * The ARM resource identifier of the virtual network subnet which the compute nodes of the pool + * The ARM resource identifier of the virtual network subnet which the Compute Nodes of the Pool * will join. This is of the form * /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. - * The virtual network must be in the same region and subscription as the Azure Batch account. - * The specified subnet should have enough free IP addresses to accommodate the number of nodes - * in the pool. If the subnet doesn't have enough free IP addresses, the pool will partially - * allocate compute nodes, and a resize error will occur. For pools created with - * virtualMachineConfiguration only ARM virtual networks ('Microsoft.Network/virtualNetworks') - * are supported, but for pools created with cloudServiceConfiguration both ARM and classic - * virtual networks are supported. For more details, see: + * The virtual network must be in the same region and subscription as the Azure Batch Account. + * The specified subnet should have enough free IP addresses to accommodate the number of Compute + * Nodes in the Pool. If the subnet doesn't have enough free IP addresses, the Pool will + * partially allocate Nodes and a resize error will occur. The 'MicrosoftAzureBatch' service + * principal must have the 'Classic Virtual Machine Contributor' Role-Based Access Control (RBAC) + * role for the specified VNet. The specified subnet must allow communication from the Azure + * Batch service to be able to schedule Tasks on the Nodes. This can be verified by checking if + * the specified VNet has any associated Network Security Groups (NSG). If communication to the + * Nodes in the specified subnet is denied by an NSG, then the Batch service will set the state + * of the Compute Nodes to unusable. For Pools created with virtualMachineConfiguration only ARM + * virtual networks ('Microsoft.Network/virtualNetworks') are supported, but for Pools created + * with cloudServiceConfiguration both ARM and classic virtual networks are supported. If the + * specified VNet has any associated Network Security Groups (NSG), then a few reserved system + * ports must be enabled for inbound communication. For Pools created with a virtual machine + * configuration, enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for + * Windows. For Pools created with a cloud service configuration, enable ports 10100, 20100, and + * 30100. Also enable outbound connections to Azure Storage on port 443. For more details see: * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration */ subnetId?: string; @@ -1718,40 +1828,191 @@ export interface NetworkConfiguration { */ dynamicVNetAssignmentScope?: DynamicVNetAssignmentScope; /** - * The configuration for endpoints on compute nodes in the Batch pool. Pool endpoint - * configuration is only supported on pools with the virtualMachineConfiguration property. + * The configuration for endpoints on Compute Nodes in the Batch Pool. Pool endpoint + * configuration is only supported on Pools with the virtualMachineConfiguration property. */ endpointConfiguration?: PoolEndpointConfiguration; + /** + * The Public IPAddress configuration for Compute Nodes in the Batch Pool. Public IP + * configuration property is only supported on Pools with the virtualMachineConfiguration + * property. + */ + publicIPAddressConfiguration?: PublicIPAddressConfiguration; +} + +/** + * An interface representing AzureBlobFileSystemConfiguration. + * @summary Information used to connect to an Azure Storage Container using Blobfuse. + */ +export interface AzureBlobFileSystemConfiguration { + /** + * The Azure Storage Account name. + */ + accountName: string; + /** + * The Azure Blob Storage Container name. + */ + containerName: string; + /** + * The Azure Storage Account key. This property is mutually exclusive with sasKey and one must be + * specified. + */ + accountKey?: string; + /** + * The Azure Storage SAS token. This property is mutually exclusive with accountKey and one must + * be specified. + */ + sasKey?: string; + /** + * Additional command line options to pass to the mount command. These are 'net use' options in + * Windows and 'mount' options in Linux. + */ + blobfuseOptions?: string; + /** + * The relative path on the compute node where the file system will be mounted. All file systems + * are mounted relative to the Batch mounts directory, accessible via the + * AZ_BATCH_NODE_MOUNTS_DIR environment variable. + */ + relativeMountPath: string; +} + +/** + * An interface representing NFSMountConfiguration. + * @summary Information used to connect to an NFS file system. + */ +export interface NFSMountConfiguration { + /** + * The URI of the file system to mount. + */ + source: string; + /** + * The relative path on the compute node where the file system will be mounted. All file systems + * are mounted relative to the Batch mounts directory, accessible via the + * AZ_BATCH_NODE_MOUNTS_DIR environment variable. + */ + relativeMountPath: string; + /** + * Additional command line options to pass to the mount command. These are 'net use' options in + * Windows and 'mount' options in Linux. + */ + mountOptions?: string; +} + +/** + * An interface representing CIFSMountConfiguration. + * @summary Information used to connect to a CIFS file system. + */ +export interface CIFSMountConfiguration { + /** + * The user to use for authentication against the CIFS file system. + */ + username: string; + /** + * The URI of the file system to mount. + */ + source: string; + /** + * The relative path on the compute node where the file system will be mounted. All file systems + * are mounted relative to the Batch mounts directory, accessible via the + * AZ_BATCH_NODE_MOUNTS_DIR environment variable. + */ + relativeMountPath: string; + /** + * Additional command line options to pass to the mount command. These are 'net use' options in + * Windows and 'mount' options in Linux. + */ + mountOptions?: string; + /** + * The password to use for authentication against the CIFS file system. + */ + password: string; +} + +/** + * An interface representing AzureFileShareConfiguration. + * @summary Information used to connect to an Azure Fileshare. + */ +export interface AzureFileShareConfiguration { + /** + * The Azure Storage account name. + */ + accountName: string; + /** + * The Azure Files URL. This is of the form 'https://{account}.file.core.windows.net/'. + */ + azureFileUrl: string; + /** + * The Azure Storage account key. + */ + accountKey: string; + /** + * The relative path on the compute node where the file system will be mounted. All file systems + * are mounted relative to the Batch mounts directory, accessible via the + * AZ_BATCH_NODE_MOUNTS_DIR environment variable. + */ + relativeMountPath: string; + /** + * Additional command line options to pass to the mount command. These are 'net use' options in + * Windows and 'mount' options in Linux. + */ + mountOptions?: string; +} + +/** + * An interface representing MountConfiguration. + * @summary The file system to mount on each node. + */ +export interface MountConfiguration { + /** + * The Azure Storage Container to mount using blob FUSE on each node. This property is mutually + * exclusive with all other properties. + */ + azureBlobFileSystemConfiguration?: AzureBlobFileSystemConfiguration; + /** + * The NFS file system to mount on each node. This property is mutually exclusive with all other + * properties. + */ + nfsMountConfiguration?: NFSMountConfiguration; + /** + * The CIFS/SMB file system to mount on each node. This property is mutually exclusive with all + * other properties. + */ + cifsMountConfiguration?: CIFSMountConfiguration; + /** + * The Azure File Share to mount on each node. This property is mutually exclusive with all other + * properties. + */ + azureFileShareConfiguration?: AzureFileShareConfiguration; } /** * An interface representing PoolSpecification. - * @summary Specification for creating a new pool. + * @summary Specification for creating a new Pool. */ export interface PoolSpecification { /** - * The display name for the pool. The display name need not be unique and can contain any Unicode + * The display name for the Pool. The display name need not be unique and can contain any Unicode * characters up to a maximum length of 1024. */ displayName?: string; /** - * The size of the virtual machines in the pool. All virtual machines in a pool are the same - * size. For information about available sizes of virtual machines in pools, see Choose a VM size - * for compute nodes in an Azure Batch pool + * The size of the virtual machines in the Pool. All virtual machines in a Pool are the same + * size. For information about available sizes of virtual machines in Pools, see Choose a VM size + * for Compute Nodes in an Azure Batch Pool * (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). */ vmSize: string; /** - * The cloud service configuration for the pool. This property must be specified if the pool + * The cloud service configuration for the Pool. This property must be specified if the Pool * needs to be created with Azure PaaS VMs. This property and virtualMachineConfiguration are * mutually exclusive and one of the properties must be specified. If neither is specified then * the Batch service returns an error; if you are calling the REST API directly, the HTTP status - * code is 400 (Bad Request). This property cannot be specified if the Batch account was created + * code is 400 (Bad Request). This property cannot be specified if the Batch Account was created * with its poolAllocationMode property set to 'UserSubscription'. */ cloudServiceConfiguration?: CloudServiceConfiguration; /** - * The virtual machine configuration for the pool. This property must be specified if the pool + * The virtual machine configuration for the Pool. This property must be specified if the Pool * needs to be created with Azure IaaS VMs. This property and cloudServiceConfiguration are * mutually exclusive and one of the properties must be specified. If neither is specified then * the Batch service returns an error; if you are calling the REST API directly, the HTTP status @@ -1759,18 +2020,18 @@ export interface PoolSpecification { */ virtualMachineConfiguration?: VirtualMachineConfiguration; /** - * The maximum number of tasks that can run concurrently on a single compute node in the pool. - * The default value is 1. The maximum value is the smaller of 4 times the number of cores of the - * vmSize of the pool or 256. + * The number of task slots that can be used to run concurrent tasks on a single compute node in + * the pool. The default value is 1. The maximum value is the smaller of 4 times the number of + * cores of the vmSize of the pool or 256. */ - maxTasksPerNode?: number; + taskSlotsPerNode?: number; /** - * How tasks are distributed across compute nodes in a pool. If not specified, the default is + * How Tasks are distributed across Compute Nodes in a Pool. If not specified, the default is * spread. */ taskSchedulingPolicy?: TaskSchedulingPolicy; /** - * The timeout for allocation of compute nodes to the pool. This timeout applies only to manual + * The timeout for allocation of Compute Nodes to the Pool. This timeout applies only to manual * scaling; it has no effect when enableAutoScale is set to true. The default value is 15 * minutes. The minimum value is 5 minutes. If you specify a value less than 5 minutes, the Batch * service rejects the request with an error; if you are calling the REST API directly, the HTTP @@ -1778,33 +2039,33 @@ export interface PoolSpecification { */ resizeTimeout?: string; /** - * The desired number of dedicated compute nodes in the pool. This property must not be specified + * The desired number of dedicated Compute Nodes in the Pool. This property must not be specified * if enableAutoScale is set to true. If enableAutoScale is set to false, then you must set * either targetDedicatedNodes, targetLowPriorityNodes, or both. */ targetDedicatedNodes?: number; /** - * The desired number of low-priority compute nodes in the pool. This property must not be + * The desired number of low-priority Compute Nodes in the Pool. This property must not be * specified if enableAutoScale is set to true. If enableAutoScale is set to false, then you must * set either targetDedicatedNodes, targetLowPriorityNodes, or both. */ targetLowPriorityNodes?: number; /** - * Whether the pool size should automatically adjust over time. If false, at least one of + * Whether the Pool size should automatically adjust over time. If false, at least one of * targetDedicateNodes and targetLowPriorityNodes must be specified. If true, the - * autoScaleFormula element is required. The pool automatically resizes according to the formula. + * autoScaleFormula element is required. The Pool automatically resizes according to the formula. * The default value is false. */ enableAutoScale?: boolean; /** - * The formula for the desired number of compute nodes in the pool. This property must not be + * The formula for the desired number of Compute Nodes in the Pool. This property must not be * specified if enableAutoScale is set to false. It is required if enableAutoScale is set to - * true. The formula is checked for validity before the pool is created. If the formula is not + * true. The formula is checked for validity before the Pool is created. If the formula is not * valid, the Batch service rejects the request with detailed error information. */ autoScaleFormula?: string; /** - * The time interval at which to automatically adjust the pool size according to the autoscale + * The time interval at which to automatically adjust the Pool size according to the autoscale * formula. The default value is 15 minutes. The minimum and maximum value are 5 minutes and 168 * hours respectively. If you specify a value less than 5 minutes or greater than 168 hours, the * Batch service rejects the request with an invalid property value error; if you are calling the @@ -1812,197 +2073,203 @@ export interface PoolSpecification { */ autoScaleEvaluationInterval?: string; /** - * Whether the pool permits direct communication between nodes. Enabling inter-node communication - * limits the maximum size of the pool due to deployment restrictions on the nodes of the pool. - * This may result in the pool not reaching its desired size. The default value is false. + * Whether the Pool permits direct communication between Compute Nodes. Enabling inter-node + * communication limits the maximum size of the Pool due to deployment restrictions on the + * Compute Nodes of the Pool. This may result in the Pool not reaching its desired size. The + * default value is false. */ enableInterNodeCommunication?: boolean; /** - * The network configuration for the pool. + * The network configuration for the Pool. */ networkConfiguration?: NetworkConfiguration; /** - * A task to run on each compute node as it joins the pool. The task runs when the node is added - * to the pool or when the node is restarted. + * A Task to run on each Compute Node as it joins the Pool. The Task runs when the Compute Node + * is added to the Pool or when the Compute Node is restarted. */ startTask?: StartTask; /** - * A list of certificates to be installed on each compute node in the pool. For Windows compute - * nodes, the Batch service installs the certificates to the specified certificate store and - * location. For Linux compute nodes, the certificates are stored in a directory inside the task - * working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the - * task to query for this location. For certificates with visibility of 'remoteUser', a 'certs' - * directory is created in the user's home directory (e.g., /home/{user-name}/certs) and - * certificates are placed in that directory. + * A list of Certificates to be installed on each Compute Node in the Pool. For Windows Nodes, + * the Batch service installs the Certificates to the specified Certificate store and location. + * For Linux Compute Nodes, the Certificates are stored in a directory inside the Task working + * directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the Task to + * query for this location. For Certificates with visibility of 'remoteUser', a 'certs' directory + * is created in the user's home directory (e.g., /home/{user-name}/certs) and Certificates are + * placed in that directory. */ certificateReferences?: CertificateReference[]; /** - * The list of application packages to be installed on each compute node in the pool. Changes to - * application package references affect all new compute nodes joining the pool, but do not - * affect compute nodes that are already in the pool until they are rebooted or reimaged. There - * is a maximum of 10 application package references on any given pool. + * The list of Packages to be installed on each Compute Node in the Pool. Changes to Package + * references affect all new Nodes joining the Pool, but do not affect Compute Nodes that are + * already in the Pool until they are rebooted or reimaged. There is a maximum of 10 Package + * references on any given Pool. */ applicationPackageReferences?: ApplicationPackageReference[]; /** - * The list of application licenses the Batch service will make available on each compute node in - * the pool. The list of application licenses must be a subset of available Batch service - * application licenses. If a license is requested which is not supported, pool creation will - * fail. The permitted licenses available on the pool are 'maya', 'vray', '3dsmax', 'arnold'. An - * additional charge applies for each application license added to the pool. + * The list of application licenses the Batch service will make available on each Compute Node in + * the Pool. The list of application licenses must be a subset of available Batch service + * application licenses. If a license is requested which is not supported, Pool creation will + * fail. The permitted licenses available on the Pool are 'maya', 'vray', '3dsmax', 'arnold'. An + * additional charge applies for each application license added to the Pool. */ applicationLicenses?: string[]; /** - * The list of user accounts to be created on each node in the pool. + * The list of user Accounts to be created on each Compute Node in the Pool. */ userAccounts?: UserAccount[]; /** - * A list of name-value pairs associated with the pool as metadata. The Batch service does not + * A list of name-value pairs associated with the Pool as metadata. The Batch service does not * assign any meaning to metadata; it is solely for the use of user code. */ metadata?: MetadataItem[]; + /** + * A list of file systems to mount on each node in the pool. This supports Azure Files, NFS, + * CIFS/SMB, and Blobfuse. + */ + mountConfiguration?: MountConfiguration[]; } /** * An interface representing AutoPoolSpecification. * @summary Specifies characteristics for a temporary 'auto pool'. The Batch service will create - * this auto pool when the job is submitted. + * this auto Pool when the Job is submitted. */ export interface AutoPoolSpecification { /** - * A prefix to be added to the unique identifier when a pool is automatically created. The Batch - * service assigns each auto pool a unique identifier on creation. To distinguish between pools + * A prefix to be added to the unique identifier when a Pool is automatically created. The Batch + * service assigns each auto Pool a unique identifier on creation. To distinguish between Pools * created for different purposes, you can specify this element to add a prefix to the ID that is * assigned. The prefix can be up to 20 characters long. */ autoPoolIdPrefix?: string; /** - * The minimum lifetime of created auto pools, and how multiple jobs on a schedule are assigned - * to pools. Possible values include: 'jobSchedule', 'job' + * The minimum lifetime of created auto Pools, and how multiple Jobs on a schedule are assigned + * to Pools. Possible values include: 'jobSchedule', 'job' */ poolLifetimeOption: PoolLifetimeOption; /** - * Whether to keep an auto pool alive after its lifetime expires. If false, the Batch service - * deletes the pool once its lifetime (as determined by the poolLifetimeOption setting) expires; - * that is, when the job or job schedule completes. If true, the Batch service does not delete - * the pool automatically. It is up to the user to delete auto pools created with this option. + * Whether to keep an auto Pool alive after its lifetime expires. If false, the Batch service + * deletes the Pool once its lifetime (as determined by the poolLifetimeOption setting) expires; + * that is, when the Job or Job Schedule completes. If true, the Batch service does not delete + * the Pool automatically. It is up to the user to delete auto Pools created with this option. */ keepAlive?: boolean; /** - * The pool specification for the auto pool. + * The Pool specification for the auto Pool. */ pool?: PoolSpecification; } /** * An interface representing PoolInformation. - * @summary Specifies how a job should be assigned to a pool. + * @summary Specifies how a Job should be assigned to a Pool. */ export interface PoolInformation { /** - * The ID of an existing pool. All the tasks of the job will run on the specified pool. You must - * ensure that the pool referenced by this property exists. If the pool does not exist at the - * time the Batch service tries to schedule a job, no tasks for the job will run until you create - * a pool with that id. Note that the Batch service will not reject the job request; it will - * simply not run tasks until the pool exists. You must specify either the pool ID or the auto - * pool specification, but not both. + * The ID of an existing Pool. All the Tasks of the Job will run on the specified Pool. You must + * ensure that the Pool referenced by this property exists. If the Pool does not exist at the + * time the Batch service tries to schedule a Job, no Tasks for the Job will run until you create + * a Pool with that id. Note that the Batch service will not reject the Job request; it will + * simply not run Tasks until the Pool exists. You must specify either the Pool ID or the auto + * Pool specification, but not both. */ poolId?: string; /** - * Characteristics for a temporary 'auto pool'. The Batch service will create this auto pool when - * the job is submitted. If auto pool creation fails, the Batch service moves the job to a - * completed state, and the pool creation error is set in the job's scheduling error property. + * Characteristics for a temporary 'auto pool'. The Batch service will create this auto Pool when + * the Job is submitted. If auto Pool creation fails, the Batch service moves the Job to a + * completed state, and the Pool creation error is set in the Job's scheduling error property. * The Batch service manages the lifetime (both creation and, unless keepAlive is specified, - * deletion) of the auto pool. Any user actions that affect the lifetime of the auto pool while - * the job is active will result in unexpected behavior. You must specify either the pool ID or - * the auto pool specification, but not both. + * deletion) of the auto Pool. Any user actions that affect the lifetime of the auto Pool while + * the Job is active will result in unexpected behavior. You must specify either the Pool ID or + * the auto Pool specification, but not both. */ autoPoolSpecification?: AutoPoolSpecification; } /** * An interface representing JobSpecification. - * @summary Specifies details of the jobs to be created on a schedule. + * @summary Specifies details of the Jobs to be created on a schedule. */ export interface JobSpecification { /** - * The priority of jobs created under this schedule. Priority values can range from -1000 to + * The priority of Jobs created under this schedule. Priority values can range from -1000 to * 1000, with -1000 being the lowest priority and 1000 being the highest priority. The default - * value is 0. This priority is used as the default for all jobs under the job schedule. You can - * update a job's priority after it has been created using by using the update job API. + * value is 0. This priority is used as the default for all Jobs under the Job Schedule. You can + * update a Job's priority after it has been created using by using the update Job API. */ priority?: number; /** - * The display name for jobs created under this schedule. The name need not be unique and can + * The display name for Jobs created under this schedule. The name need not be unique and can * contain any Unicode characters up to a maximum length of 1024. */ displayName?: string; /** - * Whether tasks in the job can define dependencies on each other. The default is false. + * Whether Tasks in the Job can define dependencies on each other. The default is false. */ usesTaskDependencies?: boolean; /** - * The action the Batch service should take when all tasks in a job created under this schedule - * are in the completed state. Note that if a job contains no tasks, then all tasks are + * The action the Batch service should take when all Tasks in a Job created under this schedule + * are in the completed state. Note that if a Job contains no Tasks, then all Tasks are * considered complete. This option is therefore most commonly used with a Job Manager task; if - * you want to use automatic job termination without a Job Manager, you should initially set - * onAllTasksComplete to noaction and update the job properties to set onAllTasksComplete to - * terminatejob once you have finished adding tasks. The default is noaction. Possible values + * you want to use automatic Job termination without a Job Manager, you should initially set + * onAllTasksComplete to noaction and update the Job properties to set onAllTasksComplete to + * terminatejob once you have finished adding Tasks. The default is noaction. Possible values * include: 'noAction', 'terminateJob' */ onAllTasksComplete?: OnAllTasksComplete; /** - * The action the Batch service should take when any task fails in a job created under this - * schedule. A task is considered to have failed if it have failed if has a failureInfo. A - * failureInfo is set if the task completes with a non-zero exit code after exhausting its retry - * count, or if there was an error starting the task, for example due to a resource file download + * The action the Batch service should take when any Task fails in a Job created under this + * schedule. A Task is considered to have failed if it have failed if has a failureInfo. A + * failureInfo is set if the Task completes with a non-zero exit code after exhausting its retry + * count, or if there was an error starting the Task, for example due to a resource file download * error. The default is noaction. Possible values include: 'noAction', * 'performExitOptionsJobAction' */ onTaskFailure?: OnTaskFailure; /** - * The network configuration for the job. + * The network configuration for the Job. */ networkConfiguration?: JobNetworkConfiguration; /** - * The execution constraints for jobs created under this schedule. + * The execution constraints for Jobs created under this schedule. */ constraints?: JobConstraints; /** - * The details of a Job Manager task to be launched when a job is started under this schedule. If - * the job does not specify a Job Manager task, the user must explicitly add tasks to the job - * using the Task API. If the job does specify a Job Manager task, the Batch service creates the - * Job Manager task when the job is created, and will try to schedule the Job Manager task before - * scheduling other tasks in the job. + * The details of a Job Manager Task to be launched when a Job is started under this schedule. If + * the Job does not specify a Job Manager Task, the user must explicitly add Tasks to the Job + * using the Task API. If the Job does specify a Job Manager Task, the Batch service creates the + * Job Manager Task when the Job is created, and will try to schedule the Job Manager Task before + * scheduling other Tasks in the Job. */ jobManagerTask?: JobManagerTask; /** - * The Job Preparation task for jobs created under this schedule. If a job has a Job Preparation - * task, the Batch service will run the Job Preparation task on a compute node before starting - * any tasks of that job on that compute node. + * The Job Preparation Task for Jobs created under this schedule. If a Job has a Job Preparation + * Task, the Batch service will run the Job Preparation Task on a Node before starting any Tasks + * of that Job on that Compute Node. */ jobPreparationTask?: JobPreparationTask; /** - * The Job Release task for jobs created under this schedule. The primary purpose of the Job - * Release task is to undo changes to compute nodes made by the Job Preparation task. Example - * activities include deleting local files, or shutting down services that were started as part - * of job preparation. A Job Release task cannot be specified without also specifying a Job - * Preparation task for the job. The Batch service runs the Job Release task on the compute nodes - * that have run the Job Preparation task. + * The Job Release Task for Jobs created under this schedule. The primary purpose of the Job + * Release Task is to undo changes to Nodes made by the Job Preparation Task. Example activities + * include deleting local files, or shutting down services that were started as part of Job + * preparation. A Job Release Task cannot be specified without also specifying a Job Preparation + * Task for the Job. The Batch service runs the Job Release Task on the Compute Nodes that have + * run the Job Preparation Task. */ jobReleaseTask?: JobReleaseTask; /** * A list of common environment variable settings. These environment variables are set for all - * tasks in jobs created under this schedule (including the Job Manager, Job Preparation and Job - * Release tasks). Individual tasks can override an environment setting specified here by + * Tasks in Jobs created under this schedule (including the Job Manager, Job Preparation and Job + * Release Tasks). Individual Tasks can override an environment setting specified here by * specifying the same setting name with a different value. */ commonEnvironmentSettings?: EnvironmentSetting[]; /** - * The pool on which the Batch service runs the tasks of jobs created under this schedule. + * The Pool on which the Batch service runs the Tasks of Jobs created under this schedule. */ poolInfo: PoolInformation; /** - * A list of name-value pairs associated with each job created under this schedule as metadata. + * A list of name-value pairs associated with each Job created under this schedule as metadata. * The Batch service does not assign any meaning to metadata; it is solely for the use of user * code. */ @@ -2011,38 +2278,38 @@ export interface JobSpecification { /** * An interface representing RecentJob. - * @summary Information about the most recent job to run under the job schedule. + * @summary Information about the most recent Job to run under the Job Schedule. */ export interface RecentJob { /** - * The ID of the job. + * The ID of the Job. */ id?: string; /** - * The URL of the job. + * The URL of the Job. */ url?: string; } /** * An interface representing JobScheduleExecutionInformation. - * @summary Contains information about jobs that have been and will be run under a job schedule. + * @summary Contains information about Jobs that have been and will be run under a Job Schedule. */ export interface JobScheduleExecutionInformation { /** - * The next time at which a job will be created under this schedule. This property is meaningful + * The next time at which a Job will be created under this schedule. This property is meaningful * only if the schedule is in the active state when the time comes around. For example, if the - * schedule is disabled, no job will be created at nextRunTime unless the job is enabled before + * schedule is disabled, no Job will be created at nextRunTime unless the Job is enabled before * then. */ nextRunTime?: Date; /** - * Information about the most recent job under the job schedule. This property is present only if - * the at least one job has run under the schedule. + * Information about the most recent Job under the Job Schedule. This property is present only if + * the at least one Job has run under the schedule. */ recentJob?: RecentJob; /** - * The time at which the schedule ended. This property is set only if the job schedule is in the + * The time at which the schedule ended. This property is set only if the Job Schedule is in the * completed state. */ endTime?: Date; @@ -2050,7 +2317,7 @@ export interface JobScheduleExecutionInformation { /** * An interface representing JobScheduleStatistics. - * @summary Resource usage statistics for a job schedule. + * @summary Resource usage statistics for a Job Schedule. */ export interface JobScheduleStatistics { /** @@ -2067,74 +2334,74 @@ export interface JobScheduleStatistics { */ lastUpdateTime: Date; /** - * The total user mode CPU time (summed across all cores and all compute nodes) consumed by all - * tasks in all jobs created under the schedule. + * The total user mode CPU time (summed across all cores and all Compute Nodes) consumed by all + * Tasks in all Jobs created under the schedule. */ userCPUTime: string; /** - * The total kernel mode CPU time (summed across all cores and all compute nodes) consumed by all - * tasks in all jobs created under the schedule. + * The total kernel mode CPU time (summed across all cores and all Compute Nodes) consumed by all + * Tasks in all Jobs created under the schedule. */ kernelCPUTime: string; /** - * The total wall clock time of all the tasks in all the jobs created under the schedule. The - * wall clock time is the elapsed time from when the task started running on a compute node to - * when it finished (or to the last time the statistics were updated, if the task had not - * finished by then). If a task was retried, this includes the wall clock time of all the task + * The total wall clock time of all the Tasks in all the Jobs created under the schedule. The + * wall clock time is the elapsed time from when the Task started running on a Compute Node to + * when it finished (or to the last time the statistics were updated, if the Task had not + * finished by then). If a Task was retried, this includes the wall clock time of all the Task * retries. */ wallClockTime: string; /** - * The total number of disk read operations made by all tasks in all jobs created under the + * The total number of disk read operations made by all Tasks in all Jobs created under the * schedule. */ readIOps: number; /** - * The total number of disk write operations made by all tasks in all jobs created under the + * The total number of disk write operations made by all Tasks in all Jobs created under the * schedule. */ writeIOps: number; /** - * The total gibibytes read from disk by all tasks in all jobs created under the schedule. + * The total gibibytes read from disk by all Tasks in all Jobs created under the schedule. */ readIOGiB: number; /** - * The total gibibytes written to disk by all tasks in all jobs created under the schedule. + * The total gibibytes written to disk by all Tasks in all Jobs created under the schedule. */ writeIOGiB: number; /** - * The total number of tasks successfully completed during the given time range in jobs created - * under the schedule. A task completes successfully if it returns exit code 0. + * The total number of Tasks successfully completed during the given time range in Jobs created + * under the schedule. A Task completes successfully if it returns exit code 0. */ numSucceededTasks: number; /** - * The total number of tasks that failed during the given time range in jobs created under the - * schedule. A task fails if it exhausts its maximum retry count without returning exit code 0. + * The total number of Tasks that failed during the given time range in Jobs created under the + * schedule. A Task fails if it exhausts its maximum retry count without returning exit code 0. */ numFailedTasks: number; /** - * The total number of retries during the given time range on all tasks in all jobs created under + * The total number of retries during the given time range on all Tasks in all Jobs created under * the schedule. */ numTaskRetries: number; /** - * The total wait time of all tasks in all jobs created under the schedule. The wait time for a - * task is defined as the elapsed time between the creation of the task and the start of task - * execution. (If the task is retried due to failures, the wait time is the time to the most - * recent task execution.). This value is only reported in the account lifetime statistics; it is - * not included in the job statistics. + * The total wait time of all Tasks in all Jobs created under the schedule. The wait time for a + * Task is defined as the elapsed time between the creation of the Task and the start of Task + * execution. (If the Task is retried due to failures, the wait time is the time to the most + * recent Task execution.). This value is only reported in the Account lifetime statistics; it is + * not included in the Job statistics. */ waitTime: string; } /** * An interface representing CloudJobSchedule. - * @summary A job schedule that allows recurring jobs by specifying when to run jobs and a - * specification used to create each job. + * @summary A Job Schedule that allows recurring Jobs by specifying when to run Jobs and a + * specification used to create each Job. */ export interface CloudJobSchedule { /** - * A string that uniquely identifies the schedule within the account. + * A string that uniquely identifies the schedule within the Account. */ id?: string; /** @@ -2142,56 +2409,56 @@ export interface CloudJobSchedule { */ displayName?: string; /** - * The URL of the job schedule. + * The URL of the Job Schedule. */ url?: string; /** - * The ETag of the job schedule. This is an opaque string. You can use it to detect whether the - * job schedule has changed between requests. In particular, you can be pass the ETag with an + * The ETag of the Job Schedule. This is an opaque string. You can use it to detect whether the + * Job Schedule has changed between requests. In particular, you can be pass the ETag with an * Update Job Schedule request to specify that your changes should take effect only if nobody * else has modified the schedule in the meantime. */ eTag?: string; /** - * The last modified time of the job schedule. This is the last time at which the schedule level - * data, such as the job specification or recurrence information, changed. It does not factor in - * job-level changes such as new jobs being created or jobs changing state. + * The last modified time of the Job Schedule. This is the last time at which the schedule level + * data, such as the Job specification or recurrence information, changed. It does not factor in + * job-level changes such as new Jobs being created or Jobs changing state. */ lastModified?: Date; /** - * The creation time of the job schedule. + * The creation time of the Job Schedule. */ creationTime?: Date; /** - * The current state of the job schedule. Possible values include: 'active', 'completed', + * The current state of the Job Schedule. Possible values include: 'active', 'completed', * 'disabled', 'terminating', 'deleting' */ state?: JobScheduleState; /** - * The time at which the job schedule entered the current state. + * The time at which the Job Schedule entered the current state. */ stateTransitionTime?: Date; /** - * The previous state of the job schedule. This property is not present if the job schedule is in + * The previous state of the Job Schedule. This property is not present if the Job Schedule is in * its initial active state. Possible values include: 'active', 'completed', 'disabled', * 'terminating', 'deleting' */ previousState?: JobScheduleState; /** - * The time at which the job schedule entered its previous state. This property is not present if - * the job schedule is in its initial active state. + * The time at which the Job Schedule entered its previous state. This property is not present if + * the Job Schedule is in its initial active state. */ previousStateTransitionTime?: Date; /** - * The schedule according to which jobs will be created. + * The schedule according to which Jobs will be created. */ schedule?: Schedule; /** - * The details of the jobs to be created on this schedule. + * The details of the Jobs to be created on this schedule. */ jobSpecification?: JobSpecification; /** - * Information about jobs that have been and will be run under this schedule. + * Information about Jobs that have been and will be run under this schedule. */ executionInfo?: JobScheduleExecutionInformation; /** @@ -2200,7 +2467,7 @@ export interface CloudJobSchedule { */ metadata?: MetadataItem[]; /** - * The lifetime resource usage statistics for the job schedule. The statistics may not be + * The lifetime resource usage statistics for the Job Schedule. The statistics may not be * immediately available. The Batch service performs periodic roll-up of statistics. The typical * delay is about 30 minutes. */ @@ -2209,15 +2476,15 @@ export interface CloudJobSchedule { /** * An interface representing JobScheduleAddParameter. - * @summary A job schedule that allows recurring jobs by specifying when to run jobs and a - * specification used to create each job. + * @summary A Job Schedule that allows recurring Jobs by specifying when to run Jobs and a + * specification used to create each Job. */ export interface JobScheduleAddParameter { /** - * A string that uniquely identifies the schedule within the account. The ID can contain any + * A string that uniquely identifies the schedule within the Account. The ID can contain any * combination of alphanumeric characters including hyphens and underscores, and cannot contain * more than 64 characters. The ID is case-preserving and case-insensitive (that is, you may not - * have two IDs within an account that differ only by case). + * have two IDs within an Account that differ only by case). */ id: string; /** @@ -2226,11 +2493,11 @@ export interface JobScheduleAddParameter { */ displayName?: string; /** - * The schedule according to which jobs will be created. + * The schedule according to which Jobs will be created. */ schedule: Schedule; /** - * The details of the jobs to be created on this schedule. + * The details of the Jobs to be created on this schedule. */ jobSpecification: JobSpecification; /** @@ -2242,20 +2509,20 @@ export interface JobScheduleAddParameter { /** * An interface representing JobSchedulingError. - * @summary An error encountered by the Batch service when scheduling a job. + * @summary An error encountered by the Batch service when scheduling a Job. */ export interface JobSchedulingError { /** - * The category of the job scheduling error. Possible values include: 'userError', 'serverError' + * The category of the Job scheduling error. Possible values include: 'userError', 'serverError' */ category: ErrorCategory; /** - * An identifier for the job scheduling error. Codes are invariant and are intended to be + * An identifier for the Job scheduling error. Codes are invariant and are intended to be * consumed programmatically. */ code?: string; /** - * A message describing the job scheduling error, intended to be suitable for display in a user + * A message describing the Job scheduling error, intended to be suitable for display in a user * interface. */ message?: string; @@ -2267,168 +2534,168 @@ export interface JobSchedulingError { /** * An interface representing JobExecutionInformation. - * @summary Contains information about the execution of a job in the Azure Batch service. + * @summary Contains information about the execution of a Job in the Azure Batch service. */ export interface JobExecutionInformation { /** - * The start time of the job. This is the time at which the job was created. + * The start time of the Job. This is the time at which the Job was created. */ startTime: Date; /** - * The completion time of the job. This property is set only if the job is in the completed + * The completion time of the Job. This property is set only if the Job is in the completed * state. */ endTime?: Date; /** - * The ID of the pool to which this job is assigned. This element contains the actual pool where - * the job is assigned. When you get job details from the service, they also contain a poolInfo - * element, which contains the pool configuration data from when the job was added or updated. + * The ID of the Pool to which this Job is assigned. This element contains the actual Pool where + * the Job is assigned. When you get Job details from the service, they also contain a poolInfo + * element, which contains the Pool configuration data from when the Job was added or updated. * That poolInfo element may also contain a poolId element. If it does, the two IDs are the same. - * If it does not, it means the job ran on an auto pool, and this property contains the ID of - * that auto pool. + * If it does not, it means the Job ran on an auto Pool, and this property contains the ID of + * that auto Pool. */ poolId?: string; /** - * Details of any error encountered by the service in starting the job. This property is not set - * if there was no error starting the job. + * Details of any error encountered by the service in starting the Job. This property is not set + * if there was no error starting the Job. */ schedulingError?: JobSchedulingError; /** - * A string describing the reason the job ended. This property is set only if the job is in the - * completed state. If the Batch service terminates the job, it sets the reason as follows: - * JMComplete - the Job Manager task completed, and killJobOnCompletion was set to true. - * MaxWallClockTimeExpiry - the job reached its maxWallClockTime constraint. TerminateJobSchedule - * - the job ran as part of a schedule, and the schedule terminated. AllTasksComplete - the job's - * onAllTasksComplete attribute is set to terminatejob, and all tasks in the job are complete. - * TaskFailed - the job's onTaskFailure attribute is set to performExitOptionsJobAction, and a - * task in the job failed with an exit condition that specified a jobAction of terminatejob. Any - * other string is a user-defined reason specified in a call to the 'Terminate a job' operation. + * A string describing the reason the Job ended. This property is set only if the Job is in the + * completed state. If the Batch service terminates the Job, it sets the reason as follows: + * JMComplete - the Job Manager Task completed, and killJobOnCompletion was set to true. + * MaxWallClockTimeExpiry - the Job reached its maxWallClockTime constraint. TerminateJobSchedule + * - the Job ran as part of a schedule, and the schedule terminated. AllTasksComplete - the Job's + * onAllTasksComplete attribute is set to terminatejob, and all Tasks in the Job are complete. + * TaskFailed - the Job's onTaskFailure attribute is set to performExitOptionsJobAction, and a + * Task in the Job failed with an exit condition that specified a jobAction of terminatejob. Any + * other string is a user-defined reason specified in a call to the 'Terminate a Job' operation. */ terminateReason?: string; } /** * An interface representing CloudJob. - * @summary An Azure Batch job. + * @summary An Azure Batch Job. */ export interface CloudJob { /** - * A string that uniquely identifies the job within the account. The ID is case-preserving and - * case-insensitive (that is, you may not have two IDs within an account that differ only by + * A string that uniquely identifies the Job within the Account. The ID is case-preserving and + * case-insensitive (that is, you may not have two IDs within an Account that differ only by * case). */ id?: string; /** - * The display name for the job. + * The display name for the Job. */ displayName?: string; /** - * Whether tasks in the job can define dependencies on each other. The default is false. + * Whether Tasks in the Job can define dependencies on each other. The default is false. */ usesTaskDependencies?: boolean; /** - * The URL of the job. + * The URL of the Job. */ url?: string; /** - * The ETag of the job. This is an opaque string. You can use it to detect whether the job has - * changed between requests. In particular, you can be pass the ETag when updating a job to - * specify that your changes should take effect only if nobody else has modified the job in the + * The ETag of the Job. This is an opaque string. You can use it to detect whether the Job has + * changed between requests. In particular, you can be pass the ETag when updating a Job to + * specify that your changes should take effect only if nobody else has modified the Job in the * meantime. */ eTag?: string; /** - * The last modified time of the job. This is the last time at which the job level data, such as - * the job state or priority, changed. It does not factor in task-level changes such as adding - * new tasks or tasks changing state. + * The last modified time of the Job. This is the last time at which the Job level data, such as + * the Job state or priority, changed. It does not factor in task-level changes such as adding + * new Tasks or Tasks changing state. */ lastModified?: Date; /** - * The creation time of the job. + * The creation time of the Job. */ creationTime?: Date; /** - * The current state of the job. Possible values include: 'active', 'disabling', 'disabled', + * The current state of the Job. Possible values include: 'active', 'disabling', 'disabled', * 'enabling', 'terminating', 'completed', 'deleting' */ state?: JobState; /** - * The time at which the job entered its current state. + * The time at which the Job entered its current state. */ stateTransitionTime?: Date; /** - * The previous state of the job. This property is not set if the job is in its initial Active + * The previous state of the Job. This property is not set if the Job is in its initial Active * state. Possible values include: 'active', 'disabling', 'disabled', 'enabling', 'terminating', * 'completed', 'deleting' */ previousState?: JobState; /** - * The time at which the job entered its previous state. This property is not set if the job is + * The time at which the Job entered its previous state. This property is not set if the Job is * in its initial Active state. */ previousStateTransitionTime?: Date; /** - * The priority of the job. Priority values can range from -1000 to 1000, with -1000 being the + * The priority of the Job. Priority values can range from -1000 to 1000, with -1000 being the * lowest priority and 1000 being the highest priority. The default value is 0. */ priority?: number; /** - * The execution constraints for the job. + * The execution constraints for the Job. */ constraints?: JobConstraints; /** - * Details of a Job Manager task to be launched when the job is started. + * Details of a Job Manager Task to be launched when the Job is started. */ jobManagerTask?: JobManagerTask; /** - * The Job Preparation task. The Job Preparation task is a special task run on each node before - * any other task of the job. + * The Job Preparation Task. The Job Preparation Task is a special Task run on each Compute Node + * before any other Task of the Job. */ jobPreparationTask?: JobPreparationTask; /** - * The Job Release task. The Job Release task is a special task run at the end of the job on each - * node that has run any other task of the job. + * The Job Release Task. The Job Release Task is a special Task run at the end of the Job on each + * Compute Node that has run any other Task of the Job. */ jobReleaseTask?: JobReleaseTask; /** * The list of common environment variable settings. These environment variables are set for all - * tasks in the job (including the Job Manager, Job Preparation and Job Release tasks). - * Individual tasks can override an environment setting specified here by specifying the same + * Tasks in the Job (including the Job Manager, Job Preparation and Job Release Tasks). + * Individual Tasks can override an environment setting specified here by specifying the same * setting name with a different value. */ commonEnvironmentSettings?: EnvironmentSetting[]; /** - * The pool settings associated with the job. + * The Pool settings associated with the Job. */ poolInfo?: PoolInformation; /** - * The action the Batch service should take when all tasks in the job are in the completed state. + * The action the Batch service should take when all Tasks in the Job are in the completed state. * The default is noaction. Possible values include: 'noAction', 'terminateJob' */ onAllTasksComplete?: OnAllTasksComplete; /** - * The action the Batch service should take when any task in the job fails. A task is considered - * to have failed if has a failureInfo. A failureInfo is set if the task completes with a + * The action the Batch service should take when any Task in the Job fails. A Task is considered + * to have failed if has a failureInfo. A failureInfo is set if the Task completes with a * non-zero exit code after exhausting its retry count, or if there was an error starting the - * task, for example due to a resource file download error. The default is noaction. Possible + * Task, for example due to a resource file download error. The default is noaction. Possible * values include: 'noAction', 'performExitOptionsJobAction' */ onTaskFailure?: OnTaskFailure; /** - * The network configuration for the job. + * The network configuration for the Job. */ networkConfiguration?: JobNetworkConfiguration; /** - * A list of name-value pairs associated with the job as metadata. The Batch service does not + * A list of name-value pairs associated with the Job as metadata. The Batch service does not * assign any meaning to metadata; it is solely for the use of user code. */ metadata?: MetadataItem[]; /** - * The execution information for the job. + * The execution information for the Job. */ executionInfo?: JobExecutionInformation; /** - * Resource usage statistics for the entire lifetime of the job. This property is populated only + * Resource usage statistics for the entire lifetime of the Job. This property is populated only * if the CloudJob was retrieved with an expand clause including the 'stats' attribute; otherwise * it is null. The statistics may not be immediately available. The Batch service performs * periodic roll-up of statistics. The typical delay is about 30 minutes. @@ -2438,103 +2705,102 @@ export interface CloudJob { /** * An interface representing JobAddParameter. - * @summary An Azure Batch job to add. + * @summary An Azure Batch Job to add. */ export interface JobAddParameter { /** - * A string that uniquely identifies the job within the account. The ID can contain any + * A string that uniquely identifies the Job within the Account. The ID can contain any * combination of alphanumeric characters including hyphens and underscores, and cannot contain * more than 64 characters. The ID is case-preserving and case-insensitive (that is, you may not - * have two IDs within an account that differ only by case). + * have two IDs within an Account that differ only by case). */ id: string; /** - * The display name for the job. The display name need not be unique and can contain any Unicode + * The display name for the Job. The display name need not be unique and can contain any Unicode * characters up to a maximum length of 1024. */ displayName?: string; /** - * The priority of the job. Priority values can range from -1000 to 1000, with -1000 being the + * The priority of the Job. Priority values can range from -1000 to 1000, with -1000 being the * lowest priority and 1000 being the highest priority. The default value is 0. */ priority?: number; /** - * The execution constraints for the job. + * The execution constraints for the Job. */ constraints?: JobConstraints; /** - * Details of a Job Manager task to be launched when the job is started. If the job does not - * specify a Job Manager task, the user must explicitly add tasks to the job. If the job does - * specify a Job Manager task, the Batch service creates the Job Manager task when the job is - * created, and will try to schedule the Job Manager task before scheduling other tasks in the - * job. The Job Manager task's typical purpose is to control and/or monitor job execution, for - * example by deciding what additional tasks to run, determining when the work is complete, etc. - * (However, a Job Manager task is not restricted to these activities - it is a fully-fledged - * task in the system and perform whatever actions are required for the job.) For example, a Job - * Manager task might download a file specified as a parameter, analyze the contents of that file - * and submit additional tasks based on those contents. + * Details of a Job Manager Task to be launched when the Job is started. If the Job does not + * specify a Job Manager Task, the user must explicitly add Tasks to the Job. If the Job does + * specify a Job Manager Task, the Batch service creates the Job Manager Task when the Job is + * created, and will try to schedule the Job Manager Task before scheduling other Tasks in the + * Job. The Job Manager Task's typical purpose is to control and/or monitor Job execution, for + * example by deciding what additional Tasks to run, determining when the work is complete, etc. + * (However, a Job Manager Task is not restricted to these activities - it is a fully-fledged + * Task in the system and perform whatever actions are required for the Job.) For example, a Job + * Manager Task might download a file specified as a parameter, analyze the contents of that file + * and submit additional Tasks based on those contents. */ jobManagerTask?: JobManagerTask; /** - * The Job Preparation task. If a job has a Job Preparation task, the Batch service will run the - * Job Preparation task on a compute node before starting any tasks of that job on that compute - * node. + * The Job Preparation Task. If a Job has a Job Preparation Task, the Batch service will run the + * Job Preparation Task on a Node before starting any Tasks of that Job on that Compute Node. */ jobPreparationTask?: JobPreparationTask; /** - * The Job Release task. A Job Release task cannot be specified without also specifying a Job - * Preparation task for the job. The Batch service runs the Job Release task on the compute nodes - * that have run the Job Preparation task. The primary purpose of the Job Release task is to undo - * changes to compute nodes made by the Job Preparation task. Example activities include deleting - * local files, or shutting down services that were started as part of job preparation. + * The Job Release Task. A Job Release Task cannot be specified without also specifying a Job + * Preparation Task for the Job. The Batch service runs the Job Release Task on the Nodes that + * have run the Job Preparation Task. The primary purpose of the Job Release Task is to undo + * changes to Compute Nodes made by the Job Preparation Task. Example activities include deleting + * local files, or shutting down services that were started as part of Job preparation. */ jobReleaseTask?: JobReleaseTask; /** * The list of common environment variable settings. These environment variables are set for all - * tasks in the job (including the Job Manager, Job Preparation and Job Release tasks). - * Individual tasks can override an environment setting specified here by specifying the same + * Tasks in the Job (including the Job Manager, Job Preparation and Job Release Tasks). + * Individual Tasks can override an environment setting specified here by specifying the same * setting name with a different value. */ commonEnvironmentSettings?: EnvironmentSetting[]; /** - * The pool on which the Batch service runs the job's tasks. + * The Pool on which the Batch service runs the Job's Tasks. */ poolInfo: PoolInformation; /** - * The action the Batch service should take when all tasks in the job are in the completed state. - * Note that if a job contains no tasks, then all tasks are considered complete. This option is - * therefore most commonly used with a Job Manager task; if you want to use automatic job + * The action the Batch service should take when all Tasks in the Job are in the completed state. + * Note that if a Job contains no Tasks, then all Tasks are considered complete. This option is + * therefore most commonly used with a Job Manager task; if you want to use automatic Job * termination without a Job Manager, you should initially set onAllTasksComplete to noaction and - * update the job properties to set onAllTasksComplete to terminatejob once you have finished - * adding tasks. The default is noaction. Possible values include: 'noAction', 'terminateJob' + * update the Job properties to set onAllTasksComplete to terminatejob once you have finished + * adding Tasks. The default is noaction. Possible values include: 'noAction', 'terminateJob' */ onAllTasksComplete?: OnAllTasksComplete; /** - * The action the Batch service should take when any task in the job fails. A task is considered - * to have failed if has a failureInfo. A failureInfo is set if the task completes with a + * The action the Batch service should take when any Task in the Job fails. A Task is considered + * to have failed if has a failureInfo. A failureInfo is set if the Task completes with a * non-zero exit code after exhausting its retry count, or if there was an error starting the - * task, for example due to a resource file download error. The default is noaction. Possible + * Task, for example due to a resource file download error. The default is noaction. Possible * values include: 'noAction', 'performExitOptionsJobAction' */ onTaskFailure?: OnTaskFailure; /** - * A list of name-value pairs associated with the job as metadata. The Batch service does not + * A list of name-value pairs associated with the Job as metadata. The Batch service does not * assign any meaning to metadata; it is solely for the use of user code. */ metadata?: MetadataItem[]; /** - * Whether tasks in the job can define dependencies on each other. The default is false. + * Whether Tasks in the Job can define dependencies on each other. The default is false. */ usesTaskDependencies?: boolean; /** - * The network configuration for the job. + * The network configuration for the Job. */ networkConfiguration?: JobNetworkConfiguration; } /** * An interface representing TaskContainerExecutionInformation. - * @summary Contains information about the container which a task is executing. + * @summary Contains information about the container which a Task is executing. */ export interface TaskContainerExecutionInformation { /** @@ -2556,20 +2822,20 @@ export interface TaskContainerExecutionInformation { /** * An interface representing TaskFailureInformation. - * @summary Information about a task failure. + * @summary Information about a Task failure. */ export interface TaskFailureInformation { /** - * The category of the task error. Possible values include: 'userError', 'serverError' + * The category of the Task error. Possible values include: 'userError', 'serverError' */ category: ErrorCategory; /** - * An identifier for the task error. Codes are invariant and are intended to be consumed + * An identifier for the Task error. Codes are invariant and are intended to be consumed * programmatically. */ code?: string; /** - * A message describing the task error, intended to be suitable for display in a user interface. + * A message describing the Task error, intended to be suitable for display in a user interface. */ message?: string; /** @@ -2580,71 +2846,71 @@ export interface TaskFailureInformation { /** * An interface representing JobPreparationTaskExecutionInformation. - * @summary Contains information about the execution of a Job Preparation task on a compute node. + * @summary Contains information about the execution of a Job Preparation Task on a Compute Node. */ export interface JobPreparationTaskExecutionInformation { /** - * The time at which the task started running. If the task has been restarted or retried, this is - * the most recent time at which the task started running. + * The time at which the Task started running. If the Task has been restarted or retried, this is + * the most recent time at which the Task started running. */ startTime: Date; /** - * The time at which the Job Preparation task completed. This property is set only if the task is + * The time at which the Job Preparation Task completed. This property is set only if the Task is * in the Completed state. */ endTime?: Date; /** - * The current state of the Job Preparation task on the compute node. Possible values include: + * The current state of the Job Preparation Task on the Compute Node. Possible values include: * 'running', 'completed' */ state: JobPreparationTaskState; /** - * The root directory of the Job Preparation task on the compute node. You can use this path to - * retrieve files created by the task, such as log files. + * The root directory of the Job Preparation Task on the Compute Node. You can use this path to + * retrieve files created by the Task, such as log files. */ taskRootDirectory?: string; /** - * The URL to the root directory of the Job Preparation task on the compute node. + * The URL to the root directory of the Job Preparation Task on the Compute Node. */ taskRootDirectoryUrl?: string; /** - * The exit code of the program specified on the task command line. This parameter is returned - * only if the task is in the completed state. The exit code for a process reflects the specific + * The exit code of the program specified on the Task command line. This parameter is returned + * only if the Task is in the completed state. The exit code for a process reflects the specific * convention implemented by the application developer for that process. If you use the exit code * value to make decisions in your code, be sure that you know the exit code convention used by - * the application process. Note that the exit code may also be generated by the compute node + * the application process. Note that the exit code may also be generated by the Compute Node * operating system, such as when a process is forcibly terminated. */ exitCode?: number; /** - * Information about the container under which the task is executing. This property is set only - * if the task runs in a container context. + * Information about the container under which the Task is executing. This property is set only + * if the Task runs in a container context. */ containerInfo?: TaskContainerExecutionInformation; /** - * Information describing the task failure, if any. This property is set only if the task is in + * Information describing the Task failure, if any. This property is set only if the Task is in * the completed state and encountered a failure. */ failureInfo?: TaskFailureInformation; /** - * The number of times the task has been retried by the Batch service. Task application failures - * (non-zero exit code) are retried, pre-processing errors (the task could not be run) and file - * upload errors are not retried. The Batch service will retry the task up to the limit specified + * The number of times the Task has been retried by the Batch service. Task application failures + * (non-zero exit code) are retried, pre-processing errors (the Task could not be run) and file + * upload errors are not retried. The Batch service will retry the Task up to the limit specified * by the constraints. Task application failures (non-zero exit code) are retried, pre-processing - * errors (the task could not be run) and file upload errors are not retried. The Batch service - * will retry the task up to the limit specified by the constraints. + * errors (the Task could not be run) and file upload errors are not retried. The Batch service + * will retry the Task up to the limit specified by the constraints. */ retryCount: number; /** - * The most recent time at which a retry of the Job Preparation task started running. This - * property is set only if the task was retried (i.e. retryCount is nonzero). If present, this is - * typically the same as startTime, but may be different if the task has been restarted for - * reasons other than retry; for example, if the compute node was rebooted during a retry, then + * The most recent time at which a retry of the Job Preparation Task started running. This + * property is set only if the Task was retried (i.e. retryCount is nonzero). If present, this is + * typically the same as startTime, but may be different if the Task has been restarted for + * reasons other than retry; for example, if the Compute Node was rebooted during a retry, then * the startTime is updated but the lastRetryTime is not. */ lastRetryTime?: Date; /** - * The result of the task execution. If the value is 'failed', then the details of the failure + * The result of the Task execution. If the value is 'failed', then the details of the failure * can be found in the failureInfo property. Possible values include: 'success', 'failure' */ result?: TaskExecutionResult; @@ -2652,54 +2918,54 @@ export interface JobPreparationTaskExecutionInformation { /** * An interface representing JobReleaseTaskExecutionInformation. - * @summary Contains information about the execution of a Job Release task on a compute node. + * @summary Contains information about the execution of a Job Release Task on a Compute Node. */ export interface JobReleaseTaskExecutionInformation { /** - * The time at which the task started running. If the task has been restarted or retried, this is - * the most recent time at which the task started running. + * The time at which the Task started running. If the Task has been restarted or retried, this is + * the most recent time at which the Task started running. */ startTime: Date; /** - * The time at which the Job Release task completed. This property is set only if the task is in + * The time at which the Job Release Task completed. This property is set only if the Task is in * the Completed state. */ endTime?: Date; /** - * The current state of the Job Release task on the compute node. Possible values include: + * The current state of the Job Release Task on the Compute Node. Possible values include: * 'running', 'completed' */ state: JobReleaseTaskState; /** - * The root directory of the Job Release task on the compute node. You can use this path to - * retrieve files created by the task, such as log files. + * The root directory of the Job Release Task on the Compute Node. You can use this path to + * retrieve files created by the Task, such as log files. */ taskRootDirectory?: string; /** - * The URL to the root directory of the Job Release task on the compute node. + * The URL to the root directory of the Job Release Task on the Compute Node. */ taskRootDirectoryUrl?: string; /** - * The exit code of the program specified on the task command line. This parameter is returned - * only if the task is in the completed state. The exit code for a process reflects the specific + * The exit code of the program specified on the Task command line. This parameter is returned + * only if the Task is in the completed state. The exit code for a process reflects the specific * convention implemented by the application developer for that process. If you use the exit code * value to make decisions in your code, be sure that you know the exit code convention used by - * the application process. Note that the exit code may also be generated by the compute node + * the application process. Note that the exit code may also be generated by the Compute Node * operating system, such as when a process is forcibly terminated. */ exitCode?: number; /** - * Information about the container under which the task is executing. This property is set only - * if the task runs in a container context. + * Information about the container under which the Task is executing. This property is set only + * if the Task runs in a container context. */ containerInfo?: TaskContainerExecutionInformation; /** - * Information describing the task failure, if any. This property is set only if the task is in + * Information describing the Task failure, if any. This property is set only if the Task is in * the completed state and encountered a failure. */ failureInfo?: TaskFailureInformation; /** - * The result of the task execution. If the value is 'failed', then the details of the failure + * The result of the Task execution. If the value is 'failed', then the details of the failure * can be found in the failureInfo property. Possible values include: 'success', 'failure' */ result?: TaskExecutionResult; @@ -2707,64 +2973,106 @@ export interface JobReleaseTaskExecutionInformation { /** * An interface representing JobPreparationAndReleaseTaskExecutionInformation. - * @summary The status of the Job Preparation and Job Release tasks on a compute node. + * @summary The status of the Job Preparation and Job Release Tasks on a Compute Node. */ export interface JobPreparationAndReleaseTaskExecutionInformation { /** - * The ID of the pool containing the compute node to which this entry refers. + * The ID of the Pool containing the Compute Node to which this entry refers. */ poolId?: string; /** - * The ID of the compute node to which this entry refers. + * The ID of the Compute Node to which this entry refers. */ nodeId?: string; /** - * The URL of the compute node to which this entry refers. + * The URL of the Compute Node to which this entry refers. */ nodeUrl?: string; /** - * Information about the execution status of the Job Preparation task on this compute node. + * Information about the execution status of the Job Preparation Task on this Compute Node. */ jobPreparationTaskExecutionInfo?: JobPreparationTaskExecutionInformation; /** - * Information about the execution status of the Job Release task on this compute node. This - * property is set only if the Job Release task has run on the node. + * Information about the execution status of the Job Release Task on this Compute Node. This + * property is set only if the Job Release Task has run on the Compute Node. */ jobReleaseTaskExecutionInfo?: JobReleaseTaskExecutionInformation; } /** * An interface representing TaskCounts. - * @summary The task counts for a job. + * @summary The Task counts for a Job. */ export interface TaskCounts { /** - * The number of tasks in the active state. + * The number of Tasks in the active state. */ active: number; /** - * The number of tasks in the running or preparing state. + * The number of Tasks in the running or preparing state. */ running: number; /** - * The number of tasks in the completed state. + * The number of Tasks in the completed state. */ completed: number; /** - * The number of tasks which succeeded. A task succeeds if its result (found in the executionInfo + * The number of Tasks which succeeded. A Task succeeds if its result (found in the executionInfo * property) is 'success'. */ succeeded: number; /** - * The number of tasks which failed. A task fails if its result (found in the executionInfo + * The number of Tasks which failed. A Task fails if its result (found in the executionInfo * property) is 'failure'. */ failed: number; } +/** + * An interface representing TaskSlotCounts. + * @summary The TaskSlot counts for a Job. + */ +export interface TaskSlotCounts { + /** + * The number of TaskSlots for active Tasks. + */ + active: number; + /** + * The number of TaskSlots for running Tasks. + */ + running: number; + /** + * The number of TaskSlots for completed Tasks. + */ + completed: number; + /** + * The number of TaskSlots for succeeded Tasks. + */ + succeeded: number; + /** + * The number of TaskSlots for failed Tasks. + */ + failed: number; +} + +/** + * An interface representing TaskCountsResult. + * @summary The Task and TaskSlot counts for a Job. + */ +export interface TaskCountsResult { + /** + * The number of Tasks per state. + */ + taskCounts: TaskCounts; + /** + * The number of TaskSlots required by Tasks per state. + */ + taskSlotCounts: TaskSlotCounts; +} + /** * An interface representing AutoScaleRunError. - * @summary An error that occurred when executing or evaluating a pool autoscale formula. + * @summary An error that occurred when executing or evaluating a Pool autoscale formula. */ export interface AutoScaleRunError { /** @@ -2785,7 +3093,7 @@ export interface AutoScaleRunError { /** * An interface representing AutoScaleRun. - * @summary The results and errors from an execution of a pool autoscale formula. + * @summary The results and errors from an execution of a Pool autoscale formula. */ export interface AutoScaleRun { /** @@ -2799,7 +3107,7 @@ export interface AutoScaleRun { */ results?: string; /** - * Details of the error encountered evaluating the autoscale formula on the pool, if the + * Details of the error encountered evaluating the autoscale formula on the Pool, if the * evaluation was unsuccessful. */ error?: AutoScaleRunError; @@ -2807,240 +3115,245 @@ export interface AutoScaleRun { /** * An interface representing ResizeError. - * @summary An error that occurred when resizing a pool. + * @summary An error that occurred when resizing a Pool. */ export interface ResizeError { /** - * An identifier for the pool resize error. Codes are invariant and are intended to be consumed + * An identifier for the Pool resize error. Codes are invariant and are intended to be consumed * programmatically. */ code?: string; /** - * A message describing the pool resize error, intended to be suitable for display in a user + * A message describing the Pool resize error, intended to be suitable for display in a user * interface. */ message?: string; /** - * A list of additional error details related to the pool resize error. + * A list of additional error details related to the Pool resize error. */ values?: NameValuePair[]; } /** * An interface representing CloudPool. - * @summary A pool in the Azure Batch service. + * @summary A Pool in the Azure Batch service. */ export interface CloudPool { /** - * A string that uniquely identifies the pool within the account. The ID can contain any + * A string that uniquely identifies the Pool within the Account. The ID can contain any * combination of alphanumeric characters including hyphens and underscores, and cannot contain * more than 64 characters. The ID is case-preserving and case-insensitive (that is, you may not - * have two IDs within an account that differ only by case). + * have two IDs within an Account that differ only by case). */ id?: string; /** - * The display name for the pool. The display name need not be unique and can contain any Unicode + * The display name for the Pool. The display name need not be unique and can contain any Unicode * characters up to a maximum length of 1024. */ displayName?: string; /** - * The URL of the pool. + * The URL of the Pool. */ url?: string; /** - * The ETag of the pool. This is an opaque string. You can use it to detect whether the pool has - * changed between requests. In particular, you can be pass the ETag when updating a pool to - * specify that your changes should take effect only if nobody else has modified the pool in the + * The ETag of the Pool. This is an opaque string. You can use it to detect whether the Pool has + * changed between requests. In particular, you can be pass the ETag when updating a Pool to + * specify that your changes should take effect only if nobody else has modified the Pool in the * meantime. */ eTag?: string; /** - * The last modified time of the pool. This is the last time at which the pool level data, such + * The last modified time of the Pool. This is the last time at which the Pool level data, such * as the targetDedicatedNodes or enableAutoscale settings, changed. It does not factor in - * node-level changes such as a compute node changing state. + * node-level changes such as a Compute Node changing state. */ lastModified?: Date; /** - * The creation time of the pool. + * The creation time of the Pool. */ creationTime?: Date; /** - * The current state of the pool. Possible values include: 'active', 'deleting' + * The current state of the Pool. Possible values include: 'active', 'deleting' */ state?: PoolState; /** - * The time at which the pool entered its current state. + * The time at which the Pool entered its current state. */ stateTransitionTime?: Date; /** - * Whether the pool is resizing. Possible values include: 'steady', 'resizing', 'stopping' + * Whether the Pool is resizing. Possible values include: 'steady', 'resizing', 'stopping' */ allocationState?: AllocationState; /** - * The time at which the pool entered its current allocation state. + * The time at which the Pool entered its current allocation state. */ allocationStateTransitionTime?: Date; /** - * The size of virtual machines in the pool. All virtual machines in a pool are the same size. - * For information about available sizes of virtual machines in pools, see Choose a VM size for - * compute nodes in an Azure Batch pool + * The size of virtual machines in the Pool. All virtual machines in a Pool are the same size. + * For information about available sizes of virtual machines in Pools, see Choose a VM size for + * Compute Nodes in an Azure Batch Pool * (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). */ vmSize?: string; /** - * The cloud service configuration for the pool. This property and virtualMachineConfiguration + * The cloud service configuration for the Pool. This property and virtualMachineConfiguration * are mutually exclusive and one of the properties must be specified. This property cannot be - * specified if the Batch account was created with its poolAllocationMode property set to + * specified if the Batch Account was created with its poolAllocationMode property set to * 'UserSubscription'. */ cloudServiceConfiguration?: CloudServiceConfiguration; /** - * The virtual machine configuration for the pool. This property and cloudServiceConfiguration + * The virtual machine configuration for the Pool. This property and cloudServiceConfiguration * are mutually exclusive and one of the properties must be specified. */ virtualMachineConfiguration?: VirtualMachineConfiguration; /** - * The timeout for allocation of compute nodes to the pool. This is the timeout for the most - * recent resize operation. (The initial sizing when the pool is created counts as a resize.) The + * The timeout for allocation of Compute Nodes to the Pool. This is the timeout for the most + * recent resize operation. (The initial sizing when the Pool is created counts as a resize.) The * default value is 15 minutes. */ resizeTimeout?: string; /** - * A list of errors encountered while performing the last resize on the pool. This property is - * set only if one or more errors occurred during the last pool resize, and only when the pool + * A list of errors encountered while performing the last resize on the Pool. This property is + * set only if one or more errors occurred during the last Pool resize, and only when the Pool * allocationState is Steady. */ resizeErrors?: ResizeError[]; /** - * The number of dedicated compute nodes currently in the pool. + * The number of dedicated Compute Nodes currently in the Pool. */ currentDedicatedNodes?: number; /** - * The number of low-priority compute nodes currently in the pool. Low-priority compute nodes + * The number of low-priority Compute Nodes currently in the Pool. Low-priority Compute Nodes * which have been preempted are included in this count. */ currentLowPriorityNodes?: number; /** - * The desired number of dedicated compute nodes in the pool. + * The desired number of dedicated Compute Nodes in the Pool. */ targetDedicatedNodes?: number; /** - * The desired number of low-priority compute nodes in the pool. + * The desired number of low-priority Compute Nodes in the Pool. */ targetLowPriorityNodes?: number; /** - * Whether the pool size should automatically adjust over time. If false, at least one of + * Whether the Pool size should automatically adjust over time. If false, at least one of * targetDedicateNodes and targetLowPriorityNodes must be specified. If true, the - * autoScaleFormula property is required and the pool automatically resizes according to the + * autoScaleFormula property is required and the Pool automatically resizes according to the * formula. The default value is false. */ enableAutoScale?: boolean; /** - * A formula for the desired number of compute nodes in the pool. This property is set only if - * the pool automatically scales, i.e. enableAutoScale is true. + * A formula for the desired number of Compute Nodes in the Pool. This property is set only if + * the Pool automatically scales, i.e. enableAutoScale is true. */ autoScaleFormula?: string; /** - * The time interval at which to automatically adjust the pool size according to the autoscale - * formula. This property is set only if the pool automatically scales, i.e. enableAutoScale is + * The time interval at which to automatically adjust the Pool size according to the autoscale + * formula. This property is set only if the Pool automatically scales, i.e. enableAutoScale is * true. */ autoScaleEvaluationInterval?: string; /** * The results and errors from the last execution of the autoscale formula. This property is set - * only if the pool automatically scales, i.e. enableAutoScale is true. + * only if the Pool automatically scales, i.e. enableAutoScale is true. */ autoScaleRun?: AutoScaleRun; /** - * Whether the pool permits direct communication between nodes. This imposes restrictions on - * which nodes can be assigned to the pool. Specifying this value can reduce the chance of the - * requested number of nodes to be allocated in the pool. + * Whether the Pool permits direct communication between Compute Nodes. This imposes restrictions + * on which Compute Nodes can be assigned to the Pool. Specifying this value can reduce the + * chance of the requested number of Compute Nodes to be allocated in the Pool. */ enableInterNodeCommunication?: boolean; /** - * The network configuration for the pool. + * The network configuration for the Pool. */ networkConfiguration?: NetworkConfiguration; /** - * A task specified to run on each compute node as it joins the pool. + * A Task specified to run on each Compute Node as it joins the Pool. */ startTask?: StartTask; /** - * The list of certificates to be installed on each compute node in the pool. For Windows compute - * nodes, the Batch service installs the certificates to the specified certificate store and - * location. For Linux compute nodes, the certificates are stored in a directory inside the task - * working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the - * task to query for this location. For certificates with visibility of 'remoteUser', a 'certs' - * directory is created in the user's home directory (e.g., /home/{user-name}/certs) and - * certificates are placed in that directory. + * The list of Certificates to be installed on each Compute Node in the Pool. For Windows Nodes, + * the Batch service installs the Certificates to the specified Certificate store and location. + * For Linux Compute Nodes, the Certificates are stored in a directory inside the Task working + * directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the Task to + * query for this location. For Certificates with visibility of 'remoteUser', a 'certs' directory + * is created in the user's home directory (e.g., /home/{user-name}/certs) and Certificates are + * placed in that directory. */ certificateReferences?: CertificateReference[]; /** - * The list of application packages to be installed on each compute node in the pool. Changes to - * application package references affect all new compute nodes joining the pool, but do not - * affect compute nodes that are already in the pool until they are rebooted or reimaged. There - * is a maximum of 10 application package references on any given pool. + * The list of Packages to be installed on each Compute Node in the Pool. Changes to Package + * references affect all new Nodes joining the Pool, but do not affect Compute Nodes that are + * already in the Pool until they are rebooted or reimaged. There is a maximum of 10 Package + * references on any given Pool. */ applicationPackageReferences?: ApplicationPackageReference[]; /** - * The list of application licenses the Batch service will make available on each compute node in - * the pool. The list of application licenses must be a subset of available Batch service - * application licenses. If a license is requested which is not supported, pool creation will + * The list of application licenses the Batch service will make available on each Compute Node in + * the Pool. The list of application licenses must be a subset of available Batch service + * application licenses. If a license is requested which is not supported, Pool creation will * fail. */ applicationLicenses?: string[]; /** - * The maximum number of tasks that can run concurrently on a single compute node in the pool. - * The default value is 1. The maximum value is the smaller of 4 times the number of cores of the - * vmSize of the pool or 256. + * The number of task slots that can be used to run concurrent tasks on a single compute node in + * the pool. The default value is 1. The maximum value is the smaller of 4 times the number of + * cores of the vmSize of the pool or 256. */ - maxTasksPerNode?: number; + taskSlotsPerNode?: number; /** - * How tasks are distributed across compute nodes in a pool. If not specified, the default is + * How Tasks are distributed across Compute Nodes in a Pool. If not specified, the default is * spread. */ taskSchedulingPolicy?: TaskSchedulingPolicy; /** - * The list of user accounts to be created on each node in the pool. + * The list of user Accounts to be created on each Compute Node in the Pool. */ userAccounts?: UserAccount[]; /** - * A list of name-value pairs associated with the pool as metadata. + * A list of name-value pairs associated with the Pool as metadata. */ metadata?: MetadataItem[]; /** - * Utilization and resource usage statistics for the entire lifetime of the pool. This property + * Utilization and resource usage statistics for the entire lifetime of the Pool. This property * is populated only if the CloudPool was retrieved with an expand clause including the 'stats' * attribute; otherwise it is null. The statistics may not be immediately available. The Batch * service performs periodic roll-up of statistics. The typical delay is about 30 minutes. */ stats?: PoolStatistics; + /** + * A list of file systems to mount on each node in the pool. This supports Azure Files, NFS, + * CIFS/SMB, and Blobfuse. + */ + mountConfiguration?: MountConfiguration[]; } /** * An interface representing PoolAddParameter. - * @summary A pool in the Azure Batch service to add. + * @summary A Pool in the Azure Batch service to add. */ export interface PoolAddParameter { /** - * A string that uniquely identifies the pool within the account. The ID can contain any + * A string that uniquely identifies the Pool within the Account. The ID can contain any * combination of alphanumeric characters including hyphens and underscores, and cannot contain * more than 64 characters. The ID is case-preserving and case-insensitive (that is, you may not - * have two pool IDs within an account that differ only by case). + * have two Pool IDs within an Account that differ only by case). */ id: string; /** - * The display name for the pool. The display name need not be unique and can contain any Unicode + * The display name for the Pool. The display name need not be unique and can contain any Unicode * characters up to a maximum length of 1024. */ displayName?: string; /** - * The size of virtual machines in the pool. All virtual machines in a pool are the same size. - * For information about available sizes of virtual machines for Cloud Services pools (pools + * The size of virtual machines in the Pool. All virtual machines in a Pool are the same size. + * For information about available sizes of virtual machines for Cloud Services Pools (pools * created with cloudServiceConfiguration), see Sizes for Cloud Services * (https://azure.microsoft.com/documentation/articles/cloud-services-sizes-specs/). Batch * supports all Cloud Services VM sizes except ExtraSmall, A1V2 and A2V2. For information about - * available VM sizes for pools using images from the Virtual Machines Marketplace (pools created + * available VM sizes for Pools using Images from the Virtual Machines Marketplace (pools created * with virtualMachineConfiguration) see Sizes for Virtual Machines (Linux) * (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) or Sizes * for Virtual Machines (Windows) @@ -3050,19 +3363,19 @@ export interface PoolAddParameter { */ vmSize: string; /** - * The cloud service configuration for the pool. This property and virtualMachineConfiguration + * The cloud service configuration for the Pool. This property and virtualMachineConfiguration * are mutually exclusive and one of the properties must be specified. This property cannot be - * specified if the Batch account was created with its poolAllocationMode property set to + * specified if the Batch Account was created with its poolAllocationMode property set to * 'UserSubscription'. */ cloudServiceConfiguration?: CloudServiceConfiguration; /** - * The virtual machine configuration for the pool. This property and cloudServiceConfiguration + * The virtual machine configuration for the Pool. This property and cloudServiceConfiguration * are mutually exclusive and one of the properties must be specified. */ virtualMachineConfiguration?: VirtualMachineConfiguration; /** - * The timeout for allocation of compute nodes to the pool. This timeout applies only to manual + * The timeout for allocation of Compute Nodes to the Pool. This timeout applies only to manual * scaling; it has no effect when enableAutoScale is set to true. The default value is 15 * minutes. The minimum value is 5 minutes. If you specify a value less than 5 minutes, the Batch * service returns an error; if you are calling the REST API directly, the HTTP status code is @@ -3070,35 +3383,35 @@ export interface PoolAddParameter { */ resizeTimeout?: string; /** - * The desired number of dedicated compute nodes in the pool. This property must not be specified + * The desired number of dedicated Compute Nodes in the Pool. This property must not be specified * if enableAutoScale is set to true. If enableAutoScale is set to false, then you must set * either targetDedicatedNodes, targetLowPriorityNodes, or both. */ targetDedicatedNodes?: number; /** - * The desired number of low-priority compute nodes in the pool. This property must not be + * The desired number of low-priority Compute Nodes in the Pool. This property must not be * specified if enableAutoScale is set to true. If enableAutoScale is set to false, then you must * set either targetDedicatedNodes, targetLowPriorityNodes, or both. */ targetLowPriorityNodes?: number; /** - * Whether the pool size should automatically adjust over time. If false, at least one of + * Whether the Pool size should automatically adjust over time. If false, at least one of * targetDedicateNodes and targetLowPriorityNodes must be specified. If true, the - * autoScaleFormula property is required and the pool automatically resizes according to the + * autoScaleFormula property is required and the Pool automatically resizes according to the * formula. The default value is false. */ enableAutoScale?: boolean; /** - * A formula for the desired number of compute nodes in the pool. This property must not be + * A formula for the desired number of Compute Nodes in the Pool. This property must not be * specified if enableAutoScale is set to false. It is required if enableAutoScale is set to - * true. The formula is checked for validity before the pool is created. If the formula is not + * true. The formula is checked for validity before the Pool is created. If the formula is not * valid, the Batch service rejects the request with detailed error information. For more - * information about specifying this formula, see 'Automatically scale compute nodes in an Azure - * Batch pool' (https://azure.microsoft.com/documentation/articles/batch-automatic-scaling/). + * information about specifying this formula, see 'Automatically scale Compute Nodes in an Azure + * Batch Pool' (https://azure.microsoft.com/documentation/articles/batch-automatic-scaling/). */ autoScaleFormula?: string; /** - * The time interval at which to automatically adjust the pool size according to the autoscale + * The time interval at which to automatically adjust the Pool size according to the autoscale * formula. The default value is 15 minutes. The minimum and maximum value are 5 minutes and 168 * hours respectively. If you specify a value less than 5 minutes or greater than 168 hours, the * Batch service returns an error; if you are calling the REST API directly, the HTTP status code @@ -3106,147 +3419,154 @@ export interface PoolAddParameter { */ autoScaleEvaluationInterval?: string; /** - * Whether the pool permits direct communication between nodes. Enabling inter-node communication - * limits the maximum size of the pool due to deployment restrictions on the nodes of the pool. - * This may result in the pool not reaching its desired size. The default value is false. + * Whether the Pool permits direct communication between Compute Nodes. Enabling inter-node + * communication limits the maximum size of the Pool due to deployment restrictions on the + * Compute Nodes of the Pool. This may result in the Pool not reaching its desired size. The + * default value is false. */ enableInterNodeCommunication?: boolean; /** - * The network configuration for the pool. + * The network configuration for the Pool. */ networkConfiguration?: NetworkConfiguration; /** - * A task specified to run on each compute node as it joins the pool. The task runs when the node - * is added to the pool or when the node is restarted. + * A Task specified to run on each Compute Node as it joins the Pool. The Task runs when the + * Compute Node is added to the Pool or when the Compute Node is restarted. */ startTask?: StartTask; /** - * The list of certificates to be installed on each compute node in the pool. For Windows compute - * nodes, the Batch service installs the certificates to the specified certificate store and - * location. For Linux compute nodes, the certificates are stored in a directory inside the task - * working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the - * task to query for this location. For certificates with visibility of 'remoteUser', a 'certs' - * directory is created in the user's home directory (e.g., /home/{user-name}/certs) and - * certificates are placed in that directory. + * The list of Certificates to be installed on each Compute Node in the Pool. For Windows Nodes, + * the Batch service installs the Certificates to the specified Certificate store and location. + * For Linux Compute Nodes, the Certificates are stored in a directory inside the Task working + * directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the Task to + * query for this location. For Certificates with visibility of 'remoteUser', a 'certs' directory + * is created in the user's home directory (e.g., /home/{user-name}/certs) and Certificates are + * placed in that directory. */ certificateReferences?: CertificateReference[]; /** - * The list of application packages to be installed on each compute node in the pool. Changes to - * application package references affect all new compute nodes joining the pool, but do not - * affect compute nodes that are already in the pool until they are rebooted or reimaged. There - * is a maximum of 10 application package references on any given pool. + * The list of Packages to be installed on each Compute Node in the Pool. Changes to Package + * references affect all new Nodes joining the Pool, but do not affect Compute Nodes that are + * already in the Pool until they are rebooted or reimaged. There is a maximum of 10 Package + * references on any given Pool. */ applicationPackageReferences?: ApplicationPackageReference[]; /** - * The list of application licenses the Batch service will make available on each compute node in - * the pool. The list of application licenses must be a subset of available Batch service - * application licenses. If a license is requested which is not supported, pool creation will + * The list of application licenses the Batch service will make available on each Compute Node in + * the Pool. The list of application licenses must be a subset of available Batch service + * application licenses. If a license is requested which is not supported, Pool creation will * fail. */ applicationLicenses?: string[]; /** - * The maximum number of tasks that can run concurrently on a single compute node in the pool. - * The default value is 1. The maximum value is the smaller of 4 times the number of cores of the - * vmSize of the pool or 256. + * The number of task slots that can be used to run concurrent tasks on a single compute node in + * the pool. The default value is 1. The maximum value is the smaller of 4 times the number of + * cores of the vmSize of the pool or 256. */ - maxTasksPerNode?: number; + taskSlotsPerNode?: number; /** - * How tasks are distributed across compute nodes in a pool. If not specified, the default is + * How Tasks are distributed across Compute Nodes in a Pool. If not specified, the default is * spread. */ taskSchedulingPolicy?: TaskSchedulingPolicy; /** - * The list of user accounts to be created on each node in the pool. + * The list of user Accounts to be created on each Compute Node in the Pool. */ userAccounts?: UserAccount[]; /** - * A list of name-value pairs associated with the pool as metadata. The Batch service does not + * A list of name-value pairs associated with the Pool as metadata. The Batch service does not * assign any meaning to metadata; it is solely for the use of user code. */ metadata?: MetadataItem[]; + /** + * Mount storage using specified file system for the entire lifetime of the pool. Mount the + * storage using Azure fileshare, NFS, CIFS or Blobfuse based file system. + */ + mountConfiguration?: MountConfiguration[]; } /** * An interface representing AffinityInformation. - * @summary A locality hint that can be used by the Batch service to select a compute node on which - * to start a task. + * @summary A locality hint that can be used by the Batch service to select a Compute Node on which + * to start a Task. */ export interface AffinityInformation { /** - * An opaque string representing the location of a compute node or a task that has run - * previously. You can pass the affinityId of a compute node to indicate that this task needs to - * run on that compute node. Note that this is just a soft affinity. If the target node is busy - * or unavailable at the time the task is scheduled, then the task will be scheduled elsewhere. + * An opaque string representing the location of a Compute Node or a Task that has run + * previously. You can pass the affinityId of a Node to indicate that this Task needs to run on + * that Compute Node. Note that this is just a soft affinity. If the target Compute Node is busy + * or unavailable at the time the Task is scheduled, then the Task will be scheduled elsewhere. */ affinityId: string; } /** * An interface representing TaskExecutionInformation. - * @summary Information about the execution of a task. + * @summary Information about the execution of a Task. */ export interface TaskExecutionInformation { /** - * The time at which the task started running. 'Running' corresponds to the running state, so if - * the task specifies resource files or application packages, then the start time reflects the - * time at which the task started downloading or deploying these. If the task has been restarted - * or retried, this is the most recent time at which the task started running. This property is - * present only for tasks that are in the running or completed state. + * The time at which the Task started running. 'Running' corresponds to the running state, so if + * the Task specifies resource files or Packages, then the start time reflects the time at which + * the Task started downloading or deploying these. If the Task has been restarted or retried, + * this is the most recent time at which the Task started running. This property is present only + * for Tasks that are in the running or completed state. */ startTime?: Date; /** - * The time at which the task completed. This property is set only if the task is in the + * The time at which the Task completed. This property is set only if the Task is in the * Completed state. */ endTime?: Date; /** - * The exit code of the program specified on the task command line. This property is set only if - * the task is in the completed state. In general, the exit code for a process reflects the + * The exit code of the program specified on the Task command line. This property is set only if + * the Task is in the completed state. In general, the exit code for a process reflects the * specific convention implemented by the application developer for that process. If you use the * exit code value to make decisions in your code, be sure that you know the exit code convention - * used by the application process. However, if the Batch service terminates the task (due to + * used by the application process. However, if the Batch service terminates the Task (due to * timeout, or user termination via the API) you may see an operating system-defined exit code. */ exitCode?: number; /** - * Information about the container under which the task is executing. This property is set only - * if the task runs in a container context. + * Information about the container under which the Task is executing. This property is set only + * if the Task runs in a container context. */ containerInfo?: TaskContainerExecutionInformation; /** - * Information describing the task failure, if any. This property is set only if the task is in + * Information describing the Task failure, if any. This property is set only if the Task is in * the completed state and encountered a failure. */ failureInfo?: TaskFailureInformation; /** - * The number of times the task has been retried by the Batch service. Task application failures - * (non-zero exit code) are retried, pre-processing errors (the task could not be run) and file - * upload errors are not retried. The Batch service will retry the task up to the limit specified + * The number of times the Task has been retried by the Batch service. Task application failures + * (non-zero exit code) are retried, pre-processing errors (the Task could not be run) and file + * upload errors are not retried. The Batch service will retry the Task up to the limit specified * by the constraints. */ retryCount: number; /** - * The most recent time at which a retry of the task started running. This element is present - * only if the task was retried (i.e. retryCount is nonzero). If present, this is typically the - * same as startTime, but may be different if the task has been restarted for reasons other than - * retry; for example, if the compute node was rebooted during a retry, then the startTime is + * The most recent time at which a retry of the Task started running. This element is present + * only if the Task was retried (i.e. retryCount is nonzero). If present, this is typically the + * same as startTime, but may be different if the Task has been restarted for reasons other than + * retry; for example, if the Compute Node was rebooted during a retry, then the startTime is * updated but the lastRetryTime is not. */ lastRetryTime?: Date; /** - * The number of times the task has been requeued by the Batch service as the result of a user - * request. When the user removes nodes from a pool (by resizing/shrinking the pool) or when the - * job is being disabled, the user can specify that running tasks on the nodes be requeued for - * execution. This count tracks how many times the task has been requeued for these reasons. + * The number of times the Task has been requeued by the Batch service as the result of a user + * request. When the user removes Compute Nodes from a Pool (by resizing/shrinking the pool) or + * when the Job is being disabled, the user can specify that running Tasks on the Compute Nodes + * be requeued for execution. This count tracks how many times the Task has been requeued for + * these reasons. */ requeueCount: number; /** - * The most recent time at which the task has been requeued by the Batch service as the result of + * The most recent time at which the Task has been requeued by the Batch service as the result of * a user request. This property is set only if the requeueCount is nonzero. */ lastRequeueTime?: Date; /** - * The result of the task execution. If the value is 'failed', then the details of the failure + * The result of the Task execution. If the value is 'failed', then the details of the failure * can be found in the failureInfo property. Possible values include: 'success', 'failure' */ result?: TaskExecutionResult; @@ -3254,78 +3574,78 @@ export interface TaskExecutionInformation { /** * An interface representing ComputeNodeInformation. - * @summary Information about the compute node on which a task ran. + * @summary Information about the Compute Node on which a Task ran. */ export interface ComputeNodeInformation { /** - * An identifier for the compute node on which the task ran, which can be passed when adding a - * task to request that the task be scheduled on this compute node. + * An identifier for the Node on which the Task ran, which can be passed when adding a Task to + * request that the Task be scheduled on this Compute Node. */ affinityId?: string; /** - * The URL of the node on which the task ran. . + * The URL of the Compute Node on which the Task ran. . */ nodeUrl?: string; /** - * The ID of the pool on which the task ran. + * The ID of the Pool on which the Task ran. */ poolId?: string; /** - * The ID of the node on which the task ran. + * The ID of the Compute Node on which the Task ran. */ nodeId?: string; /** - * The root directory of the task on the compute node. + * The root directory of the Task on the Compute Node. */ taskRootDirectory?: string; /** - * The URL to the root directory of the task on the compute node. + * The URL to the root directory of the Task on the Compute Node. */ taskRootDirectoryUrl?: string; } /** - * The Batch node agent is a program that runs on each node in the pool and provides Batch - * capability on the compute node. - * @summary Information about the node agent. + * The Batch Compute Node agent is a program that runs on each Compute Node in the Pool and + * provides Batch capability on the Compute Node. + * @summary Information about the Compute Node agent. */ export interface NodeAgentInformation { /** - * The version of the Batch node agent running on the compute node. This version number can be - * checked against the node agent release notes located at + * The version of the Batch Compute Node agent running on the Compute Node. This version number + * can be checked against the Compute Node agent release notes located at * https://github.com/Azure/Batch/blob/master/changelogs/nodeagent/CHANGELOG.md. */ version: string; /** - * The time when the node agent was updated on the compute node. This is the most recent time - * that the node agent was updated to a new version. + * The time when the Compute Node agent was updated on the Compute Node. This is the most recent + * time that the Compute Node agent was updated to a new version. */ lastUpdateTime: Date; } /** - * Multi-instance tasks are commonly used to support MPI tasks. In the MPI case, if any of the + * Multi-instance Tasks are commonly used to support MPI Tasks. In the MPI case, if any of the * subtasks fail (for example due to exiting with a non-zero exit code) the entire multi-instance - * task fails. The multi-instance task is then terminated and retried, up to its retry limit. - * @summary Settings which specify how to run a multi-instance task. + * Task fails. The multi-instance Task is then terminated and retried, up to its retry limit. + * @summary Settings which specify how to run a multi-instance Task. */ export interface MultiInstanceSettings { /** - * The number of compute nodes required by the task. If omitted, the default is 1. + * The number of Compute Nodes required by the Task. If omitted, the default is 1. */ numberOfInstances?: number; /** - * The command line to run on all the compute nodes to enable them to coordinate when the primary - * runs the main task command. A typical coordination command line launches a background service + * The command line to run on all the Compute Nodes to enable them to coordinate when the primary + * runs the main Task command. A typical coordination command line launches a background service * and verifies that the service is ready to process inter-node messages. */ coordinationCommandLine: string; /** * A list of files that the Batch service will download before running the coordination command - * line. The difference between common resource files and task resource files is that common - * resource files are downloaded for all subtasks including the primary, whereas task resource + * line. The difference between common resource files and Task resource files is that common + * resource files are downloaded for all subtasks including the primary, whereas Task resource * files are downloaded only for the primary. Also note that these resource files are not - * downloaded to the task working directory, but instead are downloaded to the task root + * downloaded to the Task working directory, but instead are downloaded to the Task root * directory (one directory above the working directory). There is a maximum size for the list * of resource files. When the max size is exceeded, the request will fail and the response * error code will be RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must @@ -3337,7 +3657,7 @@ export interface MultiInstanceSettings { /** * An interface representing TaskStatistics. - * @summary Resource usage statistics for a task. + * @summary Resource usage statistics for a Task. */ export interface TaskStatistics { /** @@ -3354,174 +3674,175 @@ export interface TaskStatistics { */ lastUpdateTime: Date; /** - * The total user mode CPU time (summed across all cores and all compute nodes) consumed by the - * task. + * The total user mode CPU time (summed across all cores and all Compute Nodes) consumed by the + * Task. */ userCPUTime: string; /** - * The total kernel mode CPU time (summed across all cores and all compute nodes) consumed by the - * task. + * The total kernel mode CPU time (summed across all cores and all Compute Nodes) consumed by the + * Task. */ kernelCPUTime: string; /** - * The total wall clock time of the task. The wall clock time is the elapsed time from when the - * task started running on a compute node to when it finished (or to the last time the statistics - * were updated, if the task had not finished by then). If the task was retried, this includes - * the wall clock time of all the task retries. + * The total wall clock time of the Task. The wall clock time is the elapsed time from when the + * Task started running on a Compute Node to when it finished (or to the last time the statistics + * were updated, if the Task had not finished by then). If the Task was retried, this includes + * the wall clock time of all the Task retries. */ wallClockTime: string; /** - * The total number of disk read operations made by the task. + * The total number of disk read operations made by the Task. */ readIOps: number; /** - * The total number of disk write operations made by the task. + * The total number of disk write operations made by the Task. */ writeIOps: number; /** - * The total gibibytes read from disk by the task. + * The total gibibytes read from disk by the Task. */ readIOGiB: number; /** - * The total gibibytes written to disk by the task. + * The total gibibytes written to disk by the Task. */ writeIOGiB: number; /** - * The total wait time of the task. The wait time for a task is defined as the elapsed time - * between the creation of the task and the start of task execution. (If the task is retried due - * to failures, the wait time is the time to the most recent task execution.). + * The total wait time of the Task. The wait time for a Task is defined as the elapsed time + * between the creation of the Task and the start of Task execution. (If the Task is retried due + * to failures, the wait time is the time to the most recent Task execution.). */ waitTime: string; } /** * The start and end of the range are inclusive. For example, if a range has start 9 and end 12, - * then it represents tasks '9', '10', '11' and '12'. - * @summary A range of task IDs that a task can depend on. All tasks with IDs in the range must - * complete successfully before the dependent task can be scheduled. + * then it represents Tasks '9', '10', '11' and '12'. + * @summary A range of Task IDs that a Task can depend on. All Tasks with IDs in the range must + * complete successfully before the dependent Task can be scheduled. */ export interface TaskIdRange { /** - * The first task ID in the range. + * The first Task ID in the range. */ start: number; /** - * The last task ID in the range. + * The last Task ID in the range. */ end: number; } /** * An interface representing TaskDependencies. - * @summary Specifies any dependencies of a task. Any task that is explicitly specified or within a - * dependency range must complete before the dependant task will be scheduled. + * @summary Specifies any dependencies of a Task. Any Task that is explicitly specified or within a + * dependency range must complete before the dependant Task will be scheduled. */ export interface TaskDependencies { /** - * The list of task IDs that this task depends on. All tasks in this list must complete - * successfully before the dependent task can be scheduled. The taskIds collection is limited to - * 64000 characters total (i.e. the combined length of all task IDs). If the taskIds collection + * The list of Task IDs that this Task depends on. All Tasks in this list must complete + * successfully before the dependent Task can be scheduled. The taskIds collection is limited to + * 64000 characters total (i.e. the combined length of all Task IDs). If the taskIds collection * exceeds the maximum length, the Add Task request fails with error code - * TaskDependencyListTooLong. In this case consider using task ID ranges instead. + * TaskDependencyListTooLong. In this case consider using Task ID ranges instead. */ taskIds?: string[]; /** - * The list of task ID ranges that this task depends on. All tasks in all ranges must complete - * successfully before the dependent task can be scheduled. + * The list of Task ID ranges that this Task depends on. All Tasks in all ranges must complete + * successfully before the dependent Task can be scheduled. */ taskIdRanges?: TaskIdRange[]; } /** - * Batch will retry tasks when a recovery operation is triggered on a compute node. Examples of - * recovery operations include (but are not limited to) when an unhealthy compute node is rebooted - * or a compute node disappeared due to host failure. Retries due to recovery operations are - * independent of and are not counted against the maxTaskRetryCount. Even if the maxTaskRetryCount - * is 0, an internal retry due to a recovery operation may occur. Because of this, all tasks should - * be idempotent. This means tasks need to tolerate being interrupted and restarted without causing - * any corruption or duplicate data. The best practice for long running tasks is to use some form - * of checkpointing. - * @summary An Azure Batch task. + * Batch will retry Tasks when a recovery operation is triggered on a Node. Examples of recovery + * operations include (but are not limited to) when an unhealthy Node is rebooted or a Compute Node + * disappeared due to host failure. Retries due to recovery operations are independent of and are + * not counted against the maxTaskRetryCount. Even if the maxTaskRetryCount is 0, an internal retry + * due to a recovery operation may occur. Because of this, all Tasks should be idempotent. This + * means Tasks need to tolerate being interrupted and restarted without causing any corruption or + * duplicate data. The best practice for long running Tasks is to use some form of checkpointing. + * @summary An Azure Batch Task. */ export interface CloudTask { /** - * A string that uniquely identifies the task within the job. The ID can contain any combination + * A string that uniquely identifies the Task within the Job. The ID can contain any combination * of alphanumeric characters including hyphens and underscores, and cannot contain more than 64 * characters. */ id?: string; /** - * A display name for the task. The display name need not be unique and can contain any Unicode + * A display name for the Task. The display name need not be unique and can contain any Unicode * characters up to a maximum length of 1024. */ displayName?: string; /** - * The URL of the task. + * The URL of the Task. */ url?: string; /** - * The ETag of the task. This is an opaque string. You can use it to detect whether the task has - * changed between requests. In particular, you can be pass the ETag when updating a task to - * specify that your changes should take effect only if nobody else has modified the task in the + * The ETag of the Task. This is an opaque string. You can use it to detect whether the Task has + * changed between requests. In particular, you can be pass the ETag when updating a Task to + * specify that your changes should take effect only if nobody else has modified the Task in the * meantime. */ eTag?: string; /** - * The last modified time of the task. + * The last modified time of the Task. */ lastModified?: Date; /** - * The creation time of the task. + * The creation time of the Task. */ creationTime?: Date; /** - * How the Batch service should respond when the task completes. + * How the Batch service should respond when the Task completes. */ exitConditions?: ExitConditions; /** - * The current state of the task. Possible values include: 'active', 'preparing', 'running', + * The current state of the Task. Possible values include: 'active', 'preparing', 'running', * 'completed' */ state?: TaskState; /** - * The time at which the task entered its current state. + * The time at which the Task entered its current state. */ stateTransitionTime?: Date; /** - * The previous state of the task. This property is not set if the task is in its initial Active + * The previous state of the Task. This property is not set if the Task is in its initial Active * state. Possible values include: 'active', 'preparing', 'running', 'completed' */ previousState?: TaskState; /** - * The time at which the task entered its previous state. This property is not set if the task is + * The time at which the Task entered its previous state. This property is not set if the Task is * in its initial Active state. */ previousStateTransitionTime?: Date; /** - * The command line of the task. For multi-instance tasks, the command line is executed as the - * primary task, after the primary task and all subtasks have finished executing the coordination + * The command line of the Task. For multi-instance Tasks, the command line is executed as the + * primary Task, after the primary Task and all subtasks have finished executing the coordination * command line. The command line does not run under a shell, and therefore cannot take advantage * of shell features such as environment variable expansion. If you want to take advantage of * such features, you should invoke the shell in the command line, for example using "cmd /c * MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file - * paths, it should use a relative path (relative to the task working directory), or use the + * paths, it should use a relative path (relative to the Task working directory), or use the * Batch provided environment variable * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). */ commandLine?: string; /** - * The settings for the container under which the task runs. If the pool that will run this task - * has containerConfiguration set, this must be set as well. If the pool that will run this task + * The settings for the container under which the Task runs. If the Pool that will run this Task + * has containerConfiguration set, this must be set as well. If the Pool that will run this Task * doesn't have containerConfiguration set, this must not be set. When this is specified, all * directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories - * on the node) are mapped into the container, all task environment variables are mapped into the - * container, and the task command line is executed in the container. + * on the node) are mapped into the container, all Task environment variables are mapped into the + * container, and the Task command line is executed in the container. Files produced in the + * container outside of AZ_BATCH_NODE_ROOT_DIR might not be reflected to the host disk, meaning + * that Batch file APIs will not be able to access those files. */ containerSettings?: TaskContainerSettings; /** - * A list of files that the Batch service will download to the compute node before running the - * command line. For multi-instance tasks, the resource files will only be downloaded to the - * compute node on which the primary task is executed. There is a maximum size for the list of + * A list of files that the Batch service will download to the Compute Node before running the + * command line. For multi-instance Tasks, the resource files will only be downloaded to the + * Compute Node on which the primary Task is executed. There is a maximum size for the list of * resource files. When the max size is exceeded, the request will fail and the response error * code will be RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must be * reduced in size. This can be achieved using .zip files, Application Packages, or Docker @@ -3529,126 +3850,133 @@ export interface CloudTask { */ resourceFiles?: ResourceFile[]; /** - * A list of files that the Batch service will upload from the compute node after running the - * command line. For multi-instance tasks, the files will only be uploaded from the compute node - * on which the primary task is executed. + * A list of files that the Batch service will upload from the Compute Node after running the + * command line. For multi-instance Tasks, the files will only be uploaded from the Compute Node + * on which the primary Task is executed. */ outputFiles?: OutputFile[]; /** - * A list of environment variable settings for the task. + * A list of environment variable settings for the Task. */ environmentSettings?: EnvironmentSetting[]; /** - * A locality hint that can be used by the Batch service to select a compute node on which to - * start the new task. + * A locality hint that can be used by the Batch service to select a Compute Node on which to + * start the new Task. */ affinityInfo?: AffinityInformation; /** - * The execution constraints that apply to this task. + * The execution constraints that apply to this Task. */ constraints?: TaskConstraints; /** - * The user identity under which the task runs. If omitted, the task runs as a non-administrative - * user unique to the task. + * The number of scheduling slots that the Task requires to run. The default is 1. A Task can + * only be scheduled to run on a compute node if the node has enough free scheduling slots + * available. For multi-instance Tasks, this must be 1. + */ + requiredSlots?: number; + /** + * The user identity under which the Task runs. If omitted, the Task runs as a non-administrative + * user unique to the Task. */ userIdentity?: UserIdentity; /** - * Information about the execution of the task. + * Information about the execution of the Task. */ executionInfo?: TaskExecutionInformation; /** - * Information about the compute node on which the task ran. + * Information about the Compute Node on which the Task ran. */ nodeInfo?: ComputeNodeInformation; /** - * An object that indicates that the task is a multi-instance task, and contains information - * about how to run the multi-instance task. + * An object that indicates that the Task is a multi-instance Task, and contains information + * about how to run the multi-instance Task. */ multiInstanceSettings?: MultiInstanceSettings; /** - * Resource usage statistics for the task. + * Resource usage statistics for the Task. */ stats?: TaskStatistics; /** - * The tasks that this task depends on. This task will not be scheduled until all tasks that it - * depends on have completed successfully. If any of those tasks fail and exhaust their retry - * counts, this task will never be scheduled. + * The Tasks that this Task depends on. This Task will not be scheduled until all Tasks that it + * depends on have completed successfully. If any of those Tasks fail and exhaust their retry + * counts, this Task will never be scheduled. */ dependsOn?: TaskDependencies; /** - * A list of application packages that the Batch service will deploy to the compute node before - * running the command line. Application packages are downloaded and deployed to a shared - * directory, not the task working directory. Therefore, if a referenced package is already on - * the compute node, and is up to date, then it is not re-downloaded; the existing copy on the - * compute node is used. If a referenced application package cannot be installed, for example - * because the package has been deleted or because download failed, the task fails. + * A list of Packages that the Batch service will deploy to the Compute Node before running the + * command line. Application packages are downloaded and deployed to a shared directory, not the + * Task working directory. Therefore, if a referenced package is already on the Node, and is up + * to date, then it is not re-downloaded; the existing copy on the Compute Node is used. If a + * referenced Package cannot be installed, for example because the package has been deleted or + * because download failed, the Task fails. */ applicationPackageReferences?: ApplicationPackageReference[]; /** - * The settings for an authentication token that the task can use to perform Batch service - * operations. If this property is set, the Batch service provides the task with an + * The settings for an authentication token that the Task can use to perform Batch service + * operations. If this property is set, the Batch service provides the Task with an * authentication token which can be used to authenticate Batch service operations without - * requiring an account access key. The token is provided via the AZ_BATCH_AUTHENTICATION_TOKEN - * environment variable. The operations that the task can carry out using the token depend on the - * settings. For example, a task can request job permissions in order to add other tasks to the - * job, or check the status of the job or of other tasks under the job. + * requiring an Account access key. The token is provided via the AZ_BATCH_AUTHENTICATION_TOKEN + * environment variable. The operations that the Task can carry out using the token depend on the + * settings. For example, a Task can request Job permissions in order to add other Tasks to the + * Job, or check the status of the Job or of other Tasks under the Job. */ authenticationTokenSettings?: AuthenticationTokenSettings; } /** - * Batch will retry tasks when a recovery operation is triggered on a compute node. Examples of - * recovery operations include (but are not limited to) when an unhealthy compute node is rebooted - * or a compute node disappeared due to host failure. Retries due to recovery operations are - * independent of and are not counted against the maxTaskRetryCount. Even if the maxTaskRetryCount - * is 0, an internal retry due to a recovery operation may occur. Because of this, all tasks should - * be idempotent. This means tasks need to tolerate being interrupted and restarted without causing - * any corruption or duplicate data. The best practice for long running tasks is to use some form - * of checkpointing. - * @summary An Azure Batch task to add. + * Batch will retry Tasks when a recovery operation is triggered on a Node. Examples of recovery + * operations include (but are not limited to) when an unhealthy Node is rebooted or a Compute Node + * disappeared due to host failure. Retries due to recovery operations are independent of and are + * not counted against the maxTaskRetryCount. Even if the maxTaskRetryCount is 0, an internal retry + * due to a recovery operation may occur. Because of this, all Tasks should be idempotent. This + * means Tasks need to tolerate being interrupted and restarted without causing any corruption or + * duplicate data. The best practice for long running Tasks is to use some form of checkpointing. + * @summary An Azure Batch Task to add. */ export interface TaskAddParameter { /** - * A string that uniquely identifies the task within the job. The ID can contain any combination + * A string that uniquely identifies the Task within the Job. The ID can contain any combination * of alphanumeric characters including hyphens and underscores, and cannot contain more than 64 * characters. The ID is case-preserving and case-insensitive (that is, you may not have two IDs - * within a job that differ only by case). + * within a Job that differ only by case). */ id: string; /** - * A display name for the task. The display name need not be unique and can contain any Unicode + * A display name for the Task. The display name need not be unique and can contain any Unicode * characters up to a maximum length of 1024. */ displayName?: string; /** - * The command line of the task. For multi-instance tasks, the command line is executed as the - * primary task, after the primary task and all subtasks have finished executing the coordination + * The command line of the Task. For multi-instance Tasks, the command line is executed as the + * primary Task, after the primary Task and all subtasks have finished executing the coordination * command line. The command line does not run under a shell, and therefore cannot take advantage * of shell features such as environment variable expansion. If you want to take advantage of * such features, you should invoke the shell in the command line, for example using "cmd /c * MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file - * paths, it should use a relative path (relative to the task working directory), or use the + * paths, it should use a relative path (relative to the Task working directory), or use the * Batch provided environment variable * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). */ commandLine: string; /** - * The settings for the container under which the task runs. If the pool that will run this task - * has containerConfiguration set, this must be set as well. If the pool that will run this task + * The settings for the container under which the Task runs. If the Pool that will run this Task + * has containerConfiguration set, this must be set as well. If the Pool that will run this Task * doesn't have containerConfiguration set, this must not be set. When this is specified, all * directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories - * on the node) are mapped into the container, all task environment variables are mapped into the - * container, and the task command line is executed in the container. + * on the node) are mapped into the container, all Task environment variables are mapped into the + * container, and the Task command line is executed in the container. Files produced in the + * container outside of AZ_BATCH_NODE_ROOT_DIR might not be reflected to the host disk, meaning + * that Batch file APIs will not be able to access those files. */ containerSettings?: TaskContainerSettings; /** - * How the Batch service should respond when the task completes. + * How the Batch service should respond when the Task completes. */ exitConditions?: ExitConditions; /** - * A list of files that the Batch service will download to the compute node before running the - * command line. For multi-instance tasks, the resource files will only be downloaded to the - * compute node on which the primary task is executed. There is a maximum size for the list of + * A list of files that the Batch service will download to the Compute Node before running the + * command line. For multi-instance Tasks, the resource files will only be downloaded to the + * Compute Node on which the primary Task is executed. There is a maximum size for the list of * resource files. When the max size is exceeded, the request will fail and the response error * code will be RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must be * reduced in size. This can be achieved using .zip files, Application Packages, or Docker @@ -3656,75 +3984,81 @@ export interface TaskAddParameter { */ resourceFiles?: ResourceFile[]; /** - * A list of files that the Batch service will upload from the compute node after running the - * command line. For multi-instance tasks, the files will only be uploaded from the compute node - * on which the primary task is executed. + * A list of files that the Batch service will upload from the Compute Node after running the + * command line. For multi-instance Tasks, the files will only be uploaded from the Compute Node + * on which the primary Task is executed. */ outputFiles?: OutputFile[]; /** - * A list of environment variable settings for the task. + * A list of environment variable settings for the Task. */ environmentSettings?: EnvironmentSetting[]; /** - * A locality hint that can be used by the Batch service to select a compute node on which to - * start the new task. + * A locality hint that can be used by the Batch service to select a Compute Node on which to + * start the new Task. */ affinityInfo?: AffinityInformation; /** - * The execution constraints that apply to this task. If you do not specify constraints, the - * maxTaskRetryCount is the maxTaskRetryCount specified for the job, the maxWallClockTime is + * The execution constraints that apply to this Task. If you do not specify constraints, the + * maxTaskRetryCount is the maxTaskRetryCount specified for the Job, the maxWallClockTime is * infinite, and the retentionTime is 7 days. */ constraints?: TaskConstraints; /** - * The user identity under which the task runs. If omitted, the task runs as a non-administrative - * user unique to the task. + * The number of scheduling slots that the Task required to run. The default is 1. A Task can + * only be scheduled to run on a compute node if the node has enough free scheduling slots + * available. For multi-instance Tasks, this must be 1. + */ + requiredSlots?: number; + /** + * The user identity under which the Task runs. If omitted, the Task runs as a non-administrative + * user unique to the Task. */ userIdentity?: UserIdentity; /** - * An object that indicates that the task is a multi-instance task, and contains information - * about how to run the multi-instance task. + * An object that indicates that the Task is a multi-instance Task, and contains information + * about how to run the multi-instance Task. */ multiInstanceSettings?: MultiInstanceSettings; /** - * The tasks that this task depends on. This task will not be scheduled until all tasks that it - * depends on have completed successfully. If any of those tasks fail and exhaust their retry - * counts, this task will never be scheduled. If the job does not have usesTaskDependencies set + * The Tasks that this Task depends on. This Task will not be scheduled until all Tasks that it + * depends on have completed successfully. If any of those Tasks fail and exhaust their retry + * counts, this Task will never be scheduled. If the Job does not have usesTaskDependencies set * to true, and this element is present, the request fails with error code * TaskDependenciesNotSpecifiedOnJob. */ dependsOn?: TaskDependencies; /** - * A list of application packages that the Batch service will deploy to the compute node before - * running the command line. Application packages are downloaded and deployed to a shared - * directory, not the task working directory. Therefore, if a referenced package is already on - * the compute node, and is up to date, then it is not re-downloaded; the existing copy on the - * compute node is used. If a referenced application package cannot be installed, for example - * because the package has been deleted or because download failed, the task fails. + * A list of Packages that the Batch service will deploy to the Compute Node before running the + * command line. Application packages are downloaded and deployed to a shared directory, not the + * Task working directory. Therefore, if a referenced package is already on the Node, and is up + * to date, then it is not re-downloaded; the existing copy on the Compute Node is used. If a + * referenced Package cannot be installed, for example because the package has been deleted or + * because download failed, the Task fails. */ applicationPackageReferences?: ApplicationPackageReference[]; /** - * The settings for an authentication token that the task can use to perform Batch service - * operations. If this property is set, the Batch service provides the task with an + * The settings for an authentication token that the Task can use to perform Batch service + * operations. If this property is set, the Batch service provides the Task with an * authentication token which can be used to authenticate Batch service operations without - * requiring an account access key. The token is provided via the AZ_BATCH_AUTHENTICATION_TOKEN - * environment variable. The operations that the task can carry out using the token depend on the - * settings. For example, a task can request job permissions in order to add other tasks to the - * job, or check the status of the job or of other tasks under the job. + * requiring an Account access key. The token is provided via the AZ_BATCH_AUTHENTICATION_TOKEN + * environment variable. The operations that the Task can carry out using the token depend on the + * settings. For example, a Task can request Job permissions in order to add other Tasks to the + * Job, or check the status of the Job or of other Tasks under the Job. */ authenticationTokenSettings?: AuthenticationTokenSettings; } /** * An interface representing TaskAddCollectionParameter. - * @summary A collection of Azure Batch tasks to add. + * @summary A collection of Azure Batch Tasks to add. */ export interface TaskAddCollectionParameter { /** - * The collection of tasks to add. The maximum count of tasks is 100. The total serialized size - * of this collection must be less than 1MB. If it is greater than 1MB (for example if each task + * The collection of Tasks to add. The maximum count of Tasks is 100. The total serialized size + * of this collection must be less than 1MB. If it is greater than 1MB (for example if each Task * has 100's of resource files or environment variables), the request will fail with code - * 'RequestBodyTooLarge' and should be retried again with fewer tasks. + * 'RequestBodyTooLarge' and should be retried again with fewer Tasks. */ value: TaskAddParameter[]; } @@ -3781,46 +4115,46 @@ export interface BatchError { /** * An interface representing TaskAddResult. - * @summary Result for a single task added as part of an add task collection operation. + * @summary Result for a single Task added as part of an add Task collection operation. */ export interface TaskAddResult { /** - * The status of the add task request. Possible values include: 'success', 'clientError', + * The status of the add Task request. Possible values include: 'success', 'clientError', * 'serverError' */ status: TaskAddStatus; /** - * The ID of the task for which this is the result. + * The ID of the Task for which this is the result. */ taskId: string; /** - * The ETag of the task, if the task was successfully added. You can use this to detect whether - * the task has changed between requests. In particular, you can be pass the ETag with an Update + * The ETag of the Task, if the Task was successfully added. You can use this to detect whether + * the Task has changed between requests. In particular, you can be pass the ETag with an Update * Task request to specify that your changes should take effect only if nobody else has modified - * the job in the meantime. + * the Job in the meantime. */ eTag?: string; /** - * The last modified time of the task. + * The last modified time of the Task. */ lastModified?: Date; /** - * The URL of the task, if the task was successfully added. + * The URL of the Task, if the Task was successfully added. */ location?: string; /** - * The error encountered while attempting to add the task. + * The error encountered while attempting to add the Task. */ error?: BatchError; } /** * An interface representing TaskAddCollectionResult. - * @summary The result of adding a collection of tasks to a job. + * @summary The result of adding a collection of Tasks to a Job. */ export interface TaskAddCollectionResult { /** - * The results of the add task collection operation. + * The results of the add Task collection operation. */ value?: TaskAddResult[]; } @@ -3835,7 +4169,7 @@ export interface SubtaskInformation { */ id?: number; /** - * Information about the compute node on which the subtask ran. + * Information about the Compute Node on which the subtask ran. */ nodeInfo?: ComputeNodeInformation; /** @@ -3858,12 +4192,12 @@ export interface SubtaskInformation { */ exitCode?: number; /** - * Information about the container under which the task is executing. This property is set only - * if the task runs in a container context. + * Information about the container under which the Task is executing. This property is set only + * if the Task runs in a container context. */ containerInfo?: TaskContainerExecutionInformation; /** - * Information describing the task failure, if any. This property is set only if the task is in + * Information describing the Task failure, if any. This property is set only if the Task is in * the completed state and encountered a failure. */ failureInfo?: TaskFailureInformation; @@ -3886,7 +4220,7 @@ export interface SubtaskInformation { */ previousStateTransitionTime?: Date; /** - * The result of the task execution. If the value is 'failed', then the details of the failure + * The result of the Task execution. If the value is 'failed', then the details of the failure * can be found in the failureInfo property. Possible values include: 'success', 'failure' */ result?: TaskExecutionResult; @@ -3894,7 +4228,7 @@ export interface SubtaskInformation { /** * An interface representing CloudTaskListSubtasksResult. - * @summary The result of listing the subtasks of a task. + * @summary The result of listing the subtasks of a Task. */ export interface CloudTaskListSubtasksResult { /** @@ -3905,95 +4239,95 @@ export interface CloudTaskListSubtasksResult { /** * An interface representing TaskInformation. - * @summary Information about a task running on a compute node. + * @summary Information about a Task running on a Compute Node. */ export interface TaskInformation { /** - * The URL of the task. + * The URL of the Task. */ taskUrl?: string; /** - * The ID of the job to which the task belongs. + * The ID of the Job to which the Task belongs. */ jobId?: string; /** - * The ID of the task. + * The ID of the Task. */ taskId?: string; /** - * The ID of the subtask if the task is a multi-instance task. + * The ID of the subtask if the Task is a multi-instance Task. */ subtaskId?: number; /** - * The current state of the task. Possible values include: 'active', 'preparing', 'running', + * The current state of the Task. Possible values include: 'active', 'preparing', 'running', * 'completed' */ taskState: TaskState; /** - * Information about the execution of the task. + * Information about the execution of the Task. */ executionInfo?: TaskExecutionInformation; } /** * An interface representing StartTaskInformation. - * @summary Information about a start task running on a compute node. + * @summary Information about a StartTask running on a Compute Node. */ export interface StartTaskInformation { /** - * The state of the start task on the compute node. Possible values include: 'running', + * The state of the StartTask on the Compute Node. Possible values include: 'running', * 'completed' */ state: StartTaskState; /** - * The time at which the start task started running. This value is reset every time the task is - * restarted or retried (that is, this is the most recent time at which the start task started + * The time at which the StartTask started running. This value is reset every time the Task is + * restarted or retried (that is, this is the most recent time at which the StartTask started * running). */ startTime: Date; /** - * The time at which the start task stopped running. This is the end time of the most recent run - * of the start task, if that run has completed (even if that run failed and a retry is pending). - * This element is not present if the start task is currently running. + * The time at which the StartTask stopped running. This is the end time of the most recent run + * of the StartTask, if that run has completed (even if that run failed and a retry is pending). + * This element is not present if the StartTask is currently running. */ endTime?: Date; /** - * The exit code of the program specified on the start task command line. This property is set - * only if the start task is in the completed state. In general, the exit code for a process + * The exit code of the program specified on the StartTask command line. This property is set + * only if the StartTask is in the completed state. In general, the exit code for a process * reflects the specific convention implemented by the application developer for that process. If * you use the exit code value to make decisions in your code, be sure that you know the exit * code convention used by the application process. However, if the Batch service terminates the - * start task (due to timeout, or user termination via the API) you may see an operating + * StartTask (due to timeout, or user termination via the API) you may see an operating * system-defined exit code. */ exitCode?: number; /** - * Information about the container under which the task is executing. This property is set only - * if the task runs in a container context. + * Information about the container under which the Task is executing. This property is set only + * if the Task runs in a container context. */ containerInfo?: TaskContainerExecutionInformation; /** - * Information describing the task failure, if any. This property is set only if the task is in + * Information describing the Task failure, if any. This property is set only if the Task is in * the completed state and encountered a failure. */ failureInfo?: TaskFailureInformation; /** - * The number of times the task has been retried by the Batch service. Task application failures - * (non-zero exit code) are retried, pre-processing errors (the task could not be run) and file - * upload errors are not retried. The Batch service will retry the task up to the limit specified + * The number of times the Task has been retried by the Batch service. Task application failures + * (non-zero exit code) are retried, pre-processing errors (the Task could not be run) and file + * upload errors are not retried. The Batch service will retry the Task up to the limit specified * by the constraints. */ retryCount: number; /** - * The most recent time at which a retry of the task started running. This element is present - * only if the task was retried (i.e. retryCount is nonzero). If present, this is typically the - * same as startTime, but may be different if the task has been restarted for reasons other than - * retry; for example, if the compute node was rebooted during a retry, then the startTime is + * The most recent time at which a retry of the Task started running. This element is present + * only if the Task was retried (i.e. retryCount is nonzero). If present, this is typically the + * same as startTime, but may be different if the Task has been restarted for reasons other than + * retry; for example, if the Compute Node was rebooted during a retry, then the startTime is * updated but the lastRetryTime is not. */ lastRetryTime?: Date; /** - * The result of the task execution. If the value is 'failed', then the details of the failure + * The result of the Task execution. If the value is 'failed', then the details of the failure * can be found in the failureInfo property. Possible values include: 'success', 'failure' */ result?: TaskExecutionResult; @@ -4001,28 +4335,28 @@ export interface StartTaskInformation { /** * An interface representing ComputeNodeError. - * @summary An error encountered by a compute node. + * @summary An error encountered by a Compute Node. */ export interface ComputeNodeError { /** - * An identifier for the compute node error. Codes are invariant and are intended to be consumed + * An identifier for the Compute Node error. Codes are invariant and are intended to be consumed * programmatically. */ code?: string; /** - * A message describing the compute node error, intended to be suitable for display in a user + * A message describing the Compute Node error, intended to be suitable for display in a user * interface. */ message?: string; /** - * The list of additional error details related to the compute node error. + * The list of additional error details related to the Compute Node error. */ errorDetails?: NameValuePair[]; } /** * An interface representing InboundEndpoint. - * @summary An inbound endpoint on a compute node. + * @summary An inbound endpoint on a Compute Node. */ export interface InboundEndpoint { /** @@ -4034,11 +4368,11 @@ export interface InboundEndpoint { */ protocol: InboundEndpointProtocol; /** - * The public IP address of the compute node. + * The public IP address of the Compute Node. */ publicIPAddress: string; /** - * The public fully qualified domain name for the compute node. + * The public fully qualified domain name for the Compute Node. */ publicFQDN: string; /** @@ -4053,203 +4387,211 @@ export interface InboundEndpoint { /** * An interface representing ComputeNodeEndpointConfiguration. - * @summary The endpoint configuration for the compute node. + * @summary The endpoint configuration for the Compute Node. */ export interface ComputeNodeEndpointConfiguration { /** - * The list of inbound endpoints that are accessible on the compute node. + * The list of inbound endpoints that are accessible on the Compute Node. */ inboundEndpoints: InboundEndpoint[]; } /** * An interface representing ComputeNode. - * @summary A compute node in the Batch service. + * @summary A Compute Node in the Batch service. */ export interface ComputeNode { /** - * The ID of the compute node. Every node that is added to a pool is assigned a unique ID. - * Whenever a node is removed from a pool, all of its local files are deleted, and the ID is - * reclaimed and could be reused for new nodes. + * The ID of the Compute Node. Every Compute Node that is added to a Pool is assigned a unique + * ID. Whenever a Compute Node is removed from a Pool, all of its local files are deleted, and + * the ID is reclaimed and could be reused for new Compute Nodes. */ id?: string; /** - * The URL of the compute node. + * The URL of the Compute Node. */ url?: string; /** - * The current state of the compute node. The low-priority node has been preempted. Tasks which - * were running on the node when it was preempted will be rescheduled when another node becomes - * available. Possible values include: 'idle', 'rebooting', 'reimaging', 'running', 'unusable', - * 'creating', 'starting', 'waitingForStartTask', 'startTaskFailed', 'unknown', 'leavingPool', - * 'offline', 'preempted' + * The current state of the Compute Node. The low-priority Compute Node has been preempted. Tasks + * which were running on the Compute Node when it was preempted will be rescheduled when another + * Compute Node becomes available. Possible values include: 'idle', 'rebooting', 'reimaging', + * 'running', 'unusable', 'creating', 'starting', 'waitingForStartTask', 'startTaskFailed', + * 'unknown', 'leavingPool', 'offline', 'preempted' */ state?: ComputeNodeState; /** - * Whether the compute node is available for task scheduling. Possible values include: 'enabled', + * Whether the Compute Node is available for Task scheduling. Possible values include: 'enabled', * 'disabled' */ schedulingState?: SchedulingState; /** - * The time at which the compute node entered its current state. + * The time at which the Compute Node entered its current state. */ stateTransitionTime?: Date; /** - * The last time at which the compute node was started. This property may not be present if the - * node state is unusable. + * The last time at which the Compute Node was started. This property may not be present if the + * Compute Node state is unusable. */ lastBootTime?: Date; /** - * The time at which this compute node was allocated to the pool. This is the time when the node - * was initially allocated and doesn't change once set. It is not updated when the node is - * service healed or preempted. + * The time at which this Compute Node was allocated to the Pool. This is the time when the + * Compute Node was initially allocated and doesn't change once set. It is not updated when the + * Compute Node is service healed or preempted. */ allocationTime?: Date; /** - * The IP address that other compute nodes can use to communicate with this compute node. Every - * node that is added to a pool is assigned a unique IP address. Whenever a node is removed from - * a pool, all of its local files are deleted, and the IP address is reclaimed and could be - * reused for new nodes. + * The IP address that other Nodes can use to communicate with this Compute Node. Every Compute + * Node that is added to a Pool is assigned a unique IP address. Whenever a Compute Node is + * removed from a Pool, all of its local files are deleted, and the IP address is reclaimed and + * could be reused for new Compute Nodes. */ ipAddress?: string; /** - * An identifier which can be passed when adding a task to request that the task be scheduled on - * this node. Note that this is just a soft affinity. If the target node is busy or unavailable - * at the time the task is scheduled, then the task will be scheduled elsewhere. + * An identifier which can be passed when adding a Task to request that the Task be scheduled on + * this Compute Node. Note that this is just a soft affinity. If the target Compute Node is busy + * or unavailable at the time the Task is scheduled, then the Task will be scheduled elsewhere. */ affinityId?: string; /** - * The size of the virtual machine hosting the compute node. For information about available - * sizes of virtual machines in pools, see Choose a VM size for compute nodes in an Azure Batch - * pool (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). + * The size of the virtual machine hosting the Compute Node. For information about available + * sizes of virtual machines in Pools, see Choose a VM size for Compute Nodes in an Azure Batch + * Pool (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). */ vmSize?: string; /** - * The total number of job tasks completed on the compute node. This includes Job Manager tasks - * and normal tasks, but not Job Preparation, Job Release or Start tasks. + * The total number of Job Tasks completed on the Compute Node. This includes Job Manager Tasks + * and normal Tasks, but not Job Preparation, Job Release or Start Tasks. */ totalTasksRun?: number; /** - * The total number of currently running job tasks on the compute node. This includes Job Manager - * tasks and normal tasks, but not Job Preparation, Job Release or Start tasks. + * The total number of currently running Job Tasks on the Compute Node. This includes Job Manager + * Tasks and normal Tasks, but not Job Preparation, Job Release or Start Tasks. */ runningTasksCount?: number; /** - * The total number of job tasks which completed successfully (with exitCode 0) on the compute - * node. This includes Job Manager tasks and normal tasks, but not Job Preparation, Job Release - * or Start tasks. + * The total number of scheduling slots used by currently running Job Tasks on the Compute Node. + * This includes Job Manager Tasks and normal Tasks, but not Job Preparation, Job Release or + * Start Tasks. + */ + runningTaskSlotsCount?: number; + /** + * The total number of Job Tasks which completed successfully (with exitCode 0) on the Compute + * Node. This includes Job Manager Tasks and normal Tasks, but not Job Preparation, Job Release + * or Start Tasks. */ totalTasksSucceeded?: number; /** - * A list of tasks whose state has recently changed. This property is present only if at least - * one task has run on this node since it was assigned to the pool. + * A list of Tasks whose state has recently changed. This property is present only if at least + * one Task has run on this Compute Node since it was assigned to the Pool. */ recentTasks?: TaskInformation[]; /** - * The task specified to run on the compute node as it joins the pool. + * The Task specified to run on the Compute Node as it joins the Pool. */ startTask?: StartTask; /** - * Runtime information about the execution of the start task on the compute node. + * Runtime information about the execution of the StartTask on the Compute Node. */ startTaskInfo?: StartTaskInformation; /** - * The list of certificates installed on the compute node. For Windows compute nodes, the Batch - * service installs the certificates to the specified certificate store and location. For Linux - * compute nodes, the certificates are stored in a directory inside the task working directory - * and an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for - * this location. For certificates with visibility of 'remoteUser', a 'certs' directory is - * created in the user's home directory (e.g., /home/{user-name}/certs) and certificates are - * placed in that directory. + * The list of Certificates installed on the Compute Node. For Windows Nodes, the Batch service + * installs the Certificates to the specified Certificate store and location. For Linux Compute + * Nodes, the Certificates are stored in a directory inside the Task working directory and an + * environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the Task to query for this + * location. For Certificates with visibility of 'remoteUser', a 'certs' directory is created in + * the user's home directory (e.g., /home/{user-name}/certs) and Certificates are placed in that + * directory. */ certificateReferences?: CertificateReference[]; /** - * The list of errors that are currently being encountered by the compute node. + * The list of errors that are currently being encountered by the Compute Node. */ errors?: ComputeNodeError[]; /** - * Whether this compute node is a dedicated node. If false, the node is a low-priority node. + * Whether this Compute Node is a dedicated Compute Node. If false, the Compute Node is a + * low-priority Compute Node. */ isDedicated?: boolean; /** - * The endpoint configuration for the compute node. + * The endpoint configuration for the Compute Node. */ endpointConfiguration?: ComputeNodeEndpointConfiguration; /** - * Information about the node agent version and the time the node upgraded to a new version. + * Information about the Compute Node agent version and the time the Compute Node upgraded to a + * new version. */ nodeAgentInfo?: NodeAgentInformation; } /** * An interface representing ComputeNodeUser. - * @summary A user account for RDP or SSH access on a compute node. + * @summary A user Account for RDP or SSH access on a Compute Node. */ export interface ComputeNodeUser { /** - * The user name of the account. + * The user name of the Account. */ name: string; /** - * Whether the account should be an administrator on the compute node. The default value is + * Whether the Account should be an administrator on the Compute Node. The default value is * false. */ isAdmin?: boolean; /** - * The time at which the account should expire. If omitted, the default is 1 day from the current - * time. For Linux compute nodes, the expiryTime has a precision up to a day. + * The time at which the Account should expire. If omitted, the default is 1 day from the current + * time. For Linux Compute Nodes, the expiryTime has a precision up to a day. */ expiryTime?: Date; /** - * The password of the account. The password is required for Windows nodes (those created with - * 'cloudServiceConfiguration', or created with 'virtualMachineConfiguration' using a Windows - * image reference). For Linux compute nodes, the password can optionally be specified along with - * the sshPublicKey property. + * The password of the Account. The password is required for Windows Compute Nodes (those created + * with 'cloudServiceConfiguration', or created with 'virtualMachineConfiguration' using a + * Windows Image reference). For Linux Compute Nodes, the password can optionally be specified + * along with the sshPublicKey property. */ password?: string; /** - * The SSH public key that can be used for remote login to the compute node. The public key + * The SSH public key that can be used for remote login to the Compute Node. The public key * should be compatible with OpenSSH encoding and should be base 64 encoded. This property can be - * specified only for Linux nodes. If this is specified for a Windows node, then the Batch - * service rejects the request; if you are calling the REST API directly, the HTTP status code is - * 400 (Bad Request). + * specified only for Linux Compute Nodes. If this is specified for a Windows Compute Node, then + * the Batch service rejects the request; if you are calling the REST API directly, the HTTP + * status code is 400 (Bad Request). */ sshPublicKey?: string; } /** * An interface representing ComputeNodeGetRemoteLoginSettingsResult. - * @summary The remote login settings for a compute node. + * @summary The remote login settings for a Compute Node. */ export interface ComputeNodeGetRemoteLoginSettingsResult { /** - * The IP address used for remote login to the compute node. + * The IP address used for remote login to the Compute Node. */ remoteLoginIPAddress: string; /** - * The port used for remote login to the compute node. + * The port used for remote login to the Compute Node. */ remoteLoginPort: number; } /** * An interface representing JobSchedulePatchParameter. - * @summary The set of changes to be made to a job schedule. + * @summary The set of changes to be made to a Job Schedule. */ export interface JobSchedulePatchParameter { /** - * The schedule according to which jobs will be created. If you do not specify this element, the + * The schedule according to which Jobs will be created. If you do not specify this element, the * existing schedule is left unchanged. */ schedule?: Schedule; /** - * The details of the jobs to be created on this schedule. Updates affect only jobs that are - * started after the update has taken place. Any currently active job continues with the older + * The details of the Jobs to be created on this schedule. Updates affect only Jobs that are + * started after the update has taken place. Any currently active Job continues with the older * specification. */ jobSpecification?: JobSpecification; /** - * A list of name-value pairs associated with the job schedule as metadata. If you do not specify + * A list of name-value pairs associated with the Job Schedule as metadata. If you do not specify * this element, existing metadata is left unchanged. */ metadata?: MetadataItem[]; @@ -4257,23 +4599,23 @@ export interface JobSchedulePatchParameter { /** * An interface representing JobScheduleUpdateParameter. - * @summary The set of changes to be made to a job schedule. + * @summary The set of changes to be made to a Job Schedule. */ export interface JobScheduleUpdateParameter { /** - * The schedule according to which jobs will be created. If you do not specify this element, it - * is equivalent to passing the default schedule: that is, a single job scheduled to run + * The schedule according to which Jobs will be created. If you do not specify this element, it + * is equivalent to passing the default schedule: that is, a single Job scheduled to run * immediately. */ schedule: Schedule; /** - * Details of the jobs to be created on this schedule. Updates affect only jobs that are started - * after the update has taken place. Any currently active job continues with the older + * Details of the Jobs to be created on this schedule. Updates affect only Jobs that are started + * after the update has taken place. Any currently active Job continues with the older * specification. */ jobSpecification: JobSpecification; /** - * A list of name-value pairs associated with the job schedule as metadata. If you do not specify + * A list of name-value pairs associated with the Job Schedule as metadata. If you do not specify * this element, it takes the default value of an empty list; in effect, any existing metadata is * deleted. */ @@ -4282,11 +4624,11 @@ export interface JobScheduleUpdateParameter { /** * An interface representing JobDisableParameter. - * @summary Options when disabling a job. + * @summary Options when disabling a Job. */ export interface JobDisableParameter { /** - * What to do with active tasks associated with the job. Possible values include: 'requeue', + * What to do with active Tasks associated with the Job. Possible values include: 'requeue', * 'terminate', 'wait' */ disableTasks: DisableJobOption; @@ -4294,50 +4636,51 @@ export interface JobDisableParameter { /** * An interface representing JobTerminateParameter. - * @summary Options when terminating a job. + * @summary Options when terminating a Job. */ export interface JobTerminateParameter { /** - * The text you want to appear as the job's TerminateReason. The default is 'UserTerminate'. + * The text you want to appear as the Job's TerminateReason. The default is 'UserTerminate'. */ terminateReason?: string; } /** * An interface representing JobPatchParameter. - * @summary The set of changes to be made to a job. + * @summary The set of changes to be made to a Job. */ export interface JobPatchParameter { /** - * The priority of the job. Priority values can range from -1000 to 1000, with -1000 being the - * lowest priority and 1000 being the highest priority. If omitted, the priority of the job is + * The priority of the Job. Priority values can range from -1000 to 1000, with -1000 being the + * lowest priority and 1000 being the highest priority. If omitted, the priority of the Job is * left unchanged. */ priority?: number; /** - * The action the Batch service should take when all tasks in the job are in the completed state. + * The action the Batch service should take when all Tasks in the Job are in the completed state. * If omitted, the completion behavior is left unchanged. You may not change the value from - * terminatejob to noaction - that is, once you have engaged automatic job termination, you + * terminatejob to noaction - that is, once you have engaged automatic Job termination, you * cannot turn it off again. If you try to do this, the request fails with an 'invalid property * value' error response; if you are calling the REST API directly, the HTTP status code is 400 * (Bad Request). Possible values include: 'noAction', 'terminateJob' */ onAllTasksComplete?: OnAllTasksComplete; /** - * The execution constraints for the job. If omitted, the existing execution constraints are left + * The execution constraints for the Job. If omitted, the existing execution constraints are left * unchanged. */ constraints?: JobConstraints; /** - * The pool on which the Batch service runs the job's tasks. You may change the pool for a job - * only when the job is disabled. The Patch Job call will fail if you include the poolInfo - * element and the job is not disabled. If you specify an autoPoolSpecification specification in - * the poolInfo, only the keepAlive property can be updated, and then only if the auto pool has a - * poolLifetimeOption of job. If omitted, the job continues to run on its current pool. + * The Pool on which the Batch service runs the Job's Tasks. You may change the Pool for a Job + * only when the Job is disabled. The Patch Job call will fail if you include the poolInfo + * element and the Job is not disabled. If you specify an autoPoolSpecification in the poolInfo, + * only the keepAlive property of the autoPoolSpecification can be updated, and then only if the + * autoPoolSpecification has a poolLifetimeOption of Job (other job properties can be updated as + * normal). If omitted, the Job continues to run on its current Pool. */ poolInfo?: PoolInformation; /** - * A list of name-value pairs associated with the job as metadata. If omitted, the existing job + * A list of name-value pairs associated with the Job as metadata. If omitted, the existing Job * metadata is left unchanged. */ metadata?: MetadataItem[]; @@ -4345,38 +4688,39 @@ export interface JobPatchParameter { /** * An interface representing JobUpdateParameter. - * @summary The set of changes to be made to a job. + * @summary The set of changes to be made to a Job. */ export interface JobUpdateParameter { /** - * The priority of the job. Priority values can range from -1000 to 1000, with -1000 being the + * The priority of the Job. Priority values can range from -1000 to 1000, with -1000 being the * lowest priority and 1000 being the highest priority. If omitted, it is set to the default * value 0. */ priority?: number; /** - * The execution constraints for the job. If omitted, the constraints are cleared. + * The execution constraints for the Job. If omitted, the constraints are cleared. */ constraints?: JobConstraints; /** - * The pool on which the Batch service runs the job's tasks. You may change the pool for a job - * only when the job is disabled. The Update Job call will fail if you include the poolInfo - * element and the job is not disabled. If you specify an autoPoolSpecification specification in - * the poolInfo, only the keepAlive property can be updated, and then only if the auto pool has a - * poolLifetimeOption of job. + * The Pool on which the Batch service runs the Job's Tasks. You may change the Pool for a Job + * only when the Job is disabled. The Update Job call will fail if you include the poolInfo + * element and the Job is not disabled. If you specify an autoPoolSpecification in the poolInfo, + * only the keepAlive property of the autoPoolSpecification can be updated, and then only if the + * autoPoolSpecification has a poolLifetimeOption of Job (other job properties can be updated as + * normal). */ poolInfo: PoolInformation; /** - * A list of name-value pairs associated with the job as metadata. If omitted, it takes the + * A list of name-value pairs associated with the Job as metadata. If omitted, it takes the * default value of an empty list; in effect, any existing metadata is deleted. */ metadata?: MetadataItem[]; /** - * The action the Batch service should take when all tasks in the job are in the completed state. + * The action the Batch service should take when all Tasks in the Job are in the completed state. * If omitted, the completion behavior is set to noaction. If the current value is terminatejob, - * this is an error because a job's completion behavior may not be changed from terminatejob to + * this is an error because a Job's completion behavior may not be changed from terminatejob to * noaction. You may not change the value from terminatejob to noaction - that is, once you have - * engaged automatic job termination, you cannot turn it off again. If you try to do this, the + * engaged automatic Job termination, you cannot turn it off again. If you try to do this, the * request fails and Batch returns status code 400 (Bad Request) and an 'invalid property value' * error response. If you do not specify this element in a PUT request, it is equivalent to * passing noaction. This is an error if the current value is terminatejob. Possible values @@ -4387,19 +4731,19 @@ export interface JobUpdateParameter { /** * An interface representing PoolEnableAutoScaleParameter. - * @summary Options for enabling automatic scaling on a pool. + * @summary Options for enabling automatic scaling on a Pool. */ export interface PoolEnableAutoScaleParameter { /** - * The formula for the desired number of compute nodes in the pool. The formula is checked for - * validity before it is applied to the pool. If the formula is not valid, the Batch service + * The formula for the desired number of Compute Nodes in the Pool. The formula is checked for + * validity before it is applied to the Pool. If the formula is not valid, the Batch service * rejects the request with detailed error information. For more information about specifying - * this formula, see Automatically scale compute nodes in an Azure Batch pool + * this formula, see Automatically scale Compute Nodes in an Azure Batch Pool * (https://azure.microsoft.com/en-us/documentation/articles/batch-automatic-scaling). */ autoScaleFormula?: string; /** - * The time interval at which to automatically adjust the pool size according to the autoscale + * The time interval at which to automatically adjust the Pool size according to the autoscale * formula. The default value is 15 minutes. The minimum and maximum value are 5 minutes and 168 * hours respectively. If you specify a value less than 5 minutes or greater than 168 hours, the * Batch service rejects the request with an invalid property value error; if you are calling the @@ -4412,14 +4756,14 @@ export interface PoolEnableAutoScaleParameter { /** * An interface representing PoolEvaluateAutoScaleParameter. - * @summary Options for evaluating an automatic scaling formula on a pool. + * @summary Options for evaluating an automatic scaling formula on a Pool. */ export interface PoolEvaluateAutoScaleParameter { /** - * The formula for the desired number of compute nodes in the pool. The formula is validated and - * its results calculated, but it is not applied to the pool. To apply the formula to the pool, - * 'Enable automatic scaling on a pool'. For more information about specifying this formula, see - * Automatically scale compute nodes in an Azure Batch pool + * The formula for the desired number of Compute Nodes in the Pool. The formula is validated and + * its results calculated, but it is not applied to the Pool. To apply the formula to the Pool, + * 'Enable automatic scaling on a Pool'. For more information about specifying this formula, see + * Automatically scale Compute Nodes in an Azure Batch Pool * (https://azure.microsoft.com/en-us/documentation/articles/batch-automatic-scaling). */ autoScaleFormula: string; @@ -4427,120 +4771,122 @@ export interface PoolEvaluateAutoScaleParameter { /** * An interface representing PoolResizeParameter. - * @summary Options for changing the size of a pool. + * @summary Options for changing the size of a Pool. */ export interface PoolResizeParameter { /** - * The desired number of dedicated compute nodes in the pool. + * The desired number of dedicated Compute Nodes in the Pool. */ targetDedicatedNodes?: number; /** - * The desired number of low-priority compute nodes in the pool. + * The desired number of low-priority Compute Nodes in the Pool. */ targetLowPriorityNodes?: number; /** - * The timeout for allocation of compute nodes to the pool or removal of compute nodes from the - * pool. The default value is 15 minutes. The minimum value is 5 minutes. If you specify a value - * less than 5 minutes, the Batch service returns an error; if you are calling the REST API - * directly, the HTTP status code is 400 (Bad Request). + * The timeout for allocation of Nodes to the Pool or removal of Compute Nodes from the Pool. The + * default value is 15 minutes. The minimum value is 5 minutes. If you specify a value less than + * 5 minutes, the Batch service returns an error; if you are calling the REST API directly, the + * HTTP status code is 400 (Bad Request). */ resizeTimeout?: string; /** - * Determines what to do with a node and its running task(s) if the pool size is decreasing. The - * default value is requeue. Possible values include: 'requeue', 'terminate', 'taskCompletion', - * 'retainedData' + * Determines what to do with a Compute Node and its running task(s) if the Pool size is + * decreasing. The default value is requeue. Possible values include: 'requeue', 'terminate', + * 'taskCompletion', 'retainedData' */ nodeDeallocationOption?: ComputeNodeDeallocationOption; } /** * An interface representing PoolUpdatePropertiesParameter. - * @summary The set of changes to be made to a pool. + * @summary The set of changes to be made to a Pool. */ export interface PoolUpdatePropertiesParameter { /** - * A task to run on each compute node as it joins the pool. The task runs when the node is added - * to the pool or when the node is restarted. If this element is present, it overwrites any - * existing start task. If omitted, any existing start task is removed from the pool. + * A Task to run on each Compute Node as it joins the Pool. The Task runs when the Compute Node + * is added to the Pool or when the Compute Node is restarted. If this element is present, it + * overwrites any existing StartTask. If omitted, any existing StartTask is removed from the + * Pool. */ startTask?: StartTask; /** - * A list of certificates to be installed on each compute node in the pool. This list replaces - * any existing certificate references configured on the pool. If you specify an empty - * collection, any existing certificate references are removed from the pool. For Windows compute - * nodes, the Batch service installs the certificates to the specified certificate store and - * location. For Linux compute nodes, the certificates are stored in a directory inside the task - * working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the - * task to query for this location. For certificates with visibility of 'remoteUser', a 'certs' - * directory is created in the user's home directory (e.g., /home/{user-name}/certs) and - * certificates are placed in that directory. + * A list of Certificates to be installed on each Compute Node in the Pool. This list replaces + * any existing Certificate references configured on the Pool. If you specify an empty + * collection, any existing Certificate references are removed from the Pool. For Windows Nodes, + * the Batch service installs the Certificates to the specified Certificate store and location. + * For Linux Compute Nodes, the Certificates are stored in a directory inside the Task working + * directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the Task to + * query for this location. For Certificates with visibility of 'remoteUser', a 'certs' directory + * is created in the user's home directory (e.g., /home/{user-name}/certs) and Certificates are + * placed in that directory. */ certificateReferences: CertificateReference[]; /** - * The list of application packages to be installed on each compute node in the pool. The list - * replaces any existing application package references on the pool. Changes to application - * package references affect all new compute nodes joining the pool, but do not affect compute - * nodes that are already in the pool until they are rebooted or reimaged. There is a maximum of - * 10 application package references on any given pool. If omitted, or if you specify an empty - * collection, any existing application packages references are removed from the pool. + * The list of Application Packages to be installed on each Compute Node in the Pool. The list + * replaces any existing Application Package references on the Pool. Changes to Application + * Package references affect all new Compute Nodes joining the Pool, but do not affect Compute + * Nodes that are already in the Pool until they are rebooted or reimaged. There is a maximum of + * 10 Application Package references on any given Pool. If omitted, or if you specify an empty + * collection, any existing Application Packages references are removed from the Pool. A maximum + * of 10 references may be specified on a given Pool. */ applicationPackageReferences: ApplicationPackageReference[]; /** - * A list of name-value pairs associated with the pool as metadata. This list replaces any - * existing metadata configured on the pool. If omitted, or if you specify an empty collection, - * any existing metadata is removed from the pool. + * A list of name-value pairs associated with the Pool as metadata. This list replaces any + * existing metadata configured on the Pool. If omitted, or if you specify an empty collection, + * any existing metadata is removed from the Pool. */ metadata: MetadataItem[]; } /** * An interface representing PoolPatchParameter. - * @summary The set of changes to be made to a pool. + * @summary The set of changes to be made to a Pool. */ export interface PoolPatchParameter { /** - * A task to run on each compute node as it joins the pool. The task runs when the node is added - * to the pool or when the node is restarted. If this element is present, it overwrites any - * existing start task. If omitted, any existing start task is left unchanged. + * A Task to run on each Compute Node as it joins the Pool. The Task runs when the Compute Node + * is added to the Pool or when the Compute Node is restarted. If this element is present, it + * overwrites any existing StartTask. If omitted, any existing StartTask is left unchanged. */ startTask?: StartTask; /** - * A list of certificates to be installed on each compute node in the pool. If this element is - * present, it replaces any existing certificate references configured on the pool. If omitted, - * any existing certificate references are left unchanged. For Windows compute nodes, the Batch - * service installs the certificates to the specified certificate store and location. For Linux - * compute nodes, the certificates are stored in a directory inside the task working directory - * and an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for - * this location. For certificates with visibility of 'remoteUser', a 'certs' directory is - * created in the user's home directory (e.g., /home/{user-name}/certs) and certificates are - * placed in that directory. + * A list of Certificates to be installed on each Compute Node in the Pool. If this element is + * present, it replaces any existing Certificate references configured on the Pool. If omitted, + * any existing Certificate references are left unchanged. For Windows Nodes, the Batch service + * installs the Certificates to the specified Certificate store and location. For Linux Compute + * Nodes, the Certificates are stored in a directory inside the Task working directory and an + * environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the Task to query for this + * location. For Certificates with visibility of 'remoteUser', a 'certs' directory is created in + * the user's home directory (e.g., /home/{user-name}/certs) and Certificates are placed in that + * directory. */ certificateReferences?: CertificateReference[]; /** - * The list of application packages to be installed on each compute node in the pool. The list - * replaces any existing application package references on the pool. Changes to application - * package references affect all new compute nodes joining the pool, but do not affect compute - * nodes that are already in the pool until they are rebooted or reimaged. There is a maximum of - * 10 application package references on any given pool. If omitted, any existing application - * package references are left unchanged. + * A list of Packages to be installed on each Compute Node in the Pool. Changes to Package + * references affect all new Nodes joining the Pool, but do not affect Compute Nodes that are + * already in the Pool until they are rebooted or reimaged. If this element is present, it + * replaces any existing Package references. If you specify an empty collection, then all Package + * references are removed from the Pool. If omitted, any existing Package references are left + * unchanged. */ applicationPackageReferences?: ApplicationPackageReference[]; /** - * A list of name-value pairs associated with the pool as metadata. If this element is present, - * it replaces any existing metadata configured on the pool. If you specify an empty collection, - * any metadata is removed from the pool. If omitted, any existing metadata is left unchanged. + * A list of name-value pairs associated with the Pool as metadata. If this element is present, + * it replaces any existing metadata configured on the Pool. If you specify an empty collection, + * any metadata is removed from the Pool. If omitted, any existing metadata is left unchanged. */ metadata?: MetadataItem[]; } /** * An interface representing TaskUpdateParameter. - * @summary The set of changes to be made to a task. + * @summary The set of changes to be made to a Task. */ export interface TaskUpdateParameter { /** - * Constraints that apply to this task. If omitted, the task is given the default constraints. - * For multi-instance tasks, updating the retention time applies only to the primary task and not + * Constraints that apply to this Task. If omitted, the Task is given the default constraints. + * For multi-instance Tasks, updating the retention time applies only to the primary Task and not * subtasks. */ constraints?: TaskConstraints; @@ -4548,38 +4894,38 @@ export interface TaskUpdateParameter { /** * An interface representing NodeUpdateUserParameter. - * @summary The set of changes to be made to a user account on a node. + * @summary The set of changes to be made to a user Account on a Compute Node. */ export interface NodeUpdateUserParameter { /** - * The password of the account. The password is required for Windows nodes (those created with - * 'cloudServiceConfiguration', or created with 'virtualMachineConfiguration' using a Windows - * image reference). For Linux compute nodes, the password can optionally be specified along with - * the sshPublicKey property. If omitted, any existing password is removed. + * The password of the Account. The password is required for Windows Compute Nodes (those created + * with 'cloudServiceConfiguration', or created with 'virtualMachineConfiguration' using a + * Windows Image reference). For Linux Compute Nodes, the password can optionally be specified + * along with the sshPublicKey property. If omitted, any existing password is removed. */ password?: string; /** - * The time at which the account should expire. If omitted, the default is 1 day from the current - * time. For Linux compute nodes, the expiryTime has a precision up to a day. + * The time at which the Account should expire. If omitted, the default is 1 day from the current + * time. For Linux Compute Nodes, the expiryTime has a precision up to a day. */ expiryTime?: Date; /** - * The SSH public key that can be used for remote login to the compute node. The public key + * The SSH public key that can be used for remote login to the Compute Node. The public key * should be compatible with OpenSSH encoding and should be base 64 encoded. This property can be - * specified only for Linux nodes. If this is specified for a Windows node, then the Batch - * service rejects the request; if you are calling the REST API directly, the HTTP status code is - * 400 (Bad Request). If omitted, any existing SSH public key is removed. + * specified only for Linux Compute Nodes. If this is specified for a Windows Compute Node, then + * the Batch service rejects the request; if you are calling the REST API directly, the HTTP + * status code is 400 (Bad Request). If omitted, any existing SSH public key is removed. */ sshPublicKey?: string; } /** * An interface representing NodeRebootParameter. - * @summary Options for rebooting a compute node. + * @summary Options for rebooting a Compute Node. */ export interface NodeRebootParameter { /** - * When to reboot the compute node and what to do with currently running tasks. The default value + * When to reboot the Compute Node and what to do with currently running Tasks. The default value * is requeue. Possible values include: 'requeue', 'terminate', 'taskCompletion', 'retainedData' */ nodeRebootOption?: ComputeNodeRebootOption; @@ -4587,11 +4933,11 @@ export interface NodeRebootParameter { /** * An interface representing NodeReimageParameter. - * @summary Options for reimaging a compute node. + * @summary Options for reimaging a Compute Node. */ export interface NodeReimageParameter { /** - * When to reimage the compute node and what to do with currently running tasks. The default + * When to reimage the Compute Node and what to do with currently running Tasks. The default * value is requeue. Possible values include: 'requeue', 'terminate', 'taskCompletion', * 'retainedData' */ @@ -4600,11 +4946,11 @@ export interface NodeReimageParameter { /** * An interface representing NodeDisableSchedulingParameter. - * @summary Options for disabling scheduling on a compute node. + * @summary Options for disabling scheduling on a Compute Node. */ export interface NodeDisableSchedulingParameter { /** - * What to do with currently running tasks when disabling task scheduling on the compute node. + * What to do with currently running Tasks when disabling Task scheduling on the Compute Node. * The default value is requeue. Possible values include: 'requeue', 'terminate', * 'taskCompletion' */ @@ -4613,31 +4959,31 @@ export interface NodeDisableSchedulingParameter { /** * An interface representing NodeRemoveParameter. - * @summary Options for removing compute nodes from a pool. + * @summary Options for removing Compute Nodes from a Pool. */ export interface NodeRemoveParameter { /** - * A list containing the IDs of the compute nodes to be removed from the specified pool. + * A list containing the IDs of the Compute Nodes to be removed from the specified Pool. */ nodeList: string[]; /** - * The timeout for removal of compute nodes to the pool. The default value is 15 minutes. The + * The timeout for removal of Compute Nodes to the Pool. The default value is 15 minutes. The * minimum value is 5 minutes. If you specify a value less than 5 minutes, the Batch service * returns an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad * Request). */ resizeTimeout?: string; /** - * Determines what to do with a node and its running task(s) after it has been selected for - * deallocation. The default value is requeue. Possible values include: 'requeue', 'terminate', - * 'taskCompletion', 'retainedData' + * Determines what to do with a Compute Node and its running task(s) after it has been selected + * for deallocation. The default value is requeue. Possible values include: 'requeue', + * 'terminate', 'taskCompletion', 'retainedData' */ nodeDeallocationOption?: ComputeNodeDeallocationOption; } /** * An interface representing UploadBatchServiceLogsConfiguration. - * @summary The Azure Batch service log files upload configuration for a compute node. + * @summary The Azure Batch service log files upload configuration for a Compute Node. */ export interface UploadBatchServiceLogsConfiguration { /** @@ -4666,7 +5012,7 @@ export interface UploadBatchServiceLogsConfiguration { /** * An interface representing UploadBatchServiceLogsResult. - * @summary The result of uploading Batch service log files from a specific compute node. + * @summary The result of uploading Batch service log files from a specific Compute Node. */ export interface UploadBatchServiceLogsResult { /** @@ -4683,82 +5029,82 @@ export interface UploadBatchServiceLogsResult { /** * An interface representing NodeCounts. - * @summary The number of nodes in each node state. + * @summary The number of Compute Nodes in each Compute Node state. */ export interface NodeCounts { /** - * The number of nodes in the creating state. + * The number of Compute Nodes in the creating state. */ creating: number; /** - * The number of nodes in the idle state. + * The number of Compute Nodes in the idle state. */ idle: number; /** - * The number of nodes in the offline state. + * The number of Compute Nodes in the offline state. */ offline: number; /** - * The number of nodes in the preempted state. + * The number of Compute Nodes in the preempted state. */ preempted: number; /** - * The count of nodes in the rebooting state. + * The count of Compute Nodes in the rebooting state. */ rebooting: number; /** - * The number of nodes in the reimaging state. + * The number of Compute Nodes in the reimaging state. */ reimaging: number; /** - * The number of nodes in the running state. + * The number of Compute Nodes in the running state. */ running: number; /** - * The number of nodes in the starting state. + * The number of Compute Nodes in the starting state. */ starting: number; /** - * The number of nodes in the startTaskFailed state. + * The number of Compute Nodes in the startTaskFailed state. */ startTaskFailed: number; /** - * The number of nodes in the leavingPool state. + * The number of Compute Nodes in the leavingPool state. */ leavingPool: number; /** - * The number of nodes in the unknown state. + * The number of Compute Nodes in the unknown state. */ unknown: number; /** - * The number of nodes in the unusable state. + * The number of Compute Nodes in the unusable state. */ unusable: number; /** - * The number of nodes in the waitingForStartTask state. + * The number of Compute Nodes in the waitingForStartTask state. */ waitingForStartTask: number; /** - * The total number of nodes. + * The total number of Compute Nodes. */ total: number; } /** * An interface representing PoolNodeCounts. - * @summary The number of nodes in each state for a pool. + * @summary The number of Compute Nodes in each state for a Pool. */ export interface PoolNodeCounts { /** - * The ID of the pool. + * The ID of the Pool. */ poolId: string; /** - * The number of dedicated nodes in each state. + * The number of dedicated Compute Nodes in each state. */ dedicated?: NodeCounts; /** - * The number of low priority nodes in each state. + * The number of low priority Compute Nodes in each state. */ lowPriority?: NodeCounts; } @@ -4933,7 +5279,7 @@ export interface PoolListOptions { */ expand?: string; /** - * The maximum number of items to return in the response. A maximum of 1000 pools can be + * The maximum number of items to return in the response. A maximum of 1000 Pools can be * returned. Default value: 1000. */ maxResults?: number; @@ -5434,12 +5780,12 @@ export interface PoolRemoveNodesOptions { } /** - * Additional parameters for listNodeAgentSkus operation. + * Additional parameters for listSupportedImages operation. */ -export interface AccountListNodeAgentSkusOptions { +export interface AccountListSupportedImagesOptions { /** * An OData $filter clause. For more information on constructing this filter, see - * https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-node-agent-skus. + * https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-support-images. */ filter?: string; /** @@ -5921,7 +6267,7 @@ export interface JobListOptions { */ expand?: string; /** - * The maximum number of items to return in the response. A maximum of 1000 jobs can be returned. + * The maximum number of items to return in the response. A maximum of 1000 Jobs can be returned. * Default value: 1000. */ maxResults?: number; @@ -5964,7 +6310,7 @@ export interface JobListFromJobScheduleOptions { */ expand?: string; /** - * The maximum number of items to return in the response. A maximum of 1000 jobs can be returned. + * The maximum number of items to return in the response. A maximum of 1000 Jobs can be returned. * Default value: 1000. */ maxResults?: number; @@ -6003,7 +6349,7 @@ export interface JobListPreparationAndReleaseTaskStatusOptions { */ select?: string; /** - * The maximum number of items to return in the response. A maximum of 1000 tasks can be + * The maximum number of items to return in the response. A maximum of 1000 Tasks can be * returned. Default value: 1000. */ maxResults?: number; @@ -6092,7 +6438,7 @@ export interface CertificateListOptions { */ select?: string; /** - * The maximum number of items to return in the response. A maximum of 1000 certificates can be + * The maximum number of items to return in the response. A maximum of 1000 Certificates can be * returned. Default value: 1000. */ maxResults?: number; @@ -6917,7 +7263,7 @@ export interface JobScheduleListOptions { */ expand?: string; /** - * The maximum number of items to return in the response. A maximum of 1000 job schedules can be + * The maximum number of items to return in the response. A maximum of 1000 Job Schedules can be * returned. Default value: 1000. */ maxResults?: number; @@ -6985,7 +7331,7 @@ export interface TaskListOptions { */ expand?: string; /** - * The maximum number of items to return in the response. A maximum of 1000 tasks can be + * The maximum number of items to return in the response. A maximum of 1000 Tasks can be * returned. Default value: 1000. */ maxResults?: number; @@ -7610,7 +7956,7 @@ export interface ComputeNodeListOptions { */ select?: string; /** - * The maximum number of items to return in the response. A maximum of 1000 nodes can be + * The maximum number of items to return in the response. A maximum of 1000 Compute Nodes can be * returned. Default value: 1000. */ maxResults?: number; @@ -7696,9 +8042,9 @@ export interface PoolListNextOptions { } /** - * Additional parameters for listNodeAgentSkusNext operation. + * Additional parameters for listSupportedImagesNext operation. */ -export interface AccountListNodeAgentSkusNextOptions { +export interface AccountListSupportedImagesNextOptions { /** * The caller-generated request identity, in the form of a GUID with no decoration such as curly * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. @@ -8118,11 +8464,11 @@ export interface PoolListNextOptionalParams extends msRest.RequestOptionsBase { /** * Optional Parameters. */ -export interface AccountListNodeAgentSkusOptionalParams extends msRest.RequestOptionsBase { +export interface AccountListSupportedImagesOptionalParams extends msRest.RequestOptionsBase { /** * Additional parameters for the operation */ - accountListNodeAgentSkusOptions?: AccountListNodeAgentSkusOptions; + accountListSupportedImagesOptions?: AccountListSupportedImagesOptions; } /** @@ -8138,11 +8484,11 @@ export interface AccountListPoolNodeCountsOptionalParams extends msRest.RequestO /** * Optional Parameters. */ -export interface AccountListNodeAgentSkusNextOptionalParams extends msRest.RequestOptionsBase { +export interface AccountListSupportedImagesNextOptionalParams extends msRest.RequestOptionsBase { /** * Additional parameters for the operation */ - accountListNodeAgentSkusNextOptions?: AccountListNodeAgentSkusNextOptions; + accountListSupportedImagesNextOptions?: AccountListSupportedImagesNextOptions; } /** @@ -8230,7 +8576,7 @@ export interface JobEnableOptionalParams extends msRest.RequestOptionsBase { */ export interface JobTerminateOptionalParams extends msRest.RequestOptionsBase { /** - * The text you want to appear as the job's TerminateReason. The default is 'UserTerminate'. + * The text you want to appear as the Job's TerminateReason. The default is 'UserTerminate'. */ terminateReason?: string; /** @@ -8458,7 +8804,7 @@ export interface FileGetPropertiesFromComputeNodeOptionalParams extends msRest.R */ export interface FileListFromTaskOptionalParams extends msRest.RequestOptionsBase { /** - * Whether to list children of the task directory. This parameter can be used in combination with + * Whether to list children of the Task directory. This parameter can be used in combination with * the filter parameter to list specific type of files. */ recursive?: boolean; @@ -8667,8 +9013,8 @@ export interface TaskGetOptionalParams extends msRest.RequestOptionsBase { */ export interface TaskUpdateOptionalParams extends msRest.RequestOptionsBase { /** - * Constraints that apply to this task. If omitted, the task is given the default constraints. - * For multi-instance tasks, updating the retention time applies only to the primary task and not + * Constraints that apply to this Task. If omitted, the Task is given the default constraints. + * For multi-instance Tasks, updating the retention time applies only to the primary Task and not * subtasks. */ constraints?: TaskConstraints; @@ -8763,7 +9109,7 @@ export interface ComputeNodeGetOptionalParams extends msRest.RequestOptionsBase */ export interface ComputeNodeRebootOptionalParams extends msRest.RequestOptionsBase { /** - * When to reboot the compute node and what to do with currently running tasks. The default value + * When to reboot the Compute Node and what to do with currently running Tasks. The default value * is requeue. Possible values include: 'requeue', 'terminate', 'taskCompletion', 'retainedData' */ nodeRebootOption?: ComputeNodeRebootOption; @@ -8778,7 +9124,7 @@ export interface ComputeNodeRebootOptionalParams extends msRest.RequestOptionsBa */ export interface ComputeNodeReimageOptionalParams extends msRest.RequestOptionsBase { /** - * When to reimage the compute node and what to do with currently running tasks. The default + * When to reimage the Compute Node and what to do with currently running Tasks. The default * value is requeue. Possible values include: 'requeue', 'terminate', 'taskCompletion', * 'retainedData' */ @@ -8794,7 +9140,7 @@ export interface ComputeNodeReimageOptionalParams extends msRest.RequestOptionsB */ export interface ComputeNodeDisableSchedulingOptionalParams extends msRest.RequestOptionsBase { /** - * What to do with currently running tasks when disabling task scheduling on the compute node. + * What to do with currently running Tasks when disabling Task scheduling on the Compute Node. * The default value is requeue. Possible values include: 'requeue', 'terminate', * 'taskCompletion' */ @@ -8878,8 +9224,8 @@ export interface ApplicationListHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; /** @@ -8907,8 +9253,8 @@ export interface ApplicationGetHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; /** @@ -8936,8 +9282,8 @@ export interface PoolListUsageMetricsHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; /** @@ -8953,9 +9299,9 @@ export interface PoolListUsageMetricsHeaders { } /** - * Defines headers for ListNodeAgentSkus operation. + * Defines headers for ListSupportedImages operation. */ -export interface AccountListNodeAgentSkusHeaders { +export interface AccountListSupportedImagesHeaders { /** * The client-request-id provided by the client during the request. This will be returned only if * the return-client-request-id parameter was set to true. @@ -8965,8 +9311,8 @@ export interface AccountListNodeAgentSkusHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; /** @@ -8994,8 +9340,8 @@ export interface AccountListPoolNodeCountsHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; } @@ -9013,8 +9359,8 @@ export interface PoolGetAllLifetimeStatisticsHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; /** @@ -9042,8 +9388,8 @@ export interface JobGetAllLifetimeStatisticsHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; /** @@ -9071,8 +9417,8 @@ export interface CertificateAddHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; /** @@ -9104,8 +9450,8 @@ export interface CertificateListHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; /** @@ -9133,8 +9479,8 @@ export interface CertificateCancelDeletionHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; /** @@ -9166,8 +9512,8 @@ export interface CertificateDeleteHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; /** @@ -9195,8 +9541,8 @@ export interface CertificateGetHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; /** @@ -9224,8 +9570,8 @@ export interface FileDeleteFromTaskHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; } @@ -9243,8 +9589,8 @@ export interface FileGetFromTaskHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; /** @@ -9296,8 +9642,8 @@ export interface FileGetPropertiesFromTaskHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; /** @@ -9349,8 +9695,8 @@ export interface FileDeleteFromComputeNodeHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; } @@ -9368,8 +9714,8 @@ export interface FileGetFromComputeNodeHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; /** @@ -9421,8 +9767,8 @@ export interface FileGetPropertiesFromComputeNodeHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; /** @@ -9474,8 +9820,8 @@ export interface FileListFromTaskHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; /** @@ -9503,8 +9849,8 @@ export interface FileListFromComputeNodeHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; /** @@ -9532,8 +9878,8 @@ export interface JobScheduleExistsHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; /** @@ -9561,8 +9907,8 @@ export interface JobScheduleDeleteHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; } @@ -9580,8 +9926,8 @@ export interface JobScheduleGetHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; /** @@ -9609,8 +9955,8 @@ export interface JobSchedulePatchHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; /** @@ -9642,8 +9988,8 @@ export interface JobScheduleUpdateHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; /** @@ -9675,8 +10021,8 @@ export interface JobScheduleDisableHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; /** @@ -9708,8 +10054,8 @@ export interface JobScheduleEnableHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; /** @@ -9741,8 +10087,8 @@ export interface JobScheduleTerminateHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; /** @@ -9774,8 +10120,8 @@ export interface JobScheduleAddHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; /** @@ -9807,8 +10153,8 @@ export interface JobScheduleListHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; /** @@ -9836,8 +10182,8 @@ export interface JobDeleteHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; } @@ -9855,8 +10201,8 @@ export interface JobGetHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; /** @@ -9884,8 +10230,8 @@ export interface JobPatchHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; /** @@ -9917,8 +10263,8 @@ export interface JobUpdateHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; /** @@ -9950,8 +10296,8 @@ export interface JobDisableHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; /** @@ -9983,8 +10329,8 @@ export interface JobEnableHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; /** @@ -10016,8 +10362,8 @@ export interface JobTerminateHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; /** @@ -10049,8 +10395,8 @@ export interface JobAddHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; /** @@ -10082,8 +10428,8 @@ export interface JobListHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; /** @@ -10111,8 +10457,8 @@ export interface JobListFromJobScheduleHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; /** @@ -10140,8 +10486,8 @@ export interface JobListPreparationAndReleaseTaskStatusHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; /** @@ -10169,8 +10515,8 @@ export interface JobGetTaskCountsHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; } @@ -10188,8 +10534,8 @@ export interface PoolAddHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; /** @@ -10221,8 +10567,8 @@ export interface PoolListHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; /** @@ -10250,8 +10596,8 @@ export interface PoolDeleteHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; } @@ -10269,8 +10615,8 @@ export interface PoolExistsHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; /** @@ -10298,8 +10644,8 @@ export interface PoolGetHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; /** @@ -10327,8 +10673,8 @@ export interface PoolPatchHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; /** @@ -10360,8 +10706,8 @@ export interface PoolDisableAutoScaleHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; /** @@ -10393,8 +10739,8 @@ export interface PoolEnableAutoScaleHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; /** @@ -10426,8 +10772,8 @@ export interface PoolEvaluateAutoScaleHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; /** @@ -10459,8 +10805,8 @@ export interface PoolResizeHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; /** @@ -10492,8 +10838,8 @@ export interface PoolStopResizeHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; /** @@ -10525,8 +10871,8 @@ export interface PoolUpdatePropertiesHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; /** @@ -10558,8 +10904,8 @@ export interface PoolRemoveNodesHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; /** @@ -10591,8 +10937,8 @@ export interface TaskAddHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; /** @@ -10624,8 +10970,8 @@ export interface TaskListHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; /** @@ -10653,8 +10999,8 @@ export interface TaskAddCollectionHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; } @@ -10672,8 +11018,8 @@ export interface TaskDeleteHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; } @@ -10691,8 +11037,8 @@ export interface TaskGetHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; /** @@ -10724,8 +11070,8 @@ export interface TaskUpdateHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; /** @@ -10757,8 +11103,8 @@ export interface TaskListSubtasksHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; /** @@ -10786,8 +11132,8 @@ export interface TaskTerminateHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; /** @@ -10819,8 +11165,8 @@ export interface TaskReactivateHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; /** @@ -10852,8 +11198,8 @@ export interface ComputeNodeAddUserHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; /** @@ -10885,8 +11231,8 @@ export interface ComputeNodeDeleteUserHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; } @@ -10904,8 +11250,8 @@ export interface ComputeNodeUpdateUserHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; /** @@ -10937,8 +11283,8 @@ export interface ComputeNodeGetHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; /** @@ -10966,8 +11312,8 @@ export interface ComputeNodeRebootHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; /** @@ -10999,8 +11345,8 @@ export interface ComputeNodeReimageHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; /** @@ -11032,8 +11378,8 @@ export interface ComputeNodeDisableSchedulingHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; /** @@ -11065,8 +11411,8 @@ export interface ComputeNodeEnableSchedulingHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; /** @@ -11098,8 +11444,8 @@ export interface ComputeNodeGetRemoteLoginSettingsHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; /** @@ -11127,8 +11473,8 @@ export interface ComputeNodeGetRemoteDesktopHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; /** @@ -11156,8 +11502,8 @@ export interface ComputeNodeUploadBatchServiceLogsHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; } @@ -11175,8 +11521,8 @@ export interface ComputeNodeListHeaders { * A unique identifier for the request that was made to the Batch service. If a request is * consistently failing and you have verified that the request is properly formulated, you may * use this value to report the error to Microsoft. In your report, include the value of this - * request ID, the approximate time that the request was made, the Batch account against which - * the request was made, and the region that account resides in. + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. */ requestId: string; /** @@ -11194,7 +11540,7 @@ export interface ComputeNodeListHeaders { /** * @interface * An interface representing the ApplicationListResult. - * @summary The result of listing the applications available in an account. + * @summary The result of listing the applications available in an Account. * @extends Array */ export interface ApplicationListResult extends Array { @@ -11204,7 +11550,7 @@ export interface ApplicationListResult extends Array { /** * @interface * An interface representing the PoolListUsageMetricsResult. - * @summary The result of a listing the usage metrics for an account. + * @summary The result of a listing the usage metrics for an Account. * @extends Array */ export interface PoolListUsageMetricsResult extends Array { @@ -11214,7 +11560,7 @@ export interface PoolListUsageMetricsResult extends Array { /** * @interface * An interface representing the CloudPoolListResult. - * @summary The result of listing the pools in an account. + * @summary The result of listing the Pools in an Account. * @extends Array */ export interface CloudPoolListResult extends Array { @@ -11223,18 +11569,18 @@ export interface CloudPoolListResult extends Array { /** * @interface - * An interface representing the AccountListNodeAgentSkusResult. - * @summary The result of listing the supported node agent SKUs. - * @extends Array + * An interface representing the AccountListSupportedImagesResult. + * @summary The result of listing the supported Virtual Machine Images. + * @extends Array */ -export interface AccountListNodeAgentSkusResult extends Array { +export interface AccountListSupportedImagesResult extends Array { odatanextLink?: string; } /** * @interface * An interface representing the PoolNodeCountsListResult. - * @summary The result of listing the node counts in the account. + * @summary The result of listing the Compute Node counts in the Account. * @extends Array */ export interface PoolNodeCountsListResult extends Array { @@ -11244,7 +11590,7 @@ export interface PoolNodeCountsListResult extends Array { /** * @interface * An interface representing the CloudJobListResult. - * @summary The result of listing the jobs in an account. + * @summary The result of listing the Jobs in an Account. * @extends Array */ export interface CloudJobListResult extends Array { @@ -11254,8 +11600,8 @@ export interface CloudJobListResult extends Array { /** * @interface * An interface representing the CloudJobListPreparationAndReleaseTaskStatusResult. - * @summary The result of listing the status of the Job Preparation and Job Release tasks for a - * job. + * @summary The result of listing the status of the Job Preparation and Job Release Tasks for a + * Job. * @extends Array */ export interface CloudJobListPreparationAndReleaseTaskStatusResult extends Array { @@ -11265,7 +11611,7 @@ export interface CloudJobListPreparationAndReleaseTaskStatusResult extends Array /** * @interface * An interface representing the CertificateListResult. - * @summary The result of listing the certificates in the account. + * @summary The result of listing the Certificates in the Account. * @extends Array */ export interface CertificateListResult extends Array { @@ -11275,8 +11621,8 @@ export interface CertificateListResult extends Array { /** * @interface * An interface representing the NodeFileListResult. - * @summary The result of listing the files on a compute node, or the files associated with a task - * on a node. + * @summary The result of listing the files on a Compute Node, or the files associated with a Task + * on a Compute Node. * @extends Array */ export interface NodeFileListResult extends Array { @@ -11286,7 +11632,7 @@ export interface NodeFileListResult extends Array { /** * @interface * An interface representing the CloudJobScheduleListResult. - * @summary The result of listing the job schedules in an account. + * @summary The result of listing the Job Schedules in an Account. * @extends Array */ export interface CloudJobScheduleListResult extends Array { @@ -11296,7 +11642,7 @@ export interface CloudJobScheduleListResult extends Array { /** * @interface * An interface representing the CloudTaskListResult. - * @summary The result of listing the tasks in a job. + * @summary The result of listing the Tasks in a Job. * @extends Array */ export interface CloudTaskListResult extends Array { @@ -11306,7 +11652,7 @@ export interface CloudTaskListResult extends Array { /** * @interface * An interface representing the ComputeNodeListResult. - * @summary The result of listing the compute nodes in a pool. + * @summary The result of listing the Compute Nodes in a Pool. * @extends Array */ export interface ComputeNodeListResult extends Array { @@ -11321,6 +11667,14 @@ export interface ComputeNodeListResult extends Array { */ export type OSType = 'linux' | 'windows'; +/** + * Defines values for VerificationType. + * Possible values include: 'verified', 'unverified' + * @readonly + * @enum {string} + */ +export type VerificationType = 'verified' | 'unverified'; + /** * Defines values for AccessScope. * Possible values include: 'job' @@ -11345,6 +11699,14 @@ export type CertificateState = 'active' | 'deleting' | 'deletefailed'; */ export type CertificateFormat = 'pfx' | 'cer'; +/** + * Defines values for ContainerWorkingDirectory. + * Possible values include: 'taskWorkingDirectory', 'containerImageDefault' + * @readonly + * @enum {string} + */ +export type ContainerWorkingDirectory = 'taskWorkingDirectory' | 'containerImageDefault'; + /** * Defines values for JobAction. * Possible values include: 'none', 'disable', 'terminate' @@ -11433,6 +11795,14 @@ export type CachingType = 'none' | 'readonly' | 'readwrite'; */ export type StorageAccountType = 'standard_lrs' | 'premium_lrs'; +/** + * Defines values for DiskEncryptionTarget. + * Possible values include: 'OsDisk', 'TemporaryDisk' + * @readonly + * @enum {string} + */ +export type DiskEncryptionTarget = 'osdisk' | 'temporarydisk'; + /** * Defines values for DynamicVNetAssignmentScope. * Possible values include: 'none', 'job' @@ -11457,6 +11827,14 @@ export type InboundEndpointProtocol = 'tcp' | 'udp'; */ export type NetworkSecurityGroupRuleAccess = 'allow' | 'deny'; +/** + * Defines values for IPAddressProvisioningType. + * Possible values include: 'batchManaged', 'userManaged', 'noPublicIPAddresses' + * @readonly + * @enum {string} + */ +export type IPAddressProvisioningType = 'batchmanaged' | 'usermanaged' | 'nopublicipaddresses'; + /** * Defines values for PoolLifetimeOption. * Possible values include: 'jobSchedule', 'job' @@ -11977,9 +12355,9 @@ export type PoolRemoveNodesResponse = PoolRemoveNodesHeaders & { }; /** - * Contains response data for the listNodeAgentSkus operation. + * Contains response data for the listSupportedImages operation. */ -export type AccountListNodeAgentSkusResponse = AccountListNodeAgentSkusResult & AccountListNodeAgentSkusHeaders & { +export type AccountListSupportedImagesResponse = AccountListSupportedImagesResult & AccountListSupportedImagesHeaders & { /** * The underlying HTTP response. */ @@ -11987,7 +12365,7 @@ export type AccountListNodeAgentSkusResponse = AccountListNodeAgentSkusResult & /** * The parsed HTTP response headers. */ - parsedHeaders: AccountListNodeAgentSkusHeaders; + parsedHeaders: AccountListSupportedImagesHeaders; /** * The response body as text (string format) @@ -11997,7 +12375,7 @@ export type AccountListNodeAgentSkusResponse = AccountListNodeAgentSkusResult & /** * The response body as parsed JSON or XML */ - parsedBody: AccountListNodeAgentSkusResult; + parsedBody: AccountListSupportedImagesResult; }; }; @@ -12259,7 +12637,7 @@ export type JobListPreparationAndReleaseTaskStatusResponse = CloudJobListPrepara /** * Contains response data for the getTaskCounts operation. */ -export type JobGetTaskCountsResponse = TaskCounts & JobGetTaskCountsHeaders & { +export type JobGetTaskCountsResponse = TaskCountsResult & JobGetTaskCountsHeaders & { /** * The underlying HTTP response. */ @@ -12277,7 +12655,7 @@ export type JobGetTaskCountsResponse = TaskCounts & JobGetTaskCountsHeaders & { /** * The response body as parsed JSON or XML */ - parsedBody: TaskCounts; + parsedBody: TaskCountsResult; }; }; diff --git a/sdk/batch/batch/src/models/jobMappers.ts b/sdk/batch/batch/src/models/jobMappers.ts index 3a5170c80824..6c1dc2928ea5 100644 --- a/sdk/batch/batch/src/models/jobMappers.ts +++ b/sdk/batch/batch/src/models/jobMappers.ts @@ -11,9 +11,12 @@ export { AuthenticationTokenSettings, AutoPoolSpecification, AutoUserSpecification, + AzureBlobFileSystemConfiguration, + AzureFileShareConfiguration, BatchError, BatchErrorDetail, CertificateReference, + CIFSMountConfiguration, CloudJob, CloudJobListPreparationAndReleaseTaskStatusResult, CloudJobListResult, @@ -21,6 +24,7 @@ export { ContainerConfiguration, ContainerRegistry, DataDisk, + DiskEncryptionConfiguration, EnvironmentSetting, ErrorMessage, ImageReference, @@ -56,9 +60,11 @@ export { JobUpdateParameter, LinuxUserConfiguration, MetadataItem, + MountConfiguration, NameValuePair, NetworkConfiguration, NetworkSecurityGroupRule, + NFSMountConfiguration, OutputFile, OutputFileBlobContainerDestination, OutputFileDestination, @@ -66,14 +72,17 @@ export { PoolEndpointConfiguration, PoolInformation, PoolSpecification, + PublicIPAddressConfiguration, ResourceFile, StartTask, TaskConstraints, TaskContainerExecutionInformation, TaskContainerSettings, TaskCounts, + TaskCountsResult, TaskFailureInformation, TaskSchedulingPolicy, + TaskSlotCounts, UserAccount, UserIdentity, VirtualMachineConfiguration, diff --git a/sdk/batch/batch/src/models/jobScheduleMappers.ts b/sdk/batch/batch/src/models/jobScheduleMappers.ts index fd98823fb518..7f9ccf9fe3ca 100644 --- a/sdk/batch/batch/src/models/jobScheduleMappers.ts +++ b/sdk/batch/batch/src/models/jobScheduleMappers.ts @@ -11,15 +11,19 @@ export { AuthenticationTokenSettings, AutoPoolSpecification, AutoUserSpecification, + AzureBlobFileSystemConfiguration, + AzureFileShareConfiguration, BatchError, BatchErrorDetail, CertificateReference, + CIFSMountConfiguration, CloudJobSchedule, CloudJobScheduleListResult, CloudServiceConfiguration, ContainerConfiguration, ContainerRegistry, DataDisk, + DiskEncryptionConfiguration, EnvironmentSetting, ErrorMessage, ImageReference, @@ -47,8 +51,10 @@ export { JobSpecification, LinuxUserConfiguration, MetadataItem, + MountConfiguration, NetworkConfiguration, NetworkSecurityGroupRule, + NFSMountConfiguration, OutputFile, OutputFileBlobContainerDestination, OutputFileDestination, @@ -56,6 +62,7 @@ export { PoolEndpointConfiguration, PoolInformation, PoolSpecification, + PublicIPAddressConfiguration, RecentJob, ResourceFile, Schedule, diff --git a/sdk/batch/batch/src/models/mappers.ts b/sdk/batch/batch/src/models/mappers.ts index 80c68b714832..0b27ccc84ca7 100644 --- a/sdk/batch/batch/src/models/mappers.ts +++ b/sdk/batch/batch/src/models/mappers.ts @@ -97,37 +97,63 @@ export const ImageReference: msRest.CompositeMapper = { } }; -export const NodeAgentSku: msRest.CompositeMapper = { - serializedName: "NodeAgentSku", +export const ImageInformation: msRest.CompositeMapper = { + serializedName: "ImageInformation", type: { name: "Composite", - className: "NodeAgentSku", + className: "ImageInformation", modelProperties: { - id: { - serializedName: "id", + nodeAgentSKUId: { + required: true, + serializedName: "nodeAgentSKUId", type: { name: "String" } }, - verifiedImageReferences: { - serializedName: "verifiedImageReferences", + imageReference: { + required: true, + serializedName: "imageReference", + type: { + name: "Composite", + className: "ImageReference" + } + }, + osType: { + required: true, + serializedName: "osType", + type: { + name: "Enum", + allowedValues: [ + "linux", + "windows" + ] + } + }, + capabilities: { + serializedName: "capabilities", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "ImageReference" + name: "String" } } } }, - osType: { - serializedName: "osType", + batchSupportEndOfLife: { + serializedName: "batchSupportEndOfLife", + type: { + name: "DateTime" + } + }, + verificationType: { + required: true, + serializedName: "verificationType", type: { name: "Enum", allowedValues: [ - "linux", - "windows" + "verified", + "unverified" ] } } @@ -886,6 +912,16 @@ export const TaskContainerSettings: msRest.CompositeMapper = { name: "Composite", className: "ContainerRegistry" } + }, + workingDirectory: { + serializedName: "workingDirectory", + type: { + name: "Enum", + allowedValues: [ + "taskWorkingDirectory", + "containerImageDefault" + ] + } } } } @@ -1451,6 +1487,12 @@ export const JobManagerTask: msRest.CompositeMapper = { className: "TaskConstraints" } }, + requiredSlots: { + serializedName: "requiredSlots", + type: { + name: "Number" + } + }, killJobOnCompletion: { serializedName: "killJobOnCompletion", type: { @@ -1946,6 +1988,31 @@ export const ContainerConfiguration: msRest.CompositeMapper = { } }; +export const DiskEncryptionConfiguration: msRest.CompositeMapper = { + serializedName: "DiskEncryptionConfiguration", + type: { + name: "Composite", + className: "DiskEncryptionConfiguration", + modelProperties: { + targets: { + serializedName: "targets", + type: { + name: "Sequence", + element: { + type: { + name: "Enum", + allowedValues: [ + "osdisk", + "temporarydisk" + ] + } + } + } + } + } + } +}; + export const VirtualMachineConfiguration: msRest.CompositeMapper = { serializedName: "VirtualMachineConfiguration", type: { @@ -1998,6 +2065,13 @@ export const VirtualMachineConfiguration: msRest.CompositeMapper = { name: "Composite", className: "ContainerConfiguration" } + }, + diskEncryptionConfiguration: { + serializedName: "diskEncryptionConfiguration", + type: { + name: "Composite", + className: "DiskEncryptionConfiguration" + } } } } @@ -2033,6 +2107,17 @@ export const NetworkSecurityGroupRule: msRest.CompositeMapper = { type: { name: "String" } + }, + sourcePortRanges: { + serializedName: "sourcePortRanges", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } } } } @@ -2122,6 +2207,38 @@ export const PoolEndpointConfiguration: msRest.CompositeMapper = { } }; +export const PublicIPAddressConfiguration: msRest.CompositeMapper = { + serializedName: "PublicIPAddressConfiguration", + type: { + name: "Composite", + className: "PublicIPAddressConfiguration", + modelProperties: { + provision: { + serializedName: "provision", + type: { + name: "Enum", + allowedValues: [ + "batchmanaged", + "usermanaged", + "nopublicipaddresses" + ] + } + }, + ipAddressIds: { + serializedName: "ipAddressIds", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + export const NetworkConfiguration: msRest.CompositeMapper = { serializedName: "NetworkConfiguration", type: { @@ -2150,6 +2267,218 @@ export const NetworkConfiguration: msRest.CompositeMapper = { name: "Composite", className: "PoolEndpointConfiguration" } + }, + publicIPAddressConfiguration: { + serializedName: "publicIPAddressConfiguration", + type: { + name: "Composite", + className: "PublicIPAddressConfiguration" + } + } + } + } +}; + +export const AzureBlobFileSystemConfiguration: msRest.CompositeMapper = { + serializedName: "AzureBlobFileSystemConfiguration", + type: { + name: "Composite", + className: "AzureBlobFileSystemConfiguration", + modelProperties: { + accountName: { + required: true, + serializedName: "accountName", + type: { + name: "String" + } + }, + containerName: { + required: true, + serializedName: "containerName", + type: { + name: "String" + } + }, + accountKey: { + serializedName: "accountKey", + type: { + name: "String" + } + }, + sasKey: { + serializedName: "sasKey", + type: { + name: "String" + } + }, + blobfuseOptions: { + serializedName: "blobfuseOptions", + type: { + name: "String" + } + }, + relativeMountPath: { + required: true, + serializedName: "relativeMountPath", + type: { + name: "String" + } + } + } + } +}; + +export const NFSMountConfiguration: msRest.CompositeMapper = { + serializedName: "NFSMountConfiguration", + type: { + name: "Composite", + className: "NFSMountConfiguration", + modelProperties: { + source: { + required: true, + serializedName: "source", + type: { + name: "String" + } + }, + relativeMountPath: { + required: true, + serializedName: "relativeMountPath", + type: { + name: "String" + } + }, + mountOptions: { + serializedName: "mountOptions", + type: { + name: "String" + } + } + } + } +}; + +export const CIFSMountConfiguration: msRest.CompositeMapper = { + serializedName: "CIFSMountConfiguration", + type: { + name: "Composite", + className: "CIFSMountConfiguration", + modelProperties: { + username: { + required: true, + serializedName: "username", + type: { + name: "String" + } + }, + source: { + required: true, + serializedName: "source", + type: { + name: "String" + } + }, + relativeMountPath: { + required: true, + serializedName: "relativeMountPath", + type: { + name: "String" + } + }, + mountOptions: { + serializedName: "mountOptions", + type: { + name: "String" + } + }, + password: { + required: true, + serializedName: "password", + type: { + name: "String" + } + } + } + } +}; + +export const AzureFileShareConfiguration: msRest.CompositeMapper = { + serializedName: "AzureFileShareConfiguration", + type: { + name: "Composite", + className: "AzureFileShareConfiguration", + modelProperties: { + accountName: { + required: true, + serializedName: "accountName", + type: { + name: "String" + } + }, + azureFileUrl: { + required: true, + serializedName: "azureFileUrl", + type: { + name: "String" + } + }, + accountKey: { + required: true, + serializedName: "accountKey", + type: { + name: "String" + } + }, + relativeMountPath: { + required: true, + serializedName: "relativeMountPath", + type: { + name: "String" + } + }, + mountOptions: { + serializedName: "mountOptions", + type: { + name: "String" + } + } + } + } +}; + +export const MountConfiguration: msRest.CompositeMapper = { + serializedName: "MountConfiguration", + type: { + name: "Composite", + className: "MountConfiguration", + modelProperties: { + azureBlobFileSystemConfiguration: { + serializedName: "azureBlobFileSystemConfiguration", + type: { + name: "Composite", + className: "AzureBlobFileSystemConfiguration" + } + }, + nfsMountConfiguration: { + serializedName: "nfsMountConfiguration", + type: { + name: "Composite", + className: "NFSMountConfiguration" + } + }, + cifsMountConfiguration: { + serializedName: "cifsMountConfiguration", + type: { + name: "Composite", + className: "CIFSMountConfiguration" + } + }, + azureFileShareConfiguration: { + serializedName: "azureFileShareConfiguration", + type: { + name: "Composite", + className: "AzureFileShareConfiguration" + } } } } @@ -2188,8 +2517,8 @@ export const PoolSpecification: msRest.CompositeMapper = { className: "VirtualMachineConfiguration" } }, - maxTasksPerNode: { - serializedName: "maxTasksPerNode", + taskSlotsPerNode: { + serializedName: "taskSlotsPerNode", type: { name: "Number" } @@ -2315,6 +2644,18 @@ export const PoolSpecification: msRest.CompositeMapper = { } } } + }, + mountConfiguration: { + serializedName: "mountConfiguration", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MountConfiguration" + } + } + } } } } @@ -3569,6 +3910,77 @@ export const TaskCounts: msRest.CompositeMapper = { } }; +export const TaskSlotCounts: msRest.CompositeMapper = { + serializedName: "TaskSlotCounts", + type: { + name: "Composite", + className: "TaskSlotCounts", + modelProperties: { + active: { + required: true, + serializedName: "active", + type: { + name: "Number" + } + }, + running: { + required: true, + serializedName: "running", + type: { + name: "Number" + } + }, + completed: { + required: true, + serializedName: "completed", + type: { + name: "Number" + } + }, + succeeded: { + required: true, + serializedName: "succeeded", + type: { + name: "Number" + } + }, + failed: { + required: true, + serializedName: "failed", + type: { + name: "Number" + } + } + } + } +}; + +export const TaskCountsResult: msRest.CompositeMapper = { + serializedName: "TaskCountsResult", + type: { + name: "Composite", + className: "TaskCountsResult", + modelProperties: { + taskCounts: { + required: true, + serializedName: "taskCounts", + type: { + name: "Composite", + className: "TaskCounts" + } + }, + taskSlotCounts: { + required: true, + serializedName: "taskSlotCounts", + type: { + name: "Composite", + className: "TaskSlotCounts" + } + } + } + } +}; + export const AutoScaleRunError: msRest.CompositeMapper = { serializedName: "AutoScaleRunError", type: { @@ -3884,8 +4296,8 @@ export const CloudPool: msRest.CompositeMapper = { } } }, - maxTasksPerNode: { - serializedName: "maxTasksPerNode", + taskSlotsPerNode: { + serializedName: "taskSlotsPerNode", type: { name: "Number" } @@ -3927,6 +4339,18 @@ export const CloudPool: msRest.CompositeMapper = { name: "Composite", className: "PoolStatistics" } + }, + mountConfiguration: { + serializedName: "mountConfiguration", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MountConfiguration" + } + } + } } } } @@ -4063,8 +4487,8 @@ export const PoolAddParameter: msRest.CompositeMapper = { } } }, - maxTasksPerNode: { - serializedName: "maxTasksPerNode", + taskSlotsPerNode: { + serializedName: "taskSlotsPerNode", type: { name: "Number" } @@ -4099,6 +4523,18 @@ export const PoolAddParameter: msRest.CompositeMapper = { } } } + }, + mountConfiguration: { + serializedName: "mountConfiguration", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MountConfiguration" + } + } + } } } } @@ -4596,6 +5032,12 @@ export const CloudTask: msRest.CompositeMapper = { className: "TaskConstraints" } }, + requiredSlots: { + serializedName: "requiredSlots", + type: { + name: "Number" + } + }, userIdentity: { serializedName: "userIdentity", type: { @@ -4751,6 +5193,12 @@ export const TaskAddParameter: msRest.CompositeMapper = { className: "TaskConstraints" } }, + requiredSlots: { + serializedName: "requiredSlots", + type: { + name: "Number" + } + }, userIdentity: { serializedName: "userIdentity", type: { @@ -5438,6 +5886,12 @@ export const ComputeNode: msRest.CompositeMapper = { name: "Number" } }, + runningTaskSlotsCount: { + serializedName: "runningTaskSlotsCount", + type: { + name: "Number" + } + }, totalTasksSucceeded: { serializedName: "totalTasksSucceeded", type: { @@ -7081,10 +7535,10 @@ export const PoolRemoveNodesOptions: msRest.CompositeMapper = { } }; -export const AccountListNodeAgentSkusOptions: msRest.CompositeMapper = { +export const AccountListSupportedImagesOptions: msRest.CompositeMapper = { type: { name: "Composite", - className: "AccountListNodeAgentSkusOptions", + className: "AccountListSupportedImagesOptions", modelProperties: { filter: { type: { @@ -9656,10 +10110,10 @@ export const PoolListNextOptions: msRest.CompositeMapper = { } }; -export const AccountListNodeAgentSkusNextOptions: msRest.CompositeMapper = { +export const AccountListSupportedImagesNextOptions: msRest.CompositeMapper = { type: { name: "Composite", - className: "AccountListNodeAgentSkusNextOptions", + className: "AccountListSupportedImagesNextOptions", modelProperties: { clientRequestId: { type: { @@ -10033,11 +10487,11 @@ export const PoolListUsageMetricsHeaders: msRest.CompositeMapper = { } }; -export const AccountListNodeAgentSkusHeaders: msRest.CompositeMapper = { - serializedName: "account-listnodeagentskus-headers", +export const AccountListSupportedImagesHeaders: msRest.CompositeMapper = { + serializedName: "account-listsupportedimages-headers", type: { name: "Composite", - className: "AccountListNodeAgentSkusHeaders", + className: "AccountListSupportedImagesHeaders", modelProperties: { clientRequestId: { serializedName: "client-request-id", @@ -12815,11 +13269,11 @@ export const CloudPoolListResult: msRest.CompositeMapper = { } }; -export const AccountListNodeAgentSkusResult: msRest.CompositeMapper = { - serializedName: "AccountListNodeAgentSkusResult", +export const AccountListSupportedImagesResult: msRest.CompositeMapper = { + serializedName: "AccountListSupportedImagesResult", type: { name: "Composite", - className: "AccountListNodeAgentSkusResult", + className: "AccountListSupportedImagesResult", modelProperties: { value: { serializedName: "", @@ -12828,7 +13282,7 @@ export const AccountListNodeAgentSkusResult: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "NodeAgentSku" + className: "ImageInformation" } } } diff --git a/sdk/batch/batch/src/models/parameters.ts b/sdk/batch/batch/src/models/parameters.ts index 4c80b2d3ecf2..a7e7cf030f6f 100644 --- a/sdk/batch/batch/src/models/parameters.ts +++ b/sdk/batch/batch/src/models/parameters.ts @@ -224,7 +224,7 @@ export const clientRequestId2: msRest.OperationParameter = { export const clientRequestId20: msRest.OperationParameter = { parameterPath: [ "options", - "accountListNodeAgentSkusOptions", + "accountListSupportedImagesOptions", "clientRequestId" ], mapper: { @@ -250,7 +250,7 @@ export const clientRequestId21: msRest.OperationParameter = { export const clientRequestId22: msRest.OperationParameter = { parameterPath: [ "options", - "accountListNodeAgentSkusNextOptions", + "accountListSupportedImagesNextOptions", "clientRequestId" ], mapper: { @@ -1430,7 +1430,7 @@ export const filter12: msRest.OperationQueryParameter = { export const filter2: msRest.OperationQueryParameter = { parameterPath: [ "options", - "accountListNodeAgentSkusOptions", + "accountListSupportedImagesOptions", "filter" ], mapper: { @@ -3240,7 +3240,7 @@ export const maxResults2: msRest.OperationQueryParameter = { export const maxResults3: msRest.OperationQueryParameter = { parameterPath: [ "options", - "accountListNodeAgentSkusOptions", + "accountListSupportedImagesOptions", "maxResults" ], mapper: { @@ -3556,7 +3556,7 @@ export const ocpDate2: msRest.OperationParameter = { export const ocpDate20: msRest.OperationParameter = { parameterPath: [ "options", - "accountListNodeAgentSkusOptions", + "accountListSupportedImagesOptions", "ocpDate" ], mapper: { @@ -3582,7 +3582,7 @@ export const ocpDate21: msRest.OperationParameter = { export const ocpDate22: msRest.OperationParameter = { parameterPath: [ "options", - "accountListNodeAgentSkusNextOptions", + "accountListSupportedImagesNextOptions", "ocpDate" ], mapper: { @@ -4787,7 +4787,7 @@ export const returnClientRequestId2: msRest.OperationParameter = { export const returnClientRequestId20: msRest.OperationParameter = { parameterPath: [ "options", - "accountListNodeAgentSkusOptions", + "accountListSupportedImagesOptions", "returnClientRequestId" ], mapper: { @@ -4815,7 +4815,7 @@ export const returnClientRequestId21: msRest.OperationParameter = { export const returnClientRequestId22: msRest.OperationParameter = { parameterPath: [ "options", - "accountListNodeAgentSkusNextOptions", + "accountListSupportedImagesNextOptions", "returnClientRequestId" ], mapper: { @@ -6229,7 +6229,7 @@ export const timeout16: msRest.OperationQueryParameter = { export const timeout17: msRest.OperationQueryParameter = { parameterPath: [ "options", - "accountListNodeAgentSkusOptions", + "accountListSupportedImagesOptions", "timeout" ], mapper: { diff --git a/sdk/batch/batch/src/models/poolMappers.ts b/sdk/batch/batch/src/models/poolMappers.ts index 0b64a7676299..3b5505c8315e 100644 --- a/sdk/batch/batch/src/models/poolMappers.ts +++ b/sdk/batch/batch/src/models/poolMappers.ts @@ -11,24 +11,30 @@ export { AutoScaleRun, AutoScaleRunError, AutoUserSpecification, + AzureBlobFileSystemConfiguration, + AzureFileShareConfiguration, BatchError, BatchErrorDetail, CertificateReference, + CIFSMountConfiguration, CloudPool, CloudPoolListResult, CloudServiceConfiguration, ContainerConfiguration, ContainerRegistry, DataDisk, + DiskEncryptionConfiguration, EnvironmentSetting, ErrorMessage, ImageReference, InboundNATPool, LinuxUserConfiguration, MetadataItem, + MountConfiguration, NameValuePair, NetworkConfiguration, NetworkSecurityGroupRule, + NFSMountConfiguration, NodeRemoveParameter, PoolAddHeaders, PoolAddParameter, @@ -55,6 +61,7 @@ export { PoolUpdatePropertiesHeaders, PoolUpdatePropertiesParameter, PoolUsageMetrics, + PublicIPAddressConfiguration, ResizeError, ResourceFile, ResourceStatistics, diff --git a/sdk/batch/batch/src/operations/account.ts b/sdk/batch/batch/src/operations/account.ts index aefa31e9c111..eea384325c0e 100644 --- a/sdk/batch/batch/src/operations/account.ts +++ b/sdk/batch/batch/src/operations/account.ts @@ -27,31 +27,32 @@ export class Account { } /** - * @summary Lists all node agent SKUs supported by the Azure Batch service. + * @summary Lists all Virtual Machine Images supported by the Azure Batch service. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - listNodeAgentSkus(options?: Models.AccountListNodeAgentSkusOptionalParams): Promise; + listSupportedImages(options?: Models.AccountListSupportedImagesOptionalParams): Promise; /** * @param callback The callback */ - listNodeAgentSkus(callback: msRest.ServiceCallback): void; + listSupportedImages(callback: msRest.ServiceCallback): void; /** * @param options The optional parameters * @param callback The callback */ - listNodeAgentSkus(options: Models.AccountListNodeAgentSkusOptionalParams, callback: msRest.ServiceCallback): void; - listNodeAgentSkus(options?: Models.AccountListNodeAgentSkusOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listSupportedImages(options: Models.AccountListSupportedImagesOptionalParams, callback: msRest.ServiceCallback): void; + listSupportedImages(options?: Models.AccountListSupportedImagesOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { options }, - listNodeAgentSkusOperationSpec, - callback) as Promise; + listSupportedImagesOperationSpec, + callback) as Promise; } /** - * Gets the number of nodes in each state, grouped by pool. + * Gets the number of Compute Nodes in each state, grouped by Pool. Note that the numbers returned + * may not always be up to date. If you need exact node counts, use a list query. * @param [options] The optional parameters * @returns Promise */ @@ -75,35 +76,36 @@ export class Account { } /** - * @summary Lists all node agent SKUs supported by the Azure Batch service. + * @summary Lists all Virtual Machine Images supported by the Azure Batch service. * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - listNodeAgentSkusNext(nextPageLink: string, options?: Models.AccountListNodeAgentSkusNextOptionalParams): Promise; + listSupportedImagesNext(nextPageLink: string, options?: Models.AccountListSupportedImagesNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - listNodeAgentSkusNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + listSupportedImagesNext(nextPageLink: string, callback: msRest.ServiceCallback): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param options The optional parameters * @param callback The callback */ - listNodeAgentSkusNext(nextPageLink: string, options: Models.AccountListNodeAgentSkusNextOptionalParams, callback: msRest.ServiceCallback): void; - listNodeAgentSkusNext(nextPageLink: string, options?: Models.AccountListNodeAgentSkusNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listSupportedImagesNext(nextPageLink: string, options: Models.AccountListSupportedImagesNextOptionalParams, callback: msRest.ServiceCallback): void; + listSupportedImagesNext(nextPageLink: string, options?: Models.AccountListSupportedImagesNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, - listNodeAgentSkusNextOperationSpec, - callback) as Promise; + listSupportedImagesNextOperationSpec, + callback) as Promise; } /** - * Gets the number of nodes in each state, grouped by pool. + * Gets the number of Compute Nodes in each state, grouped by Pool. Note that the numbers returned + * may not always be up to date. If you need exact node counts, use a list query. * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters * @returns Promise @@ -133,9 +135,9 @@ export class Account { // Operation Specifications const serializer = new msRest.Serializer(Mappers); -const listNodeAgentSkusOperationSpec: msRest.OperationSpec = { +const listSupportedImagesOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "nodeagentskus", + path: "supportedimages", urlParameters: [ Parameters.batchUrl ], @@ -153,11 +155,12 @@ const listNodeAgentSkusOperationSpec: msRest.OperationSpec = { ], responses: { 200: { - bodyMapper: Mappers.AccountListNodeAgentSkusResult, - headersMapper: Mappers.AccountListNodeAgentSkusHeaders + bodyMapper: Mappers.AccountListSupportedImagesResult, + headersMapper: Mappers.AccountListSupportedImagesHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.AccountListSupportedImagesHeaders } }, serializer @@ -187,13 +190,14 @@ const listPoolNodeCountsOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.AccountListPoolNodeCountsHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.AccountListPoolNodeCountsHeaders } }, serializer }; -const listNodeAgentSkusNextOperationSpec: msRest.OperationSpec = { +const listSupportedImagesNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "{batchUrl}", path: "{nextLink}", @@ -208,11 +212,12 @@ const listNodeAgentSkusNextOperationSpec: msRest.OperationSpec = { ], responses: { 200: { - bodyMapper: Mappers.AccountListNodeAgentSkusResult, - headersMapper: Mappers.AccountListNodeAgentSkusHeaders + bodyMapper: Mappers.AccountListSupportedImagesResult, + headersMapper: Mappers.AccountListSupportedImagesHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.AccountListSupportedImagesHeaders } }, serializer @@ -237,7 +242,8 @@ const listPoolNodeCountsNextOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.AccountListPoolNodeCountsHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.AccountListPoolNodeCountsHeaders } }, serializer diff --git a/sdk/batch/batch/src/operations/application.ts b/sdk/batch/batch/src/operations/application.ts index d689f9bb17ab..ec8b45d115d8 100644 --- a/sdk/batch/batch/src/operations/application.ts +++ b/sdk/batch/batch/src/operations/application.ts @@ -27,11 +27,11 @@ export class Application { } /** - * This operation returns only applications and versions that are available for use on compute - * nodes; that is, that can be used in an application package reference. For administrator - * information about applications and versions that are not yet available to compute nodes, use the - * Azure portal or the Azure Resource Manager API. - * @summary Lists all of the applications available in the specified account. + * This operation returns only Applications and versions that are available for use on Compute + * Nodes; that is, that can be used in an Package reference. For administrator information about + * applications and versions that are not yet available to Compute Nodes, use the Azure portal or + * the Azure Resource Manager API. + * @summary Lists all of the applications available in the specified Account. * @param [options] The optional parameters * @returns Promise */ @@ -55,23 +55,23 @@ export class Application { } /** - * This operation returns only applications and versions that are available for use on compute - * nodes; that is, that can be used in an application package reference. For administrator - * information about applications and versions that are not yet available to compute nodes, use the - * Azure portal or the Azure Resource Manager API. - * @summary Gets information about the specified application. - * @param applicationId The ID of the application. + * This operation returns only Applications and versions that are available for use on Compute + * Nodes; that is, that can be used in an Package reference. For administrator information about + * Applications and versions that are not yet available to Compute Nodes, use the Azure portal or + * the Azure Resource Manager API. + * @summary Gets information about the specified Application. + * @param applicationId The ID of the Application. * @param [options] The optional parameters * @returns Promise */ get(applicationId: string, options?: Models.ApplicationGetOptionalParams): Promise; /** - * @param applicationId The ID of the application. + * @param applicationId The ID of the Application. * @param callback The callback */ get(applicationId: string, callback: msRest.ServiceCallback): void; /** - * @param applicationId The ID of the application. + * @param applicationId The ID of the Application. * @param options The optional parameters * @param callback The callback */ @@ -87,11 +87,11 @@ export class Application { } /** - * This operation returns only applications and versions that are available for use on compute - * nodes; that is, that can be used in an application package reference. For administrator - * information about applications and versions that are not yet available to compute nodes, use the - * Azure portal or the Azure Resource Manager API. - * @summary Lists all of the applications available in the specified account. + * This operation returns only Applications and versions that are available for use on Compute + * Nodes; that is, that can be used in an Package reference. For administrator information about + * applications and versions that are not yet available to Compute Nodes, use the Azure portal or + * the Azure Resource Manager API. + * @summary Lists all of the applications available in the specified Account. * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters * @returns Promise @@ -144,7 +144,8 @@ const listOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.ApplicationListHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.ApplicationListHeaders } }, serializer @@ -173,7 +174,8 @@ const getOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.ApplicationGetHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.ApplicationGetHeaders } }, serializer @@ -198,7 +200,8 @@ const listNextOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.ApplicationListHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.ApplicationListHeaders } }, serializer diff --git a/sdk/batch/batch/src/operations/certificateOperations.ts b/sdk/batch/batch/src/operations/certificateOperations.ts index 7cbabb12ffc7..f54f868a87a6 100644 --- a/sdk/batch/batch/src/operations/certificateOperations.ts +++ b/sdk/batch/batch/src/operations/certificateOperations.ts @@ -27,19 +27,19 @@ export class CertificateOperations { } /** - * @summary Adds a certificate to the specified account. - * @param certificate The certificate to be added. + * @summary Adds a Certificate to the specified Account. + * @param certificate The Certificate to be added. * @param [options] The optional parameters * @returns Promise */ add(certificate: Models.CertificateAddParameter, options?: Models.CertificateAddOptionalParams): Promise; /** - * @param certificate The certificate to be added. + * @param certificate The Certificate to be added. * @param callback The callback */ add(certificate: Models.CertificateAddParameter, callback: msRest.ServiceCallback): void; /** - * @param certificate The certificate to be added. + * @param certificate The Certificate to be added. * @param options The optional parameters * @param callback The callback */ @@ -55,7 +55,7 @@ export class CertificateOperations { } /** - * @summary Lists all of the certificates that have been added to the specified account. + * @summary Lists all of the Certificates that have been added to the specified Account. * @param [options] The optional parameters * @returns Promise */ @@ -79,16 +79,16 @@ export class CertificateOperations { } /** - * If you try to delete a certificate that is being used by a pool or compute node, the status of - * the certificate changes to deleteFailed. If you decide that you want to continue using the - * certificate, you can use this operation to set the status of the certificate back to active. If - * you intend to delete the certificate, you do not need to run this operation after the deletion - * failed. You must make sure that the certificate is not being used by any resources, and then you - * can try again to delete the certificate. - * @summary Cancels a failed deletion of a certificate from the specified account. + * If you try to delete a Certificate that is being used by a Pool or Compute Node, the status of + * the Certificate changes to deleteFailed. If you decide that you want to continue using the + * Certificate, you can use this operation to set the status of the Certificate back to active. If + * you intend to delete the Certificate, you do not need to run this operation after the deletion + * failed. You must make sure that the Certificate is not being used by any resources, and then you + * can try again to delete the Certificate. + * @summary Cancels a failed deletion of a Certificate from the specified Account. * @param thumbprintAlgorithm The algorithm used to derive the thumbprint parameter. This must be * sha1. - * @param thumbprint The thumbprint of the certificate being deleted. + * @param thumbprint The thumbprint of the Certificate being deleted. * @param [options] The optional parameters * @returns Promise */ @@ -96,14 +96,14 @@ export class CertificateOperations { /** * @param thumbprintAlgorithm The algorithm used to derive the thumbprint parameter. This must be * sha1. - * @param thumbprint The thumbprint of the certificate being deleted. + * @param thumbprint The thumbprint of the Certificate being deleted. * @param callback The callback */ cancelDeletion(thumbprintAlgorithm: string, thumbprint: string, callback: msRest.ServiceCallback): void; /** * @param thumbprintAlgorithm The algorithm used to derive the thumbprint parameter. This must be * sha1. - * @param thumbprint The thumbprint of the certificate being deleted. + * @param thumbprint The thumbprint of the Certificate being deleted. * @param options The optional parameters * @param callback The callback */ @@ -120,18 +120,18 @@ export class CertificateOperations { } /** - * You cannot delete a certificate if a resource (pool or compute node) is using it. Before you can - * delete a certificate, you must therefore make sure that the certificate is not associated with - * any existing pools, the certificate is not installed on any compute nodes (even if you remove a - * certificate from a pool, it is not removed from existing compute nodes in that pool until they - * restart), and no running tasks depend on the certificate. If you try to delete a certificate - * that is in use, the deletion fails. The certificate status changes to deleteFailed. You can use + * You cannot delete a Certificate if a resource (Pool or Compute Node) is using it. Before you can + * delete a Certificate, you must therefore make sure that the Certificate is not associated with + * any existing Pools, the Certificate is not installed on any Nodes (even if you remove a + * Certificate from a Pool, it is not removed from existing Compute Nodes in that Pool until they + * restart), and no running Tasks depend on the Certificate. If you try to delete a Certificate + * that is in use, the deletion fails. The Certificate status changes to deleteFailed. You can use * Cancel Delete Certificate to set the status back to active if you decide that you want to - * continue using the certificate. - * @summary Deletes a certificate from the specified account. + * continue using the Certificate. + * @summary Deletes a Certificate from the specified Account. * @param thumbprintAlgorithm The algorithm used to derive the thumbprint parameter. This must be * sha1. - * @param thumbprint The thumbprint of the certificate to be deleted. + * @param thumbprint The thumbprint of the Certificate to be deleted. * @param [options] The optional parameters * @returns Promise */ @@ -139,14 +139,14 @@ export class CertificateOperations { /** * @param thumbprintAlgorithm The algorithm used to derive the thumbprint parameter. This must be * sha1. - * @param thumbprint The thumbprint of the certificate to be deleted. + * @param thumbprint The thumbprint of the Certificate to be deleted. * @param callback The callback */ deleteMethod(thumbprintAlgorithm: string, thumbprint: string, callback: msRest.ServiceCallback): void; /** * @param thumbprintAlgorithm The algorithm used to derive the thumbprint parameter. This must be * sha1. - * @param thumbprint The thumbprint of the certificate to be deleted. + * @param thumbprint The thumbprint of the Certificate to be deleted. * @param options The optional parameters * @param callback The callback */ @@ -163,10 +163,10 @@ export class CertificateOperations { } /** - * Gets information about the specified certificate. + * Gets information about the specified Certificate. * @param thumbprintAlgorithm The algorithm used to derive the thumbprint parameter. This must be * sha1. - * @param thumbprint The thumbprint of the certificate to get. + * @param thumbprint The thumbprint of the Certificate to get. * @param [options] The optional parameters * @returns Promise */ @@ -174,14 +174,14 @@ export class CertificateOperations { /** * @param thumbprintAlgorithm The algorithm used to derive the thumbprint parameter. This must be * sha1. - * @param thumbprint The thumbprint of the certificate to get. + * @param thumbprint The thumbprint of the Certificate to get. * @param callback The callback */ get(thumbprintAlgorithm: string, thumbprint: string, callback: msRest.ServiceCallback): void; /** * @param thumbprintAlgorithm The algorithm used to derive the thumbprint parameter. This must be * sha1. - * @param thumbprint The thumbprint of the certificate to get. + * @param thumbprint The thumbprint of the Certificate to get. * @param options The optional parameters * @param callback The callback */ @@ -198,7 +198,7 @@ export class CertificateOperations { } /** - * @summary Lists all of the certificates that have been added to the specified account. + * @summary Lists all of the Certificates that have been added to the specified Account. * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters * @returns Promise @@ -257,7 +257,8 @@ const addOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.CertificateAddHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.CertificateAddHeaders } }, serializer @@ -288,7 +289,8 @@ const listOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.CertificateListHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.CertificateListHeaders } }, serializer @@ -317,7 +319,8 @@ const cancelDeletionOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.CertificateCancelDeletionHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.CertificateCancelDeletionHeaders } }, serializer @@ -346,7 +349,8 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.CertificateDeleteHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.CertificateDeleteHeaders } }, serializer @@ -377,7 +381,8 @@ const getOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.CertificateGetHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.CertificateGetHeaders } }, serializer @@ -402,7 +407,8 @@ const listNextOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.CertificateListHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.CertificateListHeaders } }, serializer diff --git a/sdk/batch/batch/src/operations/computeNodeOperations.ts b/sdk/batch/batch/src/operations/computeNodeOperations.ts index 3ffcd01b7dc2..47c3f08e468f 100644 --- a/sdk/batch/batch/src/operations/computeNodeOperations.ts +++ b/sdk/batch/batch/src/operations/computeNodeOperations.ts @@ -27,26 +27,26 @@ export class ComputeNodeOperations { } /** - * You can add a user account to a node only when it is in the idle or running state. - * @summary Adds a user account to the specified compute node. - * @param poolId The ID of the pool that contains the compute node. - * @param nodeId The ID of the machine on which you want to create a user account. - * @param user The user account to be created. + * You can add a user Account to a Compute Node only when it is in the idle or running state. + * @summary Adds a user Account to the specified Compute Node. + * @param poolId The ID of the Pool that contains the Compute Node. + * @param nodeId The ID of the machine on which you want to create a user Account. + * @param user The user Account to be created. * @param [options] The optional parameters * @returns Promise */ addUser(poolId: string, nodeId: string, user: Models.ComputeNodeUser, options?: Models.ComputeNodeAddUserOptionalParams): Promise; /** - * @param poolId The ID of the pool that contains the compute node. - * @param nodeId The ID of the machine on which you want to create a user account. - * @param user The user account to be created. + * @param poolId The ID of the Pool that contains the Compute Node. + * @param nodeId The ID of the machine on which you want to create a user Account. + * @param user The user Account to be created. * @param callback The callback */ addUser(poolId: string, nodeId: string, user: Models.ComputeNodeUser, callback: msRest.ServiceCallback): void; /** - * @param poolId The ID of the pool that contains the compute node. - * @param nodeId The ID of the machine on which you want to create a user account. - * @param user The user account to be created. + * @param poolId The ID of the Pool that contains the Compute Node. + * @param nodeId The ID of the machine on which you want to create a user Account. + * @param user The user Account to be created. * @param options The optional parameters * @param callback The callback */ @@ -64,26 +64,26 @@ export class ComputeNodeOperations { } /** - * You can delete a user account to a node only when it is in the idle or running state. - * @summary Deletes a user account from the specified compute node. - * @param poolId The ID of the pool that contains the compute node. - * @param nodeId The ID of the machine on which you want to delete a user account. - * @param userName The name of the user account to delete. + * You can delete a user Account to a Compute Node only when it is in the idle or running state. + * @summary Deletes a user Account from the specified Compute Node. + * @param poolId The ID of the Pool that contains the Compute Node. + * @param nodeId The ID of the machine on which you want to delete a user Account. + * @param userName The name of the user Account to delete. * @param [options] The optional parameters * @returns Promise */ deleteUser(poolId: string, nodeId: string, userName: string, options?: Models.ComputeNodeDeleteUserOptionalParams): Promise; /** - * @param poolId The ID of the pool that contains the compute node. - * @param nodeId The ID of the machine on which you want to delete a user account. - * @param userName The name of the user account to delete. + * @param poolId The ID of the Pool that contains the Compute Node. + * @param nodeId The ID of the machine on which you want to delete a user Account. + * @param userName The name of the user Account to delete. * @param callback The callback */ deleteUser(poolId: string, nodeId: string, userName: string, callback: msRest.ServiceCallback): void; /** - * @param poolId The ID of the pool that contains the compute node. - * @param nodeId The ID of the machine on which you want to delete a user account. - * @param userName The name of the user account to delete. + * @param poolId The ID of the Pool that contains the Compute Node. + * @param nodeId The ID of the machine on which you want to delete a user Account. + * @param userName The name of the user Account to delete. * @param options The optional parameters * @param callback The callback */ @@ -101,32 +101,32 @@ export class ComputeNodeOperations { } /** - * This operation replaces of all the updatable properties of the account. For example, if the + * This operation replaces of all the updatable properties of the Account. For example, if the * expiryTime element is not specified, the current value is replaced with the default value, not - * left unmodified. You can update a user account on a node only when it is in the idle or running - * state. - * @summary Updates the password and expiration time of a user account on the specified compute - * node. - * @param poolId The ID of the pool that contains the compute node. - * @param nodeId The ID of the machine on which you want to update a user account. - * @param userName The name of the user account to update. + * left unmodified. You can update a user Account on a Compute Node only when it is in the idle or + * running state. + * @summary Updates the password and expiration time of a user Account on the specified Compute + * Node. + * @param poolId The ID of the Pool that contains the Compute Node. + * @param nodeId The ID of the machine on which you want to update a user Account. + * @param userName The name of the user Account to update. * @param nodeUpdateUserParameter The parameters for the request. * @param [options] The optional parameters * @returns Promise */ updateUser(poolId: string, nodeId: string, userName: string, nodeUpdateUserParameter: Models.NodeUpdateUserParameter, options?: Models.ComputeNodeUpdateUserOptionalParams): Promise; /** - * @param poolId The ID of the pool that contains the compute node. - * @param nodeId The ID of the machine on which you want to update a user account. - * @param userName The name of the user account to update. + * @param poolId The ID of the Pool that contains the Compute Node. + * @param nodeId The ID of the machine on which you want to update a user Account. + * @param userName The name of the user Account to update. * @param nodeUpdateUserParameter The parameters for the request. * @param callback The callback */ updateUser(poolId: string, nodeId: string, userName: string, nodeUpdateUserParameter: Models.NodeUpdateUserParameter, callback: msRest.ServiceCallback): void; /** - * @param poolId The ID of the pool that contains the compute node. - * @param nodeId The ID of the machine on which you want to update a user account. - * @param userName The name of the user account to update. + * @param poolId The ID of the Pool that contains the Compute Node. + * @param nodeId The ID of the machine on which you want to update a user Account. + * @param userName The name of the user Account to update. * @param nodeUpdateUserParameter The parameters for the request. * @param options The optional parameters * @param callback The callback @@ -146,22 +146,22 @@ export class ComputeNodeOperations { } /** - * @summary Gets information about the specified compute node. - * @param poolId The ID of the pool that contains the compute node. - * @param nodeId The ID of the compute node that you want to get information about. + * @summary Gets information about the specified Compute Node. + * @param poolId The ID of the Pool that contains the Compute Node. + * @param nodeId The ID of the Compute Node that you want to get information about. * @param [options] The optional parameters * @returns Promise */ get(poolId: string, nodeId: string, options?: Models.ComputeNodeGetOptionalParams): Promise; /** - * @param poolId The ID of the pool that contains the compute node. - * @param nodeId The ID of the compute node that you want to get information about. + * @param poolId The ID of the Pool that contains the Compute Node. + * @param nodeId The ID of the Compute Node that you want to get information about. * @param callback The callback */ get(poolId: string, nodeId: string, callback: msRest.ServiceCallback): void; /** - * @param poolId The ID of the pool that contains the compute node. - * @param nodeId The ID of the compute node that you want to get information about. + * @param poolId The ID of the Pool that contains the Compute Node. + * @param nodeId The ID of the Compute Node that you want to get information about. * @param options The optional parameters * @param callback The callback */ @@ -178,23 +178,23 @@ export class ComputeNodeOperations { } /** - * You can restart a node only if it is in an idle or running state. - * @summary Restarts the specified compute node. - * @param poolId The ID of the pool that contains the compute node. - * @param nodeId The ID of the compute node that you want to restart. + * You can restart a Compute Node only if it is in an idle or running state. + * @summary Restarts the specified Compute Node. + * @param poolId The ID of the Pool that contains the Compute Node. + * @param nodeId The ID of the Compute Node that you want to restart. * @param [options] The optional parameters * @returns Promise */ reboot(poolId: string, nodeId: string, options?: Models.ComputeNodeRebootOptionalParams): Promise; /** - * @param poolId The ID of the pool that contains the compute node. - * @param nodeId The ID of the compute node that you want to restart. + * @param poolId The ID of the Pool that contains the Compute Node. + * @param nodeId The ID of the Compute Node that you want to restart. * @param callback The callback */ reboot(poolId: string, nodeId: string, callback: msRest.ServiceCallback): void; /** - * @param poolId The ID of the pool that contains the compute node. - * @param nodeId The ID of the compute node that you want to restart. + * @param poolId The ID of the Pool that contains the Compute Node. + * @param nodeId The ID of the Compute Node that you want to restart. * @param options The optional parameters * @param callback The callback */ @@ -211,24 +211,25 @@ export class ComputeNodeOperations { } /** - * You can reinstall the operating system on a node only if it is in an idle or running state. This - * API can be invoked only on pools created with the cloud service configuration property. - * @summary Reinstalls the operating system on the specified compute node. - * @param poolId The ID of the pool that contains the compute node. - * @param nodeId The ID of the compute node that you want to restart. + * You can reinstall the operating system on a Compute Node only if it is in an idle or running + * state. This API can be invoked only on Pools created with the cloud service configuration + * property. + * @summary Reinstalls the operating system on the specified Compute Node. + * @param poolId The ID of the Pool that contains the Compute Node. + * @param nodeId The ID of the Compute Node that you want to restart. * @param [options] The optional parameters * @returns Promise */ reimage(poolId: string, nodeId: string, options?: Models.ComputeNodeReimageOptionalParams): Promise; /** - * @param poolId The ID of the pool that contains the compute node. - * @param nodeId The ID of the compute node that you want to restart. + * @param poolId The ID of the Pool that contains the Compute Node. + * @param nodeId The ID of the Compute Node that you want to restart. * @param callback The callback */ reimage(poolId: string, nodeId: string, callback: msRest.ServiceCallback): void; /** - * @param poolId The ID of the pool that contains the compute node. - * @param nodeId The ID of the compute node that you want to restart. + * @param poolId The ID of the Pool that contains the Compute Node. + * @param nodeId The ID of the Compute Node that you want to restart. * @param options The optional parameters * @param callback The callback */ @@ -245,23 +246,24 @@ export class ComputeNodeOperations { } /** - * You can disable task scheduling on a node only if its current scheduling state is enabled. - * @summary Disables task scheduling on the specified compute node. - * @param poolId The ID of the pool that contains the compute node. - * @param nodeId The ID of the compute node on which you want to disable task scheduling. + * You can disable Task scheduling on a Compute Node only if its current scheduling state is + * enabled. + * @summary Disables Task scheduling on the specified Compute Node. + * @param poolId The ID of the Pool that contains the Compute Node. + * @param nodeId The ID of the Compute Node on which you want to disable Task scheduling. * @param [options] The optional parameters * @returns Promise */ disableScheduling(poolId: string, nodeId: string, options?: Models.ComputeNodeDisableSchedulingOptionalParams): Promise; /** - * @param poolId The ID of the pool that contains the compute node. - * @param nodeId The ID of the compute node on which you want to disable task scheduling. + * @param poolId The ID of the Pool that contains the Compute Node. + * @param nodeId The ID of the Compute Node on which you want to disable Task scheduling. * @param callback The callback */ disableScheduling(poolId: string, nodeId: string, callback: msRest.ServiceCallback): void; /** - * @param poolId The ID of the pool that contains the compute node. - * @param nodeId The ID of the compute node on which you want to disable task scheduling. + * @param poolId The ID of the Pool that contains the Compute Node. + * @param nodeId The ID of the Compute Node on which you want to disable Task scheduling. * @param options The optional parameters * @param callback The callback */ @@ -278,23 +280,24 @@ export class ComputeNodeOperations { } /** - * You can enable task scheduling on a node only if its current scheduling state is disabled - * @summary Enables task scheduling on the specified compute node. - * @param poolId The ID of the pool that contains the compute node. - * @param nodeId The ID of the compute node on which you want to enable task scheduling. + * You can enable Task scheduling on a Compute Node only if its current scheduling state is + * disabled + * @summary Enables Task scheduling on the specified Compute Node. + * @param poolId The ID of the Pool that contains the Compute Node. + * @param nodeId The ID of the Compute Node on which you want to enable Task scheduling. * @param [options] The optional parameters * @returns Promise */ enableScheduling(poolId: string, nodeId: string, options?: Models.ComputeNodeEnableSchedulingOptionalParams): Promise; /** - * @param poolId The ID of the pool that contains the compute node. - * @param nodeId The ID of the compute node on which you want to enable task scheduling. + * @param poolId The ID of the Pool that contains the Compute Node. + * @param nodeId The ID of the Compute Node on which you want to enable Task scheduling. * @param callback The callback */ enableScheduling(poolId: string, nodeId: string, callback: msRest.ServiceCallback): void; /** - * @param poolId The ID of the pool that contains the compute node. - * @param nodeId The ID of the compute node on which you want to enable task scheduling. + * @param poolId The ID of the Pool that contains the Compute Node. + * @param nodeId The ID of the Compute Node on which you want to enable Task scheduling. * @param options The optional parameters * @param callback The callback */ @@ -311,26 +314,26 @@ export class ComputeNodeOperations { } /** - * Before you can remotely login to a node using the remote login settings, you must create a user - * account on the node. This API can be invoked only on pools created with the virtual machine - * configuration property. For pools created with a cloud service configuration, see the - * GetRemoteDesktop API. - * @summary Gets the settings required for remote login to a compute node. - * @param poolId The ID of the pool that contains the compute node. - * @param nodeId The ID of the compute node for which to obtain the remote login settings. + * Before you can remotely login to a Compute Node using the remote login settings, you must create + * a user Account on the Compute Node. This API can be invoked only on Pools created with the + * virtual machine configuration property. For Pools created with a cloud service configuration, + * see the GetRemoteDesktop API. + * @summary Gets the settings required for remote login to a Compute Node. + * @param poolId The ID of the Pool that contains the Compute Node. + * @param nodeId The ID of the Compute Node for which to obtain the remote login settings. * @param [options] The optional parameters * @returns Promise */ getRemoteLoginSettings(poolId: string, nodeId: string, options?: Models.ComputeNodeGetRemoteLoginSettingsOptionalParams): Promise; /** - * @param poolId The ID of the pool that contains the compute node. - * @param nodeId The ID of the compute node for which to obtain the remote login settings. + * @param poolId The ID of the Pool that contains the Compute Node. + * @param nodeId The ID of the Compute Node for which to obtain the remote login settings. * @param callback The callback */ getRemoteLoginSettings(poolId: string, nodeId: string, callback: msRest.ServiceCallback): void; /** - * @param poolId The ID of the pool that contains the compute node. - * @param nodeId The ID of the compute node for which to obtain the remote login settings. + * @param poolId The ID of the Pool that contains the Compute Node. + * @param nodeId The ID of the Compute Node for which to obtain the remote login settings. * @param options The optional parameters * @param callback The callback */ @@ -347,27 +350,28 @@ export class ComputeNodeOperations { } /** - * Before you can access a node by using the RDP file, you must create a user account on the node. - * This API can only be invoked on pools created with a cloud service configuration. For pools - * created with a virtual machine configuration, see the GetRemoteLoginSettings API. - * @summary Gets the Remote Desktop Protocol file for the specified compute node. - * @param poolId The ID of the pool that contains the compute node. - * @param nodeId The ID of the compute node for which you want to get the Remote Desktop Protocol + * Before you can access a Compute Node by using the RDP file, you must create a user Account on + * the Compute Node. This API can only be invoked on Pools created with a cloud service + * configuration. For Pools created with a virtual machine configuration, see the + * GetRemoteLoginSettings API. + * @summary Gets the Remote Desktop Protocol file for the specified Compute Node. + * @param poolId The ID of the Pool that contains the Compute Node. + * @param nodeId The ID of the Compute Node for which you want to get the Remote Desktop Protocol * file. * @param [options] The optional parameters * @returns Promise */ getRemoteDesktop(poolId: string, nodeId: string, options?: Models.ComputeNodeGetRemoteDesktopOptionalParams): Promise; /** - * @param poolId The ID of the pool that contains the compute node. - * @param nodeId The ID of the compute node for which you want to get the Remote Desktop Protocol + * @param poolId The ID of the Pool that contains the Compute Node. + * @param nodeId The ID of the Compute Node for which you want to get the Remote Desktop Protocol * file. * @param callback The callback */ getRemoteDesktop(poolId: string, nodeId: string, callback: msRest.ServiceCallback): void; /** - * @param poolId The ID of the pool that contains the compute node. - * @param nodeId The ID of the compute node for which you want to get the Remote Desktop Protocol + * @param poolId The ID of the Pool that contains the Compute Node. + * @param nodeId The ID of the Compute Node for which you want to get the Remote Desktop Protocol * file. * @param options The optional parameters * @param callback The callback @@ -385,13 +389,13 @@ export class ComputeNodeOperations { } /** - * This is for gathering Azure Batch service log files in an automated fashion from nodes if you - * are experiencing an error and wish to escalate to Azure support. The Azure Batch service log - * files should be shared with Azure support to aid in debugging issues with the Batch service. - * @summary Upload Azure Batch service log files from the specified compute node to Azure Blob + * This is for gathering Azure Batch service log files in an automated fashion from Compute Nodes + * if you are experiencing an error and wish to escalate to Azure support. The Azure Batch service + * log files should be shared with Azure support to aid in debugging issues with the Batch service. + * @summary Upload Azure Batch service log files from the specified Compute Node to Azure Blob * Storage. - * @param poolId The ID of the pool that contains the compute node. - * @param nodeId The ID of the compute node from which you want to upload the Azure Batch service + * @param poolId The ID of the Pool that contains the Compute Node. + * @param nodeId The ID of the Compute Node from which you want to upload the Azure Batch service * log files. * @param uploadBatchServiceLogsConfiguration The Azure Batch service log files upload * configuration. @@ -400,8 +404,8 @@ export class ComputeNodeOperations { */ uploadBatchServiceLogs(poolId: string, nodeId: string, uploadBatchServiceLogsConfiguration: Models.UploadBatchServiceLogsConfiguration, options?: Models.ComputeNodeUploadBatchServiceLogsOptionalParams): Promise; /** - * @param poolId The ID of the pool that contains the compute node. - * @param nodeId The ID of the compute node from which you want to upload the Azure Batch service + * @param poolId The ID of the Pool that contains the Compute Node. + * @param nodeId The ID of the Compute Node from which you want to upload the Azure Batch service * log files. * @param uploadBatchServiceLogsConfiguration The Azure Batch service log files upload * configuration. @@ -409,8 +413,8 @@ export class ComputeNodeOperations { */ uploadBatchServiceLogs(poolId: string, nodeId: string, uploadBatchServiceLogsConfiguration: Models.UploadBatchServiceLogsConfiguration, callback: msRest.ServiceCallback): void; /** - * @param poolId The ID of the pool that contains the compute node. - * @param nodeId The ID of the compute node from which you want to upload the Azure Batch service + * @param poolId The ID of the Pool that contains the Compute Node. + * @param nodeId The ID of the Compute Node from which you want to upload the Azure Batch service * log files. * @param uploadBatchServiceLogsConfiguration The Azure Batch service log files upload * configuration. @@ -431,19 +435,19 @@ export class ComputeNodeOperations { } /** - * @summary Lists the compute nodes in the specified pool. - * @param poolId The ID of the pool from which you want to list nodes. + * @summary Lists the Compute Nodes in the specified Pool. + * @param poolId The ID of the Pool from which you want to list Compute Nodes. * @param [options] The optional parameters * @returns Promise */ list(poolId: string, options?: Models.ComputeNodeListOptionalParams): Promise; /** - * @param poolId The ID of the pool from which you want to list nodes. + * @param poolId The ID of the Pool from which you want to list Compute Nodes. * @param callback The callback */ list(poolId: string, callback: msRest.ServiceCallback): void; /** - * @param poolId The ID of the pool from which you want to list nodes. + * @param poolId The ID of the Pool from which you want to list Compute Nodes. * @param options The optional parameters * @param callback The callback */ @@ -459,7 +463,7 @@ export class ComputeNodeOperations { } /** - * @summary Lists the compute nodes in the specified pool. + * @summary Lists the Compute Nodes in the specified Pool. * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters * @returns Promise @@ -520,7 +524,8 @@ const addUserOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.ComputeNodeAddUserHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.ComputeNodeAddUserHeaders } }, serializer @@ -550,7 +555,8 @@ const deleteUserOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.ComputeNodeDeleteUserHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.ComputeNodeDeleteUserHeaders } }, serializer @@ -588,7 +594,8 @@ const updateUserOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.ComputeNodeUpdateUserHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.ComputeNodeUpdateUserHeaders } }, serializer @@ -619,7 +626,8 @@ const getOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.ComputeNodeGetHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.ComputeNodeGetHeaders } }, serializer @@ -658,7 +666,8 @@ const rebootOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.ComputeNodeRebootHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.ComputeNodeRebootHeaders } }, serializer @@ -697,7 +706,8 @@ const reimageOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.ComputeNodeReimageHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.ComputeNodeReimageHeaders } }, serializer @@ -736,7 +746,8 @@ const disableSchedulingOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.ComputeNodeDisableSchedulingHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.ComputeNodeDisableSchedulingHeaders } }, serializer @@ -765,7 +776,8 @@ const enableSchedulingOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.ComputeNodeEnableSchedulingHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.ComputeNodeEnableSchedulingHeaders } }, serializer @@ -795,7 +807,8 @@ const getRemoteLoginSettingsOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.ComputeNodeGetRemoteLoginSettingsHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.ComputeNodeGetRemoteLoginSettingsHeaders } }, serializer @@ -830,7 +843,8 @@ const getRemoteDesktopOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.ComputeNodeGetRemoteDesktopHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.ComputeNodeGetRemoteDesktopHeaders } }, serializer @@ -868,7 +882,8 @@ const uploadBatchServiceLogsOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.ComputeNodeUploadBatchServiceLogsHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.ComputeNodeUploadBatchServiceLogsHeaders } }, serializer @@ -900,7 +915,8 @@ const listOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.ComputeNodeListHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.ComputeNodeListHeaders } }, serializer @@ -925,7 +941,8 @@ const listNextOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.ComputeNodeListHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.ComputeNodeListHeaders } }, serializer diff --git a/sdk/batch/batch/src/operations/file.ts b/sdk/batch/batch/src/operations/file.ts index 75169781d916..4c5829f84f12 100644 --- a/sdk/batch/batch/src/operations/file.ts +++ b/sdk/batch/batch/src/operations/file.ts @@ -27,25 +27,25 @@ export class File { } /** - * @summary Deletes the specified task file from the compute node where the task ran. - * @param jobId The ID of the job that contains the task. - * @param taskId The ID of the task whose file you want to delete. - * @param filePath The path to the task file or directory that you want to delete. + * @summary Deletes the specified Task file from the Compute Node where the Task ran. + * @param jobId The ID of the Job that contains the Task. + * @param taskId The ID of the Task whose file you want to delete. + * @param filePath The path to the Task file or directory that you want to delete. * @param [options] The optional parameters * @returns Promise */ deleteFromTask(jobId: string, taskId: string, filePath: string, options?: Models.FileDeleteFromTaskOptionalParams): Promise; /** - * @param jobId The ID of the job that contains the task. - * @param taskId The ID of the task whose file you want to delete. - * @param filePath The path to the task file or directory that you want to delete. + * @param jobId The ID of the Job that contains the Task. + * @param taskId The ID of the Task whose file you want to delete. + * @param filePath The path to the Task file or directory that you want to delete. * @param callback The callback */ deleteFromTask(jobId: string, taskId: string, filePath: string, callback: msRest.ServiceCallback): void; /** - * @param jobId The ID of the job that contains the task. - * @param taskId The ID of the task whose file you want to delete. - * @param filePath The path to the task file or directory that you want to delete. + * @param jobId The ID of the Job that contains the Task. + * @param taskId The ID of the Task whose file you want to delete. + * @param filePath The path to the Task file or directory that you want to delete. * @param options The optional parameters * @param callback The callback */ @@ -63,25 +63,25 @@ export class File { } /** - * Returns the content of the specified task file. - * @param jobId The ID of the job that contains the task. - * @param taskId The ID of the task whose file you want to retrieve. - * @param filePath The path to the task file that you want to get the content of. + * Returns the content of the specified Task file. + * @param jobId The ID of the Job that contains the Task. + * @param taskId The ID of the Task whose file you want to retrieve. + * @param filePath The path to the Task file that you want to get the content of. * @param [options] The optional parameters * @returns Promise */ getFromTask(jobId: string, taskId: string, filePath: string, options?: Models.FileGetFromTaskOptionalParams): Promise; /** - * @param jobId The ID of the job that contains the task. - * @param taskId The ID of the task whose file you want to retrieve. - * @param filePath The path to the task file that you want to get the content of. + * @param jobId The ID of the Job that contains the Task. + * @param taskId The ID of the Task whose file you want to retrieve. + * @param filePath The path to the Task file that you want to get the content of. * @param callback The callback */ getFromTask(jobId: string, taskId: string, filePath: string, callback: msRest.ServiceCallback): void; /** - * @param jobId The ID of the job that contains the task. - * @param taskId The ID of the task whose file you want to retrieve. - * @param filePath The path to the task file that you want to get the content of. + * @param jobId The ID of the Job that contains the Task. + * @param taskId The ID of the Task whose file you want to retrieve. + * @param filePath The path to the Task file that you want to get the content of. * @param options The optional parameters * @param callback The callback */ @@ -99,25 +99,25 @@ export class File { } /** - * Gets the properties of the specified task file. - * @param jobId The ID of the job that contains the task. - * @param taskId The ID of the task whose file you want to get the properties of. - * @param filePath The path to the task file that you want to get the properties of. + * Gets the properties of the specified Task file. + * @param jobId The ID of the Job that contains the Task. + * @param taskId The ID of the Task whose file you want to get the properties of. + * @param filePath The path to the Task file that you want to get the properties of. * @param [options] The optional parameters * @returns Promise */ getPropertiesFromTask(jobId: string, taskId: string, filePath: string, options?: Models.FileGetPropertiesFromTaskOptionalParams): Promise; /** - * @param jobId The ID of the job that contains the task. - * @param taskId The ID of the task whose file you want to get the properties of. - * @param filePath The path to the task file that you want to get the properties of. + * @param jobId The ID of the Job that contains the Task. + * @param taskId The ID of the Task whose file you want to get the properties of. + * @param filePath The path to the Task file that you want to get the properties of. * @param callback The callback */ getPropertiesFromTask(jobId: string, taskId: string, filePath: string, callback: msRest.ServiceCallback): void; /** - * @param jobId The ID of the job that contains the task. - * @param taskId The ID of the task whose file you want to get the properties of. - * @param filePath The path to the task file that you want to get the properties of. + * @param jobId The ID of the Job that contains the Task. + * @param taskId The ID of the Task whose file you want to get the properties of. + * @param filePath The path to the Task file that you want to get the properties of. * @param options The optional parameters * @param callback The callback */ @@ -135,24 +135,24 @@ export class File { } /** - * @summary Deletes the specified file from the compute node. - * @param poolId The ID of the pool that contains the compute node. - * @param nodeId The ID of the compute node from which you want to delete the file. + * @summary Deletes the specified file from the Compute Node. + * @param poolId The ID of the Pool that contains the Compute Node. + * @param nodeId The ID of the Compute Node from which you want to delete the file. * @param filePath The path to the file or directory that you want to delete. * @param [options] The optional parameters * @returns Promise */ deleteFromComputeNode(poolId: string, nodeId: string, filePath: string, options?: Models.FileDeleteFromComputeNodeOptionalParams): Promise; /** - * @param poolId The ID of the pool that contains the compute node. - * @param nodeId The ID of the compute node from which you want to delete the file. + * @param poolId The ID of the Pool that contains the Compute Node. + * @param nodeId The ID of the Compute Node from which you want to delete the file. * @param filePath The path to the file or directory that you want to delete. * @param callback The callback */ deleteFromComputeNode(poolId: string, nodeId: string, filePath: string, callback: msRest.ServiceCallback): void; /** - * @param poolId The ID of the pool that contains the compute node. - * @param nodeId The ID of the compute node from which you want to delete the file. + * @param poolId The ID of the Pool that contains the Compute Node. + * @param nodeId The ID of the Compute Node from which you want to delete the file. * @param filePath The path to the file or directory that you want to delete. * @param options The optional parameters * @param callback The callback @@ -171,25 +171,25 @@ export class File { } /** - * Returns the content of the specified compute node file. - * @param poolId The ID of the pool that contains the compute node. - * @param nodeId The ID of the compute node that contains the file. - * @param filePath The path to the compute node file that you want to get the content of. + * Returns the content of the specified Compute Node file. + * @param poolId The ID of the Pool that contains the Compute Node. + * @param nodeId The ID of the Compute Node that contains the file. + * @param filePath The path to the Compute Node file that you want to get the content of. * @param [options] The optional parameters * @returns Promise */ getFromComputeNode(poolId: string, nodeId: string, filePath: string, options?: Models.FileGetFromComputeNodeOptionalParams): Promise; /** - * @param poolId The ID of the pool that contains the compute node. - * @param nodeId The ID of the compute node that contains the file. - * @param filePath The path to the compute node file that you want to get the content of. + * @param poolId The ID of the Pool that contains the Compute Node. + * @param nodeId The ID of the Compute Node that contains the file. + * @param filePath The path to the Compute Node file that you want to get the content of. * @param callback The callback */ getFromComputeNode(poolId: string, nodeId: string, filePath: string, callback: msRest.ServiceCallback): void; /** - * @param poolId The ID of the pool that contains the compute node. - * @param nodeId The ID of the compute node that contains the file. - * @param filePath The path to the compute node file that you want to get the content of. + * @param poolId The ID of the Pool that contains the Compute Node. + * @param nodeId The ID of the Compute Node that contains the file. + * @param filePath The path to the Compute Node file that you want to get the content of. * @param options The optional parameters * @param callback The callback */ @@ -207,25 +207,25 @@ export class File { } /** - * Gets the properties of the specified compute node file. - * @param poolId The ID of the pool that contains the compute node. - * @param nodeId The ID of the compute node that contains the file. - * @param filePath The path to the compute node file that you want to get the properties of. + * Gets the properties of the specified Compute Node file. + * @param poolId The ID of the Pool that contains the Compute Node. + * @param nodeId The ID of the Compute Node that contains the file. + * @param filePath The path to the Compute Node file that you want to get the properties of. * @param [options] The optional parameters * @returns Promise */ getPropertiesFromComputeNode(poolId: string, nodeId: string, filePath: string, options?: Models.FileGetPropertiesFromComputeNodeOptionalParams): Promise; /** - * @param poolId The ID of the pool that contains the compute node. - * @param nodeId The ID of the compute node that contains the file. - * @param filePath The path to the compute node file that you want to get the properties of. + * @param poolId The ID of the Pool that contains the Compute Node. + * @param nodeId The ID of the Compute Node that contains the file. + * @param filePath The path to the Compute Node file that you want to get the properties of. * @param callback The callback */ getPropertiesFromComputeNode(poolId: string, nodeId: string, filePath: string, callback: msRest.ServiceCallback): void; /** - * @param poolId The ID of the pool that contains the compute node. - * @param nodeId The ID of the compute node that contains the file. - * @param filePath The path to the compute node file that you want to get the properties of. + * @param poolId The ID of the Pool that contains the Compute Node. + * @param nodeId The ID of the Compute Node that contains the file. + * @param filePath The path to the Compute Node file that you want to get the properties of. * @param options The optional parameters * @param callback The callback */ @@ -243,22 +243,22 @@ export class File { } /** - * @summary Lists the files in a task's directory on its compute node. - * @param jobId The ID of the job that contains the task. - * @param taskId The ID of the task whose files you want to list. + * @summary Lists the files in a Task's directory on its Compute Node. + * @param jobId The ID of the Job that contains the Task. + * @param taskId The ID of the Task whose files you want to list. * @param [options] The optional parameters * @returns Promise */ listFromTask(jobId: string, taskId: string, options?: Models.FileListFromTaskOptionalParams): Promise; /** - * @param jobId The ID of the job that contains the task. - * @param taskId The ID of the task whose files you want to list. + * @param jobId The ID of the Job that contains the Task. + * @param taskId The ID of the Task whose files you want to list. * @param callback The callback */ listFromTask(jobId: string, taskId: string, callback: msRest.ServiceCallback): void; /** - * @param jobId The ID of the job that contains the task. - * @param taskId The ID of the task whose files you want to list. + * @param jobId The ID of the Job that contains the Task. + * @param taskId The ID of the Task whose files you want to list. * @param options The optional parameters * @param callback The callback */ @@ -275,22 +275,22 @@ export class File { } /** - * @summary Lists all of the files in task directories on the specified compute node. - * @param poolId The ID of the pool that contains the compute node. - * @param nodeId The ID of the compute node whose files you want to list. + * @summary Lists all of the files in Task directories on the specified Compute Node. + * @param poolId The ID of the Pool that contains the Compute Node. + * @param nodeId The ID of the Compute Node whose files you want to list. * @param [options] The optional parameters * @returns Promise */ listFromComputeNode(poolId: string, nodeId: string, options?: Models.FileListFromComputeNodeOptionalParams): Promise; /** - * @param poolId The ID of the pool that contains the compute node. - * @param nodeId The ID of the compute node whose files you want to list. + * @param poolId The ID of the Pool that contains the Compute Node. + * @param nodeId The ID of the Compute Node whose files you want to list. * @param callback The callback */ listFromComputeNode(poolId: string, nodeId: string, callback: msRest.ServiceCallback): void; /** - * @param poolId The ID of the pool that contains the compute node. - * @param nodeId The ID of the compute node whose files you want to list. + * @param poolId The ID of the Pool that contains the Compute Node. + * @param nodeId The ID of the Compute Node whose files you want to list. * @param options The optional parameters * @param callback The callback */ @@ -307,7 +307,7 @@ export class File { } /** - * @summary Lists the files in a task's directory on its compute node. + * @summary Lists the files in a Task's directory on its Compute Node. * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters * @returns Promise @@ -335,7 +335,7 @@ export class File { } /** - * @summary Lists all of the files in task directories on the specified compute node. + * @summary Lists all of the files in Task directories on the specified Compute Node. * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters * @returns Promise @@ -390,7 +390,8 @@ const deleteFromTaskOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.FileDeleteFromTaskHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.FileDeleteFromTaskHeaders } }, serializer @@ -429,7 +430,8 @@ const getFromTaskOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.FileGetFromTaskHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.FileGetFromTaskHeaders } }, serializer @@ -461,7 +463,8 @@ const getPropertiesFromTaskOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.FileGetPropertiesFromTaskHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.FileGetPropertiesFromTaskHeaders } }, serializer @@ -492,7 +495,8 @@ const deleteFromComputeNodeOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.FileDeleteFromComputeNodeHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.FileDeleteFromComputeNodeHeaders } }, serializer @@ -531,7 +535,8 @@ const getFromComputeNodeOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.FileGetFromComputeNodeHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.FileGetFromComputeNodeHeaders } }, serializer @@ -563,7 +568,8 @@ const getPropertiesFromComputeNodeOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.FileGetPropertiesFromComputeNodeHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.FileGetPropertiesFromComputeNodeHeaders } }, serializer @@ -596,7 +602,8 @@ const listFromTaskOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.FileListFromTaskHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.FileListFromTaskHeaders } }, serializer @@ -629,7 +636,8 @@ const listFromComputeNodeOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.FileListFromComputeNodeHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.FileListFromComputeNodeHeaders } }, serializer @@ -654,7 +662,8 @@ const listFromTaskNextOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.FileListFromTaskHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.FileListFromTaskHeaders } }, serializer @@ -679,7 +688,8 @@ const listFromComputeNodeNextOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.FileListFromComputeNodeHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.FileListFromComputeNodeHeaders } }, serializer diff --git a/sdk/batch/batch/src/operations/job.ts b/sdk/batch/batch/src/operations/job.ts index 032091ec6211..b59c6a5bde79 100644 --- a/sdk/batch/batch/src/operations/job.ts +++ b/sdk/batch/batch/src/operations/job.ts @@ -27,11 +27,11 @@ export class Job { } /** - * Statistics are aggregated across all jobs that have ever existed in the account, from account + * Statistics are aggregated across all Jobs that have ever existed in the Account, from Account * creation to the last update time of the statistics. The statistics may not be immediately * available. The Batch service performs periodic roll-up of statistics. The typical delay is about * 30 minutes. - * @summary Gets lifetime summary statistics for all of the jobs in the specified account. + * @summary Gets lifetime summary statistics for all of the Jobs in the specified Account. * @param [options] The optional parameters * @returns Promise */ @@ -55,26 +55,26 @@ export class Job { } /** - * Deleting a job also deletes all tasks that are part of that job, and all job statistics. This - * also overrides the retention period for task data; that is, if the job contains tasks which are - * still retained on compute nodes, the Batch services deletes those tasks' working directories and - * all their contents. When a Delete Job request is received, the Batch service sets the job to - * the deleting state. All update operations on a job that is in deleting state will fail with - * status code 409 (Conflict), with additional information indicating that the job is being + * Deleting a Job also deletes all Tasks that are part of that Job, and all Job statistics. This + * also overrides the retention period for Task data; that is, if the Job contains Tasks which are + * still retained on Compute Nodes, the Batch services deletes those Tasks' working directories and + * all their contents. When a Delete Job request is received, the Batch service sets the Job to + * the deleting state. All update operations on a Job that is in deleting state will fail with + * status code 409 (Conflict), with additional information indicating that the Job is being * deleted. - * @summary Deletes a job. - * @param jobId The ID of the job to delete. + * @summary Deletes a Job. + * @param jobId The ID of the Job to delete. * @param [options] The optional parameters * @returns Promise */ deleteMethod(jobId: string, options?: Models.JobDeleteMethodOptionalParams): Promise; /** - * @param jobId The ID of the job to delete. + * @param jobId The ID of the Job to delete. * @param callback The callback */ deleteMethod(jobId: string, callback: msRest.ServiceCallback): void; /** - * @param jobId The ID of the job to delete. + * @param jobId The ID of the Job to delete. * @param options The optional parameters * @param callback The callback */ @@ -90,19 +90,19 @@ export class Job { } /** - * @summary Gets information about the specified job. - * @param jobId The ID of the job. + * @summary Gets information about the specified Job. + * @param jobId The ID of the Job. * @param [options] The optional parameters * @returns Promise */ get(jobId: string, options?: Models.JobGetOptionalParams): Promise; /** - * @param jobId The ID of the job. + * @param jobId The ID of the Job. * @param callback The callback */ get(jobId: string, callback: msRest.ServiceCallback): void; /** - * @param jobId The ID of the job. + * @param jobId The ID of the Job. * @param options The optional parameters * @param callback The callback */ @@ -118,24 +118,24 @@ export class Job { } /** - * This replaces only the job properties specified in the request. For example, if the job has - * constraints, and a request does not specify the constraints element, then the job keeps the + * This replaces only the Job properties specified in the request. For example, if the Job has + * constraints, and a request does not specify the constraints element, then the Job keeps the * existing constraints. - * @summary Updates the properties of the specified job. - * @param jobId The ID of the job whose properties you want to update. + * @summary Updates the properties of the specified Job. + * @param jobId The ID of the Job whose properties you want to update. * @param jobPatchParameter The parameters for the request. * @param [options] The optional parameters * @returns Promise */ patch(jobId: string, jobPatchParameter: Models.JobPatchParameter, options?: Models.JobPatchOptionalParams): Promise; /** - * @param jobId The ID of the job whose properties you want to update. + * @param jobId The ID of the Job whose properties you want to update. * @param jobPatchParameter The parameters for the request. * @param callback The callback */ patch(jobId: string, jobPatchParameter: Models.JobPatchParameter, callback: msRest.ServiceCallback): void; /** - * @param jobId The ID of the job whose properties you want to update. + * @param jobId The ID of the Job whose properties you want to update. * @param jobPatchParameter The parameters for the request. * @param options The optional parameters * @param callback The callback @@ -153,24 +153,24 @@ export class Job { } /** - * This fully replaces all the updatable properties of the job. For example, if the job has + * This fully replaces all the updatable properties of the Job. For example, if the Job has * constraints associated with it and if constraints is not specified with this request, then the * Batch service will remove the existing constraints. - * @summary Updates the properties of the specified job. - * @param jobId The ID of the job whose properties you want to update. + * @summary Updates the properties of the specified Job. + * @param jobId The ID of the Job whose properties you want to update. * @param jobUpdateParameter The parameters for the request. * @param [options] The optional parameters * @returns Promise */ update(jobId: string, jobUpdateParameter: Models.JobUpdateParameter, options?: Models.JobUpdateOptionalParams): Promise; /** - * @param jobId The ID of the job whose properties you want to update. + * @param jobId The ID of the Job whose properties you want to update. * @param jobUpdateParameter The parameters for the request. * @param callback The callback */ update(jobId: string, jobUpdateParameter: Models.JobUpdateParameter, callback: msRest.ServiceCallback): void; /** - * @param jobId The ID of the job whose properties you want to update. + * @param jobId The ID of the Job whose properties you want to update. * @param jobUpdateParameter The parameters for the request. * @param options The optional parameters * @param callback The callback @@ -188,31 +188,31 @@ export class Job { } /** - * The Batch Service immediately moves the job to the disabling state. Batch then uses the - * disableTasks parameter to determine what to do with the currently running tasks of the job. The - * job remains in the disabling state until the disable operation is completed and all tasks have - * been dealt with according to the disableTasks option; the job then moves to the disabled state. - * No new tasks are started under the job until it moves back to active state. If you try to - * disable a job that is in any state other than active, disabling, or disabled, the request fails + * The Batch Service immediately moves the Job to the disabling state. Batch then uses the + * disableTasks parameter to determine what to do with the currently running Tasks of the Job. The + * Job remains in the disabling state until the disable operation is completed and all Tasks have + * been dealt with according to the disableTasks option; the Job then moves to the disabled state. + * No new Tasks are started under the Job until it moves back to active state. If you try to + * disable a Job that is in any state other than active, disabling, or disabled, the request fails * with status code 409. - * @summary Disables the specified job, preventing new tasks from running. - * @param jobId The ID of the job to disable. - * @param disableTasks What to do with active tasks associated with the job. Possible values + * @summary Disables the specified Job, preventing new Tasks from running. + * @param jobId The ID of the Job to disable. + * @param disableTasks What to do with active Tasks associated with the Job. Possible values * include: 'requeue', 'terminate', 'wait' * @param [options] The optional parameters * @returns Promise */ disable(jobId: string, disableTasks: Models.DisableJobOption, options?: Models.JobDisableOptionalParams): Promise; /** - * @param jobId The ID of the job to disable. - * @param disableTasks What to do with active tasks associated with the job. Possible values + * @param jobId The ID of the Job to disable. + * @param disableTasks What to do with active Tasks associated with the Job. Possible values * include: 'requeue', 'terminate', 'wait' * @param callback The callback */ disable(jobId: string, disableTasks: Models.DisableJobOption, callback: msRest.ServiceCallback): void; /** - * @param jobId The ID of the job to disable. - * @param disableTasks What to do with active tasks associated with the job. Possible values + * @param jobId The ID of the Job to disable. + * @param disableTasks What to do with active Tasks associated with the Job. Possible values * include: 'requeue', 'terminate', 'wait' * @param options The optional parameters * @param callback The callback @@ -230,24 +230,24 @@ export class Job { } /** - * When you call this API, the Batch service sets a disabled job to the enabling state. After the - * this operation is completed, the job moves to the active state, and scheduling of new tasks - * under the job resumes. The Batch service does not allow a task to remain in the active state for - * more than 180 days. Therefore, if you enable a job containing active tasks which were added more - * than 180 days ago, those tasks will not run. - * @summary Enables the specified job, allowing new tasks to run. - * @param jobId The ID of the job to enable. + * When you call this API, the Batch service sets a disabled Job to the enabling state. After the + * this operation is completed, the Job moves to the active state, and scheduling of new Tasks + * under the Job resumes. The Batch service does not allow a Task to remain in the active state for + * more than 180 days. Therefore, if you enable a Job containing active Tasks which were added more + * than 180 days ago, those Tasks will not run. + * @summary Enables the specified Job, allowing new Tasks to run. + * @param jobId The ID of the Job to enable. * @param [options] The optional parameters * @returns Promise */ enable(jobId: string, options?: Models.JobEnableOptionalParams): Promise; /** - * @param jobId The ID of the job to enable. + * @param jobId The ID of the Job to enable. * @param callback The callback */ enable(jobId: string, callback: msRest.ServiceCallback): void; /** - * @param jobId The ID of the job to enable. + * @param jobId The ID of the Job to enable. * @param options The optional parameters * @param callback The callback */ @@ -263,24 +263,24 @@ export class Job { } /** - * When a Terminate Job request is received, the Batch service sets the job to the terminating - * state. The Batch service then terminates any running tasks associated with the job and runs any - * required job release tasks. Then the job moves into the completed state. If there are any tasks - * in the job in the active state, they will remain in the active state. Once a job is terminated, - * new tasks cannot be added and any remaining active tasks will not be scheduled. - * @summary Terminates the specified job, marking it as completed. - * @param jobId The ID of the job to terminate. + * When a Terminate Job request is received, the Batch service sets the Job to the terminating + * state. The Batch service then terminates any running Tasks associated with the Job and runs any + * required Job release Tasks. Then the Job moves into the completed state. If there are any Tasks + * in the Job in the active state, they will remain in the active state. Once a Job is terminated, + * new Tasks cannot be added and any remaining active Tasks will not be scheduled. + * @summary Terminates the specified Job, marking it as completed. + * @param jobId The ID of the Job to terminate. * @param [options] The optional parameters * @returns Promise */ terminate(jobId: string, options?: Models.JobTerminateOptionalParams): Promise; /** - * @param jobId The ID of the job to terminate. + * @param jobId The ID of the Job to terminate. * @param callback The callback */ terminate(jobId: string, callback: msRest.ServiceCallback): void; /** - * @param jobId The ID of the job to terminate. + * @param jobId The ID of the Job to terminate. * @param options The optional parameters * @param callback The callback */ @@ -296,26 +296,26 @@ export class Job { } /** - * The Batch service supports two ways to control the work done as part of a job. In the first - * approach, the user specifies a Job Manager task. The Batch service launches this task when it is - * ready to start the job. The Job Manager task controls all other tasks that run under this job, + * The Batch service supports two ways to control the work done as part of a Job. In the first + * approach, the user specifies a Job Manager Task. The Batch service launches this Task when it is + * ready to start the Job. The Job Manager Task controls all other Tasks that run under this Job, * by using the Task APIs. In the second approach, the user directly controls the execution of - * tasks under an active job, by using the Task APIs. Also note: when naming jobs, avoid including + * Tasks under an active Job, by using the Task APIs. Also note: when naming Jobs, avoid including * sensitive information such as user names or secret project names. This information may appear in * telemetry logs accessible to Microsoft Support engineers. - * @summary Adds a job to the specified account. - * @param job The job to be added. + * @summary Adds a Job to the specified Account. + * @param job The Job to be added. * @param [options] The optional parameters * @returns Promise */ add(job: Models.JobAddParameter, options?: Models.JobAddOptionalParams): Promise; /** - * @param job The job to be added. + * @param job The Job to be added. * @param callback The callback */ add(job: Models.JobAddParameter, callback: msRest.ServiceCallback): void; /** - * @param job The job to be added. + * @param job The Job to be added. * @param options The optional parameters * @param callback The callback */ @@ -331,7 +331,7 @@ export class Job { } /** - * @summary Lists all of the jobs in the specified account. + * @summary Lists all of the Jobs in the specified Account. * @param [options] The optional parameters * @returns Promise */ @@ -355,19 +355,19 @@ export class Job { } /** - * @summary Lists the jobs that have been created under the specified job schedule. - * @param jobScheduleId The ID of the job schedule from which you want to get a list of jobs. + * @summary Lists the Jobs that have been created under the specified Job Schedule. + * @param jobScheduleId The ID of the Job Schedule from which you want to get a list of Jobs. * @param [options] The optional parameters * @returns Promise */ listFromJobSchedule(jobScheduleId: string, options?: Models.JobListFromJobScheduleOptionalParams): Promise; /** - * @param jobScheduleId The ID of the job schedule from which you want to get a list of jobs. + * @param jobScheduleId The ID of the Job Schedule from which you want to get a list of Jobs. * @param callback The callback */ listFromJobSchedule(jobScheduleId: string, callback: msRest.ServiceCallback): void; /** - * @param jobScheduleId The ID of the job schedule from which you want to get a list of jobs. + * @param jobScheduleId The ID of the Job Schedule from which you want to get a list of Jobs. * @param options The optional parameters * @param callback The callback */ @@ -383,25 +383,25 @@ export class Job { } /** - * This API returns the Job Preparation and Job Release task status on all compute nodes that have - * run the Job Preparation or Job Release task. This includes nodes which have since been removed - * from the pool. If this API is invoked on a job which has no Job Preparation or Job Release task, - * the Batch service returns HTTP status code 409 (Conflict) with an error code of + * This API returns the Job Preparation and Job Release Task status on all Compute Nodes that have + * run the Job Preparation or Job Release Task. This includes Compute Nodes which have since been + * removed from the Pool. If this API is invoked on a Job which has no Job Preparation or Job + * Release Task, the Batch service returns HTTP status code 409 (Conflict) with an error code of * JobPreparationTaskNotSpecified. - * @summary Lists the execution status of the Job Preparation and Job Release task for the - * specified job across the compute nodes where the job has run. - * @param jobId The ID of the job. + * @summary Lists the execution status of the Job Preparation and Job Release Task for the + * specified Job across the Compute Nodes where the Job has run. + * @param jobId The ID of the Job. * @param [options] The optional parameters * @returns Promise */ listPreparationAndReleaseTaskStatus(jobId: string, options?: Models.JobListPreparationAndReleaseTaskStatusOptionalParams): Promise; /** - * @param jobId The ID of the job. + * @param jobId The ID of the Job. * @param callback The callback */ listPreparationAndReleaseTaskStatus(jobId: string, callback: msRest.ServiceCallback): void; /** - * @param jobId The ID of the job. + * @param jobId The ID of the Job. * @param options The optional parameters * @param callback The callback */ @@ -417,26 +417,28 @@ export class Job { } /** - * Task counts provide a count of the tasks by active, running or completed task state, and a count - * of tasks which succeeded or failed. Tasks in the preparing state are counted as running. - * @summary Gets the task counts for the specified job. - * @param jobId The ID of the job. + * Task counts provide a count of the Tasks by active, running or completed Task state, and a count + * of Tasks which succeeded or failed. Tasks in the preparing state are counted as running. Note + * that the numbers returned may not always be up to date. If you need exact task counts, use a + * list query. + * @summary Gets the Task counts for the specified Job. + * @param jobId The ID of the Job. * @param [options] The optional parameters * @returns Promise */ getTaskCounts(jobId: string, options?: Models.JobGetTaskCountsOptionalParams): Promise; /** - * @param jobId The ID of the job. + * @param jobId The ID of the Job. * @param callback The callback */ - getTaskCounts(jobId: string, callback: msRest.ServiceCallback): void; + getTaskCounts(jobId: string, callback: msRest.ServiceCallback): void; /** - * @param jobId The ID of the job. + * @param jobId The ID of the Job. * @param options The optional parameters * @param callback The callback */ - getTaskCounts(jobId: string, options: Models.JobGetTaskCountsOptionalParams, callback: msRest.ServiceCallback): void; - getTaskCounts(jobId: string, options?: Models.JobGetTaskCountsOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + getTaskCounts(jobId: string, options: Models.JobGetTaskCountsOptionalParams, callback: msRest.ServiceCallback): void; + getTaskCounts(jobId: string, options?: Models.JobGetTaskCountsOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { jobId, @@ -447,7 +449,7 @@ export class Job { } /** - * @summary Lists all of the jobs in the specified account. + * @summary Lists all of the Jobs in the specified Account. * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters * @returns Promise @@ -475,7 +477,7 @@ export class Job { } /** - * @summary Lists the jobs that have been created under the specified job schedule. + * @summary Lists the Jobs that have been created under the specified Job Schedule. * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters * @returns Promise @@ -503,13 +505,13 @@ export class Job { } /** - * This API returns the Job Preparation and Job Release task status on all compute nodes that have - * run the Job Preparation or Job Release task. This includes nodes which have since been removed - * from the pool. If this API is invoked on a job which has no Job Preparation or Job Release task, - * the Batch service returns HTTP status code 409 (Conflict) with an error code of + * This API returns the Job Preparation and Job Release Task status on all Compute Nodes that have + * run the Job Preparation or Job Release Task. This includes Compute Nodes which have since been + * removed from the Pool. If this API is invoked on a Job which has no Job Preparation or Job + * Release Task, the Batch service returns HTTP status code 409 (Conflict) with an error code of * JobPreparationTaskNotSpecified. - * @summary Lists the execution status of the Job Preparation and Job Release task for the - * specified job across the compute nodes where the job has run. + * @summary Lists the execution status of the Job Preparation and Job Release Task for the + * specified Job across the Compute Nodes where the Job has run. * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters * @returns Promise @@ -561,7 +563,8 @@ const getAllLifetimeStatisticsOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.JobGetAllLifetimeStatisticsHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.JobGetAllLifetimeStatisticsHeaders } }, serializer @@ -593,7 +596,8 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.JobDeleteHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.JobDeleteHeaders } }, serializer @@ -628,7 +632,8 @@ const getOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.JobGetHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.JobGetHeaders } }, serializer @@ -668,7 +673,8 @@ const patchOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.JobPatchHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.JobPatchHeaders } }, serializer @@ -708,7 +714,8 @@ const updateOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.JobUpdateHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.JobUpdateHeaders } }, serializer @@ -750,7 +757,8 @@ const disableOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.JobDisableHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.JobDisableHeaders } }, serializer @@ -782,7 +790,8 @@ const enableOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.JobEnableHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.JobEnableHeaders } }, serializer @@ -824,7 +833,8 @@ const terminateOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.JobTerminateHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.JobTerminateHeaders } }, serializer @@ -859,7 +869,8 @@ const addOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.JobAddHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.JobAddHeaders } }, serializer @@ -891,7 +902,8 @@ const listOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.JobListHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.JobListHeaders } }, serializer @@ -924,7 +936,8 @@ const listFromJobScheduleOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.JobListFromJobScheduleHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.JobListFromJobScheduleHeaders } }, serializer @@ -956,7 +969,8 @@ const listPreparationAndReleaseTaskStatusOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.JobListPreparationAndReleaseTaskStatusHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.JobListPreparationAndReleaseTaskStatusHeaders } }, serializer @@ -981,11 +995,12 @@ const getTaskCountsOperationSpec: msRest.OperationSpec = { ], responses: { 200: { - bodyMapper: Mappers.TaskCounts, + bodyMapper: Mappers.TaskCountsResult, headersMapper: Mappers.JobGetTaskCountsHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.JobGetTaskCountsHeaders } }, serializer @@ -1010,7 +1025,8 @@ const listNextOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.JobListHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.JobListHeaders } }, serializer @@ -1035,7 +1051,8 @@ const listFromJobScheduleNextOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.JobListFromJobScheduleHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.JobListFromJobScheduleHeaders } }, serializer @@ -1060,7 +1077,8 @@ const listPreparationAndReleaseTaskStatusNextOperationSpec: msRest.OperationSpec headersMapper: Mappers.JobListPreparationAndReleaseTaskStatusHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.JobListPreparationAndReleaseTaskStatusHeaders } }, serializer diff --git a/sdk/batch/batch/src/operations/jobSchedule.ts b/sdk/batch/batch/src/operations/jobSchedule.ts index 1aca6bbdd8ad..e686ef685453 100644 --- a/sdk/batch/batch/src/operations/jobSchedule.ts +++ b/sdk/batch/batch/src/operations/jobSchedule.ts @@ -27,19 +27,19 @@ export class JobSchedule { } /** - * @summary Checks the specified job schedule exists. - * @param jobScheduleId The ID of the job schedule which you want to check. + * @summary Checks the specified Job Schedule exists. + * @param jobScheduleId The ID of the Job Schedule which you want to check. * @param [options] The optional parameters * @returns Promise */ exists(jobScheduleId: string, options?: Models.JobScheduleExistsOptionalParams): Promise; /** - * @param jobScheduleId The ID of the job schedule which you want to check. + * @param jobScheduleId The ID of the Job Schedule which you want to check. * @param callback The callback */ exists(jobScheduleId: string, callback: msRest.ServiceCallback): void; /** - * @param jobScheduleId The ID of the job schedule which you want to check. + * @param jobScheduleId The ID of the Job Schedule which you want to check. * @param options The optional parameters * @param callback The callback */ @@ -55,24 +55,24 @@ export class JobSchedule { } /** - * When you delete a job schedule, this also deletes all jobs and tasks under that schedule. When - * tasks are deleted, all the files in their working directories on the compute nodes are also - * deleted (the retention period is ignored). The job schedule statistics are no longer accessible - * once the job schedule is deleted, though they are still counted towards account lifetime + * When you delete a Job Schedule, this also deletes all Jobs and Tasks under that schedule. When + * Tasks are deleted, all the files in their working directories on the Compute Nodes are also + * deleted (the retention period is ignored). The Job Schedule statistics are no longer accessible + * once the Job Schedule is deleted, though they are still counted towards Account lifetime * statistics. - * @summary Deletes a job schedule from the specified account. - * @param jobScheduleId The ID of the job schedule to delete. + * @summary Deletes a Job Schedule from the specified Account. + * @param jobScheduleId The ID of the Job Schedule to delete. * @param [options] The optional parameters * @returns Promise */ deleteMethod(jobScheduleId: string, options?: Models.JobScheduleDeleteMethodOptionalParams): Promise; /** - * @param jobScheduleId The ID of the job schedule to delete. + * @param jobScheduleId The ID of the Job Schedule to delete. * @param callback The callback */ deleteMethod(jobScheduleId: string, callback: msRest.ServiceCallback): void; /** - * @param jobScheduleId The ID of the job schedule to delete. + * @param jobScheduleId The ID of the Job Schedule to delete. * @param options The optional parameters * @param callback The callback */ @@ -88,19 +88,19 @@ export class JobSchedule { } /** - * Gets information about the specified job schedule. - * @param jobScheduleId The ID of the job schedule to get. + * Gets information about the specified Job Schedule. + * @param jobScheduleId The ID of the Job Schedule to get. * @param [options] The optional parameters * @returns Promise */ get(jobScheduleId: string, options?: Models.JobScheduleGetOptionalParams): Promise; /** - * @param jobScheduleId The ID of the job schedule to get. + * @param jobScheduleId The ID of the Job Schedule to get. * @param callback The callback */ get(jobScheduleId: string, callback: msRest.ServiceCallback): void; /** - * @param jobScheduleId The ID of the job schedule to get. + * @param jobScheduleId The ID of the Job Schedule to get. * @param options The optional parameters * @param callback The callback */ @@ -116,25 +116,25 @@ export class JobSchedule { } /** - * This replaces only the job schedule properties specified in the request. For example, if the + * This replaces only the Job Schedule properties specified in the request. For example, if the * schedule property is not specified with this request, then the Batch service will keep the - * existing schedule. Changes to a job schedule only impact jobs created by the schedule after the - * update has taken place; currently running jobs are unaffected. - * @summary Updates the properties of the specified job schedule. - * @param jobScheduleId The ID of the job schedule to update. + * existing schedule. Changes to a Job Schedule only impact Jobs created by the schedule after the + * update has taken place; currently running Jobs are unaffected. + * @summary Updates the properties of the specified Job Schedule. + * @param jobScheduleId The ID of the Job Schedule to update. * @param jobSchedulePatchParameter The parameters for the request. * @param [options] The optional parameters * @returns Promise */ patch(jobScheduleId: string, jobSchedulePatchParameter: Models.JobSchedulePatchParameter, options?: Models.JobSchedulePatchOptionalParams): Promise; /** - * @param jobScheduleId The ID of the job schedule to update. + * @param jobScheduleId The ID of the Job Schedule to update. * @param jobSchedulePatchParameter The parameters for the request. * @param callback The callback */ patch(jobScheduleId: string, jobSchedulePatchParameter: Models.JobSchedulePatchParameter, callback: msRest.ServiceCallback): void; /** - * @param jobScheduleId The ID of the job schedule to update. + * @param jobScheduleId The ID of the Job Schedule to update. * @param jobSchedulePatchParameter The parameters for the request. * @param options The optional parameters * @param callback The callback @@ -152,25 +152,25 @@ export class JobSchedule { } /** - * This fully replaces all the updatable properties of the job schedule. For example, if the + * This fully replaces all the updatable properties of the Job Schedule. For example, if the * schedule property is not specified with this request, then the Batch service will remove the - * existing schedule. Changes to a job schedule only impact jobs created by the schedule after the - * update has taken place; currently running jobs are unaffected. - * @summary Updates the properties of the specified job schedule. - * @param jobScheduleId The ID of the job schedule to update. + * existing schedule. Changes to a Job Schedule only impact Jobs created by the schedule after the + * update has taken place; currently running Jobs are unaffected. + * @summary Updates the properties of the specified Job Schedule. + * @param jobScheduleId The ID of the Job Schedule to update. * @param jobScheduleUpdateParameter The parameters for the request. * @param [options] The optional parameters * @returns Promise */ update(jobScheduleId: string, jobScheduleUpdateParameter: Models.JobScheduleUpdateParameter, options?: Models.JobScheduleUpdateOptionalParams): Promise; /** - * @param jobScheduleId The ID of the job schedule to update. + * @param jobScheduleId The ID of the Job Schedule to update. * @param jobScheduleUpdateParameter The parameters for the request. * @param callback The callback */ update(jobScheduleId: string, jobScheduleUpdateParameter: Models.JobScheduleUpdateParameter, callback: msRest.ServiceCallback): void; /** - * @param jobScheduleId The ID of the job schedule to update. + * @param jobScheduleId The ID of the Job Schedule to update. * @param jobScheduleUpdateParameter The parameters for the request. * @param options The optional parameters * @param callback The callback @@ -188,20 +188,20 @@ export class JobSchedule { } /** - * No new jobs will be created until the job schedule is enabled again. - * @summary Disables a job schedule. - * @param jobScheduleId The ID of the job schedule to disable. + * No new Jobs will be created until the Job Schedule is enabled again. + * @summary Disables a Job Schedule. + * @param jobScheduleId The ID of the Job Schedule to disable. * @param [options] The optional parameters * @returns Promise */ disable(jobScheduleId: string, options?: Models.JobScheduleDisableOptionalParams): Promise; /** - * @param jobScheduleId The ID of the job schedule to disable. + * @param jobScheduleId The ID of the Job Schedule to disable. * @param callback The callback */ disable(jobScheduleId: string, callback: msRest.ServiceCallback): void; /** - * @param jobScheduleId The ID of the job schedule to disable. + * @param jobScheduleId The ID of the Job Schedule to disable. * @param options The optional parameters * @param callback The callback */ @@ -217,19 +217,19 @@ export class JobSchedule { } /** - * @summary Enables a job schedule. - * @param jobScheduleId The ID of the job schedule to enable. + * @summary Enables a Job Schedule. + * @param jobScheduleId The ID of the Job Schedule to enable. * @param [options] The optional parameters * @returns Promise */ enable(jobScheduleId: string, options?: Models.JobScheduleEnableOptionalParams): Promise; /** - * @param jobScheduleId The ID of the job schedule to enable. + * @param jobScheduleId The ID of the Job Schedule to enable. * @param callback The callback */ enable(jobScheduleId: string, callback: msRest.ServiceCallback): void; /** - * @param jobScheduleId The ID of the job schedule to enable. + * @param jobScheduleId The ID of the Job Schedule to enable. * @param options The optional parameters * @param callback The callback */ @@ -245,19 +245,19 @@ export class JobSchedule { } /** - * @summary Terminates a job schedule. - * @param jobScheduleId The ID of the job schedule to terminates. + * @summary Terminates a Job Schedule. + * @param jobScheduleId The ID of the Job Schedule to terminates. * @param [options] The optional parameters * @returns Promise */ terminate(jobScheduleId: string, options?: Models.JobScheduleTerminateOptionalParams): Promise; /** - * @param jobScheduleId The ID of the job schedule to terminates. + * @param jobScheduleId The ID of the Job Schedule to terminates. * @param callback The callback */ terminate(jobScheduleId: string, callback: msRest.ServiceCallback): void; /** - * @param jobScheduleId The ID of the job schedule to terminates. + * @param jobScheduleId The ID of the Job Schedule to terminates. * @param options The optional parameters * @param callback The callback */ @@ -273,19 +273,19 @@ export class JobSchedule { } /** - * @summary Adds a job schedule to the specified account. - * @param cloudJobSchedule The job schedule to be added. + * @summary Adds a Job Schedule to the specified Account. + * @param cloudJobSchedule The Job Schedule to be added. * @param [options] The optional parameters * @returns Promise */ add(cloudJobSchedule: Models.JobScheduleAddParameter, options?: Models.JobScheduleAddOptionalParams): Promise; /** - * @param cloudJobSchedule The job schedule to be added. + * @param cloudJobSchedule The Job Schedule to be added. * @param callback The callback */ add(cloudJobSchedule: Models.JobScheduleAddParameter, callback: msRest.ServiceCallback): void; /** - * @param cloudJobSchedule The job schedule to be added. + * @param cloudJobSchedule The Job Schedule to be added. * @param options The optional parameters * @param callback The callback */ @@ -301,7 +301,7 @@ export class JobSchedule { } /** - * @summary Lists all of the job schedules in the specified account. + * @summary Lists all of the Job Schedules in the specified Account. * @param [options] The optional parameters * @returns Promise */ @@ -325,7 +325,7 @@ export class JobSchedule { } /** - * @summary Lists all of the job schedules in the specified account. + * @summary Lists all of the Job Schedules in the specified Account. * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters * @returns Promise @@ -384,7 +384,8 @@ const existsOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.JobScheduleExistsHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.JobScheduleExistsHeaders } }, serializer @@ -416,7 +417,8 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.JobScheduleDeleteHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.JobScheduleDeleteHeaders } }, serializer @@ -451,7 +453,8 @@ const getOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.JobScheduleGetHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.JobScheduleGetHeaders } }, serializer @@ -491,7 +494,8 @@ const patchOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.JobSchedulePatchHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.JobSchedulePatchHeaders } }, serializer @@ -531,7 +535,8 @@ const updateOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.JobScheduleUpdateHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.JobScheduleUpdateHeaders } }, serializer @@ -563,7 +568,8 @@ const disableOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.JobScheduleDisableHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.JobScheduleDisableHeaders } }, serializer @@ -595,7 +601,8 @@ const enableOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.JobScheduleEnableHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.JobScheduleEnableHeaders } }, serializer @@ -627,7 +634,8 @@ const terminateOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.JobScheduleTerminateHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.JobScheduleTerminateHeaders } }, serializer @@ -662,7 +670,8 @@ const addOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.JobScheduleAddHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.JobScheduleAddHeaders } }, serializer @@ -694,7 +703,8 @@ const listOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.JobScheduleListHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.JobScheduleListHeaders } }, serializer @@ -719,7 +729,8 @@ const listNextOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.JobScheduleListHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.JobScheduleListHeaders } }, serializer diff --git a/sdk/batch/batch/src/operations/pool.ts b/sdk/batch/batch/src/operations/pool.ts index 4fb694a9153e..f78aa95f014c 100644 --- a/sdk/batch/batch/src/operations/pool.ts +++ b/sdk/batch/batch/src/operations/pool.ts @@ -27,13 +27,13 @@ export class Pool { } /** - * If you do not specify a $filter clause including a poolId, the response includes all pools that - * existed in the account in the time range of the returned aggregation intervals. If you do not + * If you do not specify a $filter clause including a poolId, the response includes all Pools that + * existed in the Account in the time range of the returned aggregation intervals. If you do not * specify a $filter clause including a startTime or endTime these filters default to the start and * end times of the last aggregation interval currently available; that is, only the last * aggregation interval is returned. - * @summary Lists the usage metrics, aggregated by pool across individual time intervals, for the - * specified account. + * @summary Lists the usage metrics, aggregated by Pool across individual time intervals, for the + * specified Account. * @param [options] The optional parameters * @returns Promise */ @@ -57,11 +57,11 @@ export class Pool { } /** - * Statistics are aggregated across all pools that have ever existed in the account, from account + * Statistics are aggregated across all Pools that have ever existed in the Account, from Account * creation to the last update time of the statistics. The statistics may not be immediately * available. The Batch service performs periodic roll-up of statistics. The typical delay is about * 30 minutes. - * @summary Gets lifetime summary statistics for all of the pools in the specified account. + * @summary Gets lifetime summary statistics for all of the Pools in the specified Account. * @param [options] The optional parameters * @returns Promise */ @@ -85,21 +85,21 @@ export class Pool { } /** - * When naming pools, avoid including sensitive information such as user names or secret project + * When naming Pools, avoid including sensitive information such as user names or secret project * names. This information may appear in telemetry logs accessible to Microsoft Support engineers. - * @summary Adds a pool to the specified account. - * @param pool The pool to be added. + * @summary Adds a Pool to the specified Account. + * @param pool The Pool to be added. * @param [options] The optional parameters * @returns Promise */ add(pool: Models.PoolAddParameter, options?: Models.PoolAddOptionalParams): Promise; /** - * @param pool The pool to be added. + * @param pool The Pool to be added. * @param callback The callback */ add(pool: Models.PoolAddParameter, callback: msRest.ServiceCallback): void; /** - * @param pool The pool to be added. + * @param pool The Pool to be added. * @param options The optional parameters * @param callback The callback */ @@ -115,7 +115,7 @@ export class Pool { } /** - * @summary Lists all of the pools in the specified account. + * @summary Lists all of the Pools in the specified Account. * @param [options] The optional parameters * @returns Promise */ @@ -139,29 +139,29 @@ export class Pool { } /** - * When you request that a pool be deleted, the following actions occur: the pool state is set to - * deleting; any ongoing resize operation on the pool are stopped; the Batch service starts - * resizing the pool to zero nodes; any tasks running on existing nodes are terminated and requeued - * (as if a resize pool operation had been requested with the default requeue option); finally, the - * pool is removed from the system. Because running tasks are requeued, the user can rerun these - * tasks by updating their job to target a different pool. The tasks can then run on the new pool. - * If you want to override the requeue behavior, then you should call resize pool explicitly to - * shrink the pool to zero size before deleting the pool. If you call an Update, Patch or Delete - * API on a pool in the deleting state, it will fail with HTTP status code 409 with error code - * PoolBeingDeleted. - * @summary Deletes a pool from the specified account. - * @param poolId The ID of the pool to delete. + * When you request that a Pool be deleted, the following actions occur: the Pool state is set to + * deleting; any ongoing resize operation on the Pool are stopped; the Batch service starts + * resizing the Pool to zero Compute Nodes; any Tasks running on existing Compute Nodes are + * terminated and requeued (as if a resize Pool operation had been requested with the default + * requeue option); finally, the Pool is removed from the system. Because running Tasks are + * requeued, the user can rerun these Tasks by updating their Job to target a different Pool. The + * Tasks can then run on the new Pool. If you want to override the requeue behavior, then you + * should call resize Pool explicitly to shrink the Pool to zero size before deleting the Pool. If + * you call an Update, Patch or Delete API on a Pool in the deleting state, it will fail with HTTP + * status code 409 with error code PoolBeingDeleted. + * @summary Deletes a Pool from the specified Account. + * @param poolId The ID of the Pool to delete. * @param [options] The optional parameters * @returns Promise */ deleteMethod(poolId: string, options?: Models.PoolDeleteMethodOptionalParams): Promise; /** - * @param poolId The ID of the pool to delete. + * @param poolId The ID of the Pool to delete. * @param callback The callback */ deleteMethod(poolId: string, callback: msRest.ServiceCallback): void; /** - * @param poolId The ID of the pool to delete. + * @param poolId The ID of the Pool to delete. * @param options The optional parameters * @param callback The callback */ @@ -177,19 +177,19 @@ export class Pool { } /** - * Gets basic properties of a pool. - * @param poolId The ID of the pool to get. + * Gets basic properties of a Pool. + * @param poolId The ID of the Pool to get. * @param [options] The optional parameters * @returns Promise */ exists(poolId: string, options?: Models.PoolExistsOptionalParams): Promise; /** - * @param poolId The ID of the pool to get. + * @param poolId The ID of the Pool to get. * @param callback The callback */ exists(poolId: string, callback: msRest.ServiceCallback): void; /** - * @param poolId The ID of the pool to get. + * @param poolId The ID of the Pool to get. * @param options The optional parameters * @param callback The callback */ @@ -205,19 +205,19 @@ export class Pool { } /** - * Gets information about the specified pool. - * @param poolId The ID of the pool to get. + * Gets information about the specified Pool. + * @param poolId The ID of the Pool to get. * @param [options] The optional parameters * @returns Promise */ get(poolId: string, options?: Models.PoolGetOptionalParams): Promise; /** - * @param poolId The ID of the pool to get. + * @param poolId The ID of the Pool to get. * @param callback The callback */ get(poolId: string, callback: msRest.ServiceCallback): void; /** - * @param poolId The ID of the pool to get. + * @param poolId The ID of the Pool to get. * @param options The optional parameters * @param callback The callback */ @@ -233,24 +233,24 @@ export class Pool { } /** - * This only replaces the pool properties specified in the request. For example, if the pool has a - * start task associated with it, and a request does not specify a start task element, then the - * pool keeps the existing start task. - * @summary Updates the properties of the specified pool. - * @param poolId The ID of the pool to update. + * This only replaces the Pool properties specified in the request. For example, if the Pool has a + * StartTask associated with it, and a request does not specify a StartTask element, then the Pool + * keeps the existing StartTask. + * @summary Updates the properties of the specified Pool. + * @param poolId The ID of the Pool to update. * @param poolPatchParameter The parameters for the request. * @param [options] The optional parameters * @returns Promise */ patch(poolId: string, poolPatchParameter: Models.PoolPatchParameter, options?: Models.PoolPatchOptionalParams): Promise; /** - * @param poolId The ID of the pool to update. + * @param poolId The ID of the Pool to update. * @param poolPatchParameter The parameters for the request. * @param callback The callback */ patch(poolId: string, poolPatchParameter: Models.PoolPatchParameter, callback: msRest.ServiceCallback): void; /** - * @param poolId The ID of the pool to update. + * @param poolId The ID of the Pool to update. * @param poolPatchParameter The parameters for the request. * @param options The optional parameters * @param callback The callback @@ -268,19 +268,19 @@ export class Pool { } /** - * @summary Disables automatic scaling for a pool. - * @param poolId The ID of the pool on which to disable automatic scaling. + * @summary Disables automatic scaling for a Pool. + * @param poolId The ID of the Pool on which to disable automatic scaling. * @param [options] The optional parameters * @returns Promise */ disableAutoScale(poolId: string, options?: Models.PoolDisableAutoScaleOptionalParams): Promise; /** - * @param poolId The ID of the pool on which to disable automatic scaling. + * @param poolId The ID of the Pool on which to disable automatic scaling. * @param callback The callback */ disableAutoScale(poolId: string, callback: msRest.ServiceCallback): void; /** - * @param poolId The ID of the pool on which to disable automatic scaling. + * @param poolId The ID of the Pool on which to disable automatic scaling. * @param options The optional parameters * @param callback The callback */ @@ -296,26 +296,26 @@ export class Pool { } /** - * You cannot enable automatic scaling on a pool if a resize operation is in progress on the pool. - * If automatic scaling of the pool is currently disabled, you must specify a valid autoscale - * formula as part of the request. If automatic scaling of the pool is already enabled, you may + * You cannot enable automatic scaling on a Pool if a resize operation is in progress on the Pool. + * If automatic scaling of the Pool is currently disabled, you must specify a valid autoscale + * formula as part of the request. If automatic scaling of the Pool is already enabled, you may * specify a new autoscale formula and/or a new evaluation interval. You cannot call this API for - * the same pool more than once every 30 seconds. - * @summary Enables automatic scaling for a pool. - * @param poolId The ID of the pool on which to enable automatic scaling. + * the same Pool more than once every 30 seconds. + * @summary Enables automatic scaling for a Pool. + * @param poolId The ID of the Pool on which to enable automatic scaling. * @param poolEnableAutoScaleParameter The parameters for the request. * @param [options] The optional parameters * @returns Promise */ enableAutoScale(poolId: string, poolEnableAutoScaleParameter: Models.PoolEnableAutoScaleParameter, options?: Models.PoolEnableAutoScaleOptionalParams): Promise; /** - * @param poolId The ID of the pool on which to enable automatic scaling. + * @param poolId The ID of the Pool on which to enable automatic scaling. * @param poolEnableAutoScaleParameter The parameters for the request. * @param callback The callback */ enableAutoScale(poolId: string, poolEnableAutoScaleParameter: Models.PoolEnableAutoScaleParameter, callback: msRest.ServiceCallback): void; /** - * @param poolId The ID of the pool on which to enable automatic scaling. + * @param poolId The ID of the Pool on which to enable automatic scaling. * @param poolEnableAutoScaleParameter The parameters for the request. * @param options The optional parameters * @param callback The callback @@ -334,35 +334,35 @@ export class Pool { /** * This API is primarily for validating an autoscale formula, as it simply returns the result - * without applying the formula to the pool. The pool must have auto scaling enabled in order to + * without applying the formula to the Pool. The Pool must have auto scaling enabled in order to * evaluate a formula. - * @summary Gets the result of evaluating an automatic scaling formula on the pool. - * @param poolId The ID of the pool on which to evaluate the automatic scaling formula. - * @param autoScaleFormula The formula for the desired number of compute nodes in the pool. The - * formula is validated and its results calculated, but it is not applied to the pool. To apply the - * formula to the pool, 'Enable automatic scaling on a pool'. For more information about specifying - * this formula, see Automatically scale compute nodes in an Azure Batch pool + * @summary Gets the result of evaluating an automatic scaling formula on the Pool. + * @param poolId The ID of the Pool on which to evaluate the automatic scaling formula. + * @param autoScaleFormula The formula for the desired number of Compute Nodes in the Pool. The + * formula is validated and its results calculated, but it is not applied to the Pool. To apply the + * formula to the Pool, 'Enable automatic scaling on a Pool'. For more information about specifying + * this formula, see Automatically scale Compute Nodes in an Azure Batch Pool * (https://azure.microsoft.com/en-us/documentation/articles/batch-automatic-scaling). * @param [options] The optional parameters * @returns Promise */ evaluateAutoScale(poolId: string, autoScaleFormula: string, options?: Models.PoolEvaluateAutoScaleOptionalParams): Promise; /** - * @param poolId The ID of the pool on which to evaluate the automatic scaling formula. - * @param autoScaleFormula The formula for the desired number of compute nodes in the pool. The - * formula is validated and its results calculated, but it is not applied to the pool. To apply the - * formula to the pool, 'Enable automatic scaling on a pool'. For more information about specifying - * this formula, see Automatically scale compute nodes in an Azure Batch pool + * @param poolId The ID of the Pool on which to evaluate the automatic scaling formula. + * @param autoScaleFormula The formula for the desired number of Compute Nodes in the Pool. The + * formula is validated and its results calculated, but it is not applied to the Pool. To apply the + * formula to the Pool, 'Enable automatic scaling on a Pool'. For more information about specifying + * this formula, see Automatically scale Compute Nodes in an Azure Batch Pool * (https://azure.microsoft.com/en-us/documentation/articles/batch-automatic-scaling). * @param callback The callback */ evaluateAutoScale(poolId: string, autoScaleFormula: string, callback: msRest.ServiceCallback): void; /** - * @param poolId The ID of the pool on which to evaluate the automatic scaling formula. - * @param autoScaleFormula The formula for the desired number of compute nodes in the pool. The - * formula is validated and its results calculated, but it is not applied to the pool. To apply the - * formula to the pool, 'Enable automatic scaling on a pool'. For more information about specifying - * this formula, see Automatically scale compute nodes in an Azure Batch pool + * @param poolId The ID of the Pool on which to evaluate the automatic scaling formula. + * @param autoScaleFormula The formula for the desired number of Compute Nodes in the Pool. The + * formula is validated and its results calculated, but it is not applied to the Pool. To apply the + * formula to the Pool, 'Enable automatic scaling on a Pool'. For more information about specifying + * this formula, see Automatically scale Compute Nodes in an Azure Batch Pool * (https://azure.microsoft.com/en-us/documentation/articles/batch-automatic-scaling). * @param options The optional parameters * @param callback The callback @@ -380,27 +380,27 @@ export class Pool { } /** - * You can only resize a pool when its allocation state is steady. If the pool is already resizing, - * the request fails with status code 409. When you resize a pool, the pool's allocation state - * changes from steady to resizing. You cannot resize pools which are configured for automatic - * scaling. If you try to do this, the Batch service returns an error 409. If you resize a pool - * downwards, the Batch service chooses which nodes to remove. To remove specific nodes, use the - * pool remove nodes API instead. - * @summary Changes the number of compute nodes that are assigned to a pool. - * @param poolId The ID of the pool to resize. + * You can only resize a Pool when its allocation state is steady. If the Pool is already resizing, + * the request fails with status code 409. When you resize a Pool, the Pool's allocation state + * changes from steady to resizing. You cannot resize Pools which are configured for automatic + * scaling. If you try to do this, the Batch service returns an error 409. If you resize a Pool + * downwards, the Batch service chooses which Compute Nodes to remove. To remove specific Compute + * Nodes, use the Pool remove Compute Nodes API instead. + * @summary Changes the number of Compute Nodes that are assigned to a Pool. + * @param poolId The ID of the Pool to resize. * @param poolResizeParameter The parameters for the request. * @param [options] The optional parameters * @returns Promise */ resize(poolId: string, poolResizeParameter: Models.PoolResizeParameter, options?: Models.PoolResizeOptionalParams): Promise; /** - * @param poolId The ID of the pool to resize. + * @param poolId The ID of the Pool to resize. * @param poolResizeParameter The parameters for the request. * @param callback The callback */ resize(poolId: string, poolResizeParameter: Models.PoolResizeParameter, callback: msRest.ServiceCallback): void; /** - * @param poolId The ID of the pool to resize. + * @param poolId The ID of the Pool to resize. * @param poolResizeParameter The parameters for the request. * @param options The optional parameters * @param callback The callback @@ -418,25 +418,25 @@ export class Pool { } /** - * This does not restore the pool to its previous state before the resize operation: it only stops - * any further changes being made, and the pool maintains its current state. After stopping, the - * pool stabilizes at the number of nodes it was at when the stop operation was done. During the - * stop operation, the pool allocation state changes first to stopping and then to steady. A resize - * operation need not be an explicit resize pool request; this API can also be used to halt the - * initial sizing of the pool when it is created. - * @summary Stops an ongoing resize operation on the pool. - * @param poolId The ID of the pool whose resizing you want to stop. + * This does not restore the Pool to its previous state before the resize operation: it only stops + * any further changes being made, and the Pool maintains its current state. After stopping, the + * Pool stabilizes at the number of Compute Nodes it was at when the stop operation was done. + * During the stop operation, the Pool allocation state changes first to stopping and then to + * steady. A resize operation need not be an explicit resize Pool request; this API can also be + * used to halt the initial sizing of the Pool when it is created. + * @summary Stops an ongoing resize operation on the Pool. + * @param poolId The ID of the Pool whose resizing you want to stop. * @param [options] The optional parameters * @returns Promise */ stopResize(poolId: string, options?: Models.PoolStopResizeOptionalParams): Promise; /** - * @param poolId The ID of the pool whose resizing you want to stop. + * @param poolId The ID of the Pool whose resizing you want to stop. * @param callback The callback */ stopResize(poolId: string, callback: msRest.ServiceCallback): void; /** - * @param poolId The ID of the pool whose resizing you want to stop. + * @param poolId The ID of the Pool whose resizing you want to stop. * @param options The optional parameters * @param callback The callback */ @@ -452,24 +452,24 @@ export class Pool { } /** - * This fully replaces all the updatable properties of the pool. For example, if the pool has a - * start task associated with it and if start task is not specified with this request, then the - * Batch service will remove the existing start task. - * @summary Updates the properties of the specified pool. - * @param poolId The ID of the pool to update. + * This fully replaces all the updatable properties of the Pool. For example, if the Pool has a + * StartTask associated with it and if StartTask is not specified with this request, then the Batch + * service will remove the existing StartTask. + * @summary Updates the properties of the specified Pool. + * @param poolId The ID of the Pool to update. * @param poolUpdatePropertiesParameter The parameters for the request. * @param [options] The optional parameters * @returns Promise */ updateProperties(poolId: string, poolUpdatePropertiesParameter: Models.PoolUpdatePropertiesParameter, options?: Models.PoolUpdatePropertiesOptionalParams): Promise; /** - * @param poolId The ID of the pool to update. + * @param poolId The ID of the Pool to update. * @param poolUpdatePropertiesParameter The parameters for the request. * @param callback The callback */ updateProperties(poolId: string, poolUpdatePropertiesParameter: Models.PoolUpdatePropertiesParameter, callback: msRest.ServiceCallback): void; /** - * @param poolId The ID of the pool to update. + * @param poolId The ID of the Pool to update. * @param poolUpdatePropertiesParameter The parameters for the request. * @param options The optional parameters * @param callback The callback @@ -487,23 +487,23 @@ export class Pool { } /** - * This operation can only run when the allocation state of the pool is steady. When this operation + * This operation can only run when the allocation state of the Pool is steady. When this operation * runs, the allocation state changes from steady to resizing. - * @summary Removes compute nodes from the specified pool. - * @param poolId The ID of the pool from which you want to remove nodes. + * @summary Removes Compute Nodes from the specified Pool. + * @param poolId The ID of the Pool from which you want to remove Compute Nodes. * @param nodeRemoveParameter The parameters for the request. * @param [options] The optional parameters * @returns Promise */ removeNodes(poolId: string, nodeRemoveParameter: Models.NodeRemoveParameter, options?: Models.PoolRemoveNodesOptionalParams): Promise; /** - * @param poolId The ID of the pool from which you want to remove nodes. + * @param poolId The ID of the Pool from which you want to remove Compute Nodes. * @param nodeRemoveParameter The parameters for the request. * @param callback The callback */ removeNodes(poolId: string, nodeRemoveParameter: Models.NodeRemoveParameter, callback: msRest.ServiceCallback): void; /** - * @param poolId The ID of the pool from which you want to remove nodes. + * @param poolId The ID of the Pool from which you want to remove Compute Nodes. * @param nodeRemoveParameter The parameters for the request. * @param options The optional parameters * @param callback The callback @@ -521,13 +521,13 @@ export class Pool { } /** - * If you do not specify a $filter clause including a poolId, the response includes all pools that - * existed in the account in the time range of the returned aggregation intervals. If you do not + * If you do not specify a $filter clause including a poolId, the response includes all Pools that + * existed in the Account in the time range of the returned aggregation intervals. If you do not * specify a $filter clause including a startTime or endTime these filters default to the start and * end times of the last aggregation interval currently available; that is, only the last * aggregation interval is returned. - * @summary Lists the usage metrics, aggregated by pool across individual time intervals, for the - * specified account. + * @summary Lists the usage metrics, aggregated by Pool across individual time intervals, for the + * specified Account. * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters * @returns Promise @@ -555,7 +555,7 @@ export class Pool { } /** - * @summary Lists all of the pools in the specified account. + * @summary Lists all of the Pools in the specified Account. * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters * @returns Promise @@ -611,7 +611,8 @@ const listUsageMetricsOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.PoolListUsageMetricsHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.PoolListUsageMetricsHeaders } }, serializer @@ -639,7 +640,8 @@ const getAllLifetimeStatisticsOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.PoolGetAllLifetimeStatisticsHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.PoolGetAllLifetimeStatisticsHeaders } }, serializer @@ -674,7 +676,8 @@ const addOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.PoolAddHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.PoolAddHeaders } }, serializer @@ -706,7 +709,8 @@ const listOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.PoolListHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.PoolListHeaders } }, serializer @@ -738,7 +742,8 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.PoolDeleteHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.PoolDeleteHeaders } }, serializer @@ -773,7 +778,8 @@ const existsOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.PoolExistsHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.PoolExistsHeaders } }, serializer @@ -808,7 +814,8 @@ const getOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.PoolGetHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.PoolGetHeaders } }, serializer @@ -848,7 +855,8 @@ const patchOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.PoolPatchHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.PoolPatchHeaders } }, serializer @@ -876,7 +884,8 @@ const disableAutoScaleOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.PoolDisableAutoScaleHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.PoolDisableAutoScaleHeaders } }, serializer @@ -916,7 +925,8 @@ const enableAutoScaleOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.PoolEnableAutoScaleHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.PoolEnableAutoScaleHeaders } }, serializer @@ -955,7 +965,8 @@ const evaluateAutoScaleOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.PoolEvaluateAutoScaleHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.PoolEvaluateAutoScaleHeaders } }, serializer @@ -995,7 +1006,8 @@ const resizeOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.PoolResizeHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.PoolResizeHeaders } }, serializer @@ -1027,7 +1039,8 @@ const stopResizeOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.PoolStopResizeHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.PoolStopResizeHeaders } }, serializer @@ -1063,7 +1076,8 @@ const updatePropertiesOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.PoolUpdatePropertiesHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.PoolUpdatePropertiesHeaders } }, serializer @@ -1103,7 +1117,8 @@ const removeNodesOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.PoolRemoveNodesHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.PoolRemoveNodesHeaders } }, serializer @@ -1128,7 +1143,8 @@ const listUsageMetricsNextOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.PoolListUsageMetricsHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.PoolListUsageMetricsHeaders } }, serializer @@ -1153,7 +1169,8 @@ const listNextOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.PoolListHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.PoolListHeaders } }, serializer diff --git a/sdk/batch/batch/src/operations/task.ts b/sdk/batch/batch/src/operations/task.ts index 809212a479e2..f5e171bf1a18 100644 --- a/sdk/batch/batch/src/operations/task.ts +++ b/sdk/batch/batch/src/operations/task.ts @@ -27,25 +27,25 @@ export class Task { } /** - * The maximum lifetime of a task from addition to completion is 180 days. If a task has not + * The maximum lifetime of a Task from addition to completion is 180 days. If a Task has not * completed within 180 days of being added it will be terminated by the Batch service and left in * whatever state it was in at that time. - * @summary Adds a task to the specified job. - * @param jobId The ID of the job to which the task is to be added. - * @param task The task to be added. + * @summary Adds a Task to the specified Job. + * @param jobId The ID of the Job to which the Task is to be added. + * @param task The Task to be added. * @param [options] The optional parameters * @returns Promise */ add(jobId: string, task: Models.TaskAddParameter, options?: Models.TaskAddOptionalParams): Promise; /** - * @param jobId The ID of the job to which the task is to be added. - * @param task The task to be added. + * @param jobId The ID of the Job to which the Task is to be added. + * @param task The Task to be added. * @param callback The callback */ add(jobId: string, task: Models.TaskAddParameter, callback: msRest.ServiceCallback): void; /** - * @param jobId The ID of the job to which the task is to be added. - * @param task The task to be added. + * @param jobId The ID of the Job to which the Task is to be added. + * @param task The Task to be added. * @param options The optional parameters * @param callback The callback */ @@ -62,21 +62,21 @@ export class Task { } /** - * For multi-instance tasks, information such as affinityId, executionInfo and nodeInfo refer to - * the primary task. Use the list subtasks API to retrieve information about subtasks. - * @summary Lists all of the tasks that are associated with the specified job. - * @param jobId The ID of the job. + * For multi-instance Tasks, information such as affinityId, executionInfo and nodeInfo refer to + * the primary Task. Use the list subtasks API to retrieve information about subtasks. + * @summary Lists all of the Tasks that are associated with the specified Job. + * @param jobId The ID of the Job. * @param [options] The optional parameters * @returns Promise */ list(jobId: string, options?: Models.TaskListOptionalParams): Promise; /** - * @param jobId The ID of the job. + * @param jobId The ID of the Job. * @param callback The callback */ list(jobId: string, callback: msRest.ServiceCallback): void; /** - * @param jobId The ID of the job. + * @param jobId The ID of the Job. * @param options The optional parameters * @param callback The callback */ @@ -92,43 +92,43 @@ export class Task { } /** - * Note that each task must have a unique ID. The Batch service may not return the results for each - * task in the same order the tasks were submitted in this request. If the server times out or the + * Note that each Task must have a unique ID. The Batch service may not return the results for each + * Task in the same order the Tasks were submitted in this request. If the server times out or the * connection is closed during the request, the request may have been partially or fully processed, * or not at all. In such cases, the user should re-issue the request. Note that it is up to the * user to correctly handle failures when re-issuing a request. For example, you should use the - * same task IDs during a retry so that if the prior operation succeeded, the retry will not create - * extra tasks unexpectedly. If the response contains any tasks which failed to add, a client can - * retry the request. In a retry, it is most efficient to resubmit only tasks that failed to add, - * and to omit tasks that were successfully added on the first attempt. The maximum lifetime of a - * task from addition to completion is 180 days. If a task has not completed within 180 days of + * same Task IDs during a retry so that if the prior operation succeeded, the retry will not create + * extra Tasks unexpectedly. If the response contains any Tasks which failed to add, a client can + * retry the request. In a retry, it is most efficient to resubmit only Tasks that failed to add, + * and to omit Tasks that were successfully added on the first attempt. The maximum lifetime of a + * Task from addition to completion is 180 days. If a Task has not completed within 180 days of * being added it will be terminated by the Batch service and left in whatever state it was in at * that time. - * @summary Adds a collection of tasks to the specified job. - * @param jobId The ID of the job to which the task collection is to be added. - * @param value The collection of tasks to add. The maximum count of tasks is 100. The total + * @summary Adds a collection of Tasks to the specified Job. + * @param jobId The ID of the Job to which the Task collection is to be added. + * @param value The collection of Tasks to add. The maximum count of Tasks is 100. The total * serialized size of this collection must be less than 1MB. If it is greater than 1MB (for example - * if each task has 100's of resource files or environment variables), the request will fail with - * code 'RequestBodyTooLarge' and should be retried again with fewer tasks. + * if each Task has 100's of resource files or environment variables), the request will fail with + * code 'RequestBodyTooLarge' and should be retried again with fewer Tasks. * @param [options] The optional parameters * @returns Promise */ addCollection(jobId: string, value: Models.TaskAddParameter[], options?: Models.TaskAddCollectionOptionalParams): Promise; /** - * @param jobId The ID of the job to which the task collection is to be added. - * @param value The collection of tasks to add. The maximum count of tasks is 100. The total + * @param jobId The ID of the Job to which the Task collection is to be added. + * @param value The collection of Tasks to add. The maximum count of Tasks is 100. The total * serialized size of this collection must be less than 1MB. If it is greater than 1MB (for example - * if each task has 100's of resource files or environment variables), the request will fail with - * code 'RequestBodyTooLarge' and should be retried again with fewer tasks. + * if each Task has 100's of resource files or environment variables), the request will fail with + * code 'RequestBodyTooLarge' and should be retried again with fewer Tasks. * @param callback The callback */ addCollection(jobId: string, value: Models.TaskAddParameter[], callback: msRest.ServiceCallback): void; /** - * @param jobId The ID of the job to which the task collection is to be added. - * @param value The collection of tasks to add. The maximum count of tasks is 100. The total + * @param jobId The ID of the Job to which the Task collection is to be added. + * @param value The collection of Tasks to add. The maximum count of Tasks is 100. The total * serialized size of this collection must be less than 1MB. If it is greater than 1MB (for example - * if each task has 100's of resource files or environment variables), the request will fail with - * code 'RequestBodyTooLarge' and should be retried again with fewer tasks. + * if each Task has 100's of resource files or environment variables), the request will fail with + * code 'RequestBodyTooLarge' and should be retried again with fewer Tasks. * @param options The optional parameters * @param callback The callback */ @@ -145,26 +145,26 @@ export class Task { } /** - * When a task is deleted, all of the files in its directory on the compute node where it ran are - * also deleted (regardless of the retention time). For multi-instance tasks, the delete task + * When a Task is deleted, all of the files in its directory on the Compute Node where it ran are + * also deleted (regardless of the retention time). For multi-instance Tasks, the delete Task * operation applies synchronously to the primary task; subtasks and their files are then deleted * asynchronously in the background. - * @summary Deletes a task from the specified job. - * @param jobId The ID of the job from which to delete the task. - * @param taskId The ID of the task to delete. + * @summary Deletes a Task from the specified Job. + * @param jobId The ID of the Job from which to delete the Task. + * @param taskId The ID of the Task to delete. * @param [options] The optional parameters * @returns Promise */ deleteMethod(jobId: string, taskId: string, options?: Models.TaskDeleteMethodOptionalParams): Promise; /** - * @param jobId The ID of the job from which to delete the task. - * @param taskId The ID of the task to delete. + * @param jobId The ID of the Job from which to delete the Task. + * @param taskId The ID of the Task to delete. * @param callback The callback */ deleteMethod(jobId: string, taskId: string, callback: msRest.ServiceCallback): void; /** - * @param jobId The ID of the job from which to delete the task. - * @param taskId The ID of the task to delete. + * @param jobId The ID of the Job from which to delete the Task. + * @param taskId The ID of the Task to delete. * @param options The optional parameters * @param callback The callback */ @@ -181,24 +181,24 @@ export class Task { } /** - * For multi-instance tasks, information such as affinityId, executionInfo and nodeInfo refer to - * the primary task. Use the list subtasks API to retrieve information about subtasks. - * @summary Gets information about the specified task. - * @param jobId The ID of the job that contains the task. - * @param taskId The ID of the task to get information about. + * For multi-instance Tasks, information such as affinityId, executionInfo and nodeInfo refer to + * the primary Task. Use the list subtasks API to retrieve information about subtasks. + * @summary Gets information about the specified Task. + * @param jobId The ID of the Job that contains the Task. + * @param taskId The ID of the Task to get information about. * @param [options] The optional parameters * @returns Promise */ get(jobId: string, taskId: string, options?: Models.TaskGetOptionalParams): Promise; /** - * @param jobId The ID of the job that contains the task. - * @param taskId The ID of the task to get information about. + * @param jobId The ID of the Job that contains the Task. + * @param taskId The ID of the Task to get information about. * @param callback The callback */ get(jobId: string, taskId: string, callback: msRest.ServiceCallback): void; /** - * @param jobId The ID of the job that contains the task. - * @param taskId The ID of the task to get information about. + * @param jobId The ID of the Job that contains the Task. + * @param taskId The ID of the Task to get information about. * @param options The optional parameters * @param callback The callback */ @@ -215,22 +215,22 @@ export class Task { } /** - * Updates the properties of the specified task. - * @param jobId The ID of the job containing the task. - * @param taskId The ID of the task to update. + * Updates the properties of the specified Task. + * @param jobId The ID of the Job containing the Task. + * @param taskId The ID of the Task to update. * @param [options] The optional parameters * @returns Promise */ update(jobId: string, taskId: string, options?: Models.TaskUpdateOptionalParams): Promise; /** - * @param jobId The ID of the job containing the task. - * @param taskId The ID of the task to update. + * @param jobId The ID of the Job containing the Task. + * @param taskId The ID of the Task to update. * @param callback The callback */ update(jobId: string, taskId: string, callback: msRest.ServiceCallback): void; /** - * @param jobId The ID of the job containing the task. - * @param taskId The ID of the task to update. + * @param jobId The ID of the Job containing the Task. + * @param taskId The ID of the Task to update. * @param options The optional parameters * @param callback The callback */ @@ -247,23 +247,23 @@ export class Task { } /** - * If the task is not a multi-instance task then this returns an empty collection. - * @summary Lists all of the subtasks that are associated with the specified multi-instance task. - * @param jobId The ID of the job. - * @param taskId The ID of the task. + * If the Task is not a multi-instance Task then this returns an empty collection. + * @summary Lists all of the subtasks that are associated with the specified multi-instance Task. + * @param jobId The ID of the Job. + * @param taskId The ID of the Task. * @param [options] The optional parameters * @returns Promise */ listSubtasks(jobId: string, taskId: string, options?: Models.TaskListSubtasksOptionalParams): Promise; /** - * @param jobId The ID of the job. - * @param taskId The ID of the task. + * @param jobId The ID of the Job. + * @param taskId The ID of the Task. * @param callback The callback */ listSubtasks(jobId: string, taskId: string, callback: msRest.ServiceCallback): void; /** - * @param jobId The ID of the job. - * @param taskId The ID of the task. + * @param jobId The ID of the Job. + * @param taskId The ID of the Task. * @param options The optional parameters * @param callback The callback */ @@ -280,25 +280,25 @@ export class Task { } /** - * When the task has been terminated, it moves to the completed state. For multi-instance tasks, - * the terminate task operation applies synchronously to the primary task; subtasks are then + * When the Task has been terminated, it moves to the completed state. For multi-instance Tasks, + * the terminate Task operation applies synchronously to the primary task; subtasks are then * terminated asynchronously in the background. - * @summary Terminates the specified task. - * @param jobId The ID of the job containing the task. - * @param taskId The ID of the task to terminate. + * @summary Terminates the specified Task. + * @param jobId The ID of the Job containing the Task. + * @param taskId The ID of the Task to terminate. * @param [options] The optional parameters * @returns Promise */ terminate(jobId: string, taskId: string, options?: Models.TaskTerminateOptionalParams): Promise; /** - * @param jobId The ID of the job containing the task. - * @param taskId The ID of the task to terminate. + * @param jobId The ID of the Job containing the Task. + * @param taskId The ID of the Task to terminate. * @param callback The callback */ terminate(jobId: string, taskId: string, callback: msRest.ServiceCallback): void; /** - * @param jobId The ID of the job containing the task. - * @param taskId The ID of the task to terminate. + * @param jobId The ID of the Job containing the Task. + * @param taskId The ID of the Task to terminate. * @param options The optional parameters * @param callback The callback */ @@ -315,29 +315,29 @@ export class Task { } /** - * Reactivation makes a task eligible to be retried again up to its maximum retry count. The task's - * state is changed to active. As the task is no longer in the completed state, any previous exit - * code or failure information is no longer available after reactivation. Each time a task is - * reactivated, its retry count is reset to 0. Reactivation will fail for tasks that are not + * Reactivation makes a Task eligible to be retried again up to its maximum retry count. The Task's + * state is changed to active. As the Task is no longer in the completed state, any previous exit + * code or failure information is no longer available after reactivation. Each time a Task is + * reactivated, its retry count is reset to 0. Reactivation will fail for Tasks that are not * completed or that previously completed successfully (with an exit code of 0). Additionally, it - * will fail if the job has completed (or is terminating or deleting). - * @summary Reactivates a task, allowing it to run again even if its retry count has been + * will fail if the Job has completed (or is terminating or deleting). + * @summary Reactivates a Task, allowing it to run again even if its retry count has been * exhausted. - * @param jobId The ID of the job containing the task. - * @param taskId The ID of the task to reactivate. + * @param jobId The ID of the Job containing the Task. + * @param taskId The ID of the Task to reactivate. * @param [options] The optional parameters * @returns Promise */ reactivate(jobId: string, taskId: string, options?: Models.TaskReactivateOptionalParams): Promise; /** - * @param jobId The ID of the job containing the task. - * @param taskId The ID of the task to reactivate. + * @param jobId The ID of the Job containing the Task. + * @param taskId The ID of the Task to reactivate. * @param callback The callback */ reactivate(jobId: string, taskId: string, callback: msRest.ServiceCallback): void; /** - * @param jobId The ID of the job containing the task. - * @param taskId The ID of the task to reactivate. + * @param jobId The ID of the Job containing the Task. + * @param taskId The ID of the Task to reactivate. * @param options The optional parameters * @param callback The callback */ @@ -354,9 +354,9 @@ export class Task { } /** - * For multi-instance tasks, information such as affinityId, executionInfo and nodeInfo refer to - * the primary task. Use the list subtasks API to retrieve information about subtasks. - * @summary Lists all of the tasks that are associated with the specified job. + * For multi-instance Tasks, information such as affinityId, executionInfo and nodeInfo refer to + * the primary Task. Use the list subtasks API to retrieve information about subtasks. + * @summary Lists all of the Tasks that are associated with the specified Job. * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters * @returns Promise @@ -416,7 +416,8 @@ const addOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.TaskAddHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.TaskAddHeaders } }, serializer @@ -449,7 +450,8 @@ const listOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.TaskListHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.TaskListHeaders } }, serializer @@ -488,7 +490,8 @@ const addCollectionOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.TaskAddCollectionHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.TaskAddCollectionHeaders } }, serializer @@ -521,7 +524,8 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.TaskDeleteHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.TaskDeleteHeaders } }, serializer @@ -557,7 +561,8 @@ const getOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.TaskGetHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.TaskGetHeaders } }, serializer @@ -603,7 +608,8 @@ const updateOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.TaskUpdateHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.TaskUpdateHeaders } }, serializer @@ -634,7 +640,8 @@ const listSubtasksOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.TaskListSubtasksHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.TaskListSubtasksHeaders } }, serializer @@ -667,7 +674,8 @@ const terminateOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.TaskTerminateHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.TaskTerminateHeaders } }, serializer @@ -700,7 +708,8 @@ const reactivateOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.TaskReactivateHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.TaskReactivateHeaders } }, serializer @@ -725,7 +734,8 @@ const listNextOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.TaskListHeaders }, default: { - bodyMapper: Mappers.BatchError + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.TaskListHeaders } }, serializer diff --git a/sdk/batch/batch/test/batchClient.spec.ts b/sdk/batch/batch/test/batchClient.spec.ts new file mode 100644 index 000000000000..7e693716f037 --- /dev/null +++ b/sdk/batch/batch/test/batchClient.spec.ts @@ -0,0 +1,1280 @@ +/* eslint-disable @typescript-eslint/no-non-null-assertion */ +import { + BatchServiceClient, + BatchSharedKeyCredentials, + BatchServiceModels +} from "../src/batchIndex"; +import { describe, beforeEach } from "mocha"; +import { assert } from "chai"; +import { v4 as uuid } from "uuid"; +import * as dotenv from "dotenv"; +import { duration } from "moment"; +import { AuthenticationContext, TokenResponse } from "adal-node"; +import { TokenCredentials } from "@azure/ms-rest-js"; +import { AccountListPoolNodeCountsResponse, TaskGetResponse } from "../src/models"; + +dotenv.config(); +const wait = (timeout = 1000) => new Promise((resolve) => setTimeout(() => resolve(), timeout)); + +describe("Batch Service", () => { + let client: BatchServiceClient; + let batchAccountName: string; + let batchAccountKey: string; + let batchEndpoint: string; + let clientId: string; + let secret: string; + let certThumb: string; + let nonAdminPoolUser: string; + let compute_nodes: string[]; + + const readStreamToBuffer = function( + strm: NodeJS.ReadableStream, + callback: (_a: any, buf: Buffer) => void + ) { + const bufs: any[] = []; + strm.on("data", function(d) { + bufs.push(d); + }); + strm.on("end", function() { + callback(null, Buffer.concat(bufs)); + }); + }; + + beforeEach(async () => { + batchAccountName = process.env["AZURE_BATCH_ACCOUNT_NAME"]!; + batchAccountKey = process.env["AZURE_BATCH_ACCOUNT_KEY"]!; + batchEndpoint = process.env["AZURE_BATCH_ENDPOINT"]!; + clientId = process.env["AZURE_CLIENT_ID"]!; + secret = process.env["AZURE_CLIENT_SECRET"]!; + + // dummy thumb + certThumb = "cff2ab63c8c955aaf71989efa641b906558d9fb7"; + nonAdminPoolUser = "nonAdminUser"; + const creds = new BatchSharedKeyCredentials(batchAccountName, batchAccountKey); + + client = new BatchServiceClient(creds, batchEndpoint); + }); + + describe("operations", () => { + it("should list supported images successfully", async () => { + const result = await client.account.listSupportedImages(); + assert.isAtLeast(result.length, 1); + const supportedImage = result[0]; + assert.equal(supportedImage.nodeAgentSKUId, "batch.node.centos 7"); + assert.equal(supportedImage.osType, "linux"); + assert.equal(result._response.status, 200); + }); + + it("should add new certificate successfully", async () => { + const cert: BatchServiceModels.CertificateAddParameter = { + thumbprint: certThumb, + thumbprintAlgorithm: "sha1", + password: "nodesdk", + certificateFormat: "pfx", + data: + "MIIGMQIBAzCCBe0GCSqGSIb3DQEHAaCCBd4EggXaMIIF1jCCA8AGCSqGSIb3DQEHAaCCA7EEggOtMIIDqTCCA6UGCyqGSIb3DQEMCgECoIICtjCCArIwHAYKKoZIhvcNAQwBAzAOBAhyd3xCtln3iQICB9AEggKQhe5P10V9iV1BsDlwWT561Yu2hVq3JT8ae/ebx1ZR/gMApVereDKkS9Zg4vFyssusHebbK5pDpU8vfAqle0TM4m7wGsRj453ZorSPUfMpHvQnAOn+2pEpWdMThU7xvZ6DVpwhDOQk9166z+KnKdHGuJKh4haMT7Rw/6xZ1rsBt2423cwTrQVMQyACrEkianpuujubKltN99qRoFAxhQcnYE2KlYKw7lRcExq6mDSYAyk5xJZ1ZFdLj6MAryZroQit/0g5eyhoNEKwWbi8px5j71pRTf7yjN+deMGQKwbGl+3OgaL1UZ5fCjypbVL60kpIBxLZwIJ7p3jJ+q9pbq9zSdzshPYor5lxyUfXqaso/0/91ayNoBzg4hQGh618PhFI6RMGjwkzhB9xk74iweJ9HQyIHf8yx2RCSI22JuCMitPMWSGvOszhbNx3AEDLuiiAOHg391mprEtKZguOIr9LrJwem/YmcHbwyz5YAbZmiseKPkllfC7dafFfCFEkj6R2oegIsZo0pEKYisAXBqT0g+6/jGwuhlZcBo0f7UIZm88iA3MrJCjlXEgV5OcQdoWj+hq0lKEdnhtCKr03AIfukN6+4vjjarZeW1bs0swq0l3XFf5RHa11otshMS4mpewshB9iO9MuKWpRxuxeng4PlKZ/zuBqmPeUrjJ9454oK35Pq+dghfemt7AUpBH/KycDNIZgfdEWUZrRKBGnc519C+RTqxyt5hWL18nJk4LvSd3QKlJ1iyJxClhhb/NWEzPqNdyA5cxen+2T9bd/EqJ2KzRv5/BPVwTQkHH9W/TZElFyvFfOFIW2+03RKbVGw72Mr/0xKZ+awAnEfoU+SL/2Gj2m6PHkqFX2sOCi/tN9EA4xgdswEwYJKoZIhvcNAQkVMQYEBAEAAAAwXQYJKwYBBAGCNxEBMVAeTgBNAGkAYwByAG8AcwBvAGYAdAAgAFMAdAByAG8AbgBnACAAQwByAHkAcAB0AG8AZwByAGEAcABoAGkAYwAgAFAAcgBvAHYAaQBkAGUAcjBlBgkqhkiG9w0BCRQxWB5WAFAAdgBrAFQAbQBwADoANABjAGUANgAwADQAZABhAC0AMAA2ADgAMQAtADQANAAxADUALQBhADIAYwBhAC0ANQA3ADcAMwAwADgAZQA2AGQAOQBhAGMwggIOBgkqhkiG9w0BBwGgggH/BIIB+zCCAfcwggHzBgsqhkiG9w0BDAoBA6CCAcswggHHBgoqhkiG9w0BCRYBoIIBtwSCAbMwggGvMIIBXaADAgECAhAdka3aTQsIsUphgIXGUmeRMAkGBSsOAwIdBQAwFjEUMBIGA1UEAxMLUm9vdCBBZ2VuY3kwHhcNMTYwMTAxMDcwMDAwWhcNMTgwMTAxMDcwMDAwWjASMRAwDgYDVQQDEwdub2Rlc2RrMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC5fhcxbJHxxBEIDzVOMc56s04U6k4GPY7yMR1m+rBGVRiAyV4RjY6U936dqXHCVD36ps2Q0Z+OeEgyCInkIyVeB1EwXcToOcyeS2YcUb0vRWZDouC3tuFdHwiK1Ed5iW/LksmXDotyV7kpqzaPhOFiMtBuMEwNJcPge9k17hRgRQIDAQABo0swSTBHBgNVHQEEQDA+gBAS5AktBh0dTwCNYSHcFmRjoRgwFjEUMBIGA1UEAxMLUm9vdCBBZ2VuY3mCEAY3bACqAGSKEc+41KpcNfQwCQYFKw4DAh0FAANBAHl2M97QbpzdnwO5HoRBsiEExOcLTNg+GKCr7HUsbzfvrUivw+JLL7qjHAIc5phnK+F5bQ8HKe0L9YXBSKl+fvwxFTATBgkqhkiG9w0BCRUxBgQEAQAAADA7MB8wBwYFKw4DAhoEFGVtyGMqiBd32fGpzlGZQoRM6UQwBBTI0YHFFqTS4Go8CoLgswn29EiuUQICB9A=" + }; + + const result = await client.certificate.add(cert); + assert.equal(result._response.status, 201); + }); + + it("should list certificates successfully", async () => { + const result = await client.certificate.list(); + assert.isAtLeast(result.length, 1); + assert.equal(result[0].thumbprint, certThumb); + assert.equal(result[0].thumbprintAlgorithm, "sha1"); + assert.equal(result._response.status, 200); + }); + + it("should get certificate reference successfully", async () => { + const result = await client.certificate.get("sha1", certThumb); + assert.equal(result.thumbprint, certThumb); + assert.equal(result.thumbprintAlgorithm, "sha1"); + assert.equal(result._response.status, 200); + }); + + it("should create a new pool successfully", async () => { + const pool: BatchServiceModels.PoolAddParameter = { + id: "nodesdktestpool1", + vmSize: "small", + cloudServiceConfiguration: { osFamily: "4" }, + targetDedicatedNodes: 3, + certificateReferences: [{ thumbprint: certThumb, thumbprintAlgorithm: "sha1" }], + // Ensures there's a compute node file we can reference later + startTask: { commandLine: "cmd /c echo hello > hello.txt" }, + // Sets up pool user we can reference later + userAccounts: [ + { + name: nonAdminPoolUser, + password: uuid(), + elevationLevel: "nonadmin" + } + ] + }; + + const result = await client.pool.add(pool); + assert.equal(result._response.status, 201); + + await wait(); + }); + + it("should update pool parameters successfully", async () => { + const options: BatchServiceModels.PoolUpdatePropertiesParameter = { + metadata: [{ name: "foo", value: "bar" }], + certificateReferences: [], + applicationPackageReferences: [], + // Ensures the start task isn't cleared + startTask: { commandLine: "cmd /c echo hello > hello.txt" } + }; + + const result = await client.pool.updateProperties("nodesdktestpool1", options); + assert.equal(result._response.status, 204); + }); + + it("should patch pool parameters successfully", async () => { + const options: BatchServiceModels.PoolPatchParameter = { + metadata: [ + { + name: "foo2", + value: "bar2" + } + ] + }; + + const result = await client.pool.patch("nodesdktestpool1", options); + assert.equal(result._response.status, 200); + await wait(); + }); + + it("should get a pool reference successfully", async () => { + let result, metadata; + while (true) { + result = await client.pool.get("nodesdktestpool1"); + metadata = result.metadata![0]; + if (result.allocationState === "resizing") { + await wait(10000); + } else { + break; + } + } + + assert.equal(result.id, "nodesdktestpool1"); + assert.equal(result.state, "active"); + assert.equal(result.allocationState, "steady"); + assert.isDefined(result.cloudServiceConfiguration); + assert.equal(result.cloudServiceConfiguration!.osFamily, "4"); + assert.equal(result.vmSize, "small"); + + assert.equal(metadata.name, "foo2"); + assert.equal(metadata.value, "bar2"); + + assert.isDefined(result.startTask); + assert.equal(result.startTask!.commandLine, "cmd /c echo hello > hello.txt"); + + assert.lengthOf(result.userAccounts!, 1); + assert.equal(result.userAccounts![0].name, nonAdminPoolUser); + assert.equal(result.userAccounts![0].elevationLevel, "nonadmin"); + assert.equal(result._response.status, 200); + }).timeout(1000000); + + it("should get a pool reference with odata successfully", async () => { + const options: BatchServiceModels.PoolGetOptionalParams = { + poolGetOptions: { select: "id,state", expand: "stats" } + }; + + const result = await client.pool.get("nodesdktestpool1", options); + assert.equal(result.id, "nodesdktestpool1"); + assert.equal(result.state, "active"); + assert.isUndefined(result.allocationState); + assert.isUndefined(result.vmSize); + assert.equal(result._response.status, 200); + }); + + it("should perform AAD authentication successfully", (done) => { + const verifyAadAuth = function(token: string, callback: any) { + const tokenCreds = new TokenCredentials(token, "Bearer"); + const aadClient = new BatchServiceClient(tokenCreds, batchEndpoint); + aadClient.account.listSupportedImages(function(err, result, request, response) { + assert.isNull(err); + assert.isDefined(result); + assert.isAtLeast(result!.length, 1); + assert.equal(response!.status, 200); + assert.isDefined(request!.headers.get("authorization")); + assert.equal(request!.headers.get("authorization"), "Bearer " + token); + callback(); + }); + }; + + // if (!suite.isPlayback) { + const authContext = new AuthenticationContext( + "https://login.microsoftonline.com/microsoft.onmicrosoft.com" + ); + + authContext.acquireTokenWithClientCredentials( + "https://batch.core.windows.net/", + clientId, + secret, + function(err, tokenResponse) { + assert.isNull(err); + assert.isDefined(tokenResponse); + assert.isDefined((tokenResponse as TokenResponse).accessToken); + verifyAadAuth((tokenResponse as TokenResponse).accessToken, done); + } + ); + // } else { + // verifyAadAuth("dummy token", done); + // } + }); + + it("should add a pool with vnet and get expected error", async () => { + const pool: BatchServiceModels.PoolAddParameter = { + id: "nodesdkvnetpool", + vmSize: "small", + cloudServiceConfiguration: { osFamily: "4" }, + targetDedicatedNodes: 0, + networkConfiguration: { + subnetId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1" + } + }; + + try { + await client.pool.add(pool); + assert.fail("Expected error to be thrown"); + } catch (error) { + assert.equal(error.statusCode, 403); + assert.equal(error.body.code, "Forbidden"); + } + }); + + it("should add a pool with a custom image and get expected error", async () => { + const pool: BatchServiceModels.PoolAddParameter = { + id: "nodesdkimagepool", + vmSize: "Standard_A1", + virtualMachineConfiguration: { + imageReference: { + virtualMachineImageId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test/providers/Microsoft.Compute/images/FakeImage" + }, + nodeAgentSKUId: "batch.node.ubuntu 16.04" + }, + targetDedicatedNodes: 0 + }; + + try { + await client.pool.add(pool); + assert.fail("Expected error to be thrown"); + } catch (error) { + assert.equal(error.statusCode, 400); + assert.equal(error.body.code, "InvalidPropertyValue"); + assert.equal(error.body.values[0].value, "virtualMachineImageId"); + } + }); + + it("should add a pool with a Data Disk", async () => { + const pool: BatchServiceModels.PoolAddParameter = { + id: "nodesdkdatadiskpool", + vmSize: "Standard_A1", + virtualMachineConfiguration: { + imageReference: { + publisher: "Canonical", + offer: "UbuntuServer", + sku: "16.04-LTS" + }, + nodeAgentSKUId: "batch.node.ubuntu 16.04", + dataDisks: [ + { + lun: 1, + diskSizeGB: 50 + } + ] + }, + targetDedicatedNodes: 0 + }; + + const resultAdd = await client.pool.add(pool); + assert.equal(resultAdd._response.status, 201); + + await wait(5000); + + const retultGet = await client.pool.get(pool.id); + assert.equal(retultGet.virtualMachineConfiguration!.dataDisks![0].lun, 1); + assert.equal(retultGet.virtualMachineConfiguration!.dataDisks![0].diskSizeGB, 50); + + const resultDelete = await client.pool.deleteMethod(pool.id); + assert.equal(resultDelete._response.status, 202); + }); + + it("should add a pool with inbound endpoint configuration successfully", async () => { + const pool: BatchServiceModels.PoolAddParameter = { + id: "nodesdkinboundendpointpool", + vmSize: "Standard_A1", + networkConfiguration: { + endpointConfiguration: { + inboundNATPools: [ + { + name: "TestEndpointConfig", + protocol: "udp", + backendPort: 64444, + frontendPortRangeStart: 60000, + frontendPortRangeEnd: 61000, + networkSecurityGroupRules: [ + { + priority: 150, + access: "allow", + sourceAddressPrefix: "*" + } + ] + } + ] + } + }, + virtualMachineConfiguration: { + nodeAgentSKUId: "batch.node.ubuntu 16.04", + imageReference: { + publisher: "Canonical", + offer: "UbuntuServer", + sku: "16.04-LTS" + } + }, + targetDedicatedNodes: 1 + }; + + const result = await client.pool.add(pool); + + assert.equal(result._response.status, 201); + }); + + it("should get the details of a pool with endpoint configuration successfully", async () => { + let result; + while (true) { + result = await client.computeNode.list("nodesdkinboundendpointpool"); + if (result.length > 0) { + break; + } else { + await wait(5000); + } + } + assert.lengthOf(result, 1); + assert.isDefined(result[0].endpointConfiguration); + assert.lengthOf(result[0].endpointConfiguration!.inboundEndpoints, 2); + assert.equal( + result[0].endpointConfiguration!.inboundEndpoints[0].name, + "TestEndpointConfig.0" + ); + assert.equal(result[0].endpointConfiguration!.inboundEndpoints[0].protocol, "udp"); + }); + + it("should get pool node counts successfully", async () => { + let result: AccountListPoolNodeCountsResponse; + while (true) { + result = await client.account.listPoolNodeCounts(); + if (result.length > 0 && result[0].dedicated!.idle > 0) { + break; + } else { + await wait(10000); + } + } + assert.lengthOf(result, 2); + assert.equal(result[0].poolId, "nodesdkinboundendpointpool"); + assert.equal(result[0].dedicated!.idle, 1); + assert.equal(result[0].lowPriority!.total, 0); + assert.equal(result._response.status, 200); + }).timeout(1000000); + + it("should list compute nodes successfully", async () => { + let result; + while (true) { + result = await client.computeNode.list("nodesdktestpool1"); + if (result.length > 0 && result[0].state === "starting") { + await wait(10000); + } else { + break; + } + } + assert.isAtLeast(result.length, 1); + assert.equal(result[0].state, "idle"); + assert.equal(result[0].schedulingState, "enabled"); + assert.isTrue(result[0].isDedicated); + assert.equal(result._response.status, 200); + compute_nodes = result.map(function(x) { + return x.id!; + }); + }).timeout(1000000); + + it("should get a compute node reference", async () => { + const result = await client.computeNode.get("nodesdktestpool1", compute_nodes[0]); + assert.equal(result.id, compute_nodes[0]); + assert.equal(result.state, "idle"); + assert.equal(result.schedulingState, "enabled"); + assert.equal(result._response.status, 200); + }); + + it("should get a compute node reference", async () => { + const result = await client.computeNode.get("nodesdktestpool1", compute_nodes[0]); + + assert.equal(result.id, compute_nodes[0]); + assert.equal(result.state, "idle"); + assert.equal(result.schedulingState, "enabled"); + assert.equal(result._response.status, 200); + }); + + it("should add a user to a compute node successfully", async () => { + const options = { name: "NodeSDKTestUser", isAdmin: false, password: "kt#_gahr!@aGERDXA" }; + const result = await client.computeNode.addUser( + "nodesdktestpool1", + compute_nodes[0], + options + ); + + assert.equal(result._response.status, 201); + }); + + it("should update a compute node user successfully", async () => { + const options = { password: "liilef#$DdRGSa_ewkjh" }; + const result = await client.computeNode.updateUser( + "nodesdktestpool1", + compute_nodes[0], + "NodeSDKTestUser", + options + ); + + assert.equal(result._response.status, 200); + }); + + it("should get a remote desktop file successfully", (done) => { + client.computeNode + .getRemoteDesktop("nodesdktestpool1", compute_nodes[0]) + .then((result) => { + assert.equal(result._response.status, 200); + readStreamToBuffer(result.readableStreamBody!, function(_err, buff) { + assert.isAtLeast(buff.length, 1); + done(); + }); + }) + .catch((error) => { + assert.fail(error); + }); + }); + + it("should delete a compute node user successfully", async () => { + const result = await client.computeNode.deleteUser( + "nodesdktestpool1", + compute_nodes[0], + "NodeSDKTestUser" + ); + + assert.equal(result._response.status, 200); + }); + + it("should disable scheduling on a compute node successfully", async () => { + while (true) { + try { + const result = await client.computeNode.disableScheduling( + "nodesdktestpool1", + compute_nodes[1] + ); + assert.equal(result._response.status, 200); + break; + } catch (e) { + if (e.code === "NodeNotReady") { + await wait(5000); + } else { + throw e; + } + } + } + }); + + it("should enable scheduling on a compute node successfully", async () => { + const result = await client.computeNode.enableScheduling( + "nodesdktestpool1", + compute_nodes[1] + ); + + assert.equal(result._response.status, 200); + }); + + it("should reboot a compute node successfully", async () => { + const result = await client.computeNode.reboot("nodesdktestpool1", compute_nodes[0]); + + assert.equal(result._response.status, 202); + }); + + it("should reimage a compute node successfully", async () => { + const result = await client.computeNode.reimage("nodesdktestpool1", compute_nodes[1]); + + assert.equal(result._response.status, 202); + }); + + it("should upload pool node logs at paas pool", async () => { + const container = "https://teststorage.blob.core.windows.net/fakecontainer"; + const config: BatchServiceModels.UploadBatchServiceLogsConfiguration = { + containerUrl: container, + startTime: new Date("2018-02-25T00:00:00.00") + }; + const result = await client.computeNode.uploadBatchServiceLogs( + "nodesdktestpool1", + compute_nodes[2], + config + ); + + assert.equal(result._response.status, 200); + assert.isAtLeast(result.numberOfFilesUploaded, 1); + }); + + it("should enable autoscale successfully", async () => { + const model: BatchServiceModels.PoolEnableAutoScaleParameter = { + autoScaleFormula: "$TargetDedicatedNodes=2", + autoScaleEvaluationInterval: duration({ minutes: 6 }).toISOString() + }; + + const result = await client.pool.enableAutoScale("nodesdktestpool1", model); + + assert.equal(result._response.status, 200); + }); + + it("should evaluate pool autoscale successfully", async () => { + const result = await client.pool.evaluateAutoScale( + "nodesdktestpool1", + "$TargetDedicatedNodes=3" + ); + + assert.equal( + result.results, + "$TargetDedicatedNodes=3;$TargetLowPriorityNodes=0;$NodeDeallocationOption=requeue" + ); + assert.equal(result._response.status, 200); + }); + + it("should fail to evaluate invalid autoscale formula", async () => { + const result = await client.pool.evaluateAutoScale("nodesdktestpool1", "something_useless"); + + assert.equal( + result.results, + "$TargetDedicatedNodes=2;$TargetLowPriorityNodes=0;$NodeDeallocationOption=requeue" + ); + assert.equal(result._response.status, 200); + }); + + it("should disable autoscale successfully", async () => { + const result = await client.pool.disableAutoScale("nodesdktestpool1"); + + assert.equal(result._response.status, 200); + }); + + it("should create a second pool successfully", async () => { + const pool = { + id: "nodesdktestpool2", + vmSize: "small", + cloudServiceConfiguration: { osFamily: "4" } + }; + const result = await client.pool.add(pool); + + assert.equal(result._response.status, 201); + }); + + it("should list pools without filters", async () => { + const result = await client.pool.list(); + + assert.isAtLeast(result.length, 2); + assert.equal(result._response.status, 200); + }); + + it("should list a maximum number of pools", async () => { + const options = { poolListOptions: { maxResults: 1 } }; + let result = await client.pool.list(options); + + assert.lengthOf(result, 1); + assert.equal(result._response.status, 200); + result = await client.pool.listNext(result.odatanextLink!); + + assert.lengthOf(result, 1); + assert.equal(result._response.status, 200); + }); + + it("should fail to list pools with invalid max", async () => { + const options = { poolListOptions: { maxResults: -5 } }; + client.pool.list(options, function(err, result) { + assert.equal( + err!.message, + '"options.poolListOptions.maxResults" with value "-5" should satisfy the constraint "InclusiveMinimum": 1.' + ); + }); + }); + + it("should list pools according to filter", async () => { + const options = { + poolListOptions: { + filter: "startswith(id,'nodesdktestpool1')", + select: "id,state", + expand: "stats" + } + }; + const result = await client.pool.list(options); + + assert.lengthOf(result, 1); + assert.equal(result[0].id, "nodesdktestpool1"); + assert.equal(result[0].state, "active"); + assert.isUndefined(result[0].allocationState); + assert.isUndefined(result[0].vmSize); + assert.equal(result._response.status, 200); + }); + + it("should check that pool exists successfully", async () => { + const result = await client.pool.exists("nodesdktestpool1"); + + assert.isTrue(result.body); + assert.equal(result._response.status, 200); + }); + + it("should start pool resizing successfully", async () => { + const options = { targetDedicatedNodes: 3, targetLowPriorityNodes: 2 }; + const result = await client.pool.resize("nodesdktestpool2", options); + + assert.equal(result._response.status, 202); + }); + + it("should stop pool resizing successfully", async () => { + const result = await client.pool.stopResize("nodesdktestpool2"); + + assert.equal(result._response.status, 202); + }); + + it("should get pool lifetime statistics", async () => { + const result = await client.pool.getAllLifetimeStatistics(); + + assert.isDefined(result.usageStats); + assert.isDefined(result.resourceStats); + assert.equal(result._response.status, 200); + }); + + it("should list pools usage metrics", async () => { + const result = await client.pool.listUsageMetrics(); + + assert.isAtLeast(result.length, 1); + assert.equal(result._response.status, 200); + }); + + it("should create a job successfully", async () => { + const options = { id: "HelloWorldJobNodeSDKTest", poolInfo: { poolId: "nodesdktestpool1" } }; + const result = await client.job.add(options); + + assert.equal(result._response.status, 201); + }); + + it("should update a job successfully", async () => { + const options = { + priority: 500, + constraints: { maxTaskRetryCount: 3 }, + poolInfo: { poolId: "nodesdktestpool1" } + }; + const result = await client.job.update("HelloWorldJobNodeSDKTest", options); + + assert.equal(result._response.status, 200); + }); + + it("should patch a job successfully", async () => { + const options = { + priority: 500, + constraints: { maxTaskRetryCount: 3 }, + poolInfo: { poolId: "nodesdktestpool1" } + }; + const result = await client.job.update("HelloWorldJobNodeSDKTest", options); + + assert.equal(result._response.status, 200); + }); + + it("should create a task with container settings successfully", async () => { + const options = { + id: "ContainerJobNodeSDKTest", + poolInfo: { poolId: "nodesdkinboundendpointpool" } + }; + const result1 = await client.job.add(options); + assert.equal(result1._response.status, 201); + const task = { + id: "ContainerNodeSDKTestTask", + commandLine: "cat /etc/centos-release", + containerSettings: { imageName: "centos" } + }; + const result2 = await client.task.add("ContainerJobNodeSDKTest", task); + assert.equal(result2._response.status, 201); + + await client.job.deleteMethod("ContainerJobNodeSDKTest"); + }); + + it("should create a task with exit conditions successfully", async () => { + const jobId = "JobWithAutoComplete"; + const taskId = "TaskWithAutoComplete"; + const job: BatchServiceModels.JobAddParameter = { + id: jobId, + poolInfo: { + poolId: "dummypool" + }, + onAllTasksComplete: "noaction", + onTaskFailure: "performexitoptionsjobaction", + usesTaskDependencies: true + }; + + const result1 = await client.job.add(job); + + assert.equal(result1._response.status, 201); + + const task: BatchServiceModels.TaskAddParameter = { + id: taskId, + commandLine: "echo Hello World", + exitConditions: { + default: { + jobAction: "terminate", + dependencyAction: "satisfy" + }, + exitCodes: [ + { + code: 1, + exitOptions: { + jobAction: "none", + dependencyAction: "block" + } + } + ] + } + }; + + const result2 = await client.task.add(jobId, task); + + assert.equal(result2._response.status, 201); + + const result3 = await client.task.get(jobId, taskId); + + assert.equal(result3.exitConditions!.default!.jobAction, "terminate"); + assert.equal(result3.exitConditions!.default!.dependencyAction, "satisfy"); + assert.equal(result3.exitConditions!.exitCodes![0].code, 1); + assert.equal(result3.exitConditions!.exitCodes![0].exitOptions.jobAction, "none"); + assert.equal(result3.exitConditions!.exitCodes![0].exitOptions.dependencyAction, "block"); + + await client.job.deleteMethod(jobId); + }); + + it("should create a task successfully", async () => { + const task = { + id: "HelloWorldNodeSDKTestTask", + commandLine: "ping 127.0.0.1 -n 20" + }; + const result = await client.task.add("HelloWorldJobNodeSDKTest", task); + + assert.equal(result._response.status, 201); + }); + + it("should terminate a task successfully", async () => { + const result = await client.task.terminate( + "HelloWorldJobNodeSDKTest", + "HelloWorldNodeSDKTestTask" + ); + + assert.equal(result._response.status, 204); + }); + + it("should create a second task with output files successfully", async () => { + const container = + "https://teststorage.blob.core.windows.net/batch-sdk-test?se=2017-05-05T23%3A48%3A11Z&sv=2016-05-31&sig=fwsWniANVb/KSQQdok%2BbT7gR79iiZSG%2BGkw9Rsd5efY"; + const outputs = [ + { + filePattern: "../stdout.txt", + destination: { + container: { containerUrl: container, path: "taskLogs/output.txt" } + }, + uploadOptions: { uploadCondition: "taskCompletion" } + }, + { + file_pattern: "../stderr.txt", + destination: { + container: { containerUrl: container, path: "taskLogs/error.txt" } + }, + uploadOptions: { uploadCondition: "taskFailure" } + } + ]; + const options = { + id: "HelloWorldNodeSDKTestTask2", + commandLine: "cmd /c echo hello world", + output_files: outputs + }; + const result = await client.task.add("HelloWorldJobNodeSDKTest", options); + + assert.equal(result._response.status, 201); + }); + + it("should reactivate a task successfully", async () => { + const result = await client.task.reactivate( + "HelloWorldJobNodeSDKTest", + "HelloWorldNodeSDKTestTask" + ); + + assert.equal(result._response.status, 204); + }); + + it("should update a task successfully", async () => { + const options = { constraints: { maxTaskRetryCount: 3 } }; + const result = await client.task.update( + "HelloWorldJobNodeSDKTest", + "HelloWorldNodeSDKTestTask2", + options + ); + + assert.equal(result._response.status, 200); + }); + + it("should list all tasks successfully", async () => { + const result = await client.task.list("HelloWorldJobNodeSDKTest"); + + assert.lengthOf(result, 2); + assert.equal(result[0].constraints!.maxTaskRetryCount, 3); + assert.equal(result._response.status, 200); + }); + + it("should get task reference successfully", async () => { + const result = await client.task.get("HelloWorldJobNodeSDKTest", "HelloWorldNodeSDKTestTask"); + + assert.equal(result.id, "HelloWorldNodeSDKTestTask"); + assert.equal(result._response.status, 200); + + //wait(100000); + + // if (!suite.isPlayback) { + // console.log("Waiting for task to complete..."); + // setTimeout(function() { + // done(); + // }, 100000); + // } else { + // done(); + // } + }); + + //TODO: Need to test with actual subtasks + it("should list sub tasks successfully", async () => { + const result = await client.task.listSubtasks( + "HelloWorldJobNodeSDKTest", + "HelloWorldNodeSDKTestTask" + ); + + assert.equal(result._response.status, 200); + }); + + it("should create a task with authentication token settings successfully", async () => { + const jobId = "HelloWorldJobNodeSDKTest"; + const taskId = "TaskWithAuthTokenSettings"; + const task: BatchServiceModels.TaskAddParameter = { + id: taskId, + commandLine: "cmd /c echo Hello World", + authenticationTokenSettings: { + access: ["job"] + } + }; + + const result = await client.task.add(jobId, task); + + assert.equal(result._response.status, 201); + + const result2 = await client.task.get(jobId, taskId); + + assert.isDefined(result2.authenticationTokenSettings); + assert.isDefined(result2.authenticationTokenSettings!.access); + assert.lengthOf(result2.authenticationTokenSettings!.access!, 1); + assert.equal(result2.authenticationTokenSettings!.access![0], "job"); + }); + + it("should create a task with a user identity successfully", async () => { + const jobId = "HelloWorldJobNodeSDKTest"; + const taskId = "TaskWithUserIdentity"; + const task = { + id: taskId, + // This command should return a non-zero exit code for a non-admin user + commandLine: "cmd /c net session >nul 2>&1", + userIdentity: { + userName: nonAdminPoolUser + } + }; + + const result = await client.task.add(jobId, task); + + assert.equal(result._response.status, 201); + + let result2: TaskGetResponse; + while (true) { + result2 = await client.task.get(jobId, taskId); + if (result2.executionInfo !== undefined && result2.executionInfo.result != undefined) { + break; + } else { + await wait(20000); + } + } + assert.isDefined(result2.userIdentity); + assert.equal(result2.userIdentity!.userName, nonAdminPoolUser); + assert.isDefined(result2.executionInfo); + assert.equal(result2.executionInfo!.result, "failure"); + assert.notEqual(result2.executionInfo!.exitCode, 0); + }).timeout(1000000); + + it("should count tasks sucessfully", async () => { + const jobId = "HelloWorldJobNodeSDKTest"; + const result = await client.job.getTaskCounts(jobId); + + assert.isDefined(result.taskCounts.active); + assert.isDefined(result.taskCounts.completed); + }); + + it("should list files from task successfully", async () => { + const result = await client.file.listFromTask( + "HelloWorldJobNodeSDKTest", + "HelloWorldNodeSDKTestTask2" + ); + + assert.isAtLeast(result.length, 1); + assert.equal(result._response.status, 200); + }); + + it("should get file properties from task successfully", async () => { + const result = await client.file.getPropertiesFromTask( + "HelloWorldJobNodeSDKTest", + "HelloWorldNodeSDKTestTask2", + "stderr.txt" + ); + + assert.equal(result._response.status, 200); + }); + + it("should get file from task successfully", (done) => { + client.file + .getFromTask("HelloWorldJobNodeSDKTest", "HelloWorldNodeSDKTestTask2", "stdout.txt") + .then((result) => { + assert.equal(result._response.status, 200); + readStreamToBuffer(result.readableStreamBody!, function(_err, buff) { + assert.isAtLeast(buff.length, 1); + done(); + }); + }) + .catch((error) => { + assert.fail(error); + }); + }); + + it("should delete file from task successfully", async () => { + const result = await client.file.deleteFromTask( + "HelloWorldJobNodeSDKTest", + "HelloWorldNodeSDKTestTask2", + "stderr.txt" + ); + + assert.equal(result._response.status, 200); + }); + + it("should re-list compute nodes successfully", async () => { + const result = await client.computeNode.list("nodesdktestpool1"); + + assert.isAtLeast(result.length, 1); + compute_nodes = result.map(function(x) { + return x.id!; + }); + //wait(100000); + // if (!suite.isPlayback) { + // console.log('Waiting for nodes to be ready...') + // setTimeout(function () { + // done(); + // }, 100000); + // } else { + // done(); + // } + }); + + it("should list files from compute node successfully", async () => { + const result = await client.file.listFromComputeNode("nodesdktestpool1", compute_nodes[1]); + + assert.isAtLeast(result.length, 1); + assert.equal(result._response.status, 200); + }); + + it("should get file properties from node successfully", async () => { + const result = await client.file.getPropertiesFromComputeNode( + "nodesdktestpool1", + compute_nodes[1], + "startup/wd/hello.txt" + ); + + assert.equal(result._response.status, 200); + }); + + it("should get file from node successfully", (done) => { + client.file + .getFromComputeNode("nodesdktestpool1", compute_nodes[1], "startup/wd/hello.txt") + .then((result) => { + assert.equal(result._response.status, 200); + readStreamToBuffer(result.readableStreamBody!, function(_err, buff) { + assert.isAtLeast(buff.length, 1); + done(); + }); + }) + .catch((error) => { + assert.fail(error); + }); + }); + + it("should delete file from node successfully", async () => { + const result = await client.file.deleteFromComputeNode( + "nodesdktestpool1", + compute_nodes[1], + "startup/wd/hello.txt" + ); + + assert.equal(result._response.status, 200); + }); + + // the application is not added by the tests and should be added by the tester manually + it.skip("should list applications successfully", async () => { + const result = await client.application.list(); + + assert.isAtLeast(result.length, 1); + assert.equal(result._response.status, 200); + }); + + it.skip("should get application reference successfully", async () => { + await client.application.get("my_application_id"); + }); + + it("should delete a task successfully", async () => { + const result = await client.task.deleteMethod( + "HelloWorldJobNodeSDKTest", + "HelloWorldNodeSDKTestTask" + ); + + assert.equal(result._response.status, 200); + }); + + it("should add a task with an application package reference successfully", async () => { + const taskId = "ApplicationPacakgeReferenceTask"; + const task = { + id: taskId, + commandLine: "cmd /c echo hello world", + applicationPackageReferences: [ + { + applicationId: "my_application_id" + } + ] + }; + const result1 = await client.task.add("HelloWorldJobNodeSDKTest", task); + assert.equal(result1._response.status, 201); + + const result2 = await client.task.get("HelloWorldJobNodeSDKTest", taskId); + assert.isDefined(result2.applicationPackageReferences); + }); + + it("should delete a second task successfully", async () => { + const result = await client.task.deleteMethod( + "HelloWorldJobNodeSDKTest", + "HelloWorldNodeSDKTestTask2" + ); + + assert.equal(result._response.status, 200); + }); + + it("should get a job reference successfully", async () => { + const result = await client.job.get("HelloWorldJobNodeSDKTest"); + + assert.equal(result.id, "HelloWorldJobNodeSDKTest"); + assert.equal(result.state, "active"); + assert.equal(result.poolInfo!.poolId, "nodesdktestpool1"); + assert.equal(result._response.status, 200); + }); + + it("should list jobs successfully", async () => { + const result = await client.job.list(); + + assert.isAtLeast(result.length, 1); + assert.equal(result._response.status, 200); + }); + + it("should fail to job prep+release status", async () => { + try { + await client.job.listPreparationAndReleaseTaskStatus("HelloWorldJobNodeSDKTest"); + } catch (error) { + assert.equal(error.code, "JobPreparationTaskOrReleaseTaskNotSpecified"); + } + }); + + it("should disable a job successfully", async () => { + const result = await client.job.disable("HelloWorldJobNodeSDKTest", "requeue"); + + assert.equal(result._response.status, 202); + }); + + it("should enable a job successfully", async () => { + const result = await client.job.enable("HelloWorldJobNodeSDKTest"); + + assert.equal(result._response.status, 202); + }); + + it("should terminate a job successfully", async () => { + const result = await client.job.terminate("HelloWorldJobNodeSDKTest"); + + assert.equal(result._response.status, 202); + }); + + it("should delete a job successfully", async () => { + const result = await client.job.deleteMethod("HelloWorldJobNodeSDKTest"); + + assert.equal(result._response.status, 202); + }); + + it("should get all job statistics successfully", async () => { + const result = await client.job.getAllLifetimeStatistics(); + + assert.isDefined(result.userCPUTime); + assert.isDefined(result.kernelCPUTime); + assert.equal(result._response.status, 200); + }); + + it("should create a job schdule successfully", async () => { + const options: BatchServiceModels.JobScheduleAddParameter = { + id: "NodeSDKTestSchedule", + jobSpecification: { + displayName: "HelloWorldJobNodeSDKTest", + poolInfo: { poolId: "nodesdktestpool1" } + }, + schedule: { + doNotRunUntil: new Date("2020-12-25T00:00:00.00"), + startWindow: duration({ minutes: 6 }).toISOString() + } + }; + + const result = await client.jobSchedule.add(options); + + assert.equal(result._response.status, 201); + }); + + it("should list job schedules successfully", async () => { + const result = await client.jobSchedule.list(); + + assert.isAtLeast(result.length, 1); + assert.equal(result._response.status, 200); + }); + + it("should list jobs from job schedule successfully", async () => { + const result = await client.job.listFromJobSchedule("NodeSDKTestSchedule"); + + assert.lengthOf(result, 0); + assert.equal(result._response.status, 200); + }); + + it("should check if a job schedule exists successfully", async () => { + const result = await client.jobSchedule.exists("NodeSDKTestSchedule"); + + assert.isTrue(result.body); + assert.equal(result._response.status, 200); + }); + + it("should get a job schedule reference successfully", async () => { + const result = await client.jobSchedule.get("NodeSDKTestSchedule"); + + assert.equal(result.id, "NodeSDKTestSchedule"); + assert.equal(result.state, "active"); + assert.equal(result._response.status, 200); + }); + + it("should update a job schedule successfully", async () => { + const options: BatchServiceModels.JobScheduleUpdateParameter = { + schedule: { recurrenceInterval: duration({ hours: 6 }).toISOString() }, + jobSpecification: { poolInfo: { poolId: "nodesdktestpool2" } } + }; + + const result = await client.jobSchedule.update("NodeSDKTestSchedule", options); + + assert.equal(result._response.status, 200); + }); + + it("should patch a job schedule successfully", async () => { + const options = { + schedule: { + recurrenceInterval: duration({ hours: 3 }).toISOString(), + startWindow: duration({ hours: 1 }).toISOString() + } + }; + + const result = await client.jobSchedule.patch("NodeSDKTestSchedule", options); + + assert.equal(result._response.status, 200); + }); + + it("should disable a job schedule successfully", async () => { + const result = await client.jobSchedule.disable("NodeSDKTestSchedule"); + + assert.equal(result._response.status, 204); + }); + + it("should enable a job schedule successfully", async () => { + const result = await client.jobSchedule.enable("NodeSDKTestSchedule"); + + assert.equal(result._response.status, 204); + }); + + it("should terminate a job schedule successfully", async () => { + const result = await client.jobSchedule.terminate("NodeSDKTestSchedule"); + + assert.equal(result._response.status, 202); + }); + + it("should delete a job schedule successfully", async () => { + const result = await client.jobSchedule.deleteMethod("NodeSDKTestSchedule"); + + assert.equal(result._response.status, 202); + }); + + it("should remove nodes in pool successfully", async () => { + const options: BatchServiceModels.NodeRemoveParameter = { + nodeList: compute_nodes, + nodeDeallocationOption: "terminate" + }; + const result = await client.pool.removeNodes("nodesdktestpool1", options); + + assert.equal(result._response.status, 202); + }); + + it("should delete a pool successfully", async () => { + const result = await client.pool.deleteMethod("nodesdktestpool1"); + + assert.equal(result._response.status, 202); + }); + + it("should delete a second pool successfully", async () => { + const result = await client.pool.deleteMethod("nodesdktestpool2"); + + assert.equal(result._response.status, 202); + }); + + it("should delete a third pool successfully", async () => { + const result = await client.pool.deleteMethod("nodesdkinboundendpointpool"); + + assert.equal(result._response.status, 202); + }); + + it("should fail to delete a non-existant pool", async () => { + try { + await client.pool.deleteMethod("nodesdktestpool1"); + } catch (error) { + assert.equal(error.code, "PoolBeingDeleted"); + } + }); + + it("should delete a certificate successfully", async () => { + const result = await client.certificate.deleteMethod("sha1", certThumb); + + assert.equal(result._response.status, 202); + }); + + it("should fail to cancel deleting a certificate", async () => { + try { + await client.certificate.cancelDeletion("sha1", certThumb); + } catch (error) { + assert.equal(error.code, "CertificateBeingDeleted"); + } + }); + }); +}); diff --git a/sdk/batch/batch/test/sample.env b/sdk/batch/batch/test/sample.env new file mode 100644 index 000000000000..74f8d8e0caf6 --- /dev/null +++ b/sdk/batch/batch/test/sample.env @@ -0,0 +1,12 @@ +# Used in tests. Retrieve these values from a Batch instance +# in the Azure Portal. +AZURE_BATCH_ENDPOINT="" +AZURE_BATCH_ACCOUNT_NAME="" +AZURE_BATCH_ACCOUNT_KEY="" +# Used to authenticate using Azure AD as a service principal for role-based authentication +# in the tokenAuth sample. +# +# See the documentation for `AuthenticationContext` at the following link: +# https://docs.microsoft.com/javascript/api/overview/azure/activedirectory?view=azure-node-latest +AZURE_CLIENT_ID="" +AZURE_CLIENT_SECRET="" diff --git a/sdk/batch/batch/tsconfig.json b/sdk/batch/batch/tsconfig.json index 87bbf5b5fa49..9ef6b7c57fd1 100644 --- a/sdk/batch/batch/tsconfig.json +++ b/sdk/batch/batch/tsconfig.json @@ -9,11 +9,11 @@ "esModuleInterop": true, "allowSyntheticDefaultImports": true, "forceConsistentCasingInFileNames": true, - "lib": ["es6"], + "lib": ["es6", "dom"], "declaration": true, "outDir": "./esm", "importHelpers": true }, "include": ["./src/**/*.ts"], - "exclude": ["node_modules"] + "exclude": ["node_modules", "*.spec.ts"] } diff --git a/sdk/batch/batch/tsconfig.test.json b/sdk/batch/batch/tsconfig.test.json new file mode 100644 index 000000000000..fd35f8c6793b --- /dev/null +++ b/sdk/batch/batch/tsconfig.test.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "moduleResolution": "node", + "strict": true, + "target": "es5", + "sourceMap": true, + "declarationMap": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "forceConsistentCasingInFileNames": true, + "lib": ["es6", "dom"], + "declaration": true, + "outDir": "./esm", + "importHelpers": true + }, + "include": ["./test/**/*.ts"], + "exclude": ["node_modules"] +} diff --git a/sdk/billing/arm-billing/LICENSE.txt b/sdk/billing/arm-billing/LICENSE.txt index a70e8cf66038..ea8fb1516028 100644 --- a/sdk/billing/arm-billing/LICENSE.txt +++ b/sdk/billing/arm-billing/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2018 Microsoft +Copyright (c) 2020 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/billing/arm-billing/README.md b/sdk/billing/arm-billing/README.md index 38fe7bad160c..cd8267dc6804 100644 --- a/sdk/billing/arm-billing/README.md +++ b/sdk/billing/arm-billing/README.md @@ -2,6 +2,10 @@ This package contains an isomorphic SDK for BillingManagementClient. +For more information about Billing: +* [Azure documentation](https://docs.microsoft.com/azure/cost-management-billing/) +* [SDK reference documentation](https://docs.microsoft.com/javascript/api/overview/azure/billing?view=azure-node-latest) + ### Currently supported environments - Node.js version 6.x.x or higher @@ -9,23 +13,24 @@ This package contains an isomorphic SDK for BillingManagementClient. ### How to Install -``` +```bash npm install @azure/arm-billing ``` ### How to use -#### nodejs - Authentication, client creation and list enrollmentAccounts as an example written in TypeScript. +#### nodejs - Authentication, client creation and list billingAccounts as an example written in TypeScript. ##### Install @azure/ms-rest-nodeauth -``` -npm install @azure/ms-rest-nodeauth +- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. +```bash +npm install @azure/ms-rest-nodeauth@"^3.0.0" ``` ##### Sample code -```ts +```typescript import * as msRest from "@azure/ms-rest-js"; import * as msRestAzure from "@azure/ms-rest-azure-js"; import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; @@ -34,7 +39,8 @@ const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; msRestNodeAuth.interactiveLogin().then((creds) => { const client = new BillingManagementClient(creds, subscriptionId); - client.enrollmentAccounts.list().then((result) => { + const expand = "testexpand"; + client.billingAccounts.list(expand).then((result) => { console.log("The result is:"); console.log(result); }); @@ -43,11 +49,11 @@ msRestNodeAuth.interactiveLogin().then((creds) => { }); ``` -#### browser - Authentication, client creation and list enrollmentAccounts as an example written in JavaScript. +#### browser - Authentication, client creation and list billingAccounts as an example written in JavaScript. ##### Install @azure/ms-rest-browserauth -``` +```bash npm install @azure/ms-rest-browserauth ``` @@ -77,7 +83,8 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to authManager.login(); } const client = new Azure.ArmBilling.BillingManagementClient(res.creds, subscriptionId); - client.enrollmentAccounts.list().then((result) => { + const expand = "testexpand"; + client.billingAccounts.list(expand).then((result) => { console.log("The result is:"); console.log(result); }).catch((err) => { @@ -95,5 +102,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fbilling%2Farm-billing%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/billing/arm-billing/README.png) diff --git a/sdk/billing/arm-billing/package.json b/sdk/billing/arm-billing/package.json index 4dcc11b79fcb..2c12635400d2 100644 --- a/sdk/billing/arm-billing/package.json +++ b/sdk/billing/arm-billing/package.json @@ -2,11 +2,11 @@ "name": "@azure/arm-billing", "author": "Microsoft Corporation", "description": "BillingManagementClient Library with typescript type definitions for node.js and browser.", - "version": "2.2.0", + "version": "3.0.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.1.0", - "@azure/ms-rest-js": "^1.1.0", - "tslib": "^1.9.3" + "@azure/ms-rest-azure-js": "^2.0.1", + "@azure/ms-rest-js": "^2.0.4", + "tslib": "^1.10.0" }, "keywords": [ "node", @@ -20,18 +20,19 @@ "module": "./esm/billingManagementClient.js", "types": "./esm/billingManagementClient.d.ts", "devDependencies": { - "typescript": "^3.1.1", - "rollup": "^0.66.2", - "rollup-plugin-node-resolve": "^3.4.0", - "uglify-js": "^3.4.9" + "typescript": "^3.5.3", + "rollup": "^1.18.0", + "rollup-plugin-node-resolve": "^5.2.0", + "rollup-plugin-sourcemaps": "^0.4.2", + "uglify-js": "^3.6.0" }, - "homepage": "https://github.com/azure/azure-sdk-for-js/tree/master/sdk/billing/arm-billing", + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/billing/arm-billing", "repository": { "type": "git", - "url": "https://github.com/azure/azure-sdk-for-js.git" + "url": "https://github.com/Azure/azure-sdk-for-js.git" }, "bugs": { - "url": "https://github.com/azure/azure-sdk-for-js/issues" + "url": "https://github.com/Azure/azure-sdk-for-js/issues" }, "files": [ "dist/**/*.js", @@ -43,6 +44,7 @@ "esm/**/*.d.ts", "esm/**/*.d.ts.map", "src/**/*.ts", + "README.md", "rollup.config.js", "tsconfig.json" ], diff --git a/sdk/billing/arm-billing/rollup.config.js b/sdk/billing/arm-billing/rollup.config.js index ae6725122752..e81d3ff3f6d5 100644 --- a/sdk/billing/arm-billing/rollup.config.js +++ b/sdk/billing/arm-billing/rollup.config.js @@ -1,10 +1,16 @@ +import rollup from "rollup"; import nodeResolve from "rollup-plugin-node-resolve"; +import sourcemaps from "rollup-plugin-sourcemaps"; + /** - * @type {import('rollup').RollupFileOptions} + * @type {rollup.RollupFileOptions} */ const config = { - input: './esm/billingManagementClient.js', - external: ["@azure/ms-rest-js", "@azure/ms-rest-azure-js"], + input: "./esm/billingManagementClient.js", + external: [ + "@azure/ms-rest-js", + "@azure/ms-rest-azure-js" + ], output: { file: "./dist/arm-billing.js", format: "umd", @@ -16,16 +22,16 @@ const config = { }, banner: `/* * 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. */` }, plugins: [ - nodeResolve({ module: true }) + nodeResolve({ mainFields: ['module', 'main'] }), + sourcemaps() ] }; + export default config; diff --git a/sdk/billing/arm-billing/src/billingManagementClient.ts b/sdk/billing/arm-billing/src/billingManagementClient.ts index 171fe7188b39..2ff7dd105b67 100644 --- a/sdk/billing/arm-billing/src/billingManagementClient.ts +++ b/sdk/billing/arm-billing/src/billingManagementClient.ts @@ -17,23 +17,55 @@ import { BillingManagementClientContext } from "./billingManagementClientContext class BillingManagementClient extends BillingManagementClientContext { // Operation groups - enrollmentAccounts: operations.EnrollmentAccounts; - billingPeriods: operations.BillingPeriods; + billingAccounts: operations.BillingAccounts; + address: operations.Address; + availableBalances: operations.AvailableBalances; + instructions: operations.Instructions; + billingProfiles: operations.BillingProfiles; + customers: operations.Customers; + invoiceSections: operations.InvoiceSections; + billingPermissions: operations.BillingPermissions; + billingSubscriptions: operations.BillingSubscriptions; + products: operations.Products; invoices: operations.Invoices; + transactions: operations.Transactions; + policies: operations.Policies; + billingProperty: operations.BillingPropertyOperations; operations: operations.Operations; + billingRoleDefinitions: operations.BillingRoleDefinitions; + billingRoleAssignments: operations.BillingRoleAssignments; + agreements: operations.Agreements; + enrollmentAccounts: operations.EnrollmentAccounts; + billingPeriods: operations.BillingPeriods; /** * Initializes a new instance of the BillingManagementClient class. * @param credentials Credentials needed for the client to connect to Azure. - * @param subscriptionId Azure Subscription ID. + * @param subscriptionId The ID that uniquely identifies an Azure subscription. * @param [options] The parameter options */ constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.BillingManagementClientOptions) { super(credentials, subscriptionId, options); - this.enrollmentAccounts = new operations.EnrollmentAccounts(this); - this.billingPeriods = new operations.BillingPeriods(this); + this.billingAccounts = new operations.BillingAccounts(this); + this.address = new operations.Address(this); + this.availableBalances = new operations.AvailableBalances(this); + this.instructions = new operations.Instructions(this); + this.billingProfiles = new operations.BillingProfiles(this); + this.customers = new operations.Customers(this); + this.invoiceSections = new operations.InvoiceSections(this); + this.billingPermissions = new operations.BillingPermissions(this); + this.billingSubscriptions = new operations.BillingSubscriptions(this); + this.products = new operations.Products(this); this.invoices = new operations.Invoices(this); + this.transactions = new operations.Transactions(this); + this.policies = new operations.Policies(this); + this.billingProperty = new operations.BillingPropertyOperations(this); this.operations = new operations.Operations(this); + this.billingRoleDefinitions = new operations.BillingRoleDefinitions(this); + this.billingRoleAssignments = new operations.BillingRoleAssignments(this); + this.agreements = new operations.Agreements(this); + this.enrollmentAccounts = new operations.EnrollmentAccounts(this); + this.billingPeriods = new operations.BillingPeriods(this); } } diff --git a/sdk/billing/arm-billing/src/billingManagementClientContext.ts b/sdk/billing/arm-billing/src/billingManagementClientContext.ts index 3501b4ba6e55..66679df82359 100644 --- a/sdk/billing/arm-billing/src/billingManagementClientContext.ts +++ b/sdk/billing/arm-billing/src/billingManagementClientContext.ts @@ -13,17 +13,16 @@ import * as msRest from "@azure/ms-rest-js"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-billing"; -const packageVersion = "0.1.0"; +const packageVersion = "3.0.0"; export class BillingManagementClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials; - apiVersion?: string; subscriptionId: string; /** * Initializes a new instance of the BillingManagementClient class. * @param credentials Credentials needed for the client to connect to Azure. - * @param subscriptionId Azure Subscription ID. + * @param subscriptionId The ID that uniquely identifies an Azure subscription. * @param [options] The parameter options */ constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.BillingManagementClientOptions) { @@ -44,7 +43,6 @@ export class BillingManagementClientContext extends msRestAzure.AzureServiceClie super(credentials, options); - this.apiVersion = '2018-03-01-preview'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; diff --git a/sdk/billing/arm-billing/src/models/addressMappers.ts b/sdk/billing/arm-billing/src/models/addressMappers.ts new file mode 100644 index 000000000000..c320392736bf --- /dev/null +++ b/sdk/billing/arm-billing/src/models/addressMappers.ts @@ -0,0 +1,15 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + AddressDetails, + ErrorDetails, + ErrorResponse, + ErrorSubDetailsItem, + ValidateAddressResponse +} from "../models/mappers"; diff --git a/sdk/billing/arm-billing/src/models/agreementsMappers.ts b/sdk/billing/arm-billing/src/models/agreementsMappers.ts new file mode 100644 index 000000000000..4bc985825a00 --- /dev/null +++ b/sdk/billing/arm-billing/src/models/agreementsMappers.ts @@ -0,0 +1,50 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + AddressDetails, + Agreement, + AgreementListResult, + Amount, + AvailableBalance, + AzurePlan, + BaseResource, + BillingAccount, + BillingPeriod, + BillingPermissionsProperties, + BillingProfile, + BillingProfilesOnExpand, + BillingProperty, + BillingRoleAssignment, + BillingRoleDefinition, + BillingSubscription, + Customer, + CustomerPolicy, + Department, + Document, + Enrollment, + EnrollmentAccount, + EnrollmentAccountSummary, + EnrollmentPolicies, + ErrorDetails, + ErrorResponse, + ErrorSubDetailsItem, + IndirectRelationshipInfo, + Instruction, + Invoice, + InvoiceSection, + InvoiceSectionsOnExpand, + Participants, + PaymentProperties, + Policy, + Product, + RebillDetails, + Reseller, + Resource, + Transaction +} from "../models/mappers"; diff --git a/sdk/billing/arm-billing/src/models/availableBalancesMappers.ts b/sdk/billing/arm-billing/src/models/availableBalancesMappers.ts new file mode 100644 index 000000000000..4d205df559cc --- /dev/null +++ b/sdk/billing/arm-billing/src/models/availableBalancesMappers.ts @@ -0,0 +1,49 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + AddressDetails, + Agreement, + Amount, + AvailableBalance, + AzurePlan, + BaseResource, + BillingAccount, + BillingPeriod, + BillingPermissionsProperties, + BillingProfile, + BillingProfilesOnExpand, + BillingProperty, + BillingRoleAssignment, + BillingRoleDefinition, + BillingSubscription, + Customer, + CustomerPolicy, + Department, + Document, + Enrollment, + EnrollmentAccount, + EnrollmentAccountSummary, + EnrollmentPolicies, + ErrorDetails, + ErrorResponse, + ErrorSubDetailsItem, + IndirectRelationshipInfo, + Instruction, + Invoice, + InvoiceSection, + InvoiceSectionsOnExpand, + Participants, + PaymentProperties, + Policy, + Product, + RebillDetails, + Reseller, + Resource, + Transaction +} from "../models/mappers"; diff --git a/sdk/billing/arm-billing/src/models/billingAccountsMappers.ts b/sdk/billing/arm-billing/src/models/billingAccountsMappers.ts new file mode 100644 index 000000000000..6957dcc9fbed --- /dev/null +++ b/sdk/billing/arm-billing/src/models/billingAccountsMappers.ts @@ -0,0 +1,53 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + AddressDetails, + Agreement, + Amount, + AvailableBalance, + AzurePlan, + BaseResource, + BillingAccount, + BillingAccountListResult, + BillingAccountUpdateRequest, + BillingPeriod, + BillingPermissionsProperties, + BillingProfile, + BillingProfilesOnExpand, + BillingProperty, + BillingRoleAssignment, + BillingRoleDefinition, + BillingSubscription, + Customer, + CustomerPolicy, + Department, + Document, + Enrollment, + EnrollmentAccount, + EnrollmentAccountSummary, + EnrollmentPolicies, + ErrorDetails, + ErrorResponse, + ErrorSubDetailsItem, + IndirectRelationshipInfo, + Instruction, + Invoice, + InvoiceSection, + InvoiceSectionListWithCreateSubPermissionResult, + InvoiceSectionsOnExpand, + InvoiceSectionWithCreateSubPermission, + Participants, + PaymentProperties, + Policy, + Product, + RebillDetails, + Reseller, + Resource, + Transaction +} from "../models/mappers"; diff --git a/sdk/billing/arm-billing/src/models/billingPeriodsMappers.ts b/sdk/billing/arm-billing/src/models/billingPeriodsMappers.ts index b06ea885b372..3935d30e33f1 100644 --- a/sdk/billing/arm-billing/src/models/billingPeriodsMappers.ts +++ b/sdk/billing/arm-billing/src/models/billingPeriodsMappers.ts @@ -1,22 +1,50 @@ /* * 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. */ export { - BillingPeriodsListResult, - BillingPeriod, - Resource, + AddressDetails, + Agreement, + Amount, + AvailableBalance, + AzurePlan, BaseResource, - ErrorResponse, - ErrorDetails, + BillingAccount, + BillingPeriod, + BillingPeriodsListResult, + BillingPermissionsProperties, + BillingProfile, + BillingProfilesOnExpand, + BillingProperty, + BillingRoleAssignment, + BillingRoleDefinition, + BillingSubscription, + Customer, + CustomerPolicy, + Department, + Document, + Enrollment, EnrollmentAccount, + EnrollmentAccountSummary, + EnrollmentPolicies, + ErrorDetails, + ErrorResponse, + ErrorSubDetailsItem, + IndirectRelationshipInfo, + Instruction, Invoice, - DownloadUrl + InvoiceSection, + InvoiceSectionsOnExpand, + Participants, + PaymentProperties, + Policy, + Product, + RebillDetails, + Reseller, + Resource, + Transaction } from "../models/mappers"; - diff --git a/sdk/billing/arm-billing/src/models/billingPermissionsMappers.ts b/sdk/billing/arm-billing/src/models/billingPermissionsMappers.ts new file mode 100644 index 000000000000..3a1aa1c8b42d --- /dev/null +++ b/sdk/billing/arm-billing/src/models/billingPermissionsMappers.ts @@ -0,0 +1,15 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + BillingPermissionsListResult, + BillingPermissionsProperties, + ErrorDetails, + ErrorResponse, + ErrorSubDetailsItem +} from "../models/mappers"; diff --git a/sdk/billing/arm-billing/src/models/billingProfilesMappers.ts b/sdk/billing/arm-billing/src/models/billingProfilesMappers.ts new file mode 100644 index 000000000000..3cf76016d7d0 --- /dev/null +++ b/sdk/billing/arm-billing/src/models/billingProfilesMappers.ts @@ -0,0 +1,51 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + AddressDetails, + Agreement, + Amount, + AvailableBalance, + AzurePlan, + BaseResource, + BillingAccount, + BillingPeriod, + BillingPermissionsProperties, + BillingProfile, + BillingProfileListResult, + BillingProfilesCreateOrUpdateHeaders, + BillingProfilesOnExpand, + BillingProperty, + BillingRoleAssignment, + BillingRoleDefinition, + BillingSubscription, + Customer, + CustomerPolicy, + Department, + Document, + Enrollment, + EnrollmentAccount, + EnrollmentAccountSummary, + EnrollmentPolicies, + ErrorDetails, + ErrorResponse, + ErrorSubDetailsItem, + IndirectRelationshipInfo, + Instruction, + Invoice, + InvoiceSection, + InvoiceSectionsOnExpand, + Participants, + PaymentProperties, + Policy, + Product, + RebillDetails, + Reseller, + Resource, + Transaction +} from "../models/mappers"; diff --git a/sdk/billing/arm-billing/src/models/billingPropertyOperationsMappers.ts b/sdk/billing/arm-billing/src/models/billingPropertyOperationsMappers.ts new file mode 100644 index 000000000000..4d205df559cc --- /dev/null +++ b/sdk/billing/arm-billing/src/models/billingPropertyOperationsMappers.ts @@ -0,0 +1,49 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + AddressDetails, + Agreement, + Amount, + AvailableBalance, + AzurePlan, + BaseResource, + BillingAccount, + BillingPeriod, + BillingPermissionsProperties, + BillingProfile, + BillingProfilesOnExpand, + BillingProperty, + BillingRoleAssignment, + BillingRoleDefinition, + BillingSubscription, + Customer, + CustomerPolicy, + Department, + Document, + Enrollment, + EnrollmentAccount, + EnrollmentAccountSummary, + EnrollmentPolicies, + ErrorDetails, + ErrorResponse, + ErrorSubDetailsItem, + IndirectRelationshipInfo, + Instruction, + Invoice, + InvoiceSection, + InvoiceSectionsOnExpand, + Participants, + PaymentProperties, + Policy, + Product, + RebillDetails, + Reseller, + Resource, + Transaction +} from "../models/mappers"; diff --git a/sdk/billing/arm-billing/src/models/billingRoleAssignmentsMappers.ts b/sdk/billing/arm-billing/src/models/billingRoleAssignmentsMappers.ts new file mode 100644 index 000000000000..24fe849dce14 --- /dev/null +++ b/sdk/billing/arm-billing/src/models/billingRoleAssignmentsMappers.ts @@ -0,0 +1,50 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + AddressDetails, + Agreement, + Amount, + AvailableBalance, + AzurePlan, + BaseResource, + BillingAccount, + BillingPeriod, + BillingPermissionsProperties, + BillingProfile, + BillingProfilesOnExpand, + BillingProperty, + BillingRoleAssignment, + BillingRoleAssignmentListResult, + BillingRoleDefinition, + BillingSubscription, + Customer, + CustomerPolicy, + Department, + Document, + Enrollment, + EnrollmentAccount, + EnrollmentAccountSummary, + EnrollmentPolicies, + ErrorDetails, + ErrorResponse, + ErrorSubDetailsItem, + IndirectRelationshipInfo, + Instruction, + Invoice, + InvoiceSection, + InvoiceSectionsOnExpand, + Participants, + PaymentProperties, + Policy, + Product, + RebillDetails, + Reseller, + Resource, + Transaction +} from "../models/mappers"; diff --git a/sdk/billing/arm-billing/src/models/billingRoleDefinitionsMappers.ts b/sdk/billing/arm-billing/src/models/billingRoleDefinitionsMappers.ts new file mode 100644 index 000000000000..d2d64596b47e --- /dev/null +++ b/sdk/billing/arm-billing/src/models/billingRoleDefinitionsMappers.ts @@ -0,0 +1,50 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + AddressDetails, + Agreement, + Amount, + AvailableBalance, + AzurePlan, + BaseResource, + BillingAccount, + BillingPeriod, + BillingPermissionsProperties, + BillingProfile, + BillingProfilesOnExpand, + BillingProperty, + BillingRoleAssignment, + BillingRoleDefinition, + BillingRoleDefinitionListResult, + BillingSubscription, + Customer, + CustomerPolicy, + Department, + Document, + Enrollment, + EnrollmentAccount, + EnrollmentAccountSummary, + EnrollmentPolicies, + ErrorDetails, + ErrorResponse, + ErrorSubDetailsItem, + IndirectRelationshipInfo, + Instruction, + Invoice, + InvoiceSection, + InvoiceSectionsOnExpand, + Participants, + PaymentProperties, + Policy, + Product, + RebillDetails, + Reseller, + Resource, + Transaction +} from "../models/mappers"; diff --git a/sdk/billing/arm-billing/src/models/billingSubscriptionsMappers.ts b/sdk/billing/arm-billing/src/models/billingSubscriptionsMappers.ts new file mode 100644 index 000000000000..e85b7c9f9fab --- /dev/null +++ b/sdk/billing/arm-billing/src/models/billingSubscriptionsMappers.ts @@ -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. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + AddressDetails, + Agreement, + Amount, + AvailableBalance, + AzurePlan, + BaseResource, + BillingAccount, + BillingPeriod, + BillingPermissionsProperties, + BillingProfile, + BillingProfilesOnExpand, + BillingProperty, + BillingRoleAssignment, + BillingRoleDefinition, + BillingSubscription, + BillingSubscriptionsListResult, + BillingSubscriptionsMoveHeaders, + Customer, + CustomerPolicy, + Department, + Document, + Enrollment, + EnrollmentAccount, + EnrollmentAccountSummary, + EnrollmentPolicies, + ErrorDetails, + ErrorResponse, + ErrorSubDetailsItem, + IndirectRelationshipInfo, + Instruction, + Invoice, + InvoiceSection, + InvoiceSectionsOnExpand, + Participants, + PaymentProperties, + Policy, + Product, + RebillDetails, + Reseller, + Resource, + Transaction, + TransferBillingSubscriptionRequestProperties, + ValidateSubscriptionTransferEligibilityError, + ValidateSubscriptionTransferEligibilityResult +} from "../models/mappers"; diff --git a/sdk/billing/arm-billing/src/models/customersMappers.ts b/sdk/billing/arm-billing/src/models/customersMappers.ts new file mode 100644 index 000000000000..c93d9f9d389d --- /dev/null +++ b/sdk/billing/arm-billing/src/models/customersMappers.ts @@ -0,0 +1,50 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + AddressDetails, + Agreement, + Amount, + AvailableBalance, + AzurePlan, + BaseResource, + BillingAccount, + BillingPeriod, + BillingPermissionsProperties, + BillingProfile, + BillingProfilesOnExpand, + BillingProperty, + BillingRoleAssignment, + BillingRoleDefinition, + BillingSubscription, + Customer, + CustomerListResult, + CustomerPolicy, + Department, + Document, + Enrollment, + EnrollmentAccount, + EnrollmentAccountSummary, + EnrollmentPolicies, + ErrorDetails, + ErrorResponse, + ErrorSubDetailsItem, + IndirectRelationshipInfo, + Instruction, + Invoice, + InvoiceSection, + InvoiceSectionsOnExpand, + Participants, + PaymentProperties, + Policy, + Product, + RebillDetails, + Reseller, + Resource, + Transaction +} from "../models/mappers"; diff --git a/sdk/billing/arm-billing/src/models/enrollmentAccountsMappers.ts b/sdk/billing/arm-billing/src/models/enrollmentAccountsMappers.ts index c6eb15ea27c6..0b4f12947350 100644 --- a/sdk/billing/arm-billing/src/models/enrollmentAccountsMappers.ts +++ b/sdk/billing/arm-billing/src/models/enrollmentAccountsMappers.ts @@ -1,22 +1,50 @@ /* * 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. */ export { - EnrollmentAccountListResult, - EnrollmentAccount, - Resource, + AddressDetails, + Agreement, + Amount, + AvailableBalance, + AzurePlan, BaseResource, - ErrorResponse, - ErrorDetails, + BillingAccount, BillingPeriod, + BillingPermissionsProperties, + BillingProfile, + BillingProfilesOnExpand, + BillingProperty, + BillingRoleAssignment, + BillingRoleDefinition, + BillingSubscription, + Customer, + CustomerPolicy, + Department, + Document, + Enrollment, + EnrollmentAccount, + EnrollmentAccountListResult, + EnrollmentAccountSummary, + EnrollmentPolicies, + ErrorDetails, + ErrorResponse, + ErrorSubDetailsItem, + IndirectRelationshipInfo, + Instruction, Invoice, - DownloadUrl + InvoiceSection, + InvoiceSectionsOnExpand, + Participants, + PaymentProperties, + Policy, + Product, + RebillDetails, + Reseller, + Resource, + Transaction } from "../models/mappers"; - diff --git a/sdk/billing/arm-billing/src/models/index.ts b/sdk/billing/arm-billing/src/models/index.ts index 43c00d84b805..d0a95adb8ff7 100644 --- a/sdk/billing/arm-billing/src/models/index.ts +++ b/sdk/billing/arm-billing/src/models/index.ts @@ -1,11 +1,9 @@ /* * 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. */ import { BaseResource, CloudError, AzureServiceClientOptions } from "@azure/ms-rest-azure-js"; @@ -13,381 +11,4707 @@ import * as msRest from "@azure/ms-rest-js"; export { BaseResource, CloudError }; +/** + * Details of the Azure plan. + */ +export interface AzurePlan { + /** + * The sku id. + */ + skuId?: string; + /** + * The sku description. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly skuDescription?: string; +} + +/** + * Details of the reseller. + */ +export interface Reseller { + /** + * The MPN ID of the reseller. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly resellerId?: string; + /** + * The name of the reseller. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly description?: string; +} /** - * @interface - * An interface representing Resource. * The Resource model definition. - * - * @extends BaseResource */ export interface Resource extends BaseResource { /** - * @member {string} [id] Resource Id. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Resource Id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; /** - * @member {string} [name] Resource name. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Resource name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; /** - * @member {string} [type] Resource type. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Resource type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly type?: string; } /** - * @interface - * An interface representing EnrollmentAccount. - * An enrollment account resource. - * - * @extends Resource + * A partner's customer. */ -export interface EnrollmentAccount extends Resource { +export interface Customer extends Resource { /** - * @member {string} [principalName] The account owner's principal name. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The ID of the billing profile for the invoice section. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly principalName?: string; + readonly billingProfileId?: string; + /** + * The name of the billing profile for the invoice section. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingProfileDisplayName?: string; + /** + * The name of the customer. + */ + displayName?: string; + /** + * Azure plans enabled for the customer. + */ + enabledAzurePlans?: AzurePlan[]; + /** + * The list of resellers for which an Azure plan is enabled for the customer. + */ + resellers?: Reseller[]; } /** - * @interface - * An interface representing BillingPeriod. - * A billing period resource. - * - * @extends Resource + * Address details. */ -export interface BillingPeriod extends Resource { +export interface AddressDetails { /** - * @member {Date} [billingPeriodStartDate] The start of the date range - * covered by the billing period. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * First name. */ - readonly billingPeriodStartDate?: Date; + firstName?: string; /** - * @member {Date} [billingPeriodEndDate] The end of the date range covered by - * the billing period. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Last name. */ - readonly billingPeriodEndDate?: Date; + lastName?: string; /** - * @member {string[]} [invoiceIds] Array of invoice ids that associated with. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Company name. */ - readonly invoiceIds?: string[]; + companyName?: string; + /** + * Address line 1. + */ + addressLine1: string; + /** + * Address line 2. + */ + addressLine2?: string; + /** + * Address line 3. + */ + addressLine3?: string; + /** + * Address city. + */ + city?: string; + /** + * Address district. + */ + district?: string; + /** + * Address region. + */ + region?: string; + /** + * Country code uses ISO2, 2-digit format. + */ + country: string; + /** + * Postal code. + */ + postalCode?: string; + /** + * Email address. + */ + email?: string; + /** + * Phone number. + */ + phoneNumber?: string; } /** - * @interface - * An interface representing DownloadUrl. - * A secure URL that can be used to download a PDF invoice until the URL - * expires. - * + * Result of the address validation */ -export interface DownloadUrl { +export interface ValidateAddressResponse { /** - * @member {Date} [expiryTime] The time in UTC at which this download URL - * will expire. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * status of the address validation. Possible values include: 'Valid', 'Invalid' */ - readonly expiryTime?: Date; + status?: AddressValidationStatus; /** - * @member {string} [url] The URL to the PDF file. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The list of suggested addresses. */ - readonly url?: string; + suggestedAddresses?: AddressDetails[]; + /** + * Validation error message. + */ + validationMessage?: string; } /** - * @interface - * An interface representing ErrorDetails. - * The details of the error. - * + * The properties of the product to initiate a transfer. */ -export interface ErrorDetails { +export interface TransferProductRequestProperties { /** - * @member {string} [code] Error code. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The destination invoice section id. */ - readonly code?: string; + destinationInvoiceSectionId?: string; +} + +/** + * Request parameters to transfer billing subscription. + */ +export interface TransferBillingSubscriptionRequestProperties { /** - * @member {string} [message] Error message indicating why the operation - * failed. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The destination invoice section id. */ - readonly message?: string; + destinationInvoiceSectionId: string; +} + +/** + * Error details of the transfer eligibility validation + */ +export interface ValidateSubscriptionTransferEligibilityError { /** - * @member {string} [target] The target of the particular error. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Error code for the product transfer validation. Possible values include: 'InvalidSource', + * 'SubscriptionNotActive', 'InsufficientPermissionOnSource', + * 'InsufficientPermissionOnDestination', 'DestinationBillingProfilePastDue', + * 'SubscriptionTypeNotSupported', 'CrossBillingAccountNotAllowed', + * 'NotAvailableForDestinationMarket' */ - readonly target?: string; + code?: SubscriptionTransferValidationErrorCode; + /** + * The error message. + */ + message?: string; + /** + * Detailed error message explaining the error. + */ + details?: string; } /** - * @interface - * An interface representing ErrorResponse. - * Error response indicates that the service is not able to process the - * incoming request. The reason is provided in the error message. - * + * Result of the transfer eligibility validation. */ -export interface ErrorResponse { +export interface ValidateSubscriptionTransferEligibilityResult { /** - * @member {ErrorDetails} [error] The details of the error. + * Specifies whether the subscription is eligible to be transferred. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - error?: ErrorDetails; + readonly isMoveEligible?: boolean; + /** + * Validation error details. + */ + errorDetails?: ValidateSubscriptionTransferEligibilityError; +} + +/** + * The billing profile details of the partner of the customer for an indirect motion. + */ +export interface IndirectRelationshipInfo { + /** + * The billing account name of the partner or the customer for an indirect motion. + */ + billingAccountName?: string; + /** + * The billing profile name of the partner or the customer for an indirect motion. + */ + billingProfileName?: string; + /** + * The display name of the partner or customer for an indirect motion. + */ + displayName?: string; +} + +/** + * An invoice section. + */ +export interface InvoiceSection extends Resource { + /** + * The name of the invoice section. + */ + displayName?: string; + /** + * Dictionary of metadata associated with the invoice section. + */ + labels?: { [propertyName: string]: string }; + /** + * Identifies the state of an invoice section. Possible values include: 'Active', 'Restricted' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly state?: InvoiceSectionState; + /** + * The system generated unique identifier for an invoice section. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly systemId?: string; + /** + * Identifies the cloud environments that are associated with an invoice section. This is a + * system managed optional field and gets updated as the invoice section gets associated with + * accounts in various clouds. Possible values include: 'USGov', 'USNat', 'USSec' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly targetCloud?: TargetCloud; +} + +/** + * The invoice sections associated to the billing profile. By default this is not populated, unless + * it's specified in $expand. + */ +export interface InvoiceSectionsOnExpand { + /** + * Indicates whether there are more invoice sections than the ones listed in this collection. The + * collection lists a maximum of 50 invoice sections. To get all invoice sections, use the list + * invoice sections API. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly hasMoreResults?: boolean; + /** + * The invoice sections associated to the billing profile. + */ + value?: InvoiceSection[]; +} + +/** + * A billing profile. + */ +export interface BillingProfile extends Resource { + /** + * The name of the billing profile. + */ + displayName?: string; + /** + * The purchase order name that will appear on the invoices generated for the billing profile. + */ + poNumber?: string; + /** + * Identifies which services and purchases are paid by a billing profile. Possible values + * include: 'Direct', 'IndirectCustomer', 'IndirectPartner', 'CSPPartner' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingRelationshipType?: BillingRelationshipType; + /** + * Billing address. + */ + billTo?: AddressDetails; + /** + * Identifies the billing profile that is linked to another billing profile in indirect purchase + * motion. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly indirectRelationshipInfo?: IndirectRelationshipInfo; + /** + * Flag controlling whether the invoices for the billing profile are sent through email. + */ + invoiceEmailOptIn?: boolean; + /** + * The day of the month when the invoice for the billing profile is generated. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly invoiceDay?: number; + /** + * The currency in which the charges for the billing profile are billed. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly currency?: string; + /** + * Information about the enabled azure plans. + */ + enabledAzurePlans?: AzurePlan[]; + /** + * The invoice sections associated to the billing profile. By default this is not populated, + * unless it's specified in $expand. + */ + invoiceSections?: InvoiceSectionsOnExpand; + /** + * Indicates whether user has read access to the billing profile. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly hasReadAccess?: boolean; + /** + * The system generated unique identifier for a billing profile. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly systemId?: string; + /** + * The status of the billing profile. Possible values include: 'Active', 'Disabled', 'Warned' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly status?: BillingProfileStatus; + /** + * Reason for the specified billing profile status. Possible values include: 'PastDue', + * 'SpendingLimitReached', 'SpendingLimitExpired' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly statusReasonCode?: StatusReasonCode; + /** + * The billing profile spending limit. Possible values include: 'Off', 'On' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly spendingLimit?: SpendingLimit; + /** + * Identifies the cloud environments that are associated with a billing profile. This is a system + * managed optional field and gets updated as the billing profile gets associated with accounts + * in various clouds. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly targetClouds?: TargetCloud[]; +} + +/** + * The billing profiles associated with the billing account. By default this is not populated, + * unless it's specified in $expand. + */ +export interface BillingProfilesOnExpand { + /** + * Indicates whether there are more billing profiles than the ones listed in this collection. The + * collection lists a maximum of 50 billing profiles. To get all billing profiles, use the list + * billing profiles API. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly hasMoreResults?: boolean; + /** + * The billing profiles associated with the billing account. + */ + value?: BillingProfile[]; +} + +/** + * The policies for Enterprise Agreement enrollments. + */ +export interface EnrollmentPolicies { + /** + * The policy that controls whether Account Owners can view charges. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly accountOwnerViewCharges?: boolean; + /** + * The policy that controls whether Department Administrators can view charges. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly departmentAdminViewCharges?: boolean; + /** + * The policy that controls whether Azure marketplace purchases are allowed in the enrollment. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly marketplacesEnabled?: boolean; + /** + * The policy that controls whether Azure reservation purchases are allowed in the enrollment. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly reservedInstancesEnabled?: boolean; +} + +/** + * The properties of an enrollment. + */ +export interface Enrollment { + /** + * The start date of the enrollment. + */ + startDate?: Date; + /** + * The end date of the enrollment. + */ + endDate?: Date; + /** + * The billing currency for the enrollment. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly currency?: string; + /** + * The channel type of the enrollment. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly channel?: string; + /** + * The policies for Enterprise Agreement enrollments. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly policies?: EnrollmentPolicies; + /** + * The language for the enrollment. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly language?: string; + /** + * The country code of the enrollment. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly countryCode?: string; + /** + * The current status of the enrollment. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly status?: string; + /** + * The billing cycle for the enrollment. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingCycle?: string; +} + +/** + * An enrollment account. + */ +export interface EnrollmentAccount extends Resource { + /** + * The name of the enrollment account. + */ + accountName?: string; + /** + * The cost center associated with the enrollment account. + */ + costCenter?: string; + /** + * The owner of the enrollment account. + */ + accountOwner?: string; + /** + * The status of the enrollment account. + */ + status?: string; + /** + * The start date of the enrollment account. + */ + startDate?: Date; + /** + * The end date of the enrollment account. + */ + endDate?: Date; + /** + * Associated department. By default this is not populated, unless it's specified in $expand. + */ + department?: Department; +} + +/** + * A department. + */ +export interface Department extends Resource { + /** + * The name of the department. + */ + departmentName?: string; + /** + * The cost center associated with the department. + */ + costCenter?: string; + /** + * The status of the department. + */ + status?: string; + /** + * Associated enrollment accounts. By default this is not populated, unless it's specified in + * $expand. + */ + enrollmentAccounts?: EnrollmentAccount[]; +} + +/** + * A billing account. + */ +export interface BillingAccount extends Resource { + /** + * The billing account name. + */ + displayName?: string; + /** + * The address of the individual or organization that is responsible for the billing account. + */ + soldTo?: AddressDetails; + /** + * The type of agreement. Possible values include: 'MicrosoftCustomerAgreement', + * 'EnterpriseAgreement', 'MicrosoftOnlineServicesProgram', 'MicrosoftPartnerAgreement' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly agreementType?: AgreementType; + /** + * The type of customer. Possible values include: 'Enterprise', 'Individual', 'Partner' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly accountType?: AccountType; + /** + * The current status of the billing account. Possible values include: 'Active', 'Deleted', + * 'Disabled', 'Expired', 'Transferred', 'Extended', 'Terminated' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly accountStatus?: AccountStatus; + /** + * The billing profiles associated with the billing account. By default this is not populated, + * unless it's specified in $expand. + */ + billingProfiles?: BillingProfilesOnExpand; + /** + * The details about the associated legacy enrollment. By default this is not populated, unless + * it's specified in $expand. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly enrollmentDetails?: Enrollment; + /** + * The departments associated to the enrollment. + */ + departments?: Department[]; + /** + * The accounts associated to the enrollment. + */ + enrollmentAccounts?: EnrollmentAccount[]; + /** + * Indicates whether user has read access to the billing account. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly hasReadAccess?: boolean; } /** - * @interface - * An interface representing Invoice. - * An invoice resource can be used download a PDF version of an invoice. - * - * @extends Resource + * The request properties of the billing account that can be updated. + */ +export interface BillingAccountUpdateRequest { + /** + * The billing account name. + */ + displayName?: string; + /** + * The address of the individual or organization that is responsible for the billing account. + */ + soldTo?: AddressDetails; + /** + * The type of agreement. Possible values include: 'MicrosoftCustomerAgreement', + * 'EnterpriseAgreement', 'MicrosoftOnlineServicesProgram', 'MicrosoftPartnerAgreement' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly agreementType?: AgreementType; + /** + * The type of customer. Possible values include: 'Enterprise', 'Individual', 'Partner' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly accountType?: AccountType; + /** + * The current status of the billing account. Possible values include: 'Active', 'Deleted', + * 'Disabled', 'Expired', 'Transferred', 'Extended', 'Terminated' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly accountStatus?: AccountStatus; + /** + * The billing profiles associated with the billing account. By default this is not populated, + * unless it's specified in $expand. + */ + billingProfiles?: BillingProfilesOnExpand; + /** + * The details about the associated legacy enrollment. By default this is not populated, unless + * it's specified in $expand. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly enrollmentDetails?: Enrollment; + /** + * The departments associated to the enrollment. + */ + departments?: Department[]; + /** + * The accounts associated to the enrollment. + */ + enrollmentAccounts?: EnrollmentAccount[]; + /** + * Indicates whether user has read access to the billing account. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly hasReadAccess?: boolean; +} + +/** + * A billing property. + */ +export interface BillingProperty extends Resource { + /** + * The email address on which the account admin gets all Azure notifications. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly accountAdminNotificationEmailAddress?: string; + /** + * The Azure AD tenant ID of the billing account for the subscription. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingTenantId?: string; + /** + * The ID of the billing account to which the subscription is billed. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingAccountId?: string; + /** + * The name of the billing account to which the subscription is billed. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingAccountDisplayName?: string; + /** + * The ID of the billing profile to which the subscription is billed. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingProfileId?: string; + /** + * The name of the billing profile to which the subscription is billed. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingProfileDisplayName?: string; + /** + * The status of the billing profile. Possible values include: 'Active', 'Disabled', 'Warned' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingProfileStatus?: BillingProfileStatus; + /** + * Reason for the specified billing profile status. Possible values include: 'PastDue', + * 'SpendingLimitReached', 'SpendingLimitExpired' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingProfileStatusReasonCode?: BillingProfileStatusReasonCode; + /** + * The billing profile spending limit. Possible values include: 'Off', 'On' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingProfileSpendingLimit?: BillingProfileSpendingLimit; + /** + * The cost center applied to the subscription. + */ + costCenter?: string; + /** + * The ID of the invoice section to which the subscription is billed. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly invoiceSectionId?: string; + /** + * The name of the invoice section to which the subscription is billed. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly invoiceSectionDisplayName?: string; + /** + * Indicates whether user is the account admin. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly isAccountAdmin?: boolean; + /** + * The product ID of the Azure plan. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly productId?: string; + /** + * The product name of the Azure plan. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly productName?: string; + /** + * The sku ID of the Azure plan for the subscription. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly skuId?: string; + /** + * The sku description of the Azure plan for the subscription. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly skuDescription?: string; +} + +/** + * An instruction. + */ +export interface Instruction extends Resource { + /** + * The amount budgeted for this billing instruction. + */ + amount: number; + /** + * The date this billing instruction goes into effect. + */ + startDate: Date; + /** + * The date this billing instruction is no longer in effect. + */ + endDate: Date; + /** + * The date this billing instruction was created. + */ + creationDate?: Date; +} + +/** + * The request parameters for creating a new billing profile. + */ +export interface BillingProfileCreationRequest { + /** + * The name of the billing profile. + */ + displayName?: string; + /** + * The purchase order name that will appear on the invoices generated for the billing profile. + */ + poNumber?: string; + /** + * The address of the individual or organization that is responsible for the billing profile. + */ + billTo?: AddressDetails; + /** + * Flag controlling whether the invoices for the billing profile are sent through email. + */ + invoiceEmailOptIn?: boolean; + /** + * Enabled azure plans for the billing profile. + */ + enabledAzurePlans?: AzurePlan[]; +} + +/** + * The properties of the invoice section. + */ +export interface InvoiceSectionCreationRequest { + /** + * The name of the invoice section. + */ + displayName?: string; +} + +/** + * Invoice section properties with create subscription permission. + */ +export interface InvoiceSectionWithCreateSubPermission { + /** + * The ID of the invoice section. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly invoiceSectionId?: string; + /** + * The name of the invoice section. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly invoiceSectionDisplayName?: string; + /** + * The system generated unique identifier for an invoice section. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly invoiceSectionSystemId?: string; + /** + * The ID of the billing profile for the invoice section. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingProfileId?: string; + /** + * The name of the billing profile for the invoice section. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingProfileDisplayName?: string; + /** + * The status of the billing profile. Possible values include: 'Active', 'Disabled', 'Warned' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingProfileStatus?: BillingProfileStatus; + /** + * Reason for the specified billing profile status. Possible values include: 'PastDue', + * 'SpendingLimitReached', 'SpendingLimitExpired' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingProfileStatusReasonCode?: StatusReasonCodeForBillingProfile; + /** + * The billing profile spending limit. Possible values include: 'Off', 'On' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingProfileSpendingLimit?: SpendingLimitForBillingProfile; + /** + * The system generated unique identifier for a billing profile. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingProfileSystemId?: string; + /** + * Enabled azure plans for the associated billing profile. + */ + enabledAzurePlans?: AzurePlan[]; +} + +/** + * A secure URL that can be used to download a an entity until the URL expires. + */ +export interface DownloadUrl { + /** + * The time in UTC when the download URL will expire. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly expiryTime?: Date; + /** + * The URL to the PDF file. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly url?: string; +} + +/** + * An interface representing ErrorSubDetailsItem. + */ +export interface ErrorSubDetailsItem { + /** + * Error code. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly code?: string; + /** + * Error message indicating why the operation failed. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly message?: string; + /** + * The target of the particular error. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly target?: string; +} + +/** + * The details of the error. + */ +export interface ErrorDetails { + /** + * Error code. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly code?: string; + /** + * Error message indicating why the operation failed. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly message?: string; + /** + * The target of the particular error. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly target?: string; + /** + * The sub details of the error. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly details?: ErrorSubDetailsItem[]; +} + +/** + * Error response indicates that the service is not able to process the incoming request. The + * reason is provided in the error message. + */ +export interface ErrorResponse { + /** + * The details of the error. + */ + error?: ErrorDetails; +} + +/** + * The amount. + */ +export interface Amount { + /** + * The currency for the amount value. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly currency?: string; + /** + * Amount value. + */ + value?: number; +} + +/** + * The properties of a document. + */ +export interface Document { + /** + * The type of the document. Possible values include: 'Invoice', 'VoidNote', 'TaxReceipt', + * 'CreditNote' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly kind?: DocumentType; + /** + * Document URL. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly url?: string; + /** + * The source of the document. ENF for Brazil and DRS for rest of the world. Possible values + * include: 'DRS', 'ENF' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly source?: DocumentSource; +} + +/** + * The properties of a payment. + */ +export interface PaymentProperties { + /** + * The type of payment. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly paymentType?: string; + /** + * The paid amount. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly amount?: Amount; + /** + * The date when the payment was made. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly date?: Date; + /** + * The family of payment method. Possible values include: 'Credits', 'CheckWire', 'CreditCard', + * 'None' + */ + paymentMethodFamily?: PaymentMethodFamily; + /** + * The type of payment method. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly paymentMethodType?: string; +} + +/** + * The rebill details of an invoice. + */ +export interface RebillDetails { + /** + * The ID of credit note. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly creditNoteDocumentId?: string; + /** + * The ID of invoice. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly invoiceDocumentId?: string; + /** + * Rebill details for an invoice. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly rebillDetails?: { [propertyName: string]: RebillDetails }; +} + +/** + * An invoice. + */ +export interface Invoice extends Resource { + /** + * The due date for the invoice. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly dueDate?: Date; + /** + * The date when the invoice was generated. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly invoiceDate?: Date; + /** + * The current status of the invoice. Possible values include: 'Due', 'OverDue', 'Paid', 'Void' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly status?: InvoiceStatus; + /** + * The amount due as of now. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly amountDue?: Amount; + /** + * The amount of Azure prepayment applied to the charges. This field is applicable to billing + * accounts with agreement type Microsoft Customer Agreement. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly azurePrepaymentApplied?: Amount; + /** + * The total charges for the invoice billing period. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billedAmount?: Amount; + /** + * The total refund for returns and cancellations during the invoice billing period. This field + * is applicable to billing accounts with agreement type Microsoft Customer Agreement. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly creditAmount?: Amount; + /** + * The amount of free Azure credits applied to the charges. This field is applicable to billing + * accounts with agreement type Microsoft Customer Agreement. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly freeAzureCreditApplied?: Amount; + /** + * The pre-tax amount due. This field is applicable to billing accounts with agreement type + * Microsoft Customer Agreement. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly subTotal?: Amount; + /** + * The amount of tax charged for the billing period. This field is applicable to billing accounts + * with agreement type Microsoft Customer Agreement. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly taxAmount?: Amount; + /** + * The amount due when the invoice was generated. This field is applicable to billing accounts + * with agreement type Microsoft Customer Agreement. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly totalAmount?: Amount; + /** + * The start date of the billing period for which the invoice is generated. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly invoicePeriodStartDate?: Date; + /** + * The end date of the billing period for which the invoice is generated. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly invoicePeriodEndDate?: Date; + /** + * Invoice type. Possible values include: 'AzureService', 'AzureMarketplace', 'AzureSupport' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly invoiceType?: InvoiceType; + /** + * Specifies if the invoice is generated as part of monthly invoicing cycle or not. This field is + * applicable to billing accounts with agreement type Microsoft Customer Agreement. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly isMonthlyInvoice?: boolean; + /** + * The ID of the billing profile for which the invoice is generated. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingProfileId?: string; + /** + * The name of the billing profile for which the invoice is generated. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingProfileDisplayName?: string; + /** + * An optional purchase order number for the invoice. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly purchaseOrderNumber?: string; + /** + * List of documents available to download such as invoice and tax receipt. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly documents?: Document[]; + /** + * List of payments. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly payments?: PaymentProperties[]; + /** + * Rebill details for an invoice. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly rebillDetails?: { [propertyName: string]: RebillDetails }; + /** + * The type of the document. Possible values include: 'Invoice', 'CreditNote' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly documentType?: InvoiceDocumentType; + /** + * The Id of the active invoice which is originally billed after this invoice was voided. This + * field is applicable to the void invoices only. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billedDocumentId?: string; + /** + * The Id of the invoice which got voided and this credit note was issued as a result. This field + * is applicable to the credit notes only. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly creditForDocumentId?: string; + /** + * The ID of the subscription for which the invoice is generated. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly subscriptionId?: string; +} + +/** + * A product. + */ +export interface Product extends Resource { + /** + * Indicates whether auto renewal is turned on or off for a product. Possible values include: + * 'Off', 'On' + */ + autoRenew?: AutoRenew; + /** + * The display name of the product. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly displayName?: string; + /** + * The date when the product was purchased. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly purchaseDate?: Date; + /** + * The ID of the type of product. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly productTypeId?: string; + /** + * The description of the type of product. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly productType?: string; + /** + * The current status of the product. Possible values include: 'Active', 'Inactive', 'PastDue', + * 'Expiring', 'Expired', 'Disabled', 'Cancelled', 'AutoRenew' + */ + status?: ProductStatusType; + /** + * The date when the product will be renewed or canceled. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly endDate?: Date; + /** + * The frequency at which the product will be billed. Possible values include: 'OneTime', + * 'Monthly', 'UsageBased' + */ + billingFrequency?: BillingFrequency; + /** + * The last month charges. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly lastCharge?: Amount; + /** + * The date of the last charge. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly lastChargeDate?: Date; + /** + * The quantity purchased for the product. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly quantity?: number; + /** + * The sku ID of the product. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly skuId?: string; + /** + * The sku description of the product. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly skuDescription?: string; + /** + * The id of the tenant in which the product is used. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly tenantId?: string; + /** + * The availability of the product. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly availabilityId?: string; + /** + * The ID of the invoice section to which the product is billed. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly invoiceSectionId?: string; + /** + * The name of the invoice section to which the product is billed. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly invoiceSectionDisplayName?: string; + /** + * The ID of the billing profile to which the product is billed. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingProfileId?: string; + /** + * The name of the billing profile to which the product is billed. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingProfileDisplayName?: string; + /** + * The ID of the customer for whom the product was purchased. The field is applicable only for + * Microsoft Partner Agreement billing account. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly customerId?: string; + /** + * The name of the customer for whom the product was purchased. The field is applicable only for + * Microsoft Partner Agreement billing account. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly customerDisplayName?: string; + /** + * Reseller for this product. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly reseller?: Reseller; +} + +/** + * Error details of the product transfer eligibility validation. + */ +export interface ValidateProductTransferEligibilityError { + /** + * Error code for the product transfer validation. Possible values include: 'InvalidSource', + * 'ProductNotActive', 'InsufficientPermissionOnSource', 'InsufficientPermissionOnDestination', + * 'DestinationBillingProfilePastDue', 'ProductTypeNotSupported', + * 'CrossBillingAccountNotAllowed', 'NotAvailableForDestinationMarket', + * 'OneTimePurchaseProductTransferNotAllowed' + */ + code?: ProductTransferValidationErrorCode; + /** + * The error message. + */ + message?: string; + /** + * Detailed error message explaining the error. + */ + details?: string; +} + +/** + * Result of the product transfer eligibility validation. + */ +export interface ValidateProductTransferEligibilityResult { + /** + * Specifies whether the transfer is eligible or not. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly isMoveEligible?: boolean; + /** + * Validation error details. + */ + errorDetails?: ValidateProductTransferEligibilityError; +} + +/** + * A billing subscription. + */ +export interface BillingSubscription extends Resource { + /** + * The name of the subscription. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly displayName?: string; + /** + * The ID of the subscription. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly subscriptionId?: string; + /** + * The current billing status of the subscription. Possible values include: 'Active', 'Inactive', + * 'Abandoned', 'Deleted', 'Warning' + */ + subscriptionBillingStatus?: BillingSubscriptionStatusType; + /** + * The last month charges. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly lastMonthCharges?: Amount; + /** + * The current month to date charges. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly monthToDateCharges?: Amount; + /** + * The ID of the billing profile to which the subscription is billed. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingProfileId?: string; + /** + * The name of the billing profile to which the subscription is billed. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingProfileDisplayName?: string; + /** + * The cost center applied to the subscription. + */ + costCenter?: string; + /** + * The ID of the customer for whom the subscription was created. The field is applicable only for + * Microsoft Partner Agreement billing account. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly customerId?: string; + /** + * The name of the customer for whom the subscription was created. The field is applicable only + * for Microsoft Partner Agreement billing account. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly customerDisplayName?: string; + /** + * The ID of the invoice section to which the subscription is billed. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly invoiceSectionId?: string; + /** + * The name of the invoice section to which the subscription is billed. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly invoiceSectionDisplayName?: string; + /** + * Reseller for this subscription. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly reseller?: Reseller; + /** + * The sku ID of the Azure plan for the subscription. + */ + skuId?: string; + /** + * The sku description of the Azure plan for the subscription. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly skuDescription?: string; +} + +/** + * The enrollment account context + */ +export interface EnrollmentAccountContext { + /** + * The cost center associated with the enrollment account. + */ + costCenter?: string; + /** + * The start date of the enrollment account. + */ + startDate?: Date; + /** + * The end date of the enrollment account. + */ + endDate?: Date; + /** + * The ID of the enrollment account. + */ + enrollmentAccountName?: string; +} + +/** + * A transaction. + */ +export interface Transaction extends Resource { + /** + * The kind of transaction. Options are all or reservation. Possible values include: 'all', + * 'reservation' + */ + kind?: TransactionTypeKind; + /** + * The date of transaction. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly date?: Date; + /** + * Invoice on which the transaction was billed or 'pending' if the transaction is not billed. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly invoice?: string; + /** + * The ID of the invoice on which the transaction was billed. This field is only applicable for + * transactions which are billed. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly invoiceId?: string; + /** + * The order ID of the reservation. The field is only applicable for transaction of kind + * reservation. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly orderId?: string; + /** + * The name of the reservation order. The field is only applicable for transactions of kind + * reservation. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly orderName?: string; + /** + * The family of the product for which the transaction took place. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly productFamily?: string; + /** + * The ID of the product type for which the transaction took place. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly productTypeId?: string; + /** + * The type of the product for which the transaction took place. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly productType?: string; + /** + * The description of the product for which the transaction took place. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly productDescription?: string; + /** + * The type of transaction. Possible values include: 'Purchase', 'Usage Charge' + */ + transactionType?: ReservationType; + /** + * The charge associated with the transaction. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly transactionAmount?: Amount; + /** + * The quantity purchased in the transaction. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly quantity?: number; + /** + * The ID of the invoice section which will be billed for the transaction. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly invoiceSectionId?: string; + /** + * The name of the invoice section which will be billed for the transaction. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly invoiceSectionDisplayName?: string; + /** + * The ID of the billing profile which will be billed for the transaction. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingProfileId?: string; + /** + * The name of the billing profile which will be billed for the transaction. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingProfileDisplayName?: string; + /** + * The ID of the customer for which the transaction took place. The field is applicable only for + * Microsoft Partner Agreement billing account. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly customerId?: string; + /** + * The name of the customer for which the transaction took place. The field is applicable only + * for Microsoft Partner Agreement billing account. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly customerDisplayName?: string; + /** + * The ID of the subscription that was used for the transaction. The field is only applicable for + * transaction of kind reservation. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly subscriptionId?: string; + /** + * The name of the subscription that was used for the transaction. The field is only applicable + * for transaction of kind reservation. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly subscriptionName?: string; + /** + * The type of azure plan of the subscription that was used for the transaction. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly azurePlan?: string; + /** + * The amount of any Azure credits automatically applied to this transaction. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly azureCreditApplied?: Amount; + /** + * The ISO 4217 code for the currency in which this transaction is billed. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingCurrency?: string; + /** + * The percentage discount, if any, applied to this transaction. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly discount?: number; + /** + * The price of the product after applying any discounts. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly effectivePrice?: Amount; + /** + * The exchange rate used to convert charged amount to billing currency, if applicable. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly exchangeRate?: number; + /** + * The retail price of the product. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly marketPrice?: Amount; + /** + * The ISO 4217 code for the currency in which the product is priced. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly pricingCurrency?: string; + /** + * The date of the purchase of the product, or the start date of the month in which usage + * started. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly servicePeriodStartDate?: Date; + /** + * The end date of the product term, or the end date of the month in which usage ended. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly servicePeriodEndDate?: Date; + /** + * The pre-tax charged amount for the transaction. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly subTotal?: Amount; + /** + * The tax amount applied to the transaction. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly tax?: Amount; + /** + * The unit of measure used to bill for the product. For example, compute services are billed per + * hour. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly unitOfMeasure?: string; + /** + * The number of units used for a given product. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly units?: number; + /** + * The description for the unit of measure for a given product. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly unitType?: string; +} + +/** + * A policy. + */ +export interface Policy extends Resource { + /** + * The policy that controls whether Azure marketplace purchases are allowed for a billing + * profile. Possible values include: 'AllAllowed', 'OnlyFreeAllowed', 'NotAllowed' + */ + marketplacePurchases?: MarketplacePurchasesPolicy; + /** + * The policy that controls whether Azure reservation purchases are allowed for a billing + * profile. Possible values include: 'Allowed', 'NotAllowed' + */ + reservationPurchases?: ReservationPurchasesPolicy; + /** + * The policy that controls whether users with Azure RBAC access to a subscription can view its + * charges. Possible values include: 'Allowed', 'NotAllowed' + */ + viewCharges?: ViewChargesPolicy; +} + +/** + * The customer's Policy. + */ +export interface CustomerPolicy extends Resource { + /** + * The policy that controls whether the users in customer's organization can view charges at + * pay-as-you-go prices. Possible values include: 'Allowed', 'NotAllowed' + */ + viewCharges?: ViewCharges; +} + +/** + * The latest Azure credit balance. This is the balance available for pay now. + */ +export interface AvailableBalance extends Resource { + /** + * Balance amount. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly amount?: Amount; +} + +/** + * The object that represents the operation. + */ +export interface OperationDisplay { + /** + * Service provider: Microsoft.Billing. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provider?: string; + /** + * Resource on which the operation is performed such as invoice and billing subscription. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly resource?: string; + /** + * Operation type such as read, write and delete. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly operation?: string; +} + +/** + * A Billing REST API operation. + */ +export interface Operation { + /** + * Operation name: {provider}/{resource}/{operation}. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * The object that represents the operation. + */ + display?: OperationDisplay; +} + +/** + * The role assignment + */ +export interface BillingRoleAssignment extends Resource { + /** + * The date the role assignment was created. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly createdOn?: string; + /** + * The tenant Id of the user who created the role assignment. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly createdByPrincipalTenantId?: string; + /** + * The principal Id of the user who created the role assignment. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly createdByPrincipalId?: string; + /** + * The email address of the user who created the role assignment. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly createdByUserEmailAddress?: string; + /** + * The principal id of the user to whom the role was assigned. + */ + principalId?: string; + /** + * The principal tenant id of the user to whom the role was assigned. + */ + principalTenantId?: string; + /** + * The ID of the role definition. + */ + roleDefinitionId?: string; + /** + * The scope at which the role was assigned. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly scope?: string; + /** + * The authentication type. + */ + userAuthenticationType?: string; + /** + * The email address of the user. + */ + userEmailAddress?: string; +} + +/** + * The set of allowed action and not allowed actions a caller has on a billing account + */ +export interface BillingPermissionsProperties { + /** + * The set of actions that the caller is allowed to perform. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly actions?: string[]; + /** + * The set of actions that the caller is not allowed to perform. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly notActions?: string[]; +} + +/** + * The properties of a role definition. + */ +export interface BillingRoleDefinition extends Resource { + /** + * The role description + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly description?: string; + /** + * The billingPermissions the role has + */ + permissions?: BillingPermissionsProperties[]; + /** + * The name of the role + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly roleName?: string; +} + +/** + * The details about a participant. + */ +export interface Participants { + /** + * The acceptance status of the participant. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly status?: string; + /** + * The date when the status got changed. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly statusDate?: Date; + /** + * The email address of the participant. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly email?: string; +} + +/** + * An agreement. + */ +export interface Agreement extends Resource { + /** + * The URL to download the agreement. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly agreementLink?: string; + /** + * The category of the agreement signed by a customer. Possible values include: + * 'MicrosoftCustomerAgreement', 'AffiliatePurchaseTerms', 'Other' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly category?: Category; + /** + * The mode of acceptance for an agreement. Possible values include: 'ClickToAccept', + * 'ESignEmbedded', 'ESignOffline' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly acceptanceMode?: AcceptanceMode; + /** + * The date from which the agreement is effective. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly effectiveDate?: Date; + /** + * The date when the agreement expires. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly expirationDate?: Date; + /** + * The list of participants that participates in acceptance of an agreement. + */ + participants?: Participants[]; + /** + * The current status of the agreement. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly status?: string; +} + +/** + * An enrollment account resource. + */ +export interface EnrollmentAccountSummary extends Resource { + /** + * The account owner's principal name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly principalName?: string; +} + +/** + * A billing period resource. + */ +export interface BillingPeriod extends Resource { + /** + * The start of the date range covered by the billing period. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingPeriodStartDate?: Date; + /** + * The end of the date range covered by the billing period. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingPeriodEndDate?: Date; + /** + * Array of invoice ids that associated with. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly invoiceIds?: string[]; +} + +/** + * Optional Parameters. + */ +export interface BillingAccountsListOptionalParams extends msRest.RequestOptionsBase { + /** + * May be used to expand the soldTo, invoice sections and billing profiles. + */ + expand?: string; +} + +/** + * Optional Parameters. + */ +export interface BillingAccountsGetOptionalParams extends msRest.RequestOptionsBase { + /** + * May be used to expand the soldTo, invoice sections and billing profiles. + */ + expand?: string; +} + +/** + * Optional Parameters. + */ +export interface BillingProfilesListByBillingAccountOptionalParams extends msRest.RequestOptionsBase { + /** + * May be used to expand the invoice sections. + */ + expand?: string; +} + +/** + * Optional Parameters. + */ +export interface BillingProfilesGetOptionalParams extends msRest.RequestOptionsBase { + /** + * May be used to expand the invoice sections. + */ + expand?: string; +} + +/** + * Optional Parameters. + */ +export interface CustomersListByBillingProfileOptionalParams extends msRest.RequestOptionsBase { + /** + * Used for searching customers by their name. Any customer with name containing the search text + * will be included in the response + */ + search?: string; + /** + * May be used to filter the list of customers. + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface CustomersListByBillingAccountOptionalParams extends msRest.RequestOptionsBase { + /** + * Used for searching customers by their name. Any customer with name containing the search text + * will be included in the response + */ + search?: string; + /** + * May be used to filter the list of customers. + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface CustomersGetOptionalParams extends msRest.RequestOptionsBase { + /** + * May be used to expand enabledAzurePlans and resellers + */ + expand?: string; +} + +/** + * Optional Parameters. + */ +export interface ProductsListByBillingAccountOptionalParams extends msRest.RequestOptionsBase { + /** + * May be used to filter by product type. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and + * 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair + * string where key and value are separated by a colon (:). + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface ProductsListByBillingProfileOptionalParams extends msRest.RequestOptionsBase { + /** + * May be used to filter by product type. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and + * 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair + * string where key and value are separated by a colon (:). + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface ProductsListByInvoiceSectionOptionalParams extends msRest.RequestOptionsBase { + /** + * May be used to filter by product type. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and + * 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair + * string where key and value are separated by a colon (:). + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface ProductsMoveOptionalParams extends msRest.RequestOptionsBase { + /** + * The destination invoice section id. + */ + destinationInvoiceSectionId?: string; +} + +/** + * Optional Parameters. + */ +export interface ProductsValidateMoveOptionalParams extends msRest.RequestOptionsBase { + /** + * The destination invoice section id. + */ + destinationInvoiceSectionId?: string; +} + +/** + * Optional Parameters. + */ +export interface PoliciesUpdateCustomerOptionalParams extends msRest.RequestOptionsBase { + /** + * The policy that controls whether the users in customer's organization can view charges at + * pay-as-you-go prices. Possible values include: 'Allowed', 'NotAllowed' + */ + viewCharges?: ViewCharges; +} + +/** + * Optional Parameters. + */ +export interface BillingPropertyUpdateOptionalParams extends msRest.RequestOptionsBase { + /** + * The cost center applied to the subscription. + */ + costCenter?: string; +} + +/** + * Optional Parameters. + */ +export interface AgreementsListByBillingAccountOptionalParams extends msRest.RequestOptionsBase { + /** + * May be used to expand the participants. + */ + expand?: string; +} + +/** + * Optional Parameters. + */ +export interface AgreementsGetOptionalParams extends msRest.RequestOptionsBase { + /** + * May be used to expand the participants. + */ + expand?: string; +} + +/** + * Optional Parameters. + */ +export interface BillingPeriodsListOptionalParams extends msRest.RequestOptionsBase { + /** + * May be used to filter billing periods by billingPeriodEndDate. The filter supports 'eq', 'lt', + * 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. + */ + filter?: string; + /** + * Skiptoken is only used if a previous operation returned a partial result. If a previous + * response contains a nextLink element, the value of the nextLink element will include a + * skiptoken parameter that specifies a starting point to use for subsequent calls. + */ + skiptoken?: string; + /** + * May be used to limit the number of results to the most recent N billing periods. + */ + top?: number; +} + +/** + * An interface representing BillingManagementClientOptions. + */ +export interface BillingManagementClientOptions extends AzureServiceClientOptions { + baseUri?: string; +} + +/** + * Defines headers for CreateOrUpdate operation. + */ +export interface BillingProfilesCreateOrUpdateHeaders { + /** + * Location URI to poll for result + */ + location: string; + /** + * Recommended time to wait before making another request to check the status of the operation. + * The time is specified in seconds. + */ + retryAfter: number; +} + +/** + * Defines headers for CreateOrUpdate operation. + */ +export interface InvoiceSectionsCreateOrUpdateHeaders { + /** + * Location URI to poll for result + */ + location: string; + /** + * Recommended time to wait before making another request to check the status of the operation. + * The time is specified in seconds. + */ + retryAfter: number; +} + +/** + * Defines headers for DownloadInvoice operation. + */ +export interface InvoicesDownloadInvoiceHeaders { + /** + * GET this URL to retrieve the status of the asynchronous operation. + */ + location: string; + /** + * The amount of delay to use while the status of the operation is checked. The value is + * expressed in seconds. + */ + retryAfter: string; +} + +/** + * Defines headers for DownloadMultipleModernInvoice operation. + */ +export interface InvoicesDownloadMultipleModernInvoiceHeaders { + /** + * GET this URL to retrieve the status of the asynchronous operation. + */ + location: string; + /** + * The amount of delay to use while the status of the operation is checked. The value is + * expressed in seconds. + */ + retryAfter: string; +} + +/** + * Defines headers for DownloadBillingSubscriptionInvoice operation. + */ +export interface InvoicesDownloadBillingSubscriptionInvoiceHeaders { + /** + * GET this URL to retrieve the status of the asynchronous operation. + */ + location: string; + /** + * The amount of delay to use while the status of the operation is checked. The value is + * expressed in seconds. + */ + retryAfter: string; +} + +/** + * Defines headers for DownloadMultipleBillingSubscriptionInvoice operation. + */ +export interface InvoicesDownloadMultipleBillingSubscriptionInvoiceHeaders { + /** + * GET this URL to retrieve the status of the asynchronous operation. + */ + location: string; + /** + * The amount of delay to use while the status of the operation is checked. The value is + * expressed in seconds. + */ + retryAfter: string; +} + +/** + * Defines headers for Move operation. + */ +export interface BillingSubscriptionsMoveHeaders { + /** + * Location URI to poll for result. + */ + location: string; + /** + * Recommended time to wait before making another request to check the status of the operation. + * The time is specified in seconds. + */ + retryAfter: number; +} + +/** + * Defines headers for Move operation. + */ +export interface ProductsMoveHeaders { + /** + * Location URI to poll for result + */ + location: string; + /** + * Recommended time to wait before making another request to check the status of the operation. + * The time is specified in seconds. + */ + retryAfter: number; +} + +/** + * @interface + * The list of billing accounts. + * @extends Array + */ +export interface BillingAccountListResult extends Array { + /** + * The link (url) to the next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * The list of invoice section properties with create subscription permission. + * @extends Array + */ +export interface InvoiceSectionListWithCreateSubPermissionResult extends Array { + /** + * The link (url) to the next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * The list of billing instructions used during invoice generation. + * @extends Array + */ +export interface InstructionListResult extends Array { + /** + * The link (url) to the next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * The list of billing profiles. + * @extends Array + */ +export interface BillingProfileListResult extends Array { + /** + * The link (url) to the next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * The list of customers. + * @extends Array + */ +export interface CustomerListResult extends Array { + /** + * The link (url) to the next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * The list of invoice sections. + * @extends Array + */ +export interface InvoiceSectionListResult extends Array { + /** + * The link (url) to the next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * Result of list billingPermissions a caller has on a billing account. + * @extends Array + */ +export interface BillingPermissionsListResult extends Array { + /** + * The link (url) to the next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * The list of billing subscriptions. + * @extends Array + */ +export interface BillingSubscriptionsListResult extends Array { + /** + * The link (url) to the next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * The list of products. It contains a list of available product summaries in reverse chronological + * order by purchase date. + * @extends Array + */ +export interface ProductsListResult extends Array { + /** + * The link (url) to the next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * The list of invoices. + * @extends Array + */ +export interface InvoiceListResult extends Array { + /** + * The link (url) to the next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * The list of transactions. + * @extends Array + */ +export interface TransactionListResult extends Array { + /** + * The link (url) to the next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * The list of billing operations and a URL link to get the next set of results. + * @extends Array + */ +export interface OperationListResult extends Array { + /** + * URL to get the next set of operation list results if there are any. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * The list of role definitions. + * @extends Array + */ +export interface BillingRoleDefinitionListResult extends Array { + /** + * The link (url) to the next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * The list of role assignments. + * @extends Array + */ +export interface BillingRoleAssignmentListResult extends Array { + /** + * The link (url) to the next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * Result of listing agreements. + * @extends Array + */ +export interface AgreementListResult extends Array { + /** + * The link (url) to the next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * Result of listing enrollment accounts. + * @extends Array + */ +export interface EnrollmentAccountListResult extends Array { + /** + * The link (url) to the next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * Result of listing billing periods. It contains a list of available billing periods in reverse + * chronological order. + * @extends Array + */ +export interface BillingPeriodsListResult extends Array { + /** + * The link (url) to the next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * Defines values for AddressValidationStatus. + * Possible values include: 'Valid', 'Invalid' + * @readonly + * @enum {string} + */ +export type AddressValidationStatus = 'Valid' | 'Invalid'; + +/** + * Defines values for SubscriptionTransferValidationErrorCode. + * Possible values include: 'InvalidSource', 'SubscriptionNotActive', + * 'InsufficientPermissionOnSource', 'InsufficientPermissionOnDestination', + * 'DestinationBillingProfilePastDue', 'SubscriptionTypeNotSupported', + * 'CrossBillingAccountNotAllowed', 'NotAvailableForDestinationMarket' + * @readonly + * @enum {string} + */ +export type SubscriptionTransferValidationErrorCode = 'InvalidSource' | 'SubscriptionNotActive' | 'InsufficientPermissionOnSource' | 'InsufficientPermissionOnDestination' | 'DestinationBillingProfilePastDue' | 'SubscriptionTypeNotSupported' | 'CrossBillingAccountNotAllowed' | 'NotAvailableForDestinationMarket'; + +/** + * Defines values for AgreementType. + * Possible values include: 'MicrosoftCustomerAgreement', 'EnterpriseAgreement', + * 'MicrosoftOnlineServicesProgram', 'MicrosoftPartnerAgreement' + * @readonly + * @enum {string} + */ +export type AgreementType = 'MicrosoftCustomerAgreement' | 'EnterpriseAgreement' | 'MicrosoftOnlineServicesProgram' | 'MicrosoftPartnerAgreement'; + +/** + * Defines values for AccountType. + * Possible values include: 'Enterprise', 'Individual', 'Partner' + * @readonly + * @enum {string} + */ +export type AccountType = 'Enterprise' | 'Individual' | 'Partner'; + +/** + * Defines values for AccountStatus. + * Possible values include: 'Active', 'Deleted', 'Disabled', 'Expired', 'Transferred', 'Extended', + * 'Terminated' + * @readonly + * @enum {string} + */ +export type AccountStatus = 'Active' | 'Deleted' | 'Disabled' | 'Expired' | 'Transferred' | 'Extended' | 'Terminated'; + +/** + * Defines values for BillingRelationshipType. + * Possible values include: 'Direct', 'IndirectCustomer', 'IndirectPartner', 'CSPPartner' + * @readonly + * @enum {string} + */ +export type BillingRelationshipType = 'Direct' | 'IndirectCustomer' | 'IndirectPartner' | 'CSPPartner'; + +/** + * Defines values for InvoiceSectionState. + * Possible values include: 'Active', 'Restricted' + * @readonly + * @enum {string} + */ +export type InvoiceSectionState = 'Active' | 'Restricted'; + +/** + * Defines values for TargetCloud. + * Possible values include: 'USGov', 'USNat', 'USSec' + * @readonly + * @enum {string} + */ +export type TargetCloud = 'USGov' | 'USNat' | 'USSec'; + +/** + * Defines values for BillingProfileStatus. + * Possible values include: 'Active', 'Disabled', 'Warned' + * @readonly + * @enum {string} + */ +export type BillingProfileStatus = 'Active' | 'Disabled' | 'Warned'; + +/** + * Defines values for StatusReasonCode. + * Possible values include: 'PastDue', 'SpendingLimitReached', 'SpendingLimitExpired' + * @readonly + * @enum {string} + */ +export type StatusReasonCode = 'PastDue' | 'SpendingLimitReached' | 'SpendingLimitExpired'; + +/** + * Defines values for SpendingLimit. + * Possible values include: 'Off', 'On' + * @readonly + * @enum {string} + */ +export type SpendingLimit = 'Off' | 'On'; + +/** + * Defines values for BillingProfileStatusReasonCode. + * Possible values include: 'PastDue', 'SpendingLimitReached', 'SpendingLimitExpired' + * @readonly + * @enum {string} + */ +export type BillingProfileStatusReasonCode = 'PastDue' | 'SpendingLimitReached' | 'SpendingLimitExpired'; + +/** + * Defines values for BillingProfileSpendingLimit. + * Possible values include: 'Off', 'On' + * @readonly + * @enum {string} + */ +export type BillingProfileSpendingLimit = 'Off' | 'On'; + +/** + * Defines values for StatusReasonCodeForBillingProfile. + * Possible values include: 'PastDue', 'SpendingLimitReached', 'SpendingLimitExpired' + * @readonly + * @enum {string} + */ +export type StatusReasonCodeForBillingProfile = 'PastDue' | 'SpendingLimitReached' | 'SpendingLimitExpired'; + +/** + * Defines values for SpendingLimitForBillingProfile. + * Possible values include: 'Off', 'On' + * @readonly + * @enum {string} + */ +export type SpendingLimitForBillingProfile = 'Off' | 'On'; + +/** + * Defines values for InvoiceStatus. + * Possible values include: 'Due', 'OverDue', 'Paid', 'Void' + * @readonly + * @enum {string} + */ +export type InvoiceStatus = 'Due' | 'OverDue' | 'Paid' | 'Void'; + +/** + * Defines values for InvoiceType. + * Possible values include: 'AzureService', 'AzureMarketplace', 'AzureSupport' + * @readonly + * @enum {string} + */ +export type InvoiceType = 'AzureService' | 'AzureMarketplace' | 'AzureSupport'; + +/** + * Defines values for DocumentType. + * Possible values include: 'Invoice', 'VoidNote', 'TaxReceipt', 'CreditNote' + * @readonly + * @enum {string} + */ +export type DocumentType = 'Invoice' | 'VoidNote' | 'TaxReceipt' | 'CreditNote'; + +/** + * Defines values for DocumentSource. + * Possible values include: 'DRS', 'ENF' + * @readonly + * @enum {string} + */ +export type DocumentSource = 'DRS' | 'ENF'; + +/** + * Defines values for PaymentMethodFamily. + * Possible values include: 'Credits', 'CheckWire', 'CreditCard', 'None' + * @readonly + * @enum {string} + */ +export type PaymentMethodFamily = 'Credits' | 'CheckWire' | 'CreditCard' | 'None'; + +/** + * Defines values for InvoiceDocumentType. + * Possible values include: 'Invoice', 'CreditNote' + * @readonly + * @enum {string} + */ +export type InvoiceDocumentType = 'Invoice' | 'CreditNote'; + +/** + * Defines values for AutoRenew. + * Possible values include: 'Off', 'On' + * @readonly + * @enum {string} + */ +export type AutoRenew = 'Off' | 'On'; + +/** + * Defines values for ProductStatusType. + * Possible values include: 'Active', 'Inactive', 'PastDue', 'Expiring', 'Expired', 'Disabled', + * 'Cancelled', 'AutoRenew' + * @readonly + * @enum {string} + */ +export type ProductStatusType = 'Active' | 'Inactive' | 'PastDue' | 'Expiring' | 'Expired' | 'Disabled' | 'Cancelled' | 'AutoRenew'; + +/** + * Defines values for BillingFrequency. + * Possible values include: 'OneTime', 'Monthly', 'UsageBased' + * @readonly + * @enum {string} + */ +export type BillingFrequency = 'OneTime' | 'Monthly' | 'UsageBased'; + +/** + * Defines values for ProductTransferValidationErrorCode. + * Possible values include: 'InvalidSource', 'ProductNotActive', 'InsufficientPermissionOnSource', + * 'InsufficientPermissionOnDestination', 'DestinationBillingProfilePastDue', + * 'ProductTypeNotSupported', 'CrossBillingAccountNotAllowed', 'NotAvailableForDestinationMarket', + * 'OneTimePurchaseProductTransferNotAllowed' + * @readonly + * @enum {string} + */ +export type ProductTransferValidationErrorCode = 'InvalidSource' | 'ProductNotActive' | 'InsufficientPermissionOnSource' | 'InsufficientPermissionOnDestination' | 'DestinationBillingProfilePastDue' | 'ProductTypeNotSupported' | 'CrossBillingAccountNotAllowed' | 'NotAvailableForDestinationMarket' | 'OneTimePurchaseProductTransferNotAllowed'; + +/** + * Defines values for BillingSubscriptionStatusType. + * Possible values include: 'Active', 'Inactive', 'Abandoned', 'Deleted', 'Warning' + * @readonly + * @enum {string} + */ +export type BillingSubscriptionStatusType = 'Active' | 'Inactive' | 'Abandoned' | 'Deleted' | 'Warning'; + +/** + * Defines values for TransactionTypeKind. + * Possible values include: 'all', 'reservation' + * @readonly + * @enum {string} + */ +export type TransactionTypeKind = 'all' | 'reservation'; + +/** + * Defines values for ReservationType. + * Possible values include: 'Purchase', 'Usage Charge' + * @readonly + * @enum {string} + */ +export type ReservationType = 'Purchase' | 'Usage Charge'; + +/** + * Defines values for MarketplacePurchasesPolicy. + * Possible values include: 'AllAllowed', 'OnlyFreeAllowed', 'NotAllowed' + * @readonly + * @enum {string} + */ +export type MarketplacePurchasesPolicy = 'AllAllowed' | 'OnlyFreeAllowed' | 'NotAllowed'; + +/** + * Defines values for ReservationPurchasesPolicy. + * Possible values include: 'Allowed', 'NotAllowed' + * @readonly + * @enum {string} + */ +export type ReservationPurchasesPolicy = 'Allowed' | 'NotAllowed'; + +/** + * Defines values for ViewChargesPolicy. + * Possible values include: 'Allowed', 'NotAllowed' + * @readonly + * @enum {string} + */ +export type ViewChargesPolicy = 'Allowed' | 'NotAllowed'; + +/** + * Defines values for ViewCharges. + * Possible values include: 'Allowed', 'NotAllowed' + * @readonly + * @enum {string} + */ +export type ViewCharges = 'Allowed' | 'NotAllowed'; + +/** + * Defines values for Category. + * Possible values include: 'MicrosoftCustomerAgreement', 'AffiliatePurchaseTerms', 'Other' + * @readonly + * @enum {string} + */ +export type Category = 'MicrosoftCustomerAgreement' | 'AffiliatePurchaseTerms' | 'Other'; + +/** + * Defines values for AcceptanceMode. + * Possible values include: 'ClickToAccept', 'ESignEmbedded', 'ESignOffline' + * @readonly + * @enum {string} + */ +export type AcceptanceMode = 'ClickToAccept' | 'ESignEmbedded' | 'ESignOffline'; + +/** + * Contains response data for the list operation. + */ +export type BillingAccountsListResponse = BillingAccountListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingAccountListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type BillingAccountsGetResponse = BillingAccount & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingAccount; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type BillingAccountsUpdateResponse = BillingAccount & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingAccount; + }; +}; + +/** + * Contains response data for the listInvoiceSectionsByCreateSubscriptionPermission operation. + */ +export type BillingAccountsListInvoiceSectionsByCreateSubscriptionPermissionResponse = InvoiceSectionListWithCreateSubPermissionResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: InvoiceSectionListWithCreateSubPermissionResult; + }; +}; + +/** + * Contains response data for the beginUpdate operation. + */ +export type BillingAccountsBeginUpdateResponse = BillingAccount & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingAccount; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type BillingAccountsListNextResponse = BillingAccountListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingAccountListResult; + }; +}; + +/** + * Contains response data for the listInvoiceSectionsByCreateSubscriptionPermissionNext operation. + */ +export type BillingAccountsListInvoiceSectionsByCreateSubscriptionPermissionNextResponse = InvoiceSectionListWithCreateSubPermissionResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: InvoiceSectionListWithCreateSubPermissionResult; + }; +}; + +/** + * Contains response data for the validate operation. + */ +export type AddressValidateResponse = ValidateAddressResponse & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ValidateAddressResponse; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type AvailableBalancesGetResponse = AvailableBalance & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: AvailableBalance; + }; +}; + +/** + * Contains response data for the listByBillingProfile operation. + */ +export type InstructionsListByBillingProfileResponse = InstructionListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: InstructionListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type InstructionsGetResponse = Instruction & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Instruction; + }; +}; + +/** + * Contains response data for the put operation. + */ +export type InstructionsPutResponse = Instruction & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Instruction; + }; +}; + +/** + * Contains response data for the listByBillingProfileNext operation. + */ +export type InstructionsListByBillingProfileNextResponse = InstructionListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: InstructionListResult; + }; +}; + +/** + * Contains response data for the listByBillingAccount operation. + */ +export type BillingProfilesListByBillingAccountResponse = BillingProfileListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingProfileListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type BillingProfilesGetResponse = BillingProfile & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingProfile; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type BillingProfilesCreateOrUpdateResponse = BillingProfile & BillingProfilesCreateOrUpdateHeaders & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: BillingProfilesCreateOrUpdateHeaders; + + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingProfile; + }; +}; + +/** + * Contains response data for the listByBillingAccountNext operation. + */ +export type BillingProfilesListByBillingAccountNextResponse = BillingProfileListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingProfileListResult; + }; +}; + +/** + * Contains response data for the listByBillingProfile operation. + */ +export type CustomersListByBillingProfileResponse = CustomerListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: CustomerListResult; + }; +}; + +/** + * Contains response data for the listByBillingAccount operation. + */ +export type CustomersListByBillingAccountResponse = CustomerListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: CustomerListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type CustomersGetResponse = Customer & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Customer; + }; +}; + +/** + * Contains response data for the listByBillingProfileNext operation. + */ +export type CustomersListByBillingProfileNextResponse = CustomerListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: CustomerListResult; + }; +}; + +/** + * Contains response data for the listByBillingAccountNext operation. + */ +export type CustomersListByBillingAccountNextResponse = CustomerListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: CustomerListResult; + }; +}; + +/** + * Contains response data for the listByBillingProfile operation. + */ +export type InvoiceSectionsListByBillingProfileResponse = InvoiceSectionListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: InvoiceSectionListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type InvoiceSectionsGetResponse = InvoiceSection & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: InvoiceSection; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type InvoiceSectionsCreateOrUpdateResponse = InvoiceSection & InvoiceSectionsCreateOrUpdateHeaders & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: InvoiceSectionsCreateOrUpdateHeaders; + + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: InvoiceSection; + }; +}; + +/** + * Contains response data for the listByBillingProfileNext operation. + */ +export type InvoiceSectionsListByBillingProfileNextResponse = InvoiceSectionListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: InvoiceSectionListResult; + }; +}; + +/** + * Contains response data for the listByCustomer operation. + */ +export type BillingPermissionsListByCustomerResponse = BillingPermissionsListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingPermissionsListResult; + }; +}; + +/** + * Contains response data for the listByBillingAccount operation. + */ +export type BillingPermissionsListByBillingAccountResponse = BillingPermissionsListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingPermissionsListResult; + }; +}; + +/** + * Contains response data for the listByInvoiceSections operation. + */ +export type BillingPermissionsListByInvoiceSectionsResponse = BillingPermissionsListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingPermissionsListResult; + }; +}; + +/** + * Contains response data for the listByBillingProfile operation. + */ +export type BillingPermissionsListByBillingProfileResponse = BillingPermissionsListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingPermissionsListResult; + }; +}; + +/** + * Contains response data for the listByCustomerNext operation. + */ +export type BillingPermissionsListByCustomerNextResponse = BillingPermissionsListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingPermissionsListResult; + }; +}; + +/** + * Contains response data for the listByBillingAccountNext operation. + */ +export type BillingPermissionsListByBillingAccountNextResponse = BillingPermissionsListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingPermissionsListResult; + }; +}; + +/** + * Contains response data for the listByInvoiceSectionsNext operation. + */ +export type BillingPermissionsListByInvoiceSectionsNextResponse = BillingPermissionsListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingPermissionsListResult; + }; +}; + +/** + * Contains response data for the listByBillingProfileNext operation. + */ +export type BillingPermissionsListByBillingProfileNextResponse = BillingPermissionsListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingPermissionsListResult; + }; +}; + +/** + * Contains response data for the listByCustomer operation. + */ +export type BillingSubscriptionsListByCustomerResponse = BillingSubscriptionsListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingSubscriptionsListResult; + }; +}; + +/** + * Contains response data for the listByBillingAccount operation. + */ +export type BillingSubscriptionsListByBillingAccountResponse = BillingSubscriptionsListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingSubscriptionsListResult; + }; +}; + +/** + * Contains response data for the listByBillingProfile operation. + */ +export type BillingSubscriptionsListByBillingProfileResponse = BillingSubscriptionsListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingSubscriptionsListResult; + }; +}; + +/** + * Contains response data for the listByInvoiceSection operation. + */ +export type BillingSubscriptionsListByInvoiceSectionResponse = BillingSubscriptionsListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingSubscriptionsListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type BillingSubscriptionsGetResponse = BillingSubscription & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingSubscription; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type BillingSubscriptionsUpdateResponse = BillingSubscription & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingSubscription; + }; +}; + +/** + * Contains response data for the move operation. + */ +export type BillingSubscriptionsMoveResponse = BillingSubscription & BillingSubscriptionsMoveHeaders & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: BillingSubscriptionsMoveHeaders; + + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingSubscription; + }; +}; + +/** + * Contains response data for the validateMove operation. + */ +export type BillingSubscriptionsValidateMoveResponse = ValidateSubscriptionTransferEligibilityResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ValidateSubscriptionTransferEligibilityResult; + }; +}; + +/** + * Contains response data for the listByCustomerNext operation. + */ +export type BillingSubscriptionsListByCustomerNextResponse = BillingSubscriptionsListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingSubscriptionsListResult; + }; +}; + +/** + * Contains response data for the listByBillingAccountNext operation. + */ +export type BillingSubscriptionsListByBillingAccountNextResponse = BillingSubscriptionsListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingSubscriptionsListResult; + }; +}; + +/** + * Contains response data for the listByBillingProfileNext operation. + */ +export type BillingSubscriptionsListByBillingProfileNextResponse = BillingSubscriptionsListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingSubscriptionsListResult; + }; +}; + +/** + * Contains response data for the listByInvoiceSectionNext operation. + */ +export type BillingSubscriptionsListByInvoiceSectionNextResponse = BillingSubscriptionsListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingSubscriptionsListResult; + }; +}; + +/** + * Contains response data for the listByCustomer operation. + */ +export type ProductsListByCustomerResponse = ProductsListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ProductsListResult; + }; +}; + +/** + * Contains response data for the listByBillingAccount operation. + */ +export type ProductsListByBillingAccountResponse = ProductsListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ProductsListResult; + }; +}; + +/** + * Contains response data for the listByBillingProfile operation. + */ +export type ProductsListByBillingProfileResponse = ProductsListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ProductsListResult; + }; +}; + +/** + * Contains response data for the listByInvoiceSection operation. + */ +export type ProductsListByInvoiceSectionResponse = ProductsListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ProductsListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type ProductsGetResponse = Product & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Product; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type ProductsUpdateResponse = Product & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Product; + }; +}; + +/** + * Contains response data for the move operation. + */ +export type ProductsMoveResponse = Product & ProductsMoveHeaders & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: ProductsMoveHeaders; + + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Product; + }; +}; + +/** + * Contains response data for the validateMove operation. + */ +export type ProductsValidateMoveResponse = ValidateProductTransferEligibilityResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ValidateProductTransferEligibilityResult; + }; +}; + +/** + * Contains response data for the listByCustomerNext operation. + */ +export type ProductsListByCustomerNextResponse = ProductsListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ProductsListResult; + }; +}; + +/** + * Contains response data for the listByBillingAccountNext operation. + */ +export type ProductsListByBillingAccountNextResponse = ProductsListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ProductsListResult; + }; +}; + +/** + * Contains response data for the listByBillingProfileNext operation. + */ +export type ProductsListByBillingProfileNextResponse = ProductsListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ProductsListResult; + }; +}; + +/** + * Contains response data for the listByInvoiceSectionNext operation. + */ +export type ProductsListByInvoiceSectionNextResponse = ProductsListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ProductsListResult; + }; +}; + +/** + * Contains response data for the listByBillingAccount operation. + */ +export type InvoicesListByBillingAccountResponse = InvoiceListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: InvoiceListResult; + }; +}; + +/** + * Contains response data for the listByBillingProfile operation. + */ +export type InvoicesListByBillingProfileResponse = InvoiceListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: InvoiceListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type InvoicesGetResponse = Invoice & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Invoice; + }; +}; + +/** + * Contains response data for the getById operation. + */ +export type InvoicesGetByIdResponse = Invoice & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Invoice; + }; +}; + +/** + * Contains response data for the downloadInvoice operation. + */ +export type InvoicesDownloadInvoiceResponse = DownloadUrl & InvoicesDownloadInvoiceHeaders & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: InvoicesDownloadInvoiceHeaders; + + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: DownloadUrl; + }; +}; + +/** + * Contains response data for the downloadMultipleModernInvoice operation. + */ +export type InvoicesDownloadMultipleModernInvoiceResponse = DownloadUrl & InvoicesDownloadMultipleModernInvoiceHeaders & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: InvoicesDownloadMultipleModernInvoiceHeaders; + + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: DownloadUrl; + }; +}; + +/** + * Contains response data for the listByBillingSubscription operation. + */ +export type InvoicesListByBillingSubscriptionResponse = InvoiceListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: InvoiceListResult; + }; +}; + +/** + * Contains response data for the getBySubscriptionAndInvoiceId operation. + */ +export type InvoicesGetBySubscriptionAndInvoiceIdResponse = Invoice & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Invoice; + }; +}; + +/** + * Contains response data for the downloadBillingSubscriptionInvoice operation. + */ +export type InvoicesDownloadBillingSubscriptionInvoiceResponse = DownloadUrl & InvoicesDownloadBillingSubscriptionInvoiceHeaders & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: InvoicesDownloadBillingSubscriptionInvoiceHeaders; + + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: DownloadUrl; + }; +}; + +/** + * Contains response data for the downloadMultipleBillingSubscriptionInvoice operation. + */ +export type InvoicesDownloadMultipleBillingSubscriptionInvoiceResponse = DownloadUrl & InvoicesDownloadMultipleBillingSubscriptionInvoiceHeaders & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: InvoicesDownloadMultipleBillingSubscriptionInvoiceHeaders; + + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: DownloadUrl; + }; +}; + +/** + * Contains response data for the listByBillingAccountNext operation. + */ +export type InvoicesListByBillingAccountNextResponse = InvoiceListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: InvoiceListResult; + }; +}; + +/** + * Contains response data for the listByBillingProfileNext operation. + */ +export type InvoicesListByBillingProfileNextResponse = InvoiceListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: InvoiceListResult; + }; +}; + +/** + * Contains response data for the listByBillingSubscriptionNext operation. + */ +export type InvoicesListByBillingSubscriptionNextResponse = InvoiceListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: InvoiceListResult; + }; +}; + +/** + * Contains response data for the listByInvoice operation. + */ +export type TransactionsListByInvoiceResponse = TransactionListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: TransactionListResult; + }; +}; + +/** + * Contains response data for the listByInvoiceNext operation. + */ +export type TransactionsListByInvoiceNextResponse = TransactionListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: TransactionListResult; + }; +}; + +/** + * Contains response data for the getByBillingProfile operation. + */ +export type PoliciesGetByBillingProfileResponse = Policy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Policy; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type PoliciesUpdateResponse = Policy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Policy; + }; +}; + +/** + * Contains response data for the getByCustomer operation. + */ +export type PoliciesGetByCustomerResponse = CustomerPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: CustomerPolicy; + }; +}; + +/** + * Contains response data for the updateCustomer operation. + */ +export type PoliciesUpdateCustomerResponse = CustomerPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: CustomerPolicy; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type BillingPropertyGetResponse = BillingProperty & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingProperty; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type BillingPropertyUpdateResponse = BillingProperty & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingProperty; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type OperationsListResponse = OperationListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationListResult; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type OperationsListNextResponse = OperationListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationListResult; + }; +}; + +/** + * Contains response data for the getByBillingAccount operation. + */ +export type BillingRoleDefinitionsGetByBillingAccountResponse = BillingRoleDefinition & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingRoleDefinition; + }; +}; + +/** + * Contains response data for the getByInvoiceSection operation. + */ +export type BillingRoleDefinitionsGetByInvoiceSectionResponse = BillingRoleDefinition & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingRoleDefinition; + }; +}; + +/** + * Contains response data for the getByBillingProfile operation. + */ +export type BillingRoleDefinitionsGetByBillingProfileResponse = BillingRoleDefinition & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingRoleDefinition; + }; +}; + +/** + * Contains response data for the listByBillingAccount operation. + */ +export type BillingRoleDefinitionsListByBillingAccountResponse = BillingRoleDefinitionListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingRoleDefinitionListResult; + }; +}; + +/** + * Contains response data for the listByInvoiceSection operation. + */ +export type BillingRoleDefinitionsListByInvoiceSectionResponse = BillingRoleDefinitionListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingRoleDefinitionListResult; + }; +}; + +/** + * Contains response data for the listByBillingProfile operation. + */ +export type BillingRoleDefinitionsListByBillingProfileResponse = BillingRoleDefinitionListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingRoleDefinitionListResult; + }; +}; + +/** + * Contains response data for the listByBillingAccountNext operation. + */ +export type BillingRoleDefinitionsListByBillingAccountNextResponse = BillingRoleDefinitionListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingRoleDefinitionListResult; + }; +}; + +/** + * Contains response data for the listByInvoiceSectionNext operation. + */ +export type BillingRoleDefinitionsListByInvoiceSectionNextResponse = BillingRoleDefinitionListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingRoleDefinitionListResult; + }; +}; + +/** + * Contains response data for the listByBillingProfileNext operation. */ -export interface Invoice extends Resource { - /** - * @member {DownloadUrl} [downloadUrl] A secure link to download the PDF - * version of an invoice. The link will cease to work after its expiry time - * is reached. - */ - downloadUrl?: DownloadUrl; - /** - * @member {Date} [invoicePeriodStartDate] The start of the date range - * covered by the invoice. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly invoicePeriodStartDate?: Date; - /** - * @member {Date} [invoicePeriodEndDate] The end of the date range covered by - * the invoice. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly invoicePeriodEndDate?: Date; +export type BillingRoleDefinitionsListByBillingProfileNextResponse = BillingRoleDefinitionListResult & { /** - * @member {string[]} [billingPeriodIds] Array of billing perdiod ids that - * the invoice is attributed to. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The underlying HTTP response. */ - readonly billingPeriodIds?: string[]; -} + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingRoleDefinitionListResult; + }; +}; /** - * @interface - * An interface representing OperationDisplay. - * The object that represents the operation. - * + * Contains response data for the getByBillingAccount operation. */ -export interface OperationDisplay { - /** - * @member {string} [provider] Service provider: Microsoft.Billing. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly provider?: string; - /** - * @member {string} [resource] Resource on which the operation is performed: - * Invoice, etc. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly resource?: string; +export type BillingRoleAssignmentsGetByBillingAccountResponse = BillingRoleAssignment & { /** - * @member {string} [operation] Operation type: Read, write, delete, etc. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The underlying HTTP response. */ - readonly operation?: string; -} + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingRoleAssignment; + }; +}; /** - * @interface - * An interface representing Operation. - * A Billing REST API operation. - * + * Contains response data for the deleteByBillingAccount operation. */ -export interface Operation { - /** - * @member {string} [name] Operation name: {provider}/{resource}/{operation}. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly name?: string; +export type BillingRoleAssignmentsDeleteByBillingAccountResponse = BillingRoleAssignment & { /** - * @member {OperationDisplay} [display] The object that represents the - * operation. + * The underlying HTTP response. */ - display?: OperationDisplay; -} + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingRoleAssignment; + }; +}; /** - * @interface - * An interface representing BillingPeriodsListOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * Contains response data for the getByInvoiceSection operation. */ -export interface BillingPeriodsListOptionalParams extends msRest.RequestOptionsBase { - /** - * @member {string} [filter] May be used to filter billing periods by - * billingPeriodEndDate. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', - * and 'and'. It does not currently support 'ne', 'or', or 'not'. - */ - filter?: string; - /** - * @member {string} [skiptoken] Skiptoken is only used if a previous - * operation returned a partial result. If a previous response contains a - * nextLink element, the value of the nextLink element will include a - * skiptoken parameter that specifies a starting point to use for subsequent - * calls. - */ - skiptoken?: string; +export type BillingRoleAssignmentsGetByInvoiceSectionResponse = BillingRoleAssignment & { /** - * @member {number} [top] May be used to limit the number of results to the - * most recent N billing periods. + * The underlying HTTP response. */ - top?: number; -} + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingRoleAssignment; + }; +}; /** - * @interface - * An interface representing InvoicesListOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * Contains response data for the deleteByInvoiceSection operation. */ -export interface InvoicesListOptionalParams extends msRest.RequestOptionsBase { - /** - * @member {string} [expand] May be used to expand the downloadUrl property - * within a list of invoices. This enables download links to be generated for - * multiple invoices at once. By default, downloadURLs are not included when - * listing invoices. - */ - expand?: string; - /** - * @member {string} [filter] May be used to filter invoices by - * invoicePeriodEndDate. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', - * and 'and'. It does not currently support 'ne', 'or', or 'not'. - */ - filter?: string; +export type BillingRoleAssignmentsDeleteByInvoiceSectionResponse = BillingRoleAssignment & { /** - * @member {string} [skiptoken] Skiptoken is only used if a previous - * operation returned a partial result. If a previous response contains a - * nextLink element, the value of the nextLink element will include a - * skiptoken parameter that specifies a starting point to use for subsequent - * calls. - */ - skiptoken?: string; - /** - * @member {number} [top] May be used to limit the number of results to the - * most recent N invoices. + * The underlying HTTP response. */ - top?: number; -} + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingRoleAssignment; + }; +}; /** - * @interface - * An interface representing BillingManagementClientOptions. - * @extends AzureServiceClientOptions + * Contains response data for the getByBillingProfile operation. */ -export interface BillingManagementClientOptions extends AzureServiceClientOptions { +export type BillingRoleAssignmentsGetByBillingProfileResponse = BillingRoleAssignment & { /** - * @member {string} [baseUri] + * The underlying HTTP response. */ - baseUri?: string; -} + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingRoleAssignment; + }; +}; /** - * @interface - * An interface representing the EnrollmentAccountListResult. - * Result of listing enrollment accounts. - * - * @extends Array + * Contains response data for the deleteByBillingProfile operation. */ -export interface EnrollmentAccountListResult extends Array { +export type BillingRoleAssignmentsDeleteByBillingProfileResponse = BillingRoleAssignment & { /** - * @member {string} [nextLink] The link (url) to the next page of results. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The underlying HTTP response. */ - readonly nextLink?: string; -} + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingRoleAssignment; + }; +}; /** - * @interface - * An interface representing the BillingPeriodsListResult. - * Result of listing billing periods. It contains a list of available billing - * periods in reverse chronological order. - * - * @extends Array + * Contains response data for the listByBillingAccount operation. */ -export interface BillingPeriodsListResult extends Array { +export type BillingRoleAssignmentsListByBillingAccountResponse = BillingRoleAssignmentListResult & { /** - * @member {string} [nextLink] The link (url) to the next page of results. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The underlying HTTP response. */ - readonly nextLink?: string; -} + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingRoleAssignmentListResult; + }; +}; /** - * @interface - * An interface representing the InvoicesListResult. - * Result of listing invoices. It contains a list of available invoices in - * reverse chronological order. - * - * @extends Array + * Contains response data for the listByInvoiceSection operation. */ -export interface InvoicesListResult extends Array { +export type BillingRoleAssignmentsListByInvoiceSectionResponse = BillingRoleAssignmentListResult & { /** - * @member {string} [nextLink] The link (url) to the next page of results. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The underlying HTTP response. */ - readonly nextLink?: string; -} + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingRoleAssignmentListResult; + }; +}; /** - * @interface - * An interface representing the OperationListResult. - * Result listing billing operations. It contains a list of operations and a - * URL link to get the next set of results. - * - * @extends Array + * Contains response data for the listByBillingProfile operation. */ -export interface OperationListResult extends Array { +export type BillingRoleAssignmentsListByBillingProfileResponse = BillingRoleAssignmentListResult & { /** - * @member {string} [nextLink] URL to get the next set of operation list - * results if there are any. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The underlying HTTP response. */ - readonly nextLink?: string; -} + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingRoleAssignmentListResult; + }; +}; /** - * Contains response data for the list operation. + * Contains response data for the listByBillingAccountNext operation. */ -export type EnrollmentAccountsListResponse = EnrollmentAccountListResult & { +export type BillingRoleAssignmentsListByBillingAccountNextResponse = BillingRoleAssignmentListResult & { /** * The underlying HTTP response. */ @@ -396,17 +4720,18 @@ export type EnrollmentAccountsListResponse = EnrollmentAccountListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: EnrollmentAccountListResult; + parsedBody: BillingRoleAssignmentListResult; }; }; /** - * Contains response data for the get operation. + * Contains response data for the listByInvoiceSectionNext operation. */ -export type EnrollmentAccountsGetResponse = EnrollmentAccount & { +export type BillingRoleAssignmentsListByInvoiceSectionNextResponse = BillingRoleAssignmentListResult & { /** * The underlying HTTP response. */ @@ -415,17 +4740,18 @@ export type EnrollmentAccountsGetResponse = EnrollmentAccount & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: EnrollmentAccount; + parsedBody: BillingRoleAssignmentListResult; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the listByBillingProfileNext operation. */ -export type EnrollmentAccountsListNextResponse = EnrollmentAccountListResult & { +export type BillingRoleAssignmentsListByBillingProfileNextResponse = BillingRoleAssignmentListResult & { /** * The underlying HTTP response. */ @@ -434,17 +4760,18 @@ export type EnrollmentAccountsListNextResponse = EnrollmentAccountListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: EnrollmentAccountListResult; + parsedBody: BillingRoleAssignmentListResult; }; }; /** - * Contains response data for the list operation. + * Contains response data for the listByBillingAccount operation. */ -export type BillingPeriodsListResponse = BillingPeriodsListResult & { +export type AgreementsListByBillingAccountResponse = AgreementListResult & { /** * The underlying HTTP response. */ @@ -453,17 +4780,18 @@ export type BillingPeriodsListResponse = BillingPeriodsListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: BillingPeriodsListResult; + parsedBody: AgreementListResult; }; }; /** * Contains response data for the get operation. */ -export type BillingPeriodsGetResponse = BillingPeriod & { +export type AgreementsGetResponse = Agreement & { /** * The underlying HTTP response. */ @@ -472,17 +4800,18 @@ export type BillingPeriodsGetResponse = BillingPeriod & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: BillingPeriod; + parsedBody: Agreement; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the listByBillingAccountNext operation. */ -export type BillingPeriodsListNextResponse = BillingPeriodsListResult & { +export type AgreementsListByBillingAccountNextResponse = AgreementListResult & { /** * The underlying HTTP response. */ @@ -491,17 +4820,18 @@ export type BillingPeriodsListNextResponse = BillingPeriodsListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: BillingPeriodsListResult; + parsedBody: AgreementListResult; }; }; /** * Contains response data for the list operation. */ -export type InvoicesListResponse = InvoicesListResult & { +export type EnrollmentAccountsListResponse = EnrollmentAccountListResult & { /** * The underlying HTTP response. */ @@ -510,17 +4840,18 @@ export type InvoicesListResponse = InvoicesListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: InvoicesListResult; + parsedBody: EnrollmentAccountListResult; }; }; /** * Contains response data for the get operation. */ -export type InvoicesGetResponse = Invoice & { +export type EnrollmentAccountsGetResponse = EnrollmentAccountSummary & { /** * The underlying HTTP response. */ @@ -529,17 +4860,18 @@ export type InvoicesGetResponse = Invoice & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: Invoice; + parsedBody: EnrollmentAccountSummary; }; }; /** - * Contains response data for the getLatest operation. + * Contains response data for the listNext operation. */ -export type InvoicesGetLatestResponse = Invoice & { +export type EnrollmentAccountsListNextResponse = EnrollmentAccountListResult & { /** * The underlying HTTP response. */ @@ -548,17 +4880,18 @@ export type InvoicesGetLatestResponse = Invoice & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: Invoice; + parsedBody: EnrollmentAccountListResult; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the list operation. */ -export type InvoicesListNextResponse = InvoicesListResult & { +export type BillingPeriodsListResponse = BillingPeriodsListResult & { /** * The underlying HTTP response. */ @@ -567,17 +4900,18 @@ export type InvoicesListNextResponse = InvoicesListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: InvoicesListResult; + parsedBody: BillingPeriodsListResult; }; }; /** - * Contains response data for the list operation. + * Contains response data for the get operation. */ -export type OperationsListResponse = OperationListResult & { +export type BillingPeriodsGetResponse = BillingPeriod & { /** * The underlying HTTP response. */ @@ -586,17 +4920,18 @@ export type OperationsListResponse = OperationListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: OperationListResult; + parsedBody: BillingPeriod; }; }; /** * Contains response data for the listNext operation. */ -export type OperationsListNextResponse = OperationListResult & { +export type BillingPeriodsListNextResponse = BillingPeriodsListResult & { /** * The underlying HTTP response. */ @@ -605,9 +4940,10 @@ export type OperationsListNextResponse = OperationListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: OperationListResult; + parsedBody: BillingPeriodsListResult; }; }; diff --git a/sdk/billing/arm-billing/src/models/instructionsMappers.ts b/sdk/billing/arm-billing/src/models/instructionsMappers.ts new file mode 100644 index 000000000000..42a58ed41495 --- /dev/null +++ b/sdk/billing/arm-billing/src/models/instructionsMappers.ts @@ -0,0 +1,50 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + AddressDetails, + Agreement, + Amount, + AvailableBalance, + AzurePlan, + BaseResource, + BillingAccount, + BillingPeriod, + BillingPermissionsProperties, + BillingProfile, + BillingProfilesOnExpand, + BillingProperty, + BillingRoleAssignment, + BillingRoleDefinition, + BillingSubscription, + Customer, + CustomerPolicy, + Department, + Document, + Enrollment, + EnrollmentAccount, + EnrollmentAccountSummary, + EnrollmentPolicies, + ErrorDetails, + ErrorResponse, + ErrorSubDetailsItem, + IndirectRelationshipInfo, + Instruction, + InstructionListResult, + Invoice, + InvoiceSection, + InvoiceSectionsOnExpand, + Participants, + PaymentProperties, + Policy, + Product, + RebillDetails, + Reseller, + Resource, + Transaction +} from "../models/mappers"; diff --git a/sdk/billing/arm-billing/src/models/invoiceSectionsMappers.ts b/sdk/billing/arm-billing/src/models/invoiceSectionsMappers.ts new file mode 100644 index 000000000000..71bb1946d80f --- /dev/null +++ b/sdk/billing/arm-billing/src/models/invoiceSectionsMappers.ts @@ -0,0 +1,51 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + AddressDetails, + Agreement, + Amount, + AvailableBalance, + AzurePlan, + BaseResource, + BillingAccount, + BillingPeriod, + BillingPermissionsProperties, + BillingProfile, + BillingProfilesOnExpand, + BillingProperty, + BillingRoleAssignment, + BillingRoleDefinition, + BillingSubscription, + Customer, + CustomerPolicy, + Department, + Document, + Enrollment, + EnrollmentAccount, + EnrollmentAccountSummary, + EnrollmentPolicies, + ErrorDetails, + ErrorResponse, + ErrorSubDetailsItem, + IndirectRelationshipInfo, + Instruction, + Invoice, + InvoiceSection, + InvoiceSectionListResult, + InvoiceSectionsCreateOrUpdateHeaders, + InvoiceSectionsOnExpand, + Participants, + PaymentProperties, + Policy, + Product, + RebillDetails, + Reseller, + Resource, + Transaction +} from "../models/mappers"; diff --git a/sdk/billing/arm-billing/src/models/invoicesMappers.ts b/sdk/billing/arm-billing/src/models/invoicesMappers.ts index 00efc9fad1ef..7046ed5a5254 100644 --- a/sdk/billing/arm-billing/src/models/invoicesMappers.ts +++ b/sdk/billing/arm-billing/src/models/invoicesMappers.ts @@ -1,22 +1,55 @@ /* * 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. */ export { - InvoicesListResult, - Invoice, - Resource, + AddressDetails, + Agreement, + Amount, + AvailableBalance, + AzurePlan, BaseResource, + BillingAccount, + BillingPeriod, + BillingPermissionsProperties, + BillingProfile, + BillingProfilesOnExpand, + BillingProperty, + BillingRoleAssignment, + BillingRoleDefinition, + BillingSubscription, + Customer, + CustomerPolicy, + Department, + Document, DownloadUrl, - ErrorResponse, - ErrorDetails, + Enrollment, EnrollmentAccount, - BillingPeriod + EnrollmentAccountSummary, + EnrollmentPolicies, + ErrorDetails, + ErrorResponse, + ErrorSubDetailsItem, + IndirectRelationshipInfo, + Instruction, + Invoice, + InvoiceListResult, + InvoicesDownloadBillingSubscriptionInvoiceHeaders, + InvoicesDownloadInvoiceHeaders, + InvoicesDownloadMultipleBillingSubscriptionInvoiceHeaders, + InvoicesDownloadMultipleModernInvoiceHeaders, + InvoiceSection, + InvoiceSectionsOnExpand, + Participants, + PaymentProperties, + Policy, + Product, + RebillDetails, + Reseller, + Resource, + Transaction } from "../models/mappers"; - diff --git a/sdk/billing/arm-billing/src/models/mappers.ts b/sdk/billing/arm-billing/src/models/mappers.ts index 7a43d33d35f4..c6c6f05e5db6 100644 --- a/sdk/billing/arm-billing/src/models/mappers.ts +++ b/sdk/billing/arm-billing/src/models/mappers.ts @@ -1,11 +1,9 @@ /* * 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. */ import { CloudErrorMapper, BaseResourceMapper } from "@azure/ms-rest-azure-js"; @@ -14,6 +12,53 @@ import * as msRest from "@azure/ms-rest-js"; export const CloudError = CloudErrorMapper; export const BaseResource = BaseResourceMapper; +export const AzurePlan: msRest.CompositeMapper = { + serializedName: "AzurePlan", + type: { + name: "Composite", + className: "AzurePlan", + modelProperties: { + skuId: { + serializedName: "skuId", + type: { + name: "String" + } + }, + skuDescription: { + readOnly: true, + serializedName: "skuDescription", + type: { + name: "String" + } + } + } + } +}; + +export const Reseller: msRest.CompositeMapper = { + serializedName: "Reseller", + type: { + name: "Composite", + className: "Reseller", + modelProperties: { + resellerId: { + readOnly: true, + serializedName: "resellerId", + type: { + name: "String" + } + }, + description: { + readOnly: true, + serializedName: "description", + type: { + name: "String" + } + } + } + } +}; + export const Resource: msRest.CompositeMapper = { serializedName: "Resource", type: { @@ -34,9 +79,3020 @@ export const Resource: msRest.CompositeMapper = { name: "String" } }, - type: { + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const Customer: msRest.CompositeMapper = { + serializedName: "Customer", + type: { + name: "Composite", + className: "Customer", + modelProperties: { + ...Resource.type.modelProperties, + billingProfileId: { + readOnly: true, + serializedName: "properties.billingProfileId", + type: { + name: "String" + } + }, + billingProfileDisplayName: { + readOnly: true, + serializedName: "properties.billingProfileDisplayName", + type: { + name: "String" + } + }, + displayName: { + serializedName: "properties.displayName", + type: { + name: "String" + } + }, + enabledAzurePlans: { + serializedName: "properties.enabledAzurePlans", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AzurePlan" + } + } + } + }, + resellers: { + serializedName: "properties.resellers", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Reseller" + } + } + } + } + } + } +}; + +export const AddressDetails: msRest.CompositeMapper = { + serializedName: "AddressDetails", + type: { + name: "Composite", + className: "AddressDetails", + modelProperties: { + firstName: { + serializedName: "firstName", + type: { + name: "String" + } + }, + lastName: { + serializedName: "lastName", + type: { + name: "String" + } + }, + companyName: { + serializedName: "companyName", + type: { + name: "String" + } + }, + addressLine1: { + required: true, + serializedName: "addressLine1", + type: { + name: "String" + } + }, + addressLine2: { + serializedName: "addressLine2", + type: { + name: "String" + } + }, + addressLine3: { + serializedName: "addressLine3", + type: { + name: "String" + } + }, + city: { + serializedName: "city", + type: { + name: "String" + } + }, + district: { + serializedName: "district", + type: { + name: "String" + } + }, + region: { + serializedName: "region", + type: { + name: "String" + } + }, + country: { + required: true, + serializedName: "country", + type: { + name: "String" + } + }, + postalCode: { + serializedName: "postalCode", + type: { + name: "String" + } + }, + email: { + serializedName: "email", + type: { + name: "String" + } + }, + phoneNumber: { + serializedName: "phoneNumber", + type: { + name: "String" + } + } + } + } +}; + +export const ValidateAddressResponse: msRest.CompositeMapper = { + serializedName: "ValidateAddressResponse", + type: { + name: "Composite", + className: "ValidateAddressResponse", + modelProperties: { + status: { + serializedName: "status", + type: { + name: "String" + } + }, + suggestedAddresses: { + serializedName: "suggestedAddresses", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AddressDetails" + } + } + } + }, + validationMessage: { + serializedName: "validationMessage", + type: { + name: "String" + } + } + } + } +}; + +export const TransferProductRequestProperties: msRest.CompositeMapper = { + serializedName: "TransferProductRequestProperties", + type: { + name: "Composite", + className: "TransferProductRequestProperties", + modelProperties: { + destinationInvoiceSectionId: { + serializedName: "destinationInvoiceSectionId", + type: { + name: "String" + } + } + } + } +}; + +export const TransferBillingSubscriptionRequestProperties: msRest.CompositeMapper = { + serializedName: "TransferBillingSubscriptionRequestProperties", + type: { + name: "Composite", + className: "TransferBillingSubscriptionRequestProperties", + modelProperties: { + destinationInvoiceSectionId: { + required: true, + serializedName: "destinationInvoiceSectionId", + type: { + name: "String" + } + } + } + } +}; + +export const ValidateSubscriptionTransferEligibilityError: msRest.CompositeMapper = { + serializedName: "ValidateSubscriptionTransferEligibilityError", + type: { + name: "Composite", + className: "ValidateSubscriptionTransferEligibilityError", + modelProperties: { + code: { + serializedName: "code", + type: { + name: "String" + } + }, + message: { + serializedName: "message", + type: { + name: "String" + } + }, + details: { + serializedName: "details", + type: { + name: "String" + } + } + } + } +}; + +export const ValidateSubscriptionTransferEligibilityResult: msRest.CompositeMapper = { + serializedName: "ValidateSubscriptionTransferEligibilityResult", + type: { + name: "Composite", + className: "ValidateSubscriptionTransferEligibilityResult", + modelProperties: { + isMoveEligible: { + readOnly: true, + serializedName: "isMoveEligible", + type: { + name: "Boolean" + } + }, + errorDetails: { + serializedName: "errorDetails", + type: { + name: "Composite", + className: "ValidateSubscriptionTransferEligibilityError" + } + } + } + } +}; + +export const IndirectRelationshipInfo: msRest.CompositeMapper = { + serializedName: "IndirectRelationshipInfo", + type: { + name: "Composite", + className: "IndirectRelationshipInfo", + modelProperties: { + billingAccountName: { + serializedName: "billingAccountName", + type: { + name: "String" + } + }, + billingProfileName: { + serializedName: "billingProfileName", + type: { + name: "String" + } + }, + displayName: { + serializedName: "displayName", + type: { + name: "String" + } + } + } + } +}; + +export const InvoiceSection: msRest.CompositeMapper = { + serializedName: "InvoiceSection", + type: { + name: "Composite", + className: "InvoiceSection", + modelProperties: { + ...Resource.type.modelProperties, + displayName: { + serializedName: "properties.displayName", + type: { + name: "String" + } + }, + labels: { + serializedName: "properties.labels", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + state: { + readOnly: true, + serializedName: "properties.state", + type: { + name: "String" + } + }, + systemId: { + readOnly: true, + serializedName: "properties.systemId", + type: { + name: "String" + } + }, + targetCloud: { + readOnly: true, + serializedName: "properties.targetCloud", + type: { + name: "String" + } + } + } + } +}; + +export const InvoiceSectionsOnExpand: msRest.CompositeMapper = { + serializedName: "InvoiceSectionsOnExpand", + type: { + name: "Composite", + className: "InvoiceSectionsOnExpand", + modelProperties: { + hasMoreResults: { + readOnly: true, + serializedName: "hasMoreResults", + type: { + name: "Boolean" + } + }, + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "InvoiceSection" + } + } + } + } + } + } +}; + +export const BillingProfile: msRest.CompositeMapper = { + serializedName: "BillingProfile", + type: { + name: "Composite", + className: "BillingProfile", + modelProperties: { + ...Resource.type.modelProperties, + displayName: { + serializedName: "properties.displayName", + type: { + name: "String" + } + }, + poNumber: { + serializedName: "properties.poNumber", + type: { + name: "String" + } + }, + billingRelationshipType: { + readOnly: true, + serializedName: "properties.billingRelationshipType", + type: { + name: "String" + } + }, + billTo: { + serializedName: "properties.billTo", + type: { + name: "Composite", + className: "AddressDetails" + } + }, + indirectRelationshipInfo: { + readOnly: true, + serializedName: "properties.indirectRelationshipInfo", + type: { + name: "Composite", + className: "IndirectRelationshipInfo" + } + }, + invoiceEmailOptIn: { + serializedName: "properties.invoiceEmailOptIn", + type: { + name: "Boolean" + } + }, + invoiceDay: { + readOnly: true, + serializedName: "properties.invoiceDay", + type: { + name: "Number" + } + }, + currency: { + readOnly: true, + serializedName: "properties.currency", + type: { + name: "String" + } + }, + enabledAzurePlans: { + serializedName: "properties.enabledAzurePlans", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AzurePlan" + } + } + } + }, + invoiceSections: { + serializedName: "properties.invoiceSections", + type: { + name: "Composite", + className: "InvoiceSectionsOnExpand" + } + }, + hasReadAccess: { + readOnly: true, + serializedName: "properties.hasReadAccess", + type: { + name: "Boolean" + } + }, + systemId: { + readOnly: true, + serializedName: "properties.systemId", + type: { + name: "String" + } + }, + status: { + readOnly: true, + serializedName: "properties.status", + type: { + name: "String" + } + }, + statusReasonCode: { + readOnly: true, + serializedName: "properties.statusReasonCode", + type: { + name: "String" + } + }, + spendingLimit: { + readOnly: true, + serializedName: "properties.spendingLimit", + type: { + name: "String" + } + }, + targetClouds: { + readOnly: true, + serializedName: "properties.targetClouds", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const BillingProfilesOnExpand: msRest.CompositeMapper = { + serializedName: "BillingProfilesOnExpand", + type: { + name: "Composite", + className: "BillingProfilesOnExpand", + modelProperties: { + hasMoreResults: { + readOnly: true, + serializedName: "hasMoreResults", + type: { + name: "Boolean" + } + }, + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BillingProfile" + } + } + } + } + } + } +}; + +export const EnrollmentPolicies: msRest.CompositeMapper = { + serializedName: "EnrollmentPolicies", + type: { + name: "Composite", + className: "EnrollmentPolicies", + modelProperties: { + accountOwnerViewCharges: { + readOnly: true, + serializedName: "accountOwnerViewCharges", + type: { + name: "Boolean" + } + }, + departmentAdminViewCharges: { + readOnly: true, + serializedName: "departmentAdminViewCharges", + type: { + name: "Boolean" + } + }, + marketplacesEnabled: { + readOnly: true, + serializedName: "marketplacesEnabled", + type: { + name: "Boolean" + } + }, + reservedInstancesEnabled: { + readOnly: true, + serializedName: "reservedInstancesEnabled", + type: { + name: "Boolean" + } + } + } + } +}; + +export const Enrollment: msRest.CompositeMapper = { + serializedName: "Enrollment", + type: { + name: "Composite", + className: "Enrollment", + modelProperties: { + startDate: { + serializedName: "startDate", + type: { + name: "DateTime" + } + }, + endDate: { + serializedName: "endDate", + type: { + name: "DateTime" + } + }, + currency: { + readOnly: true, + serializedName: "currency", + type: { + name: "String" + } + }, + channel: { + readOnly: true, + serializedName: "channel", + type: { + name: "String" + } + }, + policies: { + readOnly: true, + serializedName: "policies", + type: { + name: "Composite", + className: "EnrollmentPolicies" + } + }, + language: { + readOnly: true, + serializedName: "language", + type: { + name: "String" + } + }, + countryCode: { + readOnly: true, + serializedName: "countryCode", + type: { + name: "String" + } + }, + status: { + readOnly: true, + serializedName: "status", + type: { + name: "String" + } + }, + billingCycle: { + readOnly: true, + serializedName: "billingCycle", + type: { + name: "String" + } + } + } + } +}; + +export const EnrollmentAccount: msRest.CompositeMapper = { + serializedName: "EnrollmentAccount", + type: { + name: "Composite", + className: "EnrollmentAccount", + modelProperties: { + ...Resource.type.modelProperties, + accountName: { + serializedName: "properties.accountName", + type: { + name: "String" + } + }, + costCenter: { + serializedName: "properties.costCenter", + type: { + name: "String" + } + }, + accountOwner: { + serializedName: "properties.accountOwner", + type: { + name: "String" + } + }, + status: { + serializedName: "properties.status", + type: { + name: "String" + } + }, + startDate: { + serializedName: "properties.startDate", + type: { + name: "DateTime" + } + }, + endDate: { + serializedName: "properties.endDate", + type: { + name: "DateTime" + } + }, + department: { + serializedName: "properties.department", + type: { + name: "Composite", + className: "Department" + } + } + } + } +}; + +export const Department: msRest.CompositeMapper = { + serializedName: "Department", + type: { + name: "Composite", + className: "Department", + modelProperties: { + ...Resource.type.modelProperties, + departmentName: { + serializedName: "properties.departmentName", + type: { + name: "String" + } + }, + costCenter: { + serializedName: "properties.costCenter", + type: { + name: "String" + } + }, + status: { + serializedName: "properties.status", + type: { + name: "String" + } + }, + enrollmentAccounts: { + serializedName: "properties.enrollmentAccounts", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EnrollmentAccount" + } + } + } + } + } + } +}; + +export const BillingAccount: msRest.CompositeMapper = { + serializedName: "BillingAccount", + type: { + name: "Composite", + className: "BillingAccount", + modelProperties: { + ...Resource.type.modelProperties, + displayName: { + serializedName: "properties.displayName", + type: { + name: "String" + } + }, + soldTo: { + serializedName: "properties.soldTo", + type: { + name: "Composite", + className: "AddressDetails" + } + }, + agreementType: { + readOnly: true, + serializedName: "properties.agreementType", + type: { + name: "String" + } + }, + accountType: { + readOnly: true, + serializedName: "properties.accountType", + type: { + name: "String" + } + }, + accountStatus: { + readOnly: true, + serializedName: "properties.accountStatus", + type: { + name: "String" + } + }, + billingProfiles: { + serializedName: "properties.billingProfiles", + type: { + name: "Composite", + className: "BillingProfilesOnExpand" + } + }, + enrollmentDetails: { + readOnly: true, + serializedName: "properties.enrollmentDetails", + type: { + name: "Composite", + className: "Enrollment" + } + }, + departments: { + serializedName: "properties.departments", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Department" + } + } + } + }, + enrollmentAccounts: { + serializedName: "properties.enrollmentAccounts", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EnrollmentAccount" + } + } + } + }, + hasReadAccess: { + readOnly: true, + serializedName: "properties.hasReadAccess", + type: { + name: "Boolean" + } + } + } + } +}; + +export const BillingAccountUpdateRequest: msRest.CompositeMapper = { + serializedName: "BillingAccountUpdateRequest", + type: { + name: "Composite", + className: "BillingAccountUpdateRequest", + modelProperties: { + displayName: { + serializedName: "properties.displayName", + type: { + name: "String" + } + }, + soldTo: { + serializedName: "properties.soldTo", + type: { + name: "Composite", + className: "AddressDetails" + } + }, + agreementType: { + readOnly: true, + serializedName: "properties.agreementType", + type: { + name: "String" + } + }, + accountType: { + readOnly: true, + serializedName: "properties.accountType", + type: { + name: "String" + } + }, + accountStatus: { + readOnly: true, + serializedName: "properties.accountStatus", + type: { + name: "String" + } + }, + billingProfiles: { + serializedName: "properties.billingProfiles", + type: { + name: "Composite", + className: "BillingProfilesOnExpand" + } + }, + enrollmentDetails: { + readOnly: true, + serializedName: "properties.enrollmentDetails", + type: { + name: "Composite", + className: "Enrollment" + } + }, + departments: { + serializedName: "properties.departments", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Department" + } + } + } + }, + enrollmentAccounts: { + serializedName: "properties.enrollmentAccounts", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EnrollmentAccount" + } + } + } + }, + hasReadAccess: { + readOnly: true, + serializedName: "properties.hasReadAccess", + type: { + name: "Boolean" + } + } + } + } +}; + +export const BillingProperty: msRest.CompositeMapper = { + serializedName: "BillingProperty", + type: { + name: "Composite", + className: "BillingProperty", + modelProperties: { + ...Resource.type.modelProperties, + accountAdminNotificationEmailAddress: { + readOnly: true, + serializedName: "properties.accountAdminNotificationEmailAddress", + type: { + name: "String" + } + }, + billingTenantId: { + readOnly: true, + serializedName: "properties.billingTenantId", + type: { + name: "String" + } + }, + billingAccountId: { + readOnly: true, + serializedName: "properties.billingAccountId", + type: { + name: "String" + } + }, + billingAccountDisplayName: { + readOnly: true, + serializedName: "properties.billingAccountDisplayName", + type: { + name: "String" + } + }, + billingProfileId: { + readOnly: true, + serializedName: "properties.billingProfileId", + type: { + name: "String" + } + }, + billingProfileDisplayName: { + readOnly: true, + serializedName: "properties.billingProfileDisplayName", + type: { + name: "String" + } + }, + billingProfileStatus: { + readOnly: true, + serializedName: "properties.billingProfileStatus", + type: { + name: "String" + } + }, + billingProfileStatusReasonCode: { + readOnly: true, + serializedName: "properties.billingProfileStatusReasonCode", + type: { + name: "String" + } + }, + billingProfileSpendingLimit: { + readOnly: true, + serializedName: "properties.billingProfileSpendingLimit", + type: { + name: "String" + } + }, + costCenter: { + serializedName: "properties.costCenter", + type: { + name: "String" + } + }, + invoiceSectionId: { + readOnly: true, + serializedName: "properties.invoiceSectionId", + type: { + name: "String" + } + }, + invoiceSectionDisplayName: { + readOnly: true, + serializedName: "properties.invoiceSectionDisplayName", + type: { + name: "String" + } + }, + isAccountAdmin: { + readOnly: true, + serializedName: "properties.isAccountAdmin", + type: { + name: "Boolean" + } + }, + productId: { + readOnly: true, + serializedName: "properties.productId", + type: { + name: "String" + } + }, + productName: { + readOnly: true, + serializedName: "properties.productName", + type: { + name: "String" + } + }, + skuId: { + readOnly: true, + serializedName: "properties.skuId", + type: { + name: "String" + } + }, + skuDescription: { + readOnly: true, + serializedName: "properties.skuDescription", + type: { + name: "String" + } + } + } + } +}; + +export const Instruction: msRest.CompositeMapper = { + serializedName: "Instruction", + type: { + name: "Composite", + className: "Instruction", + modelProperties: { + ...Resource.type.modelProperties, + amount: { + required: true, + serializedName: "properties.amount", + type: { + name: "Number" + } + }, + startDate: { + required: true, + serializedName: "properties.startDate", + type: { + name: "DateTime" + } + }, + endDate: { + required: true, + serializedName: "properties.endDate", + type: { + name: "DateTime" + } + }, + creationDate: { + serializedName: "properties.creationDate", + type: { + name: "DateTime" + } + } + } + } +}; + +export const BillingProfileCreationRequest: msRest.CompositeMapper = { + serializedName: "BillingProfileCreationRequest", + type: { + name: "Composite", + className: "BillingProfileCreationRequest", + modelProperties: { + displayName: { + serializedName: "displayName", + type: { + name: "String" + } + }, + poNumber: { + serializedName: "poNumber", + type: { + name: "String" + } + }, + billTo: { + serializedName: "billTo", + type: { + name: "Composite", + className: "AddressDetails" + } + }, + invoiceEmailOptIn: { + serializedName: "invoiceEmailOptIn", + type: { + name: "Boolean" + } + }, + enabledAzurePlans: { + serializedName: "enabledAzurePlans", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AzurePlan" + } + } + } + } + } + } +}; + +export const InvoiceSectionCreationRequest: msRest.CompositeMapper = { + serializedName: "InvoiceSectionCreationRequest", + type: { + name: "Composite", + className: "InvoiceSectionCreationRequest", + modelProperties: { + displayName: { + serializedName: "displayName", + type: { + name: "String" + } + } + } + } +}; + +export const InvoiceSectionWithCreateSubPermission: msRest.CompositeMapper = { + serializedName: "InvoiceSectionWithCreateSubPermission", + type: { + name: "Composite", + className: "InvoiceSectionWithCreateSubPermission", + modelProperties: { + invoiceSectionId: { + readOnly: true, + serializedName: "invoiceSectionId", + type: { + name: "String" + } + }, + invoiceSectionDisplayName: { + readOnly: true, + serializedName: "invoiceSectionDisplayName", + type: { + name: "String" + } + }, + invoiceSectionSystemId: { + readOnly: true, + serializedName: "invoiceSectionSystemId", + type: { + name: "String" + } + }, + billingProfileId: { + readOnly: true, + serializedName: "billingProfileId", + type: { + name: "String" + } + }, + billingProfileDisplayName: { + readOnly: true, + serializedName: "billingProfileDisplayName", + type: { + name: "String" + } + }, + billingProfileStatus: { + readOnly: true, + serializedName: "billingProfileStatus", + type: { + name: "String" + } + }, + billingProfileStatusReasonCode: { + readOnly: true, + serializedName: "billingProfileStatusReasonCode", + type: { + name: "String" + } + }, + billingProfileSpendingLimit: { + readOnly: true, + serializedName: "billingProfileSpendingLimit", + type: { + name: "String" + } + }, + billingProfileSystemId: { + readOnly: true, + serializedName: "billingProfileSystemId", + type: { + name: "String" + } + }, + enabledAzurePlans: { + serializedName: "enabledAzurePlans", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AzurePlan" + } + } + } + } + } + } +}; + +export const DownloadUrl: msRest.CompositeMapper = { + serializedName: "DownloadUrl", + type: { + name: "Composite", + className: "DownloadUrl", + modelProperties: { + expiryTime: { + readOnly: true, + serializedName: "expiryTime", + type: { + name: "DateTime" + } + }, + url: { + readOnly: true, + serializedName: "url", + type: { + name: "String" + } + } + } + } +}; + +export const ErrorSubDetailsItem: msRest.CompositeMapper = { + serializedName: "ErrorSubDetailsItem", + type: { + name: "Composite", + className: "ErrorSubDetailsItem", + modelProperties: { + code: { + readOnly: true, + serializedName: "code", + type: { + name: "String" + } + }, + message: { + readOnly: true, + serializedName: "message", + type: { + name: "String" + } + }, + target: { + readOnly: true, + serializedName: "target", + type: { + name: "String" + } + } + } + } +}; + +export const ErrorDetails: msRest.CompositeMapper = { + serializedName: "ErrorDetails", + type: { + name: "Composite", + className: "ErrorDetails", + modelProperties: { + code: { + readOnly: true, + serializedName: "code", + type: { + name: "String" + } + }, + message: { + readOnly: true, + serializedName: "message", + type: { + name: "String" + } + }, + target: { + readOnly: true, + serializedName: "target", + type: { + name: "String" + } + }, + details: { + readOnly: true, + serializedName: "details", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorSubDetailsItem" + } + } + } + } + } + } +}; + +export const ErrorResponse: msRest.CompositeMapper = { + serializedName: "ErrorResponse", + type: { + name: "Composite", + className: "ErrorResponse", + modelProperties: { + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorDetails" + } + } + } + } +}; + +export const Amount: msRest.CompositeMapper = { + serializedName: "Amount", + type: { + name: "Composite", + className: "Amount", + modelProperties: { + currency: { + readOnly: true, + serializedName: "currency", + type: { + name: "String" + } + }, + value: { + serializedName: "value", + type: { + name: "Number" + } + } + } + } +}; + +export const Document: msRest.CompositeMapper = { + serializedName: "Document", + type: { + name: "Composite", + className: "Document", + modelProperties: { + kind: { + readOnly: true, + serializedName: "kind", + type: { + name: "String" + } + }, + url: { + readOnly: true, + serializedName: "url", + type: { + name: "String" + } + }, + source: { + readOnly: true, + serializedName: "source", + type: { + name: "String" + } + } + } + } +}; + +export const PaymentProperties: msRest.CompositeMapper = { + serializedName: "PaymentProperties", + type: { + name: "Composite", + className: "PaymentProperties", + modelProperties: { + paymentType: { + readOnly: true, + serializedName: "paymentType", + type: { + name: "String" + } + }, + amount: { + readOnly: true, + serializedName: "amount", + type: { + name: "Composite", + className: "Amount" + } + }, + date: { + readOnly: true, + serializedName: "date", + type: { + name: "DateTime" + } + }, + paymentMethodFamily: { + serializedName: "paymentMethodFamily", + type: { + name: "String" + } + }, + paymentMethodType: { + readOnly: true, + serializedName: "paymentMethodType", + type: { + name: "String" + } + } + } + } +}; + +export const RebillDetails: msRest.CompositeMapper = { + serializedName: "RebillDetails", + type: { + name: "Composite", + className: "RebillDetails", + modelProperties: { + creditNoteDocumentId: { + readOnly: true, + serializedName: "creditNoteDocumentId", + type: { + name: "String" + } + }, + invoiceDocumentId: { + readOnly: true, + serializedName: "invoiceDocumentId", + type: { + name: "String" + } + }, + rebillDetails: { + readOnly: true, + serializedName: "rebillDetails", + type: { + name: "Dictionary", + value: { + type: { + name: "Composite", + className: "RebillDetails" + } + } + } + } + } + } +}; + +export const Invoice: msRest.CompositeMapper = { + serializedName: "Invoice", + type: { + name: "Composite", + className: "Invoice", + modelProperties: { + ...Resource.type.modelProperties, + dueDate: { + readOnly: true, + serializedName: "properties.dueDate", + type: { + name: "DateTime" + } + }, + invoiceDate: { + readOnly: true, + serializedName: "properties.invoiceDate", + type: { + name: "DateTime" + } + }, + status: { + readOnly: true, + serializedName: "properties.status", + type: { + name: "String" + } + }, + amountDue: { + readOnly: true, + serializedName: "properties.amountDue", + type: { + name: "Composite", + className: "Amount" + } + }, + azurePrepaymentApplied: { + readOnly: true, + serializedName: "properties.azurePrepaymentApplied", + type: { + name: "Composite", + className: "Amount" + } + }, + billedAmount: { + readOnly: true, + serializedName: "properties.billedAmount", + type: { + name: "Composite", + className: "Amount" + } + }, + creditAmount: { + readOnly: true, + serializedName: "properties.creditAmount", + type: { + name: "Composite", + className: "Amount" + } + }, + freeAzureCreditApplied: { + readOnly: true, + serializedName: "properties.freeAzureCreditApplied", + type: { + name: "Composite", + className: "Amount" + } + }, + subTotal: { + readOnly: true, + serializedName: "properties.subTotal", + type: { + name: "Composite", + className: "Amount" + } + }, + taxAmount: { + readOnly: true, + serializedName: "properties.taxAmount", + type: { + name: "Composite", + className: "Amount" + } + }, + totalAmount: { + readOnly: true, + serializedName: "properties.totalAmount", + type: { + name: "Composite", + className: "Amount" + } + }, + invoicePeriodStartDate: { + readOnly: true, + serializedName: "properties.invoicePeriodStartDate", + type: { + name: "DateTime" + } + }, + invoicePeriodEndDate: { + readOnly: true, + serializedName: "properties.invoicePeriodEndDate", + type: { + name: "DateTime" + } + }, + invoiceType: { + readOnly: true, + serializedName: "properties.invoiceType", + type: { + name: "String" + } + }, + isMonthlyInvoice: { + readOnly: true, + serializedName: "properties.isMonthlyInvoice", + type: { + name: "Boolean" + } + }, + billingProfileId: { + readOnly: true, + serializedName: "properties.billingProfileId", + type: { + name: "String" + } + }, + billingProfileDisplayName: { + readOnly: true, + serializedName: "properties.billingProfileDisplayName", + type: { + name: "String" + } + }, + purchaseOrderNumber: { + readOnly: true, + serializedName: "properties.purchaseOrderNumber", + type: { + name: "String" + } + }, + documents: { + readOnly: true, + serializedName: "properties.documents", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Document" + } + } + } + }, + payments: { + readOnly: true, + serializedName: "properties.payments", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PaymentProperties" + } + } + } + }, + rebillDetails: { + readOnly: true, + serializedName: "properties.rebillDetails", + type: { + name: "Dictionary", + value: { + type: { + name: "Composite", + className: "RebillDetails" + } + } + } + }, + documentType: { + readOnly: true, + serializedName: "properties.documentType", + type: { + name: "String" + } + }, + billedDocumentId: { + readOnly: true, + serializedName: "properties.billedDocumentId", + type: { + name: "String" + } + }, + creditForDocumentId: { + readOnly: true, + serializedName: "properties.creditForDocumentId", + type: { + name: "String" + } + }, + subscriptionId: { + readOnly: true, + serializedName: "properties.subscriptionId", + type: { + name: "String" + } + } + } + } +}; + +export const Product: msRest.CompositeMapper = { + serializedName: "Product", + type: { + name: "Composite", + className: "Product", + modelProperties: { + ...Resource.type.modelProperties, + autoRenew: { + serializedName: "properties.autoRenew", + type: { + name: "String" + } + }, + displayName: { + readOnly: true, + serializedName: "properties.displayName", + type: { + name: "String" + } + }, + purchaseDate: { + readOnly: true, + serializedName: "properties.purchaseDate", + type: { + name: "DateTime" + } + }, + productTypeId: { + readOnly: true, + serializedName: "properties.productTypeId", + type: { + name: "String" + } + }, + productType: { + readOnly: true, + serializedName: "properties.productType", + type: { + name: "String" + } + }, + status: { + serializedName: "properties.status", + type: { + name: "String" + } + }, + endDate: { + readOnly: true, + serializedName: "properties.endDate", + type: { + name: "DateTime" + } + }, + billingFrequency: { + serializedName: "properties.billingFrequency", + type: { + name: "String" + } + }, + lastCharge: { + readOnly: true, + serializedName: "properties.lastCharge", + type: { + name: "Composite", + className: "Amount" + } + }, + lastChargeDate: { + readOnly: true, + serializedName: "properties.lastChargeDate", + type: { + name: "DateTime" + } + }, + quantity: { + readOnly: true, + serializedName: "properties.quantity", + type: { + name: "Number" + } + }, + skuId: { + readOnly: true, + serializedName: "properties.skuId", + type: { + name: "String" + } + }, + skuDescription: { + readOnly: true, + serializedName: "properties.skuDescription", + type: { + name: "String" + } + }, + tenantId: { + readOnly: true, + serializedName: "properties.tenantId", + type: { + name: "String" + } + }, + availabilityId: { + readOnly: true, + serializedName: "properties.availabilityId", + type: { + name: "String" + } + }, + invoiceSectionId: { + readOnly: true, + serializedName: "properties.invoiceSectionId", + type: { + name: "String" + } + }, + invoiceSectionDisplayName: { + readOnly: true, + serializedName: "properties.invoiceSectionDisplayName", + type: { + name: "String" + } + }, + billingProfileId: { + readOnly: true, + serializedName: "properties.billingProfileId", + type: { + name: "String" + } + }, + billingProfileDisplayName: { + readOnly: true, + serializedName: "properties.billingProfileDisplayName", + type: { + name: "String" + } + }, + customerId: { + readOnly: true, + serializedName: "properties.customerId", + type: { + name: "String" + } + }, + customerDisplayName: { + readOnly: true, + serializedName: "properties.customerDisplayName", + type: { + name: "String" + } + }, + reseller: { + readOnly: true, + serializedName: "properties.reseller", + type: { + name: "Composite", + className: "Reseller" + } + } + } + } +}; + +export const ValidateProductTransferEligibilityError: msRest.CompositeMapper = { + serializedName: "ValidateProductTransferEligibilityError", + type: { + name: "Composite", + className: "ValidateProductTransferEligibilityError", + modelProperties: { + code: { + serializedName: "code", + type: { + name: "String" + } + }, + message: { + serializedName: "message", + type: { + name: "String" + } + }, + details: { + serializedName: "details", + type: { + name: "String" + } + } + } + } +}; + +export const ValidateProductTransferEligibilityResult: msRest.CompositeMapper = { + serializedName: "ValidateProductTransferEligibilityResult", + type: { + name: "Composite", + className: "ValidateProductTransferEligibilityResult", + modelProperties: { + isMoveEligible: { + readOnly: true, + serializedName: "isMoveEligible", + type: { + name: "Boolean" + } + }, + errorDetails: { + serializedName: "errorDetails", + type: { + name: "Composite", + className: "ValidateProductTransferEligibilityError" + } + } + } + } +}; + +export const BillingSubscription: msRest.CompositeMapper = { + serializedName: "BillingSubscription", + type: { + name: "Composite", + className: "BillingSubscription", + modelProperties: { + ...Resource.type.modelProperties, + displayName: { + readOnly: true, + serializedName: "properties.displayName", + type: { + name: "String" + } + }, + subscriptionId: { + readOnly: true, + serializedName: "properties.subscriptionId", + type: { + name: "Uuid" + } + }, + subscriptionBillingStatus: { + serializedName: "properties.subscriptionBillingStatus", + type: { + name: "String" + } + }, + lastMonthCharges: { + readOnly: true, + serializedName: "properties.lastMonthCharges", + type: { + name: "Composite", + className: "Amount" + } + }, + monthToDateCharges: { + readOnly: true, + serializedName: "properties.monthToDateCharges", + type: { + name: "Composite", + className: "Amount" + } + }, + billingProfileId: { + readOnly: true, + serializedName: "properties.billingProfileId", + type: { + name: "String" + } + }, + billingProfileDisplayName: { + readOnly: true, + serializedName: "properties.billingProfileDisplayName", + type: { + name: "String" + } + }, + costCenter: { + serializedName: "properties.costCenter", + type: { + name: "String" + } + }, + customerId: { + readOnly: true, + serializedName: "properties.customerId", + type: { + name: "String" + } + }, + customerDisplayName: { + readOnly: true, + serializedName: "properties.customerDisplayName", + type: { + name: "String" + } + }, + invoiceSectionId: { + readOnly: true, + serializedName: "properties.invoiceSectionId", + type: { + name: "String" + } + }, + invoiceSectionDisplayName: { + readOnly: true, + serializedName: "properties.invoiceSectionDisplayName", + type: { + name: "String" + } + }, + reseller: { + readOnly: true, + serializedName: "properties.reseller", + type: { + name: "Composite", + className: "Reseller" + } + }, + skuId: { + serializedName: "properties.skuId", + type: { + name: "String" + } + }, + skuDescription: { + readOnly: true, + serializedName: "properties.skuDescription", + type: { + name: "String" + } + } + } + } +}; + +export const EnrollmentAccountContext: msRest.CompositeMapper = { + serializedName: "EnrollmentAccountContext", + type: { + name: "Composite", + className: "EnrollmentAccountContext", + modelProperties: { + costCenter: { + serializedName: "costCenter", + type: { + name: "String" + } + }, + startDate: { + serializedName: "startDate", + type: { + name: "DateTime" + } + }, + endDate: { + serializedName: "endDate", + type: { + name: "DateTime" + } + }, + enrollmentAccountName: { + serializedName: "enrollmentAccountName", + type: { + name: "String" + } + } + } + } +}; + +export const Transaction: msRest.CompositeMapper = { + serializedName: "Transaction", + type: { + name: "Composite", + className: "Transaction", + modelProperties: { + ...Resource.type.modelProperties, + kind: { + serializedName: "properties.kind", + type: { + name: "String" + } + }, + date: { + readOnly: true, + serializedName: "properties.date", + type: { + name: "DateTime" + } + }, + invoice: { + readOnly: true, + serializedName: "properties.invoice", + type: { + name: "String" + } + }, + invoiceId: { + readOnly: true, + serializedName: "properties.invoiceId", + type: { + name: "String" + } + }, + orderId: { + readOnly: true, + serializedName: "properties.orderId", + type: { + name: "String" + } + }, + orderName: { + readOnly: true, + serializedName: "properties.orderName", + type: { + name: "String" + } + }, + productFamily: { + readOnly: true, + serializedName: "properties.productFamily", + type: { + name: "String" + } + }, + productTypeId: { + readOnly: true, + serializedName: "properties.productTypeId", + type: { + name: "String" + } + }, + productType: { + readOnly: true, + serializedName: "properties.productType", + type: { + name: "String" + } + }, + productDescription: { + readOnly: true, + serializedName: "properties.productDescription", + type: { + name: "String" + } + }, + transactionType: { + serializedName: "properties.transactionType", + type: { + name: "String" + } + }, + transactionAmount: { + readOnly: true, + serializedName: "properties.transactionAmount", + type: { + name: "Composite", + className: "Amount" + } + }, + quantity: { + readOnly: true, + serializedName: "properties.quantity", + type: { + name: "Number" + } + }, + invoiceSectionId: { + readOnly: true, + serializedName: "properties.invoiceSectionId", + type: { + name: "String" + } + }, + invoiceSectionDisplayName: { + readOnly: true, + serializedName: "properties.invoiceSectionDisplayName", + type: { + name: "String" + } + }, + billingProfileId: { + readOnly: true, + serializedName: "properties.billingProfileId", + type: { + name: "String" + } + }, + billingProfileDisplayName: { + readOnly: true, + serializedName: "properties.billingProfileDisplayName", + type: { + name: "String" + } + }, + customerId: { + readOnly: true, + serializedName: "properties.customerId", + type: { + name: "String" + } + }, + customerDisplayName: { + readOnly: true, + serializedName: "properties.customerDisplayName", + type: { + name: "String" + } + }, + subscriptionId: { + readOnly: true, + serializedName: "properties.subscriptionId", + type: { + name: "String" + } + }, + subscriptionName: { + readOnly: true, + serializedName: "properties.subscriptionName", + type: { + name: "String" + } + }, + azurePlan: { + readOnly: true, + serializedName: "properties.azurePlan", + type: { + name: "String" + } + }, + azureCreditApplied: { + readOnly: true, + serializedName: "properties.azureCreditApplied", + type: { + name: "Composite", + className: "Amount" + } + }, + billingCurrency: { + readOnly: true, + serializedName: "properties.billingCurrency", + type: { + name: "String" + } + }, + discount: { + readOnly: true, + serializedName: "properties.discount", + type: { + name: "Number" + } + }, + effectivePrice: { + readOnly: true, + serializedName: "properties.effectivePrice", + type: { + name: "Composite", + className: "Amount" + } + }, + exchangeRate: { + readOnly: true, + serializedName: "properties.exchangeRate", + type: { + name: "Number" + } + }, + marketPrice: { + readOnly: true, + serializedName: "properties.marketPrice", + type: { + name: "Composite", + className: "Amount" + } + }, + pricingCurrency: { + readOnly: true, + serializedName: "properties.pricingCurrency", + type: { + name: "String" + } + }, + servicePeriodStartDate: { + readOnly: true, + serializedName: "properties.servicePeriodStartDate", + type: { + name: "DateTime" + } + }, + servicePeriodEndDate: { + readOnly: true, + serializedName: "properties.servicePeriodEndDate", + type: { + name: "DateTime" + } + }, + subTotal: { + readOnly: true, + serializedName: "properties.subTotal", + type: { + name: "Composite", + className: "Amount" + } + }, + tax: { + readOnly: true, + serializedName: "properties.tax", + type: { + name: "Composite", + className: "Amount" + } + }, + unitOfMeasure: { + readOnly: true, + serializedName: "properties.unitOfMeasure", + type: { + name: "String" + } + }, + units: { + readOnly: true, + serializedName: "properties.units", + type: { + name: "Number" + } + }, + unitType: { + readOnly: true, + serializedName: "properties.unitType", + type: { + name: "String" + } + } + } + } +}; + +export const Policy: msRest.CompositeMapper = { + serializedName: "Policy", + type: { + name: "Composite", + className: "Policy", + modelProperties: { + ...Resource.type.modelProperties, + marketplacePurchases: { + serializedName: "properties.marketplacePurchases", + type: { + name: "String" + } + }, + reservationPurchases: { + serializedName: "properties.reservationPurchases", + type: { + name: "String" + } + }, + viewCharges: { + serializedName: "properties.viewCharges", + type: { + name: "String" + } + } + } + } +}; + +export const CustomerPolicy: msRest.CompositeMapper = { + serializedName: "CustomerPolicy", + type: { + name: "Composite", + className: "CustomerPolicy", + modelProperties: { + ...Resource.type.modelProperties, + viewCharges: { + serializedName: "properties.viewCharges", + type: { + name: "String" + } + } + } + } +}; + +export const AvailableBalance: msRest.CompositeMapper = { + serializedName: "AvailableBalance", + type: { + name: "Composite", + className: "AvailableBalance", + modelProperties: { + ...Resource.type.modelProperties, + amount: { + readOnly: true, + serializedName: "properties.amount", + type: { + name: "Composite", + className: "Amount" + } + } + } + } +}; + +export const OperationDisplay: msRest.CompositeMapper = { + serializedName: "Operation_display", + type: { + name: "Composite", + className: "OperationDisplay", + modelProperties: { + provider: { + readOnly: true, + serializedName: "provider", + type: { + name: "String" + } + }, + resource: { + readOnly: true, + serializedName: "resource", + type: { + name: "String" + } + }, + operation: { + readOnly: true, + serializedName: "operation", + type: { + name: "String" + } + } + } + } +}; + +export const Operation: msRest.CompositeMapper = { + serializedName: "Operation", + type: { + name: "Composite", + className: "Operation", + modelProperties: { + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + display: { + serializedName: "display", + type: { + name: "Composite", + className: "OperationDisplay" + } + } + } + } +}; + +export const BillingRoleAssignment: msRest.CompositeMapper = { + serializedName: "BillingRoleAssignment", + type: { + name: "Composite", + className: "BillingRoleAssignment", + modelProperties: { + ...Resource.type.modelProperties, + createdOn: { + readOnly: true, + serializedName: "properties.createdOn", + type: { + name: "String" + } + }, + createdByPrincipalTenantId: { + readOnly: true, + serializedName: "properties.createdByPrincipalTenantId", + type: { + name: "String" + } + }, + createdByPrincipalId: { + readOnly: true, + serializedName: "properties.createdByPrincipalId", + type: { + name: "String" + } + }, + createdByUserEmailAddress: { + readOnly: true, + serializedName: "properties.createdByUserEmailAddress", + type: { + name: "String" + } + }, + principalId: { + serializedName: "properties.principalId", + type: { + name: "String" + } + }, + principalTenantId: { + serializedName: "properties.principalTenantId", + type: { + name: "String" + } + }, + roleDefinitionId: { + serializedName: "properties.roleDefinitionId", + type: { + name: "String" + } + }, + scope: { + readOnly: true, + serializedName: "properties.scope", + type: { + name: "String" + } + }, + userAuthenticationType: { + serializedName: "properties.userAuthenticationType", + type: { + name: "String" + } + }, + userEmailAddress: { + serializedName: "properties.userEmailAddress", + type: { + name: "String" + } + } + } + } +}; + +export const BillingPermissionsProperties: msRest.CompositeMapper = { + serializedName: "BillingPermissionsProperties", + type: { + name: "Composite", + className: "BillingPermissionsProperties", + modelProperties: { + actions: { + readOnly: true, + serializedName: "actions", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + notActions: { + readOnly: true, + serializedName: "notActions", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const BillingRoleDefinition: msRest.CompositeMapper = { + serializedName: "BillingRoleDefinition", + type: { + name: "Composite", + className: "BillingRoleDefinition", + modelProperties: { + ...Resource.type.modelProperties, + description: { + readOnly: true, + serializedName: "properties.description", + type: { + name: "String" + } + }, + permissions: { + serializedName: "properties.permissions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BillingPermissionsProperties" + } + } + } + }, + roleName: { + readOnly: true, + serializedName: "properties.roleName", + type: { + name: "String" + } + } + } + } +}; + +export const Participants: msRest.CompositeMapper = { + serializedName: "Participants", + type: { + name: "Composite", + className: "Participants", + modelProperties: { + status: { + readOnly: true, + serializedName: "status", + type: { + name: "String" + } + }, + statusDate: { + readOnly: true, + serializedName: "statusDate", + type: { + name: "DateTime" + } + }, + email: { + readOnly: true, + serializedName: "email", + type: { + name: "String" + } + } + } + } +}; + +export const Agreement: msRest.CompositeMapper = { + serializedName: "Agreement", + type: { + name: "Composite", + className: "Agreement", + modelProperties: { + ...Resource.type.modelProperties, + agreementLink: { + readOnly: true, + serializedName: "properties.agreementLink", + type: { + name: "String" + } + }, + category: { + readOnly: true, + serializedName: "properties.category", + type: { + name: "String" + } + }, + acceptanceMode: { + readOnly: true, + serializedName: "properties.acceptanceMode", + type: { + name: "String" + } + }, + effectiveDate: { + readOnly: true, + serializedName: "properties.effectiveDate", + type: { + name: "DateTime" + } + }, + expirationDate: { + readOnly: true, + serializedName: "properties.expirationDate", + type: { + name: "DateTime" + } + }, + participants: { + serializedName: "properties.participants", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Participants" + } + } + } + }, + status: { + readOnly: true, + serializedName: "properties.status", + type: { + name: "String" + } + } + } + } +}; + +export const EnrollmentAccountSummary: msRest.CompositeMapper = { + serializedName: "EnrollmentAccountSummary", + type: { + name: "Composite", + className: "EnrollmentAccountSummary", + modelProperties: { + ...Resource.type.modelProperties, + principalName: { + readOnly: true, + serializedName: "properties.principalName", + type: { + name: "String" + } + } + } + } +}; + +export const BillingPeriod: msRest.CompositeMapper = { + serializedName: "BillingPeriod", + type: { + name: "Composite", + className: "BillingPeriod", + modelProperties: { + ...Resource.type.modelProperties, + billingPeriodStartDate: { + readOnly: true, + serializedName: "properties.billingPeriodStartDate", + type: { + name: "Date" + } + }, + billingPeriodEndDate: { + readOnly: true, + serializedName: "properties.billingPeriodEndDate", + type: { + name: "Date" + } + }, + invoiceIds: { + readOnly: true, + serializedName: "properties.invoiceIds", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const BillingProfilesCreateOrUpdateHeaders: msRest.CompositeMapper = { + serializedName: "billingprofiles-createorupdate-headers", + type: { + name: "Composite", + className: "BillingProfilesCreateOrUpdateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number" + } + } + } + } +}; + +export const InvoiceSectionsCreateOrUpdateHeaders: msRest.CompositeMapper = { + serializedName: "invoicesections-createorupdate-headers", + type: { + name: "Composite", + className: "InvoiceSectionsCreateOrUpdateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number" + } + } + } + } +}; + +export const InvoicesDownloadInvoiceHeaders: msRest.CompositeMapper = { + serializedName: "invoices-downloadinvoice-headers", + type: { + name: "Composite", + className: "InvoicesDownloadInvoiceHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "String" + } + } + } + } +}; + +export const InvoicesDownloadMultipleModernInvoiceHeaders: msRest.CompositeMapper = { + serializedName: "invoices-downloadmultiplemoderninvoice-headers", + type: { + name: "Composite", + className: "InvoicesDownloadMultipleModernInvoiceHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "String" + } + } + } + } +}; + +export const InvoicesDownloadBillingSubscriptionInvoiceHeaders: msRest.CompositeMapper = { + serializedName: "invoices-downloadbillingsubscriptioninvoice-headers", + type: { + name: "Composite", + className: "InvoicesDownloadBillingSubscriptionInvoiceHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "String" + } + } + } + } +}; + +export const InvoicesDownloadMultipleBillingSubscriptionInvoiceHeaders: msRest.CompositeMapper = { + serializedName: "invoices-downloadmultiplebillingsubscriptioninvoice-headers", + type: { + name: "Composite", + className: "InvoicesDownloadMultipleBillingSubscriptionInvoiceHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "String" + } + } + } + } +}; + +export const BillingSubscriptionsMoveHeaders: msRest.CompositeMapper = { + serializedName: "billingsubscriptions-move-headers", + type: { + name: "Composite", + className: "BillingSubscriptionsMoveHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number" + } + } + } + } +}; + +export const ProductsMoveHeaders: msRest.CompositeMapper = { + serializedName: "products-move-headers", + type: { + name: "Composite", + className: "ProductsMoveHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number" + } + } + } + } +}; + +export const BillingAccountListResult: msRest.CompositeMapper = { + serializedName: "BillingAccountListResult", + type: { + name: "Composite", + className: "BillingAccountListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BillingAccount" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const InvoiceSectionListWithCreateSubPermissionResult: msRest.CompositeMapper = { + serializedName: "InvoiceSectionListWithCreateSubPermissionResult", + type: { + name: "Composite", + className: "InvoiceSectionListWithCreateSubPermissionResult", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "InvoiceSectionWithCreateSubPermission" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const InstructionListResult: msRest.CompositeMapper = { + serializedName: "InstructionListResult", + type: { + name: "Composite", + className: "InstructionListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Instruction" + } + } + } + }, + nextLink: { readOnly: true, - serializedName: "type", + serializedName: "nextLink", type: { name: "String" } @@ -45,16 +3101,28 @@ export const Resource: msRest.CompositeMapper = { } }; -export const EnrollmentAccount: msRest.CompositeMapper = { - serializedName: "EnrollmentAccount", +export const BillingProfileListResult: msRest.CompositeMapper = { + serializedName: "BillingProfileListResult", type: { name: "Composite", - className: "EnrollmentAccount", + className: "BillingProfileListResult", modelProperties: { - ...Resource.type.modelProperties, - principalName: { + value: { readOnly: true, - serializedName: "properties.principalName", + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BillingProfile" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", type: { name: "String" } @@ -63,59 +3131,88 @@ export const EnrollmentAccount: msRest.CompositeMapper = { } }; -export const BillingPeriod: msRest.CompositeMapper = { - serializedName: "BillingPeriod", +export const CustomerListResult: msRest.CompositeMapper = { + serializedName: "CustomerListResult", type: { name: "Composite", - className: "BillingPeriod", + className: "CustomerListResult", modelProperties: { - ...Resource.type.modelProperties, - billingPeriodStartDate: { + value: { readOnly: true, - serializedName: "properties.billingPeriodStartDate", + serializedName: "", type: { - name: "Date" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Customer" + } + } } }, - billingPeriodEndDate: { + nextLink: { readOnly: true, - serializedName: "properties.billingPeriodEndDate", + serializedName: "nextLink", type: { - name: "Date" + name: "String" } - }, - invoiceIds: { + } + } + } +}; + +export const InvoiceSectionListResult: msRest.CompositeMapper = { + serializedName: "InvoiceSectionListResult", + type: { + name: "Composite", + className: "InvoiceSectionListResult", + modelProperties: { + value: { readOnly: true, - serializedName: "properties.invoiceIds", + serializedName: "", type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "InvoiceSection" } } } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } } } } }; -export const DownloadUrl: msRest.CompositeMapper = { - serializedName: "DownloadUrl", +export const BillingPermissionsListResult: msRest.CompositeMapper = { + serializedName: "BillingPermissionsListResult", type: { name: "Composite", - className: "DownloadUrl", + className: "BillingPermissionsListResult", modelProperties: { - expiryTime: { + value: { readOnly: true, - serializedName: "expiryTime", + serializedName: "", type: { - name: "DateTime" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BillingPermissionsProperties" + } + } } }, - url: { + nextLink: { readOnly: true, - serializedName: "url", + serializedName: "nextLink", type: { name: "String" } @@ -124,29 +3221,28 @@ export const DownloadUrl: msRest.CompositeMapper = { } }; -export const ErrorDetails: msRest.CompositeMapper = { - serializedName: "ErrorDetails", +export const BillingSubscriptionsListResult: msRest.CompositeMapper = { + serializedName: "BillingSubscriptionsListResult", type: { name: "Composite", - className: "ErrorDetails", + className: "BillingSubscriptionsListResult", modelProperties: { - code: { - readOnly: true, - serializedName: "code", - type: { - name: "String" - } - }, - message: { + value: { readOnly: true, - serializedName: "message", + serializedName: "", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BillingSubscription" + } + } } }, - target: { + nextLink: { readOnly: true, - serializedName: "target", + serializedName: "nextLink", type: { name: "String" } @@ -155,90 +3251,118 @@ export const ErrorDetails: msRest.CompositeMapper = { } }; -export const ErrorResponse: msRest.CompositeMapper = { - serializedName: "ErrorResponse", +export const ProductsListResult: msRest.CompositeMapper = { + serializedName: "ProductsListResult", type: { name: "Composite", - className: "ErrorResponse", + className: "ProductsListResult", modelProperties: { - error: { - serializedName: "error", + value: { + readOnly: true, + serializedName: "", type: { - name: "Composite", - className: "ErrorDetails" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Product" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" } } } } }; -export const Invoice: msRest.CompositeMapper = { - serializedName: "Invoice", +export const InvoiceListResult: msRest.CompositeMapper = { + serializedName: "InvoiceListResult", type: { name: "Composite", - className: "Invoice", + className: "InvoiceListResult", modelProperties: { - ...Resource.type.modelProperties, - downloadUrl: { - serializedName: "properties.downloadUrl", - type: { - name: "Composite", - className: "DownloadUrl" - } - }, - invoicePeriodStartDate: { + value: { readOnly: true, - serializedName: "properties.invoicePeriodStartDate", + serializedName: "", type: { - name: "Date" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Invoice" + } + } } }, - invoicePeriodEndDate: { + nextLink: { readOnly: true, - serializedName: "properties.invoicePeriodEndDate", + serializedName: "nextLink", type: { - name: "Date" + name: "String" } - }, - billingPeriodIds: { + } + } + } +}; + +export const TransactionListResult: msRest.CompositeMapper = { + serializedName: "TransactionListResult", + type: { + name: "Composite", + className: "TransactionListResult", + modelProperties: { + value: { readOnly: true, - serializedName: "properties.billingPeriodIds", + serializedName: "", type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "Transaction" } } } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } } } } }; -export const OperationDisplay: msRest.CompositeMapper = { - serializedName: "Operation_display", +export const OperationListResult: msRest.CompositeMapper = { + serializedName: "OperationListResult", type: { name: "Composite", - className: "OperationDisplay", + className: "OperationListResult", modelProperties: { - provider: { - readOnly: true, - serializedName: "provider", - type: { - name: "String" - } - }, - resource: { + value: { readOnly: true, - serializedName: "resource", + serializedName: "", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Operation" + } + } } }, - operation: { + nextLink: { readOnly: true, - serializedName: "operation", + serializedName: "nextLink", type: { name: "String" } @@ -247,35 +3371,41 @@ export const OperationDisplay: msRest.CompositeMapper = { } }; -export const Operation: msRest.CompositeMapper = { - serializedName: "Operation", +export const BillingRoleDefinitionListResult: msRest.CompositeMapper = { + serializedName: "BillingRoleDefinitionListResult", type: { name: "Composite", - className: "Operation", + className: "BillingRoleDefinitionListResult", modelProperties: { - name: { + value: { readOnly: true, - serializedName: "name", + serializedName: "", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BillingRoleDefinition" + } + } } }, - display: { - serializedName: "display", + nextLink: { + readOnly: true, + serializedName: "nextLink", type: { - name: "Composite", - className: "OperationDisplay" + name: "String" } } } } }; -export const EnrollmentAccountListResult: msRest.CompositeMapper = { - serializedName: "EnrollmentAccountListResult", +export const BillingRoleAssignmentListResult: msRest.CompositeMapper = { + serializedName: "BillingRoleAssignmentListResult", type: { name: "Composite", - className: "EnrollmentAccountListResult", + className: "BillingRoleAssignmentListResult", modelProperties: { value: { readOnly: true, @@ -285,7 +3415,7 @@ export const EnrollmentAccountListResult: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "EnrollmentAccount" + className: "BillingRoleAssignment" } } } @@ -301,11 +3431,11 @@ export const EnrollmentAccountListResult: msRest.CompositeMapper = { } }; -export const BillingPeriodsListResult: msRest.CompositeMapper = { - serializedName: "BillingPeriodsListResult", +export const AgreementListResult: msRest.CompositeMapper = { + serializedName: "AgreementListResult", type: { name: "Composite", - className: "BillingPeriodsListResult", + className: "AgreementListResult", modelProperties: { value: { readOnly: true, @@ -315,7 +3445,7 @@ export const BillingPeriodsListResult: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "BillingPeriod" + className: "Agreement" } } } @@ -331,11 +3461,11 @@ export const BillingPeriodsListResult: msRest.CompositeMapper = { } }; -export const InvoicesListResult: msRest.CompositeMapper = { - serializedName: "InvoicesListResult", +export const EnrollmentAccountListResult: msRest.CompositeMapper = { + serializedName: "EnrollmentAccountListResult", type: { name: "Composite", - className: "InvoicesListResult", + className: "EnrollmentAccountListResult", modelProperties: { value: { readOnly: true, @@ -345,7 +3475,7 @@ export const InvoicesListResult: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "Invoice" + className: "EnrollmentAccountSummary" } } } @@ -361,11 +3491,11 @@ export const InvoicesListResult: msRest.CompositeMapper = { } }; -export const OperationListResult: msRest.CompositeMapper = { - serializedName: "OperationListResult", +export const BillingPeriodsListResult: msRest.CompositeMapper = { + serializedName: "BillingPeriodsListResult", type: { name: "Composite", - className: "OperationListResult", + className: "BillingPeriodsListResult", modelProperties: { value: { readOnly: true, @@ -375,7 +3505,7 @@ export const OperationListResult: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "Operation" + className: "BillingPeriod" } } } diff --git a/sdk/billing/arm-billing/src/models/operationsMappers.ts b/sdk/billing/arm-billing/src/models/operationsMappers.ts index 22478f5be09f..0cdca205a6a8 100644 --- a/sdk/billing/arm-billing/src/models/operationsMappers.ts +++ b/sdk/billing/arm-billing/src/models/operationsMappers.ts @@ -1,18 +1,16 @@ /* * 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. */ export { - OperationListResult, + ErrorDetails, + ErrorResponse, + ErrorSubDetailsItem, Operation, OperationDisplay, - ErrorResponse, - ErrorDetails + OperationListResult } from "../models/mappers"; - diff --git a/sdk/billing/arm-billing/src/models/parameters.ts b/sdk/billing/arm-billing/src/models/parameters.ts index b8826d672899..66a2e083babb 100644 --- a/sdk/billing/arm-billing/src/models/parameters.ts +++ b/sdk/billing/arm-billing/src/models/parameters.ts @@ -20,11 +20,45 @@ export const acceptLanguage: msRest.OperationParameter = { } } }; -export const apiVersion: msRest.OperationQueryParameter = { +export const agreementName: msRest.OperationURLParameter = { + parameterPath: "agreementName", + mapper: { + required: true, + serializedName: "agreementName", + type: { + name: "String" + } + } +}; +export const apiVersion0: msRest.OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + required: true, + isConstant: true, + serializedName: "api-version", + defaultValue: '2020-05-01', + type: { + name: "String" + } + } +}; +export const apiVersion1: msRest.OperationQueryParameter = { parameterPath: "apiVersion", mapper: { required: true, + isConstant: true, serializedName: "api-version", + defaultValue: '2018-03-01-preview', + type: { + name: "String" + } + } +}; +export const billingAccountName: msRest.OperationURLParameter = { + parameterPath: "billingAccountName", + mapper: { + required: true, + serializedName: "billingAccountName", type: { name: "String" } @@ -40,6 +74,56 @@ export const billingPeriodName: msRest.OperationURLParameter = { } } }; +export const billingProfileName: msRest.OperationURLParameter = { + parameterPath: "billingProfileName", + mapper: { + required: true, + serializedName: "billingProfileName", + type: { + name: "String" + } + } +}; +export const billingRoleAssignmentName: msRest.OperationURLParameter = { + parameterPath: "billingRoleAssignmentName", + mapper: { + required: true, + serializedName: "billingRoleAssignmentName", + type: { + name: "String" + } + } +}; +export const billingRoleDefinitionName: msRest.OperationURLParameter = { + parameterPath: "billingRoleDefinitionName", + mapper: { + required: true, + serializedName: "billingRoleDefinitionName", + type: { + name: "String" + } + } +}; +export const customerName: msRest.OperationURLParameter = { + parameterPath: "customerName", + mapper: { + required: true, + serializedName: "customerName", + type: { + name: "String" + } + } +}; +export const downloadToken: msRest.OperationQueryParameter = { + parameterPath: "downloadToken", + mapper: { + required: true, + serializedName: "downloadToken", + type: { + name: "String" + } + } +}; export const expand: msRest.OperationQueryParameter = { parameterPath: [ "options", @@ -64,6 +148,16 @@ export const filter: msRest.OperationQueryParameter = { } } }; +export const instructionName: msRest.OperationURLParameter = { + parameterPath: "instructionName", + mapper: { + required: true, + serializedName: "instructionName", + type: { + name: "String" + } + } +}; export const invoiceName: msRest.OperationURLParameter = { parameterPath: "invoiceName", mapper: { @@ -74,6 +168,16 @@ export const invoiceName: msRest.OperationURLParameter = { } } }; +export const invoiceSectionName: msRest.OperationURLParameter = { + parameterPath: "invoiceSectionName", + mapper: { + required: true, + serializedName: "invoiceSectionName", + type: { + name: "String" + } + } +}; export const name: msRest.OperationURLParameter = { parameterPath: "name", mapper: { @@ -95,6 +199,48 @@ export const nextPageLink: msRest.OperationURLParameter = { }, skipEncoding: true }; +export const periodEndDate: msRest.OperationQueryParameter = { + parameterPath: "periodEndDate", + mapper: { + required: true, + serializedName: "periodEndDate", + type: { + name: "String" + } + } +}; +export const periodStartDate: msRest.OperationQueryParameter = { + parameterPath: "periodStartDate", + mapper: { + required: true, + serializedName: "periodStartDate", + type: { + name: "String" + } + } +}; +export const productName: msRest.OperationURLParameter = { + parameterPath: "productName", + mapper: { + required: true, + serializedName: "productName", + type: { + name: "String" + } + } +}; +export const search: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "search" + ], + mapper: { + serializedName: "$search", + type: { + name: "String" + } + } +}; export const skiptoken: msRest.OperationQueryParameter = { parameterPath: [ "options", diff --git a/sdk/billing/arm-billing/src/models/policiesMappers.ts b/sdk/billing/arm-billing/src/models/policiesMappers.ts new file mode 100644 index 000000000000..4d205df559cc --- /dev/null +++ b/sdk/billing/arm-billing/src/models/policiesMappers.ts @@ -0,0 +1,49 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + AddressDetails, + Agreement, + Amount, + AvailableBalance, + AzurePlan, + BaseResource, + BillingAccount, + BillingPeriod, + BillingPermissionsProperties, + BillingProfile, + BillingProfilesOnExpand, + BillingProperty, + BillingRoleAssignment, + BillingRoleDefinition, + BillingSubscription, + Customer, + CustomerPolicy, + Department, + Document, + Enrollment, + EnrollmentAccount, + EnrollmentAccountSummary, + EnrollmentPolicies, + ErrorDetails, + ErrorResponse, + ErrorSubDetailsItem, + IndirectRelationshipInfo, + Instruction, + Invoice, + InvoiceSection, + InvoiceSectionsOnExpand, + Participants, + PaymentProperties, + Policy, + Product, + RebillDetails, + Reseller, + Resource, + Transaction +} from "../models/mappers"; diff --git a/sdk/billing/arm-billing/src/models/productsMappers.ts b/sdk/billing/arm-billing/src/models/productsMappers.ts new file mode 100644 index 000000000000..2c80d301a739 --- /dev/null +++ b/sdk/billing/arm-billing/src/models/productsMappers.ts @@ -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. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + AddressDetails, + Agreement, + Amount, + AvailableBalance, + AzurePlan, + BaseResource, + BillingAccount, + BillingPeriod, + BillingPermissionsProperties, + BillingProfile, + BillingProfilesOnExpand, + BillingProperty, + BillingRoleAssignment, + BillingRoleDefinition, + BillingSubscription, + Customer, + CustomerPolicy, + Department, + Document, + Enrollment, + EnrollmentAccount, + EnrollmentAccountSummary, + EnrollmentPolicies, + ErrorDetails, + ErrorResponse, + ErrorSubDetailsItem, + IndirectRelationshipInfo, + Instruction, + Invoice, + InvoiceSection, + InvoiceSectionsOnExpand, + Participants, + PaymentProperties, + Policy, + Product, + ProductsListResult, + ProductsMoveHeaders, + RebillDetails, + Reseller, + Resource, + Transaction, + TransferProductRequestProperties, + ValidateProductTransferEligibilityError, + ValidateProductTransferEligibilityResult +} from "../models/mappers"; diff --git a/sdk/billing/arm-billing/src/models/transactionsMappers.ts b/sdk/billing/arm-billing/src/models/transactionsMappers.ts new file mode 100644 index 000000000000..560b58ff4d8a --- /dev/null +++ b/sdk/billing/arm-billing/src/models/transactionsMappers.ts @@ -0,0 +1,50 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + AddressDetails, + Agreement, + Amount, + AvailableBalance, + AzurePlan, + BaseResource, + BillingAccount, + BillingPeriod, + BillingPermissionsProperties, + BillingProfile, + BillingProfilesOnExpand, + BillingProperty, + BillingRoleAssignment, + BillingRoleDefinition, + BillingSubscription, + Customer, + CustomerPolicy, + Department, + Document, + Enrollment, + EnrollmentAccount, + EnrollmentAccountSummary, + EnrollmentPolicies, + ErrorDetails, + ErrorResponse, + ErrorSubDetailsItem, + IndirectRelationshipInfo, + Instruction, + Invoice, + InvoiceSection, + InvoiceSectionsOnExpand, + Participants, + PaymentProperties, + Policy, + Product, + RebillDetails, + Reseller, + Resource, + Transaction, + TransactionListResult +} from "../models/mappers"; diff --git a/sdk/billing/arm-billing/src/operations/address.ts b/sdk/billing/arm-billing/src/operations/address.ts new file mode 100644 index 000000000000..9b9dd05d15b0 --- /dev/null +++ b/sdk/billing/arm-billing/src/operations/address.ts @@ -0,0 +1,86 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * 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 * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/addressMappers"; +import * as Parameters from "../models/parameters"; +import { BillingManagementClientContext } from "../billingManagementClientContext"; + +/** Class representing a Address. */ +export class Address { + private readonly client: BillingManagementClientContext; + + /** + * Create a Address. + * @param {BillingManagementClientContext} client Reference to the service client. + */ + constructor(client: BillingManagementClientContext) { + this.client = client; + } + + /** + * Validates an address. Use the operation to validate an address before using it as soldTo or a + * billTo address. + * @param address + * @param [options] The optional parameters + * @returns Promise + */ + validate(address: Models.AddressDetails, options?: msRest.RequestOptionsBase): Promise; + /** + * @param address + * @param callback The callback + */ + validate(address: Models.AddressDetails, callback: msRest.ServiceCallback): void; + /** + * @param address + * @param options The optional parameters + * @param callback The callback + */ + validate(address: Models.AddressDetails, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + validate(address: Models.AddressDetails, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + address, + options + }, + validateOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const validateOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "providers/Microsoft.Billing/validateAddress", + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "address", + mapper: { + ...Mappers.AddressDetails, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ValidateAddressResponse + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/billing/arm-billing/src/operations/agreements.ts b/sdk/billing/arm-billing/src/operations/agreements.ts new file mode 100644 index 000000000000..09431e913194 --- /dev/null +++ b/sdk/billing/arm-billing/src/operations/agreements.ts @@ -0,0 +1,188 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * 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 * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/agreementsMappers"; +import * as Parameters from "../models/parameters"; +import { BillingManagementClientContext } from "../billingManagementClientContext"; + +/** Class representing a Agreements. */ +export class Agreements { + private readonly client: BillingManagementClientContext; + + /** + * Create a Agreements. + * @param {BillingManagementClientContext} client Reference to the service client. + */ + constructor(client: BillingManagementClientContext) { + this.client = client; + } + + /** + * Lists the agreements for a billing account. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingAccount(billingAccountName: string, options?: Models.AgreementsListByBillingAccountOptionalParams): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param callback The callback + */ + listByBillingAccount(billingAccountName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingAccount(billingAccountName: string, options: Models.AgreementsListByBillingAccountOptionalParams, callback: msRest.ServiceCallback): void; + listByBillingAccount(billingAccountName: string, options?: Models.AgreementsListByBillingAccountOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + options + }, + listByBillingAccountOperationSpec, + callback) as Promise; + } + + /** + * Gets an agreement by ID. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param agreementName The ID that uniquely identifies an agreement. + * @param [options] The optional parameters + * @returns Promise + */ + get(billingAccountName: string, agreementName: string, options?: Models.AgreementsGetOptionalParams): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param agreementName The ID that uniquely identifies an agreement. + * @param callback The callback + */ + get(billingAccountName: string, agreementName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param agreementName The ID that uniquely identifies an agreement. + * @param options The optional parameters + * @param callback The callback + */ + get(billingAccountName: string, agreementName: string, options: Models.AgreementsGetOptionalParams, callback: msRest.ServiceCallback): void; + get(billingAccountName: string, agreementName: string, options?: Models.AgreementsGetOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + agreementName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Lists the agreements for a billing account. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByBillingAccountNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingAccountNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByBillingAccountNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByBillingAccountOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/agreements", + urlParameters: [ + Parameters.billingAccountName + ], + queryParameters: [ + Parameters.apiVersion0, + Parameters.expand + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AgreementListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/agreements/{agreementName}", + urlParameters: [ + Parameters.billingAccountName, + Parameters.agreementName + ], + queryParameters: [ + Parameters.apiVersion0, + Parameters.expand + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Agreement + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByBillingAccountNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AgreementListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/billing/arm-billing/src/operations/availableBalances.ts b/sdk/billing/arm-billing/src/operations/availableBalances.ts new file mode 100644 index 000000000000..68f4e14e75b1 --- /dev/null +++ b/sdk/billing/arm-billing/src/operations/availableBalances.ts @@ -0,0 +1,88 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * 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 * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/availableBalancesMappers"; +import * as Parameters from "../models/parameters"; +import { BillingManagementClientContext } from "../billingManagementClientContext"; + +/** Class representing a AvailableBalances. */ +export class AvailableBalances { + private readonly client: BillingManagementClientContext; + + /** + * Create a AvailableBalances. + * @param {BillingManagementClientContext} client Reference to the service client. + */ + constructor(client: BillingManagementClientContext) { + this.client = client; + } + + /** + * The available credit balance for a billing profile. This is the balance that can be used for pay + * now to settle due or past due invoices. The operation is supported only for billing accounts + * with agreement type Microsoft Customer Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param [options] The optional parameters + * @returns Promise + */ + get(billingAccountName: string, billingProfileName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param callback The callback + */ + get(billingAccountName: string, billingProfileName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param options The optional parameters + * @param callback The callback + */ + get(billingAccountName: string, billingProfileName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(billingAccountName: string, billingProfileName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + options + }, + getOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/availableBalance/default", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AvailableBalance + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/billing/arm-billing/src/operations/billingAccounts.ts b/sdk/billing/arm-billing/src/operations/billingAccounts.ts new file mode 100644 index 000000000000..367e7593f7b2 --- /dev/null +++ b/sdk/billing/arm-billing/src/operations/billingAccounts.ts @@ -0,0 +1,348 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * 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 * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/billingAccountsMappers"; +import * as Parameters from "../models/parameters"; +import { BillingManagementClientContext } from "../billingManagementClientContext"; + +/** Class representing a BillingAccounts. */ +export class BillingAccounts { + private readonly client: BillingManagementClientContext; + + /** + * Create a BillingAccounts. + * @param {BillingManagementClientContext} client Reference to the service client. + */ + constructor(client: BillingManagementClientContext) { + this.client = client; + } + + /** + * Lists the billing accounts that a user has access to. + * @param [options] The optional parameters + * @returns Promise + */ + list(options?: Models.BillingAccountsListOptionalParams): Promise; + /** + * @param callback The callback + */ + list(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + list(options: Models.BillingAccountsListOptionalParams, callback: msRest.ServiceCallback): void; + list(options?: Models.BillingAccountsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Gets a billing account by its ID. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param [options] The optional parameters + * @returns Promise + */ + get(billingAccountName: string, options?: Models.BillingAccountsGetOptionalParams): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param callback The callback + */ + get(billingAccountName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param options The optional parameters + * @param callback The callback + */ + get(billingAccountName: string, options: Models.BillingAccountsGetOptionalParams, callback: msRest.ServiceCallback): void; + get(billingAccountName: string, options?: Models.BillingAccountsGetOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Updates the properties of a billing account. Currently, displayName and address can be updated. + * The operation is supported only for billing accounts with agreement type Microsoft Customer + * Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param parameters Request parameters that are provided to the update billing account operation. + * @param [options] The optional parameters + * @returns Promise + */ + update(billingAccountName: string, parameters: Models.BillingAccountUpdateRequest, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpdate(billingAccountName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Lists the invoice sections for which the user has permission to create Azure subscriptions. The + * operation is supported only for billing accounts with agreement type Microsoft Customer + * Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param [options] The optional parameters + * @returns + * Promise + */ + listInvoiceSectionsByCreateSubscriptionPermission(billingAccountName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param callback The callback + */ + listInvoiceSectionsByCreateSubscriptionPermission(billingAccountName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param options The optional parameters + * @param callback The callback + */ + listInvoiceSectionsByCreateSubscriptionPermission(billingAccountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listInvoiceSectionsByCreateSubscriptionPermission(billingAccountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + options + }, + listInvoiceSectionsByCreateSubscriptionPermissionOperationSpec, + callback) as Promise; + } + + /** + * Updates the properties of a billing account. Currently, displayName and address can be updated. + * The operation is supported only for billing accounts with agreement type Microsoft Customer + * Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param parameters Request parameters that are provided to the update billing account operation. + * @param [options] The optional parameters + * @returns Promise + */ + beginUpdate(billingAccountName: string, parameters: Models.BillingAccountUpdateRequest, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + billingAccountName, + parameters, + options + }, + beginUpdateOperationSpec, + options); + } + + /** + * Lists the billing accounts that a user has access to. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } + + /** + * Lists the invoice sections for which the user has permission to create Azure subscriptions. The + * operation is supported only for billing accounts with agreement type Microsoft Customer + * Agreement. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns + * Promise + */ + listInvoiceSectionsByCreateSubscriptionPermissionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listInvoiceSectionsByCreateSubscriptionPermissionNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listInvoiceSectionsByCreateSubscriptionPermissionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listInvoiceSectionsByCreateSubscriptionPermissionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listInvoiceSectionsByCreateSubscriptionPermissionNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts", + queryParameters: [ + Parameters.apiVersion0, + Parameters.expand + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingAccountListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}", + urlParameters: [ + Parameters.billingAccountName + ], + queryParameters: [ + Parameters.apiVersion0, + Parameters.expand + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingAccount + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listInvoiceSectionsByCreateSubscriptionPermissionOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/listInvoiceSectionsWithCreateSubscriptionPermission", + urlParameters: [ + Parameters.billingAccountName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.InvoiceSectionListWithCreateSubPermissionResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}", + urlParameters: [ + Parameters.billingAccountName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.BillingAccountUpdateRequest, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.BillingAccount + }, + 202: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingAccountListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listInvoiceSectionsByCreateSubscriptionPermissionNextOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.InvoiceSectionListWithCreateSubPermissionResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/billing/arm-billing/src/operations/billingPeriods.ts b/sdk/billing/arm-billing/src/operations/billingPeriods.ts index 2dcc29cf78d9..9d94d474ef38 100644 --- a/sdk/billing/arm-billing/src/operations/billingPeriods.ts +++ b/sdk/billing/arm-billing/src/operations/billingPeriods.ts @@ -122,7 +122,7 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion, + Parameters.apiVersion1, Parameters.filter, Parameters.skiptoken, Parameters.top @@ -149,7 +149,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.billingPeriodName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/billing/arm-billing/src/operations/billingPermissions.ts b/sdk/billing/arm-billing/src/operations/billingPermissions.ts new file mode 100644 index 000000000000..c3bb0d007312 --- /dev/null +++ b/sdk/billing/arm-billing/src/operations/billingPermissions.ts @@ -0,0 +1,450 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * 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 * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/billingPermissionsMappers"; +import * as Parameters from "../models/parameters"; +import { BillingManagementClientContext } from "../billingManagementClientContext"; + +/** Class representing a BillingPermissions. */ +export class BillingPermissions { + private readonly client: BillingManagementClientContext; + + /** + * Create a BillingPermissions. + * @param {BillingManagementClientContext} client Reference to the service client. + */ + constructor(client: BillingManagementClientContext) { + this.client = client; + } + + /** + * Lists the billing permissions the caller has for a customer. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param customerName The ID that uniquely identifies a customer. + * @param [options] The optional parameters + * @returns Promise + */ + listByCustomer(billingAccountName: string, customerName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param customerName The ID that uniquely identifies a customer. + * @param callback The callback + */ + listByCustomer(billingAccountName: string, customerName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param customerName The ID that uniquely identifies a customer. + * @param options The optional parameters + * @param callback The callback + */ + listByCustomer(billingAccountName: string, customerName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByCustomer(billingAccountName: string, customerName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + customerName, + options + }, + listByCustomerOperationSpec, + callback) as Promise; + } + + /** + * Lists the billing permissions the caller has on a billing account. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingAccount(billingAccountName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param callback The callback + */ + listByBillingAccount(billingAccountName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingAccount(billingAccountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingAccount(billingAccountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + options + }, + listByBillingAccountOperationSpec, + callback) as Promise; + } + + /** + * Lists the billing permissions the caller has on an invoice section. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param invoiceSectionName The ID that uniquely identifies an invoice section. + * @param [options] The optional parameters + * @returns Promise + */ + listByInvoiceSections(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param invoiceSectionName The ID that uniquely identifies an invoice section. + * @param callback The callback + */ + listByInvoiceSections(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param invoiceSectionName The ID that uniquely identifies an invoice section. + * @param options The optional parameters + * @param callback The callback + */ + listByInvoiceSections(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByInvoiceSections(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + invoiceSectionName, + options + }, + listByInvoiceSectionsOperationSpec, + callback) as Promise; + } + + /** + * Lists the billing permissions the caller has on a billing profile. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingProfile(billingAccountName: string, billingProfileName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param callback The callback + */ + listByBillingProfile(billingAccountName: string, billingProfileName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingProfile(billingAccountName: string, billingProfileName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingProfile(billingAccountName: string, billingProfileName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + options + }, + listByBillingProfileOperationSpec, + callback) as Promise; + } + + /** + * Lists the billing permissions the caller has for a customer. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByCustomerNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByCustomerNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByCustomerNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByCustomerNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByCustomerNextOperationSpec, + callback) as Promise; + } + + /** + * Lists the billing permissions the caller has on a billing account. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByBillingAccountNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingAccountNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByBillingAccountNextOperationSpec, + callback) as Promise; + } + + /** + * Lists the billing permissions the caller has on an invoice section. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByInvoiceSectionsNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByInvoiceSectionsNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByInvoiceSectionsNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByInvoiceSectionsNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByInvoiceSectionsNextOperationSpec, + callback) as Promise; + } + + /** + * Lists the billing permissions the caller has on a billing profile. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingProfileNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByBillingProfileNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingProfileNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingProfileNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByBillingProfileNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByCustomerOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}/billingPermissions", + urlParameters: [ + Parameters.billingAccountName, + Parameters.customerName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingPermissionsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByBillingAccountOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingPermissions", + urlParameters: [ + Parameters.billingAccountName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingPermissionsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByInvoiceSectionsOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/billingPermissions", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName, + Parameters.invoiceSectionName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingPermissionsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByBillingProfileOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/billingPermissions", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingPermissionsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByCustomerNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingPermissionsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByBillingAccountNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingPermissionsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByInvoiceSectionsNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingPermissionsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByBillingProfileNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingPermissionsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/billing/arm-billing/src/operations/billingProfiles.ts b/sdk/billing/arm-billing/src/operations/billingProfiles.ts new file mode 100644 index 000000000000..8d25a624f5c9 --- /dev/null +++ b/sdk/billing/arm-billing/src/operations/billingProfiles.ts @@ -0,0 +1,263 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * 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 * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/billingProfilesMappers"; +import * as Parameters from "../models/parameters"; +import { BillingManagementClientContext } from "../billingManagementClientContext"; + +/** Class representing a BillingProfiles. */ +export class BillingProfiles { + private readonly client: BillingManagementClientContext; + + /** + * Create a BillingProfiles. + * @param {BillingManagementClientContext} client Reference to the service client. + */ + constructor(client: BillingManagementClientContext) { + this.client = client; + } + + /** + * Lists the billing profiles that a user has access to. The operation is supported for billing + * accounts with agreement type Microsoft Customer Agreement or Microsoft Partner Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingAccount(billingAccountName: string, options?: Models.BillingProfilesListByBillingAccountOptionalParams): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param callback The callback + */ + listByBillingAccount(billingAccountName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingAccount(billingAccountName: string, options: Models.BillingProfilesListByBillingAccountOptionalParams, callback: msRest.ServiceCallback): void; + listByBillingAccount(billingAccountName: string, options?: Models.BillingProfilesListByBillingAccountOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + options + }, + listByBillingAccountOperationSpec, + callback) as Promise; + } + + /** + * Gets a billing profile by its ID. The operation is supported for billing accounts with agreement + * type Microsoft Customer Agreement or Microsoft Partner Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param [options] The optional parameters + * @returns Promise + */ + get(billingAccountName: string, billingProfileName: string, options?: Models.BillingProfilesGetOptionalParams): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param callback The callback + */ + get(billingAccountName: string, billingProfileName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param options The optional parameters + * @param callback The callback + */ + get(billingAccountName: string, billingProfileName: string, options: Models.BillingProfilesGetOptionalParams, callback: msRest.ServiceCallback): void; + get(billingAccountName: string, billingProfileName: string, options?: Models.BillingProfilesGetOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates a billing profile. The operation is supported for billing accounts with + * agreement type Microsoft Customer Agreement or Microsoft Partner Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param parameters The new or updated billing profile. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(billingAccountName: string, billingProfileName: string, parameters: Models.BillingProfile, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(billingAccountName,billingProfileName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Creates or updates a billing profile. The operation is supported for billing accounts with + * agreement type Microsoft Customer Agreement or Microsoft Partner Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param parameters The new or updated billing profile. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(billingAccountName: string, billingProfileName: string, parameters: Models.BillingProfile, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + billingAccountName, + billingProfileName, + parameters, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Lists the billing profiles that a user has access to. The operation is supported for billing + * accounts with agreement type Microsoft Customer Agreement or Microsoft Partner Agreement. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByBillingAccountNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingAccountNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByBillingAccountNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByBillingAccountOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles", + urlParameters: [ + Parameters.billingAccountName + ], + queryParameters: [ + Parameters.apiVersion0, + Parameters.expand + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingProfileListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName + ], + queryParameters: [ + Parameters.apiVersion0, + Parameters.expand + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingProfile + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.BillingProfile, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.BillingProfile, + headersMapper: Mappers.BillingProfilesCreateOrUpdateHeaders + }, + 202: { + headersMapper: Mappers.BillingProfilesCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse, + headersMapper: Mappers.BillingProfilesCreateOrUpdateHeaders + } + }, + serializer +}; + +const listByBillingAccountNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingProfileListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/billing/arm-billing/src/operations/billingPropertyOperations.ts b/sdk/billing/arm-billing/src/operations/billingPropertyOperations.ts new file mode 100644 index 000000000000..38d443dce27b --- /dev/null +++ b/sdk/billing/arm-billing/src/operations/billingPropertyOperations.ts @@ -0,0 +1,139 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * 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 * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/billingPropertyOperationsMappers"; +import * as Parameters from "../models/parameters"; +import { BillingManagementClientContext } from "../billingManagementClientContext"; + +/** Class representing a BillingPropertyOperations. */ +export class BillingPropertyOperations { + private readonly client: BillingManagementClientContext; + + /** + * Create a BillingPropertyOperations. + * @param {BillingManagementClientContext} client Reference to the service client. + */ + constructor(client: BillingManagementClientContext) { + this.client = client; + } + + /** + * Get the billing properties for a subscription. This operation is not supported for billing + * accounts with agreement type Enterprise Agreement. + * @param [options] The optional parameters + * @returns Promise + */ + get(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + get(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + get(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Updates the billing property of a subscription. Currently, cost center can be updated. The + * operation is supported only for billing accounts with agreement type Microsoft Customer + * Agreement. + * @param [options] The optional parameters + * @returns Promise + */ + update(options?: Models.BillingPropertyUpdateOptionalParams): Promise; + /** + * @param callback The callback + */ + update(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + update(options: Models.BillingPropertyUpdateOptionalParams, callback: msRest.ServiceCallback): void; + update(options?: Models.BillingPropertyUpdateOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + updateOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Billing/billingProperty/default", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingProperty + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const updateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Billing/billingProperty/default", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: { + costCenter: [ + "options", + "costCenter" + ] + }, + mapper: { + ...Mappers.BillingProperty, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.BillingProperty + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/billing/arm-billing/src/operations/billingRoleAssignments.ts b/sdk/billing/arm-billing/src/operations/billingRoleAssignments.ts new file mode 100644 index 000000000000..d81abf2b71fc --- /dev/null +++ b/sdk/billing/arm-billing/src/operations/billingRoleAssignments.ts @@ -0,0 +1,729 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * 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 * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/billingRoleAssignmentsMappers"; +import * as Parameters from "../models/parameters"; +import { BillingManagementClientContext } from "../billingManagementClientContext"; + +/** Class representing a BillingRoleAssignments. */ +export class BillingRoleAssignments { + private readonly client: BillingManagementClientContext; + + /** + * Create a BillingRoleAssignments. + * @param {BillingManagementClientContext} client Reference to the service client. + */ + constructor(client: BillingManagementClientContext) { + this.client = client; + } + + /** + * Gets a role assignment for the caller on a billing account. The operation is supported for + * billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer + * Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment. + * @param [options] The optional parameters + * @returns Promise + */ + getByBillingAccount(billingAccountName: string, billingRoleAssignmentName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment. + * @param callback The callback + */ + getByBillingAccount(billingAccountName: string, billingRoleAssignmentName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment. + * @param options The optional parameters + * @param callback The callback + */ + getByBillingAccount(billingAccountName: string, billingRoleAssignmentName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getByBillingAccount(billingAccountName: string, billingRoleAssignmentName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingRoleAssignmentName, + options + }, + getByBillingAccountOperationSpec, + callback) as Promise; + } + + /** + * Deletes a role assignment for the caller on a billing account. The operation is supported for + * billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer + * Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment. + * @param [options] The optional parameters + * @returns Promise + */ + deleteByBillingAccount(billingAccountName: string, billingRoleAssignmentName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment. + * @param callback The callback + */ + deleteByBillingAccount(billingAccountName: string, billingRoleAssignmentName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment. + * @param options The optional parameters + * @param callback The callback + */ + deleteByBillingAccount(billingAccountName: string, billingRoleAssignmentName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteByBillingAccount(billingAccountName: string, billingRoleAssignmentName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingRoleAssignmentName, + options + }, + deleteByBillingAccountOperationSpec, + callback) as Promise; + } + + /** + * Gets a role assignment for the caller on an invoice section. The operation is supported for + * billing accounts with agreement type Microsoft Customer Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param invoiceSectionName The ID that uniquely identifies an invoice section. + * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment. + * @param [options] The optional parameters + * @returns Promise + */ + getByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, billingRoleAssignmentName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param invoiceSectionName The ID that uniquely identifies an invoice section. + * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment. + * @param callback The callback + */ + getByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, billingRoleAssignmentName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param invoiceSectionName The ID that uniquely identifies an invoice section. + * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment. + * @param options The optional parameters + * @param callback The callback + */ + getByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, billingRoleAssignmentName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, billingRoleAssignmentName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + invoiceSectionName, + billingRoleAssignmentName, + options + }, + getByInvoiceSectionOperationSpec, + callback) as Promise; + } + + /** + * Deletes a role assignment for the caller on an invoice section. The operation is supported for + * billing accounts with agreement type Microsoft Customer Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param invoiceSectionName The ID that uniquely identifies an invoice section. + * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment. + * @param [options] The optional parameters + * @returns Promise + */ + deleteByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, billingRoleAssignmentName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param invoiceSectionName The ID that uniquely identifies an invoice section. + * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment. + * @param callback The callback + */ + deleteByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, billingRoleAssignmentName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param invoiceSectionName The ID that uniquely identifies an invoice section. + * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment. + * @param options The optional parameters + * @param callback The callback + */ + deleteByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, billingRoleAssignmentName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, billingRoleAssignmentName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + invoiceSectionName, + billingRoleAssignmentName, + options + }, + deleteByInvoiceSectionOperationSpec, + callback) as Promise; + } + + /** + * Gets a role assignment for the caller on a billing profile. The operation is supported for + * billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer + * Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment. + * @param [options] The optional parameters + * @returns Promise + */ + getByBillingProfile(billingAccountName: string, billingProfileName: string, billingRoleAssignmentName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment. + * @param callback The callback + */ + getByBillingProfile(billingAccountName: string, billingProfileName: string, billingRoleAssignmentName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment. + * @param options The optional parameters + * @param callback The callback + */ + getByBillingProfile(billingAccountName: string, billingProfileName: string, billingRoleAssignmentName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getByBillingProfile(billingAccountName: string, billingProfileName: string, billingRoleAssignmentName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + billingRoleAssignmentName, + options + }, + getByBillingProfileOperationSpec, + callback) as Promise; + } + + /** + * Deletes a role assignment for the caller on a billing profile. The operation is supported for + * billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer + * Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment. + * @param [options] The optional parameters + * @returns Promise + */ + deleteByBillingProfile(billingAccountName: string, billingProfileName: string, billingRoleAssignmentName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment. + * @param callback The callback + */ + deleteByBillingProfile(billingAccountName: string, billingProfileName: string, billingRoleAssignmentName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment. + * @param options The optional parameters + * @param callback The callback + */ + deleteByBillingProfile(billingAccountName: string, billingProfileName: string, billingRoleAssignmentName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteByBillingProfile(billingAccountName: string, billingProfileName: string, billingRoleAssignmentName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + billingRoleAssignmentName, + options + }, + deleteByBillingProfileOperationSpec, + callback) as Promise; + } + + /** + * Lists the role assignments for the caller on a billing account. The operation is supported for + * billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer + * Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingAccount(billingAccountName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param callback The callback + */ + listByBillingAccount(billingAccountName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingAccount(billingAccountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingAccount(billingAccountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + options + }, + listByBillingAccountOperationSpec, + callback) as Promise; + } + + /** + * Lists the role assignments for the caller on an invoice section. The operation is supported for + * billing accounts with agreement type Microsoft Customer Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param invoiceSectionName The ID that uniquely identifies an invoice section. + * @param [options] The optional parameters + * @returns Promise + */ + listByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param invoiceSectionName The ID that uniquely identifies an invoice section. + * @param callback The callback + */ + listByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param invoiceSectionName The ID that uniquely identifies an invoice section. + * @param options The optional parameters + * @param callback The callback + */ + listByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + invoiceSectionName, + options + }, + listByInvoiceSectionOperationSpec, + callback) as Promise; + } + + /** + * Lists the role assignments for the caller on a billing profile. The operation is supported for + * billing accounts with agreement type Microsoft Customer Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingProfile(billingAccountName: string, billingProfileName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param callback The callback + */ + listByBillingProfile(billingAccountName: string, billingProfileName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingProfile(billingAccountName: string, billingProfileName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingProfile(billingAccountName: string, billingProfileName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + options + }, + listByBillingProfileOperationSpec, + callback) as Promise; + } + + /** + * Lists the role assignments for the caller on a billing account. The operation is supported for + * billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer + * Agreement. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByBillingAccountNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingAccountNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByBillingAccountNextOperationSpec, + callback) as Promise; + } + + /** + * Lists the role assignments for the caller on an invoice section. The operation is supported for + * billing accounts with agreement type Microsoft Customer Agreement. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByInvoiceSectionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByInvoiceSectionNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByInvoiceSectionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByInvoiceSectionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByInvoiceSectionNextOperationSpec, + callback) as Promise; + } + + /** + * Lists the role assignments for the caller on a billing profile. The operation is supported for + * billing accounts with agreement type Microsoft Customer Agreement. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingProfileNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByBillingProfileNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingProfileNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingProfileNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByBillingProfileNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getByBillingAccountOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingRoleAssignments/{billingRoleAssignmentName}", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingRoleAssignmentName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingRoleAssignment + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const deleteByBillingAccountOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingRoleAssignments/{billingRoleAssignmentName}", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingRoleAssignmentName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingRoleAssignment + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getByInvoiceSectionOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/billingRoleAssignments/{billingRoleAssignmentName}", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName, + Parameters.invoiceSectionName, + Parameters.billingRoleAssignmentName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingRoleAssignment + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const deleteByInvoiceSectionOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/billingRoleAssignments/{billingRoleAssignmentName}", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName, + Parameters.invoiceSectionName, + Parameters.billingRoleAssignmentName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingRoleAssignment + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getByBillingProfileOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/billingRoleAssignments/{billingRoleAssignmentName}", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName, + Parameters.billingRoleAssignmentName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingRoleAssignment + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const deleteByBillingProfileOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/billingRoleAssignments/{billingRoleAssignmentName}", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName, + Parameters.billingRoleAssignmentName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingRoleAssignment + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByBillingAccountOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingRoleAssignments", + urlParameters: [ + Parameters.billingAccountName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingRoleAssignmentListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByInvoiceSectionOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/billingRoleAssignments", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName, + Parameters.invoiceSectionName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingRoleAssignmentListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByBillingProfileOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/billingRoleAssignments", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingRoleAssignmentListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByBillingAccountNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingRoleAssignmentListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByInvoiceSectionNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingRoleAssignmentListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByBillingProfileNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingRoleAssignmentListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/billing/arm-billing/src/operations/billingRoleDefinitions.ts b/sdk/billing/arm-billing/src/operations/billingRoleDefinitions.ts new file mode 100644 index 000000000000..146cb9771397 --- /dev/null +++ b/sdk/billing/arm-billing/src/operations/billingRoleDefinitions.ts @@ -0,0 +1,537 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * 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 * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/billingRoleDefinitionsMappers"; +import * as Parameters from "../models/parameters"; +import { BillingManagementClientContext } from "../billingManagementClientContext"; + +/** Class representing a BillingRoleDefinitions. */ +export class BillingRoleDefinitions { + private readonly client: BillingManagementClientContext; + + /** + * Create a BillingRoleDefinitions. + * @param {BillingManagementClientContext} client Reference to the service client. + */ + constructor(client: BillingManagementClientContext) { + this.client = client; + } + + /** + * Gets the definition for a role on a billing account. The operation is supported for billing + * accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingRoleDefinitionName The ID that uniquely identifies a role definition. + * @param [options] The optional parameters + * @returns Promise + */ + getByBillingAccount(billingAccountName: string, billingRoleDefinitionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingRoleDefinitionName The ID that uniquely identifies a role definition. + * @param callback The callback + */ + getByBillingAccount(billingAccountName: string, billingRoleDefinitionName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingRoleDefinitionName The ID that uniquely identifies a role definition. + * @param options The optional parameters + * @param callback The callback + */ + getByBillingAccount(billingAccountName: string, billingRoleDefinitionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getByBillingAccount(billingAccountName: string, billingRoleDefinitionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingRoleDefinitionName, + options + }, + getByBillingAccountOperationSpec, + callback) as Promise; + } + + /** + * Gets the definition for a role on an invoice section. The operation is supported only for + * billing accounts with agreement type Microsoft Customer Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param invoiceSectionName The ID that uniquely identifies an invoice section. + * @param billingRoleDefinitionName The ID that uniquely identifies a role definition. + * @param [options] The optional parameters + * @returns Promise + */ + getByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, billingRoleDefinitionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param invoiceSectionName The ID that uniquely identifies an invoice section. + * @param billingRoleDefinitionName The ID that uniquely identifies a role definition. + * @param callback The callback + */ + getByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, billingRoleDefinitionName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param invoiceSectionName The ID that uniquely identifies an invoice section. + * @param billingRoleDefinitionName The ID that uniquely identifies a role definition. + * @param options The optional parameters + * @param callback The callback + */ + getByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, billingRoleDefinitionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, billingRoleDefinitionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + invoiceSectionName, + billingRoleDefinitionName, + options + }, + getByInvoiceSectionOperationSpec, + callback) as Promise; + } + + /** + * Gets the definition for a role on a billing profile. The operation is supported for billing + * accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param billingRoleDefinitionName The ID that uniquely identifies a role definition. + * @param [options] The optional parameters + * @returns Promise + */ + getByBillingProfile(billingAccountName: string, billingProfileName: string, billingRoleDefinitionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param billingRoleDefinitionName The ID that uniquely identifies a role definition. + * @param callback The callback + */ + getByBillingProfile(billingAccountName: string, billingProfileName: string, billingRoleDefinitionName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param billingRoleDefinitionName The ID that uniquely identifies a role definition. + * @param options The optional parameters + * @param callback The callback + */ + getByBillingProfile(billingAccountName: string, billingProfileName: string, billingRoleDefinitionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getByBillingProfile(billingAccountName: string, billingProfileName: string, billingRoleDefinitionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + billingRoleDefinitionName, + options + }, + getByBillingProfileOperationSpec, + callback) as Promise; + } + + /** + * Lists the role definitions for a billing account. The operation is supported for billing + * accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingAccount(billingAccountName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param callback The callback + */ + listByBillingAccount(billingAccountName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingAccount(billingAccountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingAccount(billingAccountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + options + }, + listByBillingAccountOperationSpec, + callback) as Promise; + } + + /** + * Lists the role definitions for an invoice section. The operation is supported for billing + * accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param invoiceSectionName The ID that uniquely identifies an invoice section. + * @param [options] The optional parameters + * @returns Promise + */ + listByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param invoiceSectionName The ID that uniquely identifies an invoice section. + * @param callback The callback + */ + listByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param invoiceSectionName The ID that uniquely identifies an invoice section. + * @param options The optional parameters + * @param callback The callback + */ + listByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + invoiceSectionName, + options + }, + listByInvoiceSectionOperationSpec, + callback) as Promise; + } + + /** + * Lists the role definitions for a billing profile. The operation is supported for billing + * accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingProfile(billingAccountName: string, billingProfileName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param callback The callback + */ + listByBillingProfile(billingAccountName: string, billingProfileName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingProfile(billingAccountName: string, billingProfileName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingProfile(billingAccountName: string, billingProfileName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + options + }, + listByBillingProfileOperationSpec, + callback) as Promise; + } + + /** + * Lists the role definitions for a billing account. The operation is supported for billing + * accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByBillingAccountNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingAccountNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByBillingAccountNextOperationSpec, + callback) as Promise; + } + + /** + * Lists the role definitions for an invoice section. The operation is supported for billing + * accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByInvoiceSectionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByInvoiceSectionNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByInvoiceSectionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByInvoiceSectionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByInvoiceSectionNextOperationSpec, + callback) as Promise; + } + + /** + * Lists the role definitions for a billing profile. The operation is supported for billing + * accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingProfileNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByBillingProfileNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingProfileNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingProfileNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByBillingProfileNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getByBillingAccountOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingRoleDefinitions/{billingRoleDefinitionName}", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingRoleDefinitionName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingRoleDefinition + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getByInvoiceSectionOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/billingRoleDefinitions/{billingRoleDefinitionName}", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName, + Parameters.invoiceSectionName, + Parameters.billingRoleDefinitionName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingRoleDefinition + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getByBillingProfileOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/billingRoleDefinitions/{billingRoleDefinitionName}", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName, + Parameters.billingRoleDefinitionName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingRoleDefinition + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByBillingAccountOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingRoleDefinitions", + urlParameters: [ + Parameters.billingAccountName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingRoleDefinitionListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByInvoiceSectionOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/billingRoleDefinitions", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName, + Parameters.invoiceSectionName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingRoleDefinitionListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByBillingProfileOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/billingRoleDefinitions", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingRoleDefinitionListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByBillingAccountNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingRoleDefinitionListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByInvoiceSectionNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingRoleDefinitionListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByBillingProfileNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingRoleDefinitionListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/billing/arm-billing/src/operations/billingSubscriptions.ts b/sdk/billing/arm-billing/src/operations/billingSubscriptions.ts new file mode 100644 index 000000000000..8bfa5ee88e66 --- /dev/null +++ b/sdk/billing/arm-billing/src/operations/billingSubscriptions.ts @@ -0,0 +1,720 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * 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 * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/billingSubscriptionsMappers"; +import * as Parameters from "../models/parameters"; +import { BillingManagementClientContext } from "../billingManagementClientContext"; + +/** Class representing a BillingSubscriptions. */ +export class BillingSubscriptions { + private readonly client: BillingManagementClientContext; + + /** + * Create a BillingSubscriptions. + * @param {BillingManagementClientContext} client Reference to the service client. + */ + constructor(client: BillingManagementClientContext) { + this.client = client; + } + + /** + * Lists the subscriptions for a customer. The operation is supported only for billing accounts + * with agreement type Microsoft Partner Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param customerName The ID that uniquely identifies a customer. + * @param [options] The optional parameters + * @returns Promise + */ + listByCustomer(billingAccountName: string, customerName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param customerName The ID that uniquely identifies a customer. + * @param callback The callback + */ + listByCustomer(billingAccountName: string, customerName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param customerName The ID that uniquely identifies a customer. + * @param options The optional parameters + * @param callback The callback + */ + listByCustomer(billingAccountName: string, customerName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByCustomer(billingAccountName: string, customerName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + customerName, + options + }, + listByCustomerOperationSpec, + callback) as Promise; + } + + /** + * Lists the subscriptions for a billing account. The operation is supported for billing accounts + * with agreement type Microsoft Customer Agreement or Microsoft Partner Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingAccount(billingAccountName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param callback The callback + */ + listByBillingAccount(billingAccountName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingAccount(billingAccountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingAccount(billingAccountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + options + }, + listByBillingAccountOperationSpec, + callback) as Promise; + } + + /** + * Lists the subscriptions that are billed to a billing profile. The operation is supported for + * billing accounts with agreement type Microsoft Customer Agreement or Microsoft Partner + * Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingProfile(billingAccountName: string, billingProfileName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param callback The callback + */ + listByBillingProfile(billingAccountName: string, billingProfileName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingProfile(billingAccountName: string, billingProfileName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingProfile(billingAccountName: string, billingProfileName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + options + }, + listByBillingProfileOperationSpec, + callback) as Promise; + } + + /** + * Lists the subscriptions that are billed to an invoice section. The operation is supported only + * for billing accounts with agreement type Microsoft Customer Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param invoiceSectionName The ID that uniquely identifies an invoice section. + * @param [options] The optional parameters + * @returns Promise + */ + listByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param invoiceSectionName The ID that uniquely identifies an invoice section. + * @param callback The callback + */ + listByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param invoiceSectionName The ID that uniquely identifies an invoice section. + * @param options The optional parameters + * @param callback The callback + */ + listByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + invoiceSectionName, + options + }, + listByInvoiceSectionOperationSpec, + callback) as Promise; + } + + /** + * Gets a subscription by its ID. The operation is supported for billing accounts with agreement + * type Microsoft Customer Agreement and Microsoft Partner Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param [options] The optional parameters + * @returns Promise + */ + get(billingAccountName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param callback The callback + */ + get(billingAccountName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param options The optional parameters + * @param callback The callback + */ + get(billingAccountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(billingAccountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Updates the properties of a billing subscription. Currently, cost center can be updated. The + * operation is supported only for billing accounts with agreement type Microsoft Customer + * Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param parameters Request parameters that are provided to the update billing subscription + * operation. + * @param [options] The optional parameters + * @returns Promise + */ + update(billingAccountName: string, parameters: Models.BillingSubscription, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param parameters Request parameters that are provided to the update billing subscription + * operation. + * @param callback The callback + */ + update(billingAccountName: string, parameters: Models.BillingSubscription, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param parameters Request parameters that are provided to the update billing subscription + * operation. + * @param options The optional parameters + * @param callback The callback + */ + update(billingAccountName: string, parameters: Models.BillingSubscription, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + update(billingAccountName: string, parameters: Models.BillingSubscription, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + parameters, + options + }, + updateOperationSpec, + callback) as Promise; + } + + /** + * Moves a subscription's charges to a new invoice section. The new invoice section must belong to + * the same billing profile as the existing invoice section. This operation is supported for + * billing accounts with agreement type Microsoft Customer Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param destinationInvoiceSectionId The destination invoice section id. + * @param [options] The optional parameters + * @returns Promise + */ + move(billingAccountName: string, destinationInvoiceSectionId: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginMove(billingAccountName,destinationInvoiceSectionId,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Validates if a subscription's charges can be moved to a new invoice section. This operation is + * supported for billing accounts with agreement type Microsoft Customer Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param destinationInvoiceSectionId The destination invoice section id. + * @param [options] The optional parameters + * @returns Promise + */ + validateMove(billingAccountName: string, destinationInvoiceSectionId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param destinationInvoiceSectionId The destination invoice section id. + * @param callback The callback + */ + validateMove(billingAccountName: string, destinationInvoiceSectionId: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param destinationInvoiceSectionId The destination invoice section id. + * @param options The optional parameters + * @param callback The callback + */ + validateMove(billingAccountName: string, destinationInvoiceSectionId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + validateMove(billingAccountName: string, destinationInvoiceSectionId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + destinationInvoiceSectionId, + options + }, + validateMoveOperationSpec, + callback) as Promise; + } + + /** + * Moves a subscription's charges to a new invoice section. The new invoice section must belong to + * the same billing profile as the existing invoice section. This operation is supported for + * billing accounts with agreement type Microsoft Customer Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param destinationInvoiceSectionId The destination invoice section id. + * @param [options] The optional parameters + * @returns Promise + */ + beginMove(billingAccountName: string, destinationInvoiceSectionId: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + billingAccountName, + destinationInvoiceSectionId, + options + }, + beginMoveOperationSpec, + options); + } + + /** + * Lists the subscriptions for a customer. The operation is supported only for billing accounts + * with agreement type Microsoft Partner Agreement. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByCustomerNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByCustomerNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByCustomerNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByCustomerNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByCustomerNextOperationSpec, + callback) as Promise; + } + + /** + * Lists the subscriptions for a billing account. The operation is supported for billing accounts + * with agreement type Microsoft Customer Agreement or Microsoft Partner Agreement. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByBillingAccountNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingAccountNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByBillingAccountNextOperationSpec, + callback) as Promise; + } + + /** + * Lists the subscriptions that are billed to a billing profile. The operation is supported for + * billing accounts with agreement type Microsoft Customer Agreement or Microsoft Partner + * Agreement. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingProfileNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByBillingProfileNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingProfileNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingProfileNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByBillingProfileNextOperationSpec, + callback) as Promise; + } + + /** + * Lists the subscriptions that are billed to an invoice section. The operation is supported only + * for billing accounts with agreement type Microsoft Customer Agreement. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByInvoiceSectionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByInvoiceSectionNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByInvoiceSectionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByInvoiceSectionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByInvoiceSectionNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByCustomerOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}/billingSubscriptions", + urlParameters: [ + Parameters.billingAccountName, + Parameters.customerName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingSubscriptionsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByBillingAccountOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions", + urlParameters: [ + Parameters.billingAccountName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingSubscriptionsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByBillingProfileOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/billingSubscriptions", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingSubscriptionsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByInvoiceSectionOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/billingSubscriptions", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName, + Parameters.invoiceSectionName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingSubscriptionsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions/{subscriptionId}", + urlParameters: [ + Parameters.billingAccountName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingSubscription + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const updateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions/{subscriptionId}", + urlParameters: [ + Parameters.billingAccountName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.BillingSubscription, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.BillingSubscription + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const validateMoveOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions/{subscriptionId}/validateMoveEligibility", + urlParameters: [ + Parameters.billingAccountName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: { + destinationInvoiceSectionId: "destinationInvoiceSectionId" + }, + mapper: { + ...Mappers.TransferBillingSubscriptionRequestProperties, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ValidateSubscriptionTransferEligibilityResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginMoveOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions/{subscriptionId}/move", + urlParameters: [ + Parameters.billingAccountName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: { + destinationInvoiceSectionId: "destinationInvoiceSectionId" + }, + mapper: { + ...Mappers.TransferBillingSubscriptionRequestProperties, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.BillingSubscription, + headersMapper: Mappers.BillingSubscriptionsMoveHeaders + }, + 202: { + headersMapper: Mappers.BillingSubscriptionsMoveHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse, + headersMapper: Mappers.BillingSubscriptionsMoveHeaders + } + }, + serializer +}; + +const listByCustomerNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingSubscriptionsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByBillingAccountNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingSubscriptionsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByBillingProfileNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingSubscriptionsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByInvoiceSectionNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingSubscriptionsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/billing/arm-billing/src/operations/customers.ts b/sdk/billing/arm-billing/src/operations/customers.ts new file mode 100644 index 000000000000..d2d99e8c1654 --- /dev/null +++ b/sdk/billing/arm-billing/src/operations/customers.ts @@ -0,0 +1,301 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * 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 * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/customersMappers"; +import * as Parameters from "../models/parameters"; +import { BillingManagementClientContext } from "../billingManagementClientContext"; + +/** Class representing a Customers. */ +export class Customers { + private readonly client: BillingManagementClientContext; + + /** + * Create a Customers. + * @param {BillingManagementClientContext} client Reference to the service client. + */ + constructor(client: BillingManagementClientContext) { + this.client = client; + } + + /** + * Lists the customers that are billed to a billing profile. The operation is supported only for + * billing accounts with agreement type Microsoft Partner Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingProfile(billingAccountName: string, billingProfileName: string, options?: Models.CustomersListByBillingProfileOptionalParams): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param callback The callback + */ + listByBillingProfile(billingAccountName: string, billingProfileName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingProfile(billingAccountName: string, billingProfileName: string, options: Models.CustomersListByBillingProfileOptionalParams, callback: msRest.ServiceCallback): void; + listByBillingProfile(billingAccountName: string, billingProfileName: string, options?: Models.CustomersListByBillingProfileOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + options + }, + listByBillingProfileOperationSpec, + callback) as Promise; + } + + /** + * Lists the customers that are billed to a billing account. The operation is supported only for + * billing accounts with agreement type Microsoft Partner Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingAccount(billingAccountName: string, options?: Models.CustomersListByBillingAccountOptionalParams): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param callback The callback + */ + listByBillingAccount(billingAccountName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingAccount(billingAccountName: string, options: Models.CustomersListByBillingAccountOptionalParams, callback: msRest.ServiceCallback): void; + listByBillingAccount(billingAccountName: string, options?: Models.CustomersListByBillingAccountOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + options + }, + listByBillingAccountOperationSpec, + callback) as Promise; + } + + /** + * Gets a customer by its ID. The operation is supported only for billing accounts with agreement + * type Microsoft Partner Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param customerName The ID that uniquely identifies a customer. + * @param [options] The optional parameters + * @returns Promise + */ + get(billingAccountName: string, customerName: string, options?: Models.CustomersGetOptionalParams): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param customerName The ID that uniquely identifies a customer. + * @param callback The callback + */ + get(billingAccountName: string, customerName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param customerName The ID that uniquely identifies a customer. + * @param options The optional parameters + * @param callback The callback + */ + get(billingAccountName: string, customerName: string, options: Models.CustomersGetOptionalParams, callback: msRest.ServiceCallback): void; + get(billingAccountName: string, customerName: string, options?: Models.CustomersGetOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + customerName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Lists the customers that are billed to a billing profile. The operation is supported only for + * billing accounts with agreement type Microsoft Partner Agreement. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingProfileNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByBillingProfileNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingProfileNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingProfileNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByBillingProfileNextOperationSpec, + callback) as Promise; + } + + /** + * Lists the customers that are billed to a billing account. The operation is supported only for + * billing accounts with agreement type Microsoft Partner Agreement. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByBillingAccountNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingAccountNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByBillingAccountNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByBillingProfileOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/customers", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName + ], + queryParameters: [ + Parameters.apiVersion0, + Parameters.search, + Parameters.filter + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.CustomerListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByBillingAccountOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers", + urlParameters: [ + Parameters.billingAccountName + ], + queryParameters: [ + Parameters.apiVersion0, + Parameters.search, + Parameters.filter + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.CustomerListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}", + urlParameters: [ + Parameters.billingAccountName, + Parameters.customerName + ], + queryParameters: [ + Parameters.apiVersion0, + Parameters.expand + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Customer + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByBillingProfileNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.CustomerListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByBillingAccountNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.CustomerListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/billing/arm-billing/src/operations/enrollmentAccounts.ts b/sdk/billing/arm-billing/src/operations/enrollmentAccounts.ts index c3309045d357..aa1077f845c2 100644 --- a/sdk/billing/arm-billing/src/operations/enrollmentAccounts.ts +++ b/sdk/billing/arm-billing/src/operations/enrollmentAccounts.ts @@ -61,14 +61,14 @@ export class EnrollmentAccounts { * @param name Enrollment Account name. * @param callback The callback */ - get(name: string, callback: msRest.ServiceCallback): void; + get(name: string, callback: msRest.ServiceCallback): void; /** * @param name Enrollment Account name. * @param options The optional parameters * @param callback The callback */ - get(name: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(name: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get(name: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(name: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { name, @@ -113,7 +113,7 @@ const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "providers/Microsoft.Billing/enrollmentAccounts", queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage @@ -136,14 +136,14 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.name ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage ], responses: { 200: { - bodyMapper: Mappers.EnrollmentAccount + bodyMapper: Mappers.EnrollmentAccountSummary }, default: { bodyMapper: Mappers.ErrorResponse diff --git a/sdk/billing/arm-billing/src/operations/index.ts b/sdk/billing/arm-billing/src/operations/index.ts index cfc488e846ba..5ef3c67c4d81 100644 --- a/sdk/billing/arm-billing/src/operations/index.ts +++ b/sdk/billing/arm-billing/src/operations/index.ts @@ -8,7 +8,23 @@ * regenerated. */ -export * from "./enrollmentAccounts"; -export * from "./billingPeriods"; +export * from "./billingAccounts"; +export * from "./address"; +export * from "./availableBalances"; +export * from "./instructions"; +export * from "./billingProfiles"; +export * from "./customers"; +export * from "./invoiceSections"; +export * from "./billingPermissions"; +export * from "./billingSubscriptions"; +export * from "./products"; export * from "./invoices"; +export * from "./transactions"; +export * from "./policies"; +export * from "./billingPropertyOperations"; export * from "./operations"; +export * from "./billingRoleDefinitions"; +export * from "./billingRoleAssignments"; +export * from "./agreements"; +export * from "./enrollmentAccounts"; +export * from "./billingPeriods"; diff --git a/sdk/billing/arm-billing/src/operations/instructions.ts b/sdk/billing/arm-billing/src/operations/instructions.ts new file mode 100644 index 000000000000..91c029f8aad3 --- /dev/null +++ b/sdk/billing/arm-billing/src/operations/instructions.ts @@ -0,0 +1,270 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * 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 * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/instructionsMappers"; +import * as Parameters from "../models/parameters"; +import { BillingManagementClientContext } from "../billingManagementClientContext"; + +/** Class representing a Instructions. */ +export class Instructions { + private readonly client: BillingManagementClientContext; + + /** + * Create a Instructions. + * @param {BillingManagementClientContext} client Reference to the service client. + */ + constructor(client: BillingManagementClientContext) { + this.client = client; + } + + /** + * Lists the instructions by billing profile id. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingProfile(billingAccountName: string, billingProfileName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param callback The callback + */ + listByBillingProfile(billingAccountName: string, billingProfileName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingProfile(billingAccountName: string, billingProfileName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingProfile(billingAccountName: string, billingProfileName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + options + }, + listByBillingProfileOperationSpec, + callback) as Promise; + } + + /** + * Get the instruction by name. These are custom billing instructions and are only applicable for + * certain customers. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param instructionName Instruction Name. + * @param [options] The optional parameters + * @returns Promise + */ + get(billingAccountName: string, billingProfileName: string, instructionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param instructionName Instruction Name. + * @param callback The callback + */ + get(billingAccountName: string, billingProfileName: string, instructionName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param instructionName Instruction Name. + * @param options The optional parameters + * @param callback The callback + */ + get(billingAccountName: string, billingProfileName: string, instructionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(billingAccountName: string, billingProfileName: string, instructionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + instructionName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates an instruction. These are custom billing instructions and are only applicable + * for certain customers. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param instructionName Instruction Name. + * @param parameters The new instruction. + * @param [options] The optional parameters + * @returns Promise + */ + put(billingAccountName: string, billingProfileName: string, instructionName: string, parameters: Models.Instruction, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param instructionName Instruction Name. + * @param parameters The new instruction. + * @param callback The callback + */ + put(billingAccountName: string, billingProfileName: string, instructionName: string, parameters: Models.Instruction, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param instructionName Instruction Name. + * @param parameters The new instruction. + * @param options The optional parameters + * @param callback The callback + */ + put(billingAccountName: string, billingProfileName: string, instructionName: string, parameters: Models.Instruction, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + put(billingAccountName: string, billingProfileName: string, instructionName: string, parameters: Models.Instruction, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + instructionName, + parameters, + options + }, + putOperationSpec, + callback) as Promise; + } + + /** + * Lists the instructions by billing profile id. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingProfileNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByBillingProfileNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingProfileNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingProfileNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByBillingProfileNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByBillingProfileOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/instructions", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.InstructionListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/instructions/{instructionName}", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName, + Parameters.instructionName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Instruction + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const putOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/instructions/{instructionName}", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName, + Parameters.instructionName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.Instruction, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.Instruction + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByBillingProfileNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.InstructionListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/billing/arm-billing/src/operations/invoiceSections.ts b/sdk/billing/arm-billing/src/operations/invoiceSections.ts new file mode 100644 index 000000000000..40016fb1e056 --- /dev/null +++ b/sdk/billing/arm-billing/src/operations/invoiceSections.ts @@ -0,0 +1,275 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * 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 * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/invoiceSectionsMappers"; +import * as Parameters from "../models/parameters"; +import { BillingManagementClientContext } from "../billingManagementClientContext"; + +/** Class representing a InvoiceSections. */ +export class InvoiceSections { + private readonly client: BillingManagementClientContext; + + /** + * Create a InvoiceSections. + * @param {BillingManagementClientContext} client Reference to the service client. + */ + constructor(client: BillingManagementClientContext) { + this.client = client; + } + + /** + * Lists the invoice sections that a user has access to. The operation is supported only for + * billing accounts with agreement type Microsoft Customer Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingProfile(billingAccountName: string, billingProfileName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param callback The callback + */ + listByBillingProfile(billingAccountName: string, billingProfileName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingProfile(billingAccountName: string, billingProfileName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingProfile(billingAccountName: string, billingProfileName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + options + }, + listByBillingProfileOperationSpec, + callback) as Promise; + } + + /** + * Gets an invoice section by its ID. The operation is supported only for billing accounts with + * agreement type Microsoft Customer Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param invoiceSectionName The ID that uniquely identifies an invoice section. + * @param [options] The optional parameters + * @returns Promise + */ + get(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param invoiceSectionName The ID that uniquely identifies an invoice section. + * @param callback The callback + */ + get(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param invoiceSectionName The ID that uniquely identifies an invoice section. + * @param options The optional parameters + * @param callback The callback + */ + get(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + invoiceSectionName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates an invoice section. The operation is supported only for billing accounts with + * agreement type Microsoft Customer Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param invoiceSectionName The ID that uniquely identifies an invoice section. + * @param parameters The new or updated invoice section. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, parameters: Models.InvoiceSection, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(billingAccountName,billingProfileName,invoiceSectionName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Creates or updates an invoice section. The operation is supported only for billing accounts with + * agreement type Microsoft Customer Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param invoiceSectionName The ID that uniquely identifies an invoice section. + * @param parameters The new or updated invoice section. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, parameters: Models.InvoiceSection, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + billingAccountName, + billingProfileName, + invoiceSectionName, + parameters, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Lists the invoice sections that a user has access to. The operation is supported only for + * billing accounts with agreement type Microsoft Customer Agreement. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingProfileNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByBillingProfileNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingProfileNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingProfileNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByBillingProfileNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByBillingProfileOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.InvoiceSectionListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName, + Parameters.invoiceSectionName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.InvoiceSection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName, + Parameters.invoiceSectionName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.InvoiceSection, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.InvoiceSection, + headersMapper: Mappers.InvoiceSectionsCreateOrUpdateHeaders + }, + 202: { + headersMapper: Mappers.InvoiceSectionsCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse, + headersMapper: Mappers.InvoiceSectionsCreateOrUpdateHeaders + } + }, + serializer +}; + +const listByBillingProfileNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.InvoiceSectionListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/billing/arm-billing/src/operations/invoices.ts b/sdk/billing/arm-billing/src/operations/invoices.ts index cdf4a4245a57..1bb1bbd5f8a3 100644 --- a/sdk/billing/arm-billing/src/operations/invoices.ts +++ b/sdk/billing/arm-billing/src/operations/invoices.ts @@ -9,6 +9,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; import * as Models from "../models"; import * as Mappers from "../models/invoicesMappers"; import * as Parameters from "../models/parameters"; @@ -27,57 +28,123 @@ export class Invoices { } /** - * Lists the available invoices for a subscription in reverse chronological order beginning with - * the most recent invoice. In preview, invoices are available via this API only for invoice - * periods which end December 1, 2016 or later. This is only supported for Azure Web-Direct - * subscriptions. Other subscription types which were not purchased directly through the Azure web - * portal are not supported through this preview API. + * Lists the invoices for a billing account for a given start date and end date. The operation is + * supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft + * Customer Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param periodStartDate The start date to fetch the invoices. The date should be specified in + * MM-DD-YYYY format. + * @param periodEndDate The end date to fetch the invoices. The date should be specified in + * MM-DD-YYYY format. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - list(options?: Models.InvoicesListOptionalParams): Promise; + listByBillingAccount(billingAccountName: string, periodStartDate: string, periodEndDate: string, options?: msRest.RequestOptionsBase): Promise; /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param periodStartDate The start date to fetch the invoices. The date should be specified in + * MM-DD-YYYY format. + * @param periodEndDate The end date to fetch the invoices. The date should be specified in + * MM-DD-YYYY format. * @param callback The callback */ - list(callback: msRest.ServiceCallback): void; + listByBillingAccount(billingAccountName: string, periodStartDate: string, periodEndDate: string, callback: msRest.ServiceCallback): void; /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param periodStartDate The start date to fetch the invoices. The date should be specified in + * MM-DD-YYYY format. + * @param periodEndDate The end date to fetch the invoices. The date should be specified in + * MM-DD-YYYY format. * @param options The optional parameters * @param callback The callback */ - list(options: Models.InvoicesListOptionalParams, callback: msRest.ServiceCallback): void; - list(options?: Models.InvoicesListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listByBillingAccount(billingAccountName: string, periodStartDate: string, periodEndDate: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingAccount(billingAccountName: string, periodStartDate: string, periodEndDate: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { + billingAccountName, + periodStartDate, + periodEndDate, options }, - listOperationSpec, - callback) as Promise; + listByBillingAccountOperationSpec, + callback) as Promise; } /** - * Gets a named invoice resource. When getting a single invoice, the downloadUrl property is - * expanded automatically. This is only supported for Azure Web-Direct subscriptions. Other - * subscription types which were not purchased directly through the Azure web portal are not - * supported through this preview API. - * @param invoiceName The name of an invoice resource. + * Lists the invoices for a billing profile for a given start date and end date. The operation is + * supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft + * Customer Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param periodStartDate The start date to fetch the invoices. The date should be specified in + * MM-DD-YYYY format. + * @param periodEndDate The end date to fetch the invoices. The date should be specified in + * MM-DD-YYYY format. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingProfile(billingAccountName: string, billingProfileName: string, periodStartDate: string, periodEndDate: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param periodStartDate The start date to fetch the invoices. The date should be specified in + * MM-DD-YYYY format. + * @param periodEndDate The end date to fetch the invoices. The date should be specified in + * MM-DD-YYYY format. + * @param callback The callback + */ + listByBillingProfile(billingAccountName: string, billingProfileName: string, periodStartDate: string, periodEndDate: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param periodStartDate The start date to fetch the invoices. The date should be specified in + * MM-DD-YYYY format. + * @param periodEndDate The end date to fetch the invoices. The date should be specified in + * MM-DD-YYYY format. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingProfile(billingAccountName: string, billingProfileName: string, periodStartDate: string, periodEndDate: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingProfile(billingAccountName: string, billingProfileName: string, periodStartDate: string, periodEndDate: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + periodStartDate, + periodEndDate, + options + }, + listByBillingProfileOperationSpec, + callback) as Promise; + } + + /** + * Gets an invoice by billing account name and ID. The operation is supported for billing accounts + * with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param invoiceName The ID that uniquely identifies an invoice. * @param [options] The optional parameters * @returns Promise */ - get(invoiceName: string, options?: msRest.RequestOptionsBase): Promise; + get(billingAccountName: string, invoiceName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param invoiceName The name of an invoice resource. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param invoiceName The ID that uniquely identifies an invoice. * @param callback The callback */ - get(invoiceName: string, callback: msRest.ServiceCallback): void; + get(billingAccountName: string, invoiceName: string, callback: msRest.ServiceCallback): void; /** - * @param invoiceName The name of an invoice resource. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param invoiceName The ID that uniquely identifies an invoice. * @param options The optional parameters * @param callback The callback */ - get(invoiceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(invoiceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get(billingAccountName: string, invoiceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(billingAccountName: string, invoiceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { + billingAccountName, invoiceName, options }, @@ -86,86 +153,356 @@ export class Invoices { } /** - * Gets the most recent invoice. When getting a single invoice, the downloadUrl property is - * expanded automatically. This is only supported for Azure Web-Direct subscriptions. Other - * subscription types which were not purchased directly through the Azure web portal are not - * supported through this preview API. + * Gets an invoice by ID. The operation is supported for billing accounts with agreement type + * Microsoft Partner Agreement or Microsoft Customer Agreement. + * @param invoiceName The ID that uniquely identifies an invoice. + * @param [options] The optional parameters + * @returns Promise + */ + getById(invoiceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param invoiceName The ID that uniquely identifies an invoice. + * @param callback The callback + */ + getById(invoiceName: string, callback: msRest.ServiceCallback): void; + /** + * @param invoiceName The ID that uniquely identifies an invoice. + * @param options The optional parameters + * @param callback The callback + */ + getById(invoiceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getById(invoiceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + invoiceName, + options + }, + getByIdOperationSpec, + callback) as Promise; + } + + /** + * Gets a URL to download an invoice. The operation is supported for billing accounts with + * agreement type Microsoft Partner Agreement or Microsoft Customer Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param invoiceName The ID that uniquely identifies an invoice. + * @param downloadToken Download token with document source and document ID. + * @param [options] The optional parameters + * @returns Promise + */ + downloadInvoice(billingAccountName: string, invoiceName: string, downloadToken: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDownloadInvoice(billingAccountName,invoiceName,downloadToken,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Gets a URL to download an multiple invoices documents (invoice pdf, tax receipts, credit notes) + * as a zip file. The operation is supported for billing accounts with agreement type Microsoft + * Partner Agreement or Microsoft Customer Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param downloadUrls An array of download urls for individual documents + * @param [options] The optional parameters + * @returns Promise + */ + downloadMultipleModernInvoice(billingAccountName: string, downloadUrls: string[], options?: msRest.RequestOptionsBase): Promise { + return this.beginDownloadMultipleModernInvoice(billingAccountName,downloadUrls,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Lists the invoices for a subscription. + * @param periodStartDate Invoice period start date. + * @param periodEndDate Invoice period end date. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingSubscription(periodStartDate: string, periodEndDate: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param periodStartDate Invoice period start date. + * @param periodEndDate Invoice period end date. + * @param callback The callback + */ + listByBillingSubscription(periodStartDate: string, periodEndDate: string, callback: msRest.ServiceCallback): void; + /** + * @param periodStartDate Invoice period start date. + * @param periodEndDate Invoice period end date. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingSubscription(periodStartDate: string, periodEndDate: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingSubscription(periodStartDate: string, periodEndDate: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + periodStartDate, + periodEndDate, + options + }, + listByBillingSubscriptionOperationSpec, + callback) as Promise; + } + + /** + * Gets an invoice by subscription ID and invoice ID. + * @param invoiceName The ID that uniquely identifies an invoice. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - getLatest(options?: msRest.RequestOptionsBase): Promise; + getBySubscriptionAndInvoiceId(invoiceName: string, options?: msRest.RequestOptionsBase): Promise; /** + * @param invoiceName The ID that uniquely identifies an invoice. * @param callback The callback */ - getLatest(callback: msRest.ServiceCallback): void; + getBySubscriptionAndInvoiceId(invoiceName: string, callback: msRest.ServiceCallback): void; /** + * @param invoiceName The ID that uniquely identifies an invoice. * @param options The optional parameters * @param callback The callback */ - getLatest(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getLatest(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + getBySubscriptionAndInvoiceId(invoiceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getBySubscriptionAndInvoiceId(invoiceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { + invoiceName, + options + }, + getBySubscriptionAndInvoiceIdOperationSpec, + callback) as Promise; + } + + /** + * Gets a URL to download an invoice. + * @param invoiceName The ID that uniquely identifies an invoice. + * @param downloadToken Download token with document source and document ID. + * @param [options] The optional parameters + * @returns Promise + */ + downloadBillingSubscriptionInvoice(invoiceName: string, downloadToken: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDownloadBillingSubscriptionInvoice(invoiceName,downloadToken,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Gets a URL to download multiple invoices documents (invoice pdf, tax receipts, credit notes) as + * a zip file. + * @param downloadUrls An array of download urls for individual documents + * @param [options] The optional parameters + * @returns Promise + */ + downloadMultipleBillingSubscriptionInvoice(downloadUrls: string[], options?: msRest.RequestOptionsBase): Promise { + return this.beginDownloadMultipleBillingSubscriptionInvoice(downloadUrls,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Gets a URL to download an invoice. The operation is supported for billing accounts with + * agreement type Microsoft Partner Agreement or Microsoft Customer Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param invoiceName The ID that uniquely identifies an invoice. + * @param downloadToken Download token with document source and document ID. + * @param [options] The optional parameters + * @returns Promise + */ + beginDownloadInvoice(billingAccountName: string, invoiceName: string, downloadToken: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + billingAccountName, + invoiceName, + downloadToken, options }, - getLatestOperationSpec, - callback) as Promise; + beginDownloadInvoiceOperationSpec, + options); } /** - * Lists the available invoices for a subscription in reverse chronological order beginning with - * the most recent invoice. In preview, invoices are available via this API only for invoice - * periods which end December 1, 2016 or later. This is only supported for Azure Web-Direct - * subscriptions. Other subscription types which were not purchased directly through the Azure web - * portal are not supported through this preview API. + * Gets a URL to download an multiple invoices documents (invoice pdf, tax receipts, credit notes) + * as a zip file. The operation is supported for billing accounts with agreement type Microsoft + * Partner Agreement or Microsoft Customer Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param downloadUrls An array of download urls for individual documents + * @param [options] The optional parameters + * @returns Promise + */ + beginDownloadMultipleModernInvoice(billingAccountName: string, downloadUrls: string[], options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + billingAccountName, + downloadUrls, + options + }, + beginDownloadMultipleModernInvoiceOperationSpec, + options); + } + + /** + * Gets a URL to download an invoice. + * @param invoiceName The ID that uniquely identifies an invoice. + * @param downloadToken Download token with document source and document ID. + * @param [options] The optional parameters + * @returns Promise + */ + beginDownloadBillingSubscriptionInvoice(invoiceName: string, downloadToken: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + invoiceName, + downloadToken, + options + }, + beginDownloadBillingSubscriptionInvoiceOperationSpec, + options); + } + + /** + * Gets a URL to download multiple invoices documents (invoice pdf, tax receipts, credit notes) as + * a zip file. + * @param downloadUrls An array of download urls for individual documents + * @param [options] The optional parameters + * @returns Promise + */ + beginDownloadMultipleBillingSubscriptionInvoice(downloadUrls: string[], options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + downloadUrls, + options + }, + beginDownloadMultipleBillingSubscriptionInvoiceOperationSpec, + options); + } + + /** + * Lists the invoices for a billing account for a given start date and end date. The operation is + * supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft + * Customer Agreement. * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listByBillingAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + listByBillingAccountNext(nextPageLink: string, callback: msRest.ServiceCallback): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param options The optional parameters * @param callback The callback */ - listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listByBillingAccountNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, - listNextOperationSpec, - callback) as Promise; + listByBillingAccountNextOperationSpec, + callback) as Promise; + } + + /** + * Lists the invoices for a billing profile for a given start date and end date. The operation is + * supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft + * Customer Agreement. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingProfileNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByBillingProfileNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingProfileNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingProfileNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByBillingProfileNextOperationSpec, + callback) as Promise; + } + + /** + * Lists the invoices for a subscription. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingSubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByBillingSubscriptionNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingSubscriptionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingSubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByBillingSubscriptionNextOperationSpec, + callback) as Promise; } } // Operation Specifications const serializer = new msRest.Serializer(Mappers); -const listOperationSpec: msRest.OperationSpec = { +const listByBillingAccountOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Billing/invoices", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices", urlParameters: [ - Parameters.subscriptionId + Parameters.billingAccountName + ], + queryParameters: [ + Parameters.apiVersion0, + Parameters.periodStartDate, + Parameters.periodEndDate + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.InvoiceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByBillingProfileOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoices", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName ], queryParameters: [ - Parameters.apiVersion, - Parameters.expand, - Parameters.filter, - Parameters.skiptoken, - Parameters.top + Parameters.apiVersion0, + Parameters.periodStartDate, + Parameters.periodEndDate ], headerParameters: [ Parameters.acceptLanguage ], responses: { 200: { - bodyMapper: Mappers.InvoicesListResult + bodyMapper: Mappers.InvoiceListResult }, default: { bodyMapper: Mappers.ErrorResponse @@ -176,13 +513,36 @@ const listOperationSpec: msRest.OperationSpec = { const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Billing/invoices/{invoiceName}", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/{invoiceName}", + urlParameters: [ + Parameters.billingAccountName, + Parameters.invoiceName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Invoice + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getByIdOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/default/invoices/{invoiceName}", urlParameters: [ - Parameters.subscriptionId, Parameters.invoiceName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -198,14 +558,40 @@ const getOperationSpec: msRest.OperationSpec = { serializer }; -const getLatestOperationSpec: msRest.OperationSpec = { +const listByBillingSubscriptionOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Billing/invoices/latest", + path: "providers/Microsoft.Billing/billingAccounts/default/billingSubscriptions/{subscriptionId}/invoices", urlParameters: [ Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.periodStartDate, + Parameters.periodEndDate, + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.InvoiceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getBySubscriptionAndInvoiceIdOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/default/billingSubscriptions/{subscriptionId}/invoices/{invoiceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.invoiceName + ], + queryParameters: [ + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -221,7 +607,195 @@ const getLatestOperationSpec: msRest.OperationSpec = { serializer }; -const listNextOperationSpec: msRest.OperationSpec = { +const beginDownloadInvoiceOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/{invoiceName}/download", + urlParameters: [ + Parameters.billingAccountName, + Parameters.invoiceName + ], + queryParameters: [ + Parameters.apiVersion0, + Parameters.downloadToken + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DownloadUrl, + headersMapper: Mappers.InvoicesDownloadInvoiceHeaders + }, + 202: { + headersMapper: Mappers.InvoicesDownloadInvoiceHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse, + headersMapper: Mappers.InvoicesDownloadInvoiceHeaders + } + }, + serializer +}; + +const beginDownloadMultipleModernInvoiceOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/downloadDocuments", + urlParameters: [ + Parameters.billingAccountName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "downloadUrls", + mapper: { + required: true, + serializedName: "downloadUrls", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + }, + responses: { + 200: { + bodyMapper: Mappers.DownloadUrl, + headersMapper: Mappers.InvoicesDownloadMultipleModernInvoiceHeaders + }, + 202: { + headersMapper: Mappers.InvoicesDownloadMultipleModernInvoiceHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse, + headersMapper: Mappers.InvoicesDownloadMultipleModernInvoiceHeaders + } + }, + serializer +}; + +const beginDownloadBillingSubscriptionInvoiceOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "providers/Microsoft.Billing/billingAccounts/default/billingSubscriptions/{subscriptionId}/invoices/{invoiceName}/download", + urlParameters: [ + Parameters.subscriptionId, + Parameters.invoiceName + ], + queryParameters: [ + Parameters.apiVersion0, + Parameters.downloadToken + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DownloadUrl, + headersMapper: Mappers.InvoicesDownloadBillingSubscriptionInvoiceHeaders + }, + 202: { + headersMapper: Mappers.InvoicesDownloadBillingSubscriptionInvoiceHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse, + headersMapper: Mappers.InvoicesDownloadBillingSubscriptionInvoiceHeaders + } + }, + serializer +}; + +const beginDownloadMultipleBillingSubscriptionInvoiceOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "providers/Microsoft.Billing/billingAccounts/default/billingSubscriptions/{subscriptionId}/downloadDocuments", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "downloadUrls", + mapper: { + required: true, + serializedName: "downloadUrls", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + }, + responses: { + 200: { + bodyMapper: Mappers.DownloadUrl, + headersMapper: Mappers.InvoicesDownloadMultipleBillingSubscriptionInvoiceHeaders + }, + 202: { + headersMapper: Mappers.InvoicesDownloadMultipleBillingSubscriptionInvoiceHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse, + headersMapper: Mappers.InvoicesDownloadMultipleBillingSubscriptionInvoiceHeaders + } + }, + serializer +}; + +const listByBillingAccountNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.InvoiceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByBillingProfileNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.InvoiceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByBillingSubscriptionNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", @@ -233,7 +807,7 @@ const listNextOperationSpec: msRest.OperationSpec = { ], responses: { 200: { - bodyMapper: Mappers.InvoicesListResult + bodyMapper: Mappers.InvoiceListResult }, default: { bodyMapper: Mappers.ErrorResponse diff --git a/sdk/billing/arm-billing/src/operations/operations.ts b/sdk/billing/arm-billing/src/operations/operations.ts index c146d47b7560..fdc8c21841a6 100644 --- a/sdk/billing/arm-billing/src/operations/operations.ts +++ b/sdk/billing/arm-billing/src/operations/operations.ts @@ -27,7 +27,7 @@ export class Operations { } /** - * Lists all of the available billing REST API operations. + * Lists the available billing REST API operations. * @param [options] The optional parameters * @returns Promise */ @@ -51,7 +51,7 @@ export class Operations { } /** - * Lists all of the available billing REST API operations. + * Lists the available billing REST API operations. * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters * @returns Promise @@ -85,7 +85,7 @@ const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "providers/Microsoft.Billing/operations", queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/billing/arm-billing/src/operations/policies.ts b/sdk/billing/arm-billing/src/operations/policies.ts new file mode 100644 index 000000000000..7099e7f4bb49 --- /dev/null +++ b/sdk/billing/arm-billing/src/operations/policies.ts @@ -0,0 +1,281 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * 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 * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/policiesMappers"; +import * as Parameters from "../models/parameters"; +import { BillingManagementClientContext } from "../billingManagementClientContext"; + +/** Class representing a Policies. */ +export class Policies { + private readonly client: BillingManagementClientContext; + + /** + * Create a Policies. + * @param {BillingManagementClientContext} client Reference to the service client. + */ + constructor(client: BillingManagementClientContext) { + this.client = client; + } + + /** + * Lists the policies for a billing profile. This operation is supported only for billing accounts + * with agreement type Microsoft Customer Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param [options] The optional parameters + * @returns Promise + */ + getByBillingProfile(billingAccountName: string, billingProfileName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param callback The callback + */ + getByBillingProfile(billingAccountName: string, billingProfileName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param options The optional parameters + * @param callback The callback + */ + getByBillingProfile(billingAccountName: string, billingProfileName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getByBillingProfile(billingAccountName: string, billingProfileName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + options + }, + getByBillingProfileOperationSpec, + callback) as Promise; + } + + /** + * Updates the policies for a billing profile. This operation is supported only for billing + * accounts with agreement type Microsoft Customer Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param parameters Request parameters that are provided to the update policies operation. + * @param [options] The optional parameters + * @returns Promise + */ + update(billingAccountName: string, billingProfileName: string, parameters: Models.Policy, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param parameters Request parameters that are provided to the update policies operation. + * @param callback The callback + */ + update(billingAccountName: string, billingProfileName: string, parameters: Models.Policy, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param parameters Request parameters that are provided to the update policies operation. + * @param options The optional parameters + * @param callback The callback + */ + update(billingAccountName: string, billingProfileName: string, parameters: Models.Policy, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + update(billingAccountName: string, billingProfileName: string, parameters: Models.Policy, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + parameters, + options + }, + updateOperationSpec, + callback) as Promise; + } + + /** + * Lists the policies for a customer. This operation is supported only for billing accounts with + * agreement type Microsoft Partner Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param customerName The ID that uniquely identifies a customer. + * @param [options] The optional parameters + * @returns Promise + */ + getByCustomer(billingAccountName: string, customerName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param customerName The ID that uniquely identifies a customer. + * @param callback The callback + */ + getByCustomer(billingAccountName: string, customerName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param customerName The ID that uniquely identifies a customer. + * @param options The optional parameters + * @param callback The callback + */ + getByCustomer(billingAccountName: string, customerName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getByCustomer(billingAccountName: string, customerName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + customerName, + options + }, + getByCustomerOperationSpec, + callback) as Promise; + } + + /** + * Updates the policies for a customer. This operation is supported only for billing accounts with + * agreement type Microsoft Partner Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param customerName The ID that uniquely identifies a customer. + * @param [options] The optional parameters + * @returns Promise + */ + updateCustomer(billingAccountName: string, customerName: string, options?: Models.PoliciesUpdateCustomerOptionalParams): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param customerName The ID that uniquely identifies a customer. + * @param callback The callback + */ + updateCustomer(billingAccountName: string, customerName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param customerName The ID that uniquely identifies a customer. + * @param options The optional parameters + * @param callback The callback + */ + updateCustomer(billingAccountName: string, customerName: string, options: Models.PoliciesUpdateCustomerOptionalParams, callback: msRest.ServiceCallback): void; + updateCustomer(billingAccountName: string, customerName: string, options?: Models.PoliciesUpdateCustomerOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + customerName, + options + }, + updateCustomerOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getByBillingProfileOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/policies/default", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Policy + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const updateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/policies/default", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.Policy, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.Policy + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getByCustomerOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}/policies/default", + urlParameters: [ + Parameters.billingAccountName, + Parameters.customerName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.CustomerPolicy + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const updateCustomerOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}/policies/default", + urlParameters: [ + Parameters.billingAccountName, + Parameters.customerName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: { + viewCharges: [ + "options", + "viewCharges" + ] + }, + mapper: { + ...Mappers.CustomerPolicy, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.CustomerPolicy + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/billing/arm-billing/src/operations/products.ts b/sdk/billing/arm-billing/src/operations/products.ts new file mode 100644 index 000000000000..e493f2fc0e84 --- /dev/null +++ b/sdk/billing/arm-billing/src/operations/products.ts @@ -0,0 +1,740 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * 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 * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/productsMappers"; +import * as Parameters from "../models/parameters"; +import { BillingManagementClientContext } from "../billingManagementClientContext"; + +/** Class representing a Products. */ +export class Products { + private readonly client: BillingManagementClientContext; + + /** + * Create a Products. + * @param {BillingManagementClientContext} client Reference to the service client. + */ + constructor(client: BillingManagementClientContext) { + this.client = client; + } + + /** + * Lists the products for a customer. These don't include products billed based on usage.The + * operation is supported only for billing accounts with agreement type Microsoft Partner + * Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param customerName The ID that uniquely identifies a customer. + * @param [options] The optional parameters + * @returns Promise + */ + listByCustomer(billingAccountName: string, customerName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param customerName The ID that uniquely identifies a customer. + * @param callback The callback + */ + listByCustomer(billingAccountName: string, customerName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param customerName The ID that uniquely identifies a customer. + * @param options The optional parameters + * @param callback The callback + */ + listByCustomer(billingAccountName: string, customerName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByCustomer(billingAccountName: string, customerName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + customerName, + options + }, + listByCustomerOperationSpec, + callback) as Promise; + } + + /** + * Lists the products for a billing account. These don't include products billed based on usage. + * The operation is supported for billing accounts with agreement type Microsoft Customer Agreement + * or Microsoft Partner Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingAccount(billingAccountName: string, options?: Models.ProductsListByBillingAccountOptionalParams): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param callback The callback + */ + listByBillingAccount(billingAccountName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingAccount(billingAccountName: string, options: Models.ProductsListByBillingAccountOptionalParams, callback: msRest.ServiceCallback): void; + listByBillingAccount(billingAccountName: string, options?: Models.ProductsListByBillingAccountOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + options + }, + listByBillingAccountOperationSpec, + callback) as Promise; + } + + /** + * Lists the products for a billing profile. These don't include products billed based on usage. + * The operation is supported for billing accounts with agreement type Microsoft Customer Agreement + * or Microsoft Partner Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingProfile(billingAccountName: string, billingProfileName: string, options?: Models.ProductsListByBillingProfileOptionalParams): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param callback The callback + */ + listByBillingProfile(billingAccountName: string, billingProfileName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingProfile(billingAccountName: string, billingProfileName: string, options: Models.ProductsListByBillingProfileOptionalParams, callback: msRest.ServiceCallback): void; + listByBillingProfile(billingAccountName: string, billingProfileName: string, options?: Models.ProductsListByBillingProfileOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + options + }, + listByBillingProfileOperationSpec, + callback) as Promise; + } + + /** + * Lists the products for an invoice section. These don't include products billed based on usage. + * The operation is supported only for billing accounts with agreement type Microsoft Customer + * Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param invoiceSectionName The ID that uniquely identifies an invoice section. + * @param [options] The optional parameters + * @returns Promise + */ + listByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, options?: Models.ProductsListByInvoiceSectionOptionalParams): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param invoiceSectionName The ID that uniquely identifies an invoice section. + * @param callback The callback + */ + listByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param invoiceSectionName The ID that uniquely identifies an invoice section. + * @param options The optional parameters + * @param callback The callback + */ + listByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, options: Models.ProductsListByInvoiceSectionOptionalParams, callback: msRest.ServiceCallback): void; + listByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, options?: Models.ProductsListByInvoiceSectionOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + invoiceSectionName, + options + }, + listByInvoiceSectionOperationSpec, + callback) as Promise; + } + + /** + * Gets a product by ID. The operation is supported only for billing accounts with agreement type + * Microsoft Customer Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param productName The ID that uniquely identifies a product. + * @param [options] The optional parameters + * @returns Promise + */ + get(billingAccountName: string, productName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param productName The ID that uniquely identifies a product. + * @param callback The callback + */ + get(billingAccountName: string, productName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param productName The ID that uniquely identifies a product. + * @param options The optional parameters + * @param callback The callback + */ + get(billingAccountName: string, productName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(billingAccountName: string, productName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + productName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Updates the properties of a Product. Currently, auto renew can be updated. The operation is + * supported only for billing accounts with agreement type Microsoft Customer Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param productName The ID that uniquely identifies a product. + * @param parameters Request parameters that are provided to the update product operation. + * @param [options] The optional parameters + * @returns Promise + */ + update(billingAccountName: string, productName: string, parameters: Models.Product, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param productName The ID that uniquely identifies a product. + * @param parameters Request parameters that are provided to the update product operation. + * @param callback The callback + */ + update(billingAccountName: string, productName: string, parameters: Models.Product, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param productName The ID that uniquely identifies a product. + * @param parameters Request parameters that are provided to the update product operation. + * @param options The optional parameters + * @param callback The callback + */ + update(billingAccountName: string, productName: string, parameters: Models.Product, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + update(billingAccountName: string, productName: string, parameters: Models.Product, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + productName, + parameters, + options + }, + updateOperationSpec, + callback) as Promise; + } + + /** + * Moves a product's charges to a new invoice section. The new invoice section must belong to the + * same billing profile as the existing invoice section. This operation is supported only for + * products that are purchased with a recurring charge and for billing accounts with agreement type + * Microsoft Customer Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param productName The ID that uniquely identifies a product. + * @param [options] The optional parameters + * @returns Promise + */ + move(billingAccountName: string, productName: string, options?: Models.ProductsMoveOptionalParams): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param productName The ID that uniquely identifies a product. + * @param callback The callback + */ + move(billingAccountName: string, productName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param productName The ID that uniquely identifies a product. + * @param options The optional parameters + * @param callback The callback + */ + move(billingAccountName: string, productName: string, options: Models.ProductsMoveOptionalParams, callback: msRest.ServiceCallback): void; + move(billingAccountName: string, productName: string, options?: Models.ProductsMoveOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + productName, + options + }, + moveOperationSpec, + callback) as Promise; + } + + /** + * Validates if a product's charges can be moved to a new invoice section. This operation is + * supported only for products that are purchased with a recurring charge and for billing accounts + * with agreement type Microsoft Customer Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param productName The ID that uniquely identifies a product. + * @param [options] The optional parameters + * @returns Promise + */ + validateMove(billingAccountName: string, productName: string, options?: Models.ProductsValidateMoveOptionalParams): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param productName The ID that uniquely identifies a product. + * @param callback The callback + */ + validateMove(billingAccountName: string, productName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param productName The ID that uniquely identifies a product. + * @param options The optional parameters + * @param callback The callback + */ + validateMove(billingAccountName: string, productName: string, options: Models.ProductsValidateMoveOptionalParams, callback: msRest.ServiceCallback): void; + validateMove(billingAccountName: string, productName: string, options?: Models.ProductsValidateMoveOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + productName, + options + }, + validateMoveOperationSpec, + callback) as Promise; + } + + /** + * Lists the products for a customer. These don't include products billed based on usage.The + * operation is supported only for billing accounts with agreement type Microsoft Partner + * Agreement. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByCustomerNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByCustomerNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByCustomerNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByCustomerNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByCustomerNextOperationSpec, + callback) as Promise; + } + + /** + * Lists the products for a billing account. These don't include products billed based on usage. + * The operation is supported for billing accounts with agreement type Microsoft Customer Agreement + * or Microsoft Partner Agreement. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByBillingAccountNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingAccountNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByBillingAccountNextOperationSpec, + callback) as Promise; + } + + /** + * Lists the products for a billing profile. These don't include products billed based on usage. + * The operation is supported for billing accounts with agreement type Microsoft Customer Agreement + * or Microsoft Partner Agreement. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingProfileNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByBillingProfileNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingProfileNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingProfileNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByBillingProfileNextOperationSpec, + callback) as Promise; + } + + /** + * Lists the products for an invoice section. These don't include products billed based on usage. + * The operation is supported only for billing accounts with agreement type Microsoft Customer + * Agreement. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByInvoiceSectionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByInvoiceSectionNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByInvoiceSectionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByInvoiceSectionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByInvoiceSectionNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByCustomerOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}/products", + urlParameters: [ + Parameters.billingAccountName, + Parameters.customerName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ProductsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByBillingAccountOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/products", + urlParameters: [ + Parameters.billingAccountName + ], + queryParameters: [ + Parameters.apiVersion0, + Parameters.filter + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ProductsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByBillingProfileOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/products", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName + ], + queryParameters: [ + Parameters.apiVersion0, + Parameters.filter + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ProductsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByInvoiceSectionOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/products", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName, + Parameters.invoiceSectionName + ], + queryParameters: [ + Parameters.apiVersion0, + Parameters.filter + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ProductsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/products/{productName}", + urlParameters: [ + Parameters.billingAccountName, + Parameters.productName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Product + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const updateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/products/{productName}", + urlParameters: [ + Parameters.billingAccountName, + Parameters.productName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.Product, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.Product + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const moveOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/products/{productName}/move", + urlParameters: [ + Parameters.billingAccountName, + Parameters.productName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: { + destinationInvoiceSectionId: [ + "options", + "destinationInvoiceSectionId" + ] + }, + mapper: { + ...Mappers.TransferProductRequestProperties, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.Product, + headersMapper: Mappers.ProductsMoveHeaders + }, + 202: { + headersMapper: Mappers.ProductsMoveHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse, + headersMapper: Mappers.ProductsMoveHeaders + } + }, + serializer +}; + +const validateMoveOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/products/{productName}/validateMoveEligibility", + urlParameters: [ + Parameters.billingAccountName, + Parameters.productName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: { + destinationInvoiceSectionId: [ + "options", + "destinationInvoiceSectionId" + ] + }, + mapper: { + ...Mappers.TransferProductRequestProperties, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ValidateProductTransferEligibilityResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByCustomerNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ProductsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByBillingAccountNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ProductsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByBillingProfileNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ProductsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByInvoiceSectionNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ProductsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/billing/arm-billing/src/operations/transactions.ts b/sdk/billing/arm-billing/src/operations/transactions.ts new file mode 100644 index 000000000000..e447f25ebe35 --- /dev/null +++ b/sdk/billing/arm-billing/src/operations/transactions.ts @@ -0,0 +1,137 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * 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 * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/transactionsMappers"; +import * as Parameters from "../models/parameters"; +import { BillingManagementClientContext } from "../billingManagementClientContext"; + +/** Class representing a Transactions. */ +export class Transactions { + private readonly client: BillingManagementClientContext; + + /** + * Create a Transactions. + * @param {BillingManagementClientContext} client Reference to the service client. + */ + constructor(client: BillingManagementClientContext) { + this.client = client; + } + + /** + * Lists the transactions for an invoice. Transactions include purchases, refunds and Azure usage + * charges. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param invoiceName The ID that uniquely identifies an invoice. + * @param [options] The optional parameters + * @returns Promise + */ + listByInvoice(billingAccountName: string, invoiceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param invoiceName The ID that uniquely identifies an invoice. + * @param callback The callback + */ + listByInvoice(billingAccountName: string, invoiceName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param invoiceName The ID that uniquely identifies an invoice. + * @param options The optional parameters + * @param callback The callback + */ + listByInvoice(billingAccountName: string, invoiceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByInvoice(billingAccountName: string, invoiceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + invoiceName, + options + }, + listByInvoiceOperationSpec, + callback) as Promise; + } + + /** + * Lists the transactions for an invoice. Transactions include purchases, refunds and Azure usage + * charges. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByInvoiceNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByInvoiceNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByInvoiceNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByInvoiceNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByInvoiceNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByInvoiceOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/{invoiceName}/transactions", + urlParameters: [ + Parameters.billingAccountName, + Parameters.invoiceName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.TransactionListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByInvoiceNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.TransactionListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/billing/arm-billing/tsconfig.json b/sdk/billing/arm-billing/tsconfig.json index 87bbf5b5fa49..422b584abd5e 100644 --- a/sdk/billing/arm-billing/tsconfig.json +++ b/sdk/billing/arm-billing/tsconfig.json @@ -9,7 +9,7 @@ "esModuleInterop": true, "allowSyntheticDefaultImports": true, "forceConsistentCasingInFileNames": true, - "lib": ["es6"], + "lib": ["es6", "dom"], "declaration": true, "outDir": "./esm", "importHelpers": true diff --git a/sdk/botservice/arm-botservice/LICENSE.txt b/sdk/botservice/arm-botservice/LICENSE.txt index b73b4a1293c3..ea8fb1516028 100644 --- a/sdk/botservice/arm-botservice/LICENSE.txt +++ b/sdk/botservice/arm-botservice/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2019 Microsoft +Copyright (c) 2020 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/botservice/arm-botservice/README.md b/sdk/botservice/arm-botservice/README.md index 2b273b859b96..100ad8188bdd 100644 --- a/sdk/botservice/arm-botservice/README.md +++ b/sdk/botservice/arm-botservice/README.md @@ -19,8 +19,9 @@ npm install @azure/arm-botservice ##### Install @azure/ms-rest-nodeauth +- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. ```bash -npm install @azure/ms-rest-nodeauth +npm install @azure/ms-rest-nodeauth@"^3.0.0" ``` ##### Sample code @@ -99,5 +100,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fbotservice%2Farm-botservice%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/botservice/arm-botservice/README.png) diff --git a/sdk/botservice/arm-botservice/package.json b/sdk/botservice/arm-botservice/package.json index 5d8fc5720000..eb0922905502 100644 --- a/sdk/botservice/arm-botservice/package.json +++ b/sdk/botservice/arm-botservice/package.json @@ -2,11 +2,11 @@ "name": "@azure/arm-botservice", "author": "Microsoft Corporation", "description": "AzureBotService Library with typescript type definitions for node.js and browser.", - "version": "1.0.0", + "version": "2.0.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.3.2", - "@azure/ms-rest-js": "^1.8.1", - "tslib": "^1.9.3" + "@azure/ms-rest-azure-js": "^2.0.1", + "@azure/ms-rest-js": "^2.0.4", + "tslib": "^1.10.0" }, "keywords": [ "node", @@ -20,19 +20,19 @@ "module": "./esm/azureBotService.js", "types": "./esm/azureBotService.d.ts", "devDependencies": { - "typescript": "^3.1.1", - "rollup": "^0.66.2", - "rollup-plugin-node-resolve": "^3.4.0", + "typescript": "^3.5.3", + "rollup": "^1.18.0", + "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", - "uglify-js": "^3.4.9" + "uglify-js": "^3.6.0" }, - "homepage": "https://github.com/azure/azure-sdk-for-js", + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/botservice/arm-botservice", "repository": { "type": "git", - "url": "https://github.com/azure/azure-sdk-for-js.git" + "url": "https://github.com/Azure/azure-sdk-for-js.git" }, "bugs": { - "url": "https://github.com/azure/azure-sdk-for-js/issues" + "url": "https://github.com/Azure/azure-sdk-for-js/issues" }, "files": [ "dist/**/*.js", diff --git a/sdk/botservice/arm-botservice/rollup.config.js b/sdk/botservice/arm-botservice/rollup.config.js index 7f61137828bb..b8625979d3b4 100644 --- a/sdk/botservice/arm-botservice/rollup.config.js +++ b/sdk/botservice/arm-botservice/rollup.config.js @@ -29,7 +29,7 @@ const config = { */` }, plugins: [ - nodeResolve({ module: true }), + nodeResolve({ mainFields: ['module', 'main'] }), sourcemaps() ] }; diff --git a/sdk/botservice/arm-botservice/src/azureBotService.ts b/sdk/botservice/arm-botservice/src/azureBotService.ts index 33be08bb4bee..f2e3696d217a 100644 --- a/sdk/botservice/arm-botservice/src/azureBotService.ts +++ b/sdk/botservice/arm-botservice/src/azureBotService.ts @@ -19,9 +19,9 @@ class AzureBotService extends AzureBotServiceContext { // Operation groups bots: operations.Bots; channels: operations.Channels; + directLine: operations.DirectLine; operations: operations.Operations; botConnection: operations.BotConnection; - enterpriseChannels: operations.EnterpriseChannels; /** * Initializes a new instance of the AzureBotService class. @@ -33,9 +33,9 @@ class AzureBotService extends AzureBotServiceContext { super(credentials, subscriptionId, options); this.bots = new operations.Bots(this); this.channels = new operations.Channels(this); + this.directLine = new operations.DirectLine(this); this.operations = new operations.Operations(this); this.botConnection = new operations.BotConnection(this); - this.enterpriseChannels = new operations.EnterpriseChannels(this); } } diff --git a/sdk/botservice/arm-botservice/src/azureBotServiceContext.ts b/sdk/botservice/arm-botservice/src/azureBotServiceContext.ts index 7de04a139bbd..ffc9d3c8d4f9 100644 --- a/sdk/botservice/arm-botservice/src/azureBotServiceContext.ts +++ b/sdk/botservice/arm-botservice/src/azureBotServiceContext.ts @@ -13,7 +13,7 @@ import * as msRest from "@azure/ms-rest-js"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-botservice"; -const packageVersion = "1.0.0"; +const packageVersion = "2.0.0"; export class AzureBotServiceContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials; @@ -37,14 +37,14 @@ export class AzureBotServiceContext extends msRestAzure.AzureServiceClient { if (!options) { options = {}; } - if(!options.userAgent) { + if (!options.userAgent) { const defaultUserAgent = msRestAzure.getDefaultUserAgentValue(); options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`; } super(credentials, options); - this.apiVersion = '2018-07-12'; + this.apiVersion = '2020-06-02'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; @@ -52,10 +52,10 @@ export class AzureBotServiceContext extends msRestAzure.AzureServiceClient { this.credentials = credentials; this.subscriptionId = subscriptionId; - if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) { + if (options.acceptLanguage !== null && options.acceptLanguage !== undefined) { this.acceptLanguage = options.acceptLanguage; } - if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { + if (options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout; } } diff --git a/sdk/botservice/arm-botservice/src/models/botConnectionMappers.ts b/sdk/botservice/arm-botservice/src/models/botConnectionMappers.ts index fee3937cff5b..8fd5b0040848 100644 --- a/sdk/botservice/arm-botservice/src/models/botConnectionMappers.ts +++ b/sdk/botservice/arm-botservice/src/models/botConnectionMappers.ts @@ -8,6 +8,8 @@ export { discriminators, + AlexaChannel, + AlexaChannelProperties, BaseResource, Bot, BotChannel, @@ -20,11 +22,10 @@ export { DirectLineChannel, DirectLineChannelProperties, DirectLineSite, + DirectLineSpeechChannel, + DirectLineSpeechChannelProperties, EmailChannel, EmailChannelProperties, - EnterpriseChannel, - EnterpriseChannelNode, - EnterpriseChannelProperties, ErrorBody, ErrorModel, FacebookChannel, @@ -32,6 +33,9 @@ export { FacebookPage, KikChannel, KikChannelProperties, + LineChannel, + LineChannelProperties, + LineRegistration, MsTeamsChannel, MsTeamsChannelProperties, Resource, diff --git a/sdk/botservice/arm-botservice/src/models/botsMappers.ts b/sdk/botservice/arm-botservice/src/models/botsMappers.ts index 9bdc6e4e2ccb..4e14c4629175 100644 --- a/sdk/botservice/arm-botservice/src/models/botsMappers.ts +++ b/sdk/botservice/arm-botservice/src/models/botsMappers.ts @@ -8,6 +8,8 @@ export { discriminators, + AlexaChannel, + AlexaChannelProperties, BaseResource, Bot, BotChannel, @@ -22,11 +24,10 @@ export { DirectLineChannel, DirectLineChannelProperties, DirectLineSite, + DirectLineSpeechChannel, + DirectLineSpeechChannelProperties, EmailChannel, EmailChannelProperties, - EnterpriseChannel, - EnterpriseChannelNode, - EnterpriseChannelProperties, ErrorBody, ErrorModel, FacebookChannel, @@ -34,6 +35,9 @@ export { FacebookPage, KikChannel, KikChannelProperties, + LineChannel, + LineChannelProperties, + LineRegistration, MsTeamsChannel, MsTeamsChannelProperties, Resource, diff --git a/sdk/botservice/arm-botservice/src/models/channelsMappers.ts b/sdk/botservice/arm-botservice/src/models/channelsMappers.ts index 3db35d79fd8b..068826fddb11 100644 --- a/sdk/botservice/arm-botservice/src/models/channelsMappers.ts +++ b/sdk/botservice/arm-botservice/src/models/channelsMappers.ts @@ -8,6 +8,8 @@ export { discriminators, + AlexaChannel, + AlexaChannelProperties, BaseResource, Bot, BotChannel, @@ -20,11 +22,10 @@ export { DirectLineChannel, DirectLineChannelProperties, DirectLineSite, + DirectLineSpeechChannel, + DirectLineSpeechChannelProperties, EmailChannel, EmailChannelProperties, - EnterpriseChannel, - EnterpriseChannelNode, - EnterpriseChannelProperties, ErrorBody, ErrorModel, FacebookChannel, @@ -32,6 +33,9 @@ export { FacebookPage, KikChannel, KikChannelProperties, + LineChannel, + LineChannelProperties, + LineRegistration, MsTeamsChannel, MsTeamsChannelProperties, Resource, diff --git a/sdk/botservice/arm-botservice/src/models/directLineMappers.ts b/sdk/botservice/arm-botservice/src/models/directLineMappers.ts new file mode 100644 index 000000000000..68e686658063 --- /dev/null +++ b/sdk/botservice/arm-botservice/src/models/directLineMappers.ts @@ -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. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + AlexaChannel, + AlexaChannelProperties, + BaseResource, + Bot, + BotChannel, + BotProperties, + Channel, + ConnectionSetting, + ConnectionSettingParameter, + ConnectionSettingProperties, + DirectLineChannel, + DirectLineChannelProperties, + DirectLineSite, + DirectLineSpeechChannel, + DirectLineSpeechChannelProperties, + EmailChannel, + EmailChannelProperties, + ErrorBody, + ErrorModel, + FacebookChannel, + FacebookChannelProperties, + FacebookPage, + KikChannel, + KikChannelProperties, + LineChannel, + LineChannelProperties, + LineRegistration, + MsTeamsChannel, + MsTeamsChannelProperties, + Resource, + SiteInfo, + Sku, + SkypeChannel, + SkypeChannelProperties, + SlackChannel, + SlackChannelProperties, + SmsChannel, + SmsChannelProperties, + TelegramChannel, + TelegramChannelProperties, + WebChatChannel, + WebChatChannelProperties, + WebChatSite +} from "../models/mappers"; diff --git a/sdk/botservice/arm-botservice/src/models/enterpriseChannelsMappers.ts b/sdk/botservice/arm-botservice/src/models/enterpriseChannelsMappers.ts deleted file mode 100644 index 1b3dc545173a..000000000000 --- a/sdk/botservice/arm-botservice/src/models/enterpriseChannelsMappers.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -export { - discriminators, - BaseResource, - Bot, - BotChannel, - BotProperties, - Channel, - ConnectionSetting, - ConnectionSettingParameter, - ConnectionSettingProperties, - DirectLineChannel, - DirectLineChannelProperties, - DirectLineSite, - EmailChannel, - EmailChannelProperties, - EnterpriseChannel, - EnterpriseChannelCheckNameAvailabilityRequest, - EnterpriseChannelCheckNameAvailabilityResponse, - EnterpriseChannelNode, - EnterpriseChannelProperties, - EnterpriseChannelResponseList, - ErrorBody, - ErrorModel, - FacebookChannel, - FacebookChannelProperties, - FacebookPage, - KikChannel, - KikChannelProperties, - MsTeamsChannel, - MsTeamsChannelProperties, - Resource, - Sku, - SkypeChannel, - SkypeChannelProperties, - SlackChannel, - SlackChannelProperties, - SmsChannel, - SmsChannelProperties, - TelegramChannel, - TelegramChannelProperties, - WebChatChannel, - WebChatChannelProperties, - WebChatSite -} from "../models/mappers"; diff --git a/sdk/botservice/arm-botservice/src/models/index.ts b/sdk/botservice/arm-botservice/src/models/index.ts index 6054293cd250..191a2d329da5 100644 --- a/sdk/botservice/arm-botservice/src/models/index.ts +++ b/sdk/botservice/arm-botservice/src/models/index.ts @@ -142,7 +142,7 @@ export interface Bot extends Resource { /** * Contains the possible cases for Channel. */ -export type ChannelUnion = Channel | FacebookChannel | EmailChannel | MsTeamsChannel | SkypeChannel | KikChannel | WebChatChannel | DirectLineChannel | TelegramChannel | SmsChannel | SlackChannel; +export type ChannelUnion = Channel | AlexaChannel | FacebookChannel | EmailChannel | MsTeamsChannel | SkypeChannel | KikChannel | WebChatChannel | DirectLineChannel | TelegramChannel | SmsChannel | SlackChannel | LineChannel | DirectLineSpeechChannel; /** * Channel definition @@ -164,6 +164,44 @@ export interface BotChannel extends Resource { properties?: ChannelUnion; } +/** + * The parameters to provide for the Alexa channel. + */ +export interface AlexaChannelProperties { + /** + * The Alexa skill Id + */ + alexaSkillId: string; + /** + * Url fragment used in part of the Uri configured in Alexa + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly urlFragment?: string; + /** + * Full Uri used to configured the skill in Alexa + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly serviceEndpointUri?: string; + /** + * Whether this channel is enabled for the bot + */ + isEnabled: boolean; +} + +/** + * Alexa channel definition + */ +export interface AlexaChannel { + /** + * Polymorphic Discriminator + */ + channelName: "AlexaChannel"; + /** + * The set of properties specific to Alexa channel resource + */ + properties?: AlexaChannelProperties; +} + /** * A Facebook page for Facebook channel registration */ @@ -635,6 +673,10 @@ export interface SlackChannelProperties { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly isValidated?: boolean; + /** + * The Slack signing secret. + */ + signingSecret?: string; /** * Whether this channel is enabled for the bot */ @@ -655,6 +697,114 @@ export interface SlackChannel { properties?: SlackChannelProperties; } +/** + * The properties corresponding to a line channel registration + */ +export interface LineRegistration { + /** + * Id generated for the line channel registration + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly generatedId?: string; + /** + * Secret for the line channel registration + */ + channelSecret?: string; + /** + * Access token for the line channel registration + */ + channelAccessToken?: string; +} + +/** + * The parameters to provide for the Line channel. + */ +export interface LineChannelProperties { + /** + * The list of line channel registrations + */ + lineRegistrations: LineRegistration[]; + /** + * Callback Url to enter in line registration. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly callbackUrl?: string; + /** + * Whether this channel is validated for the bot + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly isValidated?: boolean; +} + +/** + * Line channel definition + */ +export interface LineChannel { + /** + * Polymorphic Discriminator + */ + channelName: "LineChannel"; + /** + * The set of properties specific to line channel resource + */ + properties?: LineChannelProperties; +} + +/** + * The parameters to provide for the DirectLine Speech channel. + */ +export interface DirectLineSpeechChannelProperties { + /** + * The cognitive service subscription ID to use with this channel registration. + */ + cognitiveServicesSubscriptionId: string; + /** + * Whether this channel is enabled or not. + */ + isEnabled?: boolean; + /** + * Custom speech model id (optional). + */ + customVoiceDeploymentId?: string; + /** + * Custom voice deployment id (optional). + */ + customSpeechModelId?: string; + /** + * Make this a default bot for chosen cognitive service account. + */ + isDefaultBotForCogSvcAccount?: boolean; +} + +/** + * DirectLine Speech channel definition + */ +export interface DirectLineSpeechChannel { + /** + * Polymorphic Discriminator + */ + channelName: "DirectLineSpeechChannel"; + /** + * The set of properties specific to DirectLine Speech channel resource + */ + properties?: DirectLineSpeechChannelProperties; +} + +/** + * Site information for WebChat or DirectLine Channels to identify which site to regenerate keys + * for. + */ +export interface SiteInfo { + /** + * The site name + */ + siteName: string; + /** + * Determines which key is to be regenerated. Possible values include: 'key1', 'key2' + */ + key: Key; +} + /** * The display name of a connection Item Setting registered with the Bot */ @@ -808,15 +958,15 @@ export interface ServiceProvider { } /** - * The list of bot service service providers response. + * The list of bot service providers response. */ export interface ServiceProviderResponseList { /** - * The link used to get the next page of bot service service providers. + * The link used to get the next page of bot service providers. */ nextLink?: string; /** - * Gets the list of bot service service providers and their properties. + * Gets the list of bot service providers and their properties. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly value?: ServiceProvider[]; @@ -919,85 +1069,6 @@ export interface CheckNameAvailabilityResponseBody { message?: string; } -/** - * A request to Bot Service Management to check availability of an Enterprise Channel name. - */ -export interface EnterpriseChannelCheckNameAvailabilityRequest { - /** - * The name of the Enterprise Channel for which availability needs to be checked. - */ - name?: string; -} - -/** - * A request to Bot Service Management to check availability of an Enterprise Channel name. - */ -export interface EnterpriseChannelCheckNameAvailabilityResponse { - /** - * Indicates if the Enterprise Channel name is valid. - */ - valid?: boolean; - /** - * Additional information about why a bot name is not available. - */ - message?: string; -} - -/** - * The properties specific to an Enterprise Channel Node. - */ -export interface EnterpriseChannelNode { - /** - * Id of Enterprise Channel Node. This is generated by the Bot Framework. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly id?: string; - /** - * The current state of the Enterprise Channel Node. Possible values include: 'Creating', - * 'CreateFailed', 'Started', 'Starting', 'StartFailed', 'Stopped', 'Stopping', 'StopFailed', - * 'Deleting', 'DeleteFailed' - */ - state?: EnterpriseChannelNodeState; - /** - * The name of the Enterprise Channel Node. - */ - name: string; - /** - * The sku of the Enterprise Channel Node. - */ - azureSku: string; - /** - * The location of the Enterprise Channel Node. - */ - azureLocation: string; -} - -/** - * The parameters to provide for the Enterprise Channel. - */ -export interface EnterpriseChannelProperties { - /** - * The current state of the Enterprise Channel. Possible values include: 'Creating', - * 'CreateFailed', 'Started', 'Starting', 'StartFailed', 'Stopped', 'Stopping', 'StopFailed', - * 'Deleting', 'DeleteFailed' - */ - state?: EnterpriseChannelState; - /** - * The nodes associated with the Enterprise Channel. - */ - nodes: EnterpriseChannelNode[]; -} - -/** - * Enterprise Channel resource definition - */ -export interface EnterpriseChannel extends Resource { - /** - * The set of properties specific to an Enterprise Channel resource. - */ - properties?: EnterpriseChannelProperties; -} - /** * Optional Parameters. */ @@ -1060,68 +1131,6 @@ export interface ChannelsUpdateOptionalParams extends msRest.RequestOptionsBase properties?: ChannelUnion; } -/** - * Optional Parameters. - */ -export interface EnterpriseChannelsUpdateOptionalParams extends msRest.RequestOptionsBase { - /** - * Specifies the location of the resource. - */ - location?: string; - /** - * Contains resource tags defined as key/value pairs. - */ - tags?: { [propertyName: string]: string }; - /** - * Gets or sets the SKU of the resource. - */ - sku?: Sku; - /** - * Required. Gets or sets the Kind of the resource. Possible values include: 'sdk', 'designer', - * 'bot', 'function' - */ - kind?: Kind; - /** - * Entity Tag - */ - etag?: string; - /** - * The set of properties specific to an Enterprise Channel resource. - */ - properties?: EnterpriseChannelProperties; -} - -/** - * Optional Parameters. - */ -export interface EnterpriseChannelsBeginUpdateOptionalParams extends msRest.RequestOptionsBase { - /** - * Specifies the location of the resource. - */ - location?: string; - /** - * Contains resource tags defined as key/value pairs. - */ - tags?: { [propertyName: string]: string }; - /** - * Gets or sets the SKU of the resource. - */ - sku?: Sku; - /** - * Required. Gets or sets the Kind of the resource. Possible values include: 'sdk', 'designer', - * 'bot', 'function' - */ - kind?: Kind; - /** - * Entity Tag - */ - etag?: string; - /** - * The set of properties specific to an Enterprise Channel resource. - */ - properties?: EnterpriseChannelProperties; -} - /** * An interface representing AzureBotServiceOptions. */ @@ -1177,18 +1186,6 @@ export interface ConnectionSettingResponseList extends Array nextLink?: string; } -/** - * @interface - * The list of bot service operation response. - * @extends Array - */ -export interface EnterpriseChannelResponseList extends Array { - /** - * The link used to get the next page of bot service resources. - */ - nextLink?: string; -} - /** * Defines values for SkuName. * Possible values include: 'F0', 'S1' @@ -1214,32 +1211,30 @@ export type SkuTier = 'Free' | 'Standard'; export type Kind = 'sdk' | 'designer' | 'bot' | 'function'; /** - * Defines values for EnterpriseChannelState. - * Possible values include: 'Creating', 'CreateFailed', 'Started', 'Starting', 'StartFailed', - * 'Stopped', 'Stopping', 'StopFailed', 'Deleting', 'DeleteFailed' + * Defines values for Key. + * Possible values include: 'key1', 'key2' * @readonly * @enum {string} */ -export type EnterpriseChannelState = 'Creating' | 'CreateFailed' | 'Started' | 'Starting' | 'StartFailed' | 'Stopped' | 'Stopping' | 'StopFailed' | 'Deleting' | 'DeleteFailed'; +export type Key = 'key1' | 'key2'; /** - * Defines values for EnterpriseChannelNodeState. - * Possible values include: 'Creating', 'CreateFailed', 'Started', 'Starting', 'StartFailed', - * 'Stopped', 'Stopping', 'StopFailed', 'Deleting', 'DeleteFailed' + * Defines values for ChannelName. + * Possible values include: 'AlexaChannel', 'FacebookChannel', 'EmailChannel', 'KikChannel', + * 'TelegramChannel', 'SlackChannel', 'MsTeamsChannel', 'SkypeChannel', 'WebChatChannel', + * 'DirectLineChannel', 'SmsChannel', 'LineChannel', 'DirectLineSpeechChannel' * @readonly * @enum {string} */ -export type EnterpriseChannelNodeState = 'Creating' | 'CreateFailed' | 'Started' | 'Starting' | 'StartFailed' | 'Stopped' | 'Stopping' | 'StopFailed' | 'Deleting' | 'DeleteFailed'; +export type ChannelName = 'AlexaChannel' | 'FacebookChannel' | 'EmailChannel' | 'KikChannel' | 'TelegramChannel' | 'SlackChannel' | 'MsTeamsChannel' | 'SkypeChannel' | 'WebChatChannel' | 'DirectLineChannel' | 'SmsChannel' | 'LineChannel' | 'DirectLineSpeechChannel'; /** - * Defines values for ChannelName. - * Possible values include: 'FacebookChannel', 'EmailChannel', 'KikChannel', 'TelegramChannel', - * 'SlackChannel', 'MsTeamsChannel', 'SkypeChannel', 'WebChatChannel', 'DirectLineChannel', - * 'SmsChannel' + * Defines values for RegenerateKeysChannelName. + * Possible values include: 'WebChatChannel', 'DirectLineChannel' * @readonly * @enum {string} */ -export type ChannelName = 'FacebookChannel' | 'EmailChannel' | 'KikChannel' | 'TelegramChannel' | 'SlackChannel' | 'MsTeamsChannel' | 'SkypeChannel' | 'WebChatChannel' | 'DirectLineChannel' | 'SmsChannel'; +export type RegenerateKeysChannelName = 'WebChatChannel' | 'DirectLineChannel'; /** * Contains response data for the create operation. @@ -1521,6 +1516,26 @@ export type ChannelsListByResourceGroupNextResponse = ChannelResponseList & { }; }; +/** + * Contains response data for the regenerateKeys operation. + */ +export type DirectLineRegenerateKeysResponse = BotChannel & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BotChannel; + }; +}; + /** * Contains response data for the list operation. */ @@ -1700,163 +1715,3 @@ export type BotConnectionListByBotServiceNextResponse = ConnectionSettingRespons parsedBody: ConnectionSettingResponseList; }; }; - -/** - * Contains response data for the checkNameAvailability operation. - */ -export type EnterpriseChannelsCheckNameAvailabilityResponse = EnterpriseChannelCheckNameAvailabilityResponse & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: EnterpriseChannelCheckNameAvailabilityResponse; - }; -}; - -/** - * Contains response data for the listByResourceGroup operation. - */ -export type EnterpriseChannelsListByResourceGroupResponse = EnterpriseChannelResponseList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: EnterpriseChannelResponseList; - }; -}; - -/** - * Contains response data for the create operation. - */ -export type EnterpriseChannelsCreateResponse = EnterpriseChannel & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: EnterpriseChannel; - }; -}; - -/** - * Contains response data for the update operation. - */ -export type EnterpriseChannelsUpdateResponse = EnterpriseChannel & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: EnterpriseChannel; - }; -}; - -/** - * Contains response data for the get operation. - */ -export type EnterpriseChannelsGetResponse = EnterpriseChannel & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: EnterpriseChannel; - }; -}; - -/** - * Contains response data for the beginCreate operation. - */ -export type EnterpriseChannelsBeginCreateResponse = EnterpriseChannel & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: EnterpriseChannel; - }; -}; - -/** - * Contains response data for the beginUpdate operation. - */ -export type EnterpriseChannelsBeginUpdateResponse = EnterpriseChannel & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: EnterpriseChannel; - }; -}; - -/** - * Contains response data for the listByResourceGroupNext operation. - */ -export type EnterpriseChannelsListByResourceGroupNextResponse = EnterpriseChannelResponseList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: EnterpriseChannelResponseList; - }; -}; diff --git a/sdk/botservice/arm-botservice/src/models/mappers.ts b/sdk/botservice/arm-botservice/src/models/mappers.ts index dbce67e96b70..41feb438e31a 100644 --- a/sdk/botservice/arm-botservice/src/models/mappers.ts +++ b/sdk/botservice/arm-botservice/src/models/mappers.ts @@ -270,6 +270,64 @@ export const BotChannel: msRest.CompositeMapper = { } }; +export const AlexaChannelProperties: msRest.CompositeMapper = { + serializedName: "AlexaChannelProperties", + type: { + name: "Composite", + className: "AlexaChannelProperties", + modelProperties: { + alexaSkillId: { + required: true, + serializedName: "alexaSkillId", + type: { + name: "String" + } + }, + urlFragment: { + readOnly: true, + serializedName: "urlFragment", + type: { + name: "String" + } + }, + serviceEndpointUri: { + readOnly: true, + serializedName: "serviceEndpointUri", + type: { + name: "String" + } + }, + isEnabled: { + required: true, + serializedName: "isEnabled", + type: { + name: "Boolean" + } + } + } + } +}; + +export const AlexaChannel: msRest.CompositeMapper = { + serializedName: "AlexaChannel", + type: { + name: "Composite", + polymorphicDiscriminator: Channel.type.polymorphicDiscriminator, + uberParent: "Channel", + className: "AlexaChannel", + modelProperties: { + ...Channel.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "AlexaChannelProperties" + } + } + } + } +}; + export const FacebookPage: msRest.CompositeMapper = { serializedName: "FacebookPage", type: { @@ -1007,6 +1065,12 @@ export const SlackChannelProperties: msRest.CompositeMapper = { name: "Boolean" } }, + signingSecret: { + serializedName: "signingSecret", + type: { + name: "String" + } + }, isEnabled: { required: true, serializedName: "isEnabled", @@ -1038,6 +1102,181 @@ export const SlackChannel: msRest.CompositeMapper = { } }; +export const LineRegistration: msRest.CompositeMapper = { + serializedName: "LineRegistration", + type: { + name: "Composite", + className: "LineRegistration", + modelProperties: { + generatedId: { + readOnly: true, + serializedName: "generatedId", + type: { + name: "String" + } + }, + channelSecret: { + serializedName: "channelSecret", + type: { + name: "String" + } + }, + channelAccessToken: { + serializedName: "channelAccessToken", + type: { + name: "String" + } + } + } + } +}; + +export const LineChannelProperties: msRest.CompositeMapper = { + serializedName: "LineChannelProperties", + type: { + name: "Composite", + className: "LineChannelProperties", + modelProperties: { + lineRegistrations: { + required: true, + serializedName: "lineRegistrations", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "LineRegistration" + } + } + } + }, + callbackUrl: { + readOnly: true, + serializedName: "callbackUrl", + type: { + name: "String" + } + }, + isValidated: { + readOnly: true, + serializedName: "isValidated", + type: { + name: "Boolean" + } + } + } + } +}; + +export const LineChannel: msRest.CompositeMapper = { + serializedName: "LineChannel", + type: { + name: "Composite", + polymorphicDiscriminator: Channel.type.polymorphicDiscriminator, + uberParent: "Channel", + className: "LineChannel", + modelProperties: { + ...Channel.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "LineChannelProperties" + } + } + } + } +}; + +export const DirectLineSpeechChannelProperties: msRest.CompositeMapper = { + serializedName: "DirectLineSpeechChannelProperties", + type: { + name: "Composite", + className: "DirectLineSpeechChannelProperties", + modelProperties: { + cognitiveServicesSubscriptionId: { + required: true, + serializedName: "cognitiveServicesSubscriptionId", + type: { + name: "String" + } + }, + isEnabled: { + serializedName: "isEnabled", + type: { + name: "Boolean" + } + }, + customVoiceDeploymentId: { + serializedName: "customVoiceDeploymentId", + type: { + name: "String" + } + }, + customSpeechModelId: { + serializedName: "customSpeechModelId", + type: { + name: "String" + } + }, + isDefaultBotForCogSvcAccount: { + serializedName: "isDefaultBotForCogSvcAccount", + type: { + name: "Boolean" + } + } + } + } +}; + +export const DirectLineSpeechChannel: msRest.CompositeMapper = { + serializedName: "DirectLineSpeechChannel", + type: { + name: "Composite", + polymorphicDiscriminator: Channel.type.polymorphicDiscriminator, + uberParent: "Channel", + className: "DirectLineSpeechChannel", + modelProperties: { + ...Channel.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "DirectLineSpeechChannelProperties" + } + } + } + } +}; + +export const SiteInfo: msRest.CompositeMapper = { + serializedName: "SiteInfo", + type: { + name: "Composite", + className: "SiteInfo", + modelProperties: { + siteName: { + required: true, + serializedName: "siteName", + type: { + name: "String" + } + }, + key: { + required: true, + serializedName: "key", + type: { + name: "Enum", + allowedValues: [ + "key1", + "key2" + ] + } + } + } + } +}; + export const ConnectionItemName: msRest.CompositeMapper = { serializedName: "ConnectionItemName", type: { @@ -1463,135 +1702,6 @@ export const CheckNameAvailabilityResponseBody: msRest.CompositeMapper = { } }; -export const EnterpriseChannelCheckNameAvailabilityRequest: msRest.CompositeMapper = { - serializedName: "EnterpriseChannelCheckNameAvailabilityRequest", - type: { - name: "Composite", - className: "EnterpriseChannelCheckNameAvailabilityRequest", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - } - } - } -}; - -export const EnterpriseChannelCheckNameAvailabilityResponse: msRest.CompositeMapper = { - serializedName: "EnterpriseChannelCheckNameAvailabilityResponse", - type: { - name: "Composite", - className: "EnterpriseChannelCheckNameAvailabilityResponse", - modelProperties: { - valid: { - serializedName: "valid", - type: { - name: "Boolean" - } - }, - message: { - serializedName: "message", - type: { - name: "String" - } - } - } - } -}; - -export const EnterpriseChannelNode: msRest.CompositeMapper = { - serializedName: "EnterpriseChannelNode", - type: { - name: "Composite", - className: "EnterpriseChannelNode", - modelProperties: { - id: { - readOnly: true, - serializedName: "id", - type: { - name: "String" - } - }, - state: { - serializedName: "state", - type: { - name: "String" - } - }, - name: { - required: true, - serializedName: "name", - type: { - name: "String" - } - }, - azureSku: { - required: true, - serializedName: "azureSku", - type: { - name: "String" - } - }, - azureLocation: { - required: true, - serializedName: "azureLocation", - type: { - name: "String" - } - } - } - } -}; - -export const EnterpriseChannelProperties: msRest.CompositeMapper = { - serializedName: "EnterpriseChannelProperties", - type: { - name: "Composite", - className: "EnterpriseChannelProperties", - modelProperties: { - state: { - serializedName: "state", - type: { - name: "String" - } - }, - nodes: { - required: true, - serializedName: "nodes", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EnterpriseChannelNode" - } - } - } - } - } - } -}; - -export const EnterpriseChannel: msRest.CompositeMapper = { - serializedName: "EnterpriseChannel", - type: { - name: "Composite", - className: "EnterpriseChannel", - modelProperties: { - ...Resource.type.modelProperties, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "EnterpriseChannelProperties" - } - } - } - } -}; - export const BotResponseList: msRest.CompositeMapper = { serializedName: "BotResponseList", type: { @@ -1707,37 +1817,9 @@ export const ConnectionSettingResponseList: msRest.CompositeMapper = { } }; -export const EnterpriseChannelResponseList: msRest.CompositeMapper = { - serializedName: "EnterpriseChannelResponseList", - type: { - name: "Composite", - className: "EnterpriseChannelResponseList", - modelProperties: { - nextLink: { - serializedName: "nextLink", - type: { - name: "String" - } - }, - value: { - readOnly: true, - serializedName: "", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EnterpriseChannel" - } - } - } - } - } - } -}; - export const discriminators = { 'Channel' : Channel, + 'Channel.AlexaChannel' : AlexaChannel, 'Channel.FacebookChannel' : FacebookChannel, 'Channel.EmailChannel' : EmailChannel, 'Channel.MsTeamsChannel' : MsTeamsChannel, @@ -1747,6 +1829,8 @@ export const discriminators = { 'Channel.DirectLineChannel' : DirectLineChannel, 'Channel.TelegramChannel' : TelegramChannel, 'Channel.SmsChannel' : SmsChannel, - 'Channel.SlackChannel' : SlackChannel + 'Channel.SlackChannel' : SlackChannel, + 'Channel.LineChannel' : LineChannel, + 'Channel.DirectLineSpeechChannel' : DirectLineSpeechChannel }; diff --git a/sdk/botservice/arm-botservice/src/models/parameters.ts b/sdk/botservice/arm-botservice/src/models/parameters.ts index 239111695a18..e16378974344 100644 --- a/sdk/botservice/arm-botservice/src/models/parameters.ts +++ b/sdk/botservice/arm-botservice/src/models/parameters.ts @@ -38,6 +38,7 @@ export const channelName0: msRest.OperationURLParameter = { type: { name: "Enum", allowedValues: [ + "AlexaChannel", "FacebookChannel", "EmailChannel", "KikChannel", @@ -47,7 +48,9 @@ export const channelName0: msRest.OperationURLParameter = { "SkypeChannel", "WebChatChannel", "DirectLineChannel", - "SmsChannel" + "SmsChannel", + "LineChannel", + "DirectLineSpeechChannel" ] } } @@ -67,6 +70,20 @@ export const channelName1: msRest.OperationURLParameter = { } } }; +export const channelName2: msRest.OperationURLParameter = { + parameterPath: "channelName", + mapper: { + required: true, + serializedName: "channelName", + type: { + name: "Enum", + allowedValues: [ + "WebChatChannel", + "DirectLineChannel" + ] + } + } +}; export const connectionName: msRest.OperationURLParameter = { parameterPath: "connectionName", mapper: { @@ -75,7 +92,7 @@ export const connectionName: msRest.OperationURLParameter = { constraints: { MaxLength: 64, MinLength: 2, - Pattern: /^[a-zA-Z0-9][a-zA-Z0-9_.-]*$/ + Pattern: /^[a-zA-Z0-9][\sa-zA-Z0-9_.-]*$/ }, type: { name: "String" diff --git a/sdk/botservice/arm-botservice/src/operations/botConnection.ts b/sdk/botservice/arm-botservice/src/operations/botConnection.ts index c0ca33d2dafc..b6baaf2edfc3 100644 --- a/sdk/botservice/arm-botservice/src/operations/botConnection.ts +++ b/sdk/botservice/arm-botservice/src/operations/botConnection.ts @@ -54,7 +54,7 @@ export class BotConnection { * Get a Connection Setting registration for a Bot Service * @param resourceGroupName The name of the Bot resource group in the user subscription. * @param resourceName The name of the Bot resource. - * @param connectionName The name of the Bot Service Connection Setting resource + * @param connectionName The name of the Bot Service Connection Setting resource. * @param [options] The optional parameters * @returns Promise */ @@ -62,14 +62,14 @@ export class BotConnection { /** * @param resourceGroupName The name of the Bot resource group in the user subscription. * @param resourceName The name of the Bot resource. - * @param connectionName The name of the Bot Service Connection Setting resource + * @param connectionName The name of the Bot Service Connection Setting resource. * @param callback The callback */ listWithSecrets(resourceGroupName: string, resourceName: string, connectionName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The name of the Bot resource group in the user subscription. * @param resourceName The name of the Bot resource. - * @param connectionName The name of the Bot Service Connection Setting resource + * @param connectionName The name of the Bot Service Connection Setting resource. * @param options The optional parameters * @param callback The callback */ @@ -90,7 +90,7 @@ export class BotConnection { * Register a new Auth Connection for a Bot Service * @param resourceGroupName The name of the Bot resource group in the user subscription. * @param resourceName The name of the Bot resource. - * @param connectionName The name of the Bot Service Connection Setting resource + * @param connectionName The name of the Bot Service Connection Setting resource. * @param parameters The parameters to provide for creating the Connection Setting. * @param [options] The optional parameters * @returns Promise @@ -99,7 +99,7 @@ export class BotConnection { /** * @param resourceGroupName The name of the Bot resource group in the user subscription. * @param resourceName The name of the Bot resource. - * @param connectionName The name of the Bot Service Connection Setting resource + * @param connectionName The name of the Bot Service Connection Setting resource. * @param parameters The parameters to provide for creating the Connection Setting. * @param callback The callback */ @@ -107,7 +107,7 @@ export class BotConnection { /** * @param resourceGroupName The name of the Bot resource group in the user subscription. * @param resourceName The name of the Bot resource. - * @param connectionName The name of the Bot Service Connection Setting resource + * @param connectionName The name of the Bot Service Connection Setting resource. * @param parameters The parameters to provide for creating the Connection Setting. * @param options The optional parameters * @param callback The callback @@ -130,7 +130,7 @@ export class BotConnection { * Updates a Connection Setting registration for a Bot Service * @param resourceGroupName The name of the Bot resource group in the user subscription. * @param resourceName The name of the Bot resource. - * @param connectionName The name of the Bot Service Connection Setting resource + * @param connectionName The name of the Bot Service Connection Setting resource. * @param parameters The parameters to provide for updating the Connection Setting. * @param [options] The optional parameters * @returns Promise @@ -139,7 +139,7 @@ export class BotConnection { /** * @param resourceGroupName The name of the Bot resource group in the user subscription. * @param resourceName The name of the Bot resource. - * @param connectionName The name of the Bot Service Connection Setting resource + * @param connectionName The name of the Bot Service Connection Setting resource. * @param parameters The parameters to provide for updating the Connection Setting. * @param callback The callback */ @@ -147,7 +147,7 @@ export class BotConnection { /** * @param resourceGroupName The name of the Bot resource group in the user subscription. * @param resourceName The name of the Bot resource. - * @param connectionName The name of the Bot Service Connection Setting resource + * @param connectionName The name of the Bot Service Connection Setting resource. * @param parameters The parameters to provide for updating the Connection Setting. * @param options The optional parameters * @param callback The callback @@ -170,7 +170,7 @@ export class BotConnection { * Get a Connection Setting registration for a Bot Service * @param resourceGroupName The name of the Bot resource group in the user subscription. * @param resourceName The name of the Bot resource. - * @param connectionName The name of the Bot Service Connection Setting resource + * @param connectionName The name of the Bot Service Connection Setting resource. * @param [options] The optional parameters * @returns Promise */ @@ -178,14 +178,14 @@ export class BotConnection { /** * @param resourceGroupName The name of the Bot resource group in the user subscription. * @param resourceName The name of the Bot resource. - * @param connectionName The name of the Bot Service Connection Setting resource + * @param connectionName The name of the Bot Service Connection Setting resource. * @param callback The callback */ get(resourceGroupName: string, resourceName: string, connectionName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The name of the Bot resource group in the user subscription. * @param resourceName The name of the Bot resource. - * @param connectionName The name of the Bot Service Connection Setting resource + * @param connectionName The name of the Bot Service Connection Setting resource. * @param options The optional parameters * @param callback The callback */ @@ -206,7 +206,7 @@ export class BotConnection { * Deletes a Connection Setting registration for a Bot Service * @param resourceGroupName The name of the Bot resource group in the user subscription. * @param resourceName The name of the Bot resource. - * @param connectionName The name of the Bot Service Connection Setting resource + * @param connectionName The name of the Bot Service Connection Setting resource. * @param [options] The optional parameters * @returns Promise */ @@ -214,14 +214,14 @@ export class BotConnection { /** * @param resourceGroupName The name of the Bot resource group in the user subscription. * @param resourceName The name of the Bot resource. - * @param connectionName The name of the Bot Service Connection Setting resource + * @param connectionName The name of the Bot Service Connection Setting resource. * @param callback The callback */ deleteMethod(resourceGroupName: string, resourceName: string, connectionName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The name of the Bot resource group in the user subscription. * @param resourceName The name of the Bot resource. - * @param connectionName The name of the Bot Service Connection Setting resource + * @param connectionName The name of the Bot Service Connection Setting resource. * @param options The optional parameters * @param callback The callback */ diff --git a/sdk/botservice/arm-botservice/src/operations/channels.ts b/sdk/botservice/arm-botservice/src/operations/channels.ts index 7e63053ff93b..f54e613f0a2b 100644 --- a/sdk/botservice/arm-botservice/src/operations/channels.ts +++ b/sdk/botservice/arm-botservice/src/operations/channels.ts @@ -30,9 +30,10 @@ export class Channels { * Creates a Channel registration for a Bot Service * @param resourceGroupName The name of the Bot resource group in the user subscription. * @param resourceName The name of the Bot resource. - * @param channelName The name of the Channel resource. Possible values include: 'FacebookChannel', - * 'EmailChannel', 'KikChannel', 'TelegramChannel', 'SlackChannel', 'MsTeamsChannel', - * 'SkypeChannel', 'WebChatChannel', 'DirectLineChannel', 'SmsChannel' + * @param channelName The name of the Channel resource. Possible values include: 'AlexaChannel', + * 'FacebookChannel', 'EmailChannel', 'KikChannel', 'TelegramChannel', 'SlackChannel', + * 'MsTeamsChannel', 'SkypeChannel', 'WebChatChannel', 'DirectLineChannel', 'SmsChannel', + * 'LineChannel', 'DirectLineSpeechChannel' * @param parameters The parameters to provide for the created bot. * @param [options] The optional parameters * @returns Promise @@ -41,9 +42,10 @@ export class Channels { /** * @param resourceGroupName The name of the Bot resource group in the user subscription. * @param resourceName The name of the Bot resource. - * @param channelName The name of the Channel resource. Possible values include: 'FacebookChannel', - * 'EmailChannel', 'KikChannel', 'TelegramChannel', 'SlackChannel', 'MsTeamsChannel', - * 'SkypeChannel', 'WebChatChannel', 'DirectLineChannel', 'SmsChannel' + * @param channelName The name of the Channel resource. Possible values include: 'AlexaChannel', + * 'FacebookChannel', 'EmailChannel', 'KikChannel', 'TelegramChannel', 'SlackChannel', + * 'MsTeamsChannel', 'SkypeChannel', 'WebChatChannel', 'DirectLineChannel', 'SmsChannel', + * 'LineChannel', 'DirectLineSpeechChannel' * @param parameters The parameters to provide for the created bot. * @param callback The callback */ @@ -51,9 +53,10 @@ export class Channels { /** * @param resourceGroupName The name of the Bot resource group in the user subscription. * @param resourceName The name of the Bot resource. - * @param channelName The name of the Channel resource. Possible values include: 'FacebookChannel', - * 'EmailChannel', 'KikChannel', 'TelegramChannel', 'SlackChannel', 'MsTeamsChannel', - * 'SkypeChannel', 'WebChatChannel', 'DirectLineChannel', 'SmsChannel' + * @param channelName The name of the Channel resource. Possible values include: 'AlexaChannel', + * 'FacebookChannel', 'EmailChannel', 'KikChannel', 'TelegramChannel', 'SlackChannel', + * 'MsTeamsChannel', 'SkypeChannel', 'WebChatChannel', 'DirectLineChannel', 'SmsChannel', + * 'LineChannel', 'DirectLineSpeechChannel' * @param parameters The parameters to provide for the created bot. * @param options The optional parameters * @param callback The callback @@ -76,9 +79,10 @@ export class Channels { * Updates a Channel registration for a Bot Service * @param resourceGroupName The name of the Bot resource group in the user subscription. * @param resourceName The name of the Bot resource. - * @param channelName The name of the Channel resource. Possible values include: 'FacebookChannel', - * 'EmailChannel', 'KikChannel', 'TelegramChannel', 'SlackChannel', 'MsTeamsChannel', - * 'SkypeChannel', 'WebChatChannel', 'DirectLineChannel', 'SmsChannel' + * @param channelName The name of the Channel resource. Possible values include: 'AlexaChannel', + * 'FacebookChannel', 'EmailChannel', 'KikChannel', 'TelegramChannel', 'SlackChannel', + * 'MsTeamsChannel', 'SkypeChannel', 'WebChatChannel', 'DirectLineChannel', 'SmsChannel', + * 'LineChannel', 'DirectLineSpeechChannel' * @param [options] The optional parameters * @returns Promise */ @@ -86,18 +90,20 @@ export class Channels { /** * @param resourceGroupName The name of the Bot resource group in the user subscription. * @param resourceName The name of the Bot resource. - * @param channelName The name of the Channel resource. Possible values include: 'FacebookChannel', - * 'EmailChannel', 'KikChannel', 'TelegramChannel', 'SlackChannel', 'MsTeamsChannel', - * 'SkypeChannel', 'WebChatChannel', 'DirectLineChannel', 'SmsChannel' + * @param channelName The name of the Channel resource. Possible values include: 'AlexaChannel', + * 'FacebookChannel', 'EmailChannel', 'KikChannel', 'TelegramChannel', 'SlackChannel', + * 'MsTeamsChannel', 'SkypeChannel', 'WebChatChannel', 'DirectLineChannel', 'SmsChannel', + * 'LineChannel', 'DirectLineSpeechChannel' * @param callback The callback */ update(resourceGroupName: string, resourceName: string, channelName: Models.ChannelName, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The name of the Bot resource group in the user subscription. * @param resourceName The name of the Bot resource. - * @param channelName The name of the Channel resource. Possible values include: 'FacebookChannel', - * 'EmailChannel', 'KikChannel', 'TelegramChannel', 'SlackChannel', 'MsTeamsChannel', - * 'SkypeChannel', 'WebChatChannel', 'DirectLineChannel', 'SmsChannel' + * @param channelName The name of the Channel resource. Possible values include: 'AlexaChannel', + * 'FacebookChannel', 'EmailChannel', 'KikChannel', 'TelegramChannel', 'SlackChannel', + * 'MsTeamsChannel', 'SkypeChannel', 'WebChatChannel', 'DirectLineChannel', 'SmsChannel', + * 'LineChannel', 'DirectLineSpeechChannel' * @param options The optional parameters * @param callback The callback */ @@ -190,9 +196,10 @@ export class Channels { * Lists a Channel registration for a Bot Service including secrets * @param resourceGroupName The name of the Bot resource group in the user subscription. * @param resourceName The name of the Bot resource. - * @param channelName The name of the Channel resource. Possible values include: 'FacebookChannel', - * 'EmailChannel', 'KikChannel', 'TelegramChannel', 'SlackChannel', 'MsTeamsChannel', - * 'SkypeChannel', 'WebChatChannel', 'DirectLineChannel', 'SmsChannel' + * @param channelName The name of the Channel resource. Possible values include: 'AlexaChannel', + * 'FacebookChannel', 'EmailChannel', 'KikChannel', 'TelegramChannel', 'SlackChannel', + * 'MsTeamsChannel', 'SkypeChannel', 'WebChatChannel', 'DirectLineChannel', 'SmsChannel', + * 'LineChannel', 'DirectLineSpeechChannel' * @param [options] The optional parameters * @returns Promise */ @@ -200,18 +207,20 @@ export class Channels { /** * @param resourceGroupName The name of the Bot resource group in the user subscription. * @param resourceName The name of the Bot resource. - * @param channelName The name of the Channel resource. Possible values include: 'FacebookChannel', - * 'EmailChannel', 'KikChannel', 'TelegramChannel', 'SlackChannel', 'MsTeamsChannel', - * 'SkypeChannel', 'WebChatChannel', 'DirectLineChannel', 'SmsChannel' + * @param channelName The name of the Channel resource. Possible values include: 'AlexaChannel', + * 'FacebookChannel', 'EmailChannel', 'KikChannel', 'TelegramChannel', 'SlackChannel', + * 'MsTeamsChannel', 'SkypeChannel', 'WebChatChannel', 'DirectLineChannel', 'SmsChannel', + * 'LineChannel', 'DirectLineSpeechChannel' * @param callback The callback */ listWithKeys(resourceGroupName: string, resourceName: string, channelName: Models.ChannelName, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The name of the Bot resource group in the user subscription. * @param resourceName The name of the Bot resource. - * @param channelName The name of the Channel resource. Possible values include: 'FacebookChannel', - * 'EmailChannel', 'KikChannel', 'TelegramChannel', 'SlackChannel', 'MsTeamsChannel', - * 'SkypeChannel', 'WebChatChannel', 'DirectLineChannel', 'SmsChannel' + * @param channelName The name of the Channel resource. Possible values include: 'AlexaChannel', + * 'FacebookChannel', 'EmailChannel', 'KikChannel', 'TelegramChannel', 'SlackChannel', + * 'MsTeamsChannel', 'SkypeChannel', 'WebChatChannel', 'DirectLineChannel', 'SmsChannel', + * 'LineChannel', 'DirectLineSpeechChannel' * @param options The optional parameters * @param callback The callback */ diff --git a/sdk/botservice/arm-botservice/src/operations/directLine.ts b/sdk/botservice/arm-botservice/src/operations/directLine.ts new file mode 100644 index 000000000000..324c434c7724 --- /dev/null +++ b/sdk/botservice/arm-botservice/src/operations/directLine.ts @@ -0,0 +1,107 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * 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 * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/directLineMappers"; +import * as Parameters from "../models/parameters"; +import { AzureBotServiceContext } from "../azureBotServiceContext"; + +/** Class representing a DirectLine. */ +export class DirectLine { + private readonly client: AzureBotServiceContext; + + /** + * Create a DirectLine. + * @param {AzureBotServiceContext} client Reference to the service client. + */ + constructor(client: AzureBotServiceContext) { + this.client = client; + } + + /** + * Regenerates secret keys and returns them for the DirectLine Channel of a particular BotService + * resource + * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceName The name of the Bot resource. + * @param channelName The name of the Channel resource for which keys are to be regenerated. + * Possible values include: 'WebChatChannel', 'DirectLineChannel' + * @param parameters The parameters to provide for the created bot. + * @param [options] The optional parameters + * @returns Promise + */ + regenerateKeys(resourceGroupName: string, resourceName: string, channelName: Models.RegenerateKeysChannelName, parameters: Models.SiteInfo, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceName The name of the Bot resource. + * @param channelName The name of the Channel resource for which keys are to be regenerated. + * Possible values include: 'WebChatChannel', 'DirectLineChannel' + * @param parameters The parameters to provide for the created bot. + * @param callback The callback + */ + regenerateKeys(resourceGroupName: string, resourceName: string, channelName: Models.RegenerateKeysChannelName, parameters: Models.SiteInfo, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceName The name of the Bot resource. + * @param channelName The name of the Channel resource for which keys are to be regenerated. + * Possible values include: 'WebChatChannel', 'DirectLineChannel' + * @param parameters The parameters to provide for the created bot. + * @param options The optional parameters + * @param callback The callback + */ + regenerateKeys(resourceGroupName: string, resourceName: string, channelName: Models.RegenerateKeysChannelName, parameters: Models.SiteInfo, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + regenerateKeys(resourceGroupName: string, resourceName: string, channelName: Models.RegenerateKeysChannelName, parameters: Models.SiteInfo, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + channelName, + parameters, + options + }, + regenerateKeysOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const regenerateKeysOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/channels/{channelName}/regeneratekeys", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.subscriptionId, + Parameters.channelName2 + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.SiteInfo, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.BotChannel + }, + default: { + bodyMapper: Mappers.ErrorModel + } + }, + serializer +}; diff --git a/sdk/botservice/arm-botservice/src/operations/enterpriseChannels.ts b/sdk/botservice/arm-botservice/src/operations/enterpriseChannels.ts deleted file mode 100644 index 72ed6d97b817..000000000000 --- a/sdk/botservice/arm-botservice/src/operations/enterpriseChannels.ts +++ /dev/null @@ -1,459 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * 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 * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as Models from "../models"; -import * as Mappers from "../models/enterpriseChannelsMappers"; -import * as Parameters from "../models/parameters"; -import { AzureBotServiceContext } from "../azureBotServiceContext"; - -/** Class representing a EnterpriseChannels. */ -export class EnterpriseChannels { - private readonly client: AzureBotServiceContext; - - /** - * Create a EnterpriseChannels. - * @param {AzureBotServiceContext} client Reference to the service client. - */ - constructor(client: AzureBotServiceContext) { - this.client = client; - } - - /** - * Check whether an Enterprise Channel name is available. - * @param parameters The parameters to provide for the Enterprise Channel check name availability - * request. - * @param [options] The optional parameters - * @returns Promise - */ - checkNameAvailability(parameters: Models.EnterpriseChannelCheckNameAvailabilityRequest, options?: msRest.RequestOptionsBase): Promise; - /** - * @param parameters The parameters to provide for the Enterprise Channel check name availability - * request. - * @param callback The callback - */ - checkNameAvailability(parameters: Models.EnterpriseChannelCheckNameAvailabilityRequest, callback: msRest.ServiceCallback): void; - /** - * @param parameters The parameters to provide for the Enterprise Channel check name availability - * request. - * @param options The optional parameters - * @param callback The callback - */ - checkNameAvailability(parameters: Models.EnterpriseChannelCheckNameAvailabilityRequest, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - checkNameAvailability(parameters: Models.EnterpriseChannelCheckNameAvailabilityRequest, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - parameters, - options - }, - checkNameAvailabilityOperationSpec, - callback) as Promise; - } - - /** - * Returns all the resources of a particular type belonging to a resource group. - * @param resourceGroupName The name of the Bot resource group in the user subscription. - * @param [options] The optional parameters - * @returns Promise - */ - listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the Bot resource group in the user subscription. - * @param callback The callback - */ - listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the Bot resource group in the user subscription. - * @param options The optional parameters - * @param callback The callback - */ - listByResourceGroup(resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - options - }, - listByResourceGroupOperationSpec, - callback) as Promise; - } - - /** - * Creates an Enterprise Channel. - * @param resourceGroupName The name of the Bot resource group in the user subscription. - * @param resourceName The name of the Bot resource. - * @param parameters The parameters to provide for the new Enterprise Channel. - * @param [options] The optional parameters - * @returns Promise - */ - create(resourceGroupName: string, resourceName: string, parameters: Models.EnterpriseChannel, options?: msRest.RequestOptionsBase): Promise { - return this.beginCreate(resourceGroupName,resourceName,parameters,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; - } - - /** - * Updates an Enterprise Channel. - * @param resourceGroupName The name of the Bot resource group in the user subscription. - * @param resourceName The name of the Bot resource. - * @param [options] The optional parameters - * @returns Promise - */ - update(resourceGroupName: string, resourceName: string, options?: Models.EnterpriseChannelsUpdateOptionalParams): Promise { - return this.beginUpdate(resourceGroupName,resourceName,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; - } - - /** - * Deletes an Enterprise Channel from the resource group - * @param resourceGroupName The name of the Bot resource group in the user subscription. - * @param resourceName The name of the Bot resource. - * @param [options] The optional parameters - * @returns Promise - */ - deleteMethod(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginDeleteMethod(resourceGroupName,resourceName,options) - .then(lroPoller => lroPoller.pollUntilFinished()); - } - - /** - * Returns an Enterprise Channel specified by the parameters. - * @param resourceGroupName The name of the Bot resource group in the user subscription. - * @param resourceName The name of the Bot resource. - * @param [options] The optional parameters - * @returns Promise - */ - get(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the Bot resource group in the user subscription. - * @param resourceName The name of the Bot resource. - * @param callback The callback - */ - get(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the Bot resource group in the user subscription. - * @param resourceName The name of the Bot resource. - * @param options The optional parameters - * @param callback The callback - */ - get(resourceGroupName: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - resourceName, - options - }, - getOperationSpec, - callback) as Promise; - } - - /** - * Creates an Enterprise Channel. - * @param resourceGroupName The name of the Bot resource group in the user subscription. - * @param resourceName The name of the Bot resource. - * @param parameters The parameters to provide for the new Enterprise Channel. - * @param [options] The optional parameters - * @returns Promise - */ - beginCreate(resourceGroupName: string, resourceName: string, parameters: Models.EnterpriseChannel, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - resourceName, - parameters, - options - }, - beginCreateOperationSpec, - options); - } - - /** - * Updates an Enterprise Channel. - * @param resourceGroupName The name of the Bot resource group in the user subscription. - * @param resourceName The name of the Bot resource. - * @param [options] The optional parameters - * @returns Promise - */ - beginUpdate(resourceGroupName: string, resourceName: string, options?: Models.EnterpriseChannelsBeginUpdateOptionalParams): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - resourceName, - options - }, - beginUpdateOperationSpec, - options); - } - - /** - * Deletes an Enterprise Channel from the resource group - * @param resourceGroupName The name of the Bot resource group in the user subscription. - * @param resourceName The name of the Bot resource. - * @param [options] The optional parameters - * @returns Promise - */ - beginDeleteMethod(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - resourceName, - options - }, - beginDeleteMethodOperationSpec, - options); - } - - /** - * Returns all the resources of a particular type belonging to a resource group. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listByResourceGroupNext(nextPageLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback - */ - listByResourceGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listByResourceGroupNextOperationSpec, - callback) as Promise; - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const checkNameAvailabilityOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "providers/Microsoft.BotService/checkEnterpriseChannelNameAvailability", - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.EnterpriseChannelCheckNameAvailabilityRequest, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.EnterpriseChannelCheckNameAvailabilityResponse - }, - default: { - bodyMapper: Mappers.ErrorModel - } - }, - serializer -}; - -const listByResourceGroupOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/enterpriseChannels", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.EnterpriseChannelResponseList - }, - default: { - bodyMapper: Mappers.ErrorModel - } - }, - serializer -}; - -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/enterpriseChannels/{resourceName}", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.resourceName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.EnterpriseChannel - }, - default: { - bodyMapper: Mappers.ErrorModel - } - }, - serializer -}; - -const beginCreateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/enterpriseChannels/{resourceName}", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.resourceName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.EnterpriseChannel, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.EnterpriseChannel - }, - 201: { - bodyMapper: Mappers.EnterpriseChannel - }, - default: { - bodyMapper: Mappers.ErrorModel - } - }, - serializer -}; - -const beginUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/enterpriseChannels/{resourceName}", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.resourceName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: { - location: [ - "options", - "location" - ], - tags: [ - "options", - "tags" - ], - sku: [ - "options", - "sku" - ], - kind: [ - "options", - "kind" - ], - etag: [ - "options", - "etag" - ], - properties: [ - "options", - "properties" - ] - }, - mapper: { - ...Mappers.EnterpriseChannel, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.EnterpriseChannel - }, - 201: { - bodyMapper: Mappers.EnterpriseChannel - }, - default: { - bodyMapper: Mappers.ErrorModel - } - }, - serializer -}; - -const beginDeleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/enterpriseChannels/{resourceName}", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.resourceName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorModel - } - }, - serializer -}; - -const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.EnterpriseChannelResponseList - }, - default: { - bodyMapper: Mappers.ErrorModel - } - }, - serializer -}; diff --git a/sdk/botservice/arm-botservice/src/operations/index.ts b/sdk/botservice/arm-botservice/src/operations/index.ts index 020a6da63481..d4f8c52a2296 100644 --- a/sdk/botservice/arm-botservice/src/operations/index.ts +++ b/sdk/botservice/arm-botservice/src/operations/index.ts @@ -10,6 +10,6 @@ export * from "./bots"; export * from "./channels"; +export * from "./directLine"; export * from "./operations"; export * from "./botConnection"; -export * from "./enterpriseChannels"; diff --git a/sdk/botservice/arm-botservice/tsconfig.json b/sdk/botservice/arm-botservice/tsconfig.json index 87bbf5b5fa49..422b584abd5e 100644 --- a/sdk/botservice/arm-botservice/tsconfig.json +++ b/sdk/botservice/arm-botservice/tsconfig.json @@ -9,7 +9,7 @@ "esModuleInterop": true, "allowSyntheticDefaultImports": true, "forceConsistentCasingInFileNames": true, - "lib": ["es6"], + "lib": ["es6", "dom"], "declaration": true, "outDir": "./esm", "importHelpers": true diff --git a/sdk/cdn/arm-cdn/package.json b/sdk/cdn/arm-cdn/package.json index b3198861bf78..18ccee5fa637 100644 --- a/sdk/cdn/arm-cdn/package.json +++ b/sdk/cdn/arm-cdn/package.json @@ -2,7 +2,7 @@ "name": "@azure/arm-cdn", "author": "Microsoft Corporation", "description": "CdnManagementClient Library with typescript type definitions for node.js and browser.", - "version": "5.0.0", + "version": "5.1.0", "dependencies": { "@azure/ms-rest-azure-js": "^2.0.1", "@azure/ms-rest-js": "^2.0.4", diff --git a/sdk/cdn/arm-cdn/src/cdnManagementClientContext.ts b/sdk/cdn/arm-cdn/src/cdnManagementClientContext.ts index a6b2b1482e39..34cc747ef32d 100644 --- a/sdk/cdn/arm-cdn/src/cdnManagementClientContext.ts +++ b/sdk/cdn/arm-cdn/src/cdnManagementClientContext.ts @@ -13,7 +13,7 @@ import * as msRest from "@azure/ms-rest-js"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-cdn"; -const packageVersion = "5.0.0"; +const packageVersion = "5.1.0"; export class CdnManagementClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials; diff --git a/sdk/cdn/arm-cdn/src/operations/customDomains.ts b/sdk/cdn/arm-cdn/src/operations/customDomains.ts index 83415680c61c..c05b4b4c92bc 100644 --- a/sdk/cdn/arm-cdn/src/operations/customDomains.ts +++ b/sdk/cdn/arm-cdn/src/operations/customDomains.ts @@ -14,6 +14,7 @@ import * as Models from "../models"; import * as Mappers from "../models/customDomainsMappers"; import * as Parameters from "../models/parameters"; import { CdnManagementClientContext } from "../cdnManagementClientContext"; +import { Profiles } from "./profiles"; /** Class representing a CustomDomains. */ export class CustomDomains { @@ -114,7 +115,7 @@ export class CustomDomains { * @returns Promise */ create(resourceGroupName: string, profileName: string, endpointName: string, customDomainName: string, hostName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginCreate(resourceGroupName,profileName,endpointName,customDomainName,hostName,options) + return this.beginCreate(resourceGroupName, profileName, endpointName, customDomainName, hostName, options) .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } @@ -128,7 +129,7 @@ export class CustomDomains { * @returns Promise */ deleteMethod(resourceGroupName: string, profileName: string, endpointName: string, customDomainName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginDeleteMethod(resourceGroupName,profileName,endpointName,customDomainName,options) + return this.beginDeleteMethod(resourceGroupName, profileName, endpointName, customDomainName, options) .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } @@ -200,16 +201,42 @@ export class CustomDomains { */ enableCustomHttps(resourceGroupName: string, profileName: string, endpointName: string, customDomainName: string, options: Models.CustomDomainsEnableCustomHttpsOptionalParams, callback: msRest.ServiceCallback): void; enableCustomHttps(resourceGroupName: string, profileName: string, endpointName: string, customDomainName: string, options?: Models.CustomDomainsEnableCustomHttpsOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - profileName, - endpointName, - customDomainName, - options - }, - enableCustomHttpsOperationSpec, - callback) as Promise; + // #region Added default values to add backwards compatibility + let newOptions: Models.CustomDomainsEnableCustomHttpsOptionalParams = {}; + + if (typeof options === "function") { + callback = options; + } else { + newOptions = options as Models.CustomDomainsEnableCustomHttpsOptionalParams; + } + + if (!newOptions) { + newOptions = {}; + } + + let optionsPreparationPromise = Promise.resolve(options); + + if (!newOptions.customDomainHttpsParameters) { + let profiles = new Profiles(this.client); + optionsPreparationPromise = profiles.get(resourceGroupName, profileName).then(profile => { + newOptions.customDomainHttpsParameters = getDefaultCustomDomainHttpsParameters(profile); + return newOptions; + }) + } + + return optionsPreparationPromise.then(options => + this.client.sendOperationRequest( + { + resourceGroupName, + profileName, + endpointName, + customDomainName, + options + }, + enableCustomHttpsOperationSpec, + callback) as Promise + ); + // #endregion } /** @@ -287,6 +314,46 @@ export class CustomDomains { } } +// #region Added default values to add backwards compatibility +class SkuNames { + public static get standard_microsoft() { return "Standard_Microsoft"; } + public static get standard_verizon() { return "Standard_Verizon"; } + public static get standard_akamai() { return "Standard_Akamai"; } +} + +function getDefaultCustomDomainHttpsParameters(profile: Models.Profile): Models.CdnManagedHttpsParameters | undefined { + switch (profile.sku.name) { + case SkuNames.standard_microsoft: + return { + certificateSource: "Cdn", + certificateSourceParameters: { + certificateType: "Dedicated" + }, + protocolType: "ServerNameIndication" + } + case SkuNames.standard_akamai: + return { + certificateSource: "Cdn", + certificateSourceParameters: { + certificateType: "Shared" + }, + protocolType: "ServerNameIndication" + } + case SkuNames.standard_verizon: + return { + certificateSource: "Cdn", + certificateSourceParameters: { + certificateType: "Shared" + }, + protocolType: "IPBased" + } + default: + return undefined; + } +} + +// #endregion + // Operation Specifications const serializer = new msRest.Serializer(Mappers); const listByEndpointOperationSpec: msRest.OperationSpec = { diff --git a/sdk/cognitiveservices/cognitiveservices-anomalydetector/README.md b/sdk/cognitiveservices/cognitiveservices-anomalydetector/README.md index ab8ee82f328d..324f5088e7b0 100644 --- a/sdk/cognitiveservices/cognitiveservices-anomalydetector/README.md +++ b/sdk/cognitiveservices/cognitiveservices-anomalydetector/README.md @@ -24,7 +24,7 @@ npm install @azure/ms-rest-azure-js ``` ##### Sample code -The following sample determines anamolies with the given time series. To know more, refer to the [Azure Documentation on Anomaly Detectors](https://docs.microsoft.com/en-us/azure/cognitive-services/anomaly-detector/) +The following sample determines anamolies with the given time series. To know more, refer to the [Azure Documentation on Anomaly Detectors](https://docs.microsoft.com/azure/cognitive-services/anomaly-detector/) ```javascript const { AnomalyDetectorClient } = require("@azure/cognitiveservices-anomalydetector"); diff --git a/sdk/cognitiveservices/cognitiveservices-autosuggest/README.md b/sdk/cognitiveservices/cognitiveservices-autosuggest/README.md index fcaa3fdd2575..a89833079014 100644 --- a/sdk/cognitiveservices/cognitiveservices-autosuggest/README.md +++ b/sdk/cognitiveservices/cognitiveservices-autosuggest/README.md @@ -24,7 +24,7 @@ npm install @azure/ms-rest-azure-js ``` ##### Sample code -The following sample gets suggestions from Bing for the given query **Microsoft Azure**. To know more, refer to the [Azure Documentation on Bing Auto Suggest](https://docs.microsoft.com/en-us/azure/cognitive-services/bing-autosuggest/) +The following sample gets suggestions from Bing for the given query **Microsoft Azure**. To know more, refer to the [Azure Documentation on Bing Auto Suggest](https://docs.microsoft.com/azure/cognitive-services/bing-autosuggest/) ```javascript const { AutoSuggestClient } = require("@azure/cognitiveservices-autosuggest"); diff --git a/sdk/cognitiveservices/cognitiveservices-computervision/README.md b/sdk/cognitiveservices/cognitiveservices-computervision/README.md index ac8de3afbaff..e4067518d8f2 100644 --- a/sdk/cognitiveservices/cognitiveservices-computervision/README.md +++ b/sdk/cognitiveservices/cognitiveservices-computervision/README.md @@ -24,7 +24,7 @@ npm install @azure/ms-rest-azure-js ``` ##### Sample code -The following sample describes a given image using Computer Vision. To know more, refer to the [Azure Documentation on Computer Vision](https://docs.microsoft.com/en-us/azure/cognitive-services/computer-vision/home) +The following sample describes a given image using Computer Vision. To know more, refer to the [Azure Documentation on Computer Vision](https://docs.microsoft.com/azure/cognitive-services/computer-vision/home) ```javascript const { ComputerVisionClient } = require("@azure/cognitiveservices-computervision"); @@ -38,7 +38,7 @@ async function main() { const client = new ComputerVisionClient(cognitiveServiceCredentials, computerVisionEndPoint); const url = - "https://docs.microsoft.com/en-us/azure/includes/media/shared-image-galleries/shared-image-gallery.png"; + "https://docs.microsoft.com/azure/includes/media/shared-image-galleries/shared-image-gallery.png"; const options = { maxCandidates: 5, language: "en" @@ -85,7 +85,7 @@ main(); ); const url = - "https://docs.microsoft.com/en-us/azure/includes/media/shared-image-galleries/shared-image-gallery.png"; + "https://docs.microsoft.com/azure/includes/media/shared-image-galleries/shared-image-gallery.png"; const options = { maxCandidates: 5, language: "en" diff --git a/sdk/cognitiveservices/cognitiveservices-computervision/package.json b/sdk/cognitiveservices/cognitiveservices-computervision/package.json index 7b246f48db8a..0837fd2f3ab5 100644 --- a/sdk/cognitiveservices/cognitiveservices-computervision/package.json +++ b/sdk/cognitiveservices/cognitiveservices-computervision/package.json @@ -2,7 +2,7 @@ "name": "@azure/cognitiveservices-computervision", "author": "Microsoft Corporation", "description": "ComputerVisionClient Library with typescript type definitions for node.js and browser.", - "version": "7.0.1", + "version": "7.1.0", "dependencies": { "@azure/ms-rest-js": "^2.0.4", "tslib": "^1.10.0" diff --git a/sdk/cognitiveservices/cognitiveservices-computervision/src/computerVisionClientContext.ts b/sdk/cognitiveservices/cognitiveservices-computervision/src/computerVisionClientContext.ts index 6b32300785d0..2c80d88636c9 100644 --- a/sdk/cognitiveservices/cognitiveservices-computervision/src/computerVisionClientContext.ts +++ b/sdk/cognitiveservices/cognitiveservices-computervision/src/computerVisionClientContext.ts @@ -11,7 +11,7 @@ import * as msRest from "@azure/ms-rest-js"; const packageName = "@azure/cognitiveservices-computervision"; -const packageVersion = "7.0.1"; +const packageVersion = "7.1.0"; export class ComputerVisionClientContext extends msRest.ServiceClient { endpoint: string; @@ -42,7 +42,7 @@ export class ComputerVisionClientContext extends msRest.ServiceClient { super(credentials, options); - this.baseUri = "{Endpoint}/vision/v3.0"; + this.baseUri = "{Endpoint}/vision/v3.1"; this.requestContentType = "application/json; charset=utf-8"; this.endpoint = endpoint; this.credentials = credentials; diff --git a/sdk/cognitiveservices/cognitiveservices-computervision/src/models/index.ts b/sdk/cognitiveservices/cognitiveservices-computervision/src/models/index.ts index bad4b3dba42c..afb87bfce8a3 100644 --- a/sdk/cognitiveservices/cognitiveservices-computervision/src/models/index.ts +++ b/sdk/cognitiveservices/cognitiveservices-computervision/src/models/index.ts @@ -864,12 +864,12 @@ export interface ComputerVisionClientGenerateThumbnailOptionalParams extends msR */ export interface ComputerVisionClientReadOptionalParams extends msRest.RequestOptionsBase { /** - * The BCP-47 language code of the text to be detected in the image. In future versions, when - * language parameter is not passed, language detection will be used to determine the language. - * However, in the current version, missing language parameter will cause English to be used. To - * ensure that your document is always parsed in English without the use of language detection in - * the future, pass “en” in the language parameter. Possible values include: 'en', 'es', 'fr', - * 'de', 'it', 'nl', 'pt'. Default value: 'en'. + * The BCP-47 language code of the text in the document. Currently, only English ('en'), Dutch + * (‘nl’), French (‘fr’), German (‘de’), Italian (‘it’), Portuguese (‘pt), and Spanish ('es') are + * supported. Read supports auto language identification and multi-language documents, so only + * provide a language code if you would like to force the documented to be processed as that + * specific language. Possible values include: 'en', 'es', 'fr', 'de', 'it', 'nl', 'pt'. Default + * value: 'en'. */ language?: OcrDetectionLanguage; } @@ -988,12 +988,12 @@ export interface ComputerVisionClientTagImageInStreamOptionalParams extends msRe */ export interface ComputerVisionClientReadInStreamOptionalParams extends msRest.RequestOptionsBase { /** - * The BCP-47 language code of the text to be detected in the image. In future versions, when - * language parameter is not passed, language detection will be used to determine the language. - * However, in the current version, missing language parameter will cause English to be used. To - * ensure that your document is always parsed in English without the use of language detection in - * the future, pass “en” in the language parameter. Possible values include: 'en', 'es', 'fr', - * 'de', 'it', 'nl', 'pt'. Default value: 'en'. + * The BCP-47 language code of the text in the document. Currently, only English ('en'), Dutch + * (‘nl’), French (‘fr’), German (‘de’), Italian (‘it’), Portuguese (‘pt), and Spanish ('es') are + * supported. Read supports auto language identification and multi-language documents, so only + * provide a language code if you would like to force the documented to be processed as that + * specific language. Possible values include: 'en', 'es', 'fr', 'de', 'it', 'nl', 'pt'. Default + * value: 'en'. */ language?: OcrDetectionLanguage; } diff --git a/sdk/cognitiveservices/cognitiveservices-contentmoderator/README.md b/sdk/cognitiveservices/cognitiveservices-contentmoderator/README.md index 66686180ab95..675c7e9e6cbc 100644 --- a/sdk/cognitiveservices/cognitiveservices-contentmoderator/README.md +++ b/sdk/cognitiveservices/cognitiveservices-contentmoderator/README.md @@ -24,7 +24,7 @@ npm install @azure/ms-rest-azure-js ``` ##### Sample code -The following sample detects the langauge of text provided using text moderator APIs. To know more, refer to the [Azure Documentation on Content Moderator](https://docs.microsoft.com/en-us/azure/cognitive-services/content-moderator/overview) +The following sample detects the langauge of text provided using text moderator APIs. To know more, refer to the [Azure Documentation on Content Moderator](https://docs.microsoft.com/azure/cognitive-services/content-moderator/overview) ```javascript const { ContentModeratorClient } = require("@azure/cognitiveservices-contentmoderator"); diff --git a/sdk/cognitiveservices/cognitiveservices-customimagesearch/README.md b/sdk/cognitiveservices/cognitiveservices-customimagesearch/README.md index 9f7975ddcc49..fa09f23ffd87 100644 --- a/sdk/cognitiveservices/cognitiveservices-customimagesearch/README.md +++ b/sdk/cognitiveservices/cognitiveservices-customimagesearch/README.md @@ -24,7 +24,7 @@ npm install @azure/ms-rest-azure-js ``` ##### Sample code -The following sample performs an image search for given query on a custom configuration. The custom configuration can be setup using the Custom search portal. To know more, refer to the [Azure Documentation on Bing Custom Search](https://docs.microsoft.com/en-us/azure/cognitive-services/bing-custom-search/) +The following sample performs an image search for given query on a custom configuration. The custom configuration can be setup using the Custom search portal. To know more, refer to the [Azure Documentation on Bing Custom Search](https://docs.microsoft.com/azure/cognitive-services/bing-custom-search/) ```javascript const { CustomImageSearchClient } = require("@azure/cognitiveservices-customimagesearch"); diff --git a/sdk/cognitiveservices/cognitiveservices-customsearch/README.md b/sdk/cognitiveservices/cognitiveservices-customsearch/README.md index e9ba05319682..b0279049acc4 100644 --- a/sdk/cognitiveservices/cognitiveservices-customsearch/README.md +++ b/sdk/cognitiveservices/cognitiveservices-customsearch/README.md @@ -24,7 +24,7 @@ npm install @azure/ms-rest-azure-js ``` ##### Sample code -The following sample performs a search for given query on a custom configuration. The custom configuration can be setup using the Custom search portal. To know more, refer to the [Azure Documentation Bing Custom Search](https://docs.microsoft.com/en-us/azure/cognitive-services/bing-custom-search/) +The following sample performs a search for given query on a custom configuration. The custom configuration can be setup using the Custom search portal. To know more, refer to the [Azure Documentation Bing Custom Search](https://docs.microsoft.com/azure/cognitive-services/bing-custom-search/) ```javascript const { CustomSearchClient } = require("@azure/cognitiveservices-customsearch"); diff --git a/sdk/cognitiveservices/cognitiveservices-customvision-prediction/README.md b/sdk/cognitiveservices/cognitiveservices-customvision-prediction/README.md index 8c5f3297f711..c77450f79c73 100644 --- a/sdk/cognitiveservices/cognitiveservices-customvision-prediction/README.md +++ b/sdk/cognitiveservices/cognitiveservices-customvision-prediction/README.md @@ -18,7 +18,7 @@ npm install @azure/cognitiveservices-customvision-prediction #### nodejs - Authentication, client creation and classifyImageUrl as an example written in TypeScript. ##### Sample code -The following sample predicts and classifies the given image based on your custom vision training. To know more, refer to the [Azure Documentation on Custom Vision Services](https://docs.microsoft.com/en-us/azure/cognitive-services/custom-vision-service/home). +The following sample predicts and classifies the given image based on your custom vision training. To know more, refer to the [Azure Documentation on Custom Vision Services](https://docs.microsoft.com/azure/cognitive-services/custom-vision-service/home). ```javascript const { PredictionAPIClient } = require("@azure/cognitiveservices-customvision-prediction"); diff --git a/sdk/cognitiveservices/cognitiveservices-customvision-training/README.md b/sdk/cognitiveservices/cognitiveservices-customvision-training/README.md index ad6fd5500992..b80ad980a2c9 100644 --- a/sdk/cognitiveservices/cognitiveservices-customvision-training/README.md +++ b/sdk/cognitiveservices/cognitiveservices-customvision-training/README.md @@ -18,7 +18,7 @@ npm install @azure/cognitiveservices-customvision-training #### nodejs - Authentication, client creation and getDomains as an example written in TypeScript. ##### Sample code -The following sample performs a quick test of the given image based on your custom vision training. To know more, refer to the [Azure Documentation on Custom Vision Services](https://docs.microsoft.com/en-us/azure/cognitive-services/custom-vision-service/home). +The following sample performs a quick test of the given image based on your custom vision training. To know more, refer to the [Azure Documentation on Custom Vision Services](https://docs.microsoft.com/azure/cognitive-services/custom-vision-service/home). ```javascript const { TrainingAPIClient } = require("@azure/cognitiveservices-customvision-training"); diff --git a/sdk/cognitiveservices/cognitiveservices-entitysearch/README.md b/sdk/cognitiveservices/cognitiveservices-entitysearch/README.md index 239d2dd110ef..0ff80a675085 100644 --- a/sdk/cognitiveservices/cognitiveservices-entitysearch/README.md +++ b/sdk/cognitiveservices/cognitiveservices-entitysearch/README.md @@ -24,7 +24,7 @@ npm install @azure/ms-rest-azure-js ``` ##### Sample code -The following sample performs a Bing entity search on the query 'Microsoft Azure'. To know more, refer to the [Azure Documentation on Bing Entities Search](https://docs.microsoft.com/en-us/azure/cognitive-services/bing-entities-search/). +The following sample performs a Bing entity search on the query 'Microsoft Azure'. To know more, refer to the [Azure Documentation on Bing Entities Search](https://docs.microsoft.com/azure/cognitive-services/bing-entities-search/). ```javascript const { EntitySearchClient } = require("@azure/cognitiveservices-entitysearch"); diff --git a/sdk/cognitiveservices/cognitiveservices-face/README.md b/sdk/cognitiveservices/cognitiveservices-face/README.md index 70aa7c627b16..343c6a481fcb 100644 --- a/sdk/cognitiveservices/cognitiveservices-face/README.md +++ b/sdk/cognitiveservices/cognitiveservices-face/README.md @@ -24,7 +24,7 @@ npm install @azure/ms-rest-azure-js ``` ##### Sample code -The following sample detects the facial features on the given image. To know more, refer to the [Azure Documentation on Face APIs](https://docs.microsoft.com/en-us/azure/cognitive-services/face/overview) +The following sample detects the facial features on the given image. To know more, refer to the [Azure Documentation on Face APIs](https://docs.microsoft.com/azure/cognitive-services/face/overview) ```javascript const { FaceClient, FaceModels } = require("@azure/cognitiveservices-face"); diff --git a/sdk/cognitiveservices/cognitiveservices-formrecognizer/README.md b/sdk/cognitiveservices/cognitiveservices-formrecognizer/README.md index c5733dce02a3..34713e316ae2 100644 --- a/sdk/cognitiveservices/cognitiveservices-formrecognizer/README.md +++ b/sdk/cognitiveservices/cognitiveservices-formrecognizer/README.md @@ -25,7 +25,7 @@ npm install @azure/ms-rest-azure-js ``` ##### Sample code -The following sample reads the scanned copy of a sample receipt. To know more, refer to the [Azure Documentation on Form Recognizer](https://docs.microsoft.com/en-us/azure/cognitive-services/form-recognizer/overview) +The following sample reads the scanned copy of a sample receipt. To know more, refer to the [Azure Documentation on Form Recognizer](https://docs.microsoft.com/azure/cognitive-services/form-recognizer/overview) ```javascript const { FormRecognizerClient } = require("@azure/cognitiveservices-formrecognizer"); diff --git a/sdk/cognitiveservices/cognitiveservices-imagesearch/README.md b/sdk/cognitiveservices/cognitiveservices-imagesearch/README.md index b057feeb6bd8..4cca4e181aa7 100644 --- a/sdk/cognitiveservices/cognitiveservices-imagesearch/README.md +++ b/sdk/cognitiveservices/cognitiveservices-imagesearch/README.md @@ -24,7 +24,7 @@ npm install @azure/ms-rest-azure-js ``` ##### Sample code -The following sample performs an image search for 'Microsoft Azure' with conditions such as the color has to be 'Monochrome', etc. To know more, refer to the [Azure Documentation on Bing Image Search](https://docs.microsoft.com/en-us/azure/cognitive-services/bing-image-search/) +The following sample performs an image search for 'Microsoft Azure' with conditions such as the color has to be 'Monochrome', etc. To know more, refer to the [Azure Documentation on Bing Image Search](https://docs.microsoft.com/azure/cognitive-services/bing-image-search/) ```javascript const { ImageSearchClient } = require("@azure/cognitiveservices-imagesearch"); diff --git a/sdk/cognitiveservices/cognitiveservices-localsearch/README.md b/sdk/cognitiveservices/cognitiveservices-localsearch/README.md index 6efb2cc4c7ca..1807e8d9e6d3 100644 --- a/sdk/cognitiveservices/cognitiveservices-localsearch/README.md +++ b/sdk/cognitiveservices/cognitiveservices-localsearch/README.md @@ -24,7 +24,7 @@ npm install @azure/ms-rest-azure-js ``` ##### Sample code -The following sample performs an local business search with the query 'Coffee 98052'. To know more, refer to the [Azure Documentation on Bing Local Search](https://docs.microsoft.com/en-us/azure/cognitive-services/bing-local-business-search/) +The following sample performs an local business search with the query 'Coffee 98052'. To know more, refer to the [Azure Documentation on Bing Local Search](https://docs.microsoft.com/azure/cognitive-services/bing-local-business-search/) ```javascript const { LocalSearchClient } = require("@azure/cognitiveservices-localsearch"); diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/README.md b/sdk/cognitiveservices/cognitiveservices-luis-authoring/README.md index 73d1087aeca6..7c5bfb93e503 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/README.md +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/README.md @@ -38,7 +38,7 @@ let authoringKey = process.env["luis-authoring-key"]; const creds = new CognitiveServicesCredentials(authoringKey); // check the following link to find your region -// https://docs.microsoft.com/en-us/azure/cognitive-services/luis/luis-reference-regions +// https://docs.microsoft.com/azure/cognitive-services/luis/luis-reference-regions const region = ""; const client = new LUISAuthoringClient( creds, diff --git a/sdk/cognitiveservices/cognitiveservices-luis-runtime/README.md b/sdk/cognitiveservices/cognitiveservices-luis-runtime/README.md index 79401dd898b8..9e49103ae3a1 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-runtime/README.md +++ b/sdk/cognitiveservices/cognitiveservices-luis-runtime/README.md @@ -33,7 +33,7 @@ let authoringKey = process.env["luis-authoring-key"]; const creds = new CognitiveServicesCredentials(authoringKey); // check the following link to find your region -// https://docs.microsoft.com/en-us/azure/cognitive-services/luis/luis-reference-regions +// https://docs.microsoft.com/azure/cognitive-services/luis/luis-reference-regions const region = ""; const client = new LUISRuntimeClient(creds, "https://" + region + ".api.cognitive.microsoft.com/"); @@ -103,7 +103,7 @@ client.prediction // check the following link to find your region - // https://docs.microsoft.com/en-us/azure/cognitive-services/luis/luis-reference-regions + // https://docs.microsoft.com/azure/cognitive-services/luis/luis-reference-regions const region = ""; const client = new Azure.CognitiveservicesLuisRuntime.LUISRuntimeClient( creds, diff --git a/sdk/cognitiveservices/cognitiveservices-newssearch/README.md b/sdk/cognitiveservices/cognitiveservices-newssearch/README.md index edfd67088a2b..4fdb76150b9f 100644 --- a/sdk/cognitiveservices/cognitiveservices-newssearch/README.md +++ b/sdk/cognitiveservices/cognitiveservices-newssearch/README.md @@ -24,7 +24,7 @@ npm install @azure/ms-rest-azure-js ``` ##### Sample code -The following sample performs a news search on 'Microsoft Azure' with conditions such as the freshness must be within a Month, etc. To know more, refer to the [Azure Documentation on Bing News Search](https://docs.microsoft.com/en-us/azure/cognitive-services/bing-news-search/) +The following sample performs a news search on 'Microsoft Azure' with conditions such as the freshness must be within a Month, etc. To know more, refer to the [Azure Documentation on Bing News Search](https://docs.microsoft.com/azure/cognitive-services/bing-news-search/) ```javascript const { NewsSearchClient } = require("@azure/cognitiveservices-newssearch"); diff --git a/sdk/cognitiveservices/cognitiveservices-personalizer/README.md b/sdk/cognitiveservices/cognitiveservices-personalizer/README.md index 751a43fe9d7e..f96361cdb7d1 100644 --- a/sdk/cognitiveservices/cognitiveservices-personalizer/README.md +++ b/sdk/cognitiveservices/cognitiveservices-personalizer/README.md @@ -24,7 +24,7 @@ npm install @azure/ms-rest-azure-js ``` ##### Sample code -The following sample ranks a personalized request object. To know more, refer to the [Azure Documentation on Personalizer](https://docs.microsoft.com/en-us/azure/cognitive-services/personalizer/) +The following sample ranks a personalized request object. To know more, refer to the [Azure Documentation on Personalizer](https://docs.microsoft.com/azure/cognitive-services/personalizer/) ```javascript const { PersonalizerClient } = require("@azure/cognitiveservices-personalizer"); diff --git a/sdk/cognitiveservices/cognitiveservices-qnamaker/package.json b/sdk/cognitiveservices/cognitiveservices-qnamaker/package.json index 9047c9c65574..5c61d45ba5b8 100644 --- a/sdk/cognitiveservices/cognitiveservices-qnamaker/package.json +++ b/sdk/cognitiveservices/cognitiveservices-qnamaker/package.json @@ -2,7 +2,7 @@ "name": "@azure/cognitiveservices-qnamaker", "author": "Microsoft Corporation", "description": "QnAMakerClient Library with typescript type definitions for node.js and browser.", - "version": "3.1.1", + "version": "4.0.0", "dependencies": { "@azure/ms-rest-js": "^2.0.4", "tslib": "^1.10.0" diff --git a/sdk/cognitiveservices/cognitiveservices-qnamaker/src/models/index.ts b/sdk/cognitiveservices/cognitiveservices-qnamaker/src/models/index.ts index a8899db2a92b..fb8ebf4aafaa 100644 --- a/sdk/cognitiveservices/cognitiveservices-qnamaker/src/models/index.ts +++ b/sdk/cognitiveservices/cognitiveservices-qnamaker/src/models/index.ts @@ -69,6 +69,10 @@ export interface UpdateKbContentsDTO { * List of existing URLs to be refreshed. The content will be extracted again and re-indexed. */ urls?: string[]; + /** + * Default answer sent to user if no good match is found in the KB. + */ + defaultAnswer?: string; } /** @@ -245,6 +249,10 @@ export interface QnADTO { * Context of a QnA */ context?: QnADTOContext; + /** + * Timestamp when the QnA was last updated. + */ + lastUpdatedTimestamp?: string; } /** @@ -353,9 +361,18 @@ export interface CreateKbDTO { */ defaultAnswerUsedForExtraction?: string; /** - * Language of the knowledgebase. + * Language of the knowledgebase. Please find the list of supported languages here. */ language?: string; + /** + * Set to true to enable creating KBs in different languages for the same resource. + */ + enableMultipleLanguages?: boolean; + /** + * Default answer sent to user if no good match is found in the KB. + */ + defaultAnswer?: string; } /** @@ -590,6 +607,225 @@ export interface EndpointKeysDTO { language?: string; } +/** + * Context object with previous QnA's information. + */ +export interface QueryContextDTO { + /** + * Previous QnA Id - qnaId of the top result. + */ + previousQnaId?: number; + /** + * Previous user query. + */ + previousUserQuery?: string; +} + +/** + * Context object with previous QnA's information. + */ +export interface QueryDTOContext extends QueryContextDTO { +} + +/** + * To configure Answer span prediction feature. + */ +export interface AnswerSpanRequestDTO { + /** + * Enable or Disable Answer Span prediction. + */ + enable?: boolean; + /** + * Minimum threshold score required to include an answer span. + */ + scoreThreshold?: number; + /** + * Number of Top answers to be considered for span prediction. + */ + topAnswersWithSpan?: number; +} + +/** + * To configure Answer span prediction feature. + */ +export interface QueryDTOAnswerSpanRequest extends AnswerSpanRequestDTO { +} + +/** + * POST body schema to query the knowledgebase. + */ +export interface QueryDTO { + /** + * Exact qnaId to fetch from the knowledgebase, this field takes priority over question. + */ + qnaId?: string; + /** + * User question to query against the knowledge base. + */ + question?: string; + /** + * Max number of answers to be returned for the question. + */ + top?: number; + /** + * Unique identifier for the user. + */ + userId?: string; + /** + * Query against the test index. + */ + isTest?: boolean; + /** + * Minimum threshold score for answers. + */ + scoreThreshold?: number; + /** + * Context object with previous QnA's information. + */ + context?: QueryDTOContext; + /** + * Optional field. Set to 'QuestionOnly' for using a question only Ranker. + */ + rankerType?: string; + /** + * Find QnAs that are associated with the given list of metadata. + */ + strictFilters?: MetadataDTO[]; + /** + * Optional field. Set to 'OR' for using OR operation for strict filters. Possible values + * include: 'AND', 'OR' + */ + strictFiltersCompoundOperationType?: StrictFiltersCompoundOperationType; + /** + * To configure Answer span prediction feature. + */ + answerSpanRequest?: QueryDTOAnswerSpanRequest; +} + +/** + * Context object of the QnA + */ +export interface QnASearchResultContext extends ContextDTO { +} + +/** + * Answer span object of QnA. + */ +export interface AnswerSpanResponseDTO { + /** + * Predicted text of answer span. + */ + text?: string; + /** + * Predicted score of answer span. + */ + score?: number; + /** + * Start index of answer span in answer. + */ + startIndex?: number; + /** + * End index of answer span in answer. + */ + endIndex?: number; +} + +/** + * Answer span object of QnA with respect to user's question. + */ +export interface QnASearchResultAnswerSpan extends AnswerSpanResponseDTO { +} + +/** + * Represents Search Result. + */ +export interface QnASearchResult { + /** + * List of questions. + */ + questions?: string[]; + /** + * Answer. + */ + answer?: string; + /** + * Search result score. + */ + score?: number; + /** + * Id of the QnA result. + */ + id?: number; + /** + * Source of QnA result. + */ + source?: string; + /** + * List of metadata. + */ + metadata?: MetadataDTO[]; + /** + * Context object of the QnA + */ + context?: QnASearchResultContext; + /** + * Answer span object of QnA with respect to user's question. + */ + answerSpan?: QnASearchResultAnswerSpan; +} + +/** + * Represents List of Question Answers. + */ +export interface QnASearchResultList { + /** + * Represents Search Result list. + */ + answers?: QnASearchResult[]; +} + +/** + * Active learning feedback record. + */ +export interface FeedbackRecordDTO { + /** + * Unique identifier for the user. + */ + userId?: string; + /** + * The suggested question being provided as feedback. + */ + userQuestion?: string; + /** + * The qnaId for which the suggested question is provided as feedback. + */ + qnaId?: number; +} + +/** + * Active learning feedback records. + */ +export interface FeedbackRecordsDTO { + /** + * List of feedback records. + */ + feedbackRecords?: FeedbackRecordDTO[]; +} + +/** + * Optional Parameters. + */ +export interface KnowledgebaseDownloadOptionalParams extends msRest.RequestOptionsBase { + /** + * The source property filter to apply. + */ + source?: string; + /** + * The last changed status property filter to apply. + */ + changedSince?: string; +} + /** * Defines headers for GetDetails operation. */ @@ -630,6 +866,14 @@ export type ErrorCodeType = 'BadArgument' | 'Forbidden' | 'NotFound' | 'KbNotFou */ export type OperationStateType = 'Failed' | 'NotStarted' | 'Running' | 'Succeeded'; +/** + * Defines values for StrictFiltersCompoundOperationType. + * Possible values include: 'AND', 'OR' + * @readonly + * @enum {string} + */ +export type StrictFiltersCompoundOperationType = 'AND' | 'OR'; + /** * Defines values for EnvironmentType. * Possible values include: 'Prod', 'Test' @@ -659,14 +903,9 @@ export type EndpointSettingsGetSettingsResponse = EndpointSettingsDTO & { }; /** - * Contains response data for the updateSettings operation. + * Contains response data for the getKeys operation. */ -export type EndpointSettingsUpdateSettingsResponse = { - /** - * The parsed response body. - */ - body: string; - +export type EndpointKeysGetKeysResponse = EndpointKeysDTO & { /** * The underlying HTTP response. */ @@ -679,14 +918,14 @@ export type EndpointSettingsUpdateSettingsResponse = { /** * The response body as parsed JSON or XML */ - parsedBody: string; + parsedBody: EndpointKeysDTO; }; }; /** - * Contains response data for the getKeys operation. + * Contains response data for the refreshKeys operation. */ -export type EndpointKeysGetKeysResponse = EndpointKeysDTO & { +export type EndpointKeysRefreshKeysResponse = EndpointKeysDTO & { /** * The underlying HTTP response. */ @@ -704,9 +943,9 @@ export type EndpointKeysGetKeysResponse = EndpointKeysDTO & { }; /** - * Contains response data for the refreshKeys operation. + * Contains response data for the get operation. */ -export type EndpointKeysRefreshKeysResponse = EndpointKeysDTO & { +export type AlterationsGetResponse = WordAlterationsDTO & { /** * The underlying HTTP response. */ @@ -719,14 +958,14 @@ export type EndpointKeysRefreshKeysResponse = EndpointKeysDTO & { /** * The response body as parsed JSON or XML */ - parsedBody: EndpointKeysDTO; + parsedBody: WordAlterationsDTO; }; }; /** - * Contains response data for the get operation. + * Contains response data for the getAlterationsForKb operation. */ -export type AlterationsGetResponse = WordAlterationsDTO & { +export type AlterationsGetAlterationsForKbResponse = WordAlterationsDTO & { /** * The underlying HTTP response. */ @@ -848,6 +1087,26 @@ export type KnowledgebaseDownloadResponse = QnADocumentsDTO & { }; }; +/** + * Contains response data for the generateAnswer operation. + */ +export type KnowledgebaseGenerateAnswerResponse = QnASearchResultList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: QnASearchResultList; + }; +}; + /** * Contains response data for the getDetails operation. */ diff --git a/sdk/cognitiveservices/cognitiveservices-qnamaker/src/models/knowledgebaseMappers.ts b/sdk/cognitiveservices/cognitiveservices-qnamaker/src/models/knowledgebaseMappers.ts index 3efb527bf69a..720fade307f8 100644 --- a/sdk/cognitiveservices/cognitiveservices-qnamaker/src/models/knowledgebaseMappers.ts +++ b/sdk/cognitiveservices/cognitiveservices-qnamaker/src/models/knowledgebaseMappers.ts @@ -7,6 +7,8 @@ */ export { + AnswerSpanRequestDTO, + AnswerSpanResponseDTO, ContextDTO, CreateKbDTO, CreateKbInputDTO, @@ -14,6 +16,8 @@ export { ErrorModel, ErrorResponse, ErrorResponseError, + FeedbackRecordDTO, + FeedbackRecordsDTO, FileDTO, InnerErrorModel, KnowledgebaseDTO, @@ -26,6 +30,14 @@ export { QnADocumentsDTO, QnADTO, QnADTOContext, + QnASearchResult, + QnASearchResultAnswerSpan, + QnASearchResultContext, + QnASearchResultList, + QueryContextDTO, + QueryDTO, + QueryDTOAnswerSpanRequest, + QueryDTOContext, ReplaceKbDTO, UpdateContextDTO, UpdateKbContentsDTO, diff --git a/sdk/cognitiveservices/cognitiveservices-qnamaker/src/models/mappers.ts b/sdk/cognitiveservices/cognitiveservices-qnamaker/src/models/mappers.ts index 6322d37f7e6a..00ded8ef31cd 100644 --- a/sdk/cognitiveservices/cognitiveservices-qnamaker/src/models/mappers.ts +++ b/sdk/cognitiveservices/cognitiveservices-qnamaker/src/models/mappers.ts @@ -142,6 +142,16 @@ export const UpdateKbContentsDTO: msRest.CompositeMapper = { } } } + }, + defaultAnswer: { + serializedName: "defaultAnswer", + constraints: { + MaxLength: 300, + MinLength: 1 + }, + type: { + name: "String" + } } } } @@ -493,6 +503,15 @@ export const QnADTO: msRest.CompositeMapper = { name: "Composite", className: "QnADTOContext" } + }, + lastUpdatedTimestamp: { + serializedName: "lastUpdatedTimestamp", + constraints: { + MaxLength: 300 + }, + type: { + name: "String" + } } } } @@ -716,6 +735,22 @@ export const CreateKbDTO: msRest.CompositeMapper = { type: { name: "String" } + }, + enableMultipleLanguages: { + serializedName: "enableMultipleLanguages", + type: { + name: "Boolean" + } + }, + defaultAnswer: { + serializedName: "defaultAnswer", + constraints: { + MaxLength: 300, + MinLength: 1 + }, + type: { + name: "String" + } } } } @@ -1121,6 +1156,368 @@ export const EndpointKeysDTO: msRest.CompositeMapper = { } }; +export const QueryContextDTO: msRest.CompositeMapper = { + serializedName: "QueryContextDTO", + type: { + name: "Composite", + className: "QueryContextDTO", + modelProperties: { + previousQnaId: { + serializedName: "previousQnaId", + type: { + name: "Number" + } + }, + previousUserQuery: { + serializedName: "previousUserQuery", + type: { + name: "String" + } + } + } + } +}; + +export const QueryDTOContext: msRest.CompositeMapper = { + serializedName: "QueryDTO_context", + type: { + name: "Composite", + className: "QueryDTOContext", + modelProperties: { + ...QueryContextDTO.type.modelProperties + } + } +}; + +export const AnswerSpanRequestDTO: msRest.CompositeMapper = { + serializedName: "AnswerSpanRequestDTO", + type: { + name: "Composite", + className: "AnswerSpanRequestDTO", + modelProperties: { + enable: { + serializedName: "enable", + type: { + name: "Boolean" + } + }, + scoreThreshold: { + serializedName: "scoreThreshold", + type: { + name: "Number" + } + }, + topAnswersWithSpan: { + serializedName: "topAnswersWithSpan", + constraints: { + InclusiveMaximum: 10, + InclusiveMinimum: 1 + }, + type: { + name: "Number" + } + } + } + } +}; + +export const QueryDTOAnswerSpanRequest: msRest.CompositeMapper = { + serializedName: "QueryDTO_answerSpanRequest", + type: { + name: "Composite", + className: "QueryDTOAnswerSpanRequest", + modelProperties: { + ...AnswerSpanRequestDTO.type.modelProperties + } + } +}; + +export const QueryDTO: msRest.CompositeMapper = { + serializedName: "QueryDTO", + type: { + name: "Composite", + className: "QueryDTO", + modelProperties: { + qnaId: { + serializedName: "qnaId", + type: { + name: "String" + } + }, + question: { + serializedName: "question", + type: { + name: "String" + } + }, + top: { + serializedName: "top", + type: { + name: "Number" + } + }, + userId: { + serializedName: "userId", + type: { + name: "String" + } + }, + isTest: { + serializedName: "isTest", + type: { + name: "Boolean" + } + }, + scoreThreshold: { + serializedName: "scoreThreshold", + type: { + name: "Number" + } + }, + context: { + serializedName: "context", + type: { + name: "Composite", + className: "QueryDTOContext" + } + }, + rankerType: { + serializedName: "rankerType", + type: { + name: "String" + } + }, + strictFilters: { + serializedName: "strictFilters", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MetadataDTO" + } + } + } + }, + strictFiltersCompoundOperationType: { + serializedName: "strictFiltersCompoundOperationType", + type: { + name: "String" + } + }, + answerSpanRequest: { + serializedName: "answerSpanRequest", + type: { + name: "Composite", + className: "QueryDTOAnswerSpanRequest" + } + } + } + } +}; + +export const QnASearchResultContext: msRest.CompositeMapper = { + serializedName: "QnASearchResult_context", + type: { + name: "Composite", + className: "QnASearchResultContext", + modelProperties: { + ...ContextDTO.type.modelProperties + } + } +}; + +export const AnswerSpanResponseDTO: msRest.CompositeMapper = { + serializedName: "AnswerSpanResponseDTO", + type: { + name: "Composite", + className: "AnswerSpanResponseDTO", + modelProperties: { + text: { + serializedName: "text", + type: { + name: "String" + } + }, + score: { + serializedName: "score", + type: { + name: "Number" + } + }, + startIndex: { + serializedName: "startIndex", + type: { + name: "Number" + } + }, + endIndex: { + serializedName: "endIndex", + type: { + name: "Number" + } + } + } + } +}; + +export const QnASearchResultAnswerSpan: msRest.CompositeMapper = { + serializedName: "QnASearchResult_answerSpan", + type: { + name: "Composite", + className: "QnASearchResultAnswerSpan", + modelProperties: { + ...AnswerSpanResponseDTO.type.modelProperties + } + } +}; + +export const QnASearchResult: msRest.CompositeMapper = { + serializedName: "QnASearchResult", + type: { + name: "Composite", + className: "QnASearchResult", + modelProperties: { + questions: { + serializedName: "questions", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + answer: { + serializedName: "answer", + type: { + name: "String" + } + }, + score: { + serializedName: "score", + type: { + name: "Number" + } + }, + id: { + serializedName: "id", + type: { + name: "Number" + } + }, + source: { + serializedName: "source", + type: { + name: "String" + } + }, + metadata: { + serializedName: "metadata", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MetadataDTO" + } + } + } + }, + context: { + serializedName: "context", + type: { + name: "Composite", + className: "QnASearchResultContext" + } + }, + answerSpan: { + serializedName: "answerSpan", + type: { + name: "Composite", + className: "QnASearchResultAnswerSpan" + } + } + } + } +}; + +export const QnASearchResultList: msRest.CompositeMapper = { + serializedName: "QnASearchResultList", + type: { + name: "Composite", + className: "QnASearchResultList", + modelProperties: { + answers: { + serializedName: "answers", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "QnASearchResult" + } + } + } + } + } + } +}; + +export const FeedbackRecordDTO: msRest.CompositeMapper = { + serializedName: "FeedbackRecordDTO", + type: { + name: "Composite", + className: "FeedbackRecordDTO", + modelProperties: { + userId: { + serializedName: "userId", + type: { + name: "String" + } + }, + userQuestion: { + serializedName: "userQuestion", + constraints: { + MaxLength: 1000 + }, + type: { + name: "String" + } + }, + qnaId: { + serializedName: "qnaId", + type: { + name: "Number" + } + } + } + } +}; + +export const FeedbackRecordsDTO: msRest.CompositeMapper = { + serializedName: "FeedbackRecordsDTO", + type: { + name: "Composite", + className: "FeedbackRecordsDTO", + modelProperties: { + feedbackRecords: { + serializedName: "feedbackRecords", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "FeedbackRecordDTO" + } + } + } + } + } + } +}; + export const OperationsGetDetailsHeaders: msRest.CompositeMapper = { serializedName: "operations-getdetails-headers", type: { diff --git a/sdk/cognitiveservices/cognitiveservices-qnamaker/src/models/parameters.ts b/sdk/cognitiveservices/cognitiveservices-qnamaker/src/models/parameters.ts index a9c7055c493d..6030e4432a1e 100644 --- a/sdk/cognitiveservices/cognitiveservices-qnamaker/src/models/parameters.ts +++ b/sdk/cognitiveservices/cognitiveservices-qnamaker/src/models/parameters.ts @@ -10,6 +10,18 @@ import * as msRest from "@azure/ms-rest-js"; +export const changedSince: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "changedSince" + ], + mapper: { + serializedName: "changedSince", + type: { + name: "String" + } + } +}; export const endpoint: msRest.OperationURLParameter = { parameterPath: "endpoint", mapper: { @@ -62,3 +74,15 @@ export const operationId: msRest.OperationURLParameter = { } } }; +export const source: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "source" + ], + mapper: { + serializedName: "source", + type: { + name: "String" + } + } +}; diff --git a/sdk/cognitiveservices/cognitiveservices-qnamaker/src/operations/alterations.ts b/sdk/cognitiveservices/cognitiveservices-qnamaker/src/operations/alterations.ts index c7a6cef44ae3..19f9d2691467 100644 --- a/sdk/cognitiveservices/cognitiveservices-qnamaker/src/operations/alterations.ts +++ b/sdk/cognitiveservices/cognitiveservices-qnamaker/src/operations/alterations.ts @@ -77,6 +77,66 @@ export class Alterations { replaceOperationSpec, callback); } + + /** + * @summary Download alterations per Knowledgebase (QnAMaker Managed). + * @param kbId Knowledgebase id. + * @param [options] The optional parameters + * @returns Promise + */ + getAlterationsForKb(kbId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param kbId Knowledgebase id. + * @param callback The callback + */ + getAlterationsForKb(kbId: string, callback: msRest.ServiceCallback): void; + /** + * @param kbId Knowledgebase id. + * @param options The optional parameters + * @param callback The callback + */ + getAlterationsForKb(kbId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getAlterationsForKb(kbId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + kbId, + options + }, + getAlterationsForKbOperationSpec, + callback) as Promise; + } + + /** + * @summary Replace alterations data per Knowledgebase (QnAMaker Managed). + * @param kbId Knowledgebase id. + * @param wordAlterations New alterations data. + * @param [options] The optional parameters + * @returns Promise + */ + replaceAlterationsForKb(kbId: string, wordAlterations: Models.WordAlterationsDTO, options?: msRest.RequestOptionsBase): Promise; + /** + * @param kbId Knowledgebase id. + * @param wordAlterations New alterations data. + * @param callback The callback + */ + replaceAlterationsForKb(kbId: string, wordAlterations: Models.WordAlterationsDTO, callback: msRest.ServiceCallback): void; + /** + * @param kbId Knowledgebase id. + * @param wordAlterations New alterations data. + * @param options The optional parameters + * @param callback The callback + */ + replaceAlterationsForKb(kbId: string, wordAlterations: Models.WordAlterationsDTO, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + replaceAlterationsForKb(kbId: string, wordAlterations: Models.WordAlterationsDTO, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + kbId, + wordAlterations, + options + }, + replaceAlterationsForKbOperationSpec, + callback); + } } // Operation Specifications @@ -119,3 +179,44 @@ const replaceOperationSpec: msRest.OperationSpec = { }, serializer }; + +const getAlterationsForKbOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "alterations/{kbId}", + urlParameters: [ + Parameters.endpoint, + Parameters.kbId + ], + responses: { + 200: { + bodyMapper: Mappers.WordAlterationsDTO + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const replaceAlterationsForKbOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "alterations/{kbId}", + urlParameters: [ + Parameters.endpoint, + Parameters.kbId + ], + requestBody: { + parameterPath: "wordAlterations", + mapper: { + ...Mappers.WordAlterationsDTO, + required: true + } + }, + responses: { + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/cognitiveservices/cognitiveservices-qnamaker/src/operations/endpointSettings.ts b/sdk/cognitiveservices/cognitiveservices-qnamaker/src/operations/endpointSettings.ts index 9b21f50dbcdf..bd092c5dd289 100644 --- a/sdk/cognitiveservices/cognitiveservices-qnamaker/src/operations/endpointSettings.ts +++ b/sdk/cognitiveservices/cognitiveservices-qnamaker/src/operations/endpointSettings.ts @@ -54,28 +54,28 @@ export class EndpointSettings { * @summary Updates endpoint settings for an endpoint. * @param endpointSettingsPayload Post body of the request. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - updateSettings(endpointSettingsPayload: Models.EndpointSettingsDTO, options?: msRest.RequestOptionsBase): Promise; + updateSettings(endpointSettingsPayload: Models.EndpointSettingsDTO, options?: msRest.RequestOptionsBase): Promise; /** * @param endpointSettingsPayload Post body of the request. * @param callback The callback */ - updateSettings(endpointSettingsPayload: Models.EndpointSettingsDTO, callback: msRest.ServiceCallback): void; + updateSettings(endpointSettingsPayload: Models.EndpointSettingsDTO, callback: msRest.ServiceCallback): void; /** * @param endpointSettingsPayload Post body of the request. * @param options The optional parameters * @param callback The callback */ - updateSettings(endpointSettingsPayload: Models.EndpointSettingsDTO, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - updateSettings(endpointSettingsPayload: Models.EndpointSettingsDTO, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + updateSettings(endpointSettingsPayload: Models.EndpointSettingsDTO, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + updateSettings(endpointSettingsPayload: Models.EndpointSettingsDTO, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { endpointSettingsPayload, options }, updateSettingsOperationSpec, - callback) as Promise; + callback); } } @@ -112,14 +112,7 @@ const updateSettingsOperationSpec: msRest.OperationSpec = { } }, responses: { - 200: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "String" - } - } - }, + 204: {}, default: { bodyMapper: Mappers.ErrorResponse } diff --git a/sdk/cognitiveservices/cognitiveservices-qnamaker/src/operations/knowledgebase.ts b/sdk/cognitiveservices/cognitiveservices-qnamaker/src/operations/knowledgebase.ts index f51df77ef345..7d9c688930d2 100644 --- a/sdk/cognitiveservices/cognitiveservices-qnamaker/src/operations/knowledgebase.ts +++ b/sdk/cognitiveservices/cognitiveservices-qnamaker/src/operations/knowledgebase.ts @@ -234,7 +234,7 @@ export class Knowledgebase { * @param [options] The optional parameters * @returns Promise */ - download(kbId: string, environment: Models.EnvironmentType, options?: msRest.RequestOptionsBase): Promise; + download(kbId: string, environment: Models.EnvironmentType, options?: Models.KnowledgebaseDownloadOptionalParams): Promise; /** * @param kbId Knowledgebase id. * @param environment Specifies whether environment is Test or Prod. Possible values include: @@ -249,8 +249,8 @@ export class Knowledgebase { * @param options The optional parameters * @param callback The callback */ - download(kbId: string, environment: Models.EnvironmentType, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - download(kbId: string, environment: Models.EnvironmentType, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + download(kbId: string, environment: Models.EnvironmentType, options: Models.KnowledgebaseDownloadOptionalParams, callback: msRest.ServiceCallback): void; + download(kbId: string, environment: Models.EnvironmentType, options?: Models.KnowledgebaseDownloadOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { kbId, @@ -260,6 +260,70 @@ export class Knowledgebase { downloadOperationSpec, callback) as Promise; } + + /** + * @summary GenerateAnswer call to query knowledgebase (QnA Maker Managed). + * @param kbId Knowledgebase id. + * @param generateAnswerPayload Post body of the request. + * @param [options] The optional parameters + * @returns Promise + */ + generateAnswer(kbId: string, generateAnswerPayload: Models.QueryDTO, options?: msRest.RequestOptionsBase): Promise; + /** + * @param kbId Knowledgebase id. + * @param generateAnswerPayload Post body of the request. + * @param callback The callback + */ + generateAnswer(kbId: string, generateAnswerPayload: Models.QueryDTO, callback: msRest.ServiceCallback): void; + /** + * @param kbId Knowledgebase id. + * @param generateAnswerPayload Post body of the request. + * @param options The optional parameters + * @param callback The callback + */ + generateAnswer(kbId: string, generateAnswerPayload: Models.QueryDTO, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + generateAnswer(kbId: string, generateAnswerPayload: Models.QueryDTO, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + kbId, + generateAnswerPayload, + options + }, + generateAnswerOperationSpec, + callback) as Promise; + } + + /** + * @summary Train call to add suggestions to knowledgebase (QnAMaker Managed). + * @param kbId Knowledgebase id. + * @param trainPayload Post body of the request. + * @param [options] The optional parameters + * @returns Promise + */ + train(kbId: string, trainPayload: Models.FeedbackRecordsDTO, options?: msRest.RequestOptionsBase): Promise; + /** + * @param kbId Knowledgebase id. + * @param trainPayload Post body of the request. + * @param callback The callback + */ + train(kbId: string, trainPayload: Models.FeedbackRecordsDTO, callback: msRest.ServiceCallback): void; + /** + * @param kbId Knowledgebase id. + * @param trainPayload Post body of the request. + * @param options The optional parameters + * @param callback The callback + */ + train(kbId: string, trainPayload: Models.FeedbackRecordsDTO, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + train(kbId: string, trainPayload: Models.FeedbackRecordsDTO, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + kbId, + trainPayload, + options + }, + trainOperationSpec, + callback); + } } // Operation Specifications @@ -374,8 +438,7 @@ const updateOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.KnowledgebaseUpdateHeaders }, default: { - bodyMapper: Mappers.ErrorResponse, - headersMapper: Mappers.KnowledgebaseUpdateHeaders + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -413,6 +476,10 @@ const downloadOperationSpec: msRest.OperationSpec = { Parameters.kbId, Parameters.environment ], + queryParameters: [ + Parameters.source, + Parameters.changedSince + ], responses: { 200: { bodyMapper: Mappers.QnADocumentsDTO @@ -423,3 +490,51 @@ const downloadOperationSpec: msRest.OperationSpec = { }, serializer }; + +const generateAnswerOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "knowledgebases/{kbId}/generateAnswer", + urlParameters: [ + Parameters.endpoint, + Parameters.kbId + ], + requestBody: { + parameterPath: "generateAnswerPayload", + mapper: { + ...Mappers.QueryDTO, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.QnASearchResultList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const trainOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "knowledgebases/{kbId}/train", + urlParameters: [ + Parameters.endpoint, + Parameters.kbId + ], + requestBody: { + parameterPath: "trainPayload", + mapper: { + ...Mappers.FeedbackRecordsDTO, + required: true + } + }, + responses: { + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/cognitiveservices/cognitiveservices-qnamaker/src/operations/operations.ts b/sdk/cognitiveservices/cognitiveservices-qnamaker/src/operations/operations.ts index d87b07af05c8..09769c778f8e 100644 --- a/sdk/cognitiveservices/cognitiveservices-qnamaker/src/operations/operations.ts +++ b/sdk/cognitiveservices/cognitiveservices-qnamaker/src/operations/operations.ts @@ -70,8 +70,7 @@ const getDetailsOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.OperationsGetDetailsHeaders }, default: { - bodyMapper: Mappers.ErrorResponse, - headersMapper: Mappers.OperationsGetDetailsHeaders + bodyMapper: Mappers.ErrorResponse } }, serializer diff --git a/sdk/cognitiveservices/cognitiveservices-qnamaker/src/qnAMakerClient.ts b/sdk/cognitiveservices/cognitiveservices-qnamaker/src/qnAMakerClient.ts index bf1194ce9e10..841765040e39 100644 --- a/sdk/cognitiveservices/cognitiveservices-qnamaker/src/qnAMakerClient.ts +++ b/sdk/cognitiveservices/cognitiveservices-qnamaker/src/qnAMakerClient.ts @@ -24,8 +24,8 @@ class QnAMakerClient extends QnAMakerClientContext { /** * Initializes a new instance of the QnAMakerClient class. - * @param endpoint Supported Cognitive Services endpoints (protocol and hostname, for example: - * https://westus.api.cognitive.microsoft.com). + * @param endpoint Supported Cognitive Services endpoint (e.g., https://< qnamaker-resource-name + * >.api.cognitiveservices.azure.com). * @param credentials Subscription credentials which uniquely identify client subscription. * @param [options] The parameter options */ diff --git a/sdk/cognitiveservices/cognitiveservices-qnamaker/src/qnAMakerClientContext.ts b/sdk/cognitiveservices/cognitiveservices-qnamaker/src/qnAMakerClientContext.ts index 223a50238000..06f756bdace0 100644 --- a/sdk/cognitiveservices/cognitiveservices-qnamaker/src/qnAMakerClientContext.ts +++ b/sdk/cognitiveservices/cognitiveservices-qnamaker/src/qnAMakerClientContext.ts @@ -11,7 +11,7 @@ import * as msRest from "@azure/ms-rest-js"; const packageName = "@azure/cognitiveservices-qnamaker"; -const packageVersion = "3.1.1"; +const packageVersion = "4.0.0"; export class QnAMakerClientContext extends msRest.ServiceClient { endpoint: string; @@ -19,8 +19,8 @@ export class QnAMakerClientContext extends msRest.ServiceClient { /** * Initializes a new instance of the QnAMakerClientContext class. - * @param endpoint Supported Cognitive Services endpoints (protocol and hostname, for example: - * https://westus.api.cognitive.microsoft.com). + * @param endpoint Supported Cognitive Services endpoint (e.g., https://< qnamaker-resource-name + * >.api.cognitiveservices.azure.com). * @param credentials Subscription credentials which uniquely identify client subscription. * @param [options] The parameter options */ @@ -43,7 +43,7 @@ export class QnAMakerClientContext extends msRest.ServiceClient { super(credentials, options); - this.baseUri = "{Endpoint}/qnamaker/v4.0"; + this.baseUri = "{Endpoint}/qnamaker/v5.0-preview.1"; this.requestContentType = "application/json; charset=utf-8"; this.endpoint = endpoint; this.credentials = credentials; diff --git a/sdk/cognitiveservices/cognitiveservices-qnamaker/swagger/readme.md b/sdk/cognitiveservices/cognitiveservices-qnamaker/swagger/readme.md index 50efa03db5ef..bfc9011e99ab 100644 --- a/sdk/cognitiveservices/cognitiveservices-qnamaker/swagger/readme.md +++ b/sdk/cognitiveservices/cognitiveservices-qnamaker/swagger/readme.md @@ -8,7 +8,7 @@ Configuration for generating QnAMaker SDK. add-credentials: true openapi-type: data-plane license-header: MICROSOFT_MIT_NO_VERSION -input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMaker.json +input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/cognitiveservices/data-plane/QnAMaker/preview/v5.0-preview.1/QnAMaker.json ``` ## TypeScript @@ -17,7 +17,7 @@ These settings apply only when `--typescript` is specified on the command line. ```yaml $(typescript) typescript: - package-version: 3.1.0 + package-version: 4.0.0 package-name: "@azure/cognitiveservices-qnamaker" output-folder: .. azure-arm: false diff --git a/sdk/cognitiveservices/cognitiveservices-spellcheck/README.md b/sdk/cognitiveservices/cognitiveservices-spellcheck/README.md index 2c03234aaf84..5d27845f565a 100644 --- a/sdk/cognitiveservices/cognitiveservices-spellcheck/README.md +++ b/sdk/cognitiveservices/cognitiveservices-spellcheck/README.md @@ -24,7 +24,7 @@ npm install @azure/ms-rest-azure-js ``` ##### Sample code -The following sample performs a spell check on the text - 'Bill Gatos'. The result will return a suggestion of 'Gates'. To know more, refer to the [Azure Documentation on Spell Check](https://docs.microsoft.com/en-us/azure/cognitive-services/bing-spell-check/) +The following sample performs a spell check on the text - 'Bill Gatos'. The result will return a suggestion of 'Gates'. To know more, refer to the [Azure Documentation on Spell Check](https://docs.microsoft.com/azure/cognitive-services/bing-spell-check/) ```javascript const { SpellCheckClient } = require("@azure/cognitiveservices-spellcheck"); diff --git a/sdk/cognitiveservices/cognitiveservices-textanalytics/README.md b/sdk/cognitiveservices/cognitiveservices-textanalytics/README.md index 5420a1c3de5d..905442972f0d 100644 --- a/sdk/cognitiveservices/cognitiveservices-textanalytics/README.md +++ b/sdk/cognitiveservices/cognitiveservices-textanalytics/README.md @@ -24,7 +24,7 @@ npm install @azure/ms-rest-azure-js ``` ##### Sample code -The following sample detects the langauge in the provided text. In addition, it provides data such as Characters count, transaction count, etc. To know more, refer to the [Azure Documentation on Text Analytics](https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/overview) +The following sample detects the langauge in the provided text. In addition, it provides data such as Characters count, transaction count, etc. To know more, refer to the [Azure Documentation on Text Analytics](https://docs.microsoft.com/azure/cognitive-services/text-analytics/overview) ```javascript const { TextAnalyticsClient } = require("@azure/cognitiveservices-textanalytics"); diff --git a/sdk/cognitiveservices/cognitiveservices-translatortext/README.md b/sdk/cognitiveservices/cognitiveservices-translatortext/README.md index 4fa7533bb4bd..ca96ca922c45 100644 --- a/sdk/cognitiveservices/cognitiveservices-translatortext/README.md +++ b/sdk/cognitiveservices/cognitiveservices-translatortext/README.md @@ -24,7 +24,7 @@ npm install @azure/ms-rest-azure-js ``` ##### Sample code -The following sample translates the given text which is in Chinese to English. To know more, refer to the [Azure Documentation on Translator](https://docs.microsoft.com/en-us/azure/cognitive-services/translator/) +The following sample translates the given text which is in Chinese to English. To know more, refer to the [Azure Documentation on Translator](https://docs.microsoft.com/azure/cognitive-services/translator/) ```javascript const { TranslatorTextClient } = require("@azure/cognitiveservices-translatortext"); diff --git a/sdk/cognitiveservices/cognitiveservices-videosearch/README.md b/sdk/cognitiveservices/cognitiveservices-videosearch/README.md index dcd67e5871dd..443f4626ce92 100644 --- a/sdk/cognitiveservices/cognitiveservices-videosearch/README.md +++ b/sdk/cognitiveservices/cognitiveservices-videosearch/README.md @@ -24,7 +24,7 @@ npm install @azure/ms-rest-azure-js ``` ##### Sample code -The following sample performs a video search on 'Microsoft Azure' with conditions such as the length must be Short, pricing must be Free, etc. To know more, refer to the [Azure Documentation on Bing Video Search](https://docs.microsoft.com/en-us/azure/cognitive-services/bing-video-search/) +The following sample performs a video search on 'Microsoft Azure' with conditions such as the length must be Short, pricing must be Free, etc. To know more, refer to the [Azure Documentation on Bing Video Search](https://docs.microsoft.com/azure/cognitive-services/bing-video-search/) ```javascript const { VideoSearchClient } = require("@azure/cognitiveservices-videosearch"); diff --git a/sdk/cognitiveservices/cognitiveservices-visualsearch/README.md b/sdk/cognitiveservices/cognitiveservices-visualsearch/README.md index 95527ab6761e..a19902674acc 100644 --- a/sdk/cognitiveservices/cognitiveservices-visualsearch/README.md +++ b/sdk/cognitiveservices/cognitiveservices-visualsearch/README.md @@ -24,7 +24,7 @@ npm install @azure/ms-rest-azure-js ``` ##### Sample code -The following sample performs a visual search, i.e. perform a search with a image. To know more, refer to the [Azure Documentation on Bing Visual Search](https://docs.microsoft.com/en-us/azure/cognitive-services/bing-visual-search/). +The following sample performs a visual search, i.e. perform a search with a image. To know more, refer to the [Azure Documentation on Bing Visual Search](https://docs.microsoft.com/azure/cognitive-services/bing-visual-search/). ```javascript const { VisualSearchClient } = require("@azure/cognitiveservices-visualsearch"); diff --git a/sdk/cognitiveservices/cognitiveservices-websearch/README.md b/sdk/cognitiveservices/cognitiveservices-websearch/README.md index 7ff651d1d7a3..dcca110c07d1 100644 --- a/sdk/cognitiveservices/cognitiveservices-websearch/README.md +++ b/sdk/cognitiveservices/cognitiveservices-websearch/README.md @@ -24,7 +24,7 @@ npm install @azure/ms-rest-azure-js ``` ##### Sample code -The following sample performs a web search on the text 'Microsoft Azure'. To know more, refer to the [Azure Documentation on Bing Web Search](https://docs.microsoft.com/en-us/azure/cognitive-services/bing-web-search/) +The following sample performs a web search on the text 'Microsoft Azure'. To know more, refer to the [Azure Documentation on Bing Web Search](https://docs.microsoft.com/azure/cognitive-services/bing-web-search/) ```javascript const { WebSearchClient } = require("@azure/cognitiveservices-websearch"); diff --git a/sdk/communication/arm-communication/LICENSE.txt b/sdk/communication/arm-communication/LICENSE.txt new file mode 100644 index 000000000000..ea8fb1516028 --- /dev/null +++ b/sdk/communication/arm-communication/LICENSE.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2020 Microsoft + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/sdk/communication/arm-communication/README.md b/sdk/communication/arm-communication/README.md new file mode 100644 index 000000000000..66d1e07c2145 --- /dev/null +++ b/sdk/communication/arm-communication/README.md @@ -0,0 +1,99 @@ +## Azure CommunicationServiceManagementClient SDK for JavaScript + +This package contains an isomorphic SDK for CommunicationServiceManagementClient. + +### Currently supported environments + +- Node.js version 6.x.x or higher +- Browser JavaScript + +### How to Install + +```bash +npm install @azure/arm-communication +``` + +### How to use + +#### nodejs - Authentication, client creation and list operations as an example written in TypeScript. + +##### Install @azure/ms-rest-nodeauth + +- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. +```bash +npm install @azure/ms-rest-nodeauth@"^3.0.0" +``` + +##### Sample code + +```typescript +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; +import { CommunicationServiceManagementClient, CommunicationServiceManagementModels, CommunicationServiceManagementMappers } from "@azure/arm-communication"; +const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; + +msRestNodeAuth.interactiveLogin().then((creds) => { + const client = new CommunicationServiceManagementClient(creds, subscriptionId); + client.operations.list().then((result) => { + console.log("The result is:"); + console.log(result); + }); +}).catch((err) => { + console.error(err); +}); +``` + +#### browser - Authentication, client creation and list operations as an example written in JavaScript. + +##### Install @azure/ms-rest-browserauth + +```bash +npm install @azure/ms-rest-browserauth +``` + +##### Sample code + +See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. + +- index.html +```html + + + + @azure/arm-communication sample + + + + + + + + +``` + +## Related projects + +- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/communication/arm-communication/README.png) diff --git a/sdk/communication/arm-communication/package.json b/sdk/communication/arm-communication/package.json new file mode 100644 index 000000000000..926af70fcee0 --- /dev/null +++ b/sdk/communication/arm-communication/package.json @@ -0,0 +1,58 @@ +{ + "name": "@azure/arm-communication", + "author": "Microsoft Corporation", + "description": "CommunicationServiceManagementClient Library with typescript type definitions for node.js and browser.", + "version": "1.0.0", + "dependencies": { + "@azure/ms-rest-azure-js": "^2.0.1", + "@azure/ms-rest-js": "^2.0.4", + "tslib": "^1.10.0" + }, + "keywords": [ + "node", + "azure", + "typescript", + "browser", + "isomorphic" + ], + "license": "MIT", + "main": "./dist/arm-communication.js", + "module": "./esm/communicationServiceManagementClient.js", + "types": "./esm/communicationServiceManagementClient.d.ts", + "devDependencies": { + "typescript": "^3.5.3", + "rollup": "^1.18.0", + "rollup-plugin-node-resolve": "^5.2.0", + "rollup-plugin-sourcemaps": "^0.4.2", + "uglify-js": "^3.6.0" + }, + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/communication/arm-communication", + "repository": { + "type": "git", + "url": "https://github.com/Azure/azure-sdk-for-js.git" + }, + "bugs": { + "url": "https://github.com/Azure/azure-sdk-for-js/issues" + }, + "files": [ + "dist/**/*.js", + "dist/**/*.js.map", + "dist/**/*.d.ts", + "dist/**/*.d.ts.map", + "esm/**/*.js", + "esm/**/*.js.map", + "esm/**/*.d.ts", + "esm/**/*.d.ts.map", + "src/**/*.ts", + "README.md", + "rollup.config.js", + "tsconfig.json" + ], + "scripts": { + "build": "tsc && rollup -c rollup.config.js && npm run minify", + "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/arm-communication.js.map'\" -o ./dist/arm-communication.min.js ./dist/arm-communication.js", + "prepack": "npm install && npm run build" + }, + "sideEffects": false, + "autoPublish": true +} diff --git a/sdk/communication/arm-communication/rollup.config.js b/sdk/communication/arm-communication/rollup.config.js new file mode 100644 index 000000000000..0268bc1dad9a --- /dev/null +++ b/sdk/communication/arm-communication/rollup.config.js @@ -0,0 +1,37 @@ +import rollup from "rollup"; +import nodeResolve from "rollup-plugin-node-resolve"; +import sourcemaps from "rollup-plugin-sourcemaps"; + +/** + * @type {rollup.RollupFileOptions} + */ +const config = { + input: "./esm/communicationServiceManagementClient.js", + external: [ + "@azure/ms-rest-js", + "@azure/ms-rest-azure-js" + ], + output: { + file: "./dist/arm-communication.js", + format: "umd", + name: "Azure.ArmCommunication", + sourcemap: true, + globals: { + "@azure/ms-rest-js": "msRest", + "@azure/ms-rest-azure-js": "msRestAzure" + }, + banner: `/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */` + }, + plugins: [ + nodeResolve({ mainFields: ['module', 'main'] }), + sourcemaps() + ] +}; + +export default config; diff --git a/sdk/communication/arm-communication/src/communicationServiceManagementClient.ts b/sdk/communication/arm-communication/src/communicationServiceManagementClient.ts new file mode 100644 index 000000000000..f6bf852fb800 --- /dev/null +++ b/sdk/communication/arm-communication/src/communicationServiceManagementClient.ts @@ -0,0 +1,47 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * 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 * as msRest from "@azure/ms-rest-js"; +import * as Models from "./models"; +import * as Mappers from "./models/mappers"; +import * as operations from "./operations"; +import { CommunicationServiceManagementClientContext } from "./communicationServiceManagementClientContext"; + + +class CommunicationServiceManagementClient extends CommunicationServiceManagementClientContext { + // Operation groups + operations: operations.Operations; + communicationService: operations.CommunicationService; + operationStatuses: operations.OperationStatuses; + + /** + * Initializes a new instance of the CommunicationServiceManagementClient class. + * @param credentials Credentials needed for the client to connect to Azure. + * @param subscriptionId Gets subscription ID which uniquely identifies the Microsoft Azure + * subscription. The subscription ID forms part of the URI for every service call. + * @param [options] The parameter options + */ + constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.CommunicationServiceManagementClientOptions) { + super(credentials, subscriptionId, options); + this.operations = new operations.Operations(this); + this.communicationService = new operations.CommunicationService(this); + this.operationStatuses = new operations.OperationStatuses(this); + } +} + +// Operation Specifications + +export { + CommunicationServiceManagementClient, + CommunicationServiceManagementClientContext, + Models as CommunicationServiceManagementModels, + Mappers as CommunicationServiceManagementMappers +}; +export * from "./operations"; diff --git a/sdk/communication/arm-communication/src/communicationServiceManagementClientContext.ts b/sdk/communication/arm-communication/src/communicationServiceManagementClientContext.ts new file mode 100644 index 000000000000..5fc002a5a912 --- /dev/null +++ b/sdk/communication/arm-communication/src/communicationServiceManagementClientContext.ts @@ -0,0 +1,63 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * 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 * as Models from "./models"; +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; + +const packageName = "@azure/arm-communication"; +const packageVersion = "1.0.0"; + +export class CommunicationServiceManagementClientContext extends msRestAzure.AzureServiceClient { + credentials: msRest.ServiceClientCredentials; + apiVersion?: string; + subscriptionId: string; + + /** + * Initializes a new instance of the CommunicationServiceManagementClient class. + * @param credentials Credentials needed for the client to connect to Azure. + * @param subscriptionId Gets subscription ID which uniquely identifies the Microsoft Azure + * subscription. The subscription ID forms part of the URI for every service call. + * @param [options] The parameter options + */ + constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.CommunicationServiceManagementClientOptions) { + if (credentials == undefined) { + throw new Error('\'credentials\' cannot be null.'); + } + if (subscriptionId == undefined) { + throw new Error('\'subscriptionId\' cannot be null.'); + } + + if (!options) { + options = {}; + } + if(!options.userAgent) { + const defaultUserAgent = msRestAzure.getDefaultUserAgentValue(); + options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`; + } + + super(credentials, options); + + this.apiVersion = '2020-08-20-preview'; + this.acceptLanguage = 'en-US'; + this.longRunningOperationRetryTimeout = 30; + this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; + this.requestContentType = "application/json; charset=utf-8"; + this.credentials = credentials; + this.subscriptionId = subscriptionId; + + if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) { + this.acceptLanguage = options.acceptLanguage; + } + if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { + this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout; + } + } +} diff --git a/sdk/communication/arm-communication/src/models/communicationServiceMappers.ts b/sdk/communication/arm-communication/src/models/communicationServiceMappers.ts new file mode 100644 index 000000000000..9e29f790f0a9 --- /dev/null +++ b/sdk/communication/arm-communication/src/models/communicationServiceMappers.ts @@ -0,0 +1,21 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + CommunicationServiceCreateOrUpdateHeaders, + CommunicationServiceDeleteHeaders, + CommunicationServiceKeys, + CommunicationServiceResource, + CommunicationServiceResourceList, + ErrorResponse, + ErrorResponseError, + LinkedNotificationHub, + LinkNotificationHubParameters, + RegenerateKeyParameters, + TaggedResource +} from "../models/mappers"; diff --git a/sdk/communication/arm-communication/src/models/index.ts b/sdk/communication/arm-communication/src/models/index.ts new file mode 100644 index 000000000000..f53330ffb9e0 --- /dev/null +++ b/sdk/communication/arm-communication/src/models/index.ts @@ -0,0 +1,779 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for 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 { BaseResource, CloudError, AzureServiceClientOptions } from "@azure/ms-rest-azure-js"; +import * as msRest from "@azure/ms-rest-js"; + +export { BaseResource, CloudError }; + +/** + * The error + */ +export interface ErrorResponseError { + /** + * Error code. + */ + code?: string; + /** + * Error message indicating why the operation failed. + */ + message?: string; +} + +/** + * Error response indicating why the requested operation could not be performed. + */ +export interface ErrorResponse { + /** + * The error + */ + error?: ErrorResponseError; +} + +/** + * The object that describes a operation. + */ +export interface OperationDisplay { + /** + * Friendly name of the resource provider + */ + provider?: string; + /** + * Resource type on which the operation is performed. + */ + resource?: string; + /** + * The localized friendly name for the operation. + */ + operation?: string; + /** + * The localized friendly description for the operation + */ + description?: string; +} + +/** + * Specifications of the Dimension of metrics. + */ +export interface Dimension { + /** + * The public facing name of the dimension. + */ + name?: string; + /** + * Localized friendly display name of the dimension. + */ + displayName?: string; + /** + * Name of the dimension as it appears in MDM. + */ + internalName?: string; + /** + * A Boolean flag indicating whether this dimension should be included for the shoebox export + * scenario. + */ + toBeExportedForShoebox?: boolean; +} + +/** + * Specifications of the Metrics for Azure Monitoring. + */ +export interface MetricSpecification { + /** + * Name of the metric. + */ + name?: string; + /** + * Localized friendly display name of the metric. + */ + displayName?: string; + /** + * Localized friendly description of the metric. + */ + displayDescription?: string; + /** + * The unit that makes sense for the metric. + */ + unit?: string; + /** + * The method for aggregating the metric. Possible values include: 'Average', 'Minimum', + * 'Maximum', 'Total', 'Count' + */ + aggregationType?: AggregationType; + /** + * Optional. If set to true, then zero will be returned for time duration where no metric is + * emitted/published. + * Ex. a metric that returns the number of times a particular error code was emitted. The error + * code may not appear + * often, instead of the RP publishing 0, Shoebox can auto fill in 0s for time periods where + * nothing was emitted. + */ + fillGapWithZero?: string; + /** + * The name of the metric category that the metric belongs to. A metric can only belong to a + * single category. + */ + category?: string; + /** + * The dimensions of the metrics. + */ + dimensions?: Dimension[]; +} + +/** + * An object that describes a specification. + */ +export interface ServiceSpecification { + /** + * Specifications of the Metrics for Azure Monitoring. + */ + metricSpecifications?: MetricSpecification[]; +} + +/** + * Extra Operation properties. + */ +export interface OperationProperties { + /** + * The service specifications. + */ + serviceSpecification?: ServiceSpecification; +} + +/** + * REST API operation supported by CommunicationService resource provider. + */ +export interface Operation { + /** + * Name of the operation with format: {provider}/{resource}/{operation} + */ + name?: string; + /** + * The object that describes the operation. + */ + display?: OperationDisplay; + /** + * Optional. The intended executor of the operation; governs the display of the operation in the + * RBAC UX and the audit logs UX. + */ + origin?: string; + /** + * Extra properties for the operation. + */ + properties?: OperationProperties; +} + +/** + * Description of an Azure Notification Hub to link to the communication service + */ +export interface LinkNotificationHubParameters { + /** + * The resource ID of the notification hub + */ + resourceId: string; + /** + * Connection string for the notification hub + */ + connectionString: string; +} + +/** + * A notification hub that has been linked to the communication service + */ +export interface LinkedNotificationHub { + /** + * The resource ID of the notification hub + */ + resourceId?: string; +} + +/** + * The current status of an async operation + */ +export interface OperationStatus { + /** + * The operation Id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * Provisioning state of the resource. Possible values include: 'Succeeded', 'Failed', + * 'Canceled', 'Creating', 'Deleting', 'Moving' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly status?: Status; + /** + * The start time of the operation + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly startTime?: Date; + /** + * The end time of the operation + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly endTime?: Date; + /** + * Percent of the operation that is complete + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly percentComplete?: number; + /** + * The error + */ + error?: ErrorResponseError; +} + +/** + * A class representing a CommunicationService resource. + */ +export interface CommunicationServiceResource { + /** + * Fully qualified resource ID for the resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * The name of the resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * The type of the service - e.g. "Microsoft.Communication/CommunicationServices" + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * The Azure location where the CommunicationService is running. + */ + location?: string; + /** + * Tags of the service which is a list of key value pairs that describe the resource. + */ + tags?: { [propertyName: string]: string }; + /** + * Provisioning state of the resource. Possible values include: 'Unknown', 'Succeeded', 'Failed', + * 'Canceled', 'Running', 'Creating', 'Updating', 'Deleting', 'Moving' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: ProvisioningState; + /** + * FQDN of the CommunicationService instance. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly hostName?: string; + /** + * The location where the communication service stores its data at rest. + */ + dataLocation: string; + /** + * Resource ID of an Azure Notification Hub linked to this resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly notificationHubId?: string; + /** + * Version of the CommunicationService resource. Probably you need the same or higher version of + * client SDKs. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly version?: string; + /** + * The immutable resource Id of the communication service. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly immutableResourceId?: string; +} + +/** + * The core properties of ARM resources. + */ +export interface Resource extends BaseResource { + /** + * Fully qualified resource ID for the resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * The name of the resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * The type of the service - e.g. "Microsoft.Communication/CommunicationServices" + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; +} + +/** + * An ARM resource with its own location (not a global or an inherited location). + */ +export interface LocationResource { + /** + * The Azure location where the CommunicationService is running. + */ + location?: string; +} + +/** + * An ARM resource with that can accept tags + */ +export interface TaggedResource { + /** + * Tags of the service which is a list of key value pairs that describe the resource. + */ + tags?: { [propertyName: string]: string }; +} + +/** + * A class representing the access keys of a CommunicationService. + */ +export interface CommunicationServiceKeys { + /** + * The primary access key. + */ + primaryKey?: string; + /** + * The secondary access key. + */ + secondaryKey?: string; + /** + * CommunicationService connection string constructed via the primaryKey + */ + primaryConnectionString?: string; + /** + * CommunicationService connection string constructed via the secondaryKey + */ + secondaryConnectionString?: string; +} + +/** + * Parameters describes the request to regenerate access keys + */ +export interface RegenerateKeyParameters { + /** + * The keyType to regenerate. Must be either 'primary' or 'secondary'(case-insensitive). Possible + * values include: 'Primary', 'Secondary' + */ + keyType?: KeyType; +} + +/** + * Optional Parameters. + */ +export interface CommunicationServiceLinkNotificationHubOptionalParams extends msRest.RequestOptionsBase { + /** + * Parameters supplied to the operation. + */ + linkNotificationHubParameters?: LinkNotificationHubParameters; +} + +/** + * Optional Parameters. + */ +export interface CommunicationServiceUpdateOptionalParams extends msRest.RequestOptionsBase { + /** + * Parameters for the update operation + */ + parameters?: TaggedResource; +} + +/** + * Optional Parameters. + */ +export interface CommunicationServiceCreateOrUpdateOptionalParams extends msRest.RequestOptionsBase { + /** + * Parameters for the create or update operation + */ + parameters?: CommunicationServiceResource; +} + +/** + * Optional Parameters. + */ +export interface CommunicationServiceRegenerateKeyOptionalParams extends msRest.RequestOptionsBase { + /** + * Parameter that describes the Regenerate Key Operation. + */ + parameters?: RegenerateKeyParameters; +} + +/** + * Optional Parameters. + */ +export interface CommunicationServiceBeginCreateOrUpdateOptionalParams extends msRest.RequestOptionsBase { + /** + * Parameters for the create or update operation + */ + parameters?: CommunicationServiceResource; +} + +/** + * An interface representing CommunicationServiceManagementClientOptions. + */ +export interface CommunicationServiceManagementClientOptions extends AzureServiceClientOptions { + baseUri?: string; +} + +/** + * Defines headers for CreateOrUpdate operation. + */ +export interface CommunicationServiceCreateOrUpdateHeaders { + /** + * URL to query for status of the operation. + */ + azureAsyncOperation: string; +} + +/** + * Defines headers for Delete operation. + */ +export interface CommunicationServiceDeleteHeaders { + /** + * URL to query for status of the operation. + */ + location: string; +} + +/** + * @interface + * Result of the request to list REST API operations. It contains a list of operations. + * @extends Array + */ +export interface OperationList extends Array { + /** + * The URL the client should use to fetch the next page (per server side paging). + * It's null for now, added for future use. + */ + nextLink?: string; +} + +/** + * @interface + * Object that includes an array of CommunicationServices and a possible link for next set. + * @extends Array + */ +export interface CommunicationServiceResourceList extends Array { + /** + * The URL the client should use to fetch the next page (per server side paging). + * It's null for now, added for future use. + */ + nextLink?: string; +} + +/** + * Defines values for AggregationType. + * Possible values include: 'Average', 'Minimum', 'Maximum', 'Total', 'Count' + * @readonly + * @enum {string} + */ +export type AggregationType = 'Average' | 'Minimum' | 'Maximum' | 'Total' | 'Count'; + +/** + * Defines values for Status. + * Possible values include: 'Succeeded', 'Failed', 'Canceled', 'Creating', 'Deleting', 'Moving' + * @readonly + * @enum {string} + */ +export type Status = 'Succeeded' | 'Failed' | 'Canceled' | 'Creating' | 'Deleting' | 'Moving'; + +/** + * Defines values for ProvisioningState. + * Possible values include: 'Unknown', 'Succeeded', 'Failed', 'Canceled', 'Running', 'Creating', + * 'Updating', 'Deleting', 'Moving' + * @readonly + * @enum {string} + */ +export type ProvisioningState = 'Unknown' | 'Succeeded' | 'Failed' | 'Canceled' | 'Running' | 'Creating' | 'Updating' | 'Deleting' | 'Moving'; + +/** + * Defines values for KeyType. + * Possible values include: 'Primary', 'Secondary' + * @readonly + * @enum {string} + */ +export type KeyType = 'Primary' | 'Secondary'; + +/** + * Contains response data for the list operation. + */ +export type OperationsListResponse = OperationList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationList; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type OperationsListNextResponse = OperationList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationList; + }; +}; + +/** + * Contains response data for the linkNotificationHub operation. + */ +export type CommunicationServiceLinkNotificationHubResponse = LinkedNotificationHub & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: LinkedNotificationHub; + }; +}; + +/** + * Contains response data for the listBySubscription operation. + */ +export type CommunicationServiceListBySubscriptionResponse = CommunicationServiceResourceList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: CommunicationServiceResourceList; + }; +}; + +/** + * Contains response data for the listByResourceGroup operation. + */ +export type CommunicationServiceListByResourceGroupResponse = CommunicationServiceResourceList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: CommunicationServiceResourceList; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type CommunicationServiceUpdateResponse = CommunicationServiceResource & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: CommunicationServiceResource; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type CommunicationServiceGetResponse = CommunicationServiceResource & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: CommunicationServiceResource; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type CommunicationServiceCreateOrUpdateResponse = CommunicationServiceResource & CommunicationServiceCreateOrUpdateHeaders & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: CommunicationServiceCreateOrUpdateHeaders; + + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: CommunicationServiceResource; + }; +}; + +/** + * Contains response data for the deleteMethod operation. + */ +export type CommunicationServiceDeleteResponse = CommunicationServiceDeleteHeaders & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: CommunicationServiceDeleteHeaders; + }; +}; + +/** + * Contains response data for the listKeys operation. + */ +export type CommunicationServiceListKeysResponse = CommunicationServiceKeys & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: CommunicationServiceKeys; + }; +}; + +/** + * Contains response data for the regenerateKey operation. + */ +export type CommunicationServiceRegenerateKeyResponse = CommunicationServiceKeys & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: CommunicationServiceKeys; + }; +}; + +/** + * Contains response data for the listBySubscriptionNext operation. + */ +export type CommunicationServiceListBySubscriptionNextResponse = CommunicationServiceResourceList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: CommunicationServiceResourceList; + }; +}; + +/** + * Contains response data for the listByResourceGroupNext operation. + */ +export type CommunicationServiceListByResourceGroupNextResponse = CommunicationServiceResourceList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: CommunicationServiceResourceList; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type OperationStatusesGetResponse = OperationStatus & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationStatus; + }; +}; diff --git a/sdk/communication/arm-communication/src/models/mappers.ts b/sdk/communication/arm-communication/src/models/mappers.ts new file mode 100644 index 000000000000..67367870daf9 --- /dev/null +++ b/sdk/communication/arm-communication/src/models/mappers.ts @@ -0,0 +1,655 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for 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 { CloudErrorMapper, BaseResourceMapper } from "@azure/ms-rest-azure-js"; +import * as msRest from "@azure/ms-rest-js"; + +export const CloudError = CloudErrorMapper; +export const BaseResource = BaseResourceMapper; + +export const ErrorResponseError: msRest.CompositeMapper = { + serializedName: "ErrorResponse_error", + type: { + name: "Composite", + className: "ErrorResponseError", + modelProperties: { + code: { + serializedName: "code", + type: { + name: "String" + } + }, + message: { + serializedName: "message", + type: { + name: "String" + } + } + } + } +}; + +export const ErrorResponse: msRest.CompositeMapper = { + serializedName: "ErrorResponse", + type: { + name: "Composite", + className: "ErrorResponse", + modelProperties: { + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorResponseError" + } + } + } + } +}; + +export const OperationDisplay: msRest.CompositeMapper = { + serializedName: "OperationDisplay", + type: { + name: "Composite", + className: "OperationDisplay", + modelProperties: { + provider: { + serializedName: "provider", + type: { + name: "String" + } + }, + resource: { + serializedName: "resource", + type: { + name: "String" + } + }, + operation: { + serializedName: "operation", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + } + } + } +}; + +export const Dimension: msRest.CompositeMapper = { + serializedName: "Dimension", + type: { + name: "Composite", + className: "Dimension", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + displayName: { + serializedName: "displayName", + type: { + name: "String" + } + }, + internalName: { + serializedName: "internalName", + type: { + name: "String" + } + }, + toBeExportedForShoebox: { + serializedName: "toBeExportedForShoebox", + type: { + name: "Boolean" + } + } + } + } +}; + +export const MetricSpecification: msRest.CompositeMapper = { + serializedName: "MetricSpecification", + type: { + name: "Composite", + className: "MetricSpecification", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + displayName: { + serializedName: "displayName", + type: { + name: "String" + } + }, + displayDescription: { + serializedName: "displayDescription", + type: { + name: "String" + } + }, + unit: { + serializedName: "unit", + type: { + name: "String" + } + }, + aggregationType: { + serializedName: "aggregationType", + type: { + name: "String" + } + }, + fillGapWithZero: { + serializedName: "fillGapWithZero", + type: { + name: "String" + } + }, + category: { + serializedName: "category", + type: { + name: "String" + } + }, + dimensions: { + serializedName: "dimensions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Dimension" + } + } + } + } + } + } +}; + +export const ServiceSpecification: msRest.CompositeMapper = { + serializedName: "ServiceSpecification", + type: { + name: "Composite", + className: "ServiceSpecification", + modelProperties: { + metricSpecifications: { + serializedName: "metricSpecifications", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MetricSpecification" + } + } + } + } + } + } +}; + +export const OperationProperties: msRest.CompositeMapper = { + serializedName: "OperationProperties", + type: { + name: "Composite", + className: "OperationProperties", + modelProperties: { + serviceSpecification: { + serializedName: "serviceSpecification", + type: { + name: "Composite", + className: "ServiceSpecification" + } + } + } + } +}; + +export const Operation: msRest.CompositeMapper = { + serializedName: "Operation", + type: { + name: "Composite", + className: "Operation", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + display: { + serializedName: "display", + type: { + name: "Composite", + className: "OperationDisplay" + } + }, + origin: { + serializedName: "origin", + type: { + name: "String" + } + }, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "OperationProperties" + } + } + } + } +}; + +export const LinkNotificationHubParameters: msRest.CompositeMapper = { + serializedName: "LinkNotificationHubParameters", + type: { + name: "Composite", + className: "LinkNotificationHubParameters", + modelProperties: { + resourceId: { + required: true, + serializedName: "resourceId", + type: { + name: "String" + } + }, + connectionString: { + required: true, + serializedName: "connectionString", + type: { + name: "String" + } + } + } + } +}; + +export const LinkedNotificationHub: msRest.CompositeMapper = { + serializedName: "LinkedNotificationHub", + type: { + name: "Composite", + className: "LinkedNotificationHub", + modelProperties: { + resourceId: { + serializedName: "resourceId", + type: { + name: "String" + } + } + } + } +}; + +export const OperationStatus: msRest.CompositeMapper = { + serializedName: "OperationStatus", + type: { + name: "Composite", + className: "OperationStatus", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + status: { + readOnly: true, + serializedName: "status", + type: { + name: "String" + } + }, + startTime: { + readOnly: true, + serializedName: "startTime", + type: { + name: "DateTime" + } + }, + endTime: { + readOnly: true, + serializedName: "endTime", + type: { + name: "DateTime" + } + }, + percentComplete: { + readOnly: true, + serializedName: "percentComplete", + constraints: { + InclusiveMaximum: 100, + InclusiveMinimum: 0 + }, + type: { + name: "Number" + } + }, + error: { + serializedName: "error.error", + type: { + name: "Composite", + className: "ErrorResponseError" + } + } + } + } +}; + +export const CommunicationServiceResource: msRest.CompositeMapper = { + serializedName: "CommunicationServiceResource", + type: { + name: "Composite", + className: "CommunicationServiceResource", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + location: { + serializedName: "location", + type: { + name: "String" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + }, + hostName: { + readOnly: true, + serializedName: "properties.hostName", + type: { + name: "String" + } + }, + dataLocation: { + required: true, + serializedName: "properties.dataLocation", + type: { + name: "String" + } + }, + notificationHubId: { + readOnly: true, + serializedName: "properties.notificationHubId", + type: { + name: "String" + } + }, + version: { + readOnly: true, + serializedName: "properties.version", + type: { + name: "String" + } + }, + immutableResourceId: { + readOnly: true, + serializedName: "properties.immutableResourceId", + type: { + name: "String" + } + } + } + } +}; + +export const Resource: msRest.CompositeMapper = { + serializedName: "Resource", + type: { + name: "Composite", + className: "Resource", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const LocationResource: msRest.CompositeMapper = { + serializedName: "LocationResource", + type: { + name: "Composite", + className: "LocationResource", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const TaggedResource: msRest.CompositeMapper = { + serializedName: "TaggedResource", + type: { + name: "Composite", + className: "TaggedResource", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const CommunicationServiceKeys: msRest.CompositeMapper = { + serializedName: "CommunicationServiceKeys", + type: { + name: "Composite", + className: "CommunicationServiceKeys", + modelProperties: { + primaryKey: { + serializedName: "primaryKey", + type: { + name: "String" + } + }, + secondaryKey: { + serializedName: "secondaryKey", + type: { + name: "String" + } + }, + primaryConnectionString: { + serializedName: "primaryConnectionString", + type: { + name: "String" + } + }, + secondaryConnectionString: { + serializedName: "secondaryConnectionString", + type: { + name: "String" + } + } + } + } +}; + +export const RegenerateKeyParameters: msRest.CompositeMapper = { + serializedName: "RegenerateKeyParameters", + type: { + name: "Composite", + className: "RegenerateKeyParameters", + modelProperties: { + keyType: { + serializedName: "keyType", + type: { + name: "Enum", + allowedValues: [ + "Primary", + "Secondary" + ] + } + } + } + } +}; + +export const CommunicationServiceCreateOrUpdateHeaders: msRest.CompositeMapper = { + serializedName: "communicationservice-createorupdate-headers", + type: { + name: "Composite", + className: "CommunicationServiceCreateOrUpdateHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const CommunicationServiceDeleteHeaders: msRest.CompositeMapper = { + serializedName: "communicationservice-delete-headers", + type: { + name: "Composite", + className: "CommunicationServiceDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const OperationList: msRest.CompositeMapper = { + serializedName: "OperationList", + type: { + name: "Composite", + className: "OperationList", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Operation" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const CommunicationServiceResourceList: msRest.CompositeMapper = { + serializedName: "CommunicationServiceResourceList", + type: { + name: "Composite", + className: "CommunicationServiceResourceList", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CommunicationServiceResource" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; diff --git a/sdk/communication/arm-communication/src/models/operationStatusesMappers.ts b/sdk/communication/arm-communication/src/models/operationStatusesMappers.ts new file mode 100644 index 000000000000..446146928230 --- /dev/null +++ b/sdk/communication/arm-communication/src/models/operationStatusesMappers.ts @@ -0,0 +1,13 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + ErrorResponse, + ErrorResponseError, + OperationStatus +} from "../models/mappers"; diff --git a/sdk/communication/arm-communication/src/models/operationsMappers.ts b/sdk/communication/arm-communication/src/models/operationsMappers.ts new file mode 100644 index 000000000000..f137abdc152c --- /dev/null +++ b/sdk/communication/arm-communication/src/models/operationsMappers.ts @@ -0,0 +1,19 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + Dimension, + ErrorResponse, + ErrorResponseError, + MetricSpecification, + Operation, + OperationDisplay, + OperationList, + OperationProperties, + ServiceSpecification +} from "../models/mappers"; diff --git a/sdk/communication/arm-communication/src/models/parameters.ts b/sdk/communication/arm-communication/src/models/parameters.ts new file mode 100644 index 000000000000..9a61a9a00702 --- /dev/null +++ b/sdk/communication/arm-communication/src/models/parameters.ts @@ -0,0 +1,95 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * 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 * as msRest from "@azure/ms-rest-js"; + +export const acceptLanguage: msRest.OperationParameter = { + parameterPath: "acceptLanguage", + mapper: { + serializedName: "accept-language", + defaultValue: 'en-US', + type: { + name: "String" + } + } +}; +export const apiVersion: msRest.OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + required: true, + isConstant: true, + serializedName: "api-version", + defaultValue: '2020-08-20-preview', + type: { + name: "String" + } + } +}; +export const communicationServiceName: msRest.OperationURLParameter = { + parameterPath: "communicationServiceName", + mapper: { + required: true, + serializedName: "communicationServiceName", + type: { + name: "String" + } + } +}; +export const location: msRest.OperationURLParameter = { + parameterPath: "location", + mapper: { + required: true, + serializedName: "location", + type: { + name: "String" + } + } +}; +export const nextPageLink: msRest.OperationURLParameter = { + parameterPath: "nextPageLink", + mapper: { + required: true, + serializedName: "nextLink", + type: { + name: "String" + } + }, + skipEncoding: true +}; +export const operationId: msRest.OperationURLParameter = { + parameterPath: "operationId", + mapper: { + required: true, + serializedName: "operationId", + type: { + name: "String" + } + } +}; +export const resourceGroupName: msRest.OperationURLParameter = { + parameterPath: "resourceGroupName", + mapper: { + required: true, + serializedName: "resourceGroupName", + type: { + name: "String" + } + } +}; +export const subscriptionId: msRest.OperationURLParameter = { + parameterPath: "subscriptionId", + mapper: { + required: true, + serializedName: "subscriptionId", + type: { + name: "String" + } + } +}; diff --git a/sdk/communication/arm-communication/src/operations/communicationService.ts b/sdk/communication/arm-communication/src/operations/communicationService.ts new file mode 100644 index 000000000000..56d302c3155b --- /dev/null +++ b/sdk/communication/arm-communication/src/operations/communicationService.ts @@ -0,0 +1,703 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * 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 * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/communicationServiceMappers"; +import * as Parameters from "../models/parameters"; +import { CommunicationServiceManagementClientContext } from "../communicationServiceManagementClientContext"; + +/** Class representing a CommunicationService. */ +export class CommunicationService { + private readonly client: CommunicationServiceManagementClientContext; + + /** + * Create a CommunicationService. + * @param {CommunicationServiceManagementClientContext} client Reference to the service client. + */ + constructor(client: CommunicationServiceManagementClientContext) { + this.client = client; + } + + /** + * Links an Azure Notification Hub to this communication service. + * @summary Link Notification Hub + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param communicationServiceName The name of the CommunicationService resource. + * @param [options] The optional parameters + * @returns Promise + */ + linkNotificationHub(resourceGroupName: string, communicationServiceName: string, options?: Models.CommunicationServiceLinkNotificationHubOptionalParams): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param communicationServiceName The name of the CommunicationService resource. + * @param callback The callback + */ + linkNotificationHub(resourceGroupName: string, communicationServiceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param communicationServiceName The name of the CommunicationService resource. + * @param options The optional parameters + * @param callback The callback + */ + linkNotificationHub(resourceGroupName: string, communicationServiceName: string, options: Models.CommunicationServiceLinkNotificationHubOptionalParams, callback: msRest.ServiceCallback): void; + linkNotificationHub(resourceGroupName: string, communicationServiceName: string, options?: Models.CommunicationServiceLinkNotificationHubOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + communicationServiceName, + options + }, + linkNotificationHubOperationSpec, + callback) as Promise; + } + + /** + * Handles requests to list all resources in a subscription. + * @summary List By Subscription + * @param [options] The optional parameters + * @returns Promise + */ + listBySubscription(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + listBySubscription(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + listBySubscription(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listBySubscription(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listBySubscriptionOperationSpec, + callback) as Promise; + } + + /** + * Handles requests to list all resources in a resource group. + * @summary List By Resource Group + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param [options] The optional parameters + * @returns Promise + */ + listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param callback The callback + */ + listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param options The optional parameters + * @param callback The callback + */ + listByResourceGroup(resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + options + }, + listByResourceGroupOperationSpec, + callback) as Promise; + } + + /** + * Operation to update an existing CommunicationService. + * @summary Update + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param communicationServiceName The name of the CommunicationService resource. + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, communicationServiceName: string, options?: Models.CommunicationServiceUpdateOptionalParams): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param communicationServiceName The name of the CommunicationService resource. + * @param callback The callback + */ + update(resourceGroupName: string, communicationServiceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param communicationServiceName The name of the CommunicationService resource. + * @param options The optional parameters + * @param callback The callback + */ + update(resourceGroupName: string, communicationServiceName: string, options: Models.CommunicationServiceUpdateOptionalParams, callback: msRest.ServiceCallback): void; + update(resourceGroupName: string, communicationServiceName: string, options?: Models.CommunicationServiceUpdateOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + communicationServiceName, + options + }, + updateOperationSpec, + callback) as Promise; + } + + /** + * Get the CommunicationService and its properties. + * @summary Get + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param communicationServiceName The name of the CommunicationService resource. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, communicationServiceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param communicationServiceName The name of the CommunicationService resource. + * @param callback The callback + */ + get(resourceGroupName: string, communicationServiceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param communicationServiceName The name of the CommunicationService resource. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, communicationServiceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, communicationServiceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + communicationServiceName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Create a new CommunicationService or update an existing CommunicationService. + * @summary Create Or Update + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param communicationServiceName The name of the CommunicationService resource. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, communicationServiceName: string, options?: Models.CommunicationServiceCreateOrUpdateOptionalParams): Promise { + return this.beginCreateOrUpdate(resourceGroupName,communicationServiceName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Operation to delete a CommunicationService. + * @summary Delete + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param communicationServiceName The name of the CommunicationService resource. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, communicationServiceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,communicationServiceName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Get the access keys of the CommunicationService resource. + * @summary List Keys + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param communicationServiceName The name of the CommunicationService resource. + * @param [options] The optional parameters + * @returns Promise + */ + listKeys(resourceGroupName: string, communicationServiceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param communicationServiceName The name of the CommunicationService resource. + * @param callback The callback + */ + listKeys(resourceGroupName: string, communicationServiceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param communicationServiceName The name of the CommunicationService resource. + * @param options The optional parameters + * @param callback The callback + */ + listKeys(resourceGroupName: string, communicationServiceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listKeys(resourceGroupName: string, communicationServiceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + communicationServiceName, + options + }, + listKeysOperationSpec, + callback) as Promise; + } + + /** + * Regenerate CommunicationService access key. PrimaryKey and SecondaryKey cannot be regenerated at + * the same time. + * @summary Regenerate Key + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param communicationServiceName The name of the CommunicationService resource. + * @param [options] The optional parameters + * @returns Promise + */ + regenerateKey(resourceGroupName: string, communicationServiceName: string, options?: Models.CommunicationServiceRegenerateKeyOptionalParams): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param communicationServiceName The name of the CommunicationService resource. + * @param callback The callback + */ + regenerateKey(resourceGroupName: string, communicationServiceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param communicationServiceName The name of the CommunicationService resource. + * @param options The optional parameters + * @param callback The callback + */ + regenerateKey(resourceGroupName: string, communicationServiceName: string, options: Models.CommunicationServiceRegenerateKeyOptionalParams, callback: msRest.ServiceCallback): void; + regenerateKey(resourceGroupName: string, communicationServiceName: string, options?: Models.CommunicationServiceRegenerateKeyOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + communicationServiceName, + options + }, + regenerateKeyOperationSpec, + callback) as Promise; + } + + /** + * Create a new CommunicationService or update an existing CommunicationService. + * @summary Create Or Update + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param communicationServiceName The name of the CommunicationService resource. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, communicationServiceName: string, options?: Models.CommunicationServiceBeginCreateOrUpdateOptionalParams): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + communicationServiceName, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Operation to delete a CommunicationService. + * @summary Delete + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param communicationServiceName The name of the CommunicationService resource. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, communicationServiceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + communicationServiceName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Handles requests to list all resources in a subscription. + * @summary List By Subscription + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listBySubscriptionNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listBySubscriptionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listBySubscriptionNextOperationSpec, + callback) as Promise; + } + + /** + * Handles requests to list all resources in a resource group. + * @summary List By Resource Group + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByResourceGroupNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByResourceGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByResourceGroupNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const linkNotificationHubOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/communicationServices/{communicationServiceName}/linkNotificationHub", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.communicationServiceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: [ + "options", + "linkNotificationHubParameters" + ], + mapper: Mappers.LinkNotificationHubParameters + }, + responses: { + 200: { + bodyMapper: Mappers.LinkedNotificationHub + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listBySubscriptionOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Communication/communicationServices", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.CommunicationServiceResourceList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByResourceGroupOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/communicationServices", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.CommunicationServiceResourceList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const updateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/communicationServices/{communicationServiceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.communicationServiceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: [ + "options", + "parameters" + ], + mapper: Mappers.TaggedResource + }, + responses: { + 200: { + bodyMapper: Mappers.CommunicationServiceResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/communicationServices/{communicationServiceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.communicationServiceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.CommunicationServiceResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listKeysOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/communicationServices/{communicationServiceName}/listKeys", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.communicationServiceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.CommunicationServiceKeys + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const regenerateKeyOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/communicationServices/{communicationServiceName}/regenerateKey", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.communicationServiceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: [ + "options", + "parameters" + ], + mapper: Mappers.RegenerateKeyParameters + }, + responses: { + 200: { + bodyMapper: Mappers.CommunicationServiceKeys + }, + 201: { + bodyMapper: Mappers.CommunicationServiceKeys + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/communicationServices/{communicationServiceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.communicationServiceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: [ + "options", + "parameters" + ], + mapper: Mappers.CommunicationServiceResource + }, + responses: { + 200: { + bodyMapper: Mappers.CommunicationServiceResource, + headersMapper: Mappers.CommunicationServiceCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.CommunicationServiceResource, + headersMapper: Mappers.CommunicationServiceCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse, + headersMapper: Mappers.CommunicationServiceCreateOrUpdateHeaders + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/communicationServices/{communicationServiceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.communicationServiceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + headersMapper: Mappers.CommunicationServiceDeleteHeaders + }, + 202: { + headersMapper: Mappers.CommunicationServiceDeleteHeaders + }, + 204: { + headersMapper: Mappers.CommunicationServiceDeleteHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse, + headersMapper: Mappers.CommunicationServiceDeleteHeaders + } + }, + serializer +}; + +const listBySubscriptionNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.CommunicationServiceResourceList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.CommunicationServiceResourceList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/communication/arm-communication/src/operations/index.ts b/sdk/communication/arm-communication/src/operations/index.ts new file mode 100644 index 000000000000..8bfc7298c3a3 --- /dev/null +++ b/sdk/communication/arm-communication/src/operations/index.ts @@ -0,0 +1,13 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export * from "./operations"; +export * from "./communicationService"; +export * from "./operationStatuses"; diff --git a/sdk/communication/arm-communication/src/operations/operationStatuses.ts b/sdk/communication/arm-communication/src/operations/operationStatuses.ts new file mode 100644 index 000000000000..e7b491c708e0 --- /dev/null +++ b/sdk/communication/arm-communication/src/operations/operationStatuses.ts @@ -0,0 +1,87 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * 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 * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/operationStatusesMappers"; +import * as Parameters from "../models/parameters"; +import { CommunicationServiceManagementClientContext } from "../communicationServiceManagementClientContext"; + +/** Class representing a OperationStatuses. */ +export class OperationStatuses { + private readonly client: CommunicationServiceManagementClientContext; + + /** + * Create a OperationStatuses. + * @param {CommunicationServiceManagementClientContext} client Reference to the service client. + */ + constructor(client: CommunicationServiceManagementClientContext) { + this.client = client; + } + + /** + * Gets the current status of an async operation. + * @summary Get Operation Status + * @param location The Azure region + * @param operationId The ID of an ongoing async operation + * @param [options] The optional parameters + * @returns Promise + */ + get(location: string, operationId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param location The Azure region + * @param operationId The ID of an ongoing async operation + * @param callback The callback + */ + get(location: string, operationId: string, callback: msRest.ServiceCallback): void; + /** + * @param location The Azure region + * @param operationId The ID of an ongoing async operation + * @param options The optional parameters + * @param callback The callback + */ + get(location: string, operationId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(location: string, operationId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + location, + operationId, + options + }, + getOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Communication/locations/{location}/operationStatuses/{operationId}", + urlParameters: [ + Parameters.location, + Parameters.operationId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.OperationStatus + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/communication/arm-communication/src/operations/operations.ts b/sdk/communication/arm-communication/src/operations/operations.ts new file mode 100644 index 000000000000..e44adebf41db --- /dev/null +++ b/sdk/communication/arm-communication/src/operations/operations.ts @@ -0,0 +1,125 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * 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 * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/operationsMappers"; +import * as Parameters from "../models/parameters"; +import { CommunicationServiceManagementClientContext } from "../communicationServiceManagementClientContext"; + +/** Class representing a Operations. */ +export class Operations { + private readonly client: CommunicationServiceManagementClientContext; + + /** + * Create a Operations. + * @param {CommunicationServiceManagementClientContext} client Reference to the service client. + */ + constructor(client: CommunicationServiceManagementClientContext) { + this.client = client; + } + + /** + * Lists all of the available REST API operations of the Microsoft.Communication provider. + * @summary List Operations + * @param [options] The optional parameters + * @returns Promise + */ + list(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + list(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Lists all of the available REST API operations of the Microsoft.Communication provider. + * @summary List Operations + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Communication/operations", + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.OperationList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.OperationList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/communication/arm-communication/tsconfig.json b/sdk/communication/arm-communication/tsconfig.json new file mode 100644 index 000000000000..422b584abd5e --- /dev/null +++ b/sdk/communication/arm-communication/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "es6", + "moduleResolution": "node", + "strict": true, + "target": "es5", + "sourceMap": true, + "declarationMap": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "forceConsistentCasingInFileNames": true, + "lib": ["es6", "dom"], + "declaration": true, + "outDir": "./esm", + "importHelpers": true + }, + "include": ["./src/**/*.ts"], + "exclude": ["node_modules"] +} diff --git a/sdk/communication/ci.yml b/sdk/communication/ci.yml new file mode 100644 index 000000000000..07fa45913f7a --- /dev/null +++ b/sdk/communication/ci.yml @@ -0,0 +1,36 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. + +trigger: + branches: + include: + - master + - release/* + - hotfix/* + paths: + include: + - sdk/communication/ + +pr: + branches: + include: + - master + - feature/* + - release/* + - hotfix/* + paths: + include: + - sdk/communication/ + +extends: + template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: communication + Artifacts: + - name: azure-communication-common + safeName: azurecommunicationcommon + - name: azure-communication-administration + safeName: azurecommunicationadministration + - name: azure-communication-sms + safeName: azurecommunicationsms + - name: azure-communication-chat + safeName: azurecommunicationchat diff --git a/sdk/communication/communication-administration/.gitignore b/sdk/communication/communication-administration/.gitignore new file mode 100644 index 000000000000..5480375639b4 --- /dev/null +++ b/sdk/communication/communication-administration/.gitignore @@ -0,0 +1,2 @@ +/**/code-model-v* +/docGen \ No newline at end of file diff --git a/sdk/communication/communication-administration/.vscode/launch.json b/sdk/communication/communication-administration/.vscode/launch.json new file mode 100644 index 000000000000..0838e97b6317 --- /dev/null +++ b/sdk/communication/communication-administration/.vscode/launch.json @@ -0,0 +1,42 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "node", + "request": "launch", + "name": "Debug Mocha Test [Without Rollup]", + "program": "${workspaceFolder}/node_modules/mocha/bin/_mocha", + "args": [ + "-r", + "ts-node/register", + "--timeout", + "999999", + "--colors", + "${workspaceFolder}/test/*.spec.ts" + ], + "env": { "TS_NODE_COMPILER_OPTIONS": "{\"module\": \"commonjs\"}" }, + "console": "integratedTerminal", + "internalConsoleOptions": "neverOpen", + "protocol": "inspector" + }, + { + "type": "node", + "request": "launch", + "name": "Debug Unit Tests", + "program": "${workspaceFolder}/node_modules/mocha/bin/_mocha", + "args": [ + "-u", + "tdd", + "--timeout", + "999999", + "--colors", + "${workspaceFolder}/dist-test/index.node.js" + ], + "internalConsoleOptions": "openOnSessionStart", + "preLaunchTask": "npm: build:test" + } + ] +} diff --git a/sdk/communication/communication-administration/CHANGELOG.md b/sdk/communication/communication-administration/CHANGELOG.md new file mode 100644 index 000000000000..18044cae1dcb --- /dev/null +++ b/sdk/communication/communication-administration/CHANGELOG.md @@ -0,0 +1,11 @@ +# Release History + +## 1.0.0-beta.3 (Unreleased) + +## 1.0.0-beta.2 (2020-10-06) + +Added support for phone number administration. + +## 1.0.0-beta.1 (2020-09-22) + +The Azure Communication Administration Client library contains code which facilitates user token administration. diff --git a/sdk/communication/communication-administration/LICENSE b/sdk/communication/communication-administration/LICENSE new file mode 100644 index 000000000000..ea8fb1516028 --- /dev/null +++ b/sdk/communication/communication-administration/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2020 Microsoft + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/sdk/communication/communication-administration/README.md b/sdk/communication/communication-administration/README.md new file mode 100644 index 000000000000..92d8e6a8a67a --- /dev/null +++ b/sdk/communication/communication-administration/README.md @@ -0,0 +1,251 @@ +# Azure Communication Administration client library for JavaScript + +The administration library is used for managing users and tokens for Azure Communication Services. This library also provides capabilities for phone number administration. + +Acquired phone numbers can come with many capabilities, depending on the country, number type and phone plan. Examples of capabilities are SMS inbound and outbound usage, PSTN inbound and outbound usage. Phone numbers can also be assigned to a bot via a webhook URL. + +## Getting started + +### Prerequisites + +- An [Azure subscription][azure_sub]. +- An existing Communication Services resource. If you need to create the resource, you can use the [Azure Portal][azure_portal] or [Azure CLI][azure_cli]. + +### Installing + +```bash +npm install @azure/communication-administration +``` + +## Key concepts + +### Clients + +The administration package exposes two clients. The `CommunicationIdentityClient` provides methods to manage users and their tokens. The `PhoneNumberAdministrationClient` provides methods to manage phone plans and numbers. + +### Phone plans overview + +Phone plans come in two types; Geographic and Toll-Free. Geographic phone plans are phone plans associated with a location, whose phone numbers' area codes are associated with the area code of a geographic location. Toll-Free phone plans are phone plans not associated location. For example, in the US, toll-free numbers can come with area codes such as 800 or 888. + +All geographic phone plans within the same country are grouped into a phone plan group with a Geographic phone number type. All Toll-Free phone plans within the same country are grouped into a phone plan group. + +### Searching and acquiring numbers + +Phone numbers can be search through the search creation API by providing a phone plan id, an area code and quantity of phone numbers. The provided quantity of phone numbers will be reserved for ten minutes. This search of phone numbers can either be cancelled or purchased. If the search is cancelled, then the phone numbers will become available to others. If the search is purchased, then the phone numbers are acquired for the Azure resources. + +### Configuring and assigning numbers + +Phone numbers can be assigned to a callback URL via the configure number API. As part of the configuration, you will need an acquired phone number, callback URL and application id. + +## Examples + +## Authentication + +You can get a key and/or connection string from your Communication Services resource in [Azure Portal][azure_portal]. Once you have a key, you can authenticate the `CommunicationIdentityClient` and `PhoneNumberAdministrationClient` with any of the following methods: + +### Create `KeyCredential` with `AzureKeyCredential` before initializing the client + +```typescript +import { AzureKeyCredential } from "@azure/core-auth"; +import { CommunicationIdentityClient } from "@azure/communication-administration"; + +const credential = new AzureKeyCredential(KEY); +const client = new CommunicationIdentityClient(HOST, credential); +``` + +### Using a connection string + +```typescript +import { PhoneNumberAdministrationClient } from "@azure/communication-administration"; + +const connectionString = `endpoint=HOST;accessKey=KEY`; +const client = new CommunicationIdentityClient(connectionString); +``` + +If you use a key to initialize the client you will also need to provide the appropriate endpoint. You can get this endpoint from your Communication Services resource in [Azure Portal][azure_portal]. + +## Usage + +### CommunicationIdentityClient + +### Creating an instance of CommunicationIdentityClient + +```typescript +import { CommunicationIdentityClient } from "@azure/communication-administration"; + +const client = new CommunicationIdentityClient(CONNECTION_STRING); +``` + +#### Creating a new user + +Use the `createUser` method to create a new user. + +```typescript +const user = await client.createUser(); +``` + +#### Creating and refreshing a user token + +Use the `issueToken` method to issue or refresh a token for an existing user. The method also takes in a list of communication token scopes. Scope options include: + +- `chat` (Chat) +- `pstn` (Public switched telephone network) +- `voip` (Voice over IP) + +```typescript +let { token } = await client.issueToken(user, ["chat"]); +``` + +To refresh the user token, issue another token with the same user. + +```typescript +{ token } = await client.issueToken(user, ["chat"]); +``` + +#### Revoking tokens for a user + +Use the `revokeTokens` method to revoke all the issued tokens of a user. + +```typescript +await client.revokeTokens(user); +``` + +`revokeTokens` takes an optional second argument, `tokensValidFrom`. If this date is provided, `revokeTokens` will revoke all tokens issued before it. Otherwise, all tokens will be revoked. + +#### Deleting a user + +Use the `deleteUser` method to delete a user. + +```typescript +await client.deleteUser(user); +``` + +### PhoneNumberAdministrationClient + +#### Creating an instance of PhoneNumberAdministrationClient + +```typescript +import { CommunicationIdentityClient } from "@azure/communication-administration"; + +const client = new CommunicationIdentityClient(CONNECTION_STRING); +``` + +#### Getting countries + +Use the `listSupportedCountries` method to get a list of the supported countries. + +```typescript +const countries = await client.listSupportedCountries(); + +for await (const country of countries) { + console.log(`Country code: ${country.countryCode}`); + console.log(`Country name: ${country.localizedName}`); +} +``` + +#### Getting phone plan groups + +Phone plan groups come in two types, Geographic and Toll-Free. Use the `listPhonePlanGroups` method to get them. + +```typescript +const countryCode = "US"; +const phonePlanGroups = await client.listPhonePlanGroups(countryCode); + +for await (const phonePlanGroup of phonePlanGroups) { + console.log(`Phone plan group id: ${phonePlanGroup.phonePlanGroupId}`); +} +``` + +#### Getting location options + +For Geographic phone plans, you can query the available geographic locations. The locations options are structured like the geographic hierarchy of a country. For example, the US has states and within each state are cities. + +Use the `getPhonePlanLocationOptions` method to get the options for a location. + +```typescript +const { locationOptions } = await client.getPhonePlanLocationOptions({ + countryCode: "US", + phonePlanGroupId: "phonePlanGroupId", + phonePlanId: "phonePlanId" +}); + +console.log(`Got location options for: ${locationOptions.labelId}`); +``` + +#### Getting area codes + +Fetching area codes for geographic phone plans will require the the location options queries set. You must include the chain of geographic locations traversing down the location options object returned by the `getPhonePlanLocationOptions`. + +Use the `getAreaCodes` method to get the area codes for geographic phone plans. + +```typescript +const { primaryAreaCodes } = await client.getAreaCodes({ + locationType: "selection", + countryCode: "US", + phonePlanId: "phonePlanId", + locationOptionsQueries +}); +``` + +#### Reserving phone numbers for purchase + +Use the `beginReservePhoneNumbers` method to search for phone numbers and reserve them. This is a long running operation. + +```typescript +const reservePoller = await client.beginReservePhoneNumbers({ + name: "Phone number search 800", + description: "Search for 800 phone numbers" + phonePlanIds: ["phone-plan-id-1"], + areaCode: "800", + quantity: 3 +}); +``` + +To get the results of the reservation, use the `pollUntilDone` method on the poller you created. + +```typescript +const phoneNumberReservation = await reservePoller.pollUntilDone(); +``` + +You can cancel the the polling and reservation by calling the `cancelOperation` method on the poller you created. + +```typescript +await reservePoller.cancelOperation(); +``` + +#### Purchasing phone numbers from a reservation + +Use the `beginPurchasePhoneNumbers` method to purchase the phone numbers from your reservation. The `reservationId` returned from `beginReservePhoneNumbers` is required. `beginPurchasePhoneNumbers` is also a long running operation. + +```typescript +const { reservationId } = phoneNumberReservation; +const purchasePoller = await client.beginPurchasePhoneNumbers(reservationId); +``` + +To get the results of the purchase, use the `pollUntilDone` method on the purchase poller you created. + +```typescript +const results = await purchasePoller.pollUntilDone(); +``` + +## Troubleshooting + +## Next steps + +Please take a look at the +[samples](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/communication/communication-administration/samples) +directory for detailed examples on how to use this library. + +## Contributing + +If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/master/CONTRIBUTING.md) to learn more about how to build and test the code. + +## Related projects + +- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) + +[azure_cli]: https://docs.microsoft.com/cli/azure +[azure_sub]: https://azure.microsoft.com/free/ +[azure_portal]: https://portal.azure.com + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fcommunication%2Fcommunication-administration%2FREADME.png) diff --git a/sdk/communication/communication-administration/api-extractor.json b/sdk/communication/communication-administration/api-extractor.json new file mode 100644 index 000000000000..641582682b45 --- /dev/null +++ b/sdk/communication/communication-administration/api-extractor.json @@ -0,0 +1,35 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", + "mainEntryPointFilePath": "types/src/index.d.ts", + "docModel": { + "enabled": true + }, + "apiReport": { + "enabled": true, + "reportFolder": "./review" + }, + "dtsRollup": { + "enabled": true, + "untrimmedFilePath": "", + "publicTrimmedFilePath": "./types/communication-administration.d.ts" + }, + "messages": { + "tsdocMessageReporting": { + "default": { + "logLevel": "none" + } + }, + "extractorMessageReporting": { + "ae-forgotten-export": { + "logLevel": "error", + "addToApiReportFile": false + }, + "ae-missing-release-tag": { + "logLevel": "none" + }, + "ae-unresolved-link": { + "logLevel": "error" + } + } + } +} diff --git a/sdk/communication/communication-administration/karma.conf.js b/sdk/communication/communication-administration/karma.conf.js new file mode 100644 index 000000000000..b9e0eca4d597 --- /dev/null +++ b/sdk/communication/communication-administration/karma.conf.js @@ -0,0 +1,144 @@ +// https://github.com/karma-runner/karma-chrome-launcher +process.env.CHROME_BIN = require("puppeteer").executablePath(); +require("dotenv").config(); +const { + jsonRecordingFilterFunction, + isPlaybackMode, + isSoftRecordMode, + isRecordMode +} = require("@azure/test-utils-recorder"); + +module.exports = function(config) { + config.set({ + // base path that will be used to resolve all patterns (eg. files, exclude) + basePath: "./", + + // frameworks to use + // available frameworks: https://npmjs.org/browse/keyword/karma-adapter + frameworks: ["mocha"], + + plugins: [ + "karma-mocha", + "karma-mocha-reporter", + "karma-chrome-launcher", + "karma-edge-launcher", + "karma-firefox-launcher", + "karma-ie-launcher", + "karma-env-preprocessor", + "karma-coverage", + "karma-remap-istanbul", + "karma-junit-reporter", + "karma-json-to-file-reporter", + "karma-json-preprocessor" + ], + + // list of files / patterns to load in the browser + files: [ + // Uncomment the cdn link below for the polyfill service to support IE11 missing features + // Promise,String.prototype.startsWith,String.prototype.endsWith,String.prototype.repeat,String.prototype.includes,Array.prototype.includes,Object.keys + // "https://cdn.polyfill.io/v2/polyfill.js?features=Symbol,Promise,String.prototype.startsWith,String.prototype.endsWith,String.prototype.repeat,String.prototype.includes,Array.prototype.includes,Object.keys|always", + "dist-test/index.browser.js" + ].concat(isPlaybackMode() || isSoftRecordMode() ? ["recordings/browsers/**/*.json"] : []), + + // list of files / patterns to exclude + exclude: [], + + // preprocess matching files before serving them to the browser + // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor + preprocessors: { + "**/*.js": ["env"], + "recordings/browsers/**/*.json": ["json"] + // IMPORTANT: COMMENT following line if you want to debug in your browsers!! + // Preprocess source file to calculate code coverage, however this will make source file unreadable + //"test-browser/index.js": ["coverage"] + }, + + // inject following environment values into browser testing with window.__env__ + // environment values MUST be exported or set with same console running "karma start" + // https://www.npmjs.com/package/karma-env-preprocessor + envPreprocessor: ["TEST_MODE", "COMMUNICATION_CONNECTION_STRING", "INCLUDE_PHONENUMBER_TESTS"], + + // test results reporter to use + // possible values: 'dots', 'progress' + // available reporters: https://npmjs.org/browse/keyword/karma-reporter + reporters: ["mocha", "coverage", "karma-remap-istanbul", "junit", "json-to-file"], + + coverageReporter: { + // specify a common output directory + dir: "coverage-browser/", + reporters: [ + { + type: "json", + subdir: ".", + file: "coverage.json" + } + ] + }, + + remapIstanbulReporter: { + src: "coverage-browser/coverage.json", + reports: { + lcovonly: "coverage-browser/lcov.info", + html: "coverage-browser/html/report", + "text-summary": null, + cobertura: "./coverage-browser/cobertura-coverage.xml" + } + }, + + junitReporter: { + outputDir: "", // results will be saved as $outputDir/$browserName.xml + outputFile: "test-results.browser.xml", // if included, results will be saved as $outputDir/$browserName/$outputFile + suite: "", // suite will become the package name attribute in xml testsuite element + useBrowserName: false, // add browser name to report and classes names + nameFormatter: undefined, // function (browser, result) to customize the name attribute in xml testcase element + classNameFormatter: undefined, // function (browser, result) to customize the classname attribute in xml testcase element + properties: {} // key value pair of properties to add to the section of the report + }, + + jsonToFileReporter: { + filter: jsonRecordingFilterFunction, + outputPath: "." + }, + + // web server port + port: 9876, + + // enable / disable colors in the output (reporters and logs) + colors: true, + + // level of logging + // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG + logLevel: config.LOG_INFO, + + // enable / disable watching file and executing tests whenever any file changes + autoWatch: false, + + // start these browsers + // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher + // 'ChromeHeadless', 'Chrome', 'Firefox', 'Edge', 'IE' + browsers: ["ChromeHeadless"], + + // Continuous Integration mode + // if true, Karma captures browsers, runs the tests and exits + singleRun: true, + + // Concurrency level + // how many browser should be started simultaneous + concurrency: 1, + + browserNoActivityTimeout: 600000, + browserDisconnectTimeout: 10000, + browserDisconnectTolerance: 3, + browserConsoleLogOptions: { + terminal: !isRecordMode() + }, + + client: { + mocha: { + // change Karma's debug.html to the mocha web reporter + reporter: "html", + timeout: "600000" + } + } + }); +}; diff --git a/sdk/communication/communication-administration/package.json b/sdk/communication/communication-administration/package.json new file mode 100644 index 000000000000..908bc550e666 --- /dev/null +++ b/sdk/communication/communication-administration/package.json @@ -0,0 +1,122 @@ +{ + "name": "@azure/communication-administration", + "version": "1.0.0-beta.3", + "description": "SDK for Azure Communication service which facilitates user token administration.", + "sdk-type": "client", + "main": "dist/index.js", + "module": "dist-esm/src/index.js", + "types": "types/communication-administration.d.ts", + "scripts": { + "audit": "node ../../../common/scripts/rush-audit.js && rimraf node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit", + "build": "tsc -p . && rollup -c 2>&1 && api-extractor run --local", + "build:autorest": "npm run build:autorest-identity && npm run build:autorest-phone", + "build:autorest-identity": "autorest --typescript --v3 ./swagger/CommunicationIdentity.md && rushx format", + "build:autorest-phone": "autorest --typescript --v3 ./swagger/PhoneNumber.md && rushx format", + "build:clean": "rush update --recheck && rush rebuild && npm run build", + "build:browser": "tsc -p . && cross-env ONLY_BROWSER=true rollup -c 2>&1", + "build:node": "tsc -p . && cross-env ONLY_NODE=true rollup -c 2>&1", + "build:samples": "dev-tool samples prep && cd dist-samples && tsc -p .", + "build:test": "tsc -p . && rollup -c rollup.test.config.js 2>&1", + "check-format": "prettier --list-different \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"", + "clean": "rimraf dist dist-* types *.tgz *.log", + "execute:samples": "npm run build:samples && dev-tool samples run dist-samples/javascript dist-samples/typescript/dist/dist-samples/typescript/src/", + "extract-api": "tsc -p . && api-extractor run --local", + "format": "prettier --write \"recordings/**/*.{js,json}\" \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"", + "generate-doc": "api-documenter markdown -i temp -o docGen", + "integration-test:browser": "karma start --single-run", + "integration-test:node": "nyc mocha -r esm --require source-map-support/register --reporter ../../../common/tools/mocha-multi-reporter.js --full-trace -t 300000 dist-esm/test/*.spec.js dist-esm/test/node/*.spec.js", + "integration-test": "npm run integration-test:node && npm run integration-test:browser", + "lint:fix": "eslint package.json tsconfig.json api-extractor.json src test --ext .ts --fix --fix-type [problem,suggestion]", + "lint": "eslint package.json tsconfig.json api-extractor.json src test --ext .ts -f html -o communication-administration-lintReport.html || exit 0", + "pack": "npm pack 2>&1", + "prebuild": "npm run clean", + "test": "npm run build:test && npm run unit-test && npm run integration-test", + "test:browser": "npm run build:test && npm run unit-test:browser && npm run integration-test:browser", + "test:node": "npm run build:test && npm run unit-test:node && npm run integration-test:node", + "test:watch": "npm run test -- --watch --reporter min", + "unit-test:browser": "karma start --single-run", + "unit-test:node": "mocha --reporter ../../../common/tools/mocha-multi-reporter.js dist-test/index.node.js", + "unit-test": "npm run unit-test:node && npm run unit-test:browser" + }, + "files": [ + "dist/", + "dist-browser/", + "dist-esm/src/", + "types/communication-administration.d.ts", + "README.md", + "LICENSE" + ], + "keywords": [ + "Azure", + "cloud", + "communication" + ], + "author": "Microsoft Corporation", + "license": "MIT", + "engines": { + "node": ">=8.0.0" + }, + "homepage": "https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/communication/communication-administration/", + "sideEffects": false, + "prettier": "@azure/eslint-plugin-azure-sdk/prettier.json", + "dependencies": { + "@azure/abort-controller": "^1.0.0", + "@azure/communication-common": "1.0.0-beta.3", + "@azure/core-auth": "^1.1.3", + "@azure/core-http": "^1.2.0", + "@azure/core-lro": "^1.0.2", + "@azure/core-paging": "^1.1.1", + "@azure/logger": "^1.0.0", + "@azure/core-tracing": "1.0.0-preview.9", + "@opentelemetry/api": "^0.10.2", + "events": "^3.0.0", + "tslib": "^2.0.0" + }, + "devDependencies": { + "@azure/dev-tool": "^1.0.0", + "@azure/eslint-plugin-azure-sdk": "^3.0.0", + "@azure/test-utils-recorder": "^1.0.0", + "@microsoft/api-documenter": "~7.8.17", + "@microsoft/api-extractor": "7.7.11", + "@rollup/plugin-commonjs": "11.0.2", + "@rollup/plugin-json": "^4.0.0", + "@rollup/plugin-multi-entry": "^3.0.0", + "@rollup/plugin-node-resolve": "^8.0.0", + "@rollup/plugin-replace": "^2.2.0", + "@types/chai": "^4.1.6", + "@types/mocha": "^7.0.2", + "@types/sinon": "^9.0.4", + "@types/node": "^8.0.0", + "assert": "^1.4.1", + "chai": "^4.2.0", + "cross-env": "^7.0.2", + "dotenv": "^8.2.0", + "eslint": "^6.1.0", + "inherits": "^2.0.3", + "karma-chrome-launcher": "^3.0.0", + "karma-coverage": "^2.0.0", + "karma-edge-launcher": "^0.4.2", + "karma-env-preprocessor": "^0.1.1", + "karma-firefox-launcher": "^1.1.0", + "karma-ie-launcher": "^1.0.0", + "karma-json-preprocessor": "^0.3.3", + "karma-json-to-file-reporter": "^1.0.1", + "karma-junit-reporter": "^2.0.1", + "karma-mocha-reporter": "^2.2.5", + "karma-mocha": "^2.0.1", + "karma-remap-istanbul": "^0.6.0", + "karma": "^5.1.0", + "mocha-junit-reporter": "^1.18.0", + "mocha": "^7.1.1", + "nyc": "^14.0.0", + "prettier": "^1.16.4", + "rimraf": "^3.0.0", + "rollup-plugin-sourcemaps": "^0.4.2", + "rollup-plugin-terser": "^5.1.1", + "rollup-plugin-visualizer": "^4.0.4", + "rollup-plugin-shim": "^1.0.0", + "rollup": "^1.16.3", + "sinon": "^9.0.2", + "typescript": "~3.9.3" + } +} diff --git a/sdk/communication/communication-administration/recordings/browsers/communicationidentityclient_playbacklive/recording_successfully_creates_a_user.json b/sdk/communication/communication-administration/recordings/browsers/communicationidentityclient_playbacklive/recording_successfully_creates_a_user.json new file mode 100644 index 000000000000..f44b55201cf3 --- /dev/null +++ b/sdk/communication/communication-administration/recordings/browsers/communicationidentityclient_playbacklive/recording_successfully_creates_a_user.json @@ -0,0 +1,22 @@ +{ + "recordings": [ + { + "method": "POST", + "url": "https://endpoint/identities", + "query": { + "api-version": "2020-07-20-preview2" + }, + "requestBody": null, + "status": 200, + "response": "{\"id\":\"sanitized\"}", + "responseHeaders": { + "content-type": "application/json; charset=utf-8" + } + } + ], + "uniqueTestInfo": { + "uniqueName": {}, + "newDate": {} + }, + "hash": "27d09bb5f8e19a5b9a886691bbe0c28c" +} diff --git a/sdk/communication/communication-administration/recordings/browsers/communicationidentityclient_playbacklive/recording_successfully_deletes_a_user.json b/sdk/communication/communication-administration/recordings/browsers/communicationidentityclient_playbacklive/recording_successfully_deletes_a_user.json new file mode 100644 index 000000000000..6544834afeac --- /dev/null +++ b/sdk/communication/communication-administration/recordings/browsers/communicationidentityclient_playbacklive/recording_successfully_deletes_a_user.json @@ -0,0 +1,20 @@ +{ + "recordings": [ + { + "method": "DELETE", + "url": "https://endpoint/identities/sanitized", + "query": { + "api-version": "2020-07-20-preview2" + }, + "requestBody": null, + "status": 204, + "response": "", + "responseHeaders": {} + } + ], + "uniqueTestInfo": { + "uniqueName": {}, + "newDate": {} + }, + "hash": "23307718ae010385eb18d4ce84eb95c9" +} diff --git a/sdk/communication/communication-administration/recordings/browsers/communicationidentityclient_playbacklive/recording_successfully_issues_a_token_for_a_user_multiple_scopes.json b/sdk/communication/communication-administration/recordings/browsers/communicationidentityclient_playbacklive/recording_successfully_issues_a_token_for_a_user_multiple_scopes.json new file mode 100644 index 000000000000..c5e7bb73e8cc --- /dev/null +++ b/sdk/communication/communication-administration/recordings/browsers/communicationidentityclient_playbacklive/recording_successfully_issues_a_token_for_a_user_multiple_scopes.json @@ -0,0 +1,22 @@ +{ + "recordings": [ + { + "method": "POST", + "url": "https://endpoint/identities/sanitized/token", + "query": { + "api-version": "2020-07-20-preview2" + }, + "requestBody": "{\"scopes\":[\"chat\",\"pstn\"]}", + "status": 200, + "response": "{\"id\":\"sanitized\",\"token\":\"sanitized\",\"expiresOn\":\"2020-10-08T20:48:09.2177301+00:00\"}", + "responseHeaders": { + "content-type": "application/json; charset=utf-8" + } + } + ], + "uniqueTestInfo": { + "uniqueName": {}, + "newDate": {} + }, + "hash": "4fcce8a4b300bc164dbce1708fc9ef13" +} diff --git a/sdk/communication/communication-administration/recordings/browsers/communicationidentityclient_playbacklive/recording_successfully_issues_a_token_for_a_user_single_scope.json b/sdk/communication/communication-administration/recordings/browsers/communicationidentityclient_playbacklive/recording_successfully_issues_a_token_for_a_user_single_scope.json new file mode 100644 index 000000000000..81a8fec01666 --- /dev/null +++ b/sdk/communication/communication-administration/recordings/browsers/communicationidentityclient_playbacklive/recording_successfully_issues_a_token_for_a_user_single_scope.json @@ -0,0 +1,22 @@ +{ + "recordings": [ + { + "method": "POST", + "url": "https://endpoint/identities/sanitized/token", + "query": { + "api-version": "2020-07-20-preview2" + }, + "requestBody": "{\"scopes\":[\"chat\"]}", + "status": 200, + "response": "{\"id\":\"sanitized\",\"token\":\"sanitized\",\"expiresOn\":\"2020-10-08T20:48:09.1487114+00:00\"}", + "responseHeaders": { + "content-type": "application/json; charset=utf-8" + } + } + ], + "uniqueTestInfo": { + "uniqueName": {}, + "newDate": {} + }, + "hash": "778874dd07d653a79561fb2d94cb0b86" +} diff --git a/sdk/communication/communication-administration/recordings/browsers/communicationidentityclient_playbacklive/recording_successfully_revokes_tokens_issued_for_a_user.json b/sdk/communication/communication-administration/recordings/browsers/communicationidentityclient_playbacklive/recording_successfully_revokes_tokens_issued_for_a_user.json new file mode 100644 index 000000000000..7b52bb71a782 --- /dev/null +++ b/sdk/communication/communication-administration/recordings/browsers/communicationidentityclient_playbacklive/recording_successfully_revokes_tokens_issued_for_a_user.json @@ -0,0 +1,20 @@ +{ + "recordings": [ + { + "method": "PATCH", + "url": "https://endpoint/identities/sanitized", + "query": { + "api-version": "2020-07-20-preview2" + }, + "requestBody": "{\"tokensValidFrom\":\"2020-10-10T00:00:00.000Z\"}", + "status": 204, + "response": "", + "responseHeaders": {} + } + ], + "uniqueTestInfo": { + "uniqueName": {}, + "newDate": {} + }, + "hash": "568db7fa8e03c8fc44cc0f90faaa974f" +} diff --git a/sdk/communication/communication-administration/recordings/browsers/phonenumber__lros__phone_number_reservations_playbacklive/recording_can_cancel_a_phone_number_reservation.json b/sdk/communication/communication-administration/recordings/browsers/phonenumber__lros__phone_number_reservations_playbacklive/recording_can_cancel_a_phone_number_reservation.json new file mode 100644 index 000000000000..887f9114b579 --- /dev/null +++ b/sdk/communication/communication-administration/recordings/browsers/phonenumber__lros__phone_number_reservations_playbacklive/recording_can_cancel_a_phone_number_reservation.json @@ -0,0 +1,35 @@ +{ + "recordings": [ + { + "method": "POST", + "url": "https://endpoint/administration/phonenumbers/searches/sanitized/cancel", + "query": { + "api-version": "2020-07-20-preview1" + }, + "requestBody": null, + "status": 202, + "response": "", + "responseHeaders": { + "content-length": "0" + } + }, + { + "method": "GET", + "url": "https://endpoint/administration/phonenumbers/searches/sanitized", + "query": { + "api-version": "2020-07-20-preview1" + }, + "requestBody": null, + "status": 200, + "response": "{\"searchId\":\"sanitized\",\"displayName\":\"LRO Test Search\",\"createdAt\":\"2020-10-07T20:48:15.1739576+00:00\",\"description\":\"Test search for JS phone number admin SDK.\",\"phonePlanIds\":[\"sanitized\",\"sanitized\"],\"areaCode\":\"205\",\"quantity\":1,\"locationOptions\":[],\"status\":\"Cancelling\",\"phoneNumbers\":[\"+18005551234\"],\"reservationExpiryDate\":\"2020-10-07T21:04:26.9032882+00:00\"}", + "responseHeaders": { + "content-type": "application/json; charset=utf-8" + } + } + ], + "uniqueTestInfo": { + "uniqueName": {}, + "newDate": {} + }, + "hash": "c901ce0a6347f299abbd6baee59e5671" +} diff --git a/sdk/communication/communication-administration/recordings/browsers/phonenumber__lros__phone_number_reservations_playbacklive/recording_can_get_phoneplanids_and_areacode_to_create_reservation.json b/sdk/communication/communication-administration/recordings/browsers/phonenumber__lros__phone_number_reservations_playbacklive/recording_can_get_phoneplanids_and_areacode_to_create_reservation.json new file mode 100644 index 000000000000..8e84f8021853 --- /dev/null +++ b/sdk/communication/communication-administration/recordings/browsers/phonenumber__lros__phone_number_reservations_playbacklive/recording_can_get_phoneplanids_and_areacode_to_create_reservation.json @@ -0,0 +1,57 @@ +{ + "recordings": [ + { + "method": "GET", + "url": "https://endpoint/administration/phonenumbers/countries/US/phoneplangroups", + "query": { + "locale": "en-US", + "includeRateInformation": "false", + "skip": "0", + "take": "100", + "api-version": "2020-07-20-preview1" + }, + "requestBody": null, + "status": 200, + "response": "{\"phonePlanGroups\":[{\"phonePlanGroupId\":\"sanitized\",\"phoneNumberType\":\"Geographic\",\"localizedName\":\"Azure- User - Geographic\",\"localizedDescription\":\"These are numbers used by Azure resources.\"},{\"phonePlanGroupId\":\"sanitized\",\"phoneNumberType\":\"Geographic\",\"localizedName\":\"Azure - Geographic\",\"localizedDescription\":\"These are numbers used by Azure resources.\"},{\"phonePlanGroupId\":\"sanitized\",\"phoneNumberType\":\"TollFree\",\"localizedName\":\"Azure - Toll Free\",\"localizedDescription\":\"These are toll free numbers used by Azure resources.\"}],\"nextLink\":null}", + "responseHeaders": { + "content-type": "application/json; charset=utf-8" + } + }, + { + "method": "GET", + "url": "https://endpoint/administration/phonenumbers/countries/US/phoneplangroups/sanitized/phoneplans", + "query": { + "locale": "en-US", + "skip": "0", + "take": "100", + "api-version": "2020-07-20-preview1" + }, + "requestBody": null, + "status": 200, + "response": "{\"phonePlans\":[{\"phonePlanId\":\"sanitized\",\"localizedName\":\"Outbound Only PSTN For User - Geographic\",\"locationType\":\"Selection\",\"areaCodes\":[],\"capabilities\":[\"Azure\",\"OutboundCalling\",\"UserAssignment\",\"Geographic\"],\"maximumSearchSize\":20},{\"phonePlanId\":\"sanitized\",\"localizedName\":\"Inbound Only PSTN For User - Geographic\",\"locationType\":\"Selection\",\"areaCodes\":[],\"capabilities\":[\"Azure\",\"InboundCalling\",\"UserAssignment\",\"Geographic\"],\"maximumSearchSize\":20}],\"nextLink\":null}", + "responseHeaders": { + "content-type": "application/json; charset=utf-8" + } + }, + { + "method": "POST", + "url": "https://endpoint/administration/phonenumbers/countries/US/areacodes", + "query": { + "locationType": "selection", + "phonePlanId": "sanitized", + "api-version": "2020-07-20-preview1" + }, + "requestBody": "{\"locationOptions\":[{\"labelId\":\"state\",\"optionsValue\":\"AL\"},{\"labelId\":\"city\",\"optionsValue\":\"NOAM-US-AL-BI\"}]}", + "status": 200, + "response": "{\"primaryAreaCodes\":[\"205\"],\"secondaryAreaCodes\":[],\"nextLink\":null}", + "responseHeaders": { + "content-type": "application/json; charset=utf-8" + } + } + ], + "uniqueTestInfo": { + "uniqueName": {}, + "newDate": {} + }, + "hash": "b0a814d54eafea9644bc831932887409" +} diff --git a/sdk/communication/communication-administration/recordings/browsers/phonenumber__lros__phone_number_reservations_playbacklive/recording_can_wait_until_a_search_is_completed.json b/sdk/communication/communication-administration/recordings/browsers/phonenumber__lros__phone_number_reservations_playbacklive/recording_can_wait_until_a_search_is_completed.json new file mode 100644 index 000000000000..d3903685b9e1 --- /dev/null +++ b/sdk/communication/communication-administration/recordings/browsers/phonenumber__lros__phone_number_reservations_playbacklive/recording_can_wait_until_a_search_is_completed.json @@ -0,0 +1,113 @@ +{ + "recordings": [ + { + "method": "POST", + "url": "https://endpoint/administration/phonenumbers/searches", + "query": { + "api-version": "2020-07-20-preview1" + }, + "requestBody": "{\"displayName\":\"LRO Test Search\",\"description\":\"Test search for JS phone number admin SDK.\",\"phonePlanIds\":[\"sanitized\",\"sanitized\"],\"areaCode\":\"205\",\"quantity\":1}", + "status": 201, + "response": "{\"searchId\":\"sanitized\"}", + "responseHeaders": { + "content-type": "application/json; charset=utf-8" + } + }, + { + "method": "GET", + "url": "https://endpoint/administration/phonenumbers/searches/sanitized", + "query": { + "api-version": "2020-07-20-preview1" + }, + "requestBody": null, + "status": 200, + "response": "{\"searchId\":\"sanitized\",\"displayName\":\"LRO Test Search\",\"createdAt\":\"2020-10-07T20:48:15.1739576+00:00\",\"description\":\"Test search for JS phone number admin SDK.\",\"phonePlanIds\":[\"sanitized\",\"sanitized\"],\"areaCode\":\"205\",\"quantity\":1,\"locationOptions\":[],\"status\":\"Pending\",\"phoneNumbers\":[]}", + "responseHeaders": { + "content-type": "application/json; charset=utf-8" + } + }, + { + "method": "GET", + "url": "https://endpoint/administration/phonenumbers/searches/sanitized", + "query": { + "api-version": "2020-07-20-preview1" + }, + "requestBody": null, + "status": 200, + "response": "{\"searchId\":\"sanitized\",\"displayName\":\"LRO Test Search\",\"createdAt\":\"2020-10-07T20:48:15.1739576+00:00\",\"description\":\"Test search for JS phone number admin SDK.\",\"phonePlanIds\":[\"sanitized\",\"sanitized\"],\"areaCode\":\"205\",\"quantity\":1,\"locationOptions\":[],\"status\":\"Pending\",\"phoneNumbers\":[]}", + "responseHeaders": { + "content-type": "application/json; charset=utf-8" + } + }, + { + "method": "GET", + "url": "https://endpoint/administration/phonenumbers/searches/sanitized", + "query": { + "api-version": "2020-07-20-preview1" + }, + "requestBody": null, + "status": 200, + "response": "{\"searchId\":\"sanitized\",\"displayName\":\"LRO Test Search\",\"createdAt\":\"2020-10-07T20:48:15.1739576+00:00\",\"description\":\"Test search for JS phone number admin SDK.\",\"phonePlanIds\":[\"sanitized\",\"sanitized\"],\"areaCode\":\"205\",\"quantity\":1,\"locationOptions\":[],\"status\":\"Pending\",\"phoneNumbers\":[]}", + "responseHeaders": { + "content-type": "application/json; charset=utf-8" + } + }, + { + "method": "GET", + "url": "https://endpoint/administration/phonenumbers/searches/sanitized", + "query": { + "api-version": "2020-07-20-preview1" + }, + "requestBody": null, + "status": 200, + "response": "{\"searchId\":\"sanitized\",\"displayName\":\"LRO Test Search\",\"createdAt\":\"2020-10-07T20:48:15.1739576+00:00\",\"description\":\"Test search for JS phone number admin SDK.\",\"phonePlanIds\":[\"sanitized\",\"sanitized\"],\"areaCode\":\"205\",\"quantity\":1,\"locationOptions\":[],\"status\":\"Pending\",\"phoneNumbers\":[]}", + "responseHeaders": { + "content-type": "application/json; charset=utf-8" + } + }, + { + "method": "GET", + "url": "https://endpoint/administration/phonenumbers/searches/sanitized", + "query": { + "api-version": "2020-07-20-preview1" + }, + "requestBody": null, + "status": 200, + "response": "{\"searchId\":\"sanitized\",\"displayName\":\"LRO Test Search\",\"createdAt\":\"2020-10-07T20:48:15.1739576+00:00\",\"description\":\"Test search for JS phone number admin SDK.\",\"phonePlanIds\":[\"sanitized\",\"sanitized\"],\"areaCode\":\"205\",\"quantity\":1,\"locationOptions\":[],\"status\":\"Pending\",\"phoneNumbers\":[]}", + "responseHeaders": { + "content-type": "application/json; charset=utf-8" + } + }, + { + "method": "GET", + "url": "https://endpoint/administration/phonenumbers/searches/sanitized", + "query": { + "api-version": "2020-07-20-preview1" + }, + "requestBody": null, + "status": 200, + "response": "{\"searchId\":\"sanitized\",\"displayName\":\"LRO Test Search\",\"createdAt\":\"2020-10-07T20:48:15.1739576+00:00\",\"description\":\"Test search for JS phone number admin SDK.\",\"phonePlanIds\":[\"sanitized\",\"sanitized\"],\"areaCode\":\"205\",\"quantity\":1,\"locationOptions\":[],\"status\":\"InProgress\",\"phoneNumbers\":[]}", + "responseHeaders": { + "content-type": "application/json; charset=utf-8" + } + }, + { + "method": "GET", + "url": "https://endpoint/administration/phonenumbers/searches/sanitized", + "query": { + "api-version": "2020-07-20-preview1" + }, + "requestBody": null, + "status": 200, + "response": "{\"searchId\":\"sanitized\",\"displayName\":\"LRO Test Search\",\"createdAt\":\"2020-10-07T20:48:15.1739576+00:00\",\"description\":\"Test search for JS phone number admin SDK.\",\"phonePlanIds\":[\"sanitized\",\"sanitized\"],\"areaCode\":\"205\",\"quantity\":1,\"locationOptions\":[],\"status\":\"Reserved\",\"phoneNumbers\":[\"+18005551234\"],\"reservationExpiryDate\":\"2020-10-07T21:04:26.9032882+00:00\"}", + "responseHeaders": { + "content-type": "application/json; charset=utf-8" + } + } + ], + "uniqueTestInfo": { + "uniqueName": {}, + "newDate": {} + }, + "hash": "edba9905c768c0d30a37628567712508" +} diff --git a/sdk/communication/communication-administration/recordings/browsers/phonenumber__lros__purchase_reservation_playbacklive/recording_can_get_phoneplanids_and_areacode_to_create_reservation.json b/sdk/communication/communication-administration/recordings/browsers/phonenumber__lros__purchase_reservation_playbacklive/recording_can_get_phoneplanids_and_areacode_to_create_reservation.json new file mode 100644 index 000000000000..6dd29b458293 --- /dev/null +++ b/sdk/communication/communication-administration/recordings/browsers/phonenumber__lros__purchase_reservation_playbacklive/recording_can_get_phoneplanids_and_areacode_to_create_reservation.json @@ -0,0 +1,57 @@ +{ + "recordings": [ + { + "method": "GET", + "url": "https://endpoint/administration/phonenumbers/countries/US/phoneplangroups", + "query": { + "locale": "en-US", + "includeRateInformation": "false", + "skip": "0", + "take": "100", + "api-version": "2020-07-20-preview1" + }, + "requestBody": null, + "status": 200, + "response": "{\"phonePlanGroups\":[{\"phonePlanGroupId\":\"sanitized\",\"phoneNumberType\":\"Geographic\",\"localizedName\":\"Azure- User - Geographic\",\"localizedDescription\":\"These are numbers used by Azure resources.\"},{\"phonePlanGroupId\":\"sanitized\",\"phoneNumberType\":\"Geographic\",\"localizedName\":\"Azure - Geographic\",\"localizedDescription\":\"These are numbers used by Azure resources.\"},{\"phonePlanGroupId\":\"sanitized\",\"phoneNumberType\":\"TollFree\",\"localizedName\":\"Azure - Toll Free\",\"localizedDescription\":\"These are toll free numbers used by Azure resources.\"}],\"nextLink\":null}", + "responseHeaders": { + "content-type": "application/json; charset=utf-8" + } + }, + { + "method": "GET", + "url": "https://endpoint/administration/phonenumbers/countries/US/phoneplangroups/sanitized/phoneplans", + "query": { + "locale": "en-US", + "skip": "0", + "take": "100", + "api-version": "2020-07-20-preview1" + }, + "requestBody": null, + "status": 200, + "response": "{\"phonePlans\":[{\"phonePlanId\":\"sanitized\",\"localizedName\":\"Outbound Only PSTN For User - Geographic\",\"locationType\":\"Selection\",\"areaCodes\":[],\"capabilities\":[\"Azure\",\"OutboundCalling\",\"UserAssignment\",\"Geographic\"],\"maximumSearchSize\":20},{\"phonePlanId\":\"sanitized\",\"localizedName\":\"Inbound Only PSTN For User - Geographic\",\"locationType\":\"Selection\",\"areaCodes\":[],\"capabilities\":[\"Azure\",\"InboundCalling\",\"UserAssignment\",\"Geographic\"],\"maximumSearchSize\":20}],\"nextLink\":null}", + "responseHeaders": { + "content-type": "application/json; charset=utf-8" + } + }, + { + "method": "POST", + "url": "https://endpoint/administration/phonenumbers/countries/US/areacodes", + "query": { + "locationType": "selection", + "phonePlanId": "sanitized", + "api-version": "2020-07-20-preview1" + }, + "requestBody": "{\"locationOptions\":[{\"labelId\":\"state\",\"optionsValue\":\"AL\"},{\"labelId\":\"city\",\"optionsValue\":\"NOAM-US-AL-BI\"}]}", + "status": 200, + "response": "{\"primaryAreaCodes\":[\"205\"],\"secondaryAreaCodes\":[],\"nextLink\":null}", + "responseHeaders": { + "content-type": "application/json; charset=utf-8" + } + } + ], + "uniqueTestInfo": { + "uniqueName": {}, + "newDate": {} + }, + "hash": "df74d026b1ccd12f7e3c651b5332010b" +} diff --git a/sdk/communication/communication-administration/recordings/browsers/phonenumber__lros__purchase_reservation_playbacklive/recording_can_wait_until_a_reservation_is_purchased.json b/sdk/communication/communication-administration/recordings/browsers/phonenumber__lros__purchase_reservation_playbacklive/recording_can_wait_until_a_reservation_is_purchased.json new file mode 100644 index 000000000000..c5d19a213fda --- /dev/null +++ b/sdk/communication/communication-administration/recordings/browsers/phonenumber__lros__purchase_reservation_playbacklive/recording_can_wait_until_a_reservation_is_purchased.json @@ -0,0 +1,360 @@ +{ + "recordings": [ + { + "method": "POST", + "url": "https://endpoint/administration/phonenumbers/searches", + "query": { + "api-version": "2020-07-20-preview1" + }, + "requestBody": "{\"displayName\":\"LRO Test Search\",\"description\":\"Test search for JS phone number admin SDK.\",\"phonePlanIds\":[\"sanitized\",\"sanitized\"],\"areaCode\":\"205\",\"quantity\":1}", + "status": 201, + "response": "{\"searchId\":\"sanitized\"}", + "responseHeaders": { + "content-type": "application/json; charset=utf-8" + } + }, + { + "method": "GET", + "url": "https://endpoint/administration/phonenumbers/searches/sanitized", + "query": { + "api-version": "2020-07-20-preview1" + }, + "requestBody": null, + "status": 200, + "response": "{\"searchId\":\"sanitized\",\"displayName\":\"LRO Test Search\",\"createdAt\":\"2020-10-07T21:56:11.9518497+00:00\",\"description\":\"Test search for JS phone number admin SDK.\",\"phonePlanIds\":[\"sanitized\",\"sanitized\"],\"areaCode\":\"205\",\"quantity\":1,\"locationOptions\":[],\"status\":\"Pending\",\"phoneNumbers\":[]}", + "responseHeaders": { + "content-type": "application/json; charset=utf-8" + } + }, + { + "method": "GET", + "url": "https://endpoint/administration/phonenumbers/searches/sanitized", + "query": { + "api-version": "2020-07-20-preview1" + }, + "requestBody": null, + "status": 200, + "response": "{\"searchId\":\"sanitized\",\"displayName\":\"LRO Test Search\",\"createdAt\":\"2020-10-07T21:56:11.9518497+00:00\",\"description\":\"Test search for JS phone number admin SDK.\",\"phonePlanIds\":[\"sanitized\",\"sanitized\"],\"areaCode\":\"205\",\"quantity\":1,\"locationOptions\":[],\"status\":\"Pending\",\"phoneNumbers\":[]}", + "responseHeaders": { + "content-type": "application/json; charset=utf-8" + } + }, + { + "method": "GET", + "url": "https://endpoint/administration/phonenumbers/searches/sanitized", + "query": { + "api-version": "2020-07-20-preview1" + }, + "requestBody": null, + "status": 200, + "response": "{\"searchId\":\"sanitized\",\"displayName\":\"LRO Test Search\",\"createdAt\":\"2020-10-07T21:56:11.9518497+00:00\",\"description\":\"Test search for JS phone number admin SDK.\",\"phonePlanIds\":[\"sanitized\",\"sanitized\"],\"areaCode\":\"205\",\"quantity\":1,\"locationOptions\":[],\"status\":\"Pending\",\"phoneNumbers\":[]}", + "responseHeaders": { + "content-type": "application/json; charset=utf-8" + } + }, + { + "method": "GET", + "url": "https://endpoint/administration/phonenumbers/searches/sanitized", + "query": { + "api-version": "2020-07-20-preview1" + }, + "requestBody": null, + "status": 200, + "response": "{\"searchId\":\"sanitized\",\"displayName\":\"LRO Test Search\",\"createdAt\":\"2020-10-07T21:56:11.9518497+00:00\",\"description\":\"Test search for JS phone number admin SDK.\",\"phonePlanIds\":[\"sanitized\",\"sanitized\"],\"areaCode\":\"205\",\"quantity\":1,\"locationOptions\":[],\"status\":\"Pending\",\"phoneNumbers\":[]}", + "responseHeaders": { + "content-type": "application/json; charset=utf-8" + } + }, + { + "method": "GET", + "url": "https://endpoint/administration/phonenumbers/searches/sanitized", + "query": { + "api-version": "2020-07-20-preview1" + }, + "requestBody": null, + "status": 200, + "response": "{\"searchId\":\"sanitized\",\"displayName\":\"LRO Test Search\",\"createdAt\":\"2020-10-07T21:56:11.9518497+00:00\",\"description\":\"Test search for JS phone number admin SDK.\",\"phonePlanIds\":[\"sanitized\",\"sanitized\"],\"areaCode\":\"205\",\"quantity\":1,\"locationOptions\":[],\"status\":\"Pending\",\"phoneNumbers\":[]}", + "responseHeaders": { + "content-type": "application/json; charset=utf-8" + } + }, + { + "method": "GET", + "url": "https://endpoint/administration/phonenumbers/searches/sanitized", + "query": { + "api-version": "2020-07-20-preview1" + }, + "requestBody": null, + "status": 200, + "response": "{\"searchId\":\"sanitized\",\"displayName\":\"LRO Test Search\",\"createdAt\":\"2020-10-07T21:56:11.9518497+00:00\",\"description\":\"Test search for JS phone number admin SDK.\",\"phonePlanIds\":[\"sanitized\",\"sanitized\"],\"areaCode\":\"205\",\"quantity\":1,\"locationOptions\":[],\"status\":\"Pending\",\"phoneNumbers\":[]}", + "responseHeaders": { + "content-type": "application/json; charset=utf-8" + } + }, + { + "method": "GET", + "url": "https://endpoint/administration/phonenumbers/searches/sanitized", + "query": { + "api-version": "2020-07-20-preview1" + }, + "requestBody": null, + "status": 200, + "response": "{\"searchId\":\"sanitized\",\"displayName\":\"LRO Test Search\",\"createdAt\":\"2020-10-07T21:56:11.9518497+00:00\",\"description\":\"Test search for JS phone number admin SDK.\",\"phonePlanIds\":[\"sanitized\",\"sanitized\"],\"areaCode\":\"205\",\"quantity\":1,\"locationOptions\":[],\"status\":\"Pending\",\"phoneNumbers\":[]}", + "responseHeaders": { + "content-type": "application/json; charset=utf-8" + } + }, + { + "method": "GET", + "url": "https://endpoint/administration/phonenumbers/searches/sanitized", + "query": { + "api-version": "2020-07-20-preview1" + }, + "requestBody": null, + "status": 200, + "response": "{\"searchId\":\"sanitized\",\"displayName\":\"LRO Test Search\",\"createdAt\":\"2020-10-07T21:56:11.9518497+00:00\",\"description\":\"Test search for JS phone number admin SDK.\",\"phonePlanIds\":[\"sanitized\",\"sanitized\"],\"areaCode\":\"205\",\"quantity\":1,\"locationOptions\":[],\"status\":\"Pending\",\"phoneNumbers\":[]}", + "responseHeaders": { + "content-type": "application/json; charset=utf-8" + } + }, + { + "method": "GET", + "url": "https://endpoint/administration/phonenumbers/searches/sanitized", + "query": { + "api-version": "2020-07-20-preview1" + }, + "requestBody": null, + "status": 200, + "response": "{\"searchId\":\"sanitized\",\"displayName\":\"LRO Test Search\",\"createdAt\":\"2020-10-07T21:56:11.9518497+00:00\",\"description\":\"Test search for JS phone number admin SDK.\",\"phonePlanIds\":[\"sanitized\",\"sanitized\"],\"areaCode\":\"205\",\"quantity\":1,\"locationOptions\":[],\"status\":\"Pending\",\"phoneNumbers\":[]}", + "responseHeaders": { + "content-type": "application/json; charset=utf-8" + } + }, + { + "method": "GET", + "url": "https://endpoint/administration/phonenumbers/searches/sanitized", + "query": { + "api-version": "2020-07-20-preview1" + }, + "requestBody": null, + "status": 200, + "response": "{\"searchId\":\"sanitized\",\"displayName\":\"LRO Test Search\",\"createdAt\":\"2020-10-07T21:56:11.9518497+00:00\",\"description\":\"Test search for JS phone number admin SDK.\",\"phonePlanIds\":[\"sanitized\",\"sanitized\"],\"areaCode\":\"205\",\"quantity\":1,\"locationOptions\":[],\"status\":\"Pending\",\"phoneNumbers\":[]}", + "responseHeaders": { + "content-type": "application/json; charset=utf-8" + } + }, + { + "method": "GET", + "url": "https://endpoint/administration/phonenumbers/searches/sanitized", + "query": { + "api-version": "2020-07-20-preview1" + }, + "requestBody": null, + "status": 200, + "response": "{\"searchId\":\"sanitized\",\"displayName\":\"LRO Test Search\",\"createdAt\":\"2020-10-07T21:56:11.9518497+00:00\",\"description\":\"Test search for JS phone number admin SDK.\",\"phonePlanIds\":[\"sanitized\",\"sanitized\"],\"areaCode\":\"205\",\"quantity\":1,\"locationOptions\":[],\"status\":\"Pending\",\"phoneNumbers\":[]}", + "responseHeaders": { + "content-type": "application/json; charset=utf-8" + } + }, + { + "method": "GET", + "url": "https://endpoint/administration/phonenumbers/searches/sanitized", + "query": { + "api-version": "2020-07-20-preview1" + }, + "requestBody": null, + "status": 200, + "response": "{\"searchId\":\"sanitized\",\"displayName\":\"LRO Test Search\",\"createdAt\":\"2020-10-07T21:56:11.9518497+00:00\",\"description\":\"Test search for JS phone number admin SDK.\",\"phonePlanIds\":[\"sanitized\",\"sanitized\"],\"areaCode\":\"205\",\"quantity\":1,\"locationOptions\":[],\"status\":\"Pending\",\"phoneNumbers\":[]}", + "responseHeaders": { + "content-type": "application/json; charset=utf-8" + } + }, + { + "method": "GET", + "url": "https://endpoint/administration/phonenumbers/searches/sanitized", + "query": { + "api-version": "2020-07-20-preview1" + }, + "requestBody": null, + "status": 200, + "response": "{\"searchId\":\"sanitized\",\"displayName\":\"LRO Test Search\",\"createdAt\":\"2020-10-07T21:56:11.9518497+00:00\",\"description\":\"Test search for JS phone number admin SDK.\",\"phonePlanIds\":[\"sanitized\",\"sanitized\"],\"areaCode\":\"205\",\"quantity\":1,\"locationOptions\":[],\"status\":\"Pending\",\"phoneNumbers\":[]}", + "responseHeaders": { + "content-type": "application/json; charset=utf-8" + } + }, + { + "method": "GET", + "url": "https://endpoint/administration/phonenumbers/searches/sanitized", + "query": { + "api-version": "2020-07-20-preview1" + }, + "requestBody": null, + "status": 200, + "response": "{\"searchId\":\"sanitized\",\"displayName\":\"LRO Test Search\",\"createdAt\":\"2020-10-07T21:56:11.9518497+00:00\",\"description\":\"Test search for JS phone number admin SDK.\",\"phonePlanIds\":[\"sanitized\",\"sanitized\"],\"areaCode\":\"205\",\"quantity\":1,\"locationOptions\":[],\"status\":\"Pending\",\"phoneNumbers\":[]}", + "responseHeaders": { + "content-type": "application/json; charset=utf-8" + } + }, + { + "method": "GET", + "url": "https://endpoint/administration/phonenumbers/searches/sanitized", + "query": { + "api-version": "2020-07-20-preview1" + }, + "requestBody": null, + "status": 200, + "response": "{\"searchId\":\"sanitized\",\"displayName\":\"LRO Test Search\",\"createdAt\":\"2020-10-07T21:56:11.9518497+00:00\",\"description\":\"Test search for JS phone number admin SDK.\",\"phonePlanIds\":[\"sanitized\",\"sanitized\"],\"areaCode\":\"205\",\"quantity\":1,\"locationOptions\":[],\"status\":\"Reserved\",\"phoneNumbers\":[\"+18005551234\"],\"reservationExpiryDate\":\"2020-10-07T22:12:44.0054377+00:00\"}", + "responseHeaders": { + "content-type": "application/json; charset=utf-8" + } + }, + { + "method": "POST", + "url": "https://endpoint/administration/phonenumbers/searches/sanitized/purchase", + "query": { + "api-version": "2020-07-20-preview1" + }, + "requestBody": null, + "status": 202, + "response": "", + "responseHeaders": { + "content-length": "0" + } + }, + { + "method": "GET", + "url": "https://endpoint/administration/phonenumbers/searches/sanitized", + "query": { + "api-version": "2020-07-20-preview1" + }, + "requestBody": null, + "status": 200, + "response": "{\"searchId\":\"sanitized\",\"displayName\":\"LRO Test Search\",\"createdAt\":\"2020-10-07T21:56:11.9518497+00:00\",\"description\":\"Test search for JS phone number admin SDK.\",\"phonePlanIds\":[\"sanitized\",\"sanitized\"],\"areaCode\":\"205\",\"quantity\":1,\"locationOptions\":[],\"status\":\"Completing\",\"phoneNumbers\":[\"+18005551234\"],\"reservationExpiryDate\":\"2020-10-07T22:12:44.0054377+00:00\"}", + "responseHeaders": { + "content-type": "application/json; charset=utf-8" + } + }, + { + "method": "GET", + "url": "https://endpoint/administration/phonenumbers/searches/sanitized", + "query": { + "api-version": "2020-07-20-preview1" + }, + "requestBody": null, + "status": 200, + "response": "{\"searchId\":\"sanitized\",\"displayName\":\"LRO Test Search\",\"createdAt\":\"2020-10-07T21:56:11.9518497+00:00\",\"description\":\"Test search for JS phone number admin SDK.\",\"phonePlanIds\":[\"sanitized\",\"sanitized\"],\"areaCode\":\"205\",\"quantity\":1,\"locationOptions\":[],\"status\":\"Completing\",\"phoneNumbers\":[\"+18005551234\"],\"reservationExpiryDate\":\"2020-10-07T22:12:44.0054377+00:00\"}", + "responseHeaders": { + "content-type": "application/json; charset=utf-8" + } + }, + { + "method": "GET", + "url": "https://endpoint/administration/phonenumbers/searches/sanitized", + "query": { + "api-version": "2020-07-20-preview1" + }, + "requestBody": null, + "status": 200, + "response": "{\"searchId\":\"sanitized\",\"displayName\":\"LRO Test Search\",\"createdAt\":\"2020-10-07T21:56:11.9518497+00:00\",\"description\":\"Test search for JS phone number admin SDK.\",\"phonePlanIds\":[\"sanitized\",\"sanitized\"],\"areaCode\":\"205\",\"quantity\":1,\"locationOptions\":[],\"status\":\"Completing\",\"phoneNumbers\":[\"+18005551234\"],\"reservationExpiryDate\":\"2020-10-07T22:12:44.0054377+00:00\"}", + "responseHeaders": { + "content-type": "application/json; charset=utf-8" + } + }, + { + "method": "GET", + "url": "https://endpoint/administration/phonenumbers/searches/sanitized", + "query": { + "api-version": "2020-07-20-preview1" + }, + "requestBody": null, + "status": 200, + "response": "{\"searchId\":\"sanitized\",\"displayName\":\"LRO Test Search\",\"createdAt\":\"2020-10-07T21:56:11.9518497+00:00\",\"description\":\"Test search for JS phone number admin SDK.\",\"phonePlanIds\":[\"sanitized\",\"sanitized\"],\"areaCode\":\"205\",\"quantity\":1,\"locationOptions\":[],\"status\":\"Completing\",\"phoneNumbers\":[\"+18005551234\"],\"reservationExpiryDate\":\"2020-10-07T22:12:44.0054377+00:00\"}", + "responseHeaders": { + "content-type": "application/json; charset=utf-8" + } + }, + { + "method": "GET", + "url": "https://endpoint/administration/phonenumbers/searches/sanitized", + "query": { + "api-version": "2020-07-20-preview1" + }, + "requestBody": null, + "status": 200, + "response": "{\"searchId\":\"sanitized\",\"displayName\":\"LRO Test Search\",\"createdAt\":\"2020-10-07T21:56:11.9518497+00:00\",\"description\":\"Test search for JS phone number admin SDK.\",\"phonePlanIds\":[\"sanitized\",\"sanitized\"],\"areaCode\":\"205\",\"quantity\":1,\"locationOptions\":[],\"status\":\"Completing\",\"phoneNumbers\":[\"+18005551234\"],\"reservationExpiryDate\":\"2020-10-07T22:12:44.0054377+00:00\"}", + "responseHeaders": { + "content-type": "application/json; charset=utf-8" + } + }, + { + "method": "GET", + "url": "https://endpoint/administration/phonenumbers/searches/sanitized", + "query": { + "api-version": "2020-07-20-preview1" + }, + "requestBody": null, + "status": 200, + "response": "{\"searchId\":\"sanitized\",\"displayName\":\"LRO Test Search\",\"createdAt\":\"2020-10-07T21:56:11.9518497+00:00\",\"description\":\"Test search for JS phone number admin SDK.\",\"phonePlanIds\":[\"sanitized\",\"sanitized\"],\"areaCode\":\"205\",\"quantity\":1,\"locationOptions\":[],\"status\":\"PurchasePending\",\"phoneNumbers\":[\"+18005551234\"],\"reservationExpiryDate\":\"2020-10-07T22:12:44.0054377+00:00\"}", + "responseHeaders": { + "content-type": "application/json; charset=utf-8" + } + }, + { + "method": "GET", + "url": "https://endpoint/administration/phonenumbers/searches/sanitized", + "query": { + "api-version": "2020-07-20-preview1" + }, + "requestBody": null, + "status": 200, + "response": "{\"searchId\":\"sanitized\",\"displayName\":\"LRO Test Search\",\"createdAt\":\"2020-10-07T21:56:11.9518497+00:00\",\"description\":\"Test search for JS phone number admin SDK.\",\"phonePlanIds\":[\"sanitized\",\"sanitized\"],\"areaCode\":\"205\",\"quantity\":1,\"locationOptions\":[],\"status\":\"PurchasePending\",\"phoneNumbers\":[\"+18005551234\"],\"reservationExpiryDate\":\"2020-10-07T22:12:44.0054377+00:00\"}", + "responseHeaders": { + "content-type": "application/json; charset=utf-8" + } + }, + { + "method": "GET", + "url": "https://endpoint/administration/phonenumbers/searches/sanitized", + "query": { + "api-version": "2020-07-20-preview1" + }, + "requestBody": null, + "status": 200, + "response": "{\"searchId\":\"sanitized\",\"displayName\":\"LRO Test Search\",\"createdAt\":\"2020-10-07T21:56:11.9518497+00:00\",\"description\":\"Test search for JS phone number admin SDK.\",\"phonePlanIds\":[\"sanitized\",\"sanitized\"],\"areaCode\":\"205\",\"quantity\":1,\"locationOptions\":[],\"status\":\"PurchasePending\",\"phoneNumbers\":[\"+18005551234\"],\"reservationExpiryDate\":\"2020-10-07T22:12:44.0054377+00:00\"}", + "responseHeaders": { + "content-type": "application/json; charset=utf-8" + } + }, + { + "method": "GET", + "url": "https://endpoint/administration/phonenumbers/searches/sanitized", + "query": { + "api-version": "2020-07-20-preview1" + }, + "requestBody": null, + "status": 200, + "response": "{\"searchId\":\"sanitized\",\"displayName\":\"LRO Test Search\",\"createdAt\":\"2020-10-07T21:56:11.9518497+00:00\",\"description\":\"Test search for JS phone number admin SDK.\",\"phonePlanIds\":[\"sanitized\",\"sanitized\"],\"areaCode\":\"205\",\"quantity\":1,\"locationOptions\":[],\"status\":\"PurchasePending\",\"phoneNumbers\":[\"+18005551234\"],\"reservationExpiryDate\":\"2020-10-07T22:12:44.0054377+00:00\"}", + "responseHeaders": { + "content-type": "application/json; charset=utf-8" + } + }, + { + "method": "GET", + "url": "https://endpoint/administration/phonenumbers/searches/sanitized", + "query": { + "api-version": "2020-07-20-preview1" + }, + "requestBody": null, + "status": 200, + "response": "{\"searchId\":\"sanitized\",\"displayName\":\"LRO Test Search\",\"createdAt\":\"2020-10-07T21:56:11.9518497+00:00\",\"description\":\"Test search for JS phone number admin SDK.\",\"phonePlanIds\":[\"sanitized\",\"sanitized\"],\"areaCode\":\"205\",\"quantity\":1,\"locationOptions\":[],\"status\":\"Success\",\"phoneNumbers\":[\"+18005551234\"],\"reservationExpiryDate\":\"2020-10-07T22:12:44.0054377+00:00\"}", + "responseHeaders": { + "content-type": "application/json; charset=utf-8" + } + } + ], + "uniqueTestInfo": { + "uniqueName": {}, + "newDate": {} + }, + "hash": "67c8cc765b225bbbbb6eb313a0f2e88d" +} diff --git a/sdk/communication/communication-administration/recordings/browsers/phonenumber__lros__release_playbacklive/recording_can_get_phone_number_to_release.json b/sdk/communication/communication-administration/recordings/browsers/phonenumber__lros__release_playbacklive/recording_can_get_phone_number_to_release.json new file mode 100644 index 000000000000..e3a987f4c477 --- /dev/null +++ b/sdk/communication/communication-administration/recordings/browsers/phonenumber__lros__release_playbacklive/recording_can_get_phone_number_to_release.json @@ -0,0 +1,25 @@ +{ + "recordings": [ + { + "method": "GET", + "url": "https://endpoint/administration/phonenumbers/phonenumbers", + "query": { + "locale": "en-US", + "skip": "0", + "take": "100", + "api-version": "2020-07-20-preview1" + }, + "requestBody": null, + "status": 200, + "response": "{\"phoneNumbers\":[{\"phoneNumber\":\"+18005551234\",\"acquiredCapabilities\":[\"Azure\",\"InboundCalling\",\"UserAssignment\",\"Geographic\",\"OutboundCalling\"],\"availableCapabilities\":[\"UserAssignment\",\"Geographic\",\"Azure\",\"Office365\",\"InboundCalling\",\"OutboundCalling\"],\"assignmentStatus\":\"Unassigned\",\"placeName\":\"Birmingham, United States\",\"activationState\":\"Activated\"}],\"nextLink\":null}", + "responseHeaders": { + "content-type": "application/json; charset=utf-8" + } + } + ], + "uniqueTestInfo": { + "uniqueName": {}, + "newDate": {} + }, + "hash": "cfeccafb622f2df9d7e8ca9e42e7c809" +} diff --git a/sdk/communication/communication-administration/recordings/browsers/phonenumber__lros__release_playbacklive/recording_can_wait_until_a_phone_number_is_released.json b/sdk/communication/communication-administration/recordings/browsers/phonenumber__lros__release_playbacklive/recording_can_wait_until_a_phone_number_is_released.json new file mode 100644 index 000000000000..ab7b6368f1c3 --- /dev/null +++ b/sdk/communication/communication-administration/recordings/browsers/phonenumber__lros__release_playbacklive/recording_can_wait_until_a_phone_number_is_released.json @@ -0,0 +1,165 @@ +{ + "recordings": [ + { + "method": "POST", + "url": "https://endpoint/administration/phonenumbers/releases", + "query": { + "api-version": "2020-07-20-preview1" + }, + "requestBody": "{\"phoneNumbers\":[\"+18005551234\"]}", + "status": 200, + "response": "{\"releaseId\":\"sanitized\"}", + "responseHeaders": { + "content-type": "application/json; charset=utf-8" + } + }, + { + "method": "GET", + "url": "https://endpoint/administration/phonenumbers/releases/sanitized", + "query": { + "api-version": "2020-07-20-preview1" + }, + "requestBody": null, + "status": 200, + "response": "{\"releaseId\":\"sanitized\",\"createdAt\":\"2020-10-07T21:52:10.3728653+00:00\",\"status\":\"Pending\",\"phoneNumberReleaseStatusDetails\":{\"+18005551234\":{\"status\":\"Pending\"}}}", + "responseHeaders": { + "content-type": "application/json; charset=utf-8" + } + }, + { + "method": "GET", + "url": "https://endpoint/administration/phonenumbers/releases/sanitized", + "query": { + "api-version": "2020-07-20-preview1" + }, + "requestBody": null, + "status": 200, + "response": "{\"releaseId\":\"sanitized\",\"createdAt\":\"2020-10-07T21:52:10.3728653+00:00\",\"status\":\"Pending\",\"phoneNumberReleaseStatusDetails\":{\"+18005551234\":{\"status\":\"Pending\"}}}", + "responseHeaders": { + "content-type": "application/json; charset=utf-8" + } + }, + { + "method": "GET", + "url": "https://endpoint/administration/phonenumbers/releases/sanitized", + "query": { + "api-version": "2020-07-20-preview1" + }, + "requestBody": null, + "status": 200, + "response": "{\"releaseId\":\"sanitized\",\"createdAt\":\"2020-10-07T21:52:10.3728653+00:00\",\"status\":\"InProgress\",\"phoneNumberReleaseStatusDetails\":{\"+18005551234\":{\"status\":\"Pending\"}}}", + "responseHeaders": { + "content-type": "application/json; charset=utf-8" + } + }, + { + "method": "GET", + "url": "https://endpoint/administration/phonenumbers/releases/sanitized", + "query": { + "api-version": "2020-07-20-preview1" + }, + "requestBody": null, + "status": 200, + "response": "{\"releaseId\":\"sanitized\",\"createdAt\":\"2020-10-07T21:52:10.3728653+00:00\",\"status\":\"InProgress\",\"phoneNumberReleaseStatusDetails\":{\"+18005551234\":{\"status\":\"InProgress\"}}}", + "responseHeaders": { + "content-type": "application/json; charset=utf-8" + } + }, + { + "method": "GET", + "url": "https://endpoint/administration/phonenumbers/releases/sanitized", + "query": { + "api-version": "2020-07-20-preview1" + }, + "requestBody": null, + "status": 200, + "response": "{\"releaseId\":\"sanitized\",\"createdAt\":\"2020-10-07T21:52:10.3728653+00:00\",\"status\":\"InProgress\",\"phoneNumberReleaseStatusDetails\":{\"+18005551234\":{\"status\":\"InProgress\"}}}", + "responseHeaders": { + "content-type": "application/json; charset=utf-8" + } + }, + { + "method": "GET", + "url": "https://endpoint/administration/phonenumbers/releases/sanitized", + "query": { + "api-version": "2020-07-20-preview1" + }, + "requestBody": null, + "status": 200, + "response": "{\"releaseId\":\"sanitized\",\"createdAt\":\"2020-10-07T21:52:10.3728653+00:00\",\"status\":\"InProgress\",\"phoneNumberReleaseStatusDetails\":{\"+18005551234\":{\"status\":\"InProgress\"}}}", + "responseHeaders": { + "content-type": "application/json; charset=utf-8" + } + }, + { + "method": "GET", + "url": "https://endpoint/administration/phonenumbers/releases/sanitized", + "query": { + "api-version": "2020-07-20-preview1" + }, + "requestBody": null, + "status": 200, + "response": "{\"releaseId\":\"sanitized\",\"createdAt\":\"2020-10-07T21:52:10.3728653+00:00\",\"status\":\"InProgress\",\"phoneNumberReleaseStatusDetails\":{\"+18005551234\":{\"status\":\"InProgress\"}}}", + "responseHeaders": { + "content-type": "application/json; charset=utf-8" + } + }, + { + "method": "GET", + "url": "https://endpoint/administration/phonenumbers/releases/sanitized", + "query": { + "api-version": "2020-07-20-preview1" + }, + "requestBody": null, + "status": 200, + "response": "{\"releaseId\":\"sanitized\",\"createdAt\":\"2020-10-07T21:52:10.3728653+00:00\",\"status\":\"InProgress\",\"phoneNumberReleaseStatusDetails\":{\"+18005551234\":{\"status\":\"InProgress\"}}}", + "responseHeaders": { + "content-type": "application/json; charset=utf-8" + } + }, + { + "method": "GET", + "url": "https://endpoint/administration/phonenumbers/releases/sanitized", + "query": { + "api-version": "2020-07-20-preview1" + }, + "requestBody": null, + "status": 200, + "response": "{\"releaseId\":\"sanitized\",\"createdAt\":\"2020-10-07T21:52:10.3728653+00:00\",\"status\":\"InProgress\",\"phoneNumberReleaseStatusDetails\":{\"+18005551234\":{\"status\":\"InProgress\"}}}", + "responseHeaders": { + "content-type": "application/json; charset=utf-8" + } + }, + { + "method": "GET", + "url": "https://endpoint/administration/phonenumbers/releases/sanitized", + "query": { + "api-version": "2020-07-20-preview1" + }, + "requestBody": null, + "status": 200, + "response": "{\"releaseId\":\"sanitized\",\"createdAt\":\"2020-10-07T21:52:10.3728653+00:00\",\"status\":\"InProgress\",\"phoneNumberReleaseStatusDetails\":{\"+18005551234\":{\"status\":\"InProgress\"}}}", + "responseHeaders": { + "content-type": "application/json; charset=utf-8" + } + }, + { + "method": "GET", + "url": "https://endpoint/administration/phonenumbers/releases/sanitized", + "query": { + "api-version": "2020-07-20-preview1" + }, + "requestBody": null, + "status": 200, + "response": "{\"releaseId\":\"sanitized\",\"createdAt\":\"2020-10-07T21:52:10.3728653+00:00\",\"status\":\"Complete\",\"phoneNumberReleaseStatusDetails\":{\"+18005551234\":{\"status\":\"Success\"}}}", + "responseHeaders": { + "content-type": "application/json; charset=utf-8" + } + } + ], + "uniqueTestInfo": { + "uniqueName": {}, + "newDate": {} + }, + "hash": "ab703dbbc76631d8f46d18953b311965" +} diff --git a/sdk/communication/communication-administration/recordings/browsers/phonenumberadministrationclient_lists_playbacklive/recording_can_list_phone_numbers.json b/sdk/communication/communication-administration/recordings/browsers/phonenumberadministrationclient_lists_playbacklive/recording_can_list_phone_numbers.json new file mode 100644 index 000000000000..5377c4d764f7 --- /dev/null +++ b/sdk/communication/communication-administration/recordings/browsers/phonenumberadministrationclient_lists_playbacklive/recording_can_list_phone_numbers.json @@ -0,0 +1,25 @@ +{ + "recordings": [ + { + "method": "GET", + "url": "https://endpoint/administration/phonenumbers/phonenumbers", + "query": { + "locale": "en-US", + "skip": "0", + "take": "100", + "api-version": "2020-07-20-preview1" + }, + "requestBody": null, + "status": 200, + "response": "{\"phoneNumbers\":[{\"phoneNumber\":\"+18005551234\",\"acquiredCapabilities\":[\"Azure\",\"InboundCalling\",\"ThirdPartyAppAssignment\",\"Geographic\"],\"availableCapabilities\":[\"ConferenceAssignment\",\"Geographic\",\"FirstPartyAppAssignment\",\"ThirdPartyAppAssignment\",\"Azure\",\"Office365\",\"InboundCalling\",\"OutboundCalling\"],\"assignmentStatus\":\"Unknown\",\"placeName\":\"Los Angeles, United States\",\"activationState\":\"Activated\"},{\"phoneNumber\":\"+18005551234\",\"acquiredCapabilities\":[\"Azure\",\"InboundCalling\",\"ThirdPartyAppAssignment\",\"Geographic\"],\"availableCapabilities\":[\"ConferenceAssignment\",\"Geographic\",\"FirstPartyAppAssignment\",\"ThirdPartyAppAssignment\",\"Azure\",\"Office365\",\"InboundCalling\",\"OutboundCalling\"],\"assignmentStatus\":\"Unassigned\",\"placeName\":\"Los Angeles, United States\",\"activationState\":\"Activated\"},{\"phoneNumber\":\"+18005551234\",\"acquiredCapabilities\":[\"Azure\",\"InboundCalling\",\"ThirdPartyAppAssignment\",\"Geographic\"],\"availableCapabilities\":[\"ConferenceAssignment\",\"Geographic\",\"FirstPartyAppAssignment\",\"ThirdPartyAppAssignment\",\"Azure\",\"Office365\",\"InboundCalling\",\"OutboundCalling\"],\"assignmentStatus\":\"Unknown\",\"placeName\":\"Los Angeles, United States\",\"activationState\":\"Activated\"}],\"nextLink\":null}", + "responseHeaders": { + "content-type": "application/json; charset=utf-8" + } + } + ], + "uniqueTestInfo": { + "uniqueName": {}, + "newDate": {} + }, + "hash": "231e1fc55369bbe8715c795b9e9f1ee2" +} diff --git a/sdk/communication/communication-administration/recordings/browsers/phonenumberadministrationclient_lists_playbacklive/recording_can_list_phone_plan_groups.json b/sdk/communication/communication-administration/recordings/browsers/phonenumberadministrationclient_lists_playbacklive/recording_can_list_phone_plan_groups.json new file mode 100644 index 000000000000..0f5fa58b5de2 --- /dev/null +++ b/sdk/communication/communication-administration/recordings/browsers/phonenumberadministrationclient_lists_playbacklive/recording_can_list_phone_plan_groups.json @@ -0,0 +1,26 @@ +{ + "recordings": [ + { + "method": "GET", + "url": "https://endpoint/administration/phonenumbers/countries/US/phoneplangroups", + "query": { + "locale": "en-US", + "includeRateInformation": "false", + "skip": "0", + "take": "100", + "api-version": "2020-07-20-preview1" + }, + "requestBody": null, + "status": 200, + "response": "{\"phonePlanGroups\":[{\"phonePlanGroupId\":\"sanitized\",\"phoneNumberType\":\"Geographic\",\"localizedName\":\"Azure- User - Geographic\",\"localizedDescription\":\"These are numbers used by Azure resources.\"},{\"phonePlanGroupId\":\"sanitized\",\"phoneNumberType\":\"Geographic\",\"localizedName\":\"Azure - Geographic\",\"localizedDescription\":\"These are numbers used by Azure resources.\"},{\"phonePlanGroupId\":\"sanitized\",\"phoneNumberType\":\"TollFree\",\"localizedName\":\"Azure - Toll Free\",\"localizedDescription\":\"These are toll free numbers used by Azure resources.\"}],\"nextLink\":null}", + "responseHeaders": { + "content-type": "application/json; charset=utf-8" + } + } + ], + "uniqueTestInfo": { + "uniqueName": {}, + "newDate": {} + }, + "hash": "a6e19106ef129ebc3647fcb2d7881134" +} diff --git a/sdk/communication/communication-administration/recordings/browsers/phonenumberadministrationclient_lists_playbacklive/recording_can_list_phone_plans.json b/sdk/communication/communication-administration/recordings/browsers/phonenumberadministrationclient_lists_playbacklive/recording_can_list_phone_plans.json new file mode 100644 index 000000000000..983fd3b6c012 --- /dev/null +++ b/sdk/communication/communication-administration/recordings/browsers/phonenumberadministrationclient_lists_playbacklive/recording_can_list_phone_plans.json @@ -0,0 +1,25 @@ +{ + "recordings": [ + { + "method": "GET", + "url": "https://endpoint/administration/phonenumbers/countries/US/phoneplangroups/sanitized/phoneplans", + "query": { + "locale": "en-US", + "skip": "0", + "take": "100", + "api-version": "2020-07-20-preview1" + }, + "requestBody": null, + "status": 200, + "response": "{\"phonePlans\":[{\"phonePlanId\":\"sanitized\",\"localizedName\":\"Outbound Only PSTN For User - Geographic\",\"locationType\":\"Selection\",\"areaCodes\":[],\"capabilities\":[\"Azure\",\"OutboundCalling\",\"UserAssignment\",\"Geographic\"],\"maximumSearchSize\":20},{\"phonePlanId\":\"sanitized\",\"localizedName\":\"Inbound Only PSTN For User - Geographic\",\"locationType\":\"Selection\",\"areaCodes\":[],\"capabilities\":[\"Azure\",\"InboundCalling\",\"UserAssignment\",\"Geographic\"],\"maximumSearchSize\":20}],\"nextLink\":null}", + "responseHeaders": { + "content-type": "application/json; charset=utf-8" + } + } + ], + "uniqueTestInfo": { + "uniqueName": {}, + "newDate": {} + }, + "hash": "4e9d843e0e55da7167af1ff09b2addb6" +} diff --git a/sdk/communication/communication-administration/recordings/browsers/phonenumberadministrationclient_lists_playbacklive/recording_can_list_releases.json b/sdk/communication/communication-administration/recordings/browsers/phonenumberadministrationclient_lists_playbacklive/recording_can_list_releases.json new file mode 100644 index 000000000000..ef9eb6c0c998 --- /dev/null +++ b/sdk/communication/communication-administration/recordings/browsers/phonenumberadministrationclient_lists_playbacklive/recording_can_list_releases.json @@ -0,0 +1,24 @@ +{ + "recordings": [ + { + "method": "GET", + "url": "https://endpoint/administration/phonenumbers/releases", + "query": { + "skip": "0", + "take": "100", + "api-version": "2020-07-20-preview1" + }, + "requestBody": null, + "status": 200, + "response": "{\"entities\":[{\"id\":\"sanitized\",\"createdAt\":\"2020-10-06T22:09:15.6973324+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Failed\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-06T22:09:10.1382455+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Failed\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-06T22:08:59.9206727+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Failed\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-06T22:08:53.9901494+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Failed\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-05T22:34:55.8201039+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Failed\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-05T19:46:07.9277205+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Failed\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-05T19:30:38.9510914+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Failed\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-05T19:04:25.3546697+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Failed\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-05T19:04:19.728546+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Failed\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-05T19:03:55.2687923+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Failed\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-05T19:03:49.1210206+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Failed\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-05T18:57:52.671763+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Failed\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-02T04:55:32.0329458+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Failed\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-09-30T08:23:03.5698776+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Failed\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-09-30T08:21:30.4716416+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Failed\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-09-28T20:09:36.2701214+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Failed\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-09-23T05:16:13.9074624+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Failed\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-09-23T05:13:17.2438327+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Failed\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-09-22T04:23:36.1626946+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Failed\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-09-22T04:23:25.9748532+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Failed\"}],\"nextLink\":null}", + "responseHeaders": { + "content-type": "application/json; charset=utf-8" + } + } + ], + "uniqueTestInfo": { + "uniqueName": {}, + "newDate": {} + }, + "hash": "8ee9733a608b4eacfe34d7e8bb2ac5d1" +} diff --git a/sdk/communication/communication-administration/recordings/browsers/phonenumberadministrationclient_lists_playbacklive/recording_can_list_searches.json b/sdk/communication/communication-administration/recordings/browsers/phonenumberadministrationclient_lists_playbacklive/recording_can_list_searches.json new file mode 100644 index 000000000000..14ecb9e000b2 --- /dev/null +++ b/sdk/communication/communication-administration/recordings/browsers/phonenumberadministrationclient_lists_playbacklive/recording_can_list_searches.json @@ -0,0 +1,24 @@ +{ + "recordings": [ + { + "method": "GET", + "url": "https://endpoint/administration/phonenumbers/searches", + "query": { + "skip": "0", + "take": "100", + "api-version": "2020-07-20-preview1" + }, + "requestBody": null, + "status": 200, + "response": "{\"entities\":[{\"id\":\"sanitized\",\"createdAt\":\"2020-10-07T20:47:42.3582285+00:00\",\"displayName\":\"LRO Test Search\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Cancelled\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-07T20:47:38.7351291+00:00\",\"displayName\":\"LRO Test Search\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Reserved\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-07T20:46:26.3136937+00:00\",\"displayName\":\"LRO Test Search\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Reserved\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-07T20:42:25.8051216+00:00\",\"displayName\":\"LRO Test Search\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Cancelled\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-07T20:34:22.0074148+00:00\",\"displayName\":\"LRO Test Search\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Cancelled\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-07T20:33:49.0457535+00:00\",\"displayName\":\"LRO Test Search\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Cancelled\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-07T20:33:08.2701065+00:00\",\"displayName\":\"LRO Test Search\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Cancelled\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-07T20:32:31.3624756+00:00\",\"displayName\":\"LRO Test Search\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Cancelled\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-07T20:19:24.1877888+00:00\",\"displayName\":\"LRO Test Search\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Cancelled\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-07T20:17:19.324896+00:00\",\"displayName\":\"LRO Test Search\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Expired\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-07T20:16:57.141868+00:00\",\"displayName\":\"LRO Test Search\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Cancelled\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-07T20:16:52.093062+00:00\",\"displayName\":\"LRO Test Search\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Expired\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-07T20:15:44.5981184+00:00\",\"displayName\":\"LRO Test Search\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Cancelled\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-07T20:12:19.9330481+00:00\",\"displayName\":\"LRO Test Search\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Expired\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-07T20:12:04.3082843+00:00\",\"displayName\":\"LRO Test Search\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Expired\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-07T20:10:35.1336688+00:00\",\"displayName\":\"LRO Test Search\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Cancelled\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-07T20:10:16.9250667+00:00\",\"displayName\":\"LRO Test Search\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Expired\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-07T20:10:06.9836326+00:00\",\"displayName\":\"LRO Test Search\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Expired\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-07T20:09:34.297943+00:00\",\"displayName\":\"LRO Test Search\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Expired\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-07T20:02:01.7271964+00:00\",\"displayName\":\"LRO Test Search\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Expired\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-07T19:55:41.3430826+00:00\",\"displayName\":\"LRO Test Search\",\"quantity\":1,\"quantityObtained\":0,\"status\":\"Error\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-07T19:55:08.4296335+00:00\",\"displayName\":\"LRO Test Search\",\"quantity\":1,\"quantityObtained\":0,\"status\":\"Error\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-07T19:52:51.966739+00:00\",\"displayName\":\"LRO Test Search\",\"quantity\":1,\"quantityObtained\":0,\"status\":\"Error\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-07T19:49:31.125935+00:00\",\"displayName\":\"LRO Test Search\",\"quantity\":1,\"quantityObtained\":0,\"status\":\"Error\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-07T19:46:55.9343654+00:00\",\"displayName\":\"LRO Test Search\",\"quantity\":1,\"quantityObtained\":0,\"status\":\"Error\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-07T19:45:55.4896319+00:00\",\"displayName\":\"LRO Test Search\",\"quantity\":1,\"quantityObtained\":0,\"status\":\"Error\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-07T19:42:56.5228482+00:00\",\"displayName\":\"LRO Test Search\",\"quantity\":1,\"quantityObtained\":0,\"status\":\"Error\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-07T19:18:09.2822229+00:00\",\"displayName\":\"testsearch20200014\",\"quantity\":2,\"quantityObtained\":2,\"status\":\"Expired\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-07T19:15:45.0889566+00:00\",\"displayName\":\"testsearch20200014\",\"quantity\":2,\"quantityObtained\":2,\"status\":\"Expired\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-07T19:12:49.3821371+00:00\",\"displayName\":\"testsearch20200014\",\"quantity\":2,\"quantityObtained\":2,\"status\":\"Expired\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-07T19:10:54.6190624+00:00\",\"displayName\":\"testsearch20200014\",\"quantity\":2,\"quantityObtained\":2,\"status\":\"Expired\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-07T19:09:50.6904215+00:00\",\"displayName\":\"testsearch20200014\",\"quantity\":2,\"quantityObtained\":2,\"status\":\"Expired\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-07T19:08:42.5557718+00:00\",\"displayName\":\"testsearch20200014\",\"quantity\":2,\"quantityObtained\":2,\"status\":\"Expired\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-07T19:03:11.9322589+00:00\",\"displayName\":\"LRO Test Search\",\"quantity\":1,\"quantityObtained\":0,\"status\":\"Error\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-07T19:02:12.6560662+00:00\",\"displayName\":\"LRO Test Search\",\"quantity\":1,\"quantityObtained\":0,\"status\":\"Error\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-07T18:59:44.0340993+00:00\",\"displayName\":\"LRO Test Search\",\"quantity\":1,\"quantityObtained\":0,\"status\":\"Error\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-07T18:51:53.5965258+00:00\",\"displayName\":\"LRO Test Search\",\"quantity\":1,\"quantityObtained\":0,\"status\":\"Error\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-06T22:09:18.298955+00:00\",\"displayName\":\"sanitized\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Expired\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-06T22:09:16.9363453+00:00\",\"displayName\":\"sanitized\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Expired\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-06T22:09:02.8812737+00:00\",\"displayName\":\"testsearch20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Expired\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-06T22:09:01.266857+00:00\",\"displayName\":\"testsearch20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Expired\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-06T22:08:38.3984814+00:00\",\"displayName\":\"testsearch20200014\",\"quantity\":2,\"quantityObtained\":2,\"status\":\"Expired\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-06T22:05:10.5952146+00:00\",\"displayName\":\"testsearch20200014\",\"quantity\":2,\"quantityObtained\":2,\"status\":\"Expired\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-06T22:03:48.2763503+00:00\",\"displayName\":\"testsearch20200014\",\"quantity\":2,\"quantityObtained\":2,\"status\":\"Expired\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-06T22:02:19.0624194+00:00\",\"displayName\":\"testsearch20200014\",\"quantity\":2,\"quantityObtained\":2,\"status\":\"Expired\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-06T21:45:44.6093925+00:00\",\"displayName\":\"testsearch20200014\",\"quantity\":2,\"quantityObtained\":2,\"status\":\"Expired\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-06T21:40:55.4259286+00:00\",\"displayName\":\"testsearch20200014\",\"quantity\":2,\"quantityObtained\":2,\"status\":\"Expired\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-06T21:39:28.8001624+00:00\",\"displayName\":\"testsearch20200014\",\"quantity\":2,\"quantityObtained\":2,\"status\":\"Expired\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-06T16:49:05.1044519+00:00\",\"displayName\":\"testsearch20200014\",\"quantity\":2,\"quantityObtained\":2,\"status\":\"Expired\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-06T16:46:17.9484442+00:00\",\"displayName\":\"testsearch20200014\",\"quantity\":2,\"quantityObtained\":2,\"status\":\"Expired\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-06T16:43:04.3279546+00:00\",\"displayName\":\"testsearch20200014\",\"quantity\":2,\"quantityObtained\":2,\"status\":\"Expired\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-05T22:34:46.5330706+00:00\",\"displayName\":\"testsearch20200014\",\"quantity\":1,\"quantityObtained\":0,\"status\":\"Error\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-05T22:24:11.1650495+00:00\",\"displayName\":\"testsearch20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Expired\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-05T21:46:44.0061247+00:00\",\"displayName\":\"testsearch20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Expired\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-05T21:38:45.133326+00:00\",\"displayName\":\"testsearch20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Expired\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-05T21:32:40.6257874+00:00\",\"displayName\":\"testsearch20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Expired\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-05T21:25:15.5314488+00:00\",\"displayName\":\"testsearch20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Expired\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-05T21:23:23.3227419+00:00\",\"displayName\":\"testsearch20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Expired\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-05T21:17:49.3522282+00:00\",\"displayName\":\"testsearch20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Expired\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-05T21:15:30.2864455+00:00\",\"displayName\":\"testsearch20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Expired\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-05T21:08:09.2840452+00:00\",\"displayName\":\"testsearch20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Expired\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-05T20:55:35.0177171+00:00\",\"displayName\":\"testsearch20200014\",\"quantity\":1,\"quantityObtained\":0,\"status\":\"Error\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-05T19:54:57.0781406+00:00\",\"displayName\":\"testsearch20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Expired\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-05T19:48:40.2894004+00:00\",\"displayName\":\"testsearch20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Expired\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-05T19:46:38.3339363+00:00\",\"displayName\":\"testsearch20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Expired\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-05T19:45:59.0003981+00:00\",\"displayName\":\"testsearch20200014\",\"quantity\":1,\"quantityObtained\":0,\"status\":\"Error\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-05T19:29:18.5654194+00:00\",\"displayName\":\"testsearch20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Expired\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-05T19:26:07.2847153+00:00\",\"displayName\":\"testsearch20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Expired\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-05T19:26:01.5942012+00:00\",\"displayName\":\"testsearch20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Expired\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-05T19:12:59.9950936+00:00\",\"displayName\":\"sanitized\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Error\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-05T19:09:17.9509794+00:00\",\"displayName\":\"sanitized\",\"quantity\":1,\"quantityObtained\":0,\"status\":\"Error\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-05T18:57:37.8313413+00:00\",\"displayName\":\"testsearch20200014\",\"quantity\":1,\"quantityObtained\":0,\"status\":\"Error\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-02T19:33:35.7713345+00:00\",\"displayName\":\"testsearch20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Expired\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-02T19:33:30.7521936+00:00\",\"displayName\":\"testsearch20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Expired\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-02T19:31:33.2688041+00:00\",\"displayName\":\"mysearch20200928\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Expired\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-02T19:22:05.7250909+00:00\",\"displayName\":\"testsearch20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Expired\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-02T19:17:48.6436314+00:00\",\"displayName\":\"testsearch20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Expired\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-02T18:33:37.3941156+00:00\",\"displayName\":\"testsearch20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Expired\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-02T18:33:23.49478+00:00\",\"displayName\":\"testsearch20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Expired\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-02T04:49:30.459317+00:00\",\"displayName\":\"sanitized\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Cancelled\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-02T03:26:58.3778108+00:00\",\"displayName\":\"sanitized\",\"quantity\":1,\"quantityObtained\":0,\"status\":\"Error\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-02T03:19:03.7907742+00:00\",\"displayName\":\"sanitized\",\"quantity\":1,\"quantityObtained\":0,\"status\":\"Error\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-02T03:12:45.0375597+00:00\",\"displayName\":\"sanitized\",\"quantity\":1,\"quantityObtained\":0,\"status\":\"Error\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-02T02:57:37.9005693+00:00\",\"displayName\":\"sanitized\",\"quantity\":1,\"quantityObtained\":0,\"status\":\"Error\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-02T02:57:18.0415231+00:00\",\"displayName\":\"sanitized\",\"quantity\":1,\"quantityObtained\":0,\"status\":\"Error\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-02T02:55:34.7494935+00:00\",\"displayName\":\"sanitized\",\"quantity\":1,\"quantityObtained\":0,\"status\":\"Error\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-02T02:54:01.6722267+00:00\",\"displayName\":\"sanitized\",\"quantity\":1,\"quantityObtained\":0,\"status\":\"Error\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-02T02:52:31.3314225+00:00\",\"displayName\":\"sanitized\",\"quantity\":1,\"quantityObtained\":0,\"status\":\"Error\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-02T02:46:00.069457+00:00\",\"displayName\":\"sanitized\",\"quantity\":1,\"quantityObtained\":0,\"status\":\"Error\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-02T02:45:45.4367168+00:00\",\"displayName\":\"sanitized\",\"quantity\":1,\"quantityObtained\":0,\"status\":\"Error\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-02T02:32:31.2826321+00:00\",\"displayName\":\"sanitized\",\"quantity\":1,\"quantityObtained\":0,\"status\":\"Error\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-02T02:32:19.8370826+00:00\",\"displayName\":\"sanitized\",\"quantity\":1,\"quantityObtained\":0,\"status\":\"Error\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-02T02:23:17.9769815+00:00\",\"displayName\":\"sanitized\",\"quantity\":1,\"quantityObtained\":0,\"status\":\"Error\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-02T02:23:16.3583149+00:00\",\"displayName\":\"sanitized\",\"quantity\":1,\"quantityObtained\":0,\"status\":\"Error\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-02T02:17:20.3437695+00:00\",\"displayName\":\"sanitized\",\"quantity\":1,\"quantityObtained\":0,\"status\":\"Error\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-02T02:17:18.3096094+00:00\",\"displayName\":\"sanitized\",\"quantity\":1,\"quantityObtained\":0,\"status\":\"Error\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-02T02:12:22.4481628+00:00\",\"displayName\":\"sanitized\",\"quantity\":1,\"quantityObtained\":0,\"status\":\"Error\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-02T02:12:20.1292791+00:00\",\"displayName\":\"sanitized\",\"quantity\":1,\"quantityObtained\":0,\"status\":\"Error\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-02T02:10:40.0899851+00:00\",\"displayName\":\"sanitized\",\"quantity\":1,\"quantityObtained\":0,\"status\":\"Error\"},{\"id\":\"sanitized\",\"createdAt\":\"2020-10-02T02:10:38.6164288+00:00\",\"displayName\":\"sanitized\",\"quantity\":1,\"quantityObtained\":0,\"status\":\"Error\"}],\"nextLink\":null}", + "responseHeaders": { + "content-type": "application/json; charset=utf-8" + } + } + ], + "uniqueTestInfo": { + "uniqueName": {}, + "newDate": {} + }, + "hash": "c47efafb8af5030fa3eccd566898e895" +} diff --git a/sdk/communication/communication-administration/recordings/browsers/phonenumberadministrationclient_lists_playbacklive/recording_can_list_supported_countries.json b/sdk/communication/communication-administration/recordings/browsers/phonenumberadministrationclient_lists_playbacklive/recording_can_list_supported_countries.json new file mode 100644 index 000000000000..83c9f5fae7cb --- /dev/null +++ b/sdk/communication/communication-administration/recordings/browsers/phonenumberadministrationclient_lists_playbacklive/recording_can_list_supported_countries.json @@ -0,0 +1,25 @@ +{ + "recordings": [ + { + "method": "GET", + "url": "https://endpoint/administration/phonenumbers/countries", + "query": { + "locale": "en-US", + "skip": "0", + "take": "100", + "api-version": "2020-07-20-preview1" + }, + "requestBody": null, + "status": 200, + "response": "{\"countries\":[{\"localizedName\":\"Australia\",\"countryCode\":\"AU\"},{\"localizedName\":\"Japan\",\"countryCode\":\"JP\"},{\"localizedName\":\"United States\",\"countryCode\":\"US\"}],\"nextLink\":null}", + "responseHeaders": { + "content-type": "application/json; charset=utf-8" + } + } + ], + "uniqueTestInfo": { + "uniqueName": {}, + "newDate": {} + }, + "hash": "a64778200ecc73a3a09c66c90365e4dd" +} diff --git a/sdk/communication/communication-administration/recordings/browsers/phonenumberadministrationclient_playbacklive/recording_can_get_area_codes.json b/sdk/communication/communication-administration/recordings/browsers/phonenumberadministrationclient_playbacklive/recording_can_get_area_codes.json new file mode 100644 index 000000000000..71a5cade8ecd --- /dev/null +++ b/sdk/communication/communication-administration/recordings/browsers/phonenumberadministrationclient_playbacklive/recording_can_get_area_codes.json @@ -0,0 +1,24 @@ +{ + "recordings": [ + { + "method": "POST", + "url": "https://endpoint/administration/phonenumbers/countries/US/areacodes", + "query": { + "locationType": "selection", + "phonePlanId": "sanitized", + "api-version": "2020-07-20-preview1" + }, + "requestBody": "{\"locationOptions\":[{\"labelId\":\"state\",\"optionsValue\":\"CA\"},{\"labelId\":\"city\",\"optionsValue\":\"NOAM-US-CA-LA\"}]}", + "status": 200, + "response": "{\"primaryAreaCodes\":[],\"secondaryAreaCodes\":[],\"nextLink\":null}", + "responseHeaders": { + "content-type": "application/json; charset=utf-8" + } + } + ], + "uniqueTestInfo": { + "uniqueName": {}, + "newDate": {} + }, + "hash": "3673b002ef2ebea06100d51b1e83fbe6" +} diff --git a/sdk/communication/communication-administration/recordings/browsers/phonenumberadministrationclient_playbacklive/recording_can_get_location_options.json b/sdk/communication/communication-administration/recordings/browsers/phonenumberadministrationclient_playbacklive/recording_can_get_location_options.json new file mode 100644 index 000000000000..fb87acb5113b --- /dev/null +++ b/sdk/communication/communication-administration/recordings/browsers/phonenumberadministrationclient_playbacklive/recording_can_get_location_options.json @@ -0,0 +1,23 @@ +{ + "recordings": [ + { + "method": "GET", + "url": "https://endpoint/administration/phonenumbers/countries/US/phoneplangroups/sanitized/phoneplans/sanitized/locationoptions", + "query": { + "locale": "en-US", + "api-version": "2020-07-20-preview1" + }, + "requestBody": null, + "status": 200, + "response": "{\"locationOptions\":{\"labelId\":\"state\",\"labelName\":\"State\",\"options\":[{\"name\":\"AL\",\"value\":\"AL\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Birmingham\",\"value\":\"NOAM-US-AL-BI\",\"locationOptions\":[]},{\"name\":\"Huntsville\",\"value\":\"NOAM-US-AL-HN\",\"locationOptions\":[]},{\"name\":\"Mobile\",\"value\":\"NOAM-US-AL-MO\",\"locationOptions\":[]},{\"name\":\"Montgomery\",\"value\":\"NOAM-US-AL-MN\",\"locationOptions\":[]}]}]},{\"name\":\"AR\",\"value\":\"AR\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Fort Smith\",\"value\":\"NOAM-US-AR-FS\",\"locationOptions\":[]},{\"name\":\"Jonesboro\",\"value\":\"NOAM-US-AR-JO\",\"locationOptions\":[]},{\"name\":\"Little Rock\",\"value\":\"NOAM-US-AR-LR\",\"locationOptions\":[]}]}]},{\"name\":\"AZ\",\"value\":\"AZ\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Phoenix\",\"value\":\"NOAM-US-AZ-PH\",\"locationOptions\":[]}]}]},{\"name\":\"CA\",\"value\":\"CA\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Salinas\",\"value\":\"NOAM-US-CA-SL\",\"locationOptions\":[]},{\"name\":\"San Diego\",\"value\":\"NOAM-US-CA-SD\",\"locationOptions\":[]},{\"name\":\"San Francisco\",\"value\":\"NOAM-US-CA-SF\",\"locationOptions\":[]},{\"name\":\"San Jose\",\"value\":\"NOAM-US-CA-SJ\",\"locationOptions\":[]},{\"name\":\"Santa Barbara\",\"value\":\"NOAM-US-CA-SB\",\"locationOptions\":[]},{\"name\":\"Santa Clarita\",\"value\":\"NOAM-US-CA-SC\",\"locationOptions\":[]},{\"name\":\"Santa Rosa\",\"value\":\"NOAM-US-CA-SR\",\"locationOptions\":[]},{\"name\":\"Stockton\",\"value\":\"NOAM-US-CA-ST\",\"locationOptions\":[]}]}]},{\"name\":\"CL\",\"value\":\"CL\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Washington DC\",\"value\":\"NOAM-US-CL-DC\",\"locationOptions\":[]}]}]},{\"name\":\"CO\",\"value\":\"CO\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Grand Junction\",\"value\":\"NOAM-US-CO-GJ\",\"locationOptions\":[]},{\"name\":\"Pueblo\",\"value\":\"NOAM-US-CO-PU\",\"locationOptions\":[]}]}]},{\"name\":\"CT\",\"value\":\"CT\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Bridgeport\",\"value\":\"NOAM-US-CT-BR\",\"locationOptions\":[]},{\"name\":\"Hartford\",\"value\":\"NOAM-US-CT-HA\",\"locationOptions\":[]}]}]},{\"name\":\"DE\",\"value\":\"DE\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Wilmington\",\"value\":\"NOAM-US-DE-WI\",\"locationOptions\":[]}]}]},{\"name\":\"FL\",\"value\":\"FL\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Cape Coral\",\"value\":\"NOAM-US-FL-CC\",\"locationOptions\":[]},{\"name\":\"Gainesville\",\"value\":\"NOAM-US-FL-GA\",\"locationOptions\":[]},{\"name\":\"Jacksonville\",\"value\":\"NOAM-US-FL-JA\",\"locationOptions\":[]},{\"name\":\"Lakeland\",\"value\":\"NOAM-US-FL-LA\",\"locationOptions\":[]},{\"name\":\"Miami\",\"value\":\"NOAM-US-FL-MI\",\"locationOptions\":[]},{\"name\":\"Orlando\",\"value\":\"NOAM-US-FL-OR\",\"locationOptions\":[]},{\"name\":\"Port St Lucie\",\"value\":\"NOAM-US-FL-PS\",\"locationOptions\":[]},{\"name\":\"Sarasota\",\"value\":\"NOAM-US-FL-SA\",\"locationOptions\":[]},{\"name\":\"St. Petersburg\",\"value\":\"NOAM-US-FL-SP\",\"locationOptions\":[]},{\"name\":\"Tallahassee\",\"value\":\"NOAM-US-FL-TA\",\"locationOptions\":[]},{\"name\":\"West Palm Beach\",\"value\":\"NOAM-US-FL-WP\",\"locationOptions\":[]}]}]},{\"name\":\"GA\",\"value\":\"GA\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Albany\",\"value\":\"NOAM-US-GA-AL\",\"locationOptions\":[]},{\"name\":\"Atlanta\",\"value\":\"NOAM-US-GA-AT\",\"locationOptions\":[]},{\"name\":\"Augusta\",\"value\":\"NOAM-US-GA-AU\",\"locationOptions\":[]},{\"name\":\"Macon\",\"value\":\"NOAM-US-GA-MA\",\"locationOptions\":[]},{\"name\":\"Savannah\",\"value\":\"NOAM-US-GA-SA\",\"locationOptions\":[]}]}]},{\"name\":\"HI\",\"value\":\"HI\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Honolulu\",\"value\":\"NOAM-US-HI-HO\",\"locationOptions\":[]}]}]},{\"name\":\"IA\",\"value\":\"IA\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Cedar Rapids\",\"value\":\"NOAM-US-IA-CR\",\"locationOptions\":[]},{\"name\":\"Davenport\",\"value\":\"NOAM-US-IA-DA\",\"locationOptions\":[]},{\"name\":\"Mason City\",\"value\":\"NOAM-US-IA-MC\",\"locationOptions\":[]},{\"name\":\"Sioux City\",\"value\":\"NOAM-US-IA-SC\",\"locationOptions\":[]}]}]},{\"name\":\"ID\",\"value\":\"ID\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Boise\",\"value\":\"NOAM-US-ID-BO\",\"locationOptions\":[]}]}]},{\"name\":\"IL\",\"value\":\"IL\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Alton\",\"value\":\"NOAM-US-IL-AL\",\"locationOptions\":[]},{\"name\":\"Aurora\",\"value\":\"NOAM-US-IL-AU\",\"locationOptions\":[]},{\"name\":\"Big Rock\",\"value\":\"NOAM-US-IL-BK\",\"locationOptions\":[]},{\"name\":\"Champaign\",\"value\":\"NOAM-US-IL-CA\",\"locationOptions\":[]},{\"name\":\"Chicago\",\"value\":\"NOAM-US-IL-CH\",\"locationOptions\":[]},{\"name\":\"Rock Island\",\"value\":\"NOAM-US-IL-RI\",\"locationOptions\":[]},{\"name\":\"Rockford\",\"value\":\"NOAM-US-IL-RO\",\"locationOptions\":[]},{\"name\":\"Waukegan\",\"value\":\"NOAM-US-IL-WK\",\"locationOptions\":[]}]}]},{\"name\":\"IN\",\"value\":\"IN\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Evansville\",\"value\":\"NOAM-US-IN-EV\",\"locationOptions\":[]},{\"name\":\"Fort Wayne\",\"value\":\"NOAM-US-IN-FW\",\"locationOptions\":[]},{\"name\":\"Gary\",\"value\":\"NOAM-US-IN-GA\",\"locationOptions\":[]},{\"name\":\"Indianapolis\",\"value\":\"NOAM-US-IN-IN\",\"locationOptions\":[]},{\"name\":\"South Bend\",\"value\":\"NOAM-US-IN-SB\",\"locationOptions\":[]}]}]},{\"name\":\"KS\",\"value\":\"KS\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Kansas City\",\"value\":\"NOAM-US-KS-KS\",\"locationOptions\":[]},{\"name\":\"Topeka\",\"value\":\"NOAM-US-KS-TO\",\"locationOptions\":[]},{\"name\":\"Wichita\",\"value\":\"NOAM-US-KS-WI\",\"locationOptions\":[]}]}]},{\"name\":\"KY\",\"value\":\"KY\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Ashland\",\"value\":\"NOAM-US-KY-AS\",\"locationOptions\":[]},{\"name\":\"Lexington\",\"value\":\"NOAM-US-KY-LE\",\"locationOptions\":[]},{\"name\":\"Louisville\",\"value\":\"NOAM-US-KY-LO\",\"locationOptions\":[]},{\"name\":\"Owensboro\",\"value\":\"NOAM-US-KY-OW\",\"locationOptions\":[]}]}]},{\"name\":\"LA\",\"value\":\"LA\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Baton Rouge\",\"value\":\"NOAM-US-LA-BR\",\"locationOptions\":[]},{\"name\":\"Lafayette\",\"value\":\"NOAM-US-LA-LA\",\"locationOptions\":[]},{\"name\":\"New Orleans\",\"value\":\"NOAM-US-LA-NO\",\"locationOptions\":[]},{\"name\":\"Shreveport\",\"value\":\"NOAM-US-LA-SH\",\"locationOptions\":[]}]}]},{\"name\":\"MA\",\"value\":\"MA\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Boston\",\"value\":\"NOAM-US-MA-BO\",\"locationOptions\":[]},{\"name\":\"Lowell\",\"value\":\"NOAM-US-MA-LO\",\"locationOptions\":[]},{\"name\":\"Lynn\",\"value\":\"NOAM-US-MA-LY\",\"locationOptions\":[]}]}]},{\"name\":\"ME\",\"value\":\"ME\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Portland\",\"value\":\"NOAM-US-ME-PO\",\"locationOptions\":[]}]}]},{\"name\":\"MI\",\"value\":\"MI\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Ann Arbor\",\"value\":\"NOAM-US-MI-AA\",\"locationOptions\":[]},{\"name\":\"Detroit\",\"value\":\"NOAM-US-MI-DE\",\"locationOptions\":[]},{\"name\":\"Flint\",\"value\":\"NOAM-US-MI-FL\",\"locationOptions\":[]},{\"name\":\"Grand Rapids\",\"value\":\"NOAM-US-MI-GP\",\"locationOptions\":[]},{\"name\":\"Grant\",\"value\":\"NOAM-US-MI-GR\",\"locationOptions\":[]},{\"name\":\"Lansing\",\"value\":\"NOAM-US-MI-LA\",\"locationOptions\":[]},{\"name\":\"Otsego\",\"value\":\"NOAM-US-MI-OT\",\"locationOptions\":[]},{\"name\":\"Saginaw\",\"value\":\"NOAM-US-MI-SA\",\"locationOptions\":[]},{\"name\":\"Sault Ste Marie\",\"value\":\"NOAM-US-MI-SS\",\"locationOptions\":[]},{\"name\":\"Troy\",\"value\":\"NOAM-US-MI-TR\",\"locationOptions\":[]},{\"name\":\"Warren\",\"value\":\"NOAM-US-MI-WA\",\"locationOptions\":[]}]}]},{\"name\":\"MN\",\"value\":\"MN\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Alexandria\",\"value\":\"NOAM-US-MN-AL\",\"locationOptions\":[]},{\"name\":\"Duluth\",\"value\":\"NOAM-US-MN-DU\",\"locationOptions\":[]},{\"name\":\"Minneapolis\",\"value\":\"NOAM-US-MN-MI\",\"locationOptions\":[]}]}]},{\"name\":\"MO\",\"value\":\"MO\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Columbia\",\"value\":\"NOAM-US-MO-CO\",\"locationOptions\":[]},{\"name\":\"Kansas City\",\"value\":\"NOAM-US-MO-KS\",\"locationOptions\":[]},{\"name\":\"Marshall\",\"value\":\"NOAM-US-MO-MA\",\"locationOptions\":[]},{\"name\":\"Springfield\",\"value\":\"NOAM-US-MO-SP\",\"locationOptions\":[]},{\"name\":\"St. Charles\",\"value\":\"NOAM-US-MO-SC\",\"locationOptions\":[]},{\"name\":\"St. Louis\",\"value\":\"NOAM-US-MO-SL\",\"locationOptions\":[]}]}]},{\"name\":\"MS\",\"value\":\"MS\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Biloxi\",\"value\":\"NOAM-US-MS-BI\",\"locationOptions\":[]},{\"name\":\"Jackson\",\"value\":\"NOAM-US-MS-JA\",\"locationOptions\":[]},{\"name\":\"Starkville\",\"value\":\"NOAM-US-MS-ST\",\"locationOptions\":[]}]}]},{\"name\":\"MT\",\"value\":\"MT\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Billings\",\"value\":\"NOAM-US-MT-BI\",\"locationOptions\":[]}]}]},{\"name\":\"NC\",\"value\":\"NC\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Charlotte\",\"value\":\"NOAM-US-NC-CH\",\"locationOptions\":[]},{\"name\":\"Fayetteville\",\"value\":\"NOAM-US-NC-FA\",\"locationOptions\":[]},{\"name\":\"Greensboro\",\"value\":\"NOAM-US-NC-GR\",\"locationOptions\":[]},{\"name\":\"Raleigh\",\"value\":\"NOAM-US-NC-RA\",\"locationOptions\":[]},{\"name\":\"Rocky Mount\",\"value\":\"NOAM-US-NC-RM\",\"locationOptions\":[]}]}]},{\"name\":\"ND\",\"value\":\"ND\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Fargo\",\"value\":\"NOAM-US-ND-FA\",\"locationOptions\":[]}]}]},{\"name\":\"NE\",\"value\":\"NE\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Kearney\",\"value\":\"NOAM-US-NE-KE\",\"locationOptions\":[]},{\"name\":\"Omaha\",\"value\":\"NOAM-US-NE-OM\",\"locationOptions\":[]}]}]},{\"name\":\"NJ\",\"value\":\"NJ\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Atlantic City\",\"value\":\"NOAM-US-NJ-AC\",\"locationOptions\":[]},{\"name\":\"Camden\",\"value\":\"NOAM-US-NJ-CA\",\"locationOptions\":[]},{\"name\":\"Edison\",\"value\":\"NOAM-US-NJ-ED\",\"locationOptions\":[]},{\"name\":\"Elizabeth\",\"value\":\"NOAM-US-NJ-EL\",\"locationOptions\":[]},{\"name\":\"Newark\",\"value\":\"NOAM-US-NJ-NE\",\"locationOptions\":[]}]}]},{\"name\":\"NM\",\"value\":\"NM\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Albuquerque\",\"value\":\"NOAM-US-NM-AL\",\"locationOptions\":[]},{\"name\":\"Las Cruces\",\"value\":\"NOAM-US-NM-LC\",\"locationOptions\":[]}]}]},{\"name\":\"NV\",\"value\":\"NV\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Las Vegas\",\"value\":\"NOAM-US-NV-LV\",\"locationOptions\":[]},{\"name\":\"Reno\",\"value\":\"NOAM-US-NV-RE\",\"locationOptions\":[]}]}]},{\"name\":\"NY\",\"value\":\"NY\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Albany\",\"value\":\"NOAM-US-NY-AL\",\"locationOptions\":[]},{\"name\":\"Brentwood\",\"value\":\"NOAM-US-NY-BR\",\"locationOptions\":[]},{\"name\":\"Elmira\",\"value\":\"NOAM-US-NY-EL\",\"locationOptions\":[]},{\"name\":\"Hempstead\",\"value\":\"NOAM-US-NY-HE\",\"locationOptions\":[]},{\"name\":\"New York City\",\"value\":\"NOAM-US-NY-NY\",\"locationOptions\":[]},{\"name\":\"Niagara Falls\",\"value\":\"NOAM-US-NY-NF\",\"locationOptions\":[]},{\"name\":\"Rochester\",\"value\":\"NOAM-US-NY-RO\",\"locationOptions\":[]},{\"name\":\"Yonkers\",\"value\":\"NOAM-US-NY-YO\",\"locationOptions\":[]}]}]},{\"name\":\"OH\",\"value\":\"OH\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Akron\",\"value\":\"NOAM-US-OH-AK\",\"locationOptions\":[]},{\"name\":\"Cincinnati\",\"value\":\"NOAM-US-OH-CI\",\"locationOptions\":[]},{\"name\":\"Cleveland\",\"value\":\"NOAM-US-OH-CL\",\"locationOptions\":[]},{\"name\":\"Columbus\",\"value\":\"NOAM-US-OH-CO\",\"locationOptions\":[]},{\"name\":\"Dayton\",\"value\":\"NOAM-US-OH-DA\",\"locationOptions\":[]},{\"name\":\"Toledo\",\"value\":\"NOAM-US-OH-TO\",\"locationOptions\":[]}]}]},{\"name\":\"OK\",\"value\":\"OK\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Lawton\",\"value\":\"NOAM-US-OK-LA\",\"locationOptions\":[]},{\"name\":\"Oklahoma City\",\"value\":\"NOAM-US-OK-OC\",\"locationOptions\":[]},{\"name\":\"Tulsa\",\"value\":\"NOAM-US-OK-TU\",\"locationOptions\":[]}]}]},{\"name\":\"OR\",\"value\":\"OR\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Portland\",\"value\":\"NOAM-US-OR-PO\",\"locationOptions\":[]}]}]},{\"name\":\"PA\",\"value\":\"PA\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Erie\",\"value\":\"NOAM-US-PA-ER\",\"locationOptions\":[]},{\"name\":\"Lancaster\",\"value\":\"NOAM-US-PA-LA\",\"locationOptions\":[]},{\"name\":\"New Castle\",\"value\":\"NOAM-US-PA-NC\",\"locationOptions\":[]},{\"name\":\"Philadelphia\",\"value\":\"NOAM-US-PA-PI\",\"locationOptions\":[]},{\"name\":\"Pittsburgh\",\"value\":\"NOAM-US-PA-PT\",\"locationOptions\":[]},{\"name\":\"Scranton\",\"value\":\"NOAM-US-PA-SC\",\"locationOptions\":[]}]}]},{\"name\":\"RI\",\"value\":\"RI\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Providence\",\"value\":\"NOAM-US-RI-PR\",\"locationOptions\":[]}]}]},{\"name\":\"SC\",\"value\":\"SC\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Charleston\",\"value\":\"NOAM-US-SC-CH\",\"locationOptions\":[]},{\"name\":\"Columbia\",\"value\":\"NOAM-US-SC-CO\",\"locationOptions\":[]},{\"name\":\"Greenville\",\"value\":\"NOAM-US-SC-GR\",\"locationOptions\":[]}]}]},{\"name\":\"SD\",\"value\":\"SD\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Sioux Falls\",\"value\":\"NOAM-US-SD-SF\",\"locationOptions\":[]}]}]},{\"name\":\"TN\",\"value\":\"TN\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Chattanooga\",\"value\":\"NOAM-US-TN-CH\",\"locationOptions\":[]},{\"name\":\"Clarksville\",\"value\":\"NOAM-US-TN-CL\",\"locationOptions\":[]},{\"name\":\"Jackson\",\"value\":\"NOAM-US-TN-JA\",\"locationOptions\":[]},{\"name\":\"Knoxville\",\"value\":\"NOAM-US-TN-KN\",\"locationOptions\":[]},{\"name\":\"Memphis\",\"value\":\"NOAM-US-TN-ME\",\"locationOptions\":[]},{\"name\":\"Nashville\",\"value\":\"NOAM-US-TN-NA\",\"locationOptions\":[]}]}]},{\"name\":\"TX\",\"value\":\"TX\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Abilene\",\"value\":\"NOAM-US-TX-AB\",\"locationOptions\":[]},{\"name\":\"Bryan\",\"value\":\"NOAM-US-TX-BR\",\"locationOptions\":[]},{\"name\":\"Corpus Christi\",\"value\":\"NOAM-US-TX-CC\",\"locationOptions\":[]},{\"name\":\"Dallas\",\"value\":\"NOAM-US-TX-DA\",\"locationOptions\":[]},{\"name\":\"Denton\",\"value\":\"NOAM-US-TX-DE\",\"locationOptions\":[]},{\"name\":\"El Paso\",\"value\":\"NOAM-US-TX-EP\",\"locationOptions\":[]},{\"name\":\"Fort Worth\",\"value\":\"NOAM-US-TX-FW\",\"locationOptions\":[]},{\"name\":\"Galveston\",\"value\":\"NOAM-US-TX-GA\",\"locationOptions\":[]},{\"name\":\"Hamilton\",\"value\":\"NOAM-US-TX-HA\",\"locationOptions\":[]},{\"name\":\"Huntsville\",\"value\":\"NOAM-US-TX-HU\",\"locationOptions\":[]},{\"name\":\"Laredo\",\"value\":\"NOAM-US-TX-LA\",\"locationOptions\":[]},{\"name\":\"Lubbock\",\"value\":\"NOAM-US-TX-LU\",\"locationOptions\":[]},{\"name\":\"Odessa\",\"value\":\"NOAM-US-TX-OD\",\"locationOptions\":[]},{\"name\":\"San Antonio\",\"value\":\"NOAM-US-TX-SA\",\"locationOptions\":[]},{\"name\":\"Tyler\",\"value\":\"NOAM-US-TX-TY\",\"locationOptions\":[]}]}]},{\"name\":\"UT\",\"value\":\"UT\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Salt Lake City\",\"value\":\"NOAM-US-UT-SL\",\"locationOptions\":[]},{\"name\":\"St. George\",\"value\":\"NOAM-US-UT-SG\",\"locationOptions\":[]}]}]},{\"name\":\"VA\",\"value\":\"VA\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Arlington\",\"value\":\"NOAM-US-VA-AR\",\"locationOptions\":[]},{\"name\":\"Lynchburg\",\"value\":\"NOAM-US-VA-LY\",\"locationOptions\":[]},{\"name\":\"Richmond\",\"value\":\"NOAM-US-VA-RI\",\"locationOptions\":[]},{\"name\":\"Roanoke\",\"value\":\"NOAM-US-VA-RO\",\"locationOptions\":[]},{\"name\":\"Virginia Beach\",\"value\":\"NOAM-US-VA-VB\",\"locationOptions\":[]}]}]},{\"name\":\"VT\",\"value\":\"VT\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Brattleboro\",\"value\":\"NOAM-US-VT-BR\",\"locationOptions\":[]},{\"name\":\"Burlington\",\"value\":\"NOAM-US-VT-BU\",\"locationOptions\":[]},{\"name\":\"Newport\",\"value\":\"NOAM-US-VT-NE\",\"locationOptions\":[]}]}]},{\"name\":\"WI\",\"value\":\"WI\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Eau Claire\",\"value\":\"NOAM-US-WI-EC\",\"locationOptions\":[]},{\"name\":\"Green Bay\",\"value\":\"NOAM-US-WI-GB\",\"locationOptions\":[]},{\"name\":\"Kenosha\",\"value\":\"NOAM-US-WI-KE\",\"locationOptions\":[]},{\"name\":\"Madison\",\"value\":\"NOAM-US-WI-MA\",\"locationOptions\":[]},{\"name\":\"Milwaukee\",\"value\":\"NOAM-US-WI-MI\",\"locationOptions\":[]}]}]},{\"name\":\"WV\",\"value\":\"WV\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Charleston\",\"value\":\"NOAM-US-WV-CH\",\"locationOptions\":[]}]}]},{\"name\":\"WY\",\"value\":\"WY\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Laramie\",\"value\":\"NOAM-US-WY-LA\",\"locationOptions\":[]}]}]}]}}", + "responseHeaders": { + "content-type": "application/json; charset=utf-8" + } + } + ], + "uniqueTestInfo": { + "uniqueName": {}, + "newDate": {} + }, + "hash": "ff376714d4935165339035b118c09fbe" +} diff --git a/sdk/communication/communication-administration/recordings/browsers/phonenumberadministrationclient_playbacklive/recording_can_get_phoneplangroupid_and_phoneplanid_for_other_tests.json b/sdk/communication/communication-administration/recordings/browsers/phonenumberadministrationclient_playbacklive/recording_can_get_phoneplangroupid_and_phoneplanid_for_other_tests.json new file mode 100644 index 000000000000..9c7f69de5981 --- /dev/null +++ b/sdk/communication/communication-administration/recordings/browsers/phonenumberadministrationclient_playbacklive/recording_can_get_phoneplangroupid_and_phoneplanid_for_other_tests.json @@ -0,0 +1,42 @@ +{ + "recordings": [ + { + "method": "GET", + "url": "https://endpoint/administration/phonenumbers/countries/US/phoneplangroups", + "query": { + "locale": "en-US", + "includeRateInformation": "false", + "skip": "0", + "take": "100", + "api-version": "2020-07-20-preview1" + }, + "requestBody": null, + "status": 200, + "response": "{\"phonePlanGroups\":[{\"phonePlanGroupId\":\"sanitized\",\"phoneNumberType\":\"Geographic\",\"localizedName\":\"Azure- User - Geographic\",\"localizedDescription\":\"These are numbers used by Azure resources.\"},{\"phonePlanGroupId\":\"sanitized\",\"phoneNumberType\":\"Geographic\",\"localizedName\":\"Azure - Geographic\",\"localizedDescription\":\"These are numbers used by Azure resources.\"},{\"phonePlanGroupId\":\"sanitized\",\"phoneNumberType\":\"TollFree\",\"localizedName\":\"Azure - Toll Free\",\"localizedDescription\":\"These are toll free numbers used by Azure resources.\"}],\"nextLink\":null}", + "responseHeaders": { + "content-type": "application/json; charset=utf-8" + } + }, + { + "method": "GET", + "url": "https://endpoint/administration/phonenumbers/countries/US/phoneplangroups/sanitized/phoneplans", + "query": { + "locale": "en-US", + "skip": "0", + "take": "100", + "api-version": "2020-07-20-preview1" + }, + "requestBody": null, + "status": 200, + "response": "{\"phonePlans\":[{\"phonePlanId\":\"sanitized\",\"localizedName\":\"Outbound Only PSTN For User - Geographic\",\"locationType\":\"Selection\",\"areaCodes\":[],\"capabilities\":[\"Azure\",\"OutboundCalling\",\"UserAssignment\",\"Geographic\"],\"maximumSearchSize\":20},{\"phonePlanId\":\"sanitized\",\"localizedName\":\"Inbound Only PSTN For User - Geographic\",\"locationType\":\"Selection\",\"areaCodes\":[],\"capabilities\":[\"Azure\",\"InboundCalling\",\"UserAssignment\",\"Geographic\"],\"maximumSearchSize\":20}],\"nextLink\":null}", + "responseHeaders": { + "content-type": "application/json; charset=utf-8" + } + } + ], + "uniqueTestInfo": { + "uniqueName": {}, + "newDate": {} + }, + "hash": "6b833b3df860aa09fa8c96312c3a9c9c" +} diff --git a/sdk/communication/communication-administration/recordings/browsers/phonenumberadministrationclient_playbacklive/recording_can_start_a_phone_number_search.json b/sdk/communication/communication-administration/recordings/browsers/phonenumberadministrationclient_playbacklive/recording_can_start_a_phone_number_search.json new file mode 100644 index 000000000000..737479fa2129 --- /dev/null +++ b/sdk/communication/communication-administration/recordings/browsers/phonenumberadministrationclient_playbacklive/recording_can_start_a_phone_number_search.json @@ -0,0 +1,22 @@ +{ + "recordings": [ + { + "method": "POST", + "url": "https://endpoint/administration/phonenumbers/searches", + "query": { + "api-version": "2020-07-20-preview1" + }, + "requestBody": "{\"displayName\":\"LRO Test Search\",\"description\":\"Test search for JS phone number admin SDK.\",\"phonePlanIds\":[\"sanitized\"],\"areaCode\":\"800\",\"quantity\":1}", + "status": 201, + "response": "{\"searchId\":\"sanitized\"}", + "responseHeaders": { + "content-type": "application/json; charset=utf-8" + } + } + ], + "uniqueTestInfo": { + "uniqueName": {}, + "newDate": {} + }, + "hash": "f2be4e05756bff8eba76fbf17c7fc502" +} diff --git a/sdk/communication/communication-administration/recordings/node/communicationidentityclient_playbacklive/recording_successfully_creates_a_user.js b/sdk/communication/communication-administration/recordings/node/communicationidentityclient_playbacklive/recording_successfully_creates_a_user.js new file mode 100644 index 000000000000..1b7d7a1999e0 --- /dev/null +++ b/sdk/communication/communication-administration/recordings/node/communicationidentityclient_playbacklive/recording_successfully_creates_a_user.js @@ -0,0 +1,29 @@ +let nock = require("nock"); + +module.exports.hash = "71dd63e8f90b2c2eb44bc15618466368"; + +module.exports.testInfo = { uniqueName: {}, newDate: {} }; + +nock("https://endpoint", { encodedQueryParams: true }) + .post("/identities") + .query(true) + .reply(200, { id: "sanitized" }, [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "Lvkfsfm7nEu2Hw03UaPLAA.0", + "Strict-Transport-Security", + "max-age=2592000", + "x-ms-client-request-id", + "sanitized", + "api-supported-versions", + "2020-07-20-preview1, 2020-07-20-preview2", + "X-Processing-Time", + "70ms", + "X-Azure-Ref", + "0Yil+XwAAAABQSKtlMocnSayYeBFOIIL2WVZSMzBFREdFMDQxOAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 20:47:30 GMT" + ]); diff --git a/sdk/communication/communication-administration/recordings/node/communicationidentityclient_playbacklive/recording_successfully_deletes_a_user.js b/sdk/communication/communication-administration/recordings/node/communicationidentityclient_playbacklive/recording_successfully_deletes_a_user.js new file mode 100644 index 000000000000..2c8f482e9b2c --- /dev/null +++ b/sdk/communication/communication-administration/recordings/node/communicationidentityclient_playbacklive/recording_successfully_deletes_a_user.js @@ -0,0 +1,25 @@ +let nock = require("nock"); + +module.exports.hash = "c32f7ebc5af64d902e3e080cc228e00f"; + +module.exports.testInfo = { uniqueName: {}, newDate: {} }; + +nock("https://endpoint", { encodedQueryParams: true }) + .delete("/identities/sanitized") + .query(true) + .reply(204, "", [ + "MS-CV", + "8qLo2O4Z1keqkI3MiyC6Xg.0", + "Strict-Transport-Security", + "max-age=2592000", + "x-ms-client-request-id", + "sanitized", + "api-supported-versions", + "2020-07-20-preview1, 2020-07-20-preview2", + "X-Processing-Time", + "733ms", + "X-Azure-Ref", + "0Yyl+XwAAAADBzDfuXDRCSYyeB5Ms95UoWVZSMzBFREdFMDMxNAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 20:47:32 GMT" + ]); diff --git a/sdk/communication/communication-administration/recordings/node/communicationidentityclient_playbacklive/recording_successfully_issues_a_token_for_a_user_multiple_scopes.js b/sdk/communication/communication-administration/recordings/node/communicationidentityclient_playbacklive/recording_successfully_issues_a_token_for_a_user_multiple_scopes.js new file mode 100644 index 000000000000..6a52a247d2c5 --- /dev/null +++ b/sdk/communication/communication-administration/recordings/node/communicationidentityclient_playbacklive/recording_successfully_issues_a_token_for_a_user_multiple_scopes.js @@ -0,0 +1,33 @@ +let nock = require("nock"); + +module.exports.hash = "f30fde667c7b7a14ab32826e4d83a221"; + +module.exports.testInfo = { uniqueName: {}, newDate: {} }; + +nock("https://endpoint", { encodedQueryParams: true }) + .post("/identities/sanitized/token", { scopes: ["chat", "pstn"] }) + .query(true) + .reply( + 200, + { id: "sanitized", token: "sanitized", expiresOn: "2020-10-08T20:47:30.0349118+00:00" }, + [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "uWssoFOL0EaTf0As2m1axw.0", + "Strict-Transport-Security", + "max-age=2592000", + "x-ms-client-request-id", + "sanitized", + "api-supported-versions", + "2020-07-20-preview1, 2020-07-20-preview2", + "X-Processing-Time", + "27ms", + "X-Azure-Ref", + "0Yil+XwAAAAAoRFXJ/gZZQr7Dss6fwqZmWVZSMzBFREdFMDMxNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 20:47:30 GMT" + ] + ); diff --git a/sdk/communication/communication-administration/recordings/node/communicationidentityclient_playbacklive/recording_successfully_issues_a_token_for_a_user_single_scope.js b/sdk/communication/communication-administration/recordings/node/communicationidentityclient_playbacklive/recording_successfully_issues_a_token_for_a_user_single_scope.js new file mode 100644 index 000000000000..adf5cdaf8df6 --- /dev/null +++ b/sdk/communication/communication-administration/recordings/node/communicationidentityclient_playbacklive/recording_successfully_issues_a_token_for_a_user_single_scope.js @@ -0,0 +1,33 @@ +let nock = require("nock"); + +module.exports.hash = "1c880cc35f2f3b240445a35a012e7bab"; + +module.exports.testInfo = { uniqueName: {}, newDate: {} }; + +nock("https://endpoint", { encodedQueryParams: true }) + .post("/identities/sanitized/token", { scopes: ["chat"] }) + .query(true) + .reply( + 200, + { id: "sanitized", token: "sanitized", expiresOn: "2020-10-08T20:47:29.889596+00:00" }, + [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "LyW5Y3Mu+UqhrqUOU3hKnA.0", + "Strict-Transport-Security", + "max-age=2592000", + "x-ms-client-request-id", + "sanitized", + "api-supported-versions", + "2020-07-20-preview1, 2020-07-20-preview2", + "X-Processing-Time", + "113ms", + "X-Azure-Ref", + "0Yil+XwAAAABTdE+YuwWHQIo6cdobLiL4WVZSMzBFREdFMDMyMQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 20:47:30 GMT" + ] + ); diff --git a/sdk/communication/communication-administration/recordings/node/communicationidentityclient_playbacklive/recording_successfully_revokes_tokens_issued_for_a_user.js b/sdk/communication/communication-administration/recordings/node/communicationidentityclient_playbacklive/recording_successfully_revokes_tokens_issued_for_a_user.js new file mode 100644 index 000000000000..bba8d6ce9c22 --- /dev/null +++ b/sdk/communication/communication-administration/recordings/node/communicationidentityclient_playbacklive/recording_successfully_revokes_tokens_issued_for_a_user.js @@ -0,0 +1,25 @@ +let nock = require("nock"); + +module.exports.hash = "e10098ac22e2857510889e9c31a45559"; + +module.exports.testInfo = { uniqueName: {}, newDate: {} }; + +nock("https://endpoint", { encodedQueryParams: true }) + .patch("/identities/sanitized", { tokensValidFrom: "2020-10-10T00:00:00.000Z" }) + .query(true) + .reply(204, "", [ + "MS-CV", + "33qtxiy3V0uhCwP+eva0Yg.0", + "Strict-Transport-Security", + "max-age=2592000", + "x-ms-client-request-id", + "sanitized", + "api-supported-versions", + "2020-07-20-preview1, 2020-07-20-preview2", + "X-Processing-Time", + "880ms", + "X-Azure-Ref", + "0Yyl+XwAAAAB9fU/woTTUR4QXWkynQodNWVZSMzBFREdFMDQwOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 20:47:30 GMT" + ]); diff --git a/sdk/communication/communication-administration/recordings/node/phonenumber__lros__phone_number_reservations_playbacklive/recording_can_cancel_a_phone_number_reservation.js b/sdk/communication/communication-administration/recordings/node/phonenumber__lros__phone_number_reservations_playbacklive/recording_can_cancel_a_phone_number_reservation.js new file mode 100644 index 000000000000..59a92a9935e0 --- /dev/null +++ b/sdk/communication/communication-administration/recordings/node/phonenumber__lros__phone_number_reservations_playbacklive/recording_can_cancel_a_phone_number_reservation.js @@ -0,0 +1,55 @@ +let nock = require("nock"); + +module.exports.hash = "f543a2ea0f5e2f732cbec44eb78eb96f"; + +module.exports.testInfo = { uniqueName: {}, newDate: {} }; + +nock("https://endpoint", { encodedQueryParams: true }) + .post("/administration/phonenumbers/searches/sanitized/cancel") + .query(true) + .reply(202, "", [ + "MS-CV", + "y5rWhJKH4UqIoVFS0Wy3NA.0", + "X-Processing-Time", + "626ms", + "X-Azure-Ref", + "0fSl+XwAAAABDd//JSRTySLVTmkFA8CA4WVZSMzBFREdFMDQwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 20:47:57 GMT", + "Content-Length", + "0" + ]); + +nock("https://endpoint", { encodedQueryParams: true }) + .get("/administration/phonenumbers/searches/sanitized") + .query(true) + .reply( + 200, + { + searchId: "sanitized", + displayName: "LRO Test Search", + createdAt: "2020-10-07T20:47:42.3582285+00:00", + description: "Test search for JS phone number admin SDK.", + phonePlanIds: ["sanitized", "sanitized"], + areaCode: "205", + quantity: 1, + locationOptions: [], + status: "Cancelling", + phoneNumbers: ["+12052067871"], + reservationExpiryDate: "2020-10-07T21:03:55.3836376+00:00" + }, + [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "+h/66RYvuEiJkoOn5BrwIg.0", + "X-Processing-Time", + "346ms", + "X-Azure-Ref", + "0fil+XwAAAAAQNk6QdCiwS42lOpayhq8fWVZSMzBFREdFMDMwNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 20:47:57 GMT" + ] + ); diff --git a/sdk/communication/communication-administration/recordings/node/phonenumber__lros__phone_number_reservations_playbacklive/recording_can_get_phoneplanids_and_areacode_to_create_reservation.js b/sdk/communication/communication-administration/recordings/node/phonenumber__lros__phone_number_reservations_playbacklive/recording_can_get_phoneplanids_and_areacode_to_create_reservation.js new file mode 100644 index 000000000000..26f0b573ef43 --- /dev/null +++ b/sdk/communication/communication-administration/recordings/node/phonenumber__lros__phone_number_reservations_playbacklive/recording_can_get_phoneplanids_and_areacode_to_create_reservation.js @@ -0,0 +1,114 @@ +let nock = require("nock"); + +module.exports.hash = "94e44043049458bd9e485a4c3758bf1a"; + +module.exports.testInfo = { uniqueName: {}, newDate: {} }; + +nock("https://endpoint", { encodedQueryParams: true }) + .get("/administration/phonenumbers/countries/US/phoneplangroups") + .query(true) + .reply( + 200, + { + phonePlanGroups: [ + { + phonePlanGroupId: "sanitized", + phoneNumberType: "Geographic", + localizedName: "Azure- User - Geographic", + localizedDescription: "These are numbers used by Azure resources." + }, + { + phonePlanGroupId: "sanitized", + phoneNumberType: "Geographic", + localizedName: "Azure - Geographic", + localizedDescription: "These are numbers used by Azure resources." + }, + { + phonePlanGroupId: "sanitized", + phoneNumberType: "TollFree", + localizedName: "Azure - Toll Free", + localizedDescription: "These are toll free numbers used by Azure resources." + } + ], + nextLink: null + }, + [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "FSb7lv2Pu0KPRgP7ScoQ/w.0", + "X-Processing-Time", + "236ms", + "X-Azure-Ref", + "0aCl+XwAAAABd+v5BUu6lRYEJlneLlSC/WVZSMzBFREdFMDQxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 20:47:35 GMT" + ] + ); + +nock("https://endpoint", { encodedQueryParams: true }) + .get("/administration/phonenumbers/countries/US/phoneplangroups/sanitized/phoneplans") + .query(true) + .reply( + 200, + { + phonePlans: [ + { + phonePlanId: "sanitized", + localizedName: "Outbound Only PSTN For User - Geographic", + locationType: "Selection", + areaCodes: [], + capabilities: ["Azure", "OutboundCalling", "UserAssignment", "Geographic"], + maximumSearchSize: 20 + }, + { + phonePlanId: "sanitized", + localizedName: "Inbound Only PSTN For User - Geographic", + locationType: "Selection", + areaCodes: [], + capabilities: ["Azure", "InboundCalling", "UserAssignment", "Geographic"], + maximumSearchSize: 20 + } + ], + nextLink: null + }, + [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "f5okYymJZkmgVWvWq5W9Eg.0", + "X-Processing-Time", + "232ms", + "X-Azure-Ref", + "0aCl+XwAAAADlXGGqIxPzTYtU6NpOJveXWVZSMzBFREdFMDQxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 20:47:36 GMT" + ] + ); + +nock("https://endpoint", { encodedQueryParams: true }) + .post("/administration/phonenumbers/countries/US/areacodes", { + locationOptions: [ + { labelId: "state", optionsValue: "AL" }, + { labelId: "city", optionsValue: "NOAM-US-AL-BI" } + ] + }) + .query(true) + .reply(200, { primaryAreaCodes: ["205"], secondaryAreaCodes: [], nextLink: null }, [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "3WDKECbGYkiNBYypoexhHA.0", + "X-Processing-Time", + "193ms", + "X-Azure-Ref", + "0aCl+XwAAAABo5g9yVvrBTq9FDCPDiDqAWVZSMzBFREdFMDQxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 20:47:36 GMT" + ]); diff --git a/sdk/communication/communication-administration/recordings/node/phonenumber__lros__phone_number_reservations_playbacklive/recording_can_wait_until_a_search_is_completed.js b/sdk/communication/communication-administration/recordings/node/phonenumber__lros__phone_number_reservations_playbacklive/recording_can_wait_until_a_search_is_completed.js new file mode 100644 index 000000000000..a41397b304b1 --- /dev/null +++ b/sdk/communication/communication-administration/recordings/node/phonenumber__lros__phone_number_reservations_playbacklive/recording_can_wait_until_a_search_is_completed.js @@ -0,0 +1,294 @@ +let nock = require("nock"); + +module.exports.hash = "80adfe50a0d8343d806a34bdf77ada6b"; + +module.exports.testInfo = { uniqueName: {}, newDate: {} }; + +nock("https://endpoint", { encodedQueryParams: true }) + .post("/administration/phonenumbers/searches", { + displayName: "LRO Test Search", + description: "Test search for JS phone number admin SDK.", + phonePlanIds: ["sanitized", "sanitized"], + areaCode: "205", + quantity: 1 + }) + .query(true) + .reply(201, { searchId: "sanitized" }, [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "Xd5BYTSO5kanzA5/Z7HNQg.0", + "X-Processing-Time", + "6015ms", + "X-Azure-Ref", + "0aCl+XwAAAAB6evibvRtHTJ5aUE+G0ZvPWVZSMzBFREdFMDQwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 20:47:42 GMT" + ]); + +nock("https://endpoint", { encodedQueryParams: true }) + .get("/administration/phonenumbers/searches/sanitized") + .query(true) + .reply( + 200, + { + searchId: "sanitized", + displayName: "LRO Test Search", + createdAt: "2020-10-07T20:47:42.3582285+00:00", + description: "Test search for JS phone number admin SDK.", + phonePlanIds: ["sanitized", "sanitized"], + areaCode: "205", + quantity: 1, + locationOptions: [], + status: "Pending", + phoneNumbers: [] + }, + [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "ydM7QAzjmEK7VwRKUSa+pQ.0", + "X-Processing-Time", + "270ms", + "X-Azure-Ref", + "0bil+XwAAAAApqsllfkNzTaic/hIJpzhWWVZSMzBFREdFMDQwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 20:47:42 GMT" + ] + ); + +nock("https://endpoint", { encodedQueryParams: true }) + .get("/administration/phonenumbers/searches/sanitized") + .query(true) + .reply( + 200, + { + searchId: "sanitized", + displayName: "LRO Test Search", + createdAt: "2020-10-07T20:47:42.3582285+00:00", + description: "Test search for JS phone number admin SDK.", + phonePlanIds: ["sanitized", "sanitized"], + areaCode: "205", + quantity: 1, + locationOptions: [], + status: "Pending", + phoneNumbers: [] + }, + [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "8oGgTXKCxU6OK9buyrPwlA.0", + "X-Processing-Time", + "347ms", + "X-Azure-Ref", + "0byl+XwAAAAD7A2L6U68+R4ORaguH6aLkWVZSMzBFREdFMDQwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 20:47:43 GMT" + ] + ); + +nock("https://endpoint", { encodedQueryParams: true }) + .get("/administration/phonenumbers/searches/sanitized") + .query(true) + .reply( + 200, + { + searchId: "sanitized", + displayName: "LRO Test Search", + createdAt: "2020-10-07T20:47:42.3582285+00:00", + description: "Test search for JS phone number admin SDK.", + phonePlanIds: ["sanitized", "sanitized"], + areaCode: "205", + quantity: 1, + locationOptions: [], + status: "Pending", + phoneNumbers: [] + }, + [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "iK5yTCX0YE+d1wuxLa/ZrQ.0", + "X-Processing-Time", + "269ms", + "X-Azure-Ref", + "0cSl+XwAAAABkx/kxw9PLRIXx2XDkHjn+WVZSMzBFREdFMDQwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 20:47:45 GMT" + ] + ); + +nock("https://endpoint", { encodedQueryParams: true }) + .get("/administration/phonenumbers/searches/sanitized") + .query(true) + .reply( + 200, + { + searchId: "sanitized", + displayName: "LRO Test Search", + createdAt: "2020-10-07T20:47:42.3582285+00:00", + description: "Test search for JS phone number admin SDK.", + phonePlanIds: ["sanitized", "sanitized"], + areaCode: "205", + quantity: 1, + locationOptions: [], + status: "Pending", + phoneNumbers: [] + }, + [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "FdpjzsyBOkubhYxja6uJnw.0", + "X-Processing-Time", + "280ms", + "X-Azure-Ref", + "0cyl+XwAAAACOhSclmCvFR5zLoV+kg4ZBWVZSMzBFREdFMDQwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 20:47:47 GMT" + ] + ); + +nock("https://endpoint", { encodedQueryParams: true }) + .get("/administration/phonenumbers/searches/sanitized") + .query(true) + .reply( + 200, + { + searchId: "sanitized", + displayName: "LRO Test Search", + createdAt: "2020-10-07T20:47:42.3582285+00:00", + description: "Test search for JS phone number admin SDK.", + phonePlanIds: ["sanitized", "sanitized"], + areaCode: "205", + quantity: 1, + locationOptions: [], + status: "Pending", + phoneNumbers: [] + }, + [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "hvST1uXLLEC6GRPOkmruhg.0", + "X-Processing-Time", + "267ms", + "X-Azure-Ref", + "0dil+XwAAAACMIlqUx/buTLHw+dI3VLm/WVZSMzBFREdFMDQwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 20:47:50 GMT" + ] + ); + +nock("https://endpoint", { encodedQueryParams: true }) + .get("/administration/phonenumbers/searches/sanitized") + .query(true) + .reply( + 200, + { + searchId: "sanitized", + displayName: "LRO Test Search", + createdAt: "2020-10-07T20:47:42.3582285+00:00", + description: "Test search for JS phone number admin SDK.", + phonePlanIds: ["sanitized", "sanitized"], + areaCode: "205", + quantity: 1, + locationOptions: [], + status: "Pending", + phoneNumbers: [] + }, + [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "DNuNe7iM50muy2zuHobQWQ.0", + "X-Processing-Time", + "262ms", + "X-Azure-Ref", + "0eCl+XwAAAABggRyTMNfqQ5F7/t4q4J73WVZSMzBFREdFMDQwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 20:47:52 GMT" + ] + ); + +nock("https://endpoint", { encodedQueryParams: true }) + .get("/administration/phonenumbers/searches/sanitized") + .query(true) + .reply( + 200, + { + searchId: "sanitized", + displayName: "LRO Test Search", + createdAt: "2020-10-07T20:47:42.3582285+00:00", + description: "Test search for JS phone number admin SDK.", + phonePlanIds: ["sanitized", "sanitized"], + areaCode: "205", + quantity: 1, + locationOptions: [], + status: "InProgress", + phoneNumbers: [] + }, + [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "vpBqHPeSrEKu1Loc0YJT4A.0", + "X-Processing-Time", + "265ms", + "X-Azure-Ref", + "0eil+XwAAAABrEwIqQiyFQ7owTiXYSf+FWVZSMzBFREdFMDQwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 20:47:54 GMT" + ] + ); + +nock("https://endpoint", { encodedQueryParams: true }) + .get("/administration/phonenumbers/searches/sanitized") + .query(true) + .reply( + 200, + { + searchId: "sanitized", + displayName: "LRO Test Search", + createdAt: "2020-10-07T20:47:42.3582285+00:00", + description: "Test search for JS phone number admin SDK.", + phonePlanIds: ["sanitized", "sanitized"], + areaCode: "205", + quantity: 1, + locationOptions: [], + status: "Reserved", + phoneNumbers: ["+18005551234"], + reservationExpiryDate: "2020-10-07T21:03:55.3836376+00:00" + }, + [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "C7Fe7P1kZ0CGkRmIUKffcQ.0", + "X-Processing-Time", + "266ms", + "X-Azure-Ref", + "0fSl+XwAAAABzAq+PszQEQYBHSiy7Bb1zWVZSMzBFREdFMDQwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 20:47:56 GMT" + ] + ); diff --git a/sdk/communication/communication-administration/recordings/node/phonenumber__lros__purchase_reservation_playbacklive/recording_can_get_phoneplanids_and_areacode_to_create_reservation.js b/sdk/communication/communication-administration/recordings/node/phonenumber__lros__purchase_reservation_playbacklive/recording_can_get_phoneplanids_and_areacode_to_create_reservation.js new file mode 100644 index 000000000000..8d63df8c1983 --- /dev/null +++ b/sdk/communication/communication-administration/recordings/node/phonenumber__lros__purchase_reservation_playbacklive/recording_can_get_phoneplanids_and_areacode_to_create_reservation.js @@ -0,0 +1,114 @@ +let nock = require("nock"); + +module.exports.hash = "b1637f1885333567f83f06095defde2f"; + +module.exports.testInfo = { uniqueName: {}, newDate: {} }; + +nock("https://endpoint", { encodedQueryParams: true }) + .get("/administration/phonenumbers/countries/US/phoneplangroups") + .query(true) + .reply( + 200, + { + phonePlanGroups: [ + { + phonePlanGroupId: "sanitized", + phoneNumberType: "Geographic", + localizedName: "Azure- User - Geographic", + localizedDescription: "These are numbers used by Azure resources." + }, + { + phonePlanGroupId: "sanitized", + phoneNumberType: "Geographic", + localizedName: "Azure - Geographic", + localizedDescription: "These are numbers used by Azure resources." + }, + { + phonePlanGroupId: "sanitized", + phoneNumberType: "TollFree", + localizedName: "Azure - Toll Free", + localizedDescription: "These are toll free numbers used by Azure resources." + } + ], + nextLink: null + }, + [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "+Lda1FWMP0GZPuTAYU9RdQ.0", + "X-Processing-Time", + "660ms", + "X-Azure-Ref", + "0Djl+XwAAAAA5mzI7wTTgS5CzGEjFCXzHWVZSMzBFREdFMDMwOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 21:54:22 GMT" + ] + ); + +nock("https://endpoint", { encodedQueryParams: true }) + .get("/administration/phonenumbers/countries/US/phoneplangroups/sanitized/phoneplans") + .query(true) + .reply( + 200, + { + phonePlans: [ + { + phonePlanId: "sanitized", + localizedName: "Outbound Only PSTN For User - Geographic", + locationType: "Selection", + areaCodes: [], + capabilities: ["Azure", "OutboundCalling", "UserAssignment", "Geographic"], + maximumSearchSize: 20 + }, + { + phonePlanId: "sanitized", + localizedName: "Inbound Only PSTN For User - Geographic", + locationType: "Selection", + areaCodes: [], + capabilities: ["Azure", "InboundCalling", "UserAssignment", "Geographic"], + maximumSearchSize: 20 + } + ], + nextLink: null + }, + [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "AWD0skKUOUerHOCs2057rQ.0", + "X-Processing-Time", + "286ms", + "X-Azure-Ref", + "0Djl+XwAAAADaU8OzdCZnSoH/46iwavssWVZSMzBFREdFMDMwOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 21:54:22 GMT" + ] + ); + +nock("https://endpoint", { encodedQueryParams: true }) + .post("/administration/phonenumbers/countries/US/areacodes", { + locationOptions: [ + { labelId: "state", optionsValue: "AL" }, + { labelId: "city", optionsValue: "NOAM-US-AL-BI" } + ] + }) + .query(true) + .reply(200, { primaryAreaCodes: ["205"], secondaryAreaCodes: [], nextLink: null }, [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "XhcVIXpiPE23wYfft3w4HA.0", + "X-Processing-Time", + "178ms", + "X-Azure-Ref", + "0Dzl+XwAAAABS1bHj7hGTRaqOGIbCGVkEWVZSMzBFREdFMDMwOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 21:54:22 GMT" + ]); diff --git a/sdk/communication/communication-administration/recordings/node/phonenumber__lros__purchase_reservation_playbacklive/recording_can_wait_until_a_reservation_is_purchased.js b/sdk/communication/communication-administration/recordings/node/phonenumber__lros__purchase_reservation_playbacklive/recording_can_wait_until_a_reservation_is_purchased.js new file mode 100644 index 000000000000..8cc93ace0d11 --- /dev/null +++ b/sdk/communication/communication-administration/recordings/node/phonenumber__lros__purchase_reservation_playbacklive/recording_can_wait_until_a_reservation_is_purchased.js @@ -0,0 +1,957 @@ +let nock = require("nock"); + +module.exports.hash = "e8997f13e4f73ef31dcb45c3b33d453d"; + +module.exports.testInfo = { uniqueName: {}, newDate: {} }; + +nock("https://endpoint", { encodedQueryParams: true }) + .post("/administration/phonenumbers/searches", { + displayName: "LRO Test Search", + description: "Test search for JS phone number admin SDK.", + phonePlanIds: ["sanitized", "sanitized"], + areaCode: "205", + quantity: 1 + }) + .query(true) + .reply(201, { searchId: "sanitized" }, [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "RyZDHb9sfE+0RIYj6p52aQ.0", + "X-Processing-Time", + "1293ms", + "X-Azure-Ref", + "0Dzl+XwAAAAB4EmrVUdZAS64XzS8LK3hgWVZSMzBFREdFMDQxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 21:54:24 GMT" + ]); + +nock("https://endpoint", { encodedQueryParams: true }) + .get("/administration/phonenumbers/searches/sanitized") + .query(true) + .reply( + 200, + { + searchId: "sanitized", + displayName: "LRO Test Search", + createdAt: "2020-10-07T21:54:24.2892469+00:00", + description: "Test search for JS phone number admin SDK.", + phonePlanIds: ["sanitized", "sanitized"], + areaCode: "205", + quantity: 1, + locationOptions: [], + status: "Pending", + phoneNumbers: [] + }, + [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "QKZntRnHNEyc0OhV2Wrxtw.0", + "X-Processing-Time", + "267ms", + "X-Azure-Ref", + "0EDl+XwAAAADAm8mi58tKT4Q0Rb0VO5yrWVZSMzBFREdFMDQxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 21:54:25 GMT" + ] + ); + +nock("https://endpoint", { encodedQueryParams: true }) + .get("/administration/phonenumbers/searches/sanitized") + .query(true) + .reply( + 200, + { + searchId: "sanitized", + displayName: "LRO Test Search", + createdAt: "2020-10-07T21:54:24.2892469+00:00", + description: "Test search for JS phone number admin SDK.", + phonePlanIds: ["sanitized", "sanitized"], + areaCode: "205", + quantity: 1, + locationOptions: [], + status: "Pending", + phoneNumbers: [] + }, + [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "JVxePNuNXUiTDTjW5IydQA.0", + "X-Processing-Time", + "309ms", + "X-Azure-Ref", + "0ETl+XwAAAACmVMZjvn0PTJgaN8oyhlBcWVZSMzBFREdFMDQxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 21:54:25 GMT" + ] + ); + +nock("https://endpoint", { encodedQueryParams: true }) + .get("/administration/phonenumbers/searches/sanitized") + .query(true) + .reply( + 200, + { + searchId: "sanitized", + displayName: "LRO Test Search", + createdAt: "2020-10-07T21:54:24.2892469+00:00", + description: "Test search for JS phone number admin SDK.", + phonePlanIds: ["sanitized", "sanitized"], + areaCode: "205", + quantity: 1, + locationOptions: [], + status: "Pending", + phoneNumbers: [] + }, + [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "9lwUImPVvEaYTZpm7g0biQ.0", + "X-Processing-Time", + "450ms", + "X-Azure-Ref", + "0Ezl+XwAAAADGbA0cA7UPSYUtGt9dUCKzWVZSMzBFREdFMDQxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 21:54:27 GMT" + ] + ); + +nock("https://endpoint", { encodedQueryParams: true }) + .get("/administration/phonenumbers/searches/sanitized") + .query(true) + .reply( + 200, + { + searchId: "sanitized", + displayName: "LRO Test Search", + createdAt: "2020-10-07T21:54:24.2892469+00:00", + description: "Test search for JS phone number admin SDK.", + phonePlanIds: ["sanitized", "sanitized"], + areaCode: "205", + quantity: 1, + locationOptions: [], + status: "Pending", + phoneNumbers: [] + }, + [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "x9ncE2jCjU6dl70g5RTHNw.0", + "X-Processing-Time", + "295ms", + "X-Azure-Ref", + "0Fjl+XwAAAABM8juYvtpHTrw9wt+AES1SWVZSMzBFREdFMDQxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 21:54:30 GMT" + ] + ); + +nock("https://endpoint", { encodedQueryParams: true }) + .get("/administration/phonenumbers/searches/sanitized") + .query(true) + .reply( + 200, + { + searchId: "sanitized", + displayName: "LRO Test Search", + createdAt: "2020-10-07T21:54:24.2892469+00:00", + description: "Test search for JS phone number admin SDK.", + phonePlanIds: ["sanitized", "sanitized"], + areaCode: "205", + quantity: 1, + locationOptions: [], + status: "Pending", + phoneNumbers: [] + }, + [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "VPjQjJekl0SunOkS7y+xjQ.0", + "X-Processing-Time", + "273ms", + "X-Azure-Ref", + "0GDl+XwAAAAC+Bl08i7QHSJrfGFCzqnJ0WVZSMzBFREdFMDQxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 21:54:32 GMT" + ] + ); + +nock("https://endpoint", { encodedQueryParams: true }) + .get("/administration/phonenumbers/searches/sanitized") + .query(true) + .reply( + 200, + { + searchId: "sanitized", + displayName: "LRO Test Search", + createdAt: "2020-10-07T21:54:24.2892469+00:00", + description: "Test search for JS phone number admin SDK.", + phonePlanIds: ["sanitized", "sanitized"], + areaCode: "205", + quantity: 1, + locationOptions: [], + status: "InProgress", + phoneNumbers: [] + }, + [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "XVEDwrSKx0GDtwGa97QkdQ.0", + "X-Processing-Time", + "296ms", + "X-Azure-Ref", + "0Gjl+XwAAAABoCGVkNVl8RJd00EoFT8x9WVZSMzBFREdFMDQxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 21:54:34 GMT" + ] + ); + +nock("https://endpoint", { encodedQueryParams: true }) + .get("/administration/phonenumbers/searches/sanitized") + .query(true) + .reply( + 200, + { + searchId: "sanitized", + displayName: "LRO Test Search", + createdAt: "2020-10-07T21:54:24.2892469+00:00", + description: "Test search for JS phone number admin SDK.", + phonePlanIds: ["sanitized", "sanitized"], + areaCode: "205", + quantity: 1, + locationOptions: [], + status: "Reserved", + phoneNumbers: ["+18005551234"], + reservationExpiryDate: "2020-10-07T22:10:35.7019339+00:00" + }, + [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "ubXVUp5AlECKQMsG8OHV8A.0", + "X-Processing-Time", + "274ms", + "X-Azure-Ref", + "0HDl+XwAAAABu9uK5i2PHT6dIK07k5zeFWVZSMzBFREdFMDQxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 21:54:36 GMT" + ] + ); + +nock("https://endpoint", { encodedQueryParams: true }) + .post("/administration/phonenumbers/searches/sanitized/purchase") + .query(true) + .reply(202, "", [ + "MS-CV", + "f4Bub1joEEauppmVObqE6A.0", + "X-Processing-Time", + "876ms", + "X-Azure-Ref", + "0HTl+XwAAAACDbyOSPlGTT4xkvSB+o6BRWVZSMzBFREdFMDQxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 21:54:37 GMT", + "Content-Length", + "0" + ]); + +nock("https://endpoint", { encodedQueryParams: true }) + .get("/administration/phonenumbers/searches/sanitized") + .query(true) + .reply( + 200, + { + searchId: "sanitized", + displayName: "LRO Test Search", + createdAt: "2020-10-07T21:54:24.2892469+00:00", + description: "Test search for JS phone number admin SDK.", + phonePlanIds: ["sanitized", "sanitized"], + areaCode: "205", + quantity: 1, + locationOptions: [], + status: "Completing", + phoneNumbers: ["+18005551234"], + reservationExpiryDate: "2020-10-07T22:10:35.7019339+00:00" + }, + [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "miHu+dxBNEWU0Zc2IY7P6w.0", + "X-Processing-Time", + "264ms", + "X-Azure-Ref", + "0Hjl+XwAAAABFih883l8tSa221ACeKHyvWVZSMzBFREdFMDQxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 21:54:37 GMT" + ] + ); + +nock("https://endpoint", { encodedQueryParams: true }) + .get("/administration/phonenumbers/searches/sanitized") + .query(true) + .reply( + 200, + { + searchId: "sanitized", + displayName: "LRO Test Search", + createdAt: "2020-10-07T21:54:24.2892469+00:00", + description: "Test search for JS phone number admin SDK.", + phonePlanIds: ["sanitized", "sanitized"], + areaCode: "205", + quantity: 1, + locationOptions: [], + status: "Completing", + phoneNumbers: ["+18005551234"], + reservationExpiryDate: "2020-10-07T22:10:35.7019339+00:00" + }, + [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "RnlOx084yE2HYU0wbdCj8Q.0", + "X-Processing-Time", + "266ms", + "X-Azure-Ref", + "0Hjl+XwAAAAAFBoYjGffTT4sMQrgRAFK4WVZSMzBFREdFMDQxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 21:54:38 GMT" + ] + ); + +nock("https://endpoint", { encodedQueryParams: true }) + .get("/administration/phonenumbers/searches/sanitized") + .query(true) + .reply( + 200, + { + searchId: "sanitized", + displayName: "LRO Test Search", + createdAt: "2020-10-07T21:54:24.2892469+00:00", + description: "Test search for JS phone number admin SDK.", + phonePlanIds: ["sanitized", "sanitized"], + areaCode: "205", + quantity: 1, + locationOptions: [], + status: "Completing", + phoneNumbers: ["+18005551234"], + reservationExpiryDate: "2020-10-07T22:10:35.7019339+00:00" + }, + [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "cQ6AHuNvUkW6PjKJbeekUg.0", + "X-Processing-Time", + "263ms", + "X-Azure-Ref", + "0IDl+XwAAAAA8MRg64oHYTZLJUsugx7mPWVZSMzBFREdFMDQxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 21:54:40 GMT" + ] + ); + +nock("https://endpoint", { encodedQueryParams: true }) + .get("/administration/phonenumbers/searches/sanitized") + .query(true) + .reply( + 200, + { + searchId: "sanitized", + displayName: "LRO Test Search", + createdAt: "2020-10-07T21:54:24.2892469+00:00", + description: "Test search for JS phone number admin SDK.", + phonePlanIds: ["sanitized", "sanitized"], + areaCode: "205", + quantity: 1, + locationOptions: [], + status: "Completing", + phoneNumbers: ["+18005551234"], + reservationExpiryDate: "2020-10-07T22:10:35.7019339+00:00" + }, + [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "PeNZl8PaMEmCrKQJfPscHQ.0", + "X-Processing-Time", + "404ms", + "X-Azure-Ref", + "0Izl+XwAAAAB7SE4zD1UmT7YE8NjRlPvtWVZSMzBFREdFMDQxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 21:54:42 GMT" + ] + ); + +nock("https://endpoint", { encodedQueryParams: true }) + .get("/administration/phonenumbers/searches/sanitized") + .query(true) + .reply( + 200, + { + searchId: "sanitized", + displayName: "LRO Test Search", + createdAt: "2020-10-07T21:54:24.2892469+00:00", + description: "Test search for JS phone number admin SDK.", + phonePlanIds: ["sanitized", "sanitized"], + areaCode: "205", + quantity: 1, + locationOptions: [], + status: "Completing", + phoneNumbers: ["+18005551234"], + reservationExpiryDate: "2020-10-07T22:10:35.7019339+00:00" + }, + [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "EbrNt+OM40u8TBeDmRwtWw.0", + "X-Processing-Time", + "684ms", + "X-Azure-Ref", + "0JTl+XwAAAAD7hEG44L2jRojL/JH3EHDkWVZSMzBFREdFMDQxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 21:54:45 GMT" + ] + ); + +nock("https://endpoint", { encodedQueryParams: true }) + .get("/administration/phonenumbers/searches/sanitized") + .query(true) + .reply( + 200, + { + searchId: "sanitized", + displayName: "LRO Test Search", + createdAt: "2020-10-07T21:54:24.2892469+00:00", + description: "Test search for JS phone number admin SDK.", + phonePlanIds: ["sanitized", "sanitized"], + areaCode: "205", + quantity: 1, + locationOptions: [], + status: "Completing", + phoneNumbers: ["+18005551234"], + reservationExpiryDate: "2020-10-07T22:10:35.7019339+00:00" + }, + [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "vctZ9aVhmkuOtN2OKNrVLQ.0", + "X-Processing-Time", + "298ms", + "X-Azure-Ref", + "0KDl+XwAAAAClkyjvtf5GT6pXoe4+mznRWVZSMzBFREdFMDQxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 21:54:47 GMT" + ] + ); + +nock("https://endpoint", { encodedQueryParams: true }) + .get("/administration/phonenumbers/searches/sanitized") + .query(true) + .reply( + 200, + { + searchId: "sanitized", + displayName: "LRO Test Search", + createdAt: "2020-10-07T21:54:24.2892469+00:00", + description: "Test search for JS phone number admin SDK.", + phonePlanIds: ["sanitized", "sanitized"], + areaCode: "205", + quantity: 1, + locationOptions: [], + status: "Completing", + phoneNumbers: ["+18005551234"], + reservationExpiryDate: "2020-10-07T22:10:35.7019339+00:00" + }, + [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "1utHr8TumkCJAJ+scYZdyA.0", + "X-Processing-Time", + "266ms", + "X-Azure-Ref", + "0Kjl+XwAAAADQZ6xEvGklRIJ7e/y2lC9dWVZSMzBFREdFMDQxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 21:54:49 GMT" + ] + ); + +nock("https://endpoint", { encodedQueryParams: true }) + .get("/administration/phonenumbers/searches/sanitized") + .query(true) + .reply( + 200, + { + searchId: "sanitized", + displayName: "LRO Test Search", + createdAt: "2020-10-07T21:54:24.2892469+00:00", + description: "Test search for JS phone number admin SDK.", + phonePlanIds: ["sanitized", "sanitized"], + areaCode: "205", + quantity: 1, + locationOptions: [], + status: "Completing", + phoneNumbers: ["+18005551234"], + reservationExpiryDate: "2020-10-07T22:10:35.7019339+00:00" + }, + [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "W5+sEwylukKZ5GFgpJD2AQ.0", + "X-Processing-Time", + "324ms", + "X-Azure-Ref", + "0LDl+XwAAAABkKQt7fUC4QofsWZ+TJTVFWVZSMzBFREdFMDQxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 21:54:52 GMT" + ] + ); + +nock("https://endpoint", { encodedQueryParams: true }) + .get("/administration/phonenumbers/searches/sanitized") + .query(true) + .reply( + 200, + { + searchId: "sanitized", + displayName: "LRO Test Search", + createdAt: "2020-10-07T21:54:24.2892469+00:00", + description: "Test search for JS phone number admin SDK.", + phonePlanIds: ["sanitized", "sanitized"], + areaCode: "205", + quantity: 1, + locationOptions: [], + status: "Completing", + phoneNumbers: ["+18005551234"], + reservationExpiryDate: "2020-10-07T22:10:35.7019339+00:00" + }, + [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "Sw8vr3kXFEyQxOA/lbnE4A.0", + "X-Processing-Time", + "580ms", + "X-Azure-Ref", + "0Lzl+XwAAAABXfqZKMawaTKOtbIIEUrgQWVZSMzBFREdFMDQxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 21:54:54 GMT" + ] + ); + +nock("https://endpoint", { encodedQueryParams: true }) + .get("/administration/phonenumbers/searches/sanitized") + .query(true) + .reply( + 200, + { + searchId: "sanitized", + displayName: "LRO Test Search", + createdAt: "2020-10-07T21:54:24.2892469+00:00", + description: "Test search for JS phone number admin SDK.", + phonePlanIds: ["sanitized", "sanitized"], + areaCode: "205", + quantity: 1, + locationOptions: [], + status: "Completing", + phoneNumbers: ["+18005551234"], + reservationExpiryDate: "2020-10-07T22:10:35.7019339+00:00" + }, + [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "DXORuspEoU21k/PRf9JXjA.0", + "X-Processing-Time", + "318ms", + "X-Azure-Ref", + "0MTl+XwAAAABmwEiPLU1PS6nvu8KZrK3mWVZSMzBFREdFMDQxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 21:54:58 GMT" + ] + ); + +nock("https://endpoint", { encodedQueryParams: true }) + .get("/administration/phonenumbers/searches/sanitized") + .query(true) + .reply( + 200, + { + searchId: "sanitized", + displayName: "LRO Test Search", + createdAt: "2020-10-07T21:54:24.2892469+00:00", + description: "Test search for JS phone number admin SDK.", + phonePlanIds: ["sanitized", "sanitized"], + areaCode: "205", + quantity: 1, + locationOptions: [], + status: "Completing", + phoneNumbers: ["+18005551234"], + reservationExpiryDate: "2020-10-07T22:10:35.7019339+00:00" + }, + [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "ZC2GjrW5IU6kEUxnc1cZPA.0", + "X-Processing-Time", + "280ms", + "X-Azure-Ref", + "0NDl+XwAAAABZcyRrfrVtS4hAOuWQqiuMWVZSMzBFREdFMDQxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 21:55:00 GMT" + ] + ); + +nock("https://endpoint", { encodedQueryParams: true }) + .get("/administration/phonenumbers/searches/sanitized") + .query(true) + .reply( + 200, + { + searchId: "sanitized", + displayName: "LRO Test Search", + createdAt: "2020-10-07T21:54:24.2892469+00:00", + description: "Test search for JS phone number admin SDK.", + phonePlanIds: ["sanitized", "sanitized"], + areaCode: "205", + quantity: 1, + locationOptions: [], + status: "Completing", + phoneNumbers: ["+18005551234"], + reservationExpiryDate: "2020-10-07T22:10:35.7019339+00:00" + }, + [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "O2dCh3NSdUuHIpe7dmuILw.0", + "X-Processing-Time", + "432ms", + "X-Azure-Ref", + "0Njl+XwAAAADDgWk2cpXCTqDgkqszrHv3WVZSMzBFREdFMDQxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 21:55:02 GMT" + ] + ); + +nock("https://endpoint", { encodedQueryParams: true }) + .get("/administration/phonenumbers/searches/sanitized") + .query(true) + .reply( + 200, + { + searchId: "sanitized", + displayName: "LRO Test Search", + createdAt: "2020-10-07T21:54:24.2892469+00:00", + description: "Test search for JS phone number admin SDK.", + phonePlanIds: ["sanitized", "sanitized"], + areaCode: "205", + quantity: 1, + locationOptions: [], + status: "Completing", + phoneNumbers: ["+18005551234"], + reservationExpiryDate: "2020-10-07T22:10:35.7019339+00:00" + }, + [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "lrlXKWofPk6z8RSQLfP1MA.0", + "X-Processing-Time", + "338ms", + "X-Azure-Ref", + "0OTl+XwAAAAAy1nAW5Ch8T4B3nH/ZvDbKWVZSMzBFREdFMDQxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 21:55:05 GMT" + ] + ); + +nock("https://endpoint", { encodedQueryParams: true }) + .get("/administration/phonenumbers/searches/sanitized") + .query(true) + .reply( + 200, + { + searchId: "sanitized", + displayName: "LRO Test Search", + createdAt: "2020-10-07T21:54:24.2892469+00:00", + description: "Test search for JS phone number admin SDK.", + phonePlanIds: ["sanitized", "sanitized"], + areaCode: "205", + quantity: 1, + locationOptions: [], + status: "PurchasePending", + phoneNumbers: ["+18005551234"], + reservationExpiryDate: "2020-10-07T22:10:35.7019339+00:00" + }, + [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "PrrJbUYeKEiZRaiZnYpWvg.0", + "X-Processing-Time", + "275ms", + "X-Azure-Ref", + "0Ozl+XwAAAABlON3OmXSVSojNjQOeftZXWVZSMzBFREdFMDQxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 21:55:07 GMT" + ] + ); + +nock("https://endpoint", { encodedQueryParams: true }) + .get("/administration/phonenumbers/searches/sanitized") + .query(true) + .reply( + 200, + { + searchId: "sanitized", + displayName: "LRO Test Search", + createdAt: "2020-10-07T21:54:24.2892469+00:00", + description: "Test search for JS phone number admin SDK.", + phonePlanIds: ["sanitized", "sanitized"], + areaCode: "205", + quantity: 1, + locationOptions: [], + status: "PurchasePending", + phoneNumbers: ["+18005551234"], + reservationExpiryDate: "2020-10-07T22:10:35.7019339+00:00" + }, + [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "zYufa2LCfkGG1r2A3JiSqQ.0", + "X-Processing-Time", + "286ms", + "X-Azure-Ref", + "0PTl+XwAAAACFVqlGnDKnTZs6n1C+YchbWVZSMzBFREdFMDQxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 21:55:09 GMT" + ] + ); + +nock("https://endpoint", { encodedQueryParams: true }) + .get("/administration/phonenumbers/searches/sanitized") + .query(true) + .reply( + 200, + { + searchId: "sanitized", + displayName: "LRO Test Search", + createdAt: "2020-10-07T21:54:24.2892469+00:00", + description: "Test search for JS phone number admin SDK.", + phonePlanIds: ["sanitized", "sanitized"], + areaCode: "205", + quantity: 1, + locationOptions: [], + status: "PurchasePending", + phoneNumbers: ["+18005551234"], + reservationExpiryDate: "2020-10-07T22:10:35.7019339+00:00" + }, + [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "oLEyrkr/iki2N8HrgGiHMg.0", + "X-Processing-Time", + "363ms", + "X-Azure-Ref", + "0Pzl+XwAAAABfAs/wFmgBQ7xW04zsME/BWVZSMzBFREdFMDQxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 21:55:12 GMT" + ] + ); + +nock("https://endpoint", { encodedQueryParams: true }) + .get("/administration/phonenumbers/searches/sanitized") + .query(true) + .reply( + 200, + { + searchId: "sanitized", + displayName: "LRO Test Search", + createdAt: "2020-10-07T21:54:24.2892469+00:00", + description: "Test search for JS phone number admin SDK.", + phonePlanIds: ["sanitized", "sanitized"], + areaCode: "205", + quantity: 1, + locationOptions: [], + status: "PurchasePending", + phoneNumbers: ["+18005551234"], + reservationExpiryDate: "2020-10-07T22:10:35.7019339+00:00" + }, + [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "xaD8+JJ+lk+tG6dZzQVrww.0", + "X-Processing-Time", + "285ms", + "X-Azure-Ref", + "0Qjl+XwAAAAAbLju2/p1aQ5p4vv+CnmK0WVZSMzBFREdFMDQxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 21:55:14 GMT" + ] + ); + +nock("https://endpoint", { encodedQueryParams: true }) + .get("/administration/phonenumbers/searches/sanitized") + .query(true) + .reply( + 200, + { + searchId: "sanitized", + displayName: "LRO Test Search", + createdAt: "2020-10-07T21:54:24.2892469+00:00", + description: "Test search for JS phone number admin SDK.", + phonePlanIds: ["sanitized", "sanitized"], + areaCode: "205", + quantity: 1, + locationOptions: [], + status: "PurchasePending", + phoneNumbers: ["+18005551234"], + reservationExpiryDate: "2020-10-07T22:10:35.7019339+00:00" + }, + [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "zsHtpjLJ6kODGcsmxcaFvw.0", + "X-Processing-Time", + "360ms", + "X-Azure-Ref", + "0RDl+XwAAAAAdO/C4r3nRTqMrLH/OL9KaWVZSMzBFREdFMDQxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 21:55:16 GMT" + ] + ); + +nock("https://endpoint", { encodedQueryParams: true }) + .get("/administration/phonenumbers/searches/sanitized") + .query(true) + .reply( + 200, + { + searchId: "sanitized", + displayName: "LRO Test Search", + createdAt: "2020-10-07T21:54:24.2892469+00:00", + description: "Test search for JS phone number admin SDK.", + phonePlanIds: ["sanitized", "sanitized"], + areaCode: "205", + quantity: 1, + locationOptions: [], + status: "PurchasePending", + phoneNumbers: ["+18005551234"], + reservationExpiryDate: "2020-10-07T22:10:35.7019339+00:00" + }, + [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "u1fLWDAatk+MRtUpdfEDdg.0", + "X-Processing-Time", + "274ms", + "X-Azure-Ref", + "0Rzl+XwAAAAAAEKGRN0JERIuV/Z8DmgMaWVZSMzBFREdFMDQxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 21:55:18 GMT" + ] + ); + +nock("https://endpoint", { encodedQueryParams: true }) + .get("/administration/phonenumbers/searches/sanitized") + .query(true) + .reply( + 200, + { + searchId: "sanitized", + displayName: "LRO Test Search", + createdAt: "2020-10-07T21:54:24.2892469+00:00", + description: "Test search for JS phone number admin SDK.", + phonePlanIds: ["sanitized", "sanitized"], + areaCode: "205", + quantity: 1, + locationOptions: [], + status: "Success", + phoneNumbers: ["+18005551234"], + reservationExpiryDate: "2020-10-07T22:10:35.7019339+00:00" + }, + [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "icMGtb6dQE6iBGMaqlL0EA.0", + "X-Processing-Time", + "274ms", + "X-Azure-Ref", + "0STl+XwAAAADn4C4c+qRbQ5Fz38rhJPTsWVZSMzBFREdFMDQxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 21:55:21 GMT" + ] + ); diff --git a/sdk/communication/communication-administration/recordings/node/phonenumber__lros__release_playbacklive/recording_can_get_phone_number_to_release.js b/sdk/communication/communication-administration/recordings/node/phonenumber__lros__release_playbacklive/recording_can_get_phone_number_to_release.js new file mode 100644 index 000000000000..e06e64810d89 --- /dev/null +++ b/sdk/communication/communication-administration/recordings/node/phonenumber__lros__release_playbacklive/recording_can_get_phone_number_to_release.js @@ -0,0 +1,52 @@ +let nock = require("nock"); + +module.exports.hash = "eedc975deedee97de4ed28a5a0fa98a7"; + +module.exports.testInfo = { uniqueName: {}, newDate: {} }; + +nock("https://endpoint", { encodedQueryParams: true }) + .get("/administration/phonenumbers/phonenumbers") + .query(true) + .reply( + 200, + { + phoneNumbers: [ + { + phoneNumber: "+18005551234", + acquiredCapabilities: [ + "Azure", + "InboundCalling", + "UserAssignment", + "Geographic", + "OutboundCalling" + ], + availableCapabilities: [ + "UserAssignment", + "Geographic", + "Azure", + "Office365", + "InboundCalling", + "OutboundCalling" + ], + assignmentStatus: "Unassigned", + placeName: "Birmingham, United States", + activationState: "Activated" + } + ], + nextLink: null + }, + [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "vOjx38nhiEiq/Had2uQR2Q.0", + "X-Processing-Time", + "396ms", + "X-Azure-Ref", + "04zl+XwAAAACSi8VRbQPURJ+3BQaRmovRWVZSMzBFREdFMDQxMAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 21:57:56 GMT" + ] + ); diff --git a/sdk/communication/communication-administration/recordings/node/phonenumber__lros__release_playbacklive/recording_can_wait_until_a_phone_number_is_released.js b/sdk/communication/communication-administration/recordings/node/phonenumber__lros__release_playbacklive/recording_can_wait_until_a_phone_number_is_released.js new file mode 100644 index 000000000000..5d82ba2201de --- /dev/null +++ b/sdk/communication/communication-administration/recordings/node/phonenumber__lros__release_playbacklive/recording_can_wait_until_a_phone_number_is_released.js @@ -0,0 +1,401 @@ +let nock = require("nock"); + +module.exports.hash = "19775ca1462558f0d7191ae0930c93d1"; + +module.exports.testInfo = { uniqueName: {}, newDate: {} }; + +nock("https://endpoint", { encodedQueryParams: true }) + .post("/administration/phonenumbers/releases", { phoneNumbers: ["+18005551234"] }) + .query(true) + .reply(200, { releaseId: "sanitized" }, [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "TmdJGgAMEkG66WLJTYxqiQ.0", + "X-Processing-Time", + "650ms", + "X-Azure-Ref", + "05Dl+XwAAAAA40OYinfkqQ7M7wG6n4dZIWVZSMzBFREdFMDMxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 21:57:56 GMT" + ]); + +nock("https://endpoint", { encodedQueryParams: true }) + .get("/administration/phonenumbers/releases/sanitized") + .query(true) + .reply( + 200, + { + releaseId: "sanitized", + createdAt: "2020-10-07T21:57:56.4490674+00:00", + status: "Pending", + phoneNumberReleaseStatusDetails: { "+18005551234": { status: "Pending" } } + }, + [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "d9wWYa2yu0+SxNzn20bS9A.0", + "X-Processing-Time", + "197ms", + "X-Azure-Ref", + "05Dl+XwAAAACET7hocjjaRrZcQm+em3hkWVZSMzBFREdFMDMxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 21:57:56 GMT" + ] + ); + +nock("https://endpoint", { encodedQueryParams: true }) + .get("/administration/phonenumbers/releases/sanitized") + .query(true) + .reply( + 200, + { + releaseId: "sanitized", + createdAt: "2020-10-07T21:57:56.4490674+00:00", + status: "Pending", + phoneNumberReleaseStatusDetails: { "+18005551234": { status: "Pending" } } + }, + [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "xOjg6420Akqbe1oQK69QiA.0", + "X-Processing-Time", + "207ms", + "X-Azure-Ref", + "05Tl+XwAAAADs2iEilyIwRKBw4i6hy/LoWVZSMzBFREdFMDMxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 21:57:56 GMT" + ] + ); + +nock("https://endpoint", { encodedQueryParams: true }) + .get("/administration/phonenumbers/releases/sanitized") + .query(true) + .reply( + 200, + { + releaseId: "sanitized", + createdAt: "2020-10-07T21:57:56.4490674+00:00", + status: "Pending", + phoneNumberReleaseStatusDetails: { "+18005551234": { status: "Pending" } } + }, + [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "BmfM2DSivUagA4Fc7gStRg.0", + "X-Processing-Time", + "390ms", + "X-Azure-Ref", + "05zl+XwAAAABY4MPQQh8ETKaGb/vvwDLcWVZSMzBFREdFMDMxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 21:57:59 GMT" + ] + ); + +nock("https://endpoint", { encodedQueryParams: true }) + .get("/administration/phonenumbers/releases/sanitized") + .query(true) + .reply( + 200, + { + releaseId: "sanitized", + createdAt: "2020-10-07T21:57:56.4490674+00:00", + status: "Pending", + phoneNumberReleaseStatusDetails: { "+18005551234": { status: "Pending" } } + }, + [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "cnUnOCRkSEe7J1H1yosl2A.0", + "X-Processing-Time", + "192ms", + "X-Azure-Ref", + "06Tl+XwAAAAD9IVQVJcz9RL78GY8hLX6CWVZSMzBFREdFMDMxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 21:58:01 GMT" + ] + ); + +nock("https://endpoint", { encodedQueryParams: true }) + .get("/administration/phonenumbers/releases/sanitized") + .query(true) + .reply( + 200, + { + releaseId: "sanitized", + createdAt: "2020-10-07T21:57:56.4490674+00:00", + status: "Pending", + phoneNumberReleaseStatusDetails: { "+18005551234": { status: "Pending" } } + }, + [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "aNmSpeYlsUedi5K0ULA6NA.0", + "X-Processing-Time", + "194ms", + "X-Azure-Ref", + "07Dl+XwAAAAASuE/jxFwRTL9UEfFD+GMWWVZSMzBFREdFMDMxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 21:58:03 GMT" + ] + ); + +nock("https://endpoint", { encodedQueryParams: true }) + .get("/administration/phonenumbers/releases/sanitized") + .query(true) + .reply( + 200, + { + releaseId: "sanitized", + createdAt: "2020-10-07T21:57:56.4490674+00:00", + status: "InProgress", + phoneNumberReleaseStatusDetails: { "+18005551234": { status: "Pending" } } + }, + [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "Sr1nrd8QAUyRM9BsL6MXQw.0", + "X-Processing-Time", + "198ms", + "X-Azure-Ref", + "07jl+XwAAAAB2JiqRwZnXS7WnmRKdmwXaWVZSMzBFREdFMDMxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 21:58:05 GMT" + ] + ); + +nock("https://endpoint", { encodedQueryParams: true }) + .get("/administration/phonenumbers/releases/sanitized") + .query(true) + .reply( + 200, + { + releaseId: "sanitized", + createdAt: "2020-10-07T21:57:56.4490674+00:00", + status: "InProgress", + phoneNumberReleaseStatusDetails: { "+18005551234": { status: "InProgress" } } + }, + [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "MJ8PeqcwLEq6H49Pya7T8Q.0", + "X-Processing-Time", + "205ms", + "X-Azure-Ref", + "08Dl+XwAAAAARBFMStcgnQ7f0iyXmSYVFWVZSMzBFREdFMDMxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 21:58:07 GMT" + ] + ); + +nock("https://endpoint", { encodedQueryParams: true }) + .get("/administration/phonenumbers/releases/sanitized") + .query(true) + .reply( + 200, + { + releaseId: "sanitized", + createdAt: "2020-10-07T21:57:56.4490674+00:00", + status: "InProgress", + phoneNumberReleaseStatusDetails: { "+18005551234": { status: "InProgress" } } + }, + [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "MvfuQkl9PE+IdBM8OyryzQ.0", + "X-Processing-Time", + "192ms", + "X-Azure-Ref", + "08jl+XwAAAAA+ukfnG9M4TJ2GVxji76z+WVZSMzBFREdFMDMxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 21:58:10 GMT" + ] + ); + +nock("https://endpoint", { encodedQueryParams: true }) + .get("/administration/phonenumbers/releases/sanitized") + .query(true) + .reply( + 200, + { + releaseId: "sanitized", + createdAt: "2020-10-07T21:57:56.4490674+00:00", + status: "InProgress", + phoneNumberReleaseStatusDetails: { "+18005551234": { status: "InProgress" } } + }, + [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "nuSLFs6lik2ICeCqzuUw+A.0", + "X-Processing-Time", + "198ms", + "X-Azure-Ref", + "09Dl+XwAAAAACn1za1CfYSriu5oH6EZvZWVZSMzBFREdFMDMxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 21:58:13 GMT" + ] + ); + +nock("https://endpoint", { encodedQueryParams: true }) + .get("/administration/phonenumbers/releases/sanitized") + .query(true) + .reply( + 200, + { + releaseId: "sanitized", + createdAt: "2020-10-07T21:57:56.4490674+00:00", + status: "InProgress", + phoneNumberReleaseStatusDetails: { "+18005551234": { status: "InProgress" } } + }, + [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "fR7hv5AUbU2fFTL74f62og.0", + "X-Processing-Time", + "192ms", + "X-Azure-Ref", + "09zl+XwAAAADofxKeanRmSqDvyXSB2HovWVZSMzBFREdFMDMxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 21:58:15 GMT" + ] + ); + +nock("https://endpoint", { encodedQueryParams: true }) + .get("/administration/phonenumbers/releases/sanitized") + .query(true) + .reply( + 200, + { + releaseId: "sanitized", + createdAt: "2020-10-07T21:57:56.4490674+00:00", + status: "InProgress", + phoneNumberReleaseStatusDetails: { "+18005551234": { status: "InProgress" } } + }, + [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "h0mtGAmLfky94CjMCsE5gw.0", + "X-Processing-Time", + "196ms", + "X-Azure-Ref", + "0+Tl+XwAAAAAlapK1UvzKSo10zszZxUDFWVZSMzBFREdFMDMxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 21:58:17 GMT" + ] + ); + +nock("https://endpoint", { encodedQueryParams: true }) + .get("/administration/phonenumbers/releases/sanitized") + .query(true) + .reply( + 200, + { + releaseId: "sanitized", + createdAt: "2020-10-07T21:57:56.4490674+00:00", + status: "InProgress", + phoneNumberReleaseStatusDetails: { "+18005551234": { status: "InProgress" } } + }, + [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "Zp89cMopo0irAafdhwyjBw.0", + "X-Processing-Time", + "200ms", + "X-Azure-Ref", + "0+zl+XwAAAACgqKbeIIvWRoSHnKzUlRPnWVZSMzBFREdFMDMxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 21:58:19 GMT" + ] + ); + +nock("https://endpoint", { encodedQueryParams: true }) + .get("/administration/phonenumbers/releases/sanitized") + .query(true) + .reply( + 200, + { + releaseId: "sanitized", + createdAt: "2020-10-07T21:57:56.4490674+00:00", + status: "InProgress", + phoneNumberReleaseStatusDetails: { "+18005551234": { status: "InProgress" } } + }, + [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "mClENZu6Ak2wwQvwArbvzQ.0", + "X-Processing-Time", + "193ms", + "X-Azure-Ref", + "0/Tl+XwAAAAC4wrN8deNeRZoaultrAId6WVZSMzBFREdFMDMxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 21:58:21 GMT" + ] + ); + +nock("https://endpoint", { encodedQueryParams: true }) + .get("/administration/phonenumbers/releases/sanitized") + .query(true) + .reply( + 200, + { + releaseId: "sanitized", + createdAt: "2020-10-07T21:52:10.3728653+00:00", + status: "Complete", + phoneNumberReleaseStatusDetails: { "+12052039872": { status: "Success" } } + }, + [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "NgpxIMQMUUuZRDCK/LQ3jA.0", + "X-Processing-Time", + "235ms", + "X-Azure-Ref", + "0ADp+XwAAAAD6m824RWd5QoaCTfIM8dciWVZSMzBFREdFMDMxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 21:58:23 GMT" + ] + ); diff --git a/sdk/communication/communication-administration/recordings/node/phonenumberadministrationclient_lists_playbacklive/recording_can_list_phone_numbers.js b/sdk/communication/communication-administration/recordings/node/phonenumberadministrationclient_lists_playbacklive/recording_can_list_phone_numbers.js new file mode 100644 index 000000000000..234b2d135eaa --- /dev/null +++ b/sdk/communication/communication-administration/recordings/node/phonenumberadministrationclient_lists_playbacklive/recording_can_list_phone_numbers.js @@ -0,0 +1,97 @@ +let nock = require("nock"); + +module.exports.hash = "0dde52a1c1f5e4fdd7568981ca731f49"; + +module.exports.testInfo = { uniqueName: {}, newDate: {} }; + +nock("https://endpoint", { encodedQueryParams: false }) + .get("/administration/phonenumbers/phonenumbers") + .query(true) + .reply( + 200, + { + phoneNumbers: [ + { + phoneNumber: "+18005551234", + acquiredCapabilities: [ + "Azure", + "InboundCalling", + "ThirdPartyAppAssignment", + "Geographic" + ], + availableCapabilities: [ + "ConferenceAssignment", + "Geographic", + "FirstPartyAppAssignment", + "ThirdPartyAppAssignment", + "Azure", + "Office365", + "InboundCalling", + "OutboundCalling" + ], + assignmentStatus: "Unknown", + placeName: "Los Angeles, United States", + activationState: "Activated" + }, + { + phoneNumber: "+18005551234", + acquiredCapabilities: [ + "Azure", + "InboundCalling", + "ThirdPartyAppAssignment", + "Geographic" + ], + availableCapabilities: [ + "ConferenceAssignment", + "Geographic", + "FirstPartyAppAssignment", + "ThirdPartyAppAssignment", + "Azure", + "Office365", + "InboundCalling", + "OutboundCalling" + ], + assignmentStatus: "Unassigned", + placeName: "Los Angeles, United States", + activationState: "Activated" + }, + { + phoneNumber: "+18005551234", + acquiredCapabilities: [ + "Azure", + "InboundCalling", + "ThirdPartyAppAssignment", + "Geographic" + ], + availableCapabilities: [ + "ConferenceAssignment", + "Geographic", + "FirstPartyAppAssignment", + "ThirdPartyAppAssignment", + "Azure", + "Office365", + "InboundCalling", + "OutboundCalling" + ], + assignmentStatus: "Unknown", + placeName: "Los Angeles, United States", + activationState: "Activated" + } + ], + nextLink: null + }, + [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "Jah4rWjrgUmQmikl1KvcEg.0", + "X-Processing-Time", + "536ms", + "X-Azure-Ref", + "0ZCl+XwAAAACpUG+EbdPfQothqnQjYRc3WVZSMzBFREdFMDQwNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 20:47:32 GMT" + ] + ); diff --git a/sdk/communication/communication-administration/recordings/node/phonenumberadministrationclient_lists_playbacklive/recording_can_list_phone_plan_groups.js b/sdk/communication/communication-administration/recordings/node/phonenumberadministrationclient_lists_playbacklive/recording_can_list_phone_plan_groups.js new file mode 100644 index 000000000000..1666d9bf11aa --- /dev/null +++ b/sdk/communication/communication-administration/recordings/node/phonenumberadministrationclient_lists_playbacklive/recording_can_list_phone_plan_groups.js @@ -0,0 +1,49 @@ +let nock = require("nock"); + +module.exports.hash = "e96a3b7844be3e24fcea1b314a74af26"; + +module.exports.testInfo = { uniqueName: {}, newDate: {} }; + +nock("https://endpoint", { encodedQueryParams: true }) + .get("/administration/phonenumbers/countries/US/phoneplangroups") + .query(true) + .reply( + 200, + { + phonePlanGroups: [ + { + phonePlanGroupId: "sanitized", + phoneNumberType: "Geographic", + localizedName: "Azure- User - Geographic", + localizedDescription: "These are numbers used by Azure resources." + }, + { + phonePlanGroupId: "sanitized", + phoneNumberType: "Geographic", + localizedName: "Azure - Geographic", + localizedDescription: "These are numbers used by Azure resources." + }, + { + phonePlanGroupId: "sanitized", + phoneNumberType: "TollFree", + localizedName: "Azure - Toll Free", + localizedDescription: "These are toll free numbers used by Azure resources." + } + ], + nextLink: null + }, + [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "uDT1zykLzkGOwTcDY3QNJA.0", + "X-Processing-Time", + "312ms", + "X-Azure-Ref", + "0Zil+XwAAAADcP++kt8zySLMZKu12ckKMWVZSMzBFREdFMDQxNAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 20:47:34 GMT" + ] + ); diff --git a/sdk/communication/communication-administration/recordings/node/phonenumberadministrationclient_lists_playbacklive/recording_can_list_phone_plans.js b/sdk/communication/communication-administration/recordings/node/phonenumberadministrationclient_lists_playbacklive/recording_can_list_phone_plans.js new file mode 100644 index 000000000000..dd32ffda434f --- /dev/null +++ b/sdk/communication/communication-administration/recordings/node/phonenumberadministrationclient_lists_playbacklive/recording_can_list_phone_plans.js @@ -0,0 +1,47 @@ +let nock = require("nock"); + +module.exports.hash = "3cdc938169a6df415554f9d5e6aef39b"; + +module.exports.testInfo = { uniqueName: {}, newDate: {} }; + +nock("https://endpoint", { encodedQueryParams: false }) + .get("/administration/phonenumbers/countries/US/phoneplangroups/sanitized/phoneplans") + .query(true) + .reply( + 200, + { + phonePlans: [ + { + phonePlanId: "sanitized", + localizedName: "Outbound Only PSTN For User - Geographic", + locationType: "Selection", + areaCodes: [], + capabilities: ["Azure", "OutboundCalling", "UserAssignment", "Geographic"], + maximumSearchSize: 20 + }, + { + phonePlanId: "sanitized", + localizedName: "Inbound Only PSTN For User - Geographic", + locationType: "Selection", + areaCodes: [], + capabilities: ["Azure", "InboundCalling", "UserAssignment", "Geographic"], + maximumSearchSize: 20 + } + ], + nextLink: null + }, + [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "/Oq7aEkBT0+/O4drUfYgIQ.0", + "X-Processing-Time", + "322ms", + "X-Azure-Ref", + "0Zil+XwAAAACC1JPnxeZLT4lWoSlfRexhWVZSMzBFREdFMDQxNAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 20:47:34 GMT" + ] + ); diff --git a/sdk/communication/communication-administration/recordings/node/phonenumberadministrationclient_lists_playbacklive/recording_can_list_releases.js b/sdk/communication/communication-administration/recordings/node/phonenumberadministrationclient_lists_playbacklive/recording_can_list_releases.js new file mode 100644 index 000000000000..20a5618ae2bb --- /dev/null +++ b/sdk/communication/communication-administration/recordings/node/phonenumberadministrationclient_lists_playbacklive/recording_can_list_releases.js @@ -0,0 +1,191 @@ +let nock = require("nock"); + +module.exports.hash = "29a008ab06588dc49ccef34434f34962"; + +module.exports.testInfo = { uniqueName: {}, newDate: {} }; + +nock("https://endpoint", { encodedQueryParams: true }) + .get("/administration/phonenumbers/releases") + .query(true) + .reply( + 200, + { + entities: [ + { + id: "sanitized", + createdAt: "2020-10-06T22:09:15.6973324+00:00", + displayName: "", + quantity: 1, + quantityObtained: 1, + status: "Failed" + }, + { + id: "sanitized", + createdAt: "2020-10-06T22:09:10.1382455+00:00", + displayName: "", + quantity: 1, + quantityObtained: 1, + status: "Failed" + }, + { + id: "sanitized", + createdAt: "2020-10-06T22:08:59.9206727+00:00", + displayName: "", + quantity: 1, + quantityObtained: 1, + status: "Failed" + }, + { + id: "sanitized", + createdAt: "2020-10-06T22:08:53.9901494+00:00", + displayName: "", + quantity: 1, + quantityObtained: 1, + status: "Failed" + }, + { + id: "sanitized", + createdAt: "2020-10-05T22:34:55.8201039+00:00", + displayName: "", + quantity: 1, + quantityObtained: 1, + status: "Failed" + }, + { + id: "sanitized", + createdAt: "2020-10-05T19:46:07.9277205+00:00", + displayName: "", + quantity: 1, + quantityObtained: 1, + status: "Failed" + }, + { + id: "sanitized", + createdAt: "2020-10-05T19:30:38.9510914+00:00", + displayName: "", + quantity: 1, + quantityObtained: 1, + status: "Failed" + }, + { + id: "sanitized", + createdAt: "2020-10-05T19:04:25.3546697+00:00", + displayName: "", + quantity: 1, + quantityObtained: 1, + status: "Failed" + }, + { + id: "sanitized", + createdAt: "2020-10-05T19:04:19.728546+00:00", + displayName: "", + quantity: 1, + quantityObtained: 1, + status: "Failed" + }, + { + id: "sanitized", + createdAt: "2020-10-05T19:03:55.2687923+00:00", + displayName: "", + quantity: 1, + quantityObtained: 1, + status: "Failed" + }, + { + id: "sanitized", + createdAt: "2020-10-05T19:03:49.1210206+00:00", + displayName: "", + quantity: 1, + quantityObtained: 1, + status: "Failed" + }, + { + id: "sanitized", + createdAt: "2020-10-05T18:57:52.671763+00:00", + displayName: "", + quantity: 1, + quantityObtained: 1, + status: "Failed" + }, + { + id: "sanitized", + createdAt: "2020-10-02T04:55:32.0329458+00:00", + displayName: "", + quantity: 1, + quantityObtained: 1, + status: "Failed" + }, + { + id: "sanitized", + createdAt: "2020-09-30T08:23:03.5698776+00:00", + displayName: "", + quantity: 1, + quantityObtained: 1, + status: "Failed" + }, + { + id: "sanitized", + createdAt: "2020-09-30T08:21:30.4716416+00:00", + displayName: "", + quantity: 1, + quantityObtained: 1, + status: "Failed" + }, + { + id: "sanitized", + createdAt: "2020-09-28T20:09:36.2701214+00:00", + displayName: "", + quantity: 1, + quantityObtained: 1, + status: "Failed" + }, + { + id: "sanitized", + createdAt: "2020-09-23T05:16:13.9074624+00:00", + displayName: "", + quantity: 1, + quantityObtained: 1, + status: "Failed" + }, + { + id: "sanitized", + createdAt: "2020-09-23T05:13:17.2438327+00:00", + displayName: "", + quantity: 1, + quantityObtained: 1, + status: "Failed" + }, + { + id: "sanitized", + createdAt: "2020-09-22T04:23:36.1626946+00:00", + displayName: "", + quantity: 1, + quantityObtained: 1, + status: "Failed" + }, + { + id: "sanitized", + createdAt: "2020-09-22T04:23:25.9748532+00:00", + displayName: "", + quantity: 1, + quantityObtained: 1, + status: "Failed" + } + ], + nextLink: null + }, + [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "iRqWQ2F7uECIX3SNzCN51A.0", + "X-Processing-Time", + "270ms", + "X-Azure-Ref", + "0Zil+XwAAAABjY5PSntjWRpzVFYryyjx9WVZSMzBFREdFMDMxMAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 20:47:34 GMT" + ] + ); diff --git a/sdk/communication/communication-administration/recordings/node/phonenumberadministrationclient_lists_playbacklive/recording_can_list_searches.js b/sdk/communication/communication-administration/recordings/node/phonenumberadministrationclient_lists_playbacklive/recording_can_list_searches.js new file mode 100644 index 000000000000..b2f7b16d828c --- /dev/null +++ b/sdk/communication/communication-administration/recordings/node/phonenumberadministrationclient_lists_playbacklive/recording_can_list_searches.js @@ -0,0 +1,831 @@ +let nock = require("nock"); + +module.exports.hash = "beed9b0365f6e3637112bab5192991e5"; + +module.exports.testInfo = { uniqueName: {}, newDate: {} }; + +nock("https://endpoint", { encodedQueryParams: true }) + .get("/administration/phonenumbers/searches") + .query(true) + .reply( + 200, + { + entities: [ + { + id: "sanitized", + createdAt: "2020-10-07T20:46:26.3136937+00:00", + displayName: "LRO Test Search", + quantity: 1, + quantityObtained: 1, + status: "Reserved" + }, + { + id: "sanitized", + createdAt: "2020-10-07T20:42:25.8051216+00:00", + displayName: "LRO Test Search", + quantity: 1, + quantityObtained: 1, + status: "Cancelled" + }, + { + id: "sanitized", + createdAt: "2020-10-07T20:34:22.0074148+00:00", + displayName: "LRO Test Search", + quantity: 1, + quantityObtained: 1, + status: "Cancelled" + }, + { + id: "sanitized", + createdAt: "2020-10-07T20:33:49.0457535+00:00", + displayName: "LRO Test Search", + quantity: 1, + quantityObtained: 1, + status: "Cancelled" + }, + { + id: "sanitized", + createdAt: "2020-10-07T20:33:08.2701065+00:00", + displayName: "LRO Test Search", + quantity: 1, + quantityObtained: 1, + status: "Cancelled" + }, + { + id: "sanitized", + createdAt: "2020-10-07T20:32:31.3624756+00:00", + displayName: "LRO Test Search", + quantity: 1, + quantityObtained: 1, + status: "Cancelled" + }, + { + id: "sanitized", + createdAt: "2020-10-07T20:19:24.1877888+00:00", + displayName: "LRO Test Search", + quantity: 1, + quantityObtained: 1, + status: "Cancelled" + }, + { + id: "sanitized", + createdAt: "2020-10-07T20:17:19.324896+00:00", + displayName: "LRO Test Search", + quantity: 1, + quantityObtained: 1, + status: "Expired" + }, + { + id: "sanitized", + createdAt: "2020-10-07T20:16:57.141868+00:00", + displayName: "LRO Test Search", + quantity: 1, + quantityObtained: 1, + status: "Cancelled" + }, + { + id: "sanitized", + createdAt: "2020-10-07T20:16:52.093062+00:00", + displayName: "LRO Test Search", + quantity: 1, + quantityObtained: 1, + status: "Expired" + }, + { + id: "sanitized", + createdAt: "2020-10-07T20:15:44.5981184+00:00", + displayName: "LRO Test Search", + quantity: 1, + quantityObtained: 1, + status: "Cancelled" + }, + { + id: "sanitized", + createdAt: "2020-10-07T20:12:19.9330481+00:00", + displayName: "LRO Test Search", + quantity: 1, + quantityObtained: 1, + status: "Expired" + }, + { + id: "sanitized", + createdAt: "2020-10-07T20:12:04.3082843+00:00", + displayName: "LRO Test Search", + quantity: 1, + quantityObtained: 1, + status: "Expired" + }, + { + id: "sanitized", + createdAt: "2020-10-07T20:10:35.1336688+00:00", + displayName: "LRO Test Search", + quantity: 1, + quantityObtained: 1, + status: "Cancelled" + }, + { + id: "sanitized", + createdAt: "2020-10-07T20:10:16.9250667+00:00", + displayName: "LRO Test Search", + quantity: 1, + quantityObtained: 1, + status: "Expired" + }, + { + id: "sanitized", + createdAt: "2020-10-07T20:10:06.9836326+00:00", + displayName: "LRO Test Search", + quantity: 1, + quantityObtained: 1, + status: "Expired" + }, + { + id: "sanitized", + createdAt: "2020-10-07T20:09:34.297943+00:00", + displayName: "LRO Test Search", + quantity: 1, + quantityObtained: 1, + status: "Expired" + }, + { + id: "sanitized", + createdAt: "2020-10-07T20:02:01.7271964+00:00", + displayName: "LRO Test Search", + quantity: 1, + quantityObtained: 1, + status: "Expired" + }, + { + id: "sanitized", + createdAt: "2020-10-07T19:55:41.3430826+00:00", + displayName: "LRO Test Search", + quantity: 1, + quantityObtained: 0, + status: "Error" + }, + { + id: "sanitized", + createdAt: "2020-10-07T19:55:08.4296335+00:00", + displayName: "LRO Test Search", + quantity: 1, + quantityObtained: 0, + status: "Error" + }, + { + id: "sanitized", + createdAt: "2020-10-07T19:52:51.966739+00:00", + displayName: "LRO Test Search", + quantity: 1, + quantityObtained: 0, + status: "Error" + }, + { + id: "sanitized", + createdAt: "2020-10-07T19:49:31.125935+00:00", + displayName: "LRO Test Search", + quantity: 1, + quantityObtained: 0, + status: "Error" + }, + { + id: "sanitized", + createdAt: "2020-10-07T19:46:55.9343654+00:00", + displayName: "LRO Test Search", + quantity: 1, + quantityObtained: 0, + status: "Error" + }, + { + id: "sanitized", + createdAt: "2020-10-07T19:45:55.4896319+00:00", + displayName: "LRO Test Search", + quantity: 1, + quantityObtained: 0, + status: "Error" + }, + { + id: "sanitized", + createdAt: "2020-10-07T19:42:56.5228482+00:00", + displayName: "LRO Test Search", + quantity: 1, + quantityObtained: 0, + status: "Error" + }, + { + id: "sanitized", + createdAt: "2020-10-07T19:18:09.2822229+00:00", + displayName: "testsearch20200014", + quantity: 2, + quantityObtained: 2, + status: "Expired" + }, + { + id: "sanitized", + createdAt: "2020-10-07T19:15:45.0889566+00:00", + displayName: "testsearch20200014", + quantity: 2, + quantityObtained: 2, + status: "Expired" + }, + { + id: "sanitized", + createdAt: "2020-10-07T19:12:49.3821371+00:00", + displayName: "testsearch20200014", + quantity: 2, + quantityObtained: 2, + status: "Expired" + }, + { + id: "sanitized", + createdAt: "2020-10-07T19:10:54.6190624+00:00", + displayName: "testsearch20200014", + quantity: 2, + quantityObtained: 2, + status: "Expired" + }, + { + id: "sanitized", + createdAt: "2020-10-07T19:09:50.6904215+00:00", + displayName: "testsearch20200014", + quantity: 2, + quantityObtained: 2, + status: "Expired" + }, + { + id: "sanitized", + createdAt: "2020-10-07T19:08:42.5557718+00:00", + displayName: "testsearch20200014", + quantity: 2, + quantityObtained: 2, + status: "Expired" + }, + { + id: "sanitized", + createdAt: "2020-10-07T19:03:11.9322589+00:00", + displayName: "LRO Test Search", + quantity: 1, + quantityObtained: 0, + status: "Error" + }, + { + id: "sanitized", + createdAt: "2020-10-07T19:02:12.6560662+00:00", + displayName: "LRO Test Search", + quantity: 1, + quantityObtained: 0, + status: "Error" + }, + { + id: "sanitized", + createdAt: "2020-10-07T18:59:44.0340993+00:00", + displayName: "LRO Test Search", + quantity: 1, + quantityObtained: 0, + status: "Error" + }, + { + id: "sanitized", + createdAt: "2020-10-07T18:51:53.5965258+00:00", + displayName: "LRO Test Search", + quantity: 1, + quantityObtained: 0, + status: "Error" + }, + { + id: "sanitized", + createdAt: "2020-10-06T22:09:18.298955+00:00", + displayName: "sanitized", + quantity: 1, + quantityObtained: 1, + status: "Expired" + }, + { + id: "sanitized", + createdAt: "2020-10-06T22:09:16.9363453+00:00", + displayName: "sanitized", + quantity: 1, + quantityObtained: 1, + status: "Expired" + }, + { + id: "sanitized", + createdAt: "2020-10-06T22:09:02.8812737+00:00", + displayName: "testsearch20200014", + quantity: 1, + quantityObtained: 1, + status: "Expired" + }, + { + id: "sanitized", + createdAt: "2020-10-06T22:09:01.266857+00:00", + displayName: "testsearch20200014", + quantity: 1, + quantityObtained: 1, + status: "Expired" + }, + { + id: "sanitized", + createdAt: "2020-10-06T22:08:38.3984814+00:00", + displayName: "testsearch20200014", + quantity: 2, + quantityObtained: 2, + status: "Expired" + }, + { + id: "sanitized", + createdAt: "2020-10-06T22:05:10.5952146+00:00", + displayName: "testsearch20200014", + quantity: 2, + quantityObtained: 2, + status: "Expired" + }, + { + id: "sanitized", + createdAt: "2020-10-06T22:03:48.2763503+00:00", + displayName: "testsearch20200014", + quantity: 2, + quantityObtained: 2, + status: "Expired" + }, + { + id: "sanitized", + createdAt: "2020-10-06T22:02:19.0624194+00:00", + displayName: "testsearch20200014", + quantity: 2, + quantityObtained: 2, + status: "Expired" + }, + { + id: "sanitized", + createdAt: "2020-10-06T21:45:44.6093925+00:00", + displayName: "testsearch20200014", + quantity: 2, + quantityObtained: 2, + status: "Expired" + }, + { + id: "sanitized", + createdAt: "2020-10-06T21:40:55.4259286+00:00", + displayName: "testsearch20200014", + quantity: 2, + quantityObtained: 2, + status: "Expired" + }, + { + id: "sanitized", + createdAt: "2020-10-06T21:39:28.8001624+00:00", + displayName: "testsearch20200014", + quantity: 2, + quantityObtained: 2, + status: "Expired" + }, + { + id: "sanitized", + createdAt: "2020-10-06T16:49:05.1044519+00:00", + displayName: "testsearch20200014", + quantity: 2, + quantityObtained: 2, + status: "Expired" + }, + { + id: "sanitized", + createdAt: "2020-10-06T16:46:17.9484442+00:00", + displayName: "testsearch20200014", + quantity: 2, + quantityObtained: 2, + status: "Expired" + }, + { + id: "sanitized", + createdAt: "2020-10-06T16:43:04.3279546+00:00", + displayName: "testsearch20200014", + quantity: 2, + quantityObtained: 2, + status: "Expired" + }, + { + id: "sanitized", + createdAt: "2020-10-05T22:34:46.5330706+00:00", + displayName: "testsearch20200014", + quantity: 1, + quantityObtained: 0, + status: "Error" + }, + { + id: "sanitized", + createdAt: "2020-10-05T22:24:11.1650495+00:00", + displayName: "testsearch20200014", + quantity: 1, + quantityObtained: 1, + status: "Expired" + }, + { + id: "sanitized", + createdAt: "2020-10-05T21:46:44.0061247+00:00", + displayName: "testsearch20200014", + quantity: 1, + quantityObtained: 1, + status: "Expired" + }, + { + id: "sanitized", + createdAt: "2020-10-05T21:38:45.133326+00:00", + displayName: "testsearch20200014", + quantity: 1, + quantityObtained: 1, + status: "Expired" + }, + { + id: "sanitized", + createdAt: "2020-10-05T21:32:40.6257874+00:00", + displayName: "testsearch20200014", + quantity: 1, + quantityObtained: 1, + status: "Expired" + }, + { + id: "sanitized", + createdAt: "2020-10-05T21:25:15.5314488+00:00", + displayName: "testsearch20200014", + quantity: 1, + quantityObtained: 1, + status: "Expired" + }, + { + id: "sanitized", + createdAt: "2020-10-05T21:23:23.3227419+00:00", + displayName: "testsearch20200014", + quantity: 1, + quantityObtained: 1, + status: "Expired" + }, + { + id: "sanitized", + createdAt: "2020-10-05T21:17:49.3522282+00:00", + displayName: "testsearch20200014", + quantity: 1, + quantityObtained: 1, + status: "Expired" + }, + { + id: "sanitized", + createdAt: "2020-10-05T21:15:30.2864455+00:00", + displayName: "testsearch20200014", + quantity: 1, + quantityObtained: 1, + status: "Expired" + }, + { + id: "sanitized", + createdAt: "2020-10-05T21:08:09.2840452+00:00", + displayName: "testsearch20200014", + quantity: 1, + quantityObtained: 1, + status: "Expired" + }, + { + id: "sanitized", + createdAt: "2020-10-05T20:55:35.0177171+00:00", + displayName: "testsearch20200014", + quantity: 1, + quantityObtained: 0, + status: "Error" + }, + { + id: "sanitized", + createdAt: "2020-10-05T19:54:57.0781406+00:00", + displayName: "testsearch20200014", + quantity: 1, + quantityObtained: 1, + status: "Expired" + }, + { + id: "sanitized", + createdAt: "2020-10-05T19:48:40.2894004+00:00", + displayName: "testsearch20200014", + quantity: 1, + quantityObtained: 1, + status: "Expired" + }, + { + id: "sanitized", + createdAt: "2020-10-05T19:46:38.3339363+00:00", + displayName: "testsearch20200014", + quantity: 1, + quantityObtained: 1, + status: "Expired" + }, + { + id: "sanitized", + createdAt: "2020-10-05T19:45:59.0003981+00:00", + displayName: "testsearch20200014", + quantity: 1, + quantityObtained: 0, + status: "Error" + }, + { + id: "sanitized", + createdAt: "2020-10-05T19:29:18.5654194+00:00", + displayName: "testsearch20200014", + quantity: 1, + quantityObtained: 1, + status: "Expired" + }, + { + id: "sanitized", + createdAt: "2020-10-05T19:26:07.2847153+00:00", + displayName: "testsearch20200014", + quantity: 1, + quantityObtained: 1, + status: "Expired" + }, + { + id: "sanitized", + createdAt: "2020-10-05T19:26:01.5942012+00:00", + displayName: "testsearch20200014", + quantity: 1, + quantityObtained: 1, + status: "Expired" + }, + { + id: "sanitized", + createdAt: "2020-10-05T19:12:59.9950936+00:00", + displayName: "sanitized", + quantity: 1, + quantityObtained: 1, + status: "Error" + }, + { + id: "sanitized", + createdAt: "2020-10-05T19:09:17.9509794+00:00", + displayName: "sanitized", + quantity: 1, + quantityObtained: 0, + status: "Error" + }, + { + id: "sanitized", + createdAt: "2020-10-05T18:57:37.8313413+00:00", + displayName: "testsearch20200014", + quantity: 1, + quantityObtained: 0, + status: "Error" + }, + { + id: "sanitized", + createdAt: "2020-10-02T19:33:35.7713345+00:00", + displayName: "testsearch20200014", + quantity: 1, + quantityObtained: 1, + status: "Expired" + }, + { + id: "sanitized", + createdAt: "2020-10-02T19:33:30.7521936+00:00", + displayName: "testsearch20200014", + quantity: 1, + quantityObtained: 1, + status: "Expired" + }, + { + id: "sanitized", + createdAt: "2020-10-02T19:31:33.2688041+00:00", + displayName: "mysearch20200928", + quantity: 1, + quantityObtained: 1, + status: "Expired" + }, + { + id: "sanitized", + createdAt: "2020-10-02T19:22:05.7250909+00:00", + displayName: "testsearch20200014", + quantity: 1, + quantityObtained: 1, + status: "Expired" + }, + { + id: "sanitized", + createdAt: "2020-10-02T19:17:48.6436314+00:00", + displayName: "testsearch20200014", + quantity: 1, + quantityObtained: 1, + status: "Expired" + }, + { + id: "sanitized", + createdAt: "2020-10-02T18:33:37.3941156+00:00", + displayName: "testsearch20200014", + quantity: 1, + quantityObtained: 1, + status: "Expired" + }, + { + id: "sanitized", + createdAt: "2020-10-02T18:33:23.49478+00:00", + displayName: "testsearch20200014", + quantity: 1, + quantityObtained: 1, + status: "Expired" + }, + { + id: "sanitized", + createdAt: "2020-10-02T04:49:30.459317+00:00", + displayName: "sanitized", + quantity: 1, + quantityObtained: 1, + status: "Cancelled" + }, + { + id: "sanitized", + createdAt: "2020-10-02T03:26:58.3778108+00:00", + displayName: "sanitized", + quantity: 1, + quantityObtained: 0, + status: "Error" + }, + { + id: "sanitized", + createdAt: "2020-10-02T03:19:03.7907742+00:00", + displayName: "sanitized", + quantity: 1, + quantityObtained: 0, + status: "Error" + }, + { + id: "sanitized", + createdAt: "2020-10-02T03:12:45.0375597+00:00", + displayName: "sanitized", + quantity: 1, + quantityObtained: 0, + status: "Error" + }, + { + id: "sanitized", + createdAt: "2020-10-02T02:57:37.9005693+00:00", + displayName: "sanitized", + quantity: 1, + quantityObtained: 0, + status: "Error" + }, + { + id: "sanitized", + createdAt: "2020-10-02T02:57:18.0415231+00:00", + displayName: "sanitized", + quantity: 1, + quantityObtained: 0, + status: "Error" + }, + { + id: "sanitized", + createdAt: "2020-10-02T02:55:34.7494935+00:00", + displayName: "sanitized", + quantity: 1, + quantityObtained: 0, + status: "Error" + }, + { + id: "sanitized", + createdAt: "2020-10-02T02:54:01.6722267+00:00", + displayName: "sanitized", + quantity: 1, + quantityObtained: 0, + status: "Error" + }, + { + id: "sanitized", + createdAt: "2020-10-02T02:52:31.3314225+00:00", + displayName: "sanitized", + quantity: 1, + quantityObtained: 0, + status: "Error" + }, + { + id: "sanitized", + createdAt: "2020-10-02T02:46:00.069457+00:00", + displayName: "sanitized", + quantity: 1, + quantityObtained: 0, + status: "Error" + }, + { + id: "sanitized", + createdAt: "2020-10-02T02:45:45.4367168+00:00", + displayName: "sanitized", + quantity: 1, + quantityObtained: 0, + status: "Error" + }, + { + id: "sanitized", + createdAt: "2020-10-02T02:32:31.2826321+00:00", + displayName: "sanitized", + quantity: 1, + quantityObtained: 0, + status: "Error" + }, + { + id: "sanitized", + createdAt: "2020-10-02T02:32:19.8370826+00:00", + displayName: "sanitized", + quantity: 1, + quantityObtained: 0, + status: "Error" + }, + { + id: "sanitized", + createdAt: "2020-10-02T02:23:17.9769815+00:00", + displayName: "sanitized", + quantity: 1, + quantityObtained: 0, + status: "Error" + }, + { + id: "sanitized", + createdAt: "2020-10-02T02:23:16.3583149+00:00", + displayName: "sanitized", + quantity: 1, + quantityObtained: 0, + status: "Error" + }, + { + id: "sanitized", + createdAt: "2020-10-02T02:17:20.3437695+00:00", + displayName: "sanitized", + quantity: 1, + quantityObtained: 0, + status: "Error" + }, + { + id: "sanitized", + createdAt: "2020-10-02T02:17:18.3096094+00:00", + displayName: "sanitized", + quantity: 1, + quantityObtained: 0, + status: "Error" + }, + { + id: "sanitized", + createdAt: "2020-10-02T02:12:22.4481628+00:00", + displayName: "sanitized", + quantity: 1, + quantityObtained: 0, + status: "Error" + }, + { + id: "sanitized", + createdAt: "2020-10-02T02:12:20.1292791+00:00", + displayName: "sanitized", + quantity: 1, + quantityObtained: 0, + status: "Error" + }, + { + id: "sanitized", + createdAt: "2020-10-02T02:10:40.0899851+00:00", + displayName: "sanitized", + quantity: 1, + quantityObtained: 0, + status: "Error" + }, + { + id: "sanitized", + createdAt: "2020-10-02T02:10:38.6164288+00:00", + displayName: "sanitized", + quantity: 1, + quantityObtained: 0, + status: "Error" + }, + { + id: "sanitized", + createdAt: "2020-10-02T02:07:45.4372649+00:00", + displayName: "sanitized", + quantity: 1, + quantityObtained: 0, + status: "Error" + }, + { + id: "sanitized", + createdAt: "2020-10-02T02:07:43.2776084+00:00", + displayName: "sanitized", + quantity: 1, + quantityObtained: 0, + status: "Error" + } + ], + nextLink: null + }, + [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "6HLhczbjbUeQn/gd0kRWXQ.0", + "X-Processing-Time", + "859ms", + "X-Azure-Ref", + "0Zyl+XwAAAABk9FCyib+UR7RfRcuWhRxLWVZSMzBFREdFMDMxMwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 20:47:35 GMT" + ] + ); diff --git a/sdk/communication/communication-administration/recordings/node/phonenumberadministrationclient_lists_playbacklive/recording_can_list_supported_countries.js b/sdk/communication/communication-administration/recordings/node/phonenumberadministrationclient_lists_playbacklive/recording_can_list_supported_countries.js new file mode 100644 index 000000000000..fdc58e234283 --- /dev/null +++ b/sdk/communication/communication-administration/recordings/node/phonenumberadministrationclient_lists_playbacklive/recording_can_list_supported_countries.js @@ -0,0 +1,34 @@ +let nock = require("nock"); + +module.exports.hash = "63210f723fc2dda20fd80ea70727d02f"; + +module.exports.testInfo = { uniqueName: {}, newDate: {} }; + +nock("https://endpoint", { encodedQueryParams: true }) + .get("/administration/phonenumbers/countries") + .query(true) + .reply( + 200, + { + countries: [ + { localizedName: "Australia", countryCode: "AU" }, + { localizedName: "Japan", countryCode: "JP" }, + { localizedName: "United States", countryCode: "US" } + ], + nextLink: null + }, + [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "ShzCBK46mkeS1wWflDDpfg.0", + "X-Processing-Time", + "400ms", + "X-Azure-Ref", + "0ZSl+XwAAAADJexyonDyOQqfbsLPQ1iLVWVZSMzBFREdFMDMxNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 20:47:32 GMT" + ] + ); diff --git a/sdk/communication/communication-administration/recordings/node/phonenumberadministrationclient_playbacklive/recording_can_get_area_codes.js b/sdk/communication/communication-administration/recordings/node/phonenumberadministrationclient_playbacklive/recording_can_get_area_codes.js new file mode 100644 index 000000000000..7008a4ea933b --- /dev/null +++ b/sdk/communication/communication-administration/recordings/node/phonenumberadministrationclient_playbacklive/recording_can_get_area_codes.js @@ -0,0 +1,28 @@ +let nock = require("nock"); + +module.exports.hash = "d47a0b2d40ed297062396a68f1cb2e3f"; + +module.exports.testInfo = { uniqueName: {}, newDate: {} }; + +nock("https://endpoint", { encodedQueryParams: true }) + .post("/administration/phonenumbers/countries/US/areacodes", { + locationOptions: [ + { labelId: "state", optionsValue: "CA" }, + { labelId: "city", optionsValue: "NOAM-US-CA-LA" } + ] + }) + .query(true) + .reply(200, { primaryAreaCodes: [], secondaryAreaCodes: [], nextLink: null }, [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "WEKRXM/JgE2ND9Dn9mXASA.0", + "X-Processing-Time", + "400ms", + "X-Azure-Ref", + "0fyl+XwAAAACoxVAbE8UXTJHySpiXFih0WVZSMzBFREdFMDMxMgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 20:47:58 GMT" + ]); diff --git a/sdk/communication/communication-administration/recordings/node/phonenumberadministrationclient_playbacklive/recording_can_get_location_options.js b/sdk/communication/communication-administration/recordings/node/phonenumberadministrationclient_playbacklive/recording_can_get_location_options.js new file mode 100644 index 000000000000..39c2a8f5e61c --- /dev/null +++ b/sdk/communication/communication-administration/recordings/node/phonenumberadministrationclient_playbacklive/recording_can_get_location_options.js @@ -0,0 +1,754 @@ +let nock = require("nock"); + +module.exports.hash = "4b6cf5373e97938c5a43411f3e831ff2"; + +module.exports.testInfo = { uniqueName: {}, newDate: {} }; + +nock("https://endpoint", { encodedQueryParams: true }) + .get( + "/administration/phonenumbers/countries/US/phoneplangroups/sanitized/phoneplans/sanitized/locationoptions" + ) + .query(true) + .reply( + 200, + { + locationOptions: { + labelId: "state", + labelName: "State", + options: [ + { + name: "AL", + value: "AL", + locationOptions: [ + { + labelId: "city", + labelName: "City", + options: [ + { name: "Birmingham", value: "NOAM-US-AL-BI", locationOptions: [] }, + { name: "Huntsville", value: "NOAM-US-AL-HN", locationOptions: [] }, + { name: "Mobile", value: "NOAM-US-AL-MO", locationOptions: [] }, + { name: "Montgomery", value: "NOAM-US-AL-MN", locationOptions: [] } + ] + } + ] + }, + { + name: "AR", + value: "AR", + locationOptions: [ + { + labelId: "city", + labelName: "City", + options: [ + { name: "Fort Smith", value: "NOAM-US-AR-FS", locationOptions: [] }, + { name: "Jonesboro", value: "NOAM-US-AR-JO", locationOptions: [] }, + { name: "Little Rock", value: "NOAM-US-AR-LR", locationOptions: [] } + ] + } + ] + }, + { + name: "AZ", + value: "AZ", + locationOptions: [ + { + labelId: "city", + labelName: "City", + options: [{ name: "Phoenix", value: "NOAM-US-AZ-PH", locationOptions: [] }] + } + ] + }, + { + name: "CA", + value: "CA", + locationOptions: [ + { + labelId: "city", + labelName: "City", + options: [ + { name: "Salinas", value: "NOAM-US-CA-SL", locationOptions: [] }, + { name: "San Diego", value: "NOAM-US-CA-SD", locationOptions: [] }, + { name: "San Francisco", value: "NOAM-US-CA-SF", locationOptions: [] }, + { name: "San Jose", value: "NOAM-US-CA-SJ", locationOptions: [] }, + { name: "Santa Barbara", value: "NOAM-US-CA-SB", locationOptions: [] }, + { name: "Santa Clarita", value: "NOAM-US-CA-SC", locationOptions: [] }, + { name: "Santa Rosa", value: "NOAM-US-CA-SR", locationOptions: [] }, + { name: "Stockton", value: "NOAM-US-CA-ST", locationOptions: [] } + ] + } + ] + }, + { + name: "CL", + value: "CL", + locationOptions: [ + { + labelId: "city", + labelName: "City", + options: [{ name: "Washington DC", value: "NOAM-US-CL-DC", locationOptions: [] }] + } + ] + }, + { + name: "CO", + value: "CO", + locationOptions: [ + { + labelId: "city", + labelName: "City", + options: [ + { name: "Grand Junction", value: "NOAM-US-CO-GJ", locationOptions: [] }, + { name: "Pueblo", value: "NOAM-US-CO-PU", locationOptions: [] } + ] + } + ] + }, + { + name: "CT", + value: "CT", + locationOptions: [ + { + labelId: "city", + labelName: "City", + options: [ + { name: "Bridgeport", value: "NOAM-US-CT-BR", locationOptions: [] }, + { name: "Hartford", value: "NOAM-US-CT-HA", locationOptions: [] } + ] + } + ] + }, + { + name: "DE", + value: "DE", + locationOptions: [ + { + labelId: "city", + labelName: "City", + options: [{ name: "Wilmington", value: "NOAM-US-DE-WI", locationOptions: [] }] + } + ] + }, + { + name: "FL", + value: "FL", + locationOptions: [ + { + labelId: "city", + labelName: "City", + options: [ + { name: "Cape Coral", value: "NOAM-US-FL-CC", locationOptions: [] }, + { name: "Gainesville", value: "NOAM-US-FL-GA", locationOptions: [] }, + { name: "Jacksonville", value: "NOAM-US-FL-JA", locationOptions: [] }, + { name: "Lakeland", value: "NOAM-US-FL-LA", locationOptions: [] }, + { name: "Miami", value: "NOAM-US-FL-MI", locationOptions: [] }, + { name: "Orlando", value: "NOAM-US-FL-OR", locationOptions: [] }, + { name: "Port St Lucie", value: "NOAM-US-FL-PS", locationOptions: [] }, + { name: "Sarasota", value: "NOAM-US-FL-SA", locationOptions: [] }, + { name: "St. Petersburg", value: "NOAM-US-FL-SP", locationOptions: [] }, + { name: "Tallahassee", value: "NOAM-US-FL-TA", locationOptions: [] }, + { name: "West Palm Beach", value: "NOAM-US-FL-WP", locationOptions: [] } + ] + } + ] + }, + { + name: "GA", + value: "GA", + locationOptions: [ + { + labelId: "city", + labelName: "City", + options: [ + { name: "Albany", value: "NOAM-US-GA-AL", locationOptions: [] }, + { name: "Atlanta", value: "NOAM-US-GA-AT", locationOptions: [] }, + { name: "Augusta", value: "NOAM-US-GA-AU", locationOptions: [] }, + { name: "Macon", value: "NOAM-US-GA-MA", locationOptions: [] }, + { name: "Savannah", value: "NOAM-US-GA-SA", locationOptions: [] } + ] + } + ] + }, + { + name: "HI", + value: "HI", + locationOptions: [ + { + labelId: "city", + labelName: "City", + options: [{ name: "Honolulu", value: "NOAM-US-HI-HO", locationOptions: [] }] + } + ] + }, + { + name: "IA", + value: "IA", + locationOptions: [ + { + labelId: "city", + labelName: "City", + options: [ + { name: "Cedar Rapids", value: "NOAM-US-IA-CR", locationOptions: [] }, + { name: "Davenport", value: "NOAM-US-IA-DA", locationOptions: [] }, + { name: "Mason City", value: "NOAM-US-IA-MC", locationOptions: [] }, + { name: "Sioux City", value: "NOAM-US-IA-SC", locationOptions: [] } + ] + } + ] + }, + { + name: "ID", + value: "ID", + locationOptions: [ + { + labelId: "city", + labelName: "City", + options: [{ name: "Boise", value: "NOAM-US-ID-BO", locationOptions: [] }] + } + ] + }, + { + name: "IL", + value: "IL", + locationOptions: [ + { + labelId: "city", + labelName: "City", + options: [ + { name: "Alton", value: "NOAM-US-IL-AL", locationOptions: [] }, + { name: "Aurora", value: "NOAM-US-IL-AU", locationOptions: [] }, + { name: "Big Rock", value: "NOAM-US-IL-BK", locationOptions: [] }, + { name: "Champaign", value: "NOAM-US-IL-CA", locationOptions: [] }, + { name: "Chicago", value: "NOAM-US-IL-CH", locationOptions: [] }, + { name: "Rock Island", value: "NOAM-US-IL-RI", locationOptions: [] }, + { name: "Rockford", value: "NOAM-US-IL-RO", locationOptions: [] }, + { name: "Waukegan", value: "NOAM-US-IL-WK", locationOptions: [] } + ] + } + ] + }, + { + name: "IN", + value: "IN", + locationOptions: [ + { + labelId: "city", + labelName: "City", + options: [ + { name: "Evansville", value: "NOAM-US-IN-EV", locationOptions: [] }, + { name: "Fort Wayne", value: "NOAM-US-IN-FW", locationOptions: [] }, + { name: "Gary", value: "NOAM-US-IN-GA", locationOptions: [] }, + { name: "Indianapolis", value: "NOAM-US-IN-IN", locationOptions: [] }, + { name: "South Bend", value: "NOAM-US-IN-SB", locationOptions: [] } + ] + } + ] + }, + { + name: "KS", + value: "KS", + locationOptions: [ + { + labelId: "city", + labelName: "City", + options: [ + { name: "Kansas City", value: "NOAM-US-KS-KS", locationOptions: [] }, + { name: "Topeka", value: "NOAM-US-KS-TO", locationOptions: [] }, + { name: "Wichita", value: "NOAM-US-KS-WI", locationOptions: [] } + ] + } + ] + }, + { + name: "KY", + value: "KY", + locationOptions: [ + { + labelId: "city", + labelName: "City", + options: [ + { name: "Ashland", value: "NOAM-US-KY-AS", locationOptions: [] }, + { name: "Lexington", value: "NOAM-US-KY-LE", locationOptions: [] }, + { name: "Louisville", value: "NOAM-US-KY-LO", locationOptions: [] }, + { name: "Owensboro", value: "NOAM-US-KY-OW", locationOptions: [] } + ] + } + ] + }, + { + name: "LA", + value: "LA", + locationOptions: [ + { + labelId: "city", + labelName: "City", + options: [ + { name: "Baton Rouge", value: "NOAM-US-LA-BR", locationOptions: [] }, + { name: "Lafayette", value: "NOAM-US-LA-LA", locationOptions: [] }, + { name: "New Orleans", value: "NOAM-US-LA-NO", locationOptions: [] }, + { name: "Shreveport", value: "NOAM-US-LA-SH", locationOptions: [] } + ] + } + ] + }, + { + name: "MA", + value: "MA", + locationOptions: [ + { + labelId: "city", + labelName: "City", + options: [ + { name: "Boston", value: "NOAM-US-MA-BO", locationOptions: [] }, + { name: "Lowell", value: "NOAM-US-MA-LO", locationOptions: [] }, + { name: "Lynn", value: "NOAM-US-MA-LY", locationOptions: [] } + ] + } + ] + }, + { + name: "ME", + value: "ME", + locationOptions: [ + { + labelId: "city", + labelName: "City", + options: [{ name: "Portland", value: "NOAM-US-ME-PO", locationOptions: [] }] + } + ] + }, + { + name: "MI", + value: "MI", + locationOptions: [ + { + labelId: "city", + labelName: "City", + options: [ + { name: "Ann Arbor", value: "NOAM-US-MI-AA", locationOptions: [] }, + { name: "Detroit", value: "NOAM-US-MI-DE", locationOptions: [] }, + { name: "Flint", value: "NOAM-US-MI-FL", locationOptions: [] }, + { name: "Grand Rapids", value: "NOAM-US-MI-GP", locationOptions: [] }, + { name: "Grant", value: "NOAM-US-MI-GR", locationOptions: [] }, + { name: "Lansing", value: "NOAM-US-MI-LA", locationOptions: [] }, + { name: "Otsego", value: "NOAM-US-MI-OT", locationOptions: [] }, + { name: "Saginaw", value: "NOAM-US-MI-SA", locationOptions: [] }, + { name: "Sault Ste Marie", value: "NOAM-US-MI-SS", locationOptions: [] }, + { name: "Troy", value: "NOAM-US-MI-TR", locationOptions: [] }, + { name: "Warren", value: "NOAM-US-MI-WA", locationOptions: [] } + ] + } + ] + }, + { + name: "MN", + value: "MN", + locationOptions: [ + { + labelId: "city", + labelName: "City", + options: [ + { name: "Alexandria", value: "NOAM-US-MN-AL", locationOptions: [] }, + { name: "Duluth", value: "NOAM-US-MN-DU", locationOptions: [] }, + { name: "Minneapolis", value: "NOAM-US-MN-MI", locationOptions: [] } + ] + } + ] + }, + { + name: "MO", + value: "MO", + locationOptions: [ + { + labelId: "city", + labelName: "City", + options: [ + { name: "Columbia", value: "NOAM-US-MO-CO", locationOptions: [] }, + { name: "Kansas City", value: "NOAM-US-MO-KS", locationOptions: [] }, + { name: "Marshall", value: "NOAM-US-MO-MA", locationOptions: [] }, + { name: "Springfield", value: "NOAM-US-MO-SP", locationOptions: [] }, + { name: "St. Charles", value: "NOAM-US-MO-SC", locationOptions: [] }, + { name: "St. Louis", value: "NOAM-US-MO-SL", locationOptions: [] } + ] + } + ] + }, + { + name: "MS", + value: "MS", + locationOptions: [ + { + labelId: "city", + labelName: "City", + options: [ + { name: "Biloxi", value: "NOAM-US-MS-BI", locationOptions: [] }, + { name: "Jackson", value: "NOAM-US-MS-JA", locationOptions: [] }, + { name: "Starkville", value: "NOAM-US-MS-ST", locationOptions: [] } + ] + } + ] + }, + { + name: "MT", + value: "MT", + locationOptions: [ + { + labelId: "city", + labelName: "City", + options: [{ name: "Billings", value: "NOAM-US-MT-BI", locationOptions: [] }] + } + ] + }, + { + name: "NC", + value: "NC", + locationOptions: [ + { + labelId: "city", + labelName: "City", + options: [ + { name: "Charlotte", value: "NOAM-US-NC-CH", locationOptions: [] }, + { name: "Fayetteville", value: "NOAM-US-NC-FA", locationOptions: [] }, + { name: "Greensboro", value: "NOAM-US-NC-GR", locationOptions: [] }, + { name: "Raleigh", value: "NOAM-US-NC-RA", locationOptions: [] }, + { name: "Rocky Mount", value: "NOAM-US-NC-RM", locationOptions: [] } + ] + } + ] + }, + { + name: "ND", + value: "ND", + locationOptions: [ + { + labelId: "city", + labelName: "City", + options: [{ name: "Fargo", value: "NOAM-US-ND-FA", locationOptions: [] }] + } + ] + }, + { + name: "NE", + value: "NE", + locationOptions: [ + { + labelId: "city", + labelName: "City", + options: [ + { name: "Kearney", value: "NOAM-US-NE-KE", locationOptions: [] }, + { name: "Omaha", value: "NOAM-US-NE-OM", locationOptions: [] } + ] + } + ] + }, + { + name: "NJ", + value: "NJ", + locationOptions: [ + { + labelId: "city", + labelName: "City", + options: [ + { name: "Atlantic City", value: "NOAM-US-NJ-AC", locationOptions: [] }, + { name: "Camden", value: "NOAM-US-NJ-CA", locationOptions: [] }, + { name: "Edison", value: "NOAM-US-NJ-ED", locationOptions: [] }, + { name: "Elizabeth", value: "NOAM-US-NJ-EL", locationOptions: [] }, + { name: "Newark", value: "NOAM-US-NJ-NE", locationOptions: [] } + ] + } + ] + }, + { + name: "NM", + value: "NM", + locationOptions: [ + { + labelId: "city", + labelName: "City", + options: [ + { name: "Albuquerque", value: "NOAM-US-NM-AL", locationOptions: [] }, + { name: "Las Cruces", value: "NOAM-US-NM-LC", locationOptions: [] } + ] + } + ] + }, + { + name: "NV", + value: "NV", + locationOptions: [ + { + labelId: "city", + labelName: "City", + options: [ + { name: "Las Vegas", value: "NOAM-US-NV-LV", locationOptions: [] }, + { name: "Reno", value: "NOAM-US-NV-RE", locationOptions: [] } + ] + } + ] + }, + { + name: "NY", + value: "NY", + locationOptions: [ + { + labelId: "city", + labelName: "City", + options: [ + { name: "Albany", value: "NOAM-US-NY-AL", locationOptions: [] }, + { name: "Brentwood", value: "NOAM-US-NY-BR", locationOptions: [] }, + { name: "Elmira", value: "NOAM-US-NY-EL", locationOptions: [] }, + { name: "Hempstead", value: "NOAM-US-NY-HE", locationOptions: [] }, + { name: "New York City", value: "NOAM-US-NY-NY", locationOptions: [] }, + { name: "Niagara Falls", value: "NOAM-US-NY-NF", locationOptions: [] }, + { name: "Rochester", value: "NOAM-US-NY-RO", locationOptions: [] }, + { name: "Yonkers", value: "NOAM-US-NY-YO", locationOptions: [] } + ] + } + ] + }, + { + name: "OH", + value: "OH", + locationOptions: [ + { + labelId: "city", + labelName: "City", + options: [ + { name: "Akron", value: "NOAM-US-OH-AK", locationOptions: [] }, + { name: "Cincinnati", value: "NOAM-US-OH-CI", locationOptions: [] }, + { name: "Cleveland", value: "NOAM-US-OH-CL", locationOptions: [] }, + { name: "Columbus", value: "NOAM-US-OH-CO", locationOptions: [] }, + { name: "Dayton", value: "NOAM-US-OH-DA", locationOptions: [] }, + { name: "Toledo", value: "NOAM-US-OH-TO", locationOptions: [] } + ] + } + ] + }, + { + name: "OK", + value: "OK", + locationOptions: [ + { + labelId: "city", + labelName: "City", + options: [ + { name: "Lawton", value: "NOAM-US-OK-LA", locationOptions: [] }, + { name: "Oklahoma City", value: "NOAM-US-OK-OC", locationOptions: [] }, + { name: "Tulsa", value: "NOAM-US-OK-TU", locationOptions: [] } + ] + } + ] + }, + { + name: "OR", + value: "OR", + locationOptions: [ + { + labelId: "city", + labelName: "City", + options: [{ name: "Portland", value: "NOAM-US-OR-PO", locationOptions: [] }] + } + ] + }, + { + name: "PA", + value: "PA", + locationOptions: [ + { + labelId: "city", + labelName: "City", + options: [ + { name: "Erie", value: "NOAM-US-PA-ER", locationOptions: [] }, + { name: "Lancaster", value: "NOAM-US-PA-LA", locationOptions: [] }, + { name: "New Castle", value: "NOAM-US-PA-NC", locationOptions: [] }, + { name: "Philadelphia", value: "NOAM-US-PA-PI", locationOptions: [] }, + { name: "Pittsburgh", value: "NOAM-US-PA-PT", locationOptions: [] }, + { name: "Scranton", value: "NOAM-US-PA-SC", locationOptions: [] } + ] + } + ] + }, + { + name: "RI", + value: "RI", + locationOptions: [ + { + labelId: "city", + labelName: "City", + options: [{ name: "Providence", value: "NOAM-US-RI-PR", locationOptions: [] }] + } + ] + }, + { + name: "SC", + value: "SC", + locationOptions: [ + { + labelId: "city", + labelName: "City", + options: [ + { name: "Charleston", value: "NOAM-US-SC-CH", locationOptions: [] }, + { name: "Columbia", value: "NOAM-US-SC-CO", locationOptions: [] }, + { name: "Greenville", value: "NOAM-US-SC-GR", locationOptions: [] } + ] + } + ] + }, + { + name: "SD", + value: "SD", + locationOptions: [ + { + labelId: "city", + labelName: "City", + options: [{ name: "Sioux Falls", value: "NOAM-US-SD-SF", locationOptions: [] }] + } + ] + }, + { + name: "TN", + value: "TN", + locationOptions: [ + { + labelId: "city", + labelName: "City", + options: [ + { name: "Chattanooga", value: "NOAM-US-TN-CH", locationOptions: [] }, + { name: "Clarksville", value: "NOAM-US-TN-CL", locationOptions: [] }, + { name: "Jackson", value: "NOAM-US-TN-JA", locationOptions: [] }, + { name: "Knoxville", value: "NOAM-US-TN-KN", locationOptions: [] }, + { name: "Memphis", value: "NOAM-US-TN-ME", locationOptions: [] }, + { name: "Nashville", value: "NOAM-US-TN-NA", locationOptions: [] } + ] + } + ] + }, + { + name: "TX", + value: "TX", + locationOptions: [ + { + labelId: "city", + labelName: "City", + options: [ + { name: "Abilene", value: "NOAM-US-TX-AB", locationOptions: [] }, + { name: "Bryan", value: "NOAM-US-TX-BR", locationOptions: [] }, + { name: "Corpus Christi", value: "NOAM-US-TX-CC", locationOptions: [] }, + { name: "Dallas", value: "NOAM-US-TX-DA", locationOptions: [] }, + { name: "Denton", value: "NOAM-US-TX-DE", locationOptions: [] }, + { name: "El Paso", value: "NOAM-US-TX-EP", locationOptions: [] }, + { name: "Fort Worth", value: "NOAM-US-TX-FW", locationOptions: [] }, + { name: "Galveston", value: "NOAM-US-TX-GA", locationOptions: [] }, + { name: "Hamilton", value: "NOAM-US-TX-HA", locationOptions: [] }, + { name: "Huntsville", value: "NOAM-US-TX-HU", locationOptions: [] }, + { name: "Laredo", value: "NOAM-US-TX-LA", locationOptions: [] }, + { name: "Lubbock", value: "NOAM-US-TX-LU", locationOptions: [] }, + { name: "Odessa", value: "NOAM-US-TX-OD", locationOptions: [] }, + { name: "San Antonio", value: "NOAM-US-TX-SA", locationOptions: [] }, + { name: "Tyler", value: "NOAM-US-TX-TY", locationOptions: [] } + ] + } + ] + }, + { + name: "UT", + value: "UT", + locationOptions: [ + { + labelId: "city", + labelName: "City", + options: [ + { name: "Salt Lake City", value: "NOAM-US-UT-SL", locationOptions: [] }, + { name: "St. George", value: "NOAM-US-UT-SG", locationOptions: [] } + ] + } + ] + }, + { + name: "VA", + value: "VA", + locationOptions: [ + { + labelId: "city", + labelName: "City", + options: [ + { name: "Arlington", value: "NOAM-US-VA-AR", locationOptions: [] }, + { name: "Lynchburg", value: "NOAM-US-VA-LY", locationOptions: [] }, + { name: "Richmond", value: "NOAM-US-VA-RI", locationOptions: [] }, + { name: "Roanoke", value: "NOAM-US-VA-RO", locationOptions: [] }, + { name: "Virginia Beach", value: "NOAM-US-VA-VB", locationOptions: [] } + ] + } + ] + }, + { + name: "VT", + value: "VT", + locationOptions: [ + { + labelId: "city", + labelName: "City", + options: [ + { name: "Brattleboro", value: "NOAM-US-VT-BR", locationOptions: [] }, + { name: "Burlington", value: "NOAM-US-VT-BU", locationOptions: [] }, + { name: "Newport", value: "NOAM-US-VT-NE", locationOptions: [] } + ] + } + ] + }, + { + name: "WI", + value: "WI", + locationOptions: [ + { + labelId: "city", + labelName: "City", + options: [ + { name: "Eau Claire", value: "NOAM-US-WI-EC", locationOptions: [] }, + { name: "Green Bay", value: "NOAM-US-WI-GB", locationOptions: [] }, + { name: "Kenosha", value: "NOAM-US-WI-KE", locationOptions: [] }, + { name: "Madison", value: "NOAM-US-WI-MA", locationOptions: [] }, + { name: "Milwaukee", value: "NOAM-US-WI-MI", locationOptions: [] } + ] + } + ] + }, + { + name: "WV", + value: "WV", + locationOptions: [ + { + labelId: "city", + labelName: "City", + options: [{ name: "Charleston", value: "NOAM-US-WV-CH", locationOptions: [] }] + } + ] + }, + { + name: "WY", + value: "WY", + locationOptions: [ + { + labelId: "city", + labelName: "City", + options: [{ name: "Laramie", value: "NOAM-US-WY-LA", locationOptions: [] }] + } + ] + } + ] + } + }, + [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "5hhtbupGKE6m/UAjeCXYBA.0", + "X-Processing-Time", + "250ms", + "X-Azure-Ref", + "0fyl+XwAAAADi8dQj1GlMSKq5a6A9ZjjbWVZSMzBFREdFMDQxNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 20:47:58 GMT" + ] + ); diff --git a/sdk/communication/communication-administration/recordings/node/phonenumberadministrationclient_playbacklive/recording_can_get_phoneplangroupid_and_phoneplanid_for_other_tests.js b/sdk/communication/communication-administration/recordings/node/phonenumberadministrationclient_playbacklive/recording_can_get_phoneplangroupid_and_phoneplanid_for_other_tests.js new file mode 100644 index 000000000000..46aa9ddea731 --- /dev/null +++ b/sdk/communication/communication-administration/recordings/node/phonenumberadministrationclient_playbacklive/recording_can_get_phoneplangroupid_and_phoneplanid_for_other_tests.js @@ -0,0 +1,91 @@ +let nock = require("nock"); + +module.exports.hash = "1a4ba6af0469e1a931c49a965aadd8cd"; + +module.exports.testInfo = { uniqueName: {}, newDate: {} }; + +nock("https://endpoint", { encodedQueryParams: true }) + .get("/administration/phonenumbers/countries/US/phoneplangroups") + .query(true) + .reply( + 200, + { + phonePlanGroups: [ + { + phonePlanGroupId: "sanitized", + phoneNumberType: "Geographic", + localizedName: "Azure- User - Geographic", + localizedDescription: "These are numbers used by Azure resources." + }, + { + phonePlanGroupId: "sanitized", + phoneNumberType: "Geographic", + localizedName: "Azure - Geographic", + localizedDescription: "These are numbers used by Azure resources." + }, + { + phonePlanGroupId: "sanitized", + phoneNumberType: "TollFree", + localizedName: "Azure - Toll Free", + localizedDescription: "These are toll free numbers used by Azure resources." + } + ], + nextLink: null + }, + [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "A8oNtBci20aKVLyOBVGTLQ.0", + "X-Processing-Time", + "235ms", + "X-Azure-Ref", + "0fil+XwAAAABtktZ5+9zFS5PjMS1QpDkuWVZSMzBFREdFMDQxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 20:47:57 GMT" + ] + ); + +nock("https://endpoint", { encodedQueryParams: true }) + .get("/administration/phonenumbers/countries/US/phoneplangroups/sanitized/phoneplans") + .query(true) + .reply( + 200, + { + phonePlans: [ + { + phonePlanId: "sanitized", + localizedName: "Outbound Only PSTN For User - Geographic", + locationType: "Selection", + areaCodes: [], + capabilities: ["Azure", "OutboundCalling", "UserAssignment", "Geographic"], + maximumSearchSize: 20 + }, + { + phonePlanId: "sanitized", + localizedName: "Inbound Only PSTN For User - Geographic", + locationType: "Selection", + areaCodes: [], + capabilities: ["Azure", "InboundCalling", "UserAssignment", "Geographic"], + maximumSearchSize: 20 + } + ], + nextLink: null + }, + [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "mpWK1YyYfUuzIsGu4ysbwA.0", + "X-Processing-Time", + "228ms", + "X-Azure-Ref", + "0fil+XwAAAACyHjEArDXBSY28rLMYbOu4WVZSMzBFREdFMDQxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Wed, 07 Oct 2020 20:47:58 GMT" + ] + ); diff --git a/sdk/communication/communication-administration/review/communication-administration.api.md b/sdk/communication/communication-administration/review/communication-administration.api.md new file mode 100644 index 000000000000..1f925f850d52 --- /dev/null +++ b/sdk/communication/communication-administration/review/communication-administration.api.md @@ -0,0 +1,555 @@ +## API Report File for "@azure/communication-administration" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { CommunicationUser } from '@azure/communication-common'; +import * as coreHttp from '@azure/core-http'; +import { HttpResponse } from '@azure/core-http'; +import { KeyCredential } from '@azure/core-auth'; +import { OperationOptions } from '@azure/core-http'; +import { PagedAsyncIterableIterator } from '@azure/core-paging'; +import { PipelineOptions } from '@azure/core-http'; +import { PollerLike } from '@azure/core-lro'; +import { PollOperationState } from '@azure/core-lro'; + +// @public +export interface AcquiredPhoneNumber { + acquiredCapabilities: Capability[]; + activationState?: ActivationState; + assignmentStatus?: AssignmentStatus; + availableCapabilities: Capability[]; + phoneNumber: string; + placeName?: string; +} + +// @public +export interface AcquiredPhoneNumbers { + nextLink?: string; + phoneNumbers?: AcquiredPhoneNumber[]; +} + +// @public +export type ActivationState = "Activated" | "AssignmentPending" | "AssignmentFailed" | "UpdatePending" | "UpdateFailed"; + +// @public +export interface AreaCodes { + nextLink?: string; + primaryAreaCodes?: string[]; + secondaryAreaCodes?: string[]; +} + +// @public +export type AssignmentStatus = "Unassigned" | "Unknown" | "UserAssigned" | "ConferenceAssigned" | "FirstPartyAppAssigned" | "ThirdPartyAppAssigned"; + +// @public +export interface BeginPurchaseReservationOptions extends PhoneNumberPollerOptionsBase, OperationOptions { +} + +// @public +export interface BeginReleasePhoneNumbersOptions extends PhoneNumberPollerOptionsBase, OperationOptions { +} + +// @public +export interface BeginReservePhoneNumbersOptions extends PhoneNumberPollerOptionsBase, OperationOptions { + // (undocumented) + locationOptions?: LocationOptionsDetails[]; + // (undocumented) + quantity?: number; +} + +// @public +export type CancelReservationOptions = OperationOptions; + +// @public +export type CapabilitiesUpdateStatus = "Pending" | "InProgress" | "Complete" | "Error"; + +// @public +export type Capability = "UserAssignment" | "FirstPartyVoiceAppAssignment" | "ConferenceAssignment" | "P2PSmsEnabled" | "Geographic" | "NonGeographic" | "TollCalling" | "TollFreeCalling" | "Premium" | "P2PSmsCapable" | "A2PSmsCapable" | "A2PSmsEnabled" | "Calling" | "TollFree" | "FirstPartyAppAssignment" | "ThirdPartyAppAssignment" | "Azure" | "Office365" | "InboundCalling" | "OutboundCalling" | "InboundA2PSms" | "OutboundA2PSms" | "InboundP2PSms" | "OutboundP2PSms"; + +// @public +export interface CarrierDetails { + localizedName?: string; + name?: string; +} + +// @public +export class CommunicationIdentityClient { + constructor(connectionString: string, options?: CommunicationIdentityOptions); + constructor(url: string, credential: KeyCredential, options?: CommunicationIdentityOptions); + createUser(options?: OperationOptions): Promise; + deleteUser(user: CommunicationUser, options?: OperationOptions): Promise; + issueToken(user: CommunicationUser, scopes: TokenScope[], options?: OperationOptions): Promise; + revokeTokens(user: CommunicationUser, tokensValidFrom?: Date, options?: OperationOptions): Promise; +} + +// @public +export interface CommunicationIdentityOptions extends PipelineOptions { +} + +// @public +export interface CommunicationIdentityToken { + expiresOn: Date; + id: string; + token: string; +} + +// @public +export interface CommunicationTokenRequest { + scopes: string[]; +} + +// @public +export interface CommunicationUserToken extends Pick { + user: CommunicationUser; +} + +// @public +export interface ConfigurePhoneNumberOptions extends OperationOptions { + applicationId?: string; + azurePstnTargetId?: string; +} + +// @public +export interface ConfigurePhoneNumberRequest { + callbackUrl: string; + phoneNumber: string; +} + +// @public +export type CreatePhoneNumberReservationResponse = WithResponse; + +// @public +export interface CreateReservationOptions extends OperationOptions { + locationOptions?: LocationOptionsDetails[]; +} + +// @public +export interface CreateReservationRequest { + areaCode: string; + description: string; + name: string; + phonePlanIds: string[]; + quantity: number; +} + +// @public (undocumented) +export interface CreateReservationResponse { + // (undocumented) + reservationId: string; +} + +// @public +export type CreateUserResponse = WithResponse; + +// @public +export type CurrencyType = "USD"; + +// @public +export type GetAreaCodesOptions = OperationOptions; + +// @public +export interface GetAreaCodesRequest { + countryCode: string; + locationOptionsQueries: LocationOptionsQueries; + locationType: string; + phonePlanId: string; +} + +// @public +export type GetAreaCodesResponse = WithResponse; + +// @public +export type GetCapabilitiesUpdateOptions = OperationOptions; + +// @public +export type GetCapabilitiesUpdateResponse = WithResponse; + +// @public +export type GetPhoneNumberConfigurationOptions = OperationOptions; + +// @public +export type GetPhoneNumberConfigurationResponse = WithResponse; + +// @public +export type GetPhonePlanLocationOptionsOptions = PageableLocalizationOptions; + +// @public (undocumented) +export interface GetPhonePlanLocationOptionsRequest extends PageableLocalizationOptions { + countryCode: string; + phonePlanGroupId: string; + phonePlanId: string; +} + +// @public +export type GetPhonePlanLocationOptionsResponse = WithResponse; + +// @public +export type GetReleaseOptions = OperationOptions; + +// @public +export type GetReleaseResponse = WithResponse; + +// @public +export type GetReservationOptions = OperationOptions; + +// @public +export type GetReservationResponse = WithResponse; + +// @public +export type IssueTokenResponse = WithResponse; + +// @public +export type ListPhoneNumbersOptions = PageableLocalizationOptions; + +// @public +export interface ListPhonePlanGroupsOptions extends PageableLocalizationOptions { + // (undocumented) + includeRateInformation?: boolean; +} + +// @public +export type ListPhonePlansOptions = PageableLocalizationOptions; + +// @public (undocumented) +export interface ListPhonePlansRequest { + countryCode: string; + phonePlanGroupId: string; +} + +// @public +export type ListSupportedCountriesOptions = PageableLocalizationOptions; + +// @public +export interface LocalizationOptions extends OperationOptions { + locale?: string; +} + +// @public +export interface LocationOptions { + labelId?: string; + labelName?: string; + options?: LocationOptionsDetails[]; +} + +// @public +export interface LocationOptionsDetails { + locationOptions?: LocationOptions[]; + name?: string; + value?: string; +} + +// @public +export interface LocationOptionsQueries { + locationOptions?: LocationOptionsQuery[]; +} + +// @public +export interface LocationOptionsQuery { + labelId?: string; + optionsValue?: string; +} + +// @public +export interface LocationOptionsResponse { + // (undocumented) + locationOptions?: LocationOptions; +} + +// @public +export type LocationType = "CivicAddress" | "NotRequired" | "Selection"; + +// @public +export interface NumberConfiguration { + phoneNumber: string; + // (undocumented) + pstnConfiguration: PstnConfiguration; +} + +// @public +export interface NumberConfigurationResponse { + // (undocumented) + pstnConfiguration: PstnConfiguration; +} + +// @public +export interface NumberUpdateCapabilities { + add?: Capability[]; + remove?: Capability[]; +} + +// @public +export interface PageableLocalizationOptions extends PageableOptions, LocalizationOptions { +} + +// @public +export interface PageableOptions extends OperationOptions { + skip?: number; + take?: number; +} + +// @public +export class PhoneNumberAdministrationClient { + constructor(connectionString: string, options?: PhoneNumberAdministrationClientOptions); + constructor(url: string, credential: KeyCredential, options?: PhoneNumberAdministrationClientOptions); + beginPurchaseReservation(reservationId: string, options?: BeginPurchaseReservationOptions): Promise, void>>; + beginReleasePhoneNumbers(phoneNumbers: string[], options?: BeginReleasePhoneNumbersOptions): Promise, PhoneNumberRelease>>; + beginReservePhoneNumbers(reservationRequest: CreateReservationRequest, options?: BeginReservePhoneNumbersOptions): Promise, PhoneNumberReservation>>; + cancelReservation(reservationId: string, options?: CancelReservationOptions): Promise; + configurePhoneNumber(config: ConfigurePhoneNumberRequest, options?: ConfigurePhoneNumberOptions): Promise; + getAreaCodes(request: GetAreaCodesRequest, options?: GetAreaCodesOptions): Promise; + getCapabilitiesUpdate(capabilitiesUpdateId: string, options?: GetCapabilitiesUpdateOptions): Promise; + getPhoneNumberConfiguration(phoneNumber: string, options?: GetPhoneNumberConfigurationOptions): Promise; + getPhonePlanLocationOptions(request: GetPhonePlanLocationOptionsRequest, options?: GetPhonePlanLocationOptionsOptions): Promise; + getReservation(reservationId: string, options?: GetReservationOptions): Promise; + listPhoneNumbers(options?: ListPhoneNumbersOptions): PagedAsyncIterableIterator; + listPhonePlanGroups(countryCode: string, options?: ListPhonePlanGroupsOptions): PagedAsyncIterableIterator; + listPhonePlans(planGroupInfo: ListPhonePlansRequest, options?: ListPhonePlansOptions): PagedAsyncIterableIterator; + listReleases(options?: PageableOptions): PagedAsyncIterableIterator; + listSearches(options?: PageableOptions): PagedAsyncIterableIterator; + listSupportedCountries(options?: ListSupportedCountriesOptions): PagedAsyncIterableIterator; + unconfigurePhoneNumber(phoneNumber: string, options?: UnconfigurePhoneNumberOptions): Promise; + updatePhoneNumbersCapabilities(phoneNumberCapabilitiesUpdates: PhoneNumberCapabilitiesUpdates, options?: UpdateCapabilitiesOptions): Promise; +} + +// @public +export interface PhoneNumberAdministrationClientOptions extends PipelineOptions { +} + +// @public +export type PhoneNumberAdministrationGetAllAreaCodesResponse = AreaCodes & { + _response: coreHttp.HttpResponse & { + bodyAsText: string; + parsedBody: AreaCodes; + }; +}; + +// @public +export type PhoneNumberAdministrationGetCapabilitiesUpdateResponse = UpdatePhoneNumberCapabilitiesResponse & { + _response: coreHttp.HttpResponse & { + bodyAsText: string; + parsedBody: UpdatePhoneNumberCapabilitiesResponse; + }; +}; + +// @public +export type PhoneNumberAdministrationGetNumberConfigurationResponse = NumberConfigurationResponse & { + _response: coreHttp.HttpResponse & { + bodyAsText: string; + parsedBody: NumberConfigurationResponse; + }; +}; + +// @public +export type PhoneNumberAdministrationGetPhonePlanLocationOptionsResponse = LocationOptionsResponse & { + _response: coreHttp.HttpResponse & { + bodyAsText: string; + parsedBody: LocationOptionsResponse; + }; +}; + +// @public +export type PhoneNumberAdministrationGetReleaseByIdResponse = PhoneNumberRelease & { + _response: coreHttp.HttpResponse & { + bodyAsText: string; + parsedBody: PhoneNumberRelease; + }; +}; + +// @public +export type PhoneNumberAdministrationReleasePhoneNumbersResponse = ReleaseResponse & { + _response: coreHttp.HttpResponse & { + bodyAsText: string; + parsedBody: ReleaseResponse; + }; +}; + +// @public +export type PhoneNumberCapabilitiesUpdates = { + [propertyName: string]: NumberUpdateCapabilities; +}; + +// @public +export interface PhoneNumberCountries { + countries?: PhoneNumberCountry[]; + nextLink?: string; +} + +// @public +export interface PhoneNumberCountry { + countryCode: string; + localizedName: string; +} + +// @public +export interface PhoneNumberEntities { + entities?: PhoneNumberEntity[]; + nextLink?: string; +} + +// @public +export interface PhoneNumberEntity { + createdAt?: Date; + displayName?: string; + focDate?: Date; + id?: string; + quantity?: number; + quantityObtained?: number; + status?: string; +} + +// @public +export interface PhoneNumberPollerOptionsBase { + pollInterval?: number; + resumeFrom?: string; +} + +// @public +export interface PhoneNumberRelease { + createdAt?: Date; + errorMessage?: string; + phoneNumberReleaseStatusDetails?: { + [propertyName: string]: PhoneNumberReleaseDetails; + }; + releaseId?: string; + status?: ReleaseStatus; +} + +// @public +export interface PhoneNumberReleaseDetails { + errorCode?: number; + status?: PhoneNumberReleaseStatus; +} + +// @public +export type PhoneNumberReleaseStatus = "Pending" | "Success" | "Error" | "InProgress"; + +// @public +export interface PhoneNumberReservation { + areaCode?: string; + createdAt?: Date; + description?: string; + displayName?: string; + errorCode?: number; + locationOptions?: LocationOptionsDetails[]; + phoneNumbers?: string[]; + phonePlanIds?: string[]; + quantity?: number; + reservationExpiryDate?: Date; + reservationId?: string; + status?: SearchStatus; +} + +// @public +export type PhoneNumberType = "Unknown" | "Geographic" | "TollFree" | "Indirect"; + +// @public +export interface PhonePlan { + areaCodes?: string[]; + capabilities?: Capability[]; + localizedName: string; + locationType: LocationType; + maximumSearchSize?: number; + phonePlanId: string; +} + +// @public +export interface PhonePlanGroup { + // (undocumented) + carrierDetails?: CarrierDetails; + localizedDescription: string; + localizedName: string; + phoneNumberType?: PhoneNumberType; + phonePlanGroupId: string; + // (undocumented) + rateInformation?: RateInformation; +} + +// @public +export interface PhonePlanGroups { + nextLink?: string; + phonePlanGroups?: PhonePlanGroup[]; +} + +// @public +export interface PhonePlansResponse { + nextLink?: string; + phonePlans?: PhonePlan[]; +} + +// @public +export interface PstnConfiguration { + applicationId?: string; + callbackUrl: string; +} + +// @public +export type PurchaseReservationOptions = OperationOptions; + +// @public +export interface RateInformation { + currencyType?: CurrencyType; + monthlyRate?: number; + rateErrorMessage?: string; +} + +// @public +export type ReleasePhoneNumbersOptions = OperationOptions; + +// @public +export type ReleasePhoneNumbersResponse = WithResponse; + +// @public +export interface ReleaseResponse { + releaseId: string; +} + +// @public +export type ReleaseStatus = "Pending" | "InProgress" | "Complete" | "Failed" | "Expired"; + +// @public +export type SearchStatus = "Pending" | "InProgress" | "Reserved" | "Expired" | "Expiring" | "Completing" | "Refreshing" | "Success" | "Manual" | "Cancelled" | "Cancelling" | "Error" | "PurchasePending"; + +// @public +export type TokenScope = "chat" | "voip" | "pstn"; + +// @public +export type UnconfigurePhoneNumberOptions = OperationOptions; + +// @public +export interface UpdateCapabilitiesOptions extends OperationOptions { + // (undocumented) + phoneNumbers?: PhoneNumberCapabilitiesUpdates; +} + +// @public +export interface UpdateNumberCapabilitiesResponse { + capabilitiesUpdateId: string; +} + +// @public +export type UpdateNumbersCapabilitiesResponse = WithResponse; + +// @public +export interface UpdatePhoneNumberCapabilitiesResponse { + capabilitiesUpdateId?: string; + capabilitiesUpdateStatus?: CapabilitiesUpdateStatus; + createdAt?: Date; + phoneNumberCapabilitiesUpdates?: { + [propertyName: string]: NumberUpdateCapabilities; + }; +} + +// @public +export type VoidResponse = WithResponse<{}>; + +// @public +export type WithResponse = T & { + _response: HttpResponse; +}; + + +// (No @packageDocumentation comment for this package) + +``` diff --git a/sdk/communication/communication-administration/rollup.base.config.js b/sdk/communication/communication-administration/rollup.base.config.js new file mode 100644 index 000000000000..0e556ce1f12e --- /dev/null +++ b/sdk/communication/communication-administration/rollup.base.config.js @@ -0,0 +1,131 @@ +import path from "path"; +import nodeResolve from "@rollup/plugin-node-resolve"; +import multiEntry from "@rollup/plugin-multi-entry"; +import cjs from "@rollup/plugin-commonjs"; +import replace from "@rollup/plugin-replace"; +import { terser } from "rollup-plugin-terser"; +import sourcemaps from "rollup-plugin-sourcemaps"; +import viz from "rollup-plugin-visualizer"; +import shim from "rollup-plugin-shim"; + +const pkg = require("./package.json"); +const depNames = Object.keys(pkg.dependencies); +const devDepNames = Object.keys(pkg.devDependencies); +const input = "dist-esm/src/index.js"; +const production = process.env.NODE_ENV === "production"; + +export function nodeConfig(test = false) { + const externalNodeBuiltins = ["events", "crypto"]; + const baseConfig = { + input: input, + external: depNames.concat(externalNodeBuiltins), + output: { file: "dist/index.js", format: "cjs", sourcemap: true }, + preserveSymlinks: false, + plugins: [ + sourcemaps(), + replace({ + delimiters: ["", ""], + values: { + // replace dynamic checks with if (true) since this is for node only. + // Allows rollup's dead code elimination to be more aggressive. + "if (isNode)": "if (true)" + } + }), + nodeResolve({ preferBuiltins: true }), + cjs() + ] + }; + + if (test) { + // Entry points - test files under the `test` folder(common for both browser and node), node specific test files + baseConfig.input = ["dist-esm/test/*.spec.js", "dist-esm/test/node/*.spec.js"]; + baseConfig.plugins.unshift(multiEntry({ exports: false })); + + // different output file + baseConfig.output.file = "dist-test/index.node.js"; + + // mark assert as external + baseConfig.external.push("assert", ...devDepNames); + + // Disable tree-shaking of test code. In rollup-plugin-node-resolve@5.0.0, rollup started respecting + // the "sideEffects" field in package.json. Since our package.json sets "sideEffects=false", this also + // applies to test code, which causes all tests to be removed by tree-shaking. + baseConfig.treeshake = false; + } else if (production) { + baseConfig.plugins.push(terser()); + } + + return baseConfig; +} + +export function browserConfig(test = false) { + const baseConfig = { + input: input, + external: ["crypto", "fs-extra"], + output: { + file: "dist-browser/azure-communication-administration.js", + format: "umd", + name: "Azure.Communication.Administration", + sourcemap: true, + globals: { "@azure/core-http": "Azure.Core.HTTP" } + }, + preserveSymlinks: false, + plugins: [ + sourcemaps(), + replace({ + delimiters: ["", ""], + values: { + // replace dynamic checks with if (false) since this is for + // browser only. Rollup's dead code elimination will remove + // any code guarded by if (isNode) { ... } + "if (isNode)": "if (false)" + } + }), + shim({ + constants: `export default {}`, + fs: `export default {}`, + os: `export default {}`, + dotenv: `export function config() { }`, + path: `export default {}` + }), + nodeResolve({ + mainFields: ["module", "browser"], + preferBuiltins: false + }), + cjs({ + namedExports: { + chai: ["assert"], + events: ["EventEmitter"], + "@opentelemetry/api": ["CanonicalCode", "SpanKind", "TraceFlags"] + } + }), + viz({ filename: "dist-browser/browser-stats.html", sourcemap: false }) + ] + }; + + if (test) { + // Entry points - test files under the `test` folder(common for both browser and node), browser specific test files + baseConfig.input = ["dist-esm/test/*.spec.js", "dist-esm/test/browser/*.spec.js"]; + baseConfig.plugins.unshift(multiEntry({ exports: false })); + baseConfig.output.file = "dist-test/index.browser.js"; + + baseConfig.onwarn = (warning) => { + if ( + warning.code === "CIRCULAR_DEPENDENCY" && + warning.importer.indexOf(path.normalize("node_modules/chai/lib") === 0) + ) { + // Chai contains circular references, but they are not fatal and can be ignored. + return; + } + + console.error(`(!) ${warning.message}`); + }; + + // Disable tree-shaking of test code. In rollup-plugin-node-resolve@5.0.0, rollup started respecting + // the "sideEffects" field in package.json. Since our package.json sets "sideEffects=false", this also + // applies to test code, which causes all tests to be removed by tree-shaking. + baseConfig.treeshake = false; + } + + return baseConfig; +} diff --git a/sdk/digitaltwins/digital-twins/rollup.config.js b/sdk/communication/communication-administration/rollup.config.js similarity index 100% rename from sdk/digitaltwins/digital-twins/rollup.config.js rename to sdk/communication/communication-administration/rollup.config.js diff --git a/sdk/formrecognizer/ai-form-recognizer/rollup.test.config.js b/sdk/communication/communication-administration/rollup.test.config.js similarity index 100% rename from sdk/formrecognizer/ai-form-recognizer/rollup.test.config.js rename to sdk/communication/communication-administration/rollup.test.config.js diff --git a/sdk/communication/communication-administration/sample.env b/sdk/communication/communication-administration/sample.env new file mode 100644 index 000000000000..587c69bb3fdf --- /dev/null +++ b/sdk/communication/communication-administration/sample.env @@ -0,0 +1,7 @@ +# Used in most samples. Retrieve these values from a Communication Services resource +# in the Azure Portal. +COMMUNICATION_CONNECTION_STRING="endpoint=;accessKey=" + +# Our tests assume that TEST_MODE is "playback" by default. You can +# change it to "record" to generate new recordings, or "live" to bypass the recorder entirely. +# TEST_MODE=playback diff --git a/sdk/communication/communication-administration/samples/.gitignore b/sdk/communication/communication-administration/samples/.gitignore new file mode 100644 index 000000000000..0c348f50aebf --- /dev/null +++ b/sdk/communication/communication-administration/samples/.gitignore @@ -0,0 +1 @@ +.npmrc \ No newline at end of file diff --git a/sdk/communication/communication-administration/samples/javascript/README.md b/sdk/communication/communication-administration/samples/javascript/README.md new file mode 100644 index 000000000000..7c8af2274fe5 --- /dev/null +++ b/sdk/communication/communication-administration/samples/javascript/README.md @@ -0,0 +1,62 @@ +--- +page_type: sample +languages: + - javascript +products: + - azure + - azure-communication-service + - azure-communication-administration +urlFragment: communication-administration-identity-javascript +--- + +# Azure Communication Service Administration Identity client library sample for JavaScript + +These sample programs show how to use the JavaScript client libraries for Azure Communication Service Administration Identity to issue and refresh tokens. + +| **File Name** | **Description** | +| -------------------------------- | ---------------------------------------------------------------------------------------------------------- | +| [issueToken.js][issuetoken] | uses the CommunicationIdentityClient to create a user and issue a token for this user | +| [revokeTokens.js][= 8.0.0. + +You need [an Azure subscription][freesub] and [an Azure Communication Service Instance][azcomsvc] to run these sample program. + +Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. + +## Setup + +To run the sample using the published version of the package: + +1. Install the dependencies using `npm`: + +```bash +npm install +``` + +2. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. + +3. Run whichever samples you like (note that some samples may require additional setup, see the table above): + +```bash +node issueToken.js +``` + +Alternatively, run a single sample with the correct environment variables set (step 3 is not required if you do this), for example (cross-platform): + +```bash +npx cross-env COMMUNICATION_CONNECTION_STRING="" node issueToken.js +``` + +## Next Steps + +Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. + +[issuetoken]: https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/communication/communication-administration/samples/javascript/issueToken.js +[revoketokens]: https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/communication/communication-administration/samples/javascript/revokeTokens.js +[apiref]: https://docs.microsoft.com/javascript/api/@azure/communication-administration +[azcomsvc]: https://docs.microsoft.com/azure/communication-services/quickstarts/create-communication-resource?tabs=windows&pivots=platform-azp +[freesub]: https://azure.microsoft.com/free/ +[package]: https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/communication/communication-administration/README.md diff --git a/sdk/communication/communication-administration/samples/javascript/issueToken.js b/sdk/communication/communication-administration/samples/javascript/issueToken.js new file mode 100644 index 000000000000..08268cf684fb --- /dev/null +++ b/sdk/communication/communication-administration/samples/javascript/issueToken.js @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * Demonstrates how to use the CommunicationIdentityClient to + * issue a user token. + */ + +const { CommunicationIdentityClient } = require("@azure/communication-administration"); + +// Load the .env file if it exists +const dotenv = require("dotenv"); +dotenv.config(); + +// You will need to set this environment variables or edit the following values +const connectionString = + process.env["COMMUNICATION_CONNECTION_STRING"] || ""; + +async function main() { + console.log("== Issue Token Sample =="); + + const client = new CommunicationIdentityClient(connectionString); + const scopes = ["chat"]; + + // Create user + console.log("Creating User"); + + const user = await client.createUser(); + + console.log(`Created user with id: ${user.communicationUserId}`); + console.log("Issuing Token"); + + // Issue token and get token from response + const { token } = await client.issueToken(user, scopes); + + console.log(`Issued token: ${token}`); +} + +main().catch((error) => { + console.error("Encountered an error while issuing token: "); + console.error("Request: \n", error.request); + console.error("\nResponse: \n", error.response); + console.error(error); +}); diff --git a/sdk/communication/communication-administration/samples/javascript/package.json b/sdk/communication/communication-administration/samples/javascript/package.json new file mode 100644 index 000000000000..268ddee07c85 --- /dev/null +++ b/sdk/communication/communication-administration/samples/javascript/package.json @@ -0,0 +1,29 @@ +{ + "name": "azure-communication-configuration-user-token-samples-js", + "version": "0.1.0", + "description": "Azure Communication Service User Token Management client library samples for JavaScript", + "engine": { + "node": ">=8.0.0" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/Azure/azure-sdk-for-js.git" + }, + "keywords": [ + "Azure", + "Communication", + "Node.js", + "JavaScript" + ], + "author": "Microsoft Corporation", + "license": "MIT", + "bugs": { + "url": "https://github.com/Azure/azure-sdk-for-js/issues" + }, + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/communication/communication-configuration", + "sideEffects": false, + "dependencies": { + "@azure/communication-administration": "latest", + "dotenv": "^8.2.0" + } +} diff --git a/sdk/communication/communication-administration/samples/javascript/revokeTokens.js b/sdk/communication/communication-administration/samples/javascript/revokeTokens.js new file mode 100644 index 000000000000..90b256e4ab6f --- /dev/null +++ b/sdk/communication/communication-administration/samples/javascript/revokeTokens.js @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * Demonstrates how to use the CommunicationIdentityClient to + * revoke a user's tokens. + */ + +const { CommunicationIdentityClient } = require("@azure/communication-administration"); + +// Load the .env file if it exists +const dotenv = require("dotenv"); +dotenv.config(); + +// You will need to set this environment variables or edit the following values +const connectionString = + process.env["COMMUNICATION_CONNECTION_STRING"] || ""; + +async function main() { + console.log("== Issue Token Sample =="); + + const client = new CommunicationIdentityClient(connectionString); + const scopes = ["chat"]; + + // Create user + console.log("Creating User"); + + const user = await client.createUser(); + + console.log(`Created user with id: ${user.communicationUserId}`); + + console.log("Issuing Tokens"); + + // Issue tokens + const { token: token1 } = await client.issueToken(user, scopes); + const { token: token2 } = await client.issueToken(user, scopes); + const { token: token3 } = await client.issueToken(user, scopes); + + console.log("Issued tokens:"); + console.log(token1); + console.log(token2); + console.log(token3); + + // Revoke tokens + console.log("Revoking Tokens"); + + await client.revokeTokens(user, new Date()); + + console.log("Tokens Revoked"); +} + +main().catch((error) => { + console.error("Encountered an error while revoking tokens: "); + console.error("Request: \n", error.request); + console.error("\nResponse: \n", error.response); + console.error(error); +}); diff --git a/sdk/communication/communication-administration/samples/javascript/sample.env b/sdk/communication/communication-administration/samples/javascript/sample.env new file mode 100644 index 000000000000..87b7cca169c9 --- /dev/null +++ b/sdk/communication/communication-administration/samples/javascript/sample.env @@ -0,0 +1,3 @@ +# Used in most samples. Retrieve these values from a Communication Service instance +# in the Azure Portal. +COMMUNICATION_CONNECTION_STRING="endpoint=https://.communication.azure.net/;accessKey=" diff --git a/sdk/communication/communication-administration/samples/tsconfig.json b/sdk/communication/communication-administration/samples/tsconfig.json new file mode 100644 index 000000000000..8c89eac7173a --- /dev/null +++ b/sdk/communication/communication-administration/samples/tsconfig.json @@ -0,0 +1,10 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + "module": "commonjs", + "outDir": "typescript/dist", + "lib": ["DOM", "ES6"] + }, + "include": ["typescript/src/**.ts"], + "exclude": ["typescript/*.json", "**/node_modules/", "../node_modules", "../typings"] +} diff --git a/sdk/communication/communication-administration/samples/typescript/README.md b/sdk/communication/communication-administration/samples/typescript/README.md new file mode 100644 index 000000000000..44ab8bcce8c7 --- /dev/null +++ b/sdk/communication/communication-administration/samples/typescript/README.md @@ -0,0 +1,68 @@ +--- +page_type: sample +languages: + - typescript +products: + - azure + - azure-communication-service + - azure-communication-administration +urlFragment: communication-administration-identity-typescript +--- + +# Azure Communication Service Communication Identity client library sample for TypeScript + +These sample programs show how to use the TypeScript client libraries for Azure Communication Service Communication Identity to issue and refresh tokens. + +| **File Name** | **Description** | +| ------------------------------- | ---------------------------------------------------------------------------------------------------------- | +| [issueToken.ts][issuetoken] | uses the CommunicationIdentityClient to create a user and issue a token for this user | +| [revokeTokens.ts][revoketokens] | uses the CommunicationIdentityClient to create a user, issue tokens for this user, and revoke these tokens | + +## Prerequisites + +The sample is compatible with Node.js >= 8.0.0. + +You need [an Azure subscription][freesub] and [an Azure Communication Service Instance][azcomsvc] to run these sample program. + +Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. + +## Setup + +To run the sample using the published version of the package: + +1. Install the dependencies using `npm`: + +```bash +npm install +``` + +2. Compile the sample + +```bash +npm run build +``` + +3. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. + +4. Run whichever samples you like (note that some samples may require additional setup, see the table above): + +```bash +node dist/issueToken.js +``` + +Alternatively, run a single sample with the correct environment variables set (step 3 is not required if you do this), for example (cross-platform): + +```bash +npx cross-env COMMUNICATION_CONNECTION_STRING="" node dist/issueToken.js +``` + +## Next Steps + +Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. + +[issuetoken]: https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/communication/communication-administration/samples/typescript/src/issueToken.ts +[revoketokens]: https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/communication/communication-administration/samples/typescript/src/revokeTokens.ts +[apiref]: https://docs.microsoft.com/javascript/api/@azure/communication-administration +[azcomsvc]: https://docs.microsoft.com/azure/communication-services/quickstarts/create-communication-resource?tabs=windows&pivots=platform-azp +[freesub]: https://azure.microsoft.com/free/ +[package]: https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/communication/communication-administration/README.md diff --git a/sdk/communication/communication-administration/samples/typescript/package.json b/sdk/communication/communication-administration/samples/typescript/package.json new file mode 100644 index 000000000000..a2a3941de76d --- /dev/null +++ b/sdk/communication/communication-administration/samples/typescript/package.json @@ -0,0 +1,38 @@ +{ + "name": "azure-communication-configuration-user-token-samples-ts", + "version": "0.1.0", + "description": "Azure Communication Service User Token Management client library samples for TypeScript", + "engine": { + "node": ">=8.0.0" + }, + "scripts": { + "build": "tsc", + "prebuild": "rimraf dist/" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/Azure/azure-sdk-for-js.git" + }, + "keywords": [ + "Azure", + "Communication", + "Node.js", + "JavaScript" + ], + "author": "Microsoft Corporation", + "license": "MIT", + "bugs": { + "url": "https://github.com/Azure/azure-sdk-for-js/issues" + }, + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/communication/communication-configuration", + "sideEffects": false, + "dependencies": { + "@azure/communication-administration": "latest", + "dotenv": "^8.2.0" + }, + "devDependencies": { + "@types/node": "^8.0.0", + "rimraf": "^3.0.0", + "typescript": "~3.6.4" + } +} diff --git a/sdk/communication/communication-administration/samples/typescript/sample.env b/sdk/communication/communication-administration/samples/typescript/sample.env new file mode 100644 index 000000000000..87b7cca169c9 --- /dev/null +++ b/sdk/communication/communication-administration/samples/typescript/sample.env @@ -0,0 +1,3 @@ +# Used in most samples. Retrieve these values from a Communication Service instance +# in the Azure Portal. +COMMUNICATION_CONNECTION_STRING="endpoint=https://.communication.azure.net/;accessKey=" diff --git a/sdk/communication/communication-administration/samples/typescript/src/issueToken.ts b/sdk/communication/communication-administration/samples/typescript/src/issueToken.ts new file mode 100644 index 000000000000..d3980b057894 --- /dev/null +++ b/sdk/communication/communication-administration/samples/typescript/src/issueToken.ts @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * Demonstrates how to use the CommunicationIdentityClient to + * issue a new user token. + */ + +import { CommunicationIdentityClient, TokenScope } from "@azure/communication-administration"; + +// Load the .env file if it exists +import * as dotenv from "dotenv"; +dotenv.config(); + +// You will need to set this environment variables or edit the following values +const connectionString = + process.env["COMMUNICATION_CONNECTION_STRING"] || ""; + +export const main = async () => { + console.log("== Issue Token Sample =="); + + const client = new CommunicationIdentityClient(connectionString); + const scopes: TokenScope[] = ["chat"]; + + // Create user + console.log("Creating User"); + + const user = await client.createUser(); + + console.log(`Created user with id: ${user.communicationUserId}`); + console.log("Issuing Token"); + + // Issue token and get token from response + const { token } = await client.issueToken(user, scopes); + + console.log(`Issued token: ${token}`); +}; + +main().catch((error) => { + console.error("Encountered an error while issuing token: "); + console.error("Request: \n", error.request); + console.error("\nResponse: \n", error.response); + console.error(error); +}); diff --git a/sdk/communication/communication-administration/samples/typescript/src/revokeTokens.ts b/sdk/communication/communication-administration/samples/typescript/src/revokeTokens.ts new file mode 100644 index 000000000000..59cf5d0beccf --- /dev/null +++ b/sdk/communication/communication-administration/samples/typescript/src/revokeTokens.ts @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * Demonstrates how to use the CommunicationIdentityClient to + * issue a new user token. + */ + +import { CommunicationIdentityClient } from "@azure/communication-administration"; + +// Load the .env file if it exists +import * as dotenv from "dotenv"; +dotenv.config(); + +// You will need to set this environment variables or edit the following values +const connectionString = + process.env["COMMUNICATION_CONNECTION_STRING"] || ""; + +export const main = async () => { + console.log("== Issue Token Sample =="); + + const client = new CommunicationIdentityClient(connectionString); + + // Create user + console.log("Creating User"); + + const user = await client.createUser(); + + console.log(`Created user with id: ${user.communicationUserId}`); + + console.log("Issuing Tokens"); + + // Issue tokens + const { token: token1 } = await client.issueToken(user, ["chat"]); + const { token: token2 } = await client.issueToken(user, ["pstn"]); + const { token: token3 } = await client.issueToken(user, ["voip"]); + + console.log("Issued tokens:"); + console.log(token1); + console.log(token2); + console.log(token3); + + // Revoke tokens + console.log("Revoking Tokens"); + + await client.revokeTokens(user, new Date()); + + console.log("Tokens Revoked"); +}; + +main().catch((error) => { + console.error("Encountered an error while issuing/refreshing token: "); + console.error("Request: \n", error.request); + console.error("\nResponse: \n", error.response); + console.error(error); +}); diff --git a/sdk/communication/communication-administration/samples/typescript/tsconfig.json b/sdk/communication/communication-administration/samples/typescript/tsconfig.json new file mode 100644 index 000000000000..9e7ca6c9974b --- /dev/null +++ b/sdk/communication/communication-administration/samples/typescript/tsconfig.json @@ -0,0 +1,13 @@ +{ + "compilerOptions": { + "module": "commonjs", + "moduleResolution": "node", + "allowSyntheticDefaultImports": true, + "strict": true, + "alwaysStrict": true, + "outDir": "dist", + "rootDir": "src" + }, + "include": ["src/**.ts"], + "exclude": ["node_modules"] +} diff --git a/sdk/communication/communication-administration/src/common/logger.ts b/sdk/communication/communication-administration/src/common/logger.ts new file mode 100644 index 000000000000..ea6fd2a63671 --- /dev/null +++ b/sdk/communication/communication-administration/src/common/logger.ts @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { createClientLogger } from "@azure/logger"; + +/** + * The @azure/logger configuration for this package. + */ +export const logger = createClientLogger("communication-administration"); diff --git a/sdk/communication/communication-administration/src/common/mappers.ts b/sdk/communication/communication-administration/src/common/mappers.ts new file mode 100644 index 000000000000..52c5be668df3 --- /dev/null +++ b/sdk/communication/communication-administration/src/common/mappers.ts @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { HttpOperationResponse, HttpResponse } from "@azure/core-http"; +import { WithResponse } from ".."; + +/** + * Attach http response to a model + */ +export const attachHttpResponse = ( + model: T, + httpResponse: (HttpResponse & { bodyAsText: string; parsedBody: any }) | HttpOperationResponse +): WithResponse => { + const { parsedBody, bodyAsText, ...r } = httpResponse; + return Object.defineProperty(model, "_response", { + value: r + }); +}; diff --git a/sdk/communication/communication-administration/src/common/models.ts b/sdk/communication/communication-administration/src/common/models.ts new file mode 100644 index 000000000000..539ef1bc6083 --- /dev/null +++ b/sdk/communication/communication-administration/src/common/models.ts @@ -0,0 +1,15 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { HttpResponse } from "@azure/core-http"; + +/** + * Represents an object with a non-enumerable _response property which provides + * information about the HTTP response. + */ +export type WithResponse = T & { _response: HttpResponse }; + +/** + * Represents a generic HTTP response + */ +export type VoidResponse = WithResponse<{}>; diff --git a/sdk/communication/communication-administration/src/common/tracing.ts b/sdk/communication/communication-administration/src/common/tracing.ts new file mode 100644 index 000000000000..bd42a3471fb5 --- /dev/null +++ b/sdk/communication/communication-administration/src/common/tracing.ts @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { OperationOptions } from "@azure/core-http"; +import { getTracer } from "@azure/core-tracing"; +import { Span, SpanOptions, SpanKind } from "@opentelemetry/api"; + +type OperationTracingOptions = OperationOptions["tracingOptions"]; + +/** + * Creates a span using the global tracer. + * @ignore + * @param name The name of the operation being performed. + * @param tracingOptions The options for the underlying http request. + */ +export function createSpan( + operationName: string, + operationOptions: T +): { span: Span; updatedOptions: T } { + const tracer = getTracer(); + const tracingOptions = operationOptions.tracingOptions || {}; + const spanOptions: SpanOptions = { + ...tracingOptions.spanOptions, + kind: SpanKind.INTERNAL + }; + + const span = tracer.startSpan(`Azure.Communication.${operationName}`, spanOptions); + + span.setAttribute("az.namespace", "Microsoft.Communication"); + + let newSpanOptions = tracingOptions.spanOptions || {}; + if (span.isRecording()) { + newSpanOptions = { + ...tracingOptions.spanOptions, + parent: span.context(), + attributes: { + ...spanOptions.attributes, + "az.namespace": "Microsoft.Communication" + } + }; + } + + const newTracingOptions: OperationTracingOptions = { + ...tracingOptions, + spanOptions: newSpanOptions + }; + + const newOperationOptions: T = { + ...operationOptions, + tracingOptions: newTracingOptions + }; + + return { + span, + updatedOptions: newOperationOptions + }; +} diff --git a/sdk/communication/communication-administration/src/communicationIdentity/communicationIdentityClient.ts b/sdk/communication/communication-administration/src/communicationIdentity/communicationIdentityClient.ts new file mode 100644 index 000000000000..ed5869f7f8a1 --- /dev/null +++ b/sdk/communication/communication-administration/src/communicationIdentity/communicationIdentityClient.ts @@ -0,0 +1,237 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { + createCommunicationAccessKeyCredentialPolicy, + parseClientArguments, + isKeyCredential, + CommunicationUser +} from "@azure/communication-common"; +import { KeyCredential } from "@azure/core-auth"; +import { + InternalPipelineOptions, + createPipelineFromOptions, + OperationOptions, + operationOptionsToRequestOptionsBase +} from "@azure/core-http"; +import { CanonicalCode } from "@opentelemetry/api"; +import { GeneratedCommunicationIdentityClient } from "./generated/src/generatedCommunicationIdentityClient"; +import { CommunicationIdentityOperations } from "./generated/src/operations/communicationIdentityOperations"; +import { SDK_VERSION } from "./constants"; +import { logger } from "../common/logger"; +import { createSpan } from "../common/tracing"; +import { + CommunicationIdentityOptions, + TokenScope, + IssueTokenResponse, + CreateUserResponse, + CommunicationUserToken +} from "./models"; +import { VoidResponse } from "../common/models"; +import { attachHttpResponse } from "../common/mappers"; + +const isCommunicationIdentityOptions = (options: any): options is CommunicationIdentityOptions => + options && !isKeyCredential(options); + +/** + * Client class for interacting with Azure Communication Services User Token Management. + */ +export class CommunicationIdentityClient { + /** + * A reference to the auto-generated UserToken HTTP client. + */ + private readonly client: CommunicationIdentityOperations; + + /** + * The base URL to which requests are made + */ + private readonly endpoint: string; + + /** + * Initializes a new instance of the CommunicationIdentity class. + * @param connectionString Connection string to connect to an Azure Communication Service resource. + * Example: "endpoint=https://contoso.eastus.communications.azure.net/;accesskey=secret"; + * @param options Optional. Options to configure the HTTP pipeline. + */ + public constructor(connectionString: string, options?: CommunicationIdentityOptions); + + /** + * Initializes a new instance of the CommunicationIdentity class using an Azure KeyCredential. + * @param url The endpoint of the service (ex: https://contoso.eastus.communications.azure.net). + * @param credential An object that is used to authenticate requests to the service. Use the AzureKeyCredential or `@azure/identity` to create a credential. + * @param options Optional. Options to configure the HTTP pipeline. + */ + public constructor( + url: string, + credential: KeyCredential, + options?: CommunicationIdentityOptions + ); + + /** + * Creates an instance of CommunicationIdentity. + * + * @param {string} url The endpoint to the service + * @param {KeyCredential} credential An object that is used to authenticate requests to the service. Use the AzureKeyCredential or `@azure/identity` to create a credential. + * @param {CommunicationIdentityOptions} [options={}] Options to configure the HTTP pipeline. + */ + public constructor( + connectionStringOrUrl: string, + credentialOrOptions?: KeyCredential | CommunicationIdentityOptions, + maybeOptions: CommunicationIdentityOptions = {} + ) { + const { url, credential } = parseClientArguments(connectionStringOrUrl, credentialOrOptions); + const options = isCommunicationIdentityOptions(credentialOrOptions) + ? credentialOrOptions + : maybeOptions; + const libInfo = `azsdk-js-communication-administration/${SDK_VERSION}`; + + if (!options.userAgentOptions) { + options.userAgentOptions = {}; + } + + if (options.userAgentOptions.userAgentPrefix) { + options.userAgentOptions.userAgentPrefix = `${options.userAgentOptions.userAgentPrefix} ${libInfo}`; + } else { + options.userAgentOptions.userAgentPrefix = libInfo; + } + + const internalPipelineOptions: InternalPipelineOptions = { + ...options, + ...{ + loggingOptions: { + logger: logger.info + } + } + }; + + const authPolicy = createCommunicationAccessKeyCredentialPolicy(credential); + const pipeline = createPipelineFromOptions(internalPipelineOptions, authPolicy); + + this.endpoint = url; + this.client = new GeneratedCommunicationIdentityClient(pipeline).communicationIdentity; + } + + /** + * Creates a scoped user token. + * + * @param {CommunicationUser} user The user whose tokens are being revoked. + * @param {TokenScope[]} scopes Scopes to include in the token. + * @param {OperationOptions} [options={}] Additional options for the request. + */ + public async issueToken( + user: CommunicationUser, + scopes: TokenScope[], + options: OperationOptions = {} + ): Promise { + const { span, updatedOptions } = createSpan("CommunicationIdentity-issueToken", options); + try { + const { token, id, expiresOn, _response } = await this.client.issueToken( + this.endpoint, + user.communicationUserId, + scopes, + { ...operationOptionsToRequestOptionsBase(updatedOptions) } + ); + const results: CommunicationUserToken = { + token, + expiresOn, + user: { communicationUserId: id } + }; + return attachHttpResponse(results, _response); + } catch (e) { + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e.message + }); + throw e; + } finally { + span.end(); + } + } + + /** + * Revokes all data and tokens created for a user. + * + * @param {CommunicationUser} user The user whose tokens are being revoked. + * @param {Date} tokensValidFrom Tokens issued before this time will be revoked. + * @param {OperationOptions} [options={}] Additional options for the request. + */ + public async revokeTokens( + user: CommunicationUser, + tokensValidFrom: Date = new Date(), + options: OperationOptions = {} + ): Promise { + const { span, updatedOptions } = createSpan("CommunicationIdentity-revokeTokens", options); + try { + const { _response } = await this.client.update(this.endpoint, user.communicationUserId, { + tokensValidFrom, + ...operationOptionsToRequestOptionsBase(updatedOptions) + }); + return attachHttpResponse({}, _response); + } catch (e) { + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e.message + }); + throw e; + } finally { + span.end(); + } + } + + /** + * Creates a single user. + * + * @param {OperationOptions} [options={}] Additional options for the request. + */ + public async createUser(options: OperationOptions = {}): Promise { + const { span, updatedOptions } = createSpan("CommunicationIdentity-createUser", options); + try { + const { id, _response } = await this.client.create(this.endpoint, { + ...operationOptionsToRequestOptionsBase(updatedOptions) + }); + const user: CommunicationUser = { communicationUserId: id }; + return attachHttpResponse(user, _response); + } catch (e) { + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e.message + }); + throw e; + } finally { + span.end(); + } + } + + /** + * Triggers revocation event for user and deletes all its data. + * + * @param {CommunicationUser} user The user being deleted. + * @param {OperationOptions} [options={}] Additional options for the request. + */ + public async deleteUser( + user: CommunicationUser, + options: OperationOptions = {} + ): Promise { + const { span, updatedOptions } = createSpan("CommunicationIdentity-deleteUser", options); + try { + const { _response } = await this.client.deleteMethod( + this.endpoint, + user.communicationUserId, + { + ...operationOptionsToRequestOptionsBase(updatedOptions) + } + ); + return attachHttpResponse({}, _response); + } catch (e) { + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e.message + }); + throw e; + } finally { + span.end(); + } + } +} + +export { CommunicationTokenRequest, CommunicationIdentityToken } from "./generated/src/models"; diff --git a/sdk/communication/communication-administration/src/communicationIdentity/constants.ts b/sdk/communication/communication-administration/src/communicationIdentity/constants.ts new file mode 100644 index 000000000000..d95eaa576529 --- /dev/null +++ b/sdk/communication/communication-administration/src/communicationIdentity/constants.ts @@ -0,0 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { apiVersion } from "./generated/src/models/parameters"; + +export const SDK_VERSION: string = apiVersion.mapper.defaultValue; diff --git a/sdk/communication/communication-administration/src/communicationIdentity/generated/src/generatedCommunicationIdentityClient.ts b/sdk/communication/communication-administration/src/communicationIdentity/generated/src/generatedCommunicationIdentityClient.ts new file mode 100644 index 000000000000..c359cfc5a5b5 --- /dev/null +++ b/sdk/communication/communication-administration/src/communicationIdentity/generated/src/generatedCommunicationIdentityClient.ts @@ -0,0 +1,39 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * 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 * as coreHttp from "@azure/core-http"; +import * as Models from "./models"; +import * as Mappers from "./models/mappers"; +import * as operations from "./operations"; +import { GeneratedCommunicationIdentityClientContext } from "./generatedCommunicationIdentityClientContext"; + +class GeneratedCommunicationIdentityClient extends GeneratedCommunicationIdentityClientContext { + // Operation groups + communicationIdentity: operations.CommunicationIdentityOperations; + + /** + * Initializes a new instance of the GeneratedCommunicationIdentityClient class. + * @param [options] The parameter options + */ + constructor(options?: coreHttp.ServiceClientOptions) { + super(options); + this.communicationIdentity = new operations.CommunicationIdentityOperations(this); + } +} + +// Operation Specifications + +export { + GeneratedCommunicationIdentityClient, + GeneratedCommunicationIdentityClientContext, + Models as GeneratedCommunicationIdentityModels, + Mappers as GeneratedCommunicationIdentityMappers +}; +export * from "./operations"; diff --git a/sdk/communication/communication-administration/src/communicationIdentity/generated/src/generatedCommunicationIdentityClientContext.ts b/sdk/communication/communication-administration/src/communicationIdentity/generated/src/generatedCommunicationIdentityClientContext.ts new file mode 100644 index 000000000000..9152ad2a290a --- /dev/null +++ b/sdk/communication/communication-administration/src/communicationIdentity/generated/src/generatedCommunicationIdentityClientContext.ts @@ -0,0 +1,36 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * 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 * as coreHttp from "@azure/core-http"; + +const packageName = "azure-communication-administration-identity"; +const packageVersion = "1.0.0-beta.3"; + +export class GeneratedCommunicationIdentityClientContext extends coreHttp.ServiceClient { + /** + * Initializes a new instance of the GeneratedCommunicationIdentityClientContext class. + * @param [options] The parameter options + */ + constructor(options?: coreHttp.ServiceClientOptions) { + if (!options) { + options = {}; + } + + if (!options.userAgent) { + const defaultUserAgent = coreHttp.getDefaultUserAgentValue(); + options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`; + } + + super(undefined, options); + + this.baseUri = "{endpoint}"; + this.requestContentType = "application/json; charset=utf-8"; + } +} diff --git a/sdk/communication/communication-administration/src/communicationIdentity/generated/src/models/communicationIdentityOperationsMappers.ts b/sdk/communication/communication-administration/src/communicationIdentity/generated/src/models/communicationIdentityOperationsMappers.ts new file mode 100644 index 000000000000..36b7cd50c0b3 --- /dev/null +++ b/sdk/communication/communication-administration/src/communicationIdentity/generated/src/models/communicationIdentityOperationsMappers.ts @@ -0,0 +1,14 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + CommunicationIdentity, + CommunicationIdentityToken, + CommunicationIdentityUpdateRequest, + CommunicationTokenRequest +} from "../models/mappers"; diff --git a/sdk/communication/communication-administration/src/communicationIdentity/generated/src/models/index.ts b/sdk/communication/communication-administration/src/communicationIdentity/generated/src/models/index.ts new file mode 100644 index 000000000000..86d8f18d964b --- /dev/null +++ b/sdk/communication/communication-administration/src/communicationIdentity/generated/src/models/index.ts @@ -0,0 +1,107 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for 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 * as coreHttp from "@azure/core-http"; + +/** + * A communication identity. + */ +export interface CommunicationIdentity { + /** + * Identifier of the identity. + */ + id: string; +} + +/** + * An interface representing CommunicationIdentityUpdateRequest. + */ +export interface CommunicationIdentityUpdateRequest { + /** + * All tokens that are issued prior to this time will be revoked. + */ + tokensValidFrom?: Date; +} + +/** + * An interface representing CommunicationTokenRequest. + */ +export interface CommunicationTokenRequest { + /** + * List of scopes attached to the token. + */ + scopes: string[]; +} + +/** + * An interface representing CommunicationIdentityToken. + */ +export interface CommunicationIdentityToken { + /** + * Identifier of the identity owning the token. + */ + id: string; + /** + * The token issued for the identity. + */ + token: string; + /** + * The expiry time of the token. + */ + expiresOn: Date; +} + +/** + * Optional Parameters. + */ +export interface CommunicationIdentityUpdateOptionalParams extends coreHttp.RequestOptionsBase { + /** + * All tokens that are issued prior to this time will be revoked. + */ + tokensValidFrom?: Date; +} + +/** + * Contains response data for the create operation. + */ +export type CommunicationIdentityCreateResponse = CommunicationIdentity & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: CommunicationIdentity; + }; +}; + +/** + * Contains response data for the issueToken operation. + */ +export type CommunicationIdentityIssueTokenResponse = CommunicationIdentityToken & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: CommunicationIdentityToken; + }; +}; diff --git a/sdk/communication/communication-administration/src/communicationIdentity/generated/src/models/mappers.ts b/sdk/communication/communication-administration/src/communicationIdentity/generated/src/models/mappers.ts new file mode 100644 index 000000000000..dbcc264adfac --- /dev/null +++ b/sdk/communication/communication-administration/src/communicationIdentity/generated/src/models/mappers.ts @@ -0,0 +1,95 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for 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 * as coreHttp from "@azure/core-http"; + +export const CommunicationIdentity: coreHttp.CompositeMapper = { + serializedName: "CommunicationIdentity", + type: { + name: "Composite", + className: "CommunicationIdentity", + modelProperties: { + id: { + required: true, + serializedName: "id", + type: { + name: "String" + } + } + } + } +}; + +export const CommunicationIdentityUpdateRequest: coreHttp.CompositeMapper = { + serializedName: "CommunicationIdentityUpdateRequest", + type: { + name: "Composite", + className: "CommunicationIdentityUpdateRequest", + modelProperties: { + tokensValidFrom: { + serializedName: "tokensValidFrom", + type: { + name: "DateTime" + } + } + } + } +}; + +export const CommunicationTokenRequest: coreHttp.CompositeMapper = { + serializedName: "CommunicationTokenRequest", + type: { + name: "Composite", + className: "CommunicationTokenRequest", + modelProperties: { + scopes: { + required: true, + serializedName: "scopes", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const CommunicationIdentityToken: coreHttp.CompositeMapper = { + serializedName: "CommunicationIdentityToken", + type: { + name: "Composite", + className: "CommunicationIdentityToken", + modelProperties: { + id: { + required: true, + serializedName: "id", + type: { + name: "String" + } + }, + token: { + required: true, + serializedName: "token", + type: { + name: "String" + } + }, + expiresOn: { + required: true, + serializedName: "expiresOn", + type: { + name: "DateTime" + } + } + } + } +}; diff --git a/sdk/communication/communication-administration/src/communicationIdentity/generated/src/models/parameters.ts b/sdk/communication/communication-administration/src/communicationIdentity/generated/src/models/parameters.ts new file mode 100644 index 000000000000..f7ac50fdfb24 --- /dev/null +++ b/sdk/communication/communication-administration/src/communicationIdentity/generated/src/models/parameters.ts @@ -0,0 +1,46 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * 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 * as coreHttp from "@azure/core-http"; + +export const apiVersion: coreHttp.OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + required: true, + isConstant: true, + serializedName: "api-version", + defaultValue: "2020-07-20-preview2", + type: { + name: "String" + } + } +}; +export const endpoint: coreHttp.OperationURLParameter = { + parameterPath: "endpoint", + mapper: { + required: true, + serializedName: "endpoint", + defaultValue: "", + type: { + name: "String" + } + }, + skipEncoding: true +}; +export const id: coreHttp.OperationURLParameter = { + parameterPath: "id", + mapper: { + required: true, + serializedName: "id", + type: { + name: "String" + } + } +}; diff --git a/sdk/communication/communication-administration/src/communicationIdentity/generated/src/operations/communicationIdentityOperations.ts b/sdk/communication/communication-administration/src/communicationIdentity/generated/src/operations/communicationIdentityOperations.ts new file mode 100644 index 000000000000..a033787129b6 --- /dev/null +++ b/sdk/communication/communication-administration/src/communicationIdentity/generated/src/operations/communicationIdentityOperations.ts @@ -0,0 +1,296 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * 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 * as coreHttp from "@azure/core-http"; +import * as Models from "../models"; +import * as Mappers from "../models/communicationIdentityOperationsMappers"; +import * as Parameters from "../models/parameters"; +import { GeneratedCommunicationIdentityClientContext } from "../generatedCommunicationIdentityClientContext"; + +/** Class representing a CommunicationIdentityOperations. */ +export class CommunicationIdentityOperations { + private readonly client: GeneratedCommunicationIdentityClientContext; + + /** + * Create a CommunicationIdentityOperations. + * @param {GeneratedCommunicationIdentityClientContext} client Reference to the service client. + */ + constructor(client: GeneratedCommunicationIdentityClientContext) { + this.client = client; + } + + /** + * @summary Create a new identity. + * @param endpoint Auth and Identity endpoint + * @param [options] The optional parameters + * @returns Promise + */ + create( + endpoint: string, + options?: coreHttp.RequestOptionsBase + ): Promise; + /** + * @param endpoint Auth and Identity endpoint + * @param callback The callback + */ + create(endpoint: string, callback: coreHttp.ServiceCallback): void; + /** + * @param endpoint Auth and Identity endpoint + * @param options The optional parameters + * @param callback The callback + */ + create( + endpoint: string, + options: coreHttp.RequestOptionsBase, + callback: coreHttp.ServiceCallback + ): void; + create( + endpoint: string, + options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, + callback?: coreHttp.ServiceCallback + ): Promise { + return this.client.sendOperationRequest( + { + endpoint, + options + }, + createOperationSpec, + callback + ) as Promise; + } + + /** + * @summary Delete the identity, revoke all tokens of the identity and delete all associated data. + * @param endpoint Auth and Identity endpoint + * @param id Identifier of the identity to be deleted. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod( + endpoint: string, + id: string, + options?: coreHttp.RequestOptionsBase + ): Promise; + /** + * @param endpoint Auth and Identity endpoint + * @param id Identifier of the identity to be deleted. + * @param callback The callback + */ + deleteMethod(endpoint: string, id: string, callback: coreHttp.ServiceCallback): void; + /** + * @param endpoint Auth and Identity endpoint + * @param id Identifier of the identity to be deleted. + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod( + endpoint: string, + id: string, + options: coreHttp.RequestOptionsBase, + callback: coreHttp.ServiceCallback + ): void; + deleteMethod( + endpoint: string, + id: string, + options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, + callback?: coreHttp.ServiceCallback + ): Promise { + return this.client.sendOperationRequest( + { + endpoint, + id, + options + }, + deleteMethodOperationSpec, + callback + ); + } + + /** + * @summary Update an Identity. + * @param endpoint Auth and Identity endpoint + * @param id Identifier of the identity. + * @param [options] The optional parameters + * @returns Promise + */ + update( + endpoint: string, + id: string, + options?: Models.CommunicationIdentityUpdateOptionalParams + ): Promise; + /** + * @param endpoint Auth and Identity endpoint + * @param id Identifier of the identity. + * @param callback The callback + */ + update(endpoint: string, id: string, callback: coreHttp.ServiceCallback): void; + /** + * @param endpoint Auth and Identity endpoint + * @param id Identifier of the identity. + * @param options The optional parameters + * @param callback The callback + */ + update( + endpoint: string, + id: string, + options: Models.CommunicationIdentityUpdateOptionalParams, + callback: coreHttp.ServiceCallback + ): void; + update( + endpoint: string, + id: string, + options?: Models.CommunicationIdentityUpdateOptionalParams | coreHttp.ServiceCallback, + callback?: coreHttp.ServiceCallback + ): Promise { + return this.client.sendOperationRequest( + { + endpoint, + id, + options + }, + updateOperationSpec, + callback + ); + } + + /** + * @summary Generate a new token for an identity. + * @param endpoint Auth and Identity endpoint + * @param id Identifier of the identity to issue token for. + * @param scopes List of scopes attached to the token. + * @param [options] The optional parameters + * @returns Promise + */ + issueToken( + endpoint: string, + id: string, + scopes: string[], + options?: coreHttp.RequestOptionsBase + ): Promise; + /** + * @param endpoint Auth and Identity endpoint + * @param id Identifier of the identity to issue token for. + * @param scopes List of scopes attached to the token. + * @param callback The callback + */ + issueToken( + endpoint: string, + id: string, + scopes: string[], + callback: coreHttp.ServiceCallback + ): void; + /** + * @param endpoint Auth and Identity endpoint + * @param id Identifier of the identity to issue token for. + * @param scopes List of scopes attached to the token. + * @param options The optional parameters + * @param callback The callback + */ + issueToken( + endpoint: string, + id: string, + scopes: string[], + options: coreHttp.RequestOptionsBase, + callback: coreHttp.ServiceCallback + ): void; + issueToken( + endpoint: string, + id: string, + scopes: string[], + options?: + | coreHttp.RequestOptionsBase + | coreHttp.ServiceCallback, + callback?: coreHttp.ServiceCallback + ): Promise { + return this.client.sendOperationRequest( + { + endpoint, + id, + scopes, + options + }, + issueTokenOperationSpec, + callback + ) as Promise; + } +} + +// Operation Specifications +const serializer = new coreHttp.Serializer(Mappers); +const createOperationSpec: coreHttp.OperationSpec = { + httpMethod: "POST", + path: "identities", + urlParameters: [Parameters.endpoint], + queryParameters: [Parameters.apiVersion], + responses: { + 200: { + bodyMapper: Mappers.CommunicationIdentity + }, + default: {} + }, + serializer +}; + +const deleteMethodOperationSpec: coreHttp.OperationSpec = { + httpMethod: "DELETE", + path: "identities/{id}", + urlParameters: [Parameters.endpoint, Parameters.id], + queryParameters: [Parameters.apiVersion], + responses: { + 204: {}, + default: {} + }, + serializer +}; + +const updateOperationSpec: coreHttp.OperationSpec = { + httpMethod: "PATCH", + path: "identities/{id}", + urlParameters: [Parameters.endpoint, Parameters.id], + queryParameters: [Parameters.apiVersion], + requestBody: { + parameterPath: { + tokensValidFrom: ["options", "tokensValidFrom"] + }, + mapper: { + ...Mappers.CommunicationIdentityUpdateRequest, + required: true + } + }, + contentType: "application/merge-patch+json", + responses: { + 204: {}, + default: {} + }, + serializer +}; + +const issueTokenOperationSpec: coreHttp.OperationSpec = { + httpMethod: "POST", + path: "identities/{id}/token", + urlParameters: [Parameters.endpoint, Parameters.id], + queryParameters: [Parameters.apiVersion], + requestBody: { + parameterPath: { + scopes: "scopes" + }, + mapper: { + ...Mappers.CommunicationTokenRequest, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.CommunicationIdentityToken + }, + default: {} + }, + serializer +}; diff --git a/sdk/communication/communication-administration/src/communicationIdentity/generated/src/operations/index.ts b/sdk/communication/communication-administration/src/communicationIdentity/generated/src/operations/index.ts new file mode 100644 index 000000000000..bda865874f7c --- /dev/null +++ b/sdk/communication/communication-administration/src/communicationIdentity/generated/src/operations/index.ts @@ -0,0 +1,11 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export * from "./communicationIdentityOperations"; diff --git a/sdk/communication/communication-administration/src/communicationIdentity/models.ts b/sdk/communication/communication-administration/src/communicationIdentity/models.ts new file mode 100644 index 000000000000..f21babf19491 --- /dev/null +++ b/sdk/communication/communication-administration/src/communicationIdentity/models.ts @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { PipelineOptions } from "@azure/core-http"; +import { CommunicationUser } from "@azure/communication-common"; +import { CommunicationIdentityToken } from "./generated/src/models"; +import { WithResponse } from "../common/models"; + +/** + * Represents the scope of the token. + */ +export type TokenScope = "chat" | "voip" | "pstn"; + +/** + * Client options used to configure the CommunicationIdentity API requests. + */ +export interface CommunicationIdentityOptions extends PipelineOptions {} + +/** + * The issued token and the user it was issued for. + */ +export interface CommunicationUserToken + extends Pick { + /** + * Represents the user the token was issued for + */ + user: CommunicationUser; +} + +/** + * Represents the response from creating a user + */ +export type CreateUserResponse = WithResponse; + +/** + * Represents the response from issuing a token + */ +export type IssueTokenResponse = WithResponse; diff --git a/sdk/communication/communication-administration/src/index.ts b/sdk/communication/communication-administration/src/index.ts new file mode 100644 index 000000000000..47b5b0763e30 --- /dev/null +++ b/sdk/communication/communication-administration/src/index.ts @@ -0,0 +1,14 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +export * from "./common/models"; +export * from "./communicationIdentity/communicationIdentityClient"; +export * from "./communicationIdentity/models"; +export * from "./phoneNumber/phoneNumberAdministrationClient"; +export * from "./phoneNumber/models"; +export { + PhoneNumberPollerOptionsBase, + BeginPurchaseReservationOptions, + BeginReleasePhoneNumbersOptions, + BeginReservePhoneNumbersOptions +} from "./phoneNumber/lroModels"; diff --git a/sdk/communication/communication-administration/src/phoneNumber/constants.ts b/sdk/communication/communication-administration/src/phoneNumber/constants.ts new file mode 100644 index 000000000000..d95eaa576529 --- /dev/null +++ b/sdk/communication/communication-administration/src/phoneNumber/constants.ts @@ -0,0 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { apiVersion } from "./generated/src/models/parameters"; + +export const SDK_VERSION: string = apiVersion.mapper.defaultValue; diff --git a/sdk/communication/communication-administration/src/phoneNumber/generated/src/models/index.ts b/sdk/communication/communication-administration/src/phoneNumber/generated/src/models/index.ts new file mode 100644 index 000000000000..9df45cbe16d2 --- /dev/null +++ b/sdk/communication/communication-administration/src/phoneNumber/generated/src/models/index.ts @@ -0,0 +1,1209 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for 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 * as coreHttp from "@azure/core-http"; + +/** + * Represents an acquired phone number. + */ +export interface AcquiredPhoneNumber { + /** + * String of the E.164 format of the phone number + */ + phoneNumber: string; + /** + * The set of all acquired capabilities of the phone number. + */ + acquiredCapabilities: Capability[]; + /** + * The set of all available capabilities that can be acquired for this phone number. + */ + availableCapabilities: Capability[]; + /** + * The assignment status of the phone number. Conveys what type of entity the number is assigned + * to. Possible values include: 'Unassigned', 'Unknown', 'UserAssigned', 'ConferenceAssigned', + * 'FirstPartyAppAssigned', 'ThirdPartyAppAssigned' + */ + assignmentStatus?: AssignmentStatus; + /** + * The name of the place of the phone number. + */ + placeName?: string; + /** + * The activation state of the phone number. Can be "Activated", "AssignmentPending", + * "AssignmentFailed", "UpdatePending", "UpdateFailed". Possible values include: 'Activated', + * 'AssignmentPending', 'AssignmentFailed', 'UpdatePending', 'UpdateFailed' + */ + activationState?: ActivationState; +} + +/** + * A wrapper of list of phone numbers + */ +export interface AcquiredPhoneNumbers { + /** + * Represents a list of phone numbers + */ + phoneNumbers?: AcquiredPhoneNumber[]; + /** + * Represents the URL link to the next page + */ + nextLink?: string; +} + +/** + * Represents a service error response body. + */ +export interface ErrorBody { + /** + * The error code in the error response. + */ + code?: string; + /** + * The error message in the error response. + */ + message?: string; +} + +/** + * Represents a service error response. + */ +export interface ErrorResponse { + error?: ErrorBody; +} + +/** + * Represents a location options parameter, used for fetching area codes. + */ +export interface LocationOptionsQuery { + /** + * Represents the location option label id, returned from the GetLocationOptions API. + */ + labelId?: string; + /** + * Represents the location options value, returned from the GetLocationOptions API. + */ + optionsValue?: string; +} + +/** + * Represents a list of location option queries, used for fetching area codes. + */ +export interface LocationOptionsQueries { + /** + * Represents the underlying list of countries. + */ + locationOptions?: LocationOptionsQuery[]; +} + +/** + * Represents a list of area codes. + */ +export interface AreaCodes { + /** + * Represents the list of primary area codes. + */ + primaryAreaCodes?: string[]; + /** + * Represents the list of secondary area codes. + */ + secondaryAreaCodes?: string[]; + /** + * Represents the URL link to the next page + */ + nextLink?: string; +} + +/** + * Represents an individual number capabilities update request + */ +export interface NumberUpdateCapabilities { + /** + * Capabilities to be added to a phone number + */ + add?: Capability[]; + /** + * Capabilities to be removed from a phone number + */ + remove?: Capability[]; +} + +/** + * Response for getting a phone number update capabilities. + */ +export interface UpdatePhoneNumberCapabilitiesResponse { + /** + * The id of the phone number capabilities update + */ + capabilitiesUpdateId?: string; + /** + * The time the capabilities update was created + */ + createdAt?: Date; + /** + * Status of the capabilities update. Possible values include: 'Pending', 'InProgress', + * 'Complete', 'Error' + */ + capabilitiesUpdateStatus?: CapabilitiesUpdateStatus; + /** + * The capabilities update for each of a set of phone numbers. + */ + phoneNumberCapabilitiesUpdates?: { [propertyName: string]: NumberUpdateCapabilities }; +} + +/** + * Represents a numbers capabilities update request + */ +export interface UpdateNumberCapabilitiesRequest { + /** + * The map of phone numbers to the capabilities update applied to the phone number. + */ + phoneNumberCapabilitiesUpdate: { [propertyName: string]: NumberUpdateCapabilities }; +} + +/** + * Represents a number capability update response. + */ +export interface UpdateNumberCapabilitiesResponse { + /** + * The capabilities id + */ + capabilitiesUpdateId: string; +} + +/** + * Represents a country. + */ +export interface PhoneNumberCountry { + /** + * Represents the name of the country. + */ + localizedName: string; + /** + * Represents the abbreviated name of the country. + */ + countryCode: string; +} + +/** + * Represents a wrapper around a list of countries. + */ +export interface PhoneNumberCountries { + /** + * Represents the underlying list of countries. + */ + countries?: PhoneNumberCountry[]; + /** + * Represents the URL link to the next page + */ + nextLink?: string; +} + +/** + * The phone number wrapper representing a number configuration request + */ +export interface NumberConfigurationPhoneNumber { + /** + * The phone number in the E.164 format + */ + phoneNumber: string; +} + +/** + * Definition for pstn number configuration + */ +export interface PstnConfiguration { + /** + * The webhook URL on the phone number configuration. + */ + callbackUrl: string; + /** + * The application id of the application to which to configure + */ + applicationId?: string; +} + +/** + * Definition for number configuration + */ +export interface NumberConfigurationResponse { + pstnConfiguration: PstnConfiguration; +} + +/** + * Definition for number configuration + */ +export interface NumberConfiguration { + pstnConfiguration: PstnConfiguration; + /** + * The phone number to configure + */ + phoneNumber: string; +} + +/** + * Represents carrier details. + */ +export interface CarrierDetails { + /** + * Name of carrier details + */ + name?: string; + /** + * Display name of carrier details + */ + localizedName?: string; +} + +/** + * Represents a wrapper of rate information + */ +export interface RateInformation { + /** + * The monthly rate of a phone plan group + */ + monthlyRate?: number; + /** + * The currency of a phone plan group. Possible values include: 'USD' + */ + currencyType?: CurrencyType; + /** + * The error code of a phone plan group + */ + rateErrorMessage?: string; +} + +/** + * Represents a plan group. + */ +export interface PhonePlanGroup { + /** + * The id of the plan group + */ + phonePlanGroupId: string; + /** + * The phone number type of the plan group. Possible values include: 'Unknown', 'Geographic', + * 'TollFree', 'Indirect' + */ + phoneNumberType?: PhoneNumberType; + /** + * The name of the plan group. + */ + localizedName: string; + /** + * The description of the plan group. + */ + localizedDescription: string; + carrierDetails?: CarrierDetails; + rateInformation?: RateInformation; +} + +/** + * Represents a wrapper of list of plan groups. + */ +export interface PhonePlanGroups { + /** + * The underlying list of phone plan groups. + */ + phonePlanGroups?: PhonePlanGroup[]; + /** + * Represents the URL link to the next page + */ + nextLink?: string; +} + +/** + * Represents a phone plan. + */ +export interface PhonePlan { + /** + * The phone plan id + */ + phonePlanId: string; + /** + * The name of the phone plan + */ + localizedName: string; + /** + * The location type of the phone plan. Possible values include: 'CivicAddress', 'NotRequired', + * 'Selection' + */ + locationType: LocationType; + /** + * The list of available area codes in the phone plan. + */ + areaCodes?: string[]; + /** + * Capabilities of the phone plan. + */ + capabilities?: Capability[]; + /** + * The maximum number of phone numbers one can acquire in a search in this phone plan. + */ + maximumSearchSize?: number; +} + +/** + * Represents a wrapper around a list of countries. + */ +export interface PhonePlansResponse { + /** + * Represents the underlying list of phone plans. + */ + phonePlans?: PhonePlan[]; + /** + * Represents the URL link to the next page + */ + nextLink?: string; +} + +/** + * Represents a location options. + */ +export interface LocationOptions { + /** + * The label id of the location. + */ + labelId?: string; + /** + * The display name of the location. + */ + labelName?: string; + /** + * The underlying location option details. + */ + options?: LocationOptionsDetails[]; +} + +/** + * Represents location options details. + */ +export interface LocationOptionsDetails { + /** + * The name of the location options + */ + name?: string; + /** + * The abbreviated name of the location options + */ + value?: string; + /** + * The underlying location options + */ + locationOptions?: LocationOptions[]; +} + +/** + * Represents a wrapper around a list of location options. + */ +export interface LocationOptionsResponse { + locationOptions?: LocationOptions; +} + +/** + * An interface representing PhoneNumberReleaseDetails. + */ +export interface PhoneNumberReleaseDetails { + /** + * The release status of a phone number. Possible values include: 'Pending', 'Success', 'Error', + * 'InProgress' + */ + status?: PhoneNumberReleaseStatus; + /** + * The error code in the case the status is error. + */ + errorCode?: number; +} + +/** + * Represents a release + */ +export interface PhoneNumberRelease { + /** + * The id of the release. + */ + releaseId?: string; + /** + * The creation time of the release. + */ + createdAt?: Date; + /** + * The release status. Possible values include: 'Pending', 'InProgress', 'Complete', 'Failed', + * 'Expired' + */ + status?: ReleaseStatus; + /** + * The underlying error message of a release. + */ + errorMessage?: string; + /** + * The list of phone numbers in the release, mapped to its individual statuses. + */ + phoneNumberReleaseStatusDetails?: { [propertyName: string]: PhoneNumberReleaseDetails }; +} + +/** + * Represents a release request. + */ +export interface ReleaseRequest { + /** + * The list of phone numbers in the release request. + */ + phoneNumbers: string[]; +} + +/** + * Represents a release response. + */ +export interface ReleaseResponse { + /** + * The release id of a created release. + */ + releaseId: string; +} + +/** + * Represents a phone number entity, as part of the response when calling get all searches or + * releases. + */ +export interface PhoneNumberEntity { + /** + * The id of the entity. It is the search id of a search. It is the release id of a release. + */ + id?: string; + /** + * Date and time the entity is created. + */ + createdAt?: Date; + /** + * Name of the entity. + */ + displayName?: string; + /** + * Quantity of requested phone numbers in the entity. + */ + quantity?: number; + /** + * Quantity of acquired phone numbers in the entity. + */ + quantityObtained?: number; + /** + * Status of the entity. + */ + status?: string; + /** + * The Firm Order Confirmation date of the phone number entity. + */ + focDate?: Date; +} + +/** + * Represents a list of searches or releases, as part of the response when fetching all searches or + * releases. + */ +export interface PhoneNumberEntities { + /** + * The underlying list of entities. + */ + entities?: PhoneNumberEntity[]; + /** + * Represents the URL link to the next page + */ + nextLink?: string; +} + +/** + * Represents a search creation option. + */ +export interface CreateSearchOptions { + /** + * Display name of the search. + */ + displayName: string; + /** + * Description of the search. + */ + description: string; + /** + * The plan subtype ids from which to create the search. + */ + phonePlanIds: string[]; + /** + * The area code from which to create the search. + */ + areaCode: string; + /** + * The quantity of phone numbers to request. + */ + quantity?: number; + /** + * The location options of the search. + */ + locationOptions?: LocationOptionsDetails[]; +} + +/** + * Represents a search creation response. + */ +export interface CreateSearchResponse { + /** + * The search id of the search that was created. + */ + searchId: string; +} + +/** + * Represents a phone number search + */ +export interface PhoneNumberReservation { + /** + * The id of the search. + */ + reservationId?: string; + /** + * The name of the search. + */ + displayName?: string; + /** + * The creation time of the search. + */ + createdAt?: Date; + /** + * The description of the search. + */ + description?: string; + /** + * The phone plan ids of the search. + */ + phonePlanIds?: string[]; + /** + * The area code of the search. + */ + areaCode?: string; + /** + * The quantity of phone numbers in the search. + */ + quantity?: number; + /** + * The location options of the search. + */ + locationOptions?: LocationOptionsDetails[]; + /** + * The status of the search. Possible values include: 'Pending', 'InProgress', 'Reserved', + * 'Expired', 'Expiring', 'Completing', 'Refreshing', 'Success', 'Manual', 'Cancelled', + * 'Cancelling', 'Error', 'PurchasePending' + */ + status?: SearchStatus; + /** + * The list of phone numbers in the search, in the case the status is reserved or success. + */ + phoneNumbers?: string[]; + /** + * The date that search expires and the numbers become available. + */ + reservationExpiryDate?: Date; + /** + * The error code of the search. + */ + errorCode?: number; +} + +/** + * Optional Parameters. + */ +export interface PhoneNumberAdministrationGetAllPhoneNumbersOptionalParams + extends coreHttp.RequestOptionsBase { + /** + * A language-locale pairing which will be used to localize the names of countries. Default + * value: 'en-US'. + */ + locale?: string; + /** + * An optional parameter for how many entries to skip, for pagination purposes. Default value: 0. + */ + skip?: number; + /** + * An optional parameter for how many entries to return, for pagination purposes. Default value: + * 100. + */ + take?: number; +} + +/** + * Optional Parameters. + */ +export interface PhoneNumberAdministrationGetAllAreaCodesOptionalParams + extends coreHttp.RequestOptionsBase { + /** + * Represents the underlying list of countries. + */ + locationOptions?: LocationOptionsQuery[]; +} + +/** + * Optional Parameters. + */ +export interface PhoneNumberAdministrationGetAllSupportedCountriesOptionalParams + extends coreHttp.RequestOptionsBase { + /** + * A language-locale pairing which will be used to localize the names of countries. Default + * value: 'en-US'. + */ + locale?: string; + /** + * An optional parameter for how many entries to skip, for pagination purposes. Default value: 0. + */ + skip?: number; + /** + * An optional parameter for how many entries to return, for pagination purposes. Default value: + * 100. + */ + take?: number; +} + +/** + * Optional Parameters. + */ +export interface PhoneNumberAdministrationGetPhonePlanGroupsOptionalParams + extends coreHttp.RequestOptionsBase { + /** + * A language-locale pairing which will be used to localize the names of countries. Default + * value: 'en-US'. + */ + locale?: string; + /** + * Default value: false. + */ + includeRateInformation?: boolean; + /** + * An optional parameter for how many entries to skip, for pagination purposes. Default value: 0. + */ + skip?: number; + /** + * An optional parameter for how many entries to return, for pagination purposes. Default value: + * 100. + */ + take?: number; +} + +/** + * Optional Parameters. + */ +export interface PhoneNumberAdministrationGetPhonePlansOptionalParams + extends coreHttp.RequestOptionsBase { + /** + * A language-locale pairing which will be used to localize the names of countries. Default + * value: 'en-US'. + */ + locale?: string; + /** + * An optional parameter for how many entries to skip, for pagination purposes. Default value: 0. + */ + skip?: number; + /** + * An optional parameter for how many entries to return, for pagination purposes. Default value: + * 100. + */ + take?: number; +} + +/** + * Optional Parameters. + */ +export interface PhoneNumberAdministrationGetPhonePlanLocationOptionsOptionalParams + extends coreHttp.RequestOptionsBase { + /** + * A language-locale pairing which will be used to localize the names of countries. Default + * value: 'en-US'. + */ + locale?: string; +} + +/** + * Optional Parameters. + */ +export interface PhoneNumberAdministrationGetAllReleasesOptionalParams + extends coreHttp.RequestOptionsBase { + /** + * An optional parameter for how many entries to skip, for pagination purposes. Default value: 0. + */ + skip?: number; + /** + * An optional parameter for how many entries to return, for pagination purposes. Default value: + * 100. + */ + take?: number; +} + +/** + * Optional Parameters. + */ +export interface PhoneNumberAdministrationCreateSearchOptionalParams + extends coreHttp.RequestOptionsBase { + /** + * The quantity of phone numbers to request. + */ + quantity?: number; + /** + * The location options of the search. + */ + locationOptions?: LocationOptionsDetails[]; +} + +/** + * Optional Parameters. + */ +export interface PhoneNumberAdministrationGetAllSearchesOptionalParams + extends coreHttp.RequestOptionsBase { + /** + * An optional parameter for how many entries to skip, for pagination purposes. Default value: 0. + */ + skip?: number; + /** + * An optional parameter for how many entries to return, for pagination purposes. Default value: + * 100. + */ + take?: number; +} + +/** + * Defines values for Capability. + * Possible values include: 'UserAssignment', 'FirstPartyVoiceAppAssignment', + * 'ConferenceAssignment', 'P2PSmsEnabled', 'Geographic', 'NonGeographic', 'TollCalling', + * 'TollFreeCalling', 'Premium', 'P2PSmsCapable', 'A2PSmsCapable', 'A2PSmsEnabled', 'Calling', + * 'TollFree', 'FirstPartyAppAssignment', 'ThirdPartyAppAssignment', 'Azure', 'Office365', + * 'InboundCalling', 'OutboundCalling', 'InboundA2PSms', 'OutboundA2PSms', 'InboundP2PSms', + * 'OutboundP2PSms' + * @readonly + * @enum {string} + */ +export type Capability = + | "UserAssignment" + | "FirstPartyVoiceAppAssignment" + | "ConferenceAssignment" + | "P2PSmsEnabled" + | "Geographic" + | "NonGeographic" + | "TollCalling" + | "TollFreeCalling" + | "Premium" + | "P2PSmsCapable" + | "A2PSmsCapable" + | "A2PSmsEnabled" + | "Calling" + | "TollFree" + | "FirstPartyAppAssignment" + | "ThirdPartyAppAssignment" + | "Azure" + | "Office365" + | "InboundCalling" + | "OutboundCalling" + | "InboundA2PSms" + | "OutboundA2PSms" + | "InboundP2PSms" + | "OutboundP2PSms"; + +/** + * Defines values for AssignmentStatus. + * Possible values include: 'Unassigned', 'Unknown', 'UserAssigned', 'ConferenceAssigned', + * 'FirstPartyAppAssigned', 'ThirdPartyAppAssigned' + * @readonly + * @enum {string} + */ +export type AssignmentStatus = + | "Unassigned" + | "Unknown" + | "UserAssigned" + | "ConferenceAssigned" + | "FirstPartyAppAssigned" + | "ThirdPartyAppAssigned"; + +/** + * Defines values for ActivationState. + * Possible values include: 'Activated', 'AssignmentPending', 'AssignmentFailed', 'UpdatePending', + * 'UpdateFailed' + * @readonly + * @enum {string} + */ +export type ActivationState = + | "Activated" + | "AssignmentPending" + | "AssignmentFailed" + | "UpdatePending" + | "UpdateFailed"; + +/** + * Defines values for CapabilitiesUpdateStatus. + * Possible values include: 'Pending', 'InProgress', 'Complete', 'Error' + * @readonly + * @enum {string} + */ +export type CapabilitiesUpdateStatus = "Pending" | "InProgress" | "Complete" | "Error"; + +/** + * Defines values for CurrencyType. + * Possible values include: 'USD' + * @readonly + * @enum {string} + */ +export type CurrencyType = "USD"; + +/** + * Defines values for PhoneNumberType. + * Possible values include: 'Unknown', 'Geographic', 'TollFree', 'Indirect' + * @readonly + * @enum {string} + */ +export type PhoneNumberType = "Unknown" | "Geographic" | "TollFree" | "Indirect"; + +/** + * Defines values for LocationType. + * Possible values include: 'CivicAddress', 'NotRequired', 'Selection' + * @readonly + * @enum {string} + */ +export type LocationType = "CivicAddress" | "NotRequired" | "Selection"; + +/** + * Defines values for PhoneNumberReleaseStatus. + * Possible values include: 'Pending', 'Success', 'Error', 'InProgress' + * @readonly + * @enum {string} + */ +export type PhoneNumberReleaseStatus = "Pending" | "Success" | "Error" | "InProgress"; + +/** + * Defines values for ReleaseStatus. + * Possible values include: 'Pending', 'InProgress', 'Complete', 'Failed', 'Expired' + * @readonly + * @enum {string} + */ +export type ReleaseStatus = "Pending" | "InProgress" | "Complete" | "Failed" | "Expired"; + +/** + * Defines values for SearchStatus. + * Possible values include: 'Pending', 'InProgress', 'Reserved', 'Expired', 'Expiring', + * 'Completing', 'Refreshing', 'Success', 'Manual', 'Cancelled', 'Cancelling', 'Error', + * 'PurchasePending' + * @readonly + * @enum {string} + */ +export type SearchStatus = + | "Pending" + | "InProgress" + | "Reserved" + | "Expired" + | "Expiring" + | "Completing" + | "Refreshing" + | "Success" + | "Manual" + | "Cancelled" + | "Cancelling" + | "Error" + | "PurchasePending"; + +/** + * Contains response data for the getAllPhoneNumbers operation. + */ +export type PhoneNumberAdministrationGetAllPhoneNumbersResponse = AcquiredPhoneNumbers & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: AcquiredPhoneNumbers; + }; +}; + +/** + * Contains response data for the getAllAreaCodes operation. + */ +export type PhoneNumberAdministrationGetAllAreaCodesResponse = AreaCodes & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: AreaCodes; + }; +}; + +/** + * Contains response data for the getCapabilitiesUpdate operation. + */ +export type PhoneNumberAdministrationGetCapabilitiesUpdateResponse = UpdatePhoneNumberCapabilitiesResponse & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: UpdatePhoneNumberCapabilitiesResponse; + }; +}; + +/** + * Contains response data for the updateCapabilities operation. + */ +export type PhoneNumberAdministrationUpdateCapabilitiesResponse = UpdateNumberCapabilitiesResponse & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: UpdateNumberCapabilitiesResponse; + }; +}; + +/** + * Contains response data for the getAllSupportedCountries operation. + */ +export type PhoneNumberAdministrationGetAllSupportedCountriesResponse = PhoneNumberCountries & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PhoneNumberCountries; + }; +}; + +/** + * Contains response data for the getNumberConfiguration operation. + */ +export type PhoneNumberAdministrationGetNumberConfigurationResponse = NumberConfigurationResponse & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: NumberConfigurationResponse; + }; +}; + +/** + * Contains response data for the getPhonePlanGroups operation. + */ +export type PhoneNumberAdministrationGetPhonePlanGroupsResponse = PhonePlanGroups & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PhonePlanGroups; + }; +}; + +/** + * Contains response data for the getPhonePlans operation. + */ +export type PhoneNumberAdministrationGetPhonePlansResponse = PhonePlansResponse & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PhonePlansResponse; + }; +}; + +/** + * Contains response data for the getPhonePlanLocationOptions operation. + */ +export type PhoneNumberAdministrationGetPhonePlanLocationOptionsResponse = LocationOptionsResponse & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: LocationOptionsResponse; + }; +}; + +/** + * Contains response data for the getReleaseById operation. + */ +export type PhoneNumberAdministrationGetReleaseByIdResponse = PhoneNumberRelease & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PhoneNumberRelease; + }; +}; + +/** + * Contains response data for the releasePhoneNumbers operation. + */ +export type PhoneNumberAdministrationReleasePhoneNumbersResponse = ReleaseResponse & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ReleaseResponse; + }; +}; + +/** + * Contains response data for the getAllReleases operation. + */ +export type PhoneNumberAdministrationGetAllReleasesResponse = PhoneNumberEntities & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PhoneNumberEntities; + }; +}; + +/** + * Contains response data for the getSearchById operation. + */ +export type PhoneNumberAdministrationGetSearchByIdResponse = PhoneNumberReservation & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PhoneNumberReservation; + }; +}; + +/** + * Contains response data for the createSearch operation. + */ +export type PhoneNumberAdministrationCreateSearchResponse = CreateSearchResponse & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: CreateSearchResponse; + }; +}; + +/** + * Contains response data for the getAllSearches operation. + */ +export type PhoneNumberAdministrationGetAllSearchesResponse = PhoneNumberEntities & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PhoneNumberEntities; + }; +}; diff --git a/sdk/communication/communication-administration/src/phoneNumber/generated/src/models/mappers.ts b/sdk/communication/communication-administration/src/phoneNumber/generated/src/models/mappers.ts new file mode 100644 index 000000000000..d48113b6576e --- /dev/null +++ b/sdk/communication/communication-administration/src/phoneNumber/generated/src/models/mappers.ts @@ -0,0 +1,1132 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for 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 * as coreHttp from "@azure/core-http"; + +export const AcquiredPhoneNumber: coreHttp.CompositeMapper = { + serializedName: "AcquiredPhoneNumber", + type: { + name: "Composite", + className: "AcquiredPhoneNumber", + modelProperties: { + phoneNumber: { + required: true, + serializedName: "phoneNumber", + type: { + name: "String" + } + }, + acquiredCapabilities: { + required: true, + serializedName: "acquiredCapabilities", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + availableCapabilities: { + required: true, + serializedName: "availableCapabilities", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + assignmentStatus: { + serializedName: "assignmentStatus", + type: { + name: "String" + } + }, + placeName: { + serializedName: "placeName", + type: { + name: "String" + } + }, + activationState: { + serializedName: "activationState", + type: { + name: "String" + } + } + } + } +}; + +export const AcquiredPhoneNumbers: coreHttp.CompositeMapper = { + serializedName: "AcquiredPhoneNumbers", + type: { + name: "Composite", + className: "AcquiredPhoneNumbers", + modelProperties: { + phoneNumbers: { + serializedName: "phoneNumbers", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AcquiredPhoneNumber" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const ErrorBody: coreHttp.CompositeMapper = { + serializedName: "ErrorBody", + type: { + name: "Composite", + className: "ErrorBody", + modelProperties: { + code: { + serializedName: "code", + type: { + name: "String" + } + }, + message: { + serializedName: "message", + type: { + name: "String" + } + } + } + } +}; + +export const ErrorResponse: coreHttp.CompositeMapper = { + serializedName: "ErrorResponse", + type: { + name: "Composite", + className: "ErrorResponse", + modelProperties: { + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorBody" + } + } + } + } +}; + +export const LocationOptionsQuery: coreHttp.CompositeMapper = { + serializedName: "LocationOptionsQuery", + type: { + name: "Composite", + className: "LocationOptionsQuery", + modelProperties: { + labelId: { + serializedName: "labelId", + type: { + name: "String" + } + }, + optionsValue: { + serializedName: "optionsValue", + type: { + name: "String" + } + } + } + } +}; + +export const LocationOptionsQueries: coreHttp.CompositeMapper = { + serializedName: "LocationOptionsQueries", + type: { + name: "Composite", + className: "LocationOptionsQueries", + modelProperties: { + locationOptions: { + serializedName: "locationOptions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "LocationOptionsQuery" + } + } + } + } + } + } +}; + +export const AreaCodes: coreHttp.CompositeMapper = { + serializedName: "AreaCodes", + type: { + name: "Composite", + className: "AreaCodes", + modelProperties: { + primaryAreaCodes: { + serializedName: "primaryAreaCodes", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + secondaryAreaCodes: { + serializedName: "secondaryAreaCodes", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const NumberUpdateCapabilities: coreHttp.CompositeMapper = { + serializedName: "NumberUpdateCapabilities", + type: { + name: "Composite", + className: "NumberUpdateCapabilities", + modelProperties: { + add: { + serializedName: "add", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + remove: { + serializedName: "remove", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const UpdatePhoneNumberCapabilitiesResponse: coreHttp.CompositeMapper = { + serializedName: "UpdatePhoneNumberCapabilitiesResponse", + type: { + name: "Composite", + className: "UpdatePhoneNumberCapabilitiesResponse", + modelProperties: { + capabilitiesUpdateId: { + serializedName: "capabilitiesUpdateId", + type: { + name: "String" + } + }, + createdAt: { + serializedName: "createdAt", + type: { + name: "DateTime" + } + }, + capabilitiesUpdateStatus: { + serializedName: "capabilitiesUpdateStatus", + type: { + name: "String" + } + }, + phoneNumberCapabilitiesUpdates: { + serializedName: "phoneNumberCapabilitiesUpdates", + type: { + name: "Dictionary", + value: { + type: { + name: "Composite", + className: "NumberUpdateCapabilities" + } + } + } + } + } + } +}; + +export const UpdateNumberCapabilitiesRequest: coreHttp.CompositeMapper = { + serializedName: "UpdateNumberCapabilitiesRequest", + type: { + name: "Composite", + className: "UpdateNumberCapabilitiesRequest", + modelProperties: { + phoneNumberCapabilitiesUpdate: { + required: true, + serializedName: "phoneNumberCapabilitiesUpdate", + type: { + name: "Dictionary", + value: { + type: { + name: "Composite", + className: "NumberUpdateCapabilities" + } + } + } + } + } + } +}; + +export const UpdateNumberCapabilitiesResponse: coreHttp.CompositeMapper = { + serializedName: "UpdateNumberCapabilitiesResponse", + type: { + name: "Composite", + className: "UpdateNumberCapabilitiesResponse", + modelProperties: { + capabilitiesUpdateId: { + required: true, + serializedName: "capabilitiesUpdateId", + type: { + name: "String" + } + } + } + } +}; + +export const PhoneNumberCountry: coreHttp.CompositeMapper = { + serializedName: "PhoneNumberCountry", + type: { + name: "Composite", + className: "PhoneNumberCountry", + modelProperties: { + localizedName: { + required: true, + serializedName: "localizedName", + type: { + name: "String" + } + }, + countryCode: { + required: true, + serializedName: "countryCode", + type: { + name: "String" + } + } + } + } +}; + +export const PhoneNumberCountries: coreHttp.CompositeMapper = { + serializedName: "PhoneNumberCountries", + type: { + name: "Composite", + className: "PhoneNumberCountries", + modelProperties: { + countries: { + serializedName: "countries", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PhoneNumberCountry" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const NumberConfigurationPhoneNumber: coreHttp.CompositeMapper = { + serializedName: "NumberConfigurationPhoneNumber", + type: { + name: "Composite", + className: "NumberConfigurationPhoneNumber", + modelProperties: { + phoneNumber: { + required: true, + serializedName: "phoneNumber", + type: { + name: "String" + } + } + } + } +}; + +export const PstnConfiguration: coreHttp.CompositeMapper = { + serializedName: "PstnConfiguration", + type: { + name: "Composite", + className: "PstnConfiguration", + modelProperties: { + callbackUrl: { + required: true, + serializedName: "callbackUrl", + type: { + name: "String" + } + }, + applicationId: { + serializedName: "applicationId", + type: { + name: "String" + } + } + } + } +}; + +export const NumberConfigurationResponse: coreHttp.CompositeMapper = { + serializedName: "NumberConfigurationResponse", + type: { + name: "Composite", + className: "NumberConfigurationResponse", + modelProperties: { + pstnConfiguration: { + required: true, + serializedName: "pstnConfiguration", + type: { + name: "Composite", + className: "PstnConfiguration" + } + } + } + } +}; + +export const NumberConfiguration: coreHttp.CompositeMapper = { + serializedName: "NumberConfiguration", + type: { + name: "Composite", + className: "NumberConfiguration", + modelProperties: { + pstnConfiguration: { + required: true, + serializedName: "pstnConfiguration", + type: { + name: "Composite", + className: "PstnConfiguration" + } + }, + phoneNumber: { + required: true, + serializedName: "phoneNumber", + type: { + name: "String" + } + } + } + } +}; + +export const CarrierDetails: coreHttp.CompositeMapper = { + serializedName: "CarrierDetails", + type: { + name: "Composite", + className: "CarrierDetails", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + localizedName: { + serializedName: "localizedName", + type: { + name: "String" + } + } + } + } +}; + +export const RateInformation: coreHttp.CompositeMapper = { + serializedName: "RateInformation", + type: { + name: "Composite", + className: "RateInformation", + modelProperties: { + monthlyRate: { + serializedName: "monthlyRate", + type: { + name: "Number" + } + }, + currencyType: { + serializedName: "currencyType", + type: { + name: "String" + } + }, + rateErrorMessage: { + serializedName: "rateErrorMessage", + type: { + name: "String" + } + } + } + } +}; + +export const PhonePlanGroup: coreHttp.CompositeMapper = { + serializedName: "PhonePlanGroup", + type: { + name: "Composite", + className: "PhonePlanGroup", + modelProperties: { + phonePlanGroupId: { + required: true, + serializedName: "phonePlanGroupId", + type: { + name: "String" + } + }, + phoneNumberType: { + serializedName: "phoneNumberType", + type: { + name: "String" + } + }, + localizedName: { + required: true, + serializedName: "localizedName", + type: { + name: "String" + } + }, + localizedDescription: { + required: true, + serializedName: "localizedDescription", + type: { + name: "String" + } + }, + carrierDetails: { + serializedName: "carrierDetails", + type: { + name: "Composite", + className: "CarrierDetails" + } + }, + rateInformation: { + serializedName: "rateInformation", + type: { + name: "Composite", + className: "RateInformation" + } + } + } + } +}; + +export const PhonePlanGroups: coreHttp.CompositeMapper = { + serializedName: "PhonePlanGroups", + type: { + name: "Composite", + className: "PhonePlanGroups", + modelProperties: { + phonePlanGroups: { + serializedName: "phonePlanGroups", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PhonePlanGroup" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const PhonePlan: coreHttp.CompositeMapper = { + serializedName: "PhonePlan", + type: { + name: "Composite", + className: "PhonePlan", + modelProperties: { + phonePlanId: { + required: true, + serializedName: "phonePlanId", + type: { + name: "String" + } + }, + localizedName: { + required: true, + serializedName: "localizedName", + type: { + name: "String" + } + }, + locationType: { + required: true, + serializedName: "locationType", + type: { + name: "String" + } + }, + areaCodes: { + serializedName: "areaCodes", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + capabilities: { + serializedName: "capabilities", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + maximumSearchSize: { + serializedName: "maximumSearchSize", + type: { + name: "Number" + } + } + } + } +}; + +export const PhonePlansResponse: coreHttp.CompositeMapper = { + serializedName: "PhonePlansResponse", + type: { + name: "Composite", + className: "PhonePlansResponse", + modelProperties: { + phonePlans: { + serializedName: "phonePlans", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PhonePlan" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const LocationOptions: coreHttp.CompositeMapper = { + serializedName: "LocationOptions", + type: { + name: "Composite", + className: "LocationOptions", + modelProperties: { + labelId: { + serializedName: "labelId", + type: { + name: "String" + } + }, + labelName: { + serializedName: "labelName", + type: { + name: "String" + } + }, + options: { + serializedName: "options", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "LocationOptionsDetails" + } + } + } + } + } + } +}; + +export const LocationOptionsDetails: coreHttp.CompositeMapper = { + serializedName: "LocationOptionsDetails", + type: { + name: "Composite", + className: "LocationOptionsDetails", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + value: { + serializedName: "value", + type: { + name: "String" + } + }, + locationOptions: { + serializedName: "locationOptions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "LocationOptions" + } + } + } + } + } + } +}; + +export const LocationOptionsResponse: coreHttp.CompositeMapper = { + serializedName: "LocationOptionsResponse", + type: { + name: "Composite", + className: "LocationOptionsResponse", + modelProperties: { + locationOptions: { + serializedName: "locationOptions", + type: { + name: "Composite", + className: "LocationOptions" + } + } + } + } +}; + +export const PhoneNumberReleaseDetails: coreHttp.CompositeMapper = { + serializedName: "PhoneNumberReleaseDetails", + type: { + name: "Composite", + className: "PhoneNumberReleaseDetails", + modelProperties: { + status: { + serializedName: "status", + type: { + name: "String" + } + }, + errorCode: { + serializedName: "errorCode", + type: { + name: "Number" + } + } + } + } +}; + +export const PhoneNumberRelease: coreHttp.CompositeMapper = { + serializedName: "PhoneNumberRelease", + type: { + name: "Composite", + className: "PhoneNumberRelease", + modelProperties: { + releaseId: { + serializedName: "releaseId", + type: { + name: "String" + } + }, + createdAt: { + serializedName: "createdAt", + type: { + name: "DateTime" + } + }, + status: { + serializedName: "status", + type: { + name: "String" + } + }, + errorMessage: { + serializedName: "errorMessage", + type: { + name: "String" + } + }, + phoneNumberReleaseStatusDetails: { + serializedName: "phoneNumberReleaseStatusDetails", + type: { + name: "Dictionary", + value: { + type: { + name: "Composite", + className: "PhoneNumberReleaseDetails" + } + } + } + } + } + } +}; + +export const ReleaseRequest: coreHttp.CompositeMapper = { + serializedName: "ReleaseRequest", + type: { + name: "Composite", + className: "ReleaseRequest", + modelProperties: { + phoneNumbers: { + required: true, + serializedName: "phoneNumbers", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const ReleaseResponse: coreHttp.CompositeMapper = { + serializedName: "ReleaseResponse", + type: { + name: "Composite", + className: "ReleaseResponse", + modelProperties: { + releaseId: { + required: true, + serializedName: "releaseId", + type: { + name: "String" + } + } + } + } +}; + +export const PhoneNumberEntity: coreHttp.CompositeMapper = { + serializedName: "PhoneNumberEntity", + type: { + name: "Composite", + className: "PhoneNumberEntity", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + }, + createdAt: { + serializedName: "createdAt", + type: { + name: "DateTime" + } + }, + displayName: { + serializedName: "displayName", + type: { + name: "String" + } + }, + quantity: { + serializedName: "quantity", + type: { + name: "Number" + } + }, + quantityObtained: { + serializedName: "quantityObtained", + type: { + name: "Number" + } + }, + status: { + serializedName: "status", + type: { + name: "String" + } + }, + focDate: { + serializedName: "focDate", + type: { + name: "DateTime" + } + } + } + } +}; + +export const PhoneNumberEntities: coreHttp.CompositeMapper = { + serializedName: "PhoneNumberEntities", + type: { + name: "Composite", + className: "PhoneNumberEntities", + modelProperties: { + entities: { + serializedName: "entities", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PhoneNumberEntity" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const CreateSearchOptions: coreHttp.CompositeMapper = { + serializedName: "CreateSearchOptions", + type: { + name: "Composite", + className: "CreateSearchOptions", + modelProperties: { + displayName: { + required: true, + serializedName: "displayName", + type: { + name: "String" + } + }, + description: { + required: true, + serializedName: "description", + type: { + name: "String" + } + }, + phonePlanIds: { + required: true, + serializedName: "phonePlanIds", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + areaCode: { + required: true, + serializedName: "areaCode", + type: { + name: "String" + } + }, + quantity: { + serializedName: "quantity", + constraints: { + InclusiveMaximum: 2147483647, + InclusiveMinimum: 1 + }, + type: { + name: "Number" + } + }, + locationOptions: { + serializedName: "locationOptions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "LocationOptionsDetails" + } + } + } + } + } + } +}; + +export const CreateSearchResponse: coreHttp.CompositeMapper = { + serializedName: "CreateSearchResponse", + type: { + name: "Composite", + className: "CreateSearchResponse", + modelProperties: { + searchId: { + required: true, + serializedName: "searchId", + type: { + name: "String" + } + } + } + } +}; + +export const PhoneNumberReservation: coreHttp.CompositeMapper = { + serializedName: "PhoneNumberReservation", + type: { + name: "Composite", + className: "PhoneNumberReservation", + modelProperties: { + reservationId: { + serializedName: "searchId", + type: { + name: "String" + } + }, + displayName: { + serializedName: "displayName", + type: { + name: "String" + } + }, + createdAt: { + serializedName: "createdAt", + type: { + name: "DateTime" + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + }, + phonePlanIds: { + serializedName: "phonePlanIds", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + areaCode: { + serializedName: "areaCode", + type: { + name: "String" + } + }, + quantity: { + serializedName: "quantity", + type: { + name: "Number" + } + }, + locationOptions: { + serializedName: "locationOptions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "LocationOptionsDetails" + } + } + } + }, + status: { + serializedName: "status", + type: { + name: "String" + } + }, + phoneNumbers: { + serializedName: "phoneNumbers", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + reservationExpiryDate: { + serializedName: "reservationExpiryDate", + type: { + name: "DateTime" + } + }, + errorCode: { + serializedName: "errorCode", + type: { + name: "Number" + } + } + } + } +}; diff --git a/sdk/communication/communication-administration/src/phoneNumber/generated/src/models/parameters.ts b/sdk/communication/communication-administration/src/phoneNumber/generated/src/models/parameters.ts new file mode 100644 index 000000000000..5808761049da --- /dev/null +++ b/sdk/communication/communication-administration/src/phoneNumber/generated/src/models/parameters.ts @@ -0,0 +1,146 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * 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 * as coreHttp from "@azure/core-http"; + +export const apiVersion: coreHttp.OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + required: true, + isConstant: true, + serializedName: "api-version", + defaultValue: "2020-07-20-preview1", + type: { + name: "String" + } + } +}; +export const capabilitiesUpdateId: coreHttp.OperationURLParameter = { + parameterPath: "capabilitiesUpdateId", + mapper: { + required: true, + serializedName: "capabilitiesUpdateId", + type: { + name: "String" + } + } +}; +export const countryCode: coreHttp.OperationURLParameter = { + parameterPath: "countryCode", + mapper: { + required: true, + serializedName: "countryCode", + type: { + name: "String" + } + } +}; +export const endpoint: coreHttp.OperationURLParameter = { + parameterPath: "endpoint", + mapper: { + required: true, + serializedName: "endpoint", + defaultValue: "", + type: { + name: "String" + } + }, + skipEncoding: true +}; +export const includeRateInformation: coreHttp.OperationQueryParameter = { + parameterPath: ["options", "includeRateInformation"], + mapper: { + serializedName: "includeRateInformation", + defaultValue: false, + type: { + name: "Boolean" + } + } +}; +export const locale: coreHttp.OperationQueryParameter = { + parameterPath: ["options", "locale"], + mapper: { + serializedName: "locale", + defaultValue: "en-US", + type: { + name: "String" + } + } +}; +export const locationType: coreHttp.OperationQueryParameter = { + parameterPath: "locationType", + mapper: { + required: true, + serializedName: "locationType", + type: { + name: "String" + } + } +}; +export const phonePlanGroupId: coreHttp.OperationURLParameter = { + parameterPath: "phonePlanGroupId", + mapper: { + required: true, + serializedName: "phonePlanGroupId", + type: { + name: "String" + } + } +}; +export const phonePlanId: coreHttp.OperationQueryParameter = { + parameterPath: "phonePlanId", + mapper: { + required: true, + serializedName: "phonePlanId", + type: { + name: "String" + } + } +}; +export const releaseId: coreHttp.OperationURLParameter = { + parameterPath: "releaseId", + mapper: { + required: true, + serializedName: "releaseId", + type: { + name: "String" + } + } +}; +export const searchId: coreHttp.OperationURLParameter = { + parameterPath: "searchId", + mapper: { + required: true, + serializedName: "searchId", + type: { + name: "String" + } + } +}; +export const skip: coreHttp.OperationQueryParameter = { + parameterPath: ["options", "skip"], + mapper: { + serializedName: "skip", + defaultValue: 0, + type: { + name: "Number" + } + } +}; +export const take: coreHttp.OperationQueryParameter = { + parameterPath: ["options", "take"], + mapper: { + serializedName: "take", + defaultValue: 100, + type: { + name: "Number" + } + } +}; diff --git a/sdk/communication/communication-administration/src/phoneNumber/generated/src/models/phoneNumberAdministrationMappers.ts b/sdk/communication/communication-administration/src/phoneNumber/generated/src/models/phoneNumberAdministrationMappers.ts new file mode 100644 index 000000000000..dae5e4deb157 --- /dev/null +++ b/sdk/communication/communication-administration/src/phoneNumber/generated/src/models/phoneNumberAdministrationMappers.ts @@ -0,0 +1,45 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + AcquiredPhoneNumber, + AcquiredPhoneNumbers, + AreaCodes, + CarrierDetails, + CreateSearchOptions, + CreateSearchResponse, + ErrorBody, + ErrorResponse, + LocationOptions, + LocationOptionsDetails, + LocationOptionsQueries, + LocationOptionsQuery, + LocationOptionsResponse, + NumberConfiguration, + NumberConfigurationPhoneNumber, + NumberConfigurationResponse, + NumberUpdateCapabilities, + PhoneNumberCountries, + PhoneNumberCountry, + PhoneNumberEntities, + PhoneNumberEntity, + PhoneNumberRelease, + PhoneNumberReleaseDetails, + PhoneNumberReservation, + PhonePlan, + PhonePlanGroup, + PhonePlanGroups, + PhonePlansResponse, + PstnConfiguration, + RateInformation, + ReleaseRequest, + ReleaseResponse, + UpdateNumberCapabilitiesRequest, + UpdateNumberCapabilitiesResponse, + UpdatePhoneNumberCapabilitiesResponse +} from "../models/mappers"; diff --git a/sdk/communication/communication-administration/src/phoneNumber/generated/src/operations/index.ts b/sdk/communication/communication-administration/src/phoneNumber/generated/src/operations/index.ts new file mode 100644 index 000000000000..636d745197a3 --- /dev/null +++ b/sdk/communication/communication-administration/src/phoneNumber/generated/src/operations/index.ts @@ -0,0 +1,11 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export * from "./phoneNumberAdministration"; diff --git a/sdk/communication/communication-administration/src/phoneNumber/generated/src/operations/phoneNumberAdministration.ts b/sdk/communication/communication-administration/src/phoneNumber/generated/src/operations/phoneNumberAdministration.ts new file mode 100644 index 000000000000..47b63561bfe3 --- /dev/null +++ b/sdk/communication/communication-administration/src/phoneNumber/generated/src/operations/phoneNumberAdministration.ts @@ -0,0 +1,1254 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * 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 * as coreHttp from "@azure/core-http"; +import * as Models from "../models"; +import * as Mappers from "../models/phoneNumberAdministrationMappers"; +import * as Parameters from "../models/parameters"; +import { PhoneNumberRestClientContext } from "../phoneNumberRestClientContext"; + +/** Class representing a PhoneNumberAdministration. */ +export class PhoneNumberAdministration { + private readonly client: PhoneNumberRestClientContext; + + /** + * Create a PhoneNumberAdministration. + * @param {PhoneNumberRestClientContext} client Reference to the service client. + */ + constructor(client: PhoneNumberRestClientContext) { + this.client = client; + } + + /** + * @summary Gets the list of the acquired phone numbers. + * @param [options] The optional parameters + * @returns Promise + */ + getAllPhoneNumbers( + options?: Models.PhoneNumberAdministrationGetAllPhoneNumbersOptionalParams + ): Promise; + /** + * @param callback The callback + */ + getAllPhoneNumbers(callback: coreHttp.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + getAllPhoneNumbers( + options: Models.PhoneNumberAdministrationGetAllPhoneNumbersOptionalParams, + callback: coreHttp.ServiceCallback + ): void; + getAllPhoneNumbers( + options?: + | Models.PhoneNumberAdministrationGetAllPhoneNumbersOptionalParams + | coreHttp.ServiceCallback, + callback?: coreHttp.ServiceCallback + ): Promise { + return this.client.sendOperationRequest( + { + options + }, + getAllPhoneNumbersOperationSpec, + callback + ) as Promise; + } + + /** + * @summary Gets a list of the supported area codes + * @param locationType The type of location information required by the plan. + * @param countryCode The ISO 3166-2 country code + * @param phonePlanId The plan id from which to search area codes. + * @param [options] The optional parameters + * @returns Promise + */ + getAllAreaCodes( + locationType: string, + countryCode: string, + phonePlanId: string, + options?: Models.PhoneNumberAdministrationGetAllAreaCodesOptionalParams + ): Promise; + /** + * @param locationType The type of location information required by the plan. + * @param countryCode The ISO 3166-2 country code + * @param phonePlanId The plan id from which to search area codes. + * @param callback The callback + */ + getAllAreaCodes( + locationType: string, + countryCode: string, + phonePlanId: string, + callback: coreHttp.ServiceCallback + ): void; + /** + * @param locationType The type of location information required by the plan. + * @param countryCode The ISO 3166-2 country code + * @param phonePlanId The plan id from which to search area codes. + * @param options The optional parameters + * @param callback The callback + */ + getAllAreaCodes( + locationType: string, + countryCode: string, + phonePlanId: string, + options: Models.PhoneNumberAdministrationGetAllAreaCodesOptionalParams, + callback: coreHttp.ServiceCallback + ): void; + getAllAreaCodes( + locationType: string, + countryCode: string, + phonePlanId: string, + options?: + | Models.PhoneNumberAdministrationGetAllAreaCodesOptionalParams + | coreHttp.ServiceCallback, + callback?: coreHttp.ServiceCallback + ): Promise { + return this.client.sendOperationRequest( + { + locationType, + countryCode, + phonePlanId, + options + }, + getAllAreaCodesOperationSpec, + callback + ) as Promise; + } + + /** + * @summary Get capabilities by capabilities update id. + * @param capabilitiesUpdateId + * @param [options] The optional parameters + * @returns Promise + */ + getCapabilitiesUpdate( + capabilitiesUpdateId: string, + options?: coreHttp.RequestOptionsBase + ): Promise; + /** + * @param capabilitiesUpdateId + * @param callback The callback + */ + getCapabilitiesUpdate( + capabilitiesUpdateId: string, + callback: coreHttp.ServiceCallback + ): void; + /** + * @param capabilitiesUpdateId + * @param options The optional parameters + * @param callback The callback + */ + getCapabilitiesUpdate( + capabilitiesUpdateId: string, + options: coreHttp.RequestOptionsBase, + callback: coreHttp.ServiceCallback + ): void; + getCapabilitiesUpdate( + capabilitiesUpdateId: string, + options?: + | coreHttp.RequestOptionsBase + | coreHttp.ServiceCallback, + callback?: coreHttp.ServiceCallback + ): Promise { + return this.client.sendOperationRequest( + { + capabilitiesUpdateId, + options + }, + getCapabilitiesUpdateOperationSpec, + callback + ) as Promise; + } + + /** + * @summary Adds or removes phone number capabilities + * @param phoneNumberCapabilitiesUpdate The map of phone numbers to the capabilities update applied + * to the phone number. + * @param [options] The optional parameters + * @returns Promise + */ + updateCapabilities( + phoneNumberCapabilitiesUpdate: { [propertyName: string]: Models.NumberUpdateCapabilities }, + options?: coreHttp.RequestOptionsBase + ): Promise; + /** + * @param phoneNumberCapabilitiesUpdate The map of phone numbers to the capabilities update applied + * to the phone number. + * @param callback The callback + */ + updateCapabilities( + phoneNumberCapabilitiesUpdate: { [propertyName: string]: Models.NumberUpdateCapabilities }, + callback: coreHttp.ServiceCallback + ): void; + /** + * @param phoneNumberCapabilitiesUpdate The map of phone numbers to the capabilities update applied + * to the phone number. + * @param options The optional parameters + * @param callback The callback + */ + updateCapabilities( + phoneNumberCapabilitiesUpdate: { [propertyName: string]: Models.NumberUpdateCapabilities }, + options: coreHttp.RequestOptionsBase, + callback: coreHttp.ServiceCallback + ): void; + updateCapabilities( + phoneNumberCapabilitiesUpdate: { [propertyName: string]: Models.NumberUpdateCapabilities }, + options?: + | coreHttp.RequestOptionsBase + | coreHttp.ServiceCallback, + callback?: coreHttp.ServiceCallback + ): Promise { + return this.client.sendOperationRequest( + { + phoneNumberCapabilitiesUpdate, + options + }, + updateCapabilitiesOperationSpec, + callback + ) as Promise; + } + + /** + * @summary Gets a list of supported countries + * @param [options] The optional parameters + * @returns Promise + */ + getAllSupportedCountries( + options?: Models.PhoneNumberAdministrationGetAllSupportedCountriesOptionalParams + ): Promise; + /** + * @param callback The callback + */ + getAllSupportedCountries(callback: coreHttp.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + getAllSupportedCountries( + options: Models.PhoneNumberAdministrationGetAllSupportedCountriesOptionalParams, + callback: coreHttp.ServiceCallback + ): void; + getAllSupportedCountries( + options?: + | Models.PhoneNumberAdministrationGetAllSupportedCountriesOptionalParams + | coreHttp.ServiceCallback, + callback?: coreHttp.ServiceCallback + ): Promise { + return this.client.sendOperationRequest( + { + options + }, + getAllSupportedCountriesOperationSpec, + callback + ) as Promise; + } + + /** + * @summary Endpoint for getting number configurations + * @param phoneNumber The phone number in the E.164 format + * @param [options] The optional parameters + * @returns Promise + */ + getNumberConfiguration( + phoneNumber: string, + options?: coreHttp.RequestOptionsBase + ): Promise; + /** + * @param phoneNumber The phone number in the E.164 format + * @param callback The callback + */ + getNumberConfiguration( + phoneNumber: string, + callback: coreHttp.ServiceCallback + ): void; + /** + * @param phoneNumber The phone number in the E.164 format + * @param options The optional parameters + * @param callback The callback + */ + getNumberConfiguration( + phoneNumber: string, + options: coreHttp.RequestOptionsBase, + callback: coreHttp.ServiceCallback + ): void; + getNumberConfiguration( + phoneNumber: string, + options?: + | coreHttp.RequestOptionsBase + | coreHttp.ServiceCallback, + callback?: coreHttp.ServiceCallback + ): Promise { + return this.client.sendOperationRequest( + { + phoneNumber, + options + }, + getNumberConfigurationOperationSpec, + callback + ) as Promise; + } + + /** + * @summary Endpoint for configuring a pstn number + * @param pstnConfiguration + * @param phoneNumber The phone number to configure + * @param [options] The optional parameters + * @returns Promise + */ + configureNumber( + pstnConfiguration: Models.PstnConfiguration, + phoneNumber: string, + options?: coreHttp.RequestOptionsBase + ): Promise; + /** + * @param pstnConfiguration + * @param phoneNumber The phone number to configure + * @param callback The callback + */ + configureNumber( + pstnConfiguration: Models.PstnConfiguration, + phoneNumber: string, + callback: coreHttp.ServiceCallback + ): void; + /** + * @param pstnConfiguration + * @param phoneNumber The phone number to configure + * @param options The optional parameters + * @param callback The callback + */ + configureNumber( + pstnConfiguration: Models.PstnConfiguration, + phoneNumber: string, + options: coreHttp.RequestOptionsBase, + callback: coreHttp.ServiceCallback + ): void; + configureNumber( + pstnConfiguration: Models.PstnConfiguration, + phoneNumber: string, + options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, + callback?: coreHttp.ServiceCallback + ): Promise { + return this.client.sendOperationRequest( + { + pstnConfiguration, + phoneNumber, + options + }, + configureNumberOperationSpec, + callback + ); + } + + /** + * @summary Endpoint for unconfiguring a pstn number by removing the configuration + * @param phoneNumber The phone number in the E.164 format + * @param [options] The optional parameters + * @returns Promise + */ + unconfigureNumber( + phoneNumber: string, + options?: coreHttp.RequestOptionsBase + ): Promise; + /** + * @param phoneNumber The phone number in the E.164 format + * @param callback The callback + */ + unconfigureNumber(phoneNumber: string, callback: coreHttp.ServiceCallback): void; + /** + * @param phoneNumber The phone number in the E.164 format + * @param options The optional parameters + * @param callback The callback + */ + unconfigureNumber( + phoneNumber: string, + options: coreHttp.RequestOptionsBase, + callback: coreHttp.ServiceCallback + ): void; + unconfigureNumber( + phoneNumber: string, + options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, + callback?: coreHttp.ServiceCallback + ): Promise { + return this.client.sendOperationRequest( + { + phoneNumber, + options + }, + unconfigureNumberOperationSpec, + callback + ); + } + + /** + * @summary Gets a list of phone plan groups for the given country + * @param countryCode The ISO 3166-2 country code. + * @param [options] The optional parameters + * @returns Promise + */ + getPhonePlanGroups( + countryCode: string, + options?: Models.PhoneNumberAdministrationGetPhonePlanGroupsOptionalParams + ): Promise; + /** + * @param countryCode The ISO 3166-2 country code. + * @param callback The callback + */ + getPhonePlanGroups( + countryCode: string, + callback: coreHttp.ServiceCallback + ): void; + /** + * @param countryCode The ISO 3166-2 country code. + * @param options The optional parameters + * @param callback The callback + */ + getPhonePlanGroups( + countryCode: string, + options: Models.PhoneNumberAdministrationGetPhonePlanGroupsOptionalParams, + callback: coreHttp.ServiceCallback + ): void; + getPhonePlanGroups( + countryCode: string, + options?: + | Models.PhoneNumberAdministrationGetPhonePlanGroupsOptionalParams + | coreHttp.ServiceCallback, + callback?: coreHttp.ServiceCallback + ): Promise { + return this.client.sendOperationRequest( + { + countryCode, + options + }, + getPhonePlanGroupsOperationSpec, + callback + ) as Promise; + } + + /** + * @summary Gets a list of phone plans for a phone plan group + * @param countryCode The ISO 3166-2 country code. + * @param phonePlanGroupId + * @param [options] The optional parameters + * @returns Promise + */ + getPhonePlans( + countryCode: string, + phonePlanGroupId: string, + options?: Models.PhoneNumberAdministrationGetPhonePlansOptionalParams + ): Promise; + /** + * @param countryCode The ISO 3166-2 country code. + * @param phonePlanGroupId + * @param callback The callback + */ + getPhonePlans( + countryCode: string, + phonePlanGroupId: string, + callback: coreHttp.ServiceCallback + ): void; + /** + * @param countryCode The ISO 3166-2 country code. + * @param phonePlanGroupId + * @param options The optional parameters + * @param callback The callback + */ + getPhonePlans( + countryCode: string, + phonePlanGroupId: string, + options: Models.PhoneNumberAdministrationGetPhonePlansOptionalParams, + callback: coreHttp.ServiceCallback + ): void; + getPhonePlans( + countryCode: string, + phonePlanGroupId: string, + options?: + | Models.PhoneNumberAdministrationGetPhonePlansOptionalParams + | coreHttp.ServiceCallback, + callback?: coreHttp.ServiceCallback + ): Promise { + return this.client.sendOperationRequest( + { + countryCode, + phonePlanGroupId, + options + }, + getPhonePlansOperationSpec, + callback + ) as Promise; + } + + /** + * @summary Gets a list of location options for a phone plan + * @param countryCode The ISO 3166-2 country code. + * @param phonePlanGroupId + * @param phonePlanId + * @param [options] The optional parameters + * @returns Promise + */ + getPhonePlanLocationOptions( + countryCode: string, + phonePlanGroupId: string, + phonePlanId: string, + options?: Models.PhoneNumberAdministrationGetPhonePlanLocationOptionsOptionalParams + ): Promise; + /** + * @param countryCode The ISO 3166-2 country code. + * @param phonePlanGroupId + * @param phonePlanId + * @param callback The callback + */ + getPhonePlanLocationOptions( + countryCode: string, + phonePlanGroupId: string, + phonePlanId: string, + callback: coreHttp.ServiceCallback + ): void; + /** + * @param countryCode The ISO 3166-2 country code. + * @param phonePlanGroupId + * @param phonePlanId + * @param options The optional parameters + * @param callback The callback + */ + getPhonePlanLocationOptions( + countryCode: string, + phonePlanGroupId: string, + phonePlanId: string, + options: Models.PhoneNumberAdministrationGetPhonePlanLocationOptionsOptionalParams, + callback: coreHttp.ServiceCallback + ): void; + getPhonePlanLocationOptions( + countryCode: string, + phonePlanGroupId: string, + phonePlanId: string, + options?: + | Models.PhoneNumberAdministrationGetPhonePlanLocationOptionsOptionalParams + | coreHttp.ServiceCallback, + callback?: coreHttp.ServiceCallback + ): Promise { + return this.client.sendOperationRequest( + { + countryCode, + phonePlanGroupId, + phonePlanId, + options + }, + getPhonePlanLocationOptionsOperationSpec, + callback + ) as Promise; + } + + /** + * @summary Gets a release by a release id + * @param releaseId Represents the release id + * @param [options] The optional parameters + * @returns Promise + */ + getReleaseById( + releaseId: string, + options?: coreHttp.RequestOptionsBase + ): Promise; + /** + * @param releaseId Represents the release id + * @param callback The callback + */ + getReleaseById( + releaseId: string, + callback: coreHttp.ServiceCallback + ): void; + /** + * @param releaseId Represents the release id + * @param options The optional parameters + * @param callback The callback + */ + getReleaseById( + releaseId: string, + options: coreHttp.RequestOptionsBase, + callback: coreHttp.ServiceCallback + ): void; + getReleaseById( + releaseId: string, + options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, + callback?: coreHttp.ServiceCallback + ): Promise { + return this.client.sendOperationRequest( + { + releaseId, + options + }, + getReleaseByIdOperationSpec, + callback + ) as Promise; + } + + /** + * @summary Creates a release for the given phone numbers + * @param phoneNumbers The list of phone numbers in the release request. + * @param [options] The optional parameters + * @returns Promise + */ + releasePhoneNumbers( + phoneNumbers: string[], + options?: coreHttp.RequestOptionsBase + ): Promise; + /** + * @param phoneNumbers The list of phone numbers in the release request. + * @param callback The callback + */ + releasePhoneNumbers( + phoneNumbers: string[], + callback: coreHttp.ServiceCallback + ): void; + /** + * @param phoneNumbers The list of phone numbers in the release request. + * @param options The optional parameters + * @param callback The callback + */ + releasePhoneNumbers( + phoneNumbers: string[], + options: coreHttp.RequestOptionsBase, + callback: coreHttp.ServiceCallback + ): void; + releasePhoneNumbers( + phoneNumbers: string[], + options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, + callback?: coreHttp.ServiceCallback + ): Promise { + return this.client.sendOperationRequest( + { + phoneNumbers, + options + }, + releasePhoneNumbersOperationSpec, + callback + ) as Promise; + } + + /** + * @summary Gets a list of all releases + * @param [options] The optional parameters + * @returns Promise + */ + getAllReleases( + options?: Models.PhoneNumberAdministrationGetAllReleasesOptionalParams + ): Promise; + /** + * @param callback The callback + */ + getAllReleases(callback: coreHttp.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + getAllReleases( + options: Models.PhoneNumberAdministrationGetAllReleasesOptionalParams, + callback: coreHttp.ServiceCallback + ): void; + getAllReleases( + options?: + | Models.PhoneNumberAdministrationGetAllReleasesOptionalParams + | coreHttp.ServiceCallback, + callback?: coreHttp.ServiceCallback + ): Promise { + return this.client.sendOperationRequest( + { + options + }, + getAllReleasesOperationSpec, + callback + ) as Promise; + } + + /** + * @summary Get search by search id + * @param searchId The search id to be searched for + * @param [options] The optional parameters + * @returns Promise + */ + getSearchById( + searchId: string, + options?: coreHttp.RequestOptionsBase + ): Promise; + /** + * @param searchId The search id to be searched for + * @param callback The callback + */ + getSearchById( + searchId: string, + callback: coreHttp.ServiceCallback + ): void; + /** + * @param searchId The search id to be searched for + * @param options The optional parameters + * @param callback The callback + */ + getSearchById( + searchId: string, + options: coreHttp.RequestOptionsBase, + callback: coreHttp.ServiceCallback + ): void; + getSearchById( + searchId: string, + options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, + callback?: coreHttp.ServiceCallback + ): Promise { + return this.client.sendOperationRequest( + { + searchId, + options + }, + getSearchByIdOperationSpec, + callback + ) as Promise; + } + + /** + * @summary Creates a phone number search + * @param displayName Display name of the search. + * @param description Description of the search. + * @param phonePlanIds The plan subtype ids from which to create the search. + * @param areaCode The area code from which to create the search. + * @param [options] The optional parameters + * @returns Promise + */ + createSearch( + displayName: string, + description: string, + phonePlanIds: string[], + areaCode: string, + options?: Models.PhoneNumberAdministrationCreateSearchOptionalParams + ): Promise; + /** + * @param displayName Display name of the search. + * @param description Description of the search. + * @param phonePlanIds The plan subtype ids from which to create the search. + * @param areaCode The area code from which to create the search. + * @param callback The callback + */ + createSearch( + displayName: string, + description: string, + phonePlanIds: string[], + areaCode: string, + callback: coreHttp.ServiceCallback + ): void; + /** + * @param displayName Display name of the search. + * @param description Description of the search. + * @param phonePlanIds The plan subtype ids from which to create the search. + * @param areaCode The area code from which to create the search. + * @param options The optional parameters + * @param callback The callback + */ + createSearch( + displayName: string, + description: string, + phonePlanIds: string[], + areaCode: string, + options: Models.PhoneNumberAdministrationCreateSearchOptionalParams, + callback: coreHttp.ServiceCallback + ): void; + createSearch( + displayName: string, + description: string, + phonePlanIds: string[], + areaCode: string, + options?: + | Models.PhoneNumberAdministrationCreateSearchOptionalParams + | coreHttp.ServiceCallback, + callback?: coreHttp.ServiceCallback + ): Promise { + return this.client.sendOperationRequest( + { + displayName, + description, + phonePlanIds, + areaCode, + options + }, + createSearchOperationSpec, + callback + ) as Promise; + } + + /** + * @summary Gets a list of all searches + * @param [options] The optional parameters + * @returns Promise + */ + getAllSearches( + options?: Models.PhoneNumberAdministrationGetAllSearchesOptionalParams + ): Promise; + /** + * @param callback The callback + */ + getAllSearches(callback: coreHttp.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + getAllSearches( + options: Models.PhoneNumberAdministrationGetAllSearchesOptionalParams, + callback: coreHttp.ServiceCallback + ): void; + getAllSearches( + options?: + | Models.PhoneNumberAdministrationGetAllSearchesOptionalParams + | coreHttp.ServiceCallback, + callback?: coreHttp.ServiceCallback + ): Promise { + return this.client.sendOperationRequest( + { + options + }, + getAllSearchesOperationSpec, + callback + ) as Promise; + } + + /** + * @summary Cancels the search. This means existing numbers in the search will be made available. + * @param searchId The search id to be canceled + * @param [options] The optional parameters + * @returns Promise + */ + cancelSearch( + searchId: string, + options?: coreHttp.RequestOptionsBase + ): Promise; + /** + * @param searchId The search id to be canceled + * @param callback The callback + */ + cancelSearch(searchId: string, callback: coreHttp.ServiceCallback): void; + /** + * @param searchId The search id to be canceled + * @param options The optional parameters + * @param callback The callback + */ + cancelSearch( + searchId: string, + options: coreHttp.RequestOptionsBase, + callback: coreHttp.ServiceCallback + ): void; + cancelSearch( + searchId: string, + options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, + callback?: coreHttp.ServiceCallback + ): Promise { + return this.client.sendOperationRequest( + { + searchId, + options + }, + cancelSearchOperationSpec, + callback + ); + } + + /** + * @summary Purchases the phone number search. + * @param searchId The search id to be purchased + * @param [options] The optional parameters + * @returns Promise + */ + purchaseSearch( + searchId: string, + options?: coreHttp.RequestOptionsBase + ): Promise; + /** + * @param searchId The search id to be purchased + * @param callback The callback + */ + purchaseSearch(searchId: string, callback: coreHttp.ServiceCallback): void; + /** + * @param searchId The search id to be purchased + * @param options The optional parameters + * @param callback The callback + */ + purchaseSearch( + searchId: string, + options: coreHttp.RequestOptionsBase, + callback: coreHttp.ServiceCallback + ): void; + purchaseSearch( + searchId: string, + options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, + callback?: coreHttp.ServiceCallback + ): Promise { + return this.client.sendOperationRequest( + { + searchId, + options + }, + purchaseSearchOperationSpec, + callback + ); + } +} + +// Operation Specifications +const serializer = new coreHttp.Serializer(Mappers); +const getAllPhoneNumbersOperationSpec: coreHttp.OperationSpec = { + httpMethod: "GET", + path: "administration/phonenumbers/phonenumbers", + urlParameters: [Parameters.endpoint], + queryParameters: [Parameters.locale, Parameters.skip, Parameters.take, Parameters.apiVersion], + responses: { + 200: { + bodyMapper: Mappers.AcquiredPhoneNumbers + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getAllAreaCodesOperationSpec: coreHttp.OperationSpec = { + httpMethod: "POST", + path: "administration/phonenumbers/countries/{countryCode}/areacodes", + urlParameters: [Parameters.endpoint, Parameters.countryCode], + queryParameters: [Parameters.locationType, Parameters.phonePlanId, Parameters.apiVersion], + requestBody: { + parameterPath: { + locationOptions: ["options", "locationOptions"] + }, + mapper: Mappers.LocationOptionsQueries + }, + responses: { + 200: { + bodyMapper: Mappers.AreaCodes + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getCapabilitiesUpdateOperationSpec: coreHttp.OperationSpec = { + httpMethod: "GET", + path: "administration/phonenumbers/capabilities/{capabilitiesUpdateId}", + urlParameters: [Parameters.endpoint, Parameters.capabilitiesUpdateId], + queryParameters: [Parameters.apiVersion], + responses: { + 200: { + bodyMapper: Mappers.UpdatePhoneNumberCapabilitiesResponse + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const updateCapabilitiesOperationSpec: coreHttp.OperationSpec = { + httpMethod: "POST", + path: "administration/phonenumbers/capabilities", + urlParameters: [Parameters.endpoint], + queryParameters: [Parameters.apiVersion], + requestBody: { + parameterPath: { + phoneNumberCapabilitiesUpdate: "phoneNumberCapabilitiesUpdate" + }, + mapper: Mappers.UpdateNumberCapabilitiesRequest + }, + responses: { + 200: { + bodyMapper: Mappers.UpdateNumberCapabilitiesResponse + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getAllSupportedCountriesOperationSpec: coreHttp.OperationSpec = { + httpMethod: "GET", + path: "administration/phonenumbers/countries", + urlParameters: [Parameters.endpoint], + queryParameters: [Parameters.locale, Parameters.skip, Parameters.take, Parameters.apiVersion], + responses: { + 200: { + bodyMapper: Mappers.PhoneNumberCountries + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getNumberConfigurationOperationSpec: coreHttp.OperationSpec = { + httpMethod: "POST", + path: "administration/phonenumbers/numberconfiguration", + urlParameters: [Parameters.endpoint], + queryParameters: [Parameters.apiVersion], + requestBody: { + parameterPath: { + phoneNumber: "phoneNumber" + }, + mapper: Mappers.NumberConfigurationPhoneNumber + }, + responses: { + 200: { + bodyMapper: Mappers.NumberConfigurationResponse + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const configureNumberOperationSpec: coreHttp.OperationSpec = { + httpMethod: "PATCH", + path: "administration/phonenumbers/numberconfiguration/configure", + urlParameters: [Parameters.endpoint], + queryParameters: [Parameters.apiVersion], + requestBody: { + parameterPath: { + pstnConfiguration: "pstnConfiguration", + phoneNumber: "phoneNumber" + }, + mapper: Mappers.NumberConfiguration + }, + responses: { + 200: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const unconfigureNumberOperationSpec: coreHttp.OperationSpec = { + httpMethod: "PATCH", + path: "administration/phonenumbers/numberconfiguration/unconfigure", + urlParameters: [Parameters.endpoint], + queryParameters: [Parameters.apiVersion], + requestBody: { + parameterPath: { + phoneNumber: "phoneNumber" + }, + mapper: Mappers.NumberConfigurationPhoneNumber + }, + responses: { + 200: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getPhonePlanGroupsOperationSpec: coreHttp.OperationSpec = { + httpMethod: "GET", + path: "administration/phonenumbers/countries/{countryCode}/phoneplangroups", + urlParameters: [Parameters.endpoint, Parameters.countryCode], + queryParameters: [ + Parameters.locale, + Parameters.includeRateInformation, + Parameters.skip, + Parameters.take, + Parameters.apiVersion + ], + responses: { + 200: { + bodyMapper: Mappers.PhonePlanGroups + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getPhonePlansOperationSpec: coreHttp.OperationSpec = { + httpMethod: "GET", + path: + "administration/phonenumbers/countries/{countryCode}/phoneplangroups/{phonePlanGroupId}/phoneplans", + urlParameters: [Parameters.endpoint, Parameters.countryCode, Parameters.phonePlanGroupId], + queryParameters: [Parameters.locale, Parameters.skip, Parameters.take, Parameters.apiVersion], + responses: { + 200: { + bodyMapper: Mappers.PhonePlansResponse + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getPhonePlanLocationOptionsOperationSpec: coreHttp.OperationSpec = { + httpMethod: "GET", + path: + "administration/phonenumbers/countries/{countryCode}/phoneplangroups/{phonePlanGroupId}/phoneplans/{phonePlanId}/locationoptions", + urlParameters: [ + Parameters.endpoint, + Parameters.countryCode, + Parameters.phonePlanGroupId, + Parameters.phonePlanId + ], + queryParameters: [Parameters.locale, Parameters.apiVersion], + responses: { + 200: { + bodyMapper: Mappers.LocationOptionsResponse + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getReleaseByIdOperationSpec: coreHttp.OperationSpec = { + httpMethod: "GET", + path: "administration/phonenumbers/releases/{releaseId}", + urlParameters: [Parameters.endpoint, Parameters.releaseId], + queryParameters: [Parameters.apiVersion], + responses: { + 200: { + bodyMapper: Mappers.PhoneNumberRelease + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const releasePhoneNumbersOperationSpec: coreHttp.OperationSpec = { + httpMethod: "POST", + path: "administration/phonenumbers/releases", + urlParameters: [Parameters.endpoint], + queryParameters: [Parameters.apiVersion], + requestBody: { + parameterPath: { + phoneNumbers: "phoneNumbers" + }, + mapper: Mappers.ReleaseRequest + }, + responses: { + 200: { + bodyMapper: Mappers.ReleaseResponse + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getAllReleasesOperationSpec: coreHttp.OperationSpec = { + httpMethod: "GET", + path: "administration/phonenumbers/releases", + urlParameters: [Parameters.endpoint], + queryParameters: [Parameters.skip, Parameters.take, Parameters.apiVersion], + responses: { + 200: { + bodyMapper: Mappers.PhoneNumberEntities + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getSearchByIdOperationSpec: coreHttp.OperationSpec = { + httpMethod: "GET", + path: "administration/phonenumbers/searches/{searchId}", + urlParameters: [Parameters.endpoint, Parameters.searchId], + queryParameters: [Parameters.apiVersion], + responses: { + 200: { + bodyMapper: Mappers.PhoneNumberReservation + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const createSearchOperationSpec: coreHttp.OperationSpec = { + httpMethod: "POST", + path: "administration/phonenumbers/searches", + urlParameters: [Parameters.endpoint], + queryParameters: [Parameters.apiVersion], + requestBody: { + parameterPath: { + displayName: "displayName", + description: "description", + phonePlanIds: "phonePlanIds", + areaCode: "areaCode", + quantity: ["options", "quantity"], + locationOptions: ["options", "locationOptions"] + }, + mapper: Mappers.CreateSearchOptions + }, + responses: { + 201: { + bodyMapper: Mappers.CreateSearchResponse + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getAllSearchesOperationSpec: coreHttp.OperationSpec = { + httpMethod: "GET", + path: "administration/phonenumbers/searches", + urlParameters: [Parameters.endpoint], + queryParameters: [Parameters.skip, Parameters.take, Parameters.apiVersion], + responses: { + 200: { + bodyMapper: Mappers.PhoneNumberEntities + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const cancelSearchOperationSpec: coreHttp.OperationSpec = { + httpMethod: "POST", + path: "administration/phonenumbers/searches/{searchId}/cancel", + urlParameters: [Parameters.endpoint, Parameters.searchId], + queryParameters: [Parameters.apiVersion], + responses: { + 202: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const purchaseSearchOperationSpec: coreHttp.OperationSpec = { + httpMethod: "POST", + path: "administration/phonenumbers/searches/{searchId}/purchase", + urlParameters: [Parameters.endpoint, Parameters.searchId], + queryParameters: [Parameters.apiVersion], + responses: { + 202: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/communication/communication-administration/src/phoneNumber/generated/src/phoneNumberRestClient.ts b/sdk/communication/communication-administration/src/phoneNumber/generated/src/phoneNumberRestClient.ts new file mode 100644 index 000000000000..dd746469d357 --- /dev/null +++ b/sdk/communication/communication-administration/src/phoneNumber/generated/src/phoneNumberRestClient.ts @@ -0,0 +1,41 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * 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 * as coreHttp from "@azure/core-http"; +import * as Models from "./models"; +import * as Mappers from "./models/mappers"; +import * as operations from "./operations"; +import { PhoneNumberRestClientContext } from "./phoneNumberRestClientContext"; + +class PhoneNumberRestClient extends PhoneNumberRestClientContext { + // Operation groups + phoneNumberAdministration: operations.PhoneNumberAdministration; + + /** + * Initializes a new instance of the PhoneNumberRestClient class. + * @param apiVersion Version of API to invoke + * @param endpoint The endpoint of the Azure Communication resource. + * @param [options] The parameter options + */ + constructor(apiVersion: string, endpoint: string, options?: coreHttp.ServiceClientOptions) { + super(apiVersion, endpoint, options); + this.phoneNumberAdministration = new operations.PhoneNumberAdministration(this); + } +} + +// Operation Specifications + +export { + PhoneNumberRestClient, + PhoneNumberRestClientContext, + Models as PhoneNumberRestModels, + Mappers as PhoneNumberRestMappers +}; +export * from "./operations"; diff --git a/sdk/communication/communication-administration/src/phoneNumber/generated/src/phoneNumberRestClientContext.ts b/sdk/communication/communication-administration/src/phoneNumber/generated/src/phoneNumberRestClientContext.ts new file mode 100644 index 000000000000..f2b3a85485c9 --- /dev/null +++ b/sdk/communication/communication-administration/src/phoneNumber/generated/src/phoneNumberRestClientContext.ts @@ -0,0 +1,50 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * 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 * as coreHttp from "@azure/core-http"; + +const packageName = "azure-communication-administration-phoneNumber"; +const packageVersion = "1.0.0-beta.1"; + +export class PhoneNumberRestClientContext extends coreHttp.ServiceClient { + apiVersion: string; + endpoint: string; + + /** + * Initializes a new instance of the PhoneNumberRestClientContext class. + * @param apiVersion Version of API to invoke + * @param endpoint The endpoint of the Azure Communication resource. + * @param [options] The parameter options + */ + constructor(apiVersion: string, endpoint: string, options?: coreHttp.ServiceClientOptions) { + if (apiVersion == undefined) { + throw new Error("'apiVersion' cannot be null."); + } + if (endpoint == undefined) { + throw new Error("'endpoint' cannot be null."); + } + + if (!options) { + options = {}; + } + + if (!options.userAgent) { + const defaultUserAgent = coreHttp.getDefaultUserAgentValue(); + options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`; + } + + super(undefined, options); + + this.baseUri = "{endpoint}"; + this.requestContentType = "application/json; charset=utf-8"; + this.apiVersion = apiVersion; + this.endpoint = endpoint; + } +} diff --git a/sdk/communication/communication-administration/src/phoneNumber/lro/phoneNumberPollerBase.ts b/sdk/communication/communication-administration/src/phoneNumber/lro/phoneNumberPollerBase.ts new file mode 100644 index 000000000000..77ddfd868fd3 --- /dev/null +++ b/sdk/communication/communication-administration/src/phoneNumber/lro/phoneNumberPollerBase.ts @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { delay, operationOptionsToRequestOptionsBase } from "@azure/core-http"; +import { Poller, PollOperation } from "@azure/core-lro"; +import { CanonicalCode } from "@opentelemetry/api"; +import { VoidResponse } from "../../common/models"; +import { attachHttpResponse } from "../../common/mappers"; +import { createSpan } from "../../common/tracing"; +import { PhoneNumberAdministration } from "../generated/src/phoneNumberRestClient"; +import { CancelReservationOptions, GetReservationOptions, GetReservationResponse } from "../models"; +import { PhoneNumberReservation } from "../generated/src/models"; + +/** + * Common properties and methods of the phone number pollers. + */ +export abstract class PhoneNumberPollerBase extends Poller { + /** + * Defines how much time the poller is going to wait before making a new request to the service. + */ + public pollInterval: number = 2000; + + /** + * The method used by the poller to wait before attempting to update its operation + */ + async delay(): Promise { + return delay(this.pollInterval); + } +} + +/** + * Common properties and methods of the phone number poller operations. + */ +export class PhoneNumberPollOperationBase + implements PollOperation { + /** + * Initializes a new instance of the phone number poll operation + * + * @param {TState} state The state of the poll operation + * @param {string} cancelMessage A message to dispaly when a poll operation is cancelled. + */ + constructor(public state: TState, private cancelMessage: string = "Canceling not supported.") {} + + /** + * Reaches to the service and updates the Poller operation. + */ + public async update(): Promise> { + throw new Error("Operation not supported"); + } + + /** + * Reaches to the service and cancels the Poller operation and the underlying request. + */ + public async cancel(): Promise> { + throw new Error(this.cancelMessage); + } + + /** + * @summary Serializes the Poller operation. + */ + public toString(): string { + return JSON.stringify({ + state: this.state + }); + } +} + +/** + * Common properties and methods of the phone number reservation poller operations. + */ +export class PhoneNumberReservationPollOperationBase + implements PollOperation { + /** + * Initializes a new instance of the phone number reservation poll operation + * + * @param {TState} state The state of the poll operation + * @param {PhoneNumberAdministration} client A reference to the generated client used to make requests internally. + * @param {string} cancelMessage A message to dispaly when a poll operation is cancelled. + */ + constructor( + public state: TState, + private client: PhoneNumberAdministration, + private cancelMessage: string = "Canceling not supported." + ) {} + + /** + * Gets the reservation associated with a given id. + * + * @param {string} reservationId The id of the reservation to fetch. + * @param {GetReservationOptions} options Additional request options. + */ + public async getReservation( + reservationId: string, + options: GetReservationOptions = {} + ): Promise { + const { span, updatedOptions } = createSpan( + "PhoneNumberAdministrationClient-getReservation", + options + ); + try { + const { _response, ...rest } = await this.client.getSearchById( + reservationId, + operationOptionsToRequestOptionsBase(updatedOptions) + ); + return attachHttpResponse(rest, _response); + } catch (e) { + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e.message + }); + throw e; + } finally { + span.end(); + } + } + + /** + * Cancels the reservation associated with a given id. + * + * @param {string} reservationId The id of the reservation to cancel. + * @param {CancelReservationOptions} options Additional request options. + */ + public async cancelReservation( + reservationId: string, + options: CancelReservationOptions = {} + ): Promise { + const { span, updatedOptions } = createSpan( + "PhoneNumberAdministrationClient-cancelReservation", + options + ); + try { + const { _response } = await this.client.cancelSearch( + reservationId, + operationOptionsToRequestOptionsBase(updatedOptions) + ); + return attachHttpResponse({}, _response); + } catch (e) { + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e.message + }); + throw e; + } finally { + span.end(); + } + } + + /** + * Reaches to the service and updates the Poller operation. + */ + public async update(): Promise> { + throw new Error("Operation not supported"); + } + + /** + * Reaches to the service and cancels the Poller operation and the underlying request. + */ + public async cancel(): Promise> { + throw new Error(this.cancelMessage); + } + + /** + * @summary Serializes the Poller operation. + */ + public toString(): string { + return JSON.stringify({ + state: this.state + }); + } +} diff --git a/sdk/communication/communication-administration/src/phoneNumber/lro/purchase/operation.ts b/sdk/communication/communication-administration/src/phoneNumber/lro/purchase/operation.ts new file mode 100644 index 000000000000..ff0d2d0d1926 --- /dev/null +++ b/sdk/communication/communication-administration/src/phoneNumber/lro/purchase/operation.ts @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { OperationOptions, operationOptionsToRequestOptionsBase } from "@azure/core-http"; +import { CanonicalCode } from "@opentelemetry/api"; +import { attachHttpResponse } from "../../../common/mappers"; +import { VoidResponse } from "../../../common/models"; +import { createSpan } from "../../../common/tracing"; +import { PhoneNumberAdministration } from "../../generated/src/phoneNumberRestClient"; +import { PurchaseReservationPollOperationState, UpdatePollerOptions } from "../../lroModels"; +import { PurchaseReservationOptions } from "../../models"; +import { PhoneNumberReservationPollOperationBase } from "../phoneNumberPollerBase"; +import { isComplete } from "../utils"; + +/** + * The poll operation for purchasing a phone number reservation. + */ +export class PurchaseReservationPollOperation extends PhoneNumberReservationPollOperationBase< + PurchaseReservationPollOperationState, + void +> { + /** + * Initializes an instance of PurchaseReservationPollOperation + * + * @param {PurchaseReservationPollOperationState} state The state of the poll operation + * @param {PhoneNumberAdministration} _client A reference to the generated client used to make requests internally. + * @param {OperationOptions} requestOptions Additional options for the underlying requests. + */ + constructor( + public state: PurchaseReservationPollOperationState, + private _client: PhoneNumberAdministration, + private requestOptions: OperationOptions + ) { + super(state, _client); + } + + /** + * Purchases the phone number(s) in the reservation associated with a given id. + * + * @param {string} reservationId The id of the reservation being purchased. + * @param {PurchaseReservationOptions} options Additional request options. + */ + private async purchaseReservation( + reservationId: string, + options: PurchaseReservationOptions = {} + ): Promise { + const { span, updatedOptions } = createSpan( + "PhoneNumberAdministrationClient-purchaseReservation", + options + ); + try { + const { _response } = await this._client.purchaseSearch( + reservationId, + operationOptionsToRequestOptionsBase(updatedOptions) + ); + return attachHttpResponse({}, _response); + } catch (e) { + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e.message + }); + throw e; + } finally { + span.end(); + } + } + + /** + * Reaches to the service and queries the status of the operation. + * + * @param {UpdatePollerOptions} [options={}] Additional options for the poll operation + */ + public async update( + options: UpdatePollerOptions = {} + ): Promise { + const state = this.state; + const { reservationId } = state; + + if (options.abortSignal) { + this.requestOptions.abortSignal = options.abortSignal; + } + + try { + if (!state.isStarted) { + await this.purchaseReservation(reservationId, this.requestOptions); + state.isStarted = true; + } + + if (!state.isCompleted) { + const result = await this.getReservation(reservationId, this.requestOptions); + state.isCompleted = isComplete(result, "Success"); + } + } catch (error) { + state.error = error; + state.isCompleted = true; + } finally { + return this; + } + } + + /** + * Reaches to the service and cancels the operation, also updating the poll operation. + */ + public async cancel(): Promise { + const state = this.state; + const { reservationId, options = {} } = state; + + if (reservationId) { + await this.cancelReservation(reservationId, options); + } + + state.isCancelled = true; + + return this; + } +} diff --git a/sdk/communication/communication-administration/src/phoneNumber/lro/purchase/poller.ts b/sdk/communication/communication-administration/src/phoneNumber/lro/purchase/poller.ts new file mode 100644 index 000000000000..e5e9b375ccae --- /dev/null +++ b/sdk/communication/communication-administration/src/phoneNumber/lro/purchase/poller.ts @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { + PurchaseReservationPollerOptions, + PurchaseReservationPollOperationState +} from "../../lroModels"; +import { PhoneNumberPollerBase } from "../phoneNumberPollerBase"; +import { PurchaseReservationPollOperation } from "./operation"; + +/** + * The poller for purchasing a phone number reservation. + */ +export class PurchaseReservationPoller extends PhoneNumberPollerBase< + PurchaseReservationPollOperationState, + void +> { + /** + * Initializes an instance of PurchaseReservationPoller + * + * @param {PurchaseReservationPollerOptions} options Options for initializing the poller. + */ + constructor(options: PurchaseReservationPollerOptions) { + const { client, reservationId, requestOptions = {}, pollInterval = 2000, resumeFrom } = options; + let state: PurchaseReservationPollOperationState | undefined; + + if (resumeFrom) { + state = JSON.parse(resumeFrom).state; + } + + const operation = new PurchaseReservationPollOperation( + { + ...state, + reservationId + }, + client, + requestOptions + ); + + super(operation); + + this.pollInterval = pollInterval; + } +} diff --git a/sdk/communication/communication-administration/src/phoneNumber/lro/release/operation.ts b/sdk/communication/communication-administration/src/phoneNumber/lro/release/operation.ts new file mode 100644 index 000000000000..0ce37da5a01a --- /dev/null +++ b/sdk/communication/communication-administration/src/phoneNumber/lro/release/operation.ts @@ -0,0 +1,137 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { OperationOptions, operationOptionsToRequestOptionsBase } from "@azure/core-http"; +import { CanonicalCode } from "@opentelemetry/api"; +import { + GetReleaseOptions, + GetReleaseResponse, + ReleasePhoneNumbersOptions, + ReleasePhoneNumbersResponse +} from "../../models"; +import { attachHttpResponse } from "../../../common/mappers"; +import { createSpan } from "../../../common/tracing"; +import { PhoneNumberRelease, ReleaseResponse } from "../../generated/src/models"; +import { PhoneNumberAdministration } from "../../generated/src/phoneNumberRestClient"; +import { ReleasePhoneNumbersPollOperationState, UpdatePollerOptions } from "../../lroModels"; +import { PhoneNumberPollOperationBase } from "../phoneNumberPollerBase"; +import { isComplete } from "../utils"; + +/** + * The poll operation for releasing a phone number or list of phone numbers. + */ +export class ReleasePhoneNumbersPollOperation extends PhoneNumberPollOperationBase< + ReleasePhoneNumbersPollOperationState, + PhoneNumberRelease +> { + /** + * Initializes an instance of PurchaseReservationPollOperation + * + * @param {ReleasePhoneNumbersPollOperationState} state The state of the poll operation + * @param {PhoneNumberAdministration} client A reference to the generated client used to make requests internally. + * @param {OperationOptions} requestOptions Additional options for the underlying requests. + */ + constructor( + public state: ReleasePhoneNumbersPollOperationState, + private client: PhoneNumberAdministration, + private requestOptions: OperationOptions + ) { + super(state, "Canceling a release is not supported."); + } + + /** + * Request the release of a list of acquired phone numbers. + * + * @param {string[]} phoneNumbers The phone numbers to be released. + * @param {ReleasePhoneNumbersOptions} options Additional request options. + */ + private async releasePhoneNumbers( + phoneNumbers: string[], + options: ReleasePhoneNumbersOptions = {} + ): Promise { + const { span, updatedOptions } = createSpan( + "PhoneNumberAdministrationClient-releasePhoneNumbers", + options + ); + try { + const { releaseId, _response } = await this.client.releasePhoneNumbers( + phoneNumbers, + operationOptionsToRequestOptionsBase(updatedOptions) + ); + return attachHttpResponse({ releaseId }, _response); + } catch (e) { + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e.message + }); + throw e; + } finally { + span.end(); + } + } + + /** + * Gets the release associated with a given id. + * + * @param {string} releaseId The id of the release returned by releasePhoneNumbers. + * @param {GetReleaseOptions} options Additional request options. + */ + private async getRelease( + releaseId: string, + options: GetReleaseOptions = {} + ): Promise { + const { span, updatedOptions } = createSpan( + "PhoneNumberAdministrationClient-getRelease", + options + ); + try { + const { _response, ...rest } = await this.client.getReleaseById( + releaseId, + operationOptionsToRequestOptionsBase(updatedOptions) + ); + return attachHttpResponse(rest, _response); + } catch (e) { + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e.message + }); + throw e; + } finally { + span.end(); + } + } + + /** + * Reaches to the service and queries the status of the operation. + * + * @param {UpdatePollerOptions} [options={}] Additional options for the poll operation + */ + public async update( + options: UpdatePollerOptions = {} + ): Promise { + const { state } = this; + const { phoneNumbers } = state; + + if (options.abortSignal) { + this.requestOptions.abortSignal = options.abortSignal; + } + + try { + if (!state.isStarted) { + const { releaseId } = await this.releasePhoneNumbers(phoneNumbers, this.requestOptions); + state.releaseId = releaseId; + state.isStarted = true; + } + + if (!state.isCompleted && state.releaseId) { + state.result = await this.getRelease(state.releaseId, this.requestOptions); + state.isCompleted = isComplete(state.result, "Complete"); + } + } catch (error) { + state.error = error; + state.isCompleted = true; + } finally { + return this; + } + } +} diff --git a/sdk/communication/communication-administration/src/phoneNumber/lro/release/poller.ts b/sdk/communication/communication-administration/src/phoneNumber/lro/release/poller.ts new file mode 100644 index 000000000000..b07a3e69fb97 --- /dev/null +++ b/sdk/communication/communication-administration/src/phoneNumber/lro/release/poller.ts @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { PhoneNumberRelease } from "../../generated/src/models"; +import { + ReleasePhoneNumbersPollerOptions, + ReleasePhoneNumbersPollOperationState +} from "../../lroModels"; +import { PhoneNumberPollerBase } from "../phoneNumberPollerBase"; +import { ReleasePhoneNumbersPollOperation } from "./operation"; + +/** + * The poller for release a phone number or list of phone numbers. + */ +export class ReleasePhoneNumbersPoller extends PhoneNumberPollerBase< + ReleasePhoneNumbersPollOperationState, + PhoneNumberRelease +> { + /** + * Initializes an instance of ReleasePhoneNumbersPoller + * + * @param {ReleasePhoneNumbersPollerOptions} options Options for initializing the poller. + */ + constructor(options: ReleasePhoneNumbersPollerOptions) { + const { client, phoneNumbers, requestOptions = {}, pollInterval = 2000, resumeFrom } = options; + let state: ReleasePhoneNumbersPollOperationState | undefined; + + if (resumeFrom) { + state = JSON.parse(resumeFrom).state; + } + + const operation = new ReleasePhoneNumbersPollOperation( + { + ...state, + phoneNumbers + }, + client, + requestOptions + ); + + super(operation); + + this.pollInterval = pollInterval; + } +} diff --git a/sdk/communication/communication-administration/src/phoneNumber/lro/reserve/operation.ts b/sdk/communication/communication-administration/src/phoneNumber/lro/reserve/operation.ts new file mode 100644 index 000000000000..c64574117c18 --- /dev/null +++ b/sdk/communication/communication-administration/src/phoneNumber/lro/reserve/operation.ts @@ -0,0 +1,130 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { operationOptionsToRequestOptionsBase, RequestOptionsBase } from "@azure/core-http"; +import { CanonicalCode } from "@opentelemetry/api"; +import { + CreateReservationRequest, + CreateReservationOptions, + CreatePhoneNumberReservationResponse, + CreateReservationResponse +} from "../../models"; +import { attachHttpResponse } from "../../../common/mappers"; +import { createSpan } from "../../../common/tracing"; +import { PhoneNumberReservation } from "../../generated/src/models"; +import { PhoneNumberAdministration } from "../../generated/src/phoneNumberRestClient"; +import { ReservePhoneNumbersPollOperationState, UpdatePollerOptions } from "../../lroModels"; +import { PhoneNumberReservationPollOperationBase } from "../phoneNumberPollerBase"; +import { isComplete } from "../utils"; + +/** + * The poll operation for reserving phone numbers. + */ +export class ReservePhoneNumbersPollOperation extends PhoneNumberReservationPollOperationBase< + ReservePhoneNumbersPollOperationState, + PhoneNumberReservation +> { + /** + * Initializes an instance of ReservePhoneNumbersPollOperation + * + * @param {PurchaseReservationPollOperationState} state The state of the poll operation + * @param {PhoneNumberAdministration} _client A reference to the generated client used to make requests internally. + * @param {OperationOptions} requestOptions Additional options for the underlying requests. + */ + constructor( + public state: ReservePhoneNumbersPollOperationState, + private _client: PhoneNumberAdministration, + private requestOptions: RequestOptionsBase + ) { + super(state, _client); + } + + /** + * Starts a search for phone numbers given some constraints such as name or area code. The phone numbers that are + * found will then be reserved. + * + * @param {CreateReservationRequest} reservationRequest Request properties to constraint the search scope. + * @param {CreateReservationOptions} options Additional request options. + */ + private async createReservation( + reservationRequest: CreateReservationRequest, + options: CreateReservationOptions = {} + ): Promise { + const { name, description, phonePlanIds, areaCode, quantity } = reservationRequest; + const { span, updatedOptions } = createSpan( + "PhoneNumberAdministrationClient-createReservation", + Object.assign(options, { quantity }) + ); + try { + const { searchId, _response } = await this._client.createSearch( + name, + description, + phonePlanIds, + areaCode, + operationOptionsToRequestOptionsBase(updatedOptions) + ); + return attachHttpResponse({ reservationId: searchId }, _response); + } catch (e) { + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e.message + }); + throw e; + } finally { + span.end(); + } + } + + /** + * Reaches to the service and queries the status of the operation. + * + * @param {UpdatePollerOptions} [options={}] Additional options for the poll operation + */ + public async update( + options: UpdatePollerOptions = {} + ): Promise { + const state = this.state; + const { reservationRequest } = state; + + if (options.abortSignal) { + this.requestOptions.abortSignal = options.abortSignal; + } + + try { + if (!state.isStarted) { + const { reservationId } = await this.createReservation( + reservationRequest, + this.requestOptions + ); + state.reservationId = reservationId; + state.isStarted = true; + } + + if (!state.isCompleted && state.reservationId) { + state.result = await this.getReservation(state.reservationId, this.requestOptions); + state.isCompleted = isComplete(state.result, "Reserved"); + } + } catch (error) { + state.error = error; + state.isCompleted = true; + } finally { + return this; + } + } + + /** + * Reaches to the service and cancels the operation, also updating the poll operation. + */ + public async cancel(): Promise { + const state = this.state; + const { reservationId, options = {} } = state; + + if (reservationId) { + await this.cancelReservation(reservationId, options); + } + + state.isCancelled = true; + + return this; + } +} diff --git a/sdk/communication/communication-administration/src/phoneNumber/lro/reserve/poller.ts b/sdk/communication/communication-administration/src/phoneNumber/lro/reserve/poller.ts new file mode 100644 index 000000000000..15ba06c48959 --- /dev/null +++ b/sdk/communication/communication-administration/src/phoneNumber/lro/reserve/poller.ts @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { PhoneNumberReservation } from "../../generated/src/models"; +import { + ReservePhoneNumbersPollerOptions, + ReservePhoneNumbersPollOperationState +} from "../../lroModels"; +import { PhoneNumberPollerBase } from "../phoneNumberPollerBase"; +import { ReservePhoneNumbersPollOperation } from "./operation"; + +/** + * The poller for reserving phone numbers. + */ +export class ReservePhoneNumbersPoller extends PhoneNumberPollerBase< + ReservePhoneNumbersPollOperationState, + PhoneNumberReservation +> { + /** + * Initializes an instance of ReservePhoneNumbersPoller + * + * @param {ReservePhoneNumbersPollerOptions} options Options for initializing the poller. + */ + constructor(options: ReservePhoneNumbersPollerOptions) { + const { + client, + reservationRequest, + requestOptions = {}, + pollInterval = 2000, + resumeFrom + } = options; + let state: ReservePhoneNumbersPollOperationState | undefined; + + if (resumeFrom) { + state = JSON.parse(resumeFrom).state; + } + + const operation = new ReservePhoneNumbersPollOperation( + { + ...state, + reservationRequest + }, + client, + requestOptions + ); + + super(operation); + + this.pollInterval = pollInterval; + } +} diff --git a/sdk/communication/communication-administration/src/phoneNumber/lro/utils.ts b/sdk/communication/communication-administration/src/phoneNumber/lro/utils.ts new file mode 100644 index 000000000000..08079803a86d --- /dev/null +++ b/sdk/communication/communication-administration/src/phoneNumber/lro/utils.ts @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { PhoneNumberReservation, SearchStatus } from "../.."; +import { PhoneNumberRelease, ReleaseStatus } from "../generated/src/models"; + +export const isComplete = ( + results: PhoneNumberReservation | PhoneNumberRelease, + completionStatus: SearchStatus | ReleaseStatus +): boolean | never => { + if (results.status === "Error" || results.status === "Failed" || results.status === "Expired") { + throw new Error(JSON.stringify(results)); + } + + return results.status === completionStatus; +}; diff --git a/sdk/communication/communication-administration/src/phoneNumber/lroModels.ts b/sdk/communication/communication-administration/src/phoneNumber/lroModels.ts new file mode 100644 index 000000000000..a9b98423bb71 --- /dev/null +++ b/sdk/communication/communication-administration/src/phoneNumber/lroModels.ts @@ -0,0 +1,190 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { AbortSignalLike, OperationOptions } from "@azure/core-http"; +import { PollOperationState } from "@azure/core-lro"; +import { PhoneNumberAdministration } from "./generated/src/phoneNumberRestClient"; +import { + LocationOptionsDetails, + PhoneNumberRelease, + PhoneNumberReservation +} from "./generated/src/models"; +import { + CreateReservationOptions, + CreateReservationRequest, + ReleasePhoneNumbersOptions +} from "./models"; + +/** + * Represents the optional parameters that can be passed to phone number pollers. + */ +export interface PhoneNumberPollerOptionsBase { + /** + * Time between each polling in milliseconds. + */ + pollInterval?: number; + + /** + * A serialized poller, used to resume an existing operation + */ + resumeFrom?: string; +} + +/** + * @ignore + * Represents the optional parameters that can be passed to phone number pollers with a required client. + */ +export interface PhoneNumberPollerOptionsWithClient extends PhoneNumberPollerOptionsBase { + /** + * The client used for polling. + */ + client: PhoneNumberAdministration; +} + +/** + * Additional request options for requesting the release of a list of phone numbers. + */ +export interface BeginReleasePhoneNumbersOptions + extends PhoneNumberPollerOptionsBase, + OperationOptions {} + +/** + * Additional request options for requesting the reservation of phone numbers. + */ +export interface BeginReservePhoneNumbersOptions + extends PhoneNumberPollerOptionsBase, + OperationOptions { + quantity?: number; + + locationOptions?: LocationOptionsDetails[]; +} + +/** + * Additional request options for requesting the purchase of a phone number reservation. + */ +export interface BeginPurchaseReservationOptions + extends PhoneNumberPollerOptionsBase, + OperationOptions {} + +/** + * @ignore + * The optional parameters of the poller's update method, which are an abortSignal from @azure/abort-controller and a function that triggers the poller's onProgress function. + */ +export interface UpdatePollerOptions { + abortSignal?: AbortSignalLike; + fireProgress?: (state: T) => void; +} + +/** + * @ignore + * Represents options for creating an instance of ReleasePhoneNumbersPoller + */ +export interface ReleasePhoneNumbersPollerOptions extends PhoneNumberPollerOptionsWithClient { + /** + * The list of phone numbers to be released. + */ + phoneNumbers: string[]; + + /** + * Additional request options. + */ + requestOptions?: ReleasePhoneNumbersOptions; +} + +/** + * @ignore + * Represents options for creating an instance of ReservePhoneNumbersPoller + */ +export interface ReservePhoneNumbersPollerOptions extends PhoneNumberPollerOptionsWithClient { + /** + * Request to create reservation. + */ + reservationRequest: CreateReservationRequest; + + /** + * The id returned from the create reservation request. + */ + reservationId?: string; + + /** + * Options for creating a phone number reservation. + */ + requestOptions?: CreateReservationOptions; +} + +/** + * @ignore + * Represents options for creating an instance of PurchaseReservationPoller + */ +export interface PurchaseReservationPollerOptions extends PhoneNumberPollerOptionsWithClient { + /** + * The id returned from the create reservation request. + */ + reservationId: string; + + /** + * Options for creating a phone number reservation. + */ + requestOptions?: OperationOptions; +} + +/** + * @ignore + * Represents the operation state of the release phone numbers poller + */ +export interface ReleasePhoneNumbersPollOperationState + extends PollOperationState { + /** + * The list of phone numbers to be released. + */ + phoneNumbers: string[]; + + /** + * The releaseId returned when release operation starts. + * Used to query the status of the operation. + */ + releaseId?: string; + + /** + * Additional request options. + */ + requestOptions?: ReleasePhoneNumbersOptions; +} + +/** + * @ignore + * Represents the operation state of the reserve phone numbers poller + */ +export interface ReservePhoneNumbersPollOperationState + extends PollOperationState { + /** + * Request to create reservation. + */ + reservationRequest: CreateReservationRequest; + + /** + * The id returned from the create reservation request. + */ + reservationId?: string; + + /** + * Options for creating a phone number reservation. + */ + options?: CreateReservationOptions; +} + +/** + * @ignore + * Represents the operation state of the purchase reservation poller + */ +export interface PurchaseReservationPollOperationState extends PollOperationState { + /** + * The id returned from the create reservation request. + */ + reservationId: string; + + /** + * Options for creating a phone number reservation. + */ + options?: CreateReservationOptions; +} diff --git a/sdk/communication/communication-administration/src/phoneNumber/models.ts b/sdk/communication/communication-administration/src/phoneNumber/models.ts new file mode 100644 index 000000000000..18858af38cce --- /dev/null +++ b/sdk/communication/communication-administration/src/phoneNumber/models.ts @@ -0,0 +1,293 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { OperationOptions } from "@azure/core-http"; +import { WithResponse } from "../common/models"; +import { + LocationOptionsDetails, + NumberUpdateCapabilities, + UpdateNumberCapabilitiesResponse, + UpdatePhoneNumberCapabilitiesResponse, + ReleaseResponse, + PhoneNumberRelease, + AreaCodes, + NumberConfigurationResponse, + LocationOptionsResponse, + PhoneNumberReservation, + LocationOptionsQueries +} from "./generated/src/models"; + +/** + * Request to create phone number reservations. + */ +export interface CreateReservationRequest { + /** + * Display name of the search. + */ + name: string; + /** + * Description of the search. + */ + description: string; + /** + * List of subTypeIds associated with the search. + */ + phonePlanIds: string[]; + /** + * Areacode to search for. + */ + areaCode: string; + /** + * The number of phone numbers to return + */ + quantity: number; +} + +/** + * Options for creating a search. + */ +export interface CreateReservationOptions extends OperationOptions { + /** + * The location options of the search. + */ + locationOptions?: LocationOptionsDetails[]; +} + +export interface CreateReservationResponse { + reservationId: string; +} + +/** + * A request for configuring a phone number. + */ +export interface ConfigurePhoneNumberRequest { + /** + * The E.164 representation representation of the phone number. + */ + phoneNumber: string; + /** + * Associates the phone number with a given callback URL. + */ + callbackUrl: string; +} + +/** + * Options for configuring a phone number. + */ +export interface ConfigurePhoneNumberOptions extends OperationOptions { + /** + * Associates the phone number with a given applicationId. + */ + applicationId?: string; + /** + * Routable TargetId for the ACS Number + */ + azurePstnTargetId?: string; +} + +/** + * Base options to pass a locale that is used for localizing strings in the responses. + */ +export interface LocalizationOptions extends OperationOptions { + /** + * Set locale to localize strings in responses. + */ + locale?: string; +} + +/** + * Base options to pass pagination parameters. + */ +export interface PageableOptions extends OperationOptions { + /** + * An optional parameter for how many entries to skip, for pagination purposes. Default value: 0. + */ + skip?: number; + /** + * An optional parameter for how many entries to return, for pagination purposes. Default value: + * 100. + */ + take?: number; +} + +/** + * Base options to pass a locale and pagination parameters in the same request. + */ +export interface PageableLocalizationOptions extends PageableOptions, LocalizationOptions {} + +/** + * Options for querying supported countries. + */ +export type ListSupportedCountriesOptions = PageableLocalizationOptions; + +/** + * Options for listing acquired phone numbers. + */ +export type ListPhoneNumbersOptions = PageableLocalizationOptions; + +/** + * Options for querying plan groups by country. + */ +export interface ListPhonePlanGroupsOptions extends PageableLocalizationOptions { + includeRateInformation?: boolean; +} + +/** + * Request to get available area codes. + */ +export interface GetAreaCodesRequest { + /** + * The type of location information required by the plan. + */ + locationType: string; + /** + * The ISO 3166-2 country code to find national destination codes for. + */ + countryCode: string; + /** + * The phone plan's id. + */ + phonePlanId: string; + /** + * Represents a list of location option queries, used for fetching area codes. + */ + locationOptionsQueries: LocationOptionsQueries; +} + +/** + * Options for querying available area codes. + */ +export type GetAreaCodesOptions = OperationOptions; + +/** + * Additional request options for unconfiguring a phone number. + */ +export type UnconfigurePhoneNumberOptions = OperationOptions; + +/** + * Additional request options for getting the update capabilities request. + */ +export type GetCapabilitiesUpdateOptions = OperationOptions; + +/** + * Additional request options for requesting the release of a list of phone numbers. + */ +export type ReleasePhoneNumbersOptions = OperationOptions; + +/** + * Additional request options for getting a release. + */ +export type GetReleaseOptions = OperationOptions; + +/** + * Additional request options for getting the configuration of a phone number. + */ +export type GetPhoneNumberConfigurationOptions = OperationOptions; + +/** + * Additional request option for the get phone number reservation operation. + */ +export type GetReservationOptions = OperationOptions; + +/** + * Additional request option for the cancel phone number reservation operation. + */ +export type CancelReservationOptions = OperationOptions; + +/** + * Additional request option for the purchase reservation operation. + */ +export type PurchaseReservationOptions = OperationOptions; + +/** + * The capabilities update for each of a set of phone numbers. + */ +export type PhoneNumberCapabilitiesUpdates = { [propertyName: string]: NumberUpdateCapabilities }; + +/** + * Additional options for updating phone numbers capabilities. + */ +export interface UpdateCapabilitiesOptions extends OperationOptions { + phoneNumbers?: PhoneNumberCapabilitiesUpdates; +} + +export interface ListPhonePlansRequest { + /** + * The ISO 3166-2 country code to find national destination codes for. + */ + countryCode: string; + /** + * The id of the phone plan group to get plans from. + */ + phonePlanGroupId: string; +} + +/** + * Options for listing phone plans. + */ +export type ListPhonePlansOptions = PageableLocalizationOptions; + +export interface GetPhonePlanLocationOptionsRequest extends PageableLocalizationOptions { + /** + * The ISO 3166-2 country code to find national destination codes for. + */ + countryCode: string; + /** + * The id of the phone plan group. + */ + phonePlanGroupId: string; + /** + * The id of the phone plan. + */ + phonePlanId: string; +} + +/** + * Options for getting a plan location options + */ +export type GetPhonePlanLocationOptionsOptions = PageableLocalizationOptions; + +/** + * Represents the response from updating the capabilities for a list of phone numbers. + */ +export type UpdateNumbersCapabilitiesResponse = WithResponse; + +/** + * Represents the response from getting the update capabilities request associated with a given id. + */ +export type GetCapabilitiesUpdateResponse = WithResponse; + +/** + * Represents the response from requesting the release of a list of acquired phone numbers. + */ +export type ReleasePhoneNumbersResponse = WithResponse; + +/** + * Represents the response from getting the release associated with a given id. + */ +export type GetReleaseResponse = WithResponse; + +/** + * Represents the response from starting a search for phone numbers. + */ +export type CreatePhoneNumberReservationResponse = WithResponse; + +/** + * Represents the response from getting a list of the supported area codes. + */ +export type GetAreaCodesResponse = WithResponse; + +/** + * Represents the response from getting the configuration for a given number. + */ +export type GetPhoneNumberConfigurationResponse = WithResponse; + +/** + * Represents the response from getting the location options for a given phone plan. + */ +export type GetPhonePlanLocationOptionsResponse = WithResponse; + +/** + * Represents the response from getting the search associated with a given id. + */ +export type GetReservationResponse = WithResponse; diff --git a/sdk/communication/communication-administration/src/phoneNumber/phoneNumberAdministrationClient.ts b/sdk/communication/communication-administration/src/phoneNumber/phoneNumberAdministrationClient.ts new file mode 100644 index 000000000000..8442160d6831 --- /dev/null +++ b/sdk/communication/communication-administration/src/phoneNumber/phoneNumberAdministrationClient.ts @@ -0,0 +1,1082 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +/// + +import { + createCommunicationAccessKeyCredentialPolicy, + parseClientArguments, + isKeyCredential +} from "@azure/communication-common"; +import { KeyCredential } from "@azure/core-auth"; +import { + PipelineOptions, + InternalPipelineOptions, + createPipelineFromOptions, + operationOptionsToRequestOptionsBase +} from "@azure/core-http"; +import "@azure/core-paging"; +import { PageSettings, PagedAsyncIterableIterator } from "@azure/core-paging"; +import { CanonicalCode } from "@opentelemetry/api"; +import { logger } from "../common/logger"; +import { createSpan } from "../common/tracing"; +import { + PhoneNumberRestClient, + PhoneNumberAdministration +} from "./generated/src/phoneNumberRestClient"; +import { + AcquiredPhoneNumber, + PhoneNumberCountry, + PhonePlanGroup, + PhonePlan, + PhoneNumberEntity, + UpdatePhoneNumberCapabilitiesResponse, + UpdateNumberCapabilitiesResponse, + PhoneNumberRelease, + AreaCodes, + NumberConfigurationResponse, + LocationOptionsResponse, + PhoneNumberReservation +} from "./generated/src/models"; +import { SDK_VERSION } from "./constants"; +import { + GetAreaCodesOptions, + ConfigurePhoneNumberOptions, + ListSupportedCountriesOptions, + ListPhoneNumbersOptions, + ListPhonePlanGroupsOptions, + UpdateCapabilitiesOptions, + GetAreaCodesRequest, + PageableOptions, + ListPhonePlansRequest, + ListPhonePlansOptions, + GetPhonePlanLocationOptionsRequest, + GetPhonePlanLocationOptionsOptions, + ConfigurePhoneNumberRequest, + UpdateNumbersCapabilitiesResponse, + PhoneNumberCapabilitiesUpdates, + GetCapabilitiesUpdateResponse, + GetAreaCodesResponse, + GetPhoneNumberConfigurationResponse, + GetPhonePlanLocationOptionsResponse, + GetCapabilitiesUpdateOptions, + GetPhoneNumberConfigurationOptions, + UnconfigurePhoneNumberOptions, + CreateReservationRequest, + GetReservationOptions, + GetReservationResponse, + CancelReservationOptions +} from "./models"; +import { VoidResponse } from "../common/models"; +import { attachHttpResponse } from "../common/mappers"; +import { + BeginPurchaseReservationOptions, + BeginReleasePhoneNumbersOptions, + BeginReservePhoneNumbersOptions +} from "./lroModels"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { ReleasePhoneNumbersPoller } from "./lro/release/poller"; +import { ReservePhoneNumbersPoller } from "./lro/reserve/poller"; +import { PurchaseReservationPoller } from "./lro/purchase/poller"; + +/** + * Client options used to configure the UserTokenClient API requests. + */ +export interface PhoneNumberAdministrationClientOptions extends PipelineOptions {} + +const isPhoneNumberAdministrationClientOptions = ( + options: any +): options is PhoneNumberAdministrationClientOptions => options && !isKeyCredential(options); + +/** + * Client class for interacting with Azure Communication Services PhoneNumber Administration. + */ +export class PhoneNumberAdministrationClient { + /** + * A reference to the auto-generated PhoneNumber HTTP client. + */ + private readonly client: PhoneNumberAdministration; + + /** + * Initializes a new instance of the PhoneNumberAdministrationClient class. + * @param connectionString Connection string to connect to an Azure Communication Service resource. + * Example: "endpoint=https://contoso.eastus.communications.azure.net/;accesskey=secret"; + * @param options Optional. Options to configure the HTTP pipeline. + */ + public constructor(connectionString: string, options?: PhoneNumberAdministrationClientOptions); + + /** + * Initializes a new instance of the PhoneNumberAdministrationClient class using an Azure KeyCredential. + * @param url The endpoint of the service (ex: https://contoso.eastus.communications.azure.net). + * @param credential An object that is used to authenticate requests to the service. Use the Azure KeyCredential or `@azure/identity` to create a credential. + * @param options Optional. Options to configure the HTTP pipeline. + */ + public constructor( + url: string, + credential: KeyCredential, + options?: PhoneNumberAdministrationClientOptions + ); + + public constructor( + connectionStringOrUrl: string, + credentialOrOptions?: KeyCredential | PhoneNumberAdministrationClientOptions, + maybeOptions: PhoneNumberAdministrationClientOptions = {} + ) { + const { url, credential } = parseClientArguments(connectionStringOrUrl, credentialOrOptions); + const options = isPhoneNumberAdministrationClientOptions(credentialOrOptions) + ? credentialOrOptions + : maybeOptions; + const libInfo = `azsdk-js-communication-administration/${SDK_VERSION}`; + + if (!options.userAgentOptions) { + options.userAgentOptions = {}; + } + + if (options.userAgentOptions.userAgentPrefix) { + options.userAgentOptions.userAgentPrefix = `${options.userAgentOptions.userAgentPrefix} ${libInfo}`; + } else { + options.userAgentOptions.userAgentPrefix = libInfo; + } + + const internalPipelineOptions: InternalPipelineOptions = { + ...options, + ...{ + loggingOptions: { + logger: logger.info + } + } + }; + + const authPolicy = createCommunicationAccessKeyCredentialPolicy(credential); + const pipeline = createPipelineFromOptions(internalPipelineOptions, authPolicy); + this.client = new PhoneNumberRestClient(SDK_VERSION, url, pipeline).phoneNumberAdministration; + } + + /** + * Configures a phone number, for example to assign a callbackUrl. + * @param config The configuration details + * @param options Additional request options. + */ + public async configurePhoneNumber( + config: ConfigurePhoneNumberRequest, + options: ConfigurePhoneNumberOptions = {} + ): Promise { + const { span, updatedOptions } = createSpan( + "PhoneNumberAdministrationClient-configurePhoneNumber", + options + ); + const { phoneNumber, callbackUrl } = config; + try { + const { _response } = await this.client.configureNumber( + { + callbackUrl: callbackUrl, + applicationId: updatedOptions.applicationId + }, + phoneNumber, + operationOptionsToRequestOptionsBase(updatedOptions) + ); + return attachHttpResponse({}, _response); + } catch (e) { + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e.message + }); + throw e; + } finally { + span.end(); + } + } + + /** + * Unconfigure a phone number, resetting its' configuration. + * @param phoneNumber Phone Number to unconfigure. + * @param options Additional request options. + */ + public async unconfigurePhoneNumber( + phoneNumber: string, + options: UnconfigurePhoneNumberOptions = {} + ): Promise { + const { span, updatedOptions } = createSpan( + "PhoneNumberAdministrationClient-unconfigurePhoneNumber", + options + ); + try { + const { _response } = await this.client.unconfigureNumber( + phoneNumber, + operationOptionsToRequestOptionsBase(updatedOptions) + ); + return attachHttpResponse({}, _response); + } catch (e) { + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e.message + }); + throw e; + } finally { + span.end(); + } + } + + /** + * Updates the capabilities for a list of phone numbers. + * The response includes the id of the created update capabilities request, + * remember that id for subsequent calls to getCapabilitiesUpdate. + * @param phoneNumberCapabilitiesUpdates Dictionary containing a list of phone numbers and their capabilities updates. + * @param options Additional request options. + */ + public async updatePhoneNumbersCapabilities( + phoneNumberCapabilitiesUpdates: PhoneNumberCapabilitiesUpdates, + options: UpdateCapabilitiesOptions = {} + ): Promise { + const { span, updatedOptions } = createSpan( + "PhoneNumberAdministrationClient-updatePhoneNumbersCapabilities", + options + ); + try { + const { capabilitiesUpdateId, _response } = await this.client.updateCapabilities( + phoneNumberCapabilitiesUpdates, + operationOptionsToRequestOptionsBase(updatedOptions) + ); + return attachHttpResponse( + { capabilitiesUpdateId }, + _response + ); + } catch (e) { + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e.message + }); + throw e; + } finally { + span.end(); + } + } + + /** + * Get the update capabilities request associated with a given id. + * @param capabilitiesUpdateId The id associated with the request. + * @param options Additional request options. + */ + public async getCapabilitiesUpdate( + capabilitiesUpdateId: string, + options: GetCapabilitiesUpdateOptions = {} + ): Promise { + const { span, updatedOptions } = createSpan( + "PhoneNumberAdministrationClient-getCapabilitiesUpdate", + options + ); + try { + const { _response, ...rest } = await this.client.getCapabilitiesUpdate( + capabilitiesUpdateId, + operationOptionsToRequestOptionsBase(updatedOptions) + ); + return attachHttpResponse(rest, _response); + } catch (e) { + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e.message + }); + throw e; + } finally { + span.end(); + } + } + + /** + * Gets a list of the supported area codes based on location. + * @param request Request properties to constraint the search scope. + * @param options Additional request options. + */ + public async getAreaCodes( + request: GetAreaCodesRequest, + options: GetAreaCodesOptions = {} + ): Promise { + const { countryCode: country, locationType, phonePlanId, locationOptionsQueries } = request; + const { span, updatedOptions } = createSpan( + "PhoneNumberAdministrationClient-getAllAreaCodes", + Object.assign(options, locationOptionsQueries) + ); + try { + const { _response, ...rest } = await this.client.getAllAreaCodes( + locationType, + country, + phonePlanId, + operationOptionsToRequestOptionsBase(updatedOptions) + ); + return attachHttpResponse(rest, _response); + } catch (e) { + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e.message + }); + throw e; + } finally { + span.end(); + } + } + + /** + * Gets the configuration for a given phone number. + * @param phoneNumber The E.164 representation of the phone number whose configuration is requested. + * @param options Additional request options. + */ + public async getPhoneNumberConfiguration( + phoneNumber: string, + options: GetPhoneNumberConfigurationOptions = {} + ): Promise { + const { span, updatedOptions } = createSpan( + "PhoneNumberAdministrationClient-getPhoneNumberConfiguration", + options + ); + try { + const { pstnConfiguration, _response } = await this.client.getNumberConfiguration( + phoneNumber, + operationOptionsToRequestOptionsBase(updatedOptions) + ); + return attachHttpResponse({ pstnConfiguration }, _response); + } catch (e) { + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e.message + }); + throw e; + } finally { + span.end(); + } + } + + /** + * Gets the location options for a given phone plan. + * @param request Request properties to constraint the search scope. + * @param options Additional request options. + */ + public async getPhonePlanLocationOptions( + request: GetPhonePlanLocationOptionsRequest, + options: GetPhonePlanLocationOptionsOptions = {} + ): Promise { + const { span, updatedOptions } = createSpan( + "PhoneNumberAdministrationClient-getPhonePlanLocationOptions", + options + ); + const { countryCode, phonePlanGroupId, phonePlanId } = request; + try { + const { locationOptions, _response } = await this.client.getPhonePlanLocationOptions( + countryCode, + phonePlanGroupId, + phonePlanId, + operationOptionsToRequestOptionsBase(updatedOptions) + ); + return attachHttpResponse({ locationOptions }, _response); + } catch (e) { + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e.message + }); + throw e; + } finally { + span.end(); + } + } + + /** + * Gets the reservation associated with a given id. + * Use this function to query the status of a phone number reservation. + * @param reservationId The id of the reservation returned by createReservation. + * @param options Additional request options. + */ + public async getReservation( + reservationId: string, + options: GetReservationOptions = {} + ): Promise { + const { span, updatedOptions } = createSpan( + "PhoneNumberAdministrationClient-getReservation", + options + ); + try { + const { _response, ...rest } = await this.client.getSearchById( + reservationId, + operationOptionsToRequestOptionsBase(updatedOptions) + ); + return attachHttpResponse(rest, _response); + } catch (e) { + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e.message + }); + throw e; + } finally { + span.end(); + } + } + + /** + * Cancels the reservation associated with a given id. + * @param reservationId The id of the reservation returned by createReservation. + * @param options Additional request options. + */ + public async cancelReservation( + reservationId: string, + options: CancelReservationOptions = {} + ): Promise { + const { span, updatedOptions } = createSpan( + "PhoneNumberAdministrationClient-cancelReservation", + options + ); + try { + const { _response } = await this.client.cancelSearch( + reservationId, + operationOptionsToRequestOptionsBase(updatedOptions) + ); + return attachHttpResponse({}, _response); + } catch (e) { + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e.message + }); + throw e; + } finally { + span.end(); + } + } + + /** + * @internal + * @ignore + * Deals with the pagination of listSearches. + * @param {PageSettings} continuationState An object that indicates the position of the paginated request. + * @param {PageableOptions} [options] Optional parameters for the underlying HTTP request. + */ + private async *listSearchesPage( + continuationState: PageSettings, + options: PageableOptions = {} + ): AsyncIterableIterator { + if (!continuationState.continuationToken) { + const currentResponse = await this.client.getAllSearches(options); + continuationState.continuationToken = currentResponse.nextLink; + + if (currentResponse.entities) { + yield currentResponse.entities; + } + } + + while (continuationState.continuationToken) { + const currentResponse = await this.client.getAllSearches(options); + continuationState.continuationToken = currentResponse.nextLink; + + if (currentResponse.entities) { + yield currentResponse.entities; + } + } + } + + /** + * @internal + * @ignore + * Deals with the iteration of all the available results of listSearches. + * @param {PageableOptions} [options] Optional parameters for the underlying HTTP request. + */ + private async *listSearchesAll( + options: PageableOptions = {} + ): AsyncIterableIterator { + for await (const entities of this.listSearchesPage({}, options)) { + yield* entities; + } + } + + /** + * Iterates the searches created by the Azure resource. + * + * Example usage: + * ```ts + * let client = new PhoneNumberAdministrationClient(credentials); + * for await (const entity of client.listReleases()) { + * console.log("id: ", entity.id); + * } + * ``` + * Gets all searches created by the Azure resource. + * @param {PageableOptions} [options] Optional parameters for the underlying HTTP request. + */ + public listSearches( + options: PageableOptions = {} + ): PagedAsyncIterableIterator { + const { span, updatedOptions } = createSpan( + "PhoneNumberAdministrationClient-listSearches", + options + ); + const iter = this.listSearchesAll(options); + + span.end(); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings: PageSettings = {}) => this.listSearchesPage(settings, updatedOptions) + }; + } + + /** + * @internal + * @ignore + * Deals with the pagination of listReleases. + * @param {PageSettings} continuationState An object that indicates the position of the paginated request. + * @param {PageableOptions} [options] Optional parameters for the underlying HTTP request. + */ + private async *listReleasesPage( + continuationState: PageSettings, + options: PageableOptions = {} + ): AsyncIterableIterator { + if (continuationState.continuationToken == null) { + const currentResponse = await this.client.getAllReleases(options); + continuationState.continuationToken = currentResponse.nextLink; + + if (currentResponse.entities) { + yield currentResponse.entities; + } + } + + while (continuationState.continuationToken) { + const currentResponse = await this.client.getAllReleases(options); + continuationState.continuationToken = currentResponse.nextLink; + + if (currentResponse.entities) { + yield currentResponse.entities; + } + } + } + + /** + * @internal + * @ignore + * Deals with the iteration of all the available results of listReleases. + * @param {PageableOptions} [options] Optional parameters for the underlying HTTP request. + */ + private async *listReleasesAll( + options: PageableOptions = {} + ): AsyncIterableIterator { + for await (const entities of this.listReleasesPage({}, options)) { + yield* entities; + } + } + + /** + * Iterates the releases created by the Azure resource. + * + * Example usage: + * ```ts + * let client = new PhoneNumberAdministrationClient(credentials); + * for await (const entity of client.listReleases()) { + * console.log("id: ", entity.id); + * } + * ``` + * Gets all releases created by the Azure resource. + * @param {PageableOptions} [options] Optional parameters for the underlying HTTP request. + */ + public listReleases( + options: PageableOptions = {} + ): PagedAsyncIterableIterator { + const { span, updatedOptions } = createSpan( + "PhoneNumberAdministrationClient-listReleases", + options + ); + const iter = this.listReleasesAll(options); + + span.end(); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings: PageSettings = {}) => this.listReleasesPage(settings, updatedOptions) + }; + } + + /** + * @internal + * @ignore + * Deals with the pagination of listSupportedCountries. + * @param {PageSettings} continuationState An object that indicates the position of the paginated request. + * @param {ListSupportedCountriesOptions} [options] Optional parameters for the underlying HTTP request. + */ + private async *listSupportedCountriesPage( + continuationState: PageSettings, + options: ListSupportedCountriesOptions = {} + ): AsyncIterableIterator { + if (continuationState.continuationToken == null) { + const currentResponse = await this.client.getAllSupportedCountries(options); + continuationState.continuationToken = currentResponse.nextLink; + + if (currentResponse.countries) { + yield currentResponse.countries; + } + } + + while (continuationState.continuationToken) { + const currentResponse = await this.client.getAllSupportedCountries(options); + continuationState.continuationToken = currentResponse.nextLink; + + if (currentResponse.countries) { + yield currentResponse.countries; + } + } + } + + /** + * @internal + * @ignore + * Deals with the iteration of all the available results of listSupportedCountries. + * @param {ListSupportedCountriesOptions} [options] Optional parameters for the underlying HTTP request. + */ + private async *listSupportedCountriesAll( + options: ListSupportedCountriesOptions = {} + ): AsyncIterableIterator { + for await (const countries of this.listSupportedCountriesPage({}, options)) { + yield* countries; + } + } + + /** + * Iterates the supported countries. + * + * Example usage: + * ```ts + * let client = new PhoneNumberAdministrationClient(credentials); + * for await (const country of client.listSupportedCountries()) { + * console.log("country name: ", country.localizedName); + * } + * ``` + * @summary List all supported countries. + * @param {ListSupportedCountriesOptions} [options] The optional parameters. + */ + public listSupportedCountries( + options: ListSupportedCountriesOptions = {} + ): PagedAsyncIterableIterator { + const { span, updatedOptions } = createSpan( + "PhoneNumberAdministrationClient-listAllSupportedCountries", + options + ); + const iter = this.listSupportedCountriesAll(options); + + span.end(); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings: PageSettings = {}) => + this.listSupportedCountriesPage(settings, updatedOptions) + }; + } + + /** + * @internal + * @ignore + * Deals with the pagination of listPhoneNumbers. + * @param {PageSettings} continuationState An object that indicates the position of the paginated request. + * @param {ListPhoneNumbersOptions} [options] Optional parameters for the underlying HTTP request. + */ + private async *listPhoneNumbersPage( + continuationState: PageSettings, + options: ListPhoneNumbersOptions = {} + ): AsyncIterableIterator { + if (continuationState.continuationToken == null) { + const currentResponse = await this.client.getAllPhoneNumbers(options); + continuationState.continuationToken = currentResponse.nextLink; + + if (currentResponse.phoneNumbers) { + yield currentResponse.phoneNumbers; + } + } + + while (continuationState.continuationToken) { + const currentResponse = await this.client.getAllPhoneNumbers(options); + continuationState.continuationToken = currentResponse.nextLink; + + if (currentResponse.phoneNumbers) { + yield currentResponse.phoneNumbers; + } + } + } + + /** + * @internal + * @ignore + * Deals with the iteration of all the available results of listPhoneNumbers. + * @param {ListPhoneNumbersOptions} [options] Optional parameters for the underlying HTTP request. + */ + private async *listPhoneNumbersAll( + options: ListPhoneNumbersOptions = {} + ): AsyncIterableIterator { + for await (const phoneNumbers of this.listPhoneNumbersPage({}, options)) { + yield* phoneNumbers; + } + } + + /** + * Iterates the acquired phone numbers. + * + * Example usage: + * ```ts + * let client = new PhoneNumberAdministrationClient(credentials); + * for await (const acquired of client.listPhoneNumbers()) { + * console.log("phone number: ", acquired.phoneNumber); + * } + * ``` + * @summary List all acquired phone numbers. + * @param {ListPhoneNumbersOptions} [options] The optional parameters. + */ + public listPhoneNumbers( + options: ListPhoneNumbersOptions = {} + ): PagedAsyncIterableIterator { + const { span, updatedOptions } = createSpan( + "PhoneNumberAdministrationClient-listAllPhoneNumbers", + options + ); + const iter = this.listPhoneNumbersAll(options); + + span.end(); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings: PageSettings = {}) => this.listPhoneNumbersPage(settings, updatedOptions) + }; + } + + /** + * @internal + * @ignore + * Deals with the pagination of listPhonePlanGroups. + * @param {PageSettings} continuationState An object that indicates the position of the paginated request. + * @param countryCode The ISO 3166-2 country code, for example "FR" or "CN". + * @param {ListPhonePlanGroupsOptions} [options] Optional parameters for the underlying HTTP request. + */ + private async *listPhonePlanGroupsPage( + continuationState: PageSettings, + countryCode: string, + options: ListPhonePlanGroupsOptions = {} + ): AsyncIterableIterator { + if (continuationState.continuationToken == null) { + const currentResponse = await this.client.getPhonePlanGroups(countryCode, options); + continuationState.continuationToken = currentResponse.nextLink; + + if (currentResponse.phonePlanGroups) { + yield currentResponse.phonePlanGroups; + } + } + + while (continuationState.continuationToken) { + const currentResponse = await this.client.getPhonePlanGroups(countryCode, options); + continuationState.continuationToken = currentResponse.nextLink; + + if (currentResponse.phonePlanGroups) { + yield currentResponse.phonePlanGroups; + } + } + } + + /** + * @internal + * @ignore + * Deals with the iteration of all the available results of listPhonePlanGroups. + * @param countryCode The ISO 3166-2 country code, for example "FR" or "CN". + * @param {ListPlansForCountryOptions} [options] Optional parameters for the underlying HTTP request. + */ + private async *listPhonePlanGroupsAll( + countryCode: string, + options: ListPhonePlanGroupsOptions = {} + ): AsyncIterableIterator { + for await (const phonePlanGroups of this.listPhonePlanGroupsPage({}, countryCode, options)) { + yield* phonePlanGroups; + } + } + + /** + * Iterates the available phone plan groups for a country. + * + * Example usage: + * ```ts + * let client = new PhoneNumberAdministrationClient(credentials); + * for await (const phonePlanGroup of client.listPhonePlanGroups("CA")) { + * console.log("plan group id: ", phonePlanGroup.phonePlanGroupId); + * } + * ``` + * @summary List all available phone plan groups for a country. + * @param {ListPhonePlanGroupsOptions} [options] The optional parameters. + */ + public listPhonePlanGroups( + countryCode: string, + options: ListPhonePlanGroupsOptions = {} + ): PagedAsyncIterableIterator { + const { span, updatedOptions } = createSpan( + "PhoneNumberAdministrationClient-listPhonePlanGroups", + options + ); + const iter = this.listPhonePlanGroupsAll(countryCode, options); + + span.end(); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings: PageSettings = {}) => + this.listPhonePlanGroupsPage(settings, countryCode, updatedOptions) + }; + } + + /** + * @internal + * @ignore + * Deals with the pagination of listPhonePlans. + * @param {PageSettings} continuationState An object that indicates the position of the paginated request. + * @param planGroupInfo Information need to search for plans. + * @param {GetPhonePlansOptions} [options] Optional parameters for the underlying HTTP request. + */ + private async *listPhonePlansPage( + continuationState: PageSettings, + planGroupInfo: ListPhonePlansRequest, + options: ListPhonePlansOptions = {} + ): AsyncIterableIterator { + if (continuationState.continuationToken == null) { + const currentResponse = await this.client.getPhonePlans( + planGroupInfo.countryCode, + planGroupInfo.phonePlanGroupId, + options + ); + continuationState.continuationToken = currentResponse.nextLink; + + if (currentResponse.phonePlans) { + yield currentResponse.phonePlans; + } + } + + while (continuationState.continuationToken) { + const currentResponse = await this.client.getPhonePlans( + planGroupInfo.countryCode, + planGroupInfo.phonePlanGroupId, + options + ); + continuationState.continuationToken = currentResponse.nextLink; + + if (currentResponse.phonePlans) { + yield currentResponse.phonePlans; + } + } + } + + /** + * @internal + * @ignore + * Deals with the iteration of all the available results of listPhonePlans. + * @param planGroupInfo Information need to search for plans. + * @param {ListPhonePlansOptions} [options] Optional parameters for the underlying HTTP request. + */ + private async *listPhonePlansAll( + planGroupInfo: ListPhonePlansRequest, + options: ListPhonePlansOptions = {} + ): AsyncIterableIterator { + for await (const phonePlans of this.listPhonePlansPage({}, planGroupInfo, options)) { + yield* phonePlans; + } + } + + /** + * Iterates the available phone plan for a plan group. + * + * Example usage: + * ```ts + * let client = new PhoneNumberAdministrationClient(credentials); + * for await (const phonePlan of client.listPhonePlanGroups(PLAN_GROUP_INFO)) { + * console.log("plan id: ", phonePlan.phonePlanId); + * } + * + * Gets all available phone plans for a given plan group. + * @param planGroupInfo Information need to search for plans. + * @param options Additional request options. + */ + public listPhonePlans( + planGroupInfo: ListPhonePlansRequest, + options: ListPhonePlansOptions = {} + ): PagedAsyncIterableIterator { + const { span, updatedOptions } = createSpan( + "PhoneNumberAdministrationClient-listPhonePlans", + options + ); + const iter = this.listPhonePlansAll(planGroupInfo, options); + + span.end(); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings: PageSettings = {}) => + this.listPhonePlansPage(settings, planGroupInfo, updatedOptions) + }; + } + + /** + * Starts the release of a list of acquired phone numbers. + * + * This function returns a Long Running Operation poller that allows you to wait indefinitely until the operation is complete. + * + * Example usage: + * ```ts + * const client = new PhoneNumberAdministrationClient(CONNECTION_STRING); + * const releasePoller = await client.beginReleasePhoneNumbers(PHONE_NUMBERS); + * + * // Serializing the poller + * const serialized = releasePoller.toString(); + * + * // Waiting until it's done + * const results = await releasePoller.pollUntilDone(); + * console.log(results); + * ``` + * @param {string[]} phoneNumbers The phone numbers to be released. + * @param {BeginReleasePhoneNumbersOptions} options Additional request options. + */ + public async beginReleasePhoneNumbers( + phoneNumbers: string[], + options: BeginReleasePhoneNumbersOptions = {} + ): Promise, PhoneNumberRelease>> { + const poller = new ReleasePhoneNumbersPoller({ + phoneNumbers, + client: this.client, + requestOptions: options + }); + + await poller.poll(); + return poller; + } + + /** + * Starts a search for phone numbers given some constraints such as name or area code. + * The phone numbers that are found are reserved until you cancel, purchase or the reservation expires. + * + * This function returns a Long Running Operation poller that allows you to wait indefinitely until the operation is complete. + * + * Example usage: + * ```ts + * const client = new PhoneNumberAdministrationClient(CONNECTION_STRING); + * const reservePoller = await client.beginReservePhoneNumbers(RESERVATION_REQUEST); + * + * // Serializing the poller + * const serialized = reservePoller.toString(); + * + * // Waiting until it's done + * const results = await reservePoller.pollUntilDone(); + * console.log(results); + * ``` + * + * @param {CreateReservationRequest} reservationRequest Request properties to constraint the search scope. + * @param {BeginReservePhoneNumbersOptions} options Additional request options. + */ + public async beginReservePhoneNumbers( + reservationRequest: CreateReservationRequest, + options: BeginReservePhoneNumbersOptions = {} + ): Promise, PhoneNumberReservation>> { + const poller = new ReservePhoneNumbersPoller({ + reservationRequest, + client: this.client, + requestOptions: options + }); + + await poller.poll(); + return poller; + } + + /** + * Starts the purchase of the phone number(s) in the reservation associated with a given id. + * + * This function returns a Long Running Operation poller that allows you to wait indefinitely until the operation is complete. + * + * Example usage: + * ```ts + * const client = new PhoneNumberAdministrationClient(CONNECTION_STRING); + * const purchasePoller = await client.beginPurchaseReservation(RESERVATION_ID); + * + * // Serializing the poller + * const serialized = purchasePoller.toString(); + * + * // Waiting until it's done + * const results = await purchasePoller.pollUntilDone(); + * console.log(results); + * ``` + * + * @param {string} reservationId The id of the reservation to purchase. + * @param {BeginPurchaseReservationOptions} options Additional request options. + */ + public async beginPurchaseReservation( + reservationId: string, + options: BeginPurchaseReservationOptions = {} + ): Promise, void>> { + const poller = new PurchaseReservationPoller({ + reservationId, + client: this.client, + requestOptions: options + }); + + await poller.poll(); + return poller; + } +} + +export { + AreaCodes, + CarrierDetails, + LocationOptions, + LocationOptionsDetails, + NumberConfiguration, + PhoneNumberAdministrationGetAllAreaCodesResponse, + PhoneNumberAdministrationReleasePhoneNumbersResponse, + PhoneNumberAdministrationGetReleaseByIdResponse, + PhoneNumberAdministrationGetCapabilitiesUpdateResponse, + PhoneNumberAdministrationGetNumberConfigurationResponse, + PhoneNumberAdministrationGetPhonePlanLocationOptionsResponse, + PstnConfiguration, + ReleaseResponse, + NumberUpdateCapabilities, + UpdateNumberCapabilitiesResponse, + Capability, + PhoneNumberCountry, + PhoneNumberCountries, + LocationOptionsQuery, + AcquiredPhoneNumber, + AcquiredPhoneNumbers, + UpdatePhoneNumberCapabilitiesResponse, + PhonePlanGroups, + PhonePlanGroup, + PhonePlansResponse, + PhonePlan, + PhoneNumberRelease, + PhoneNumberEntities, + PhoneNumberReservation, + AssignmentStatus, + ActivationState, + CapabilitiesUpdateStatus, + PhoneNumberType, + RateInformation, + LocationType, + ReleaseStatus, + PhoneNumberReleaseDetails, + PhoneNumberEntity, + CurrencyType, + PhoneNumberReleaseStatus, + SearchStatus, + LocationOptionsResponse, + NumberConfigurationResponse, + LocationOptionsQueries +} from "./generated/src/models"; diff --git a/sdk/communication/communication-administration/src/phoneNumber/shims.d.ts b/sdk/communication/communication-administration/src/phoneNumber/shims.d.ts new file mode 100644 index 000000000000..1ae48910ccab --- /dev/null +++ b/sdk/communication/communication-administration/src/phoneNumber/shims.d.ts @@ -0,0 +1,14 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +// Shim for DOM's window and navigator's language +interface Navigator { + language: string; +} + +interface Window { + readonly navigator: Navigator; +} + +declare let navigator: Navigator; +declare let window: Window; diff --git a/sdk/communication/communication-administration/src/phoneNumber/utils.browser.ts b/sdk/communication/communication-administration/src/phoneNumber/utils.browser.ts new file mode 100644 index 000000000000..3fe4da4e9358 --- /dev/null +++ b/sdk/communication/communication-administration/src/phoneNumber/utils.browser.ts @@ -0,0 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +export const getDefaultLocale = (): string => { + return window?.navigator?.language ?? "en-US"; +}; diff --git a/sdk/communication/communication-administration/src/phoneNumber/utils.ts b/sdk/communication/communication-administration/src/phoneNumber/utils.ts new file mode 100644 index 000000000000..8d93fed4a99d --- /dev/null +++ b/sdk/communication/communication-administration/src/phoneNumber/utils.ts @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +export const getDefaultLocale = (): string => { + // hard-coded for NodeJS, we use navigator.language in the browser + return "en-US"; +}; diff --git a/sdk/communication/communication-administration/swagger/CommunicationIdentity.md b/sdk/communication/communication-administration/swagger/CommunicationIdentity.md new file mode 100644 index 000000000000..296f54dc19f0 --- /dev/null +++ b/sdk/communication/communication-administration/swagger/CommunicationIdentity.md @@ -0,0 +1,22 @@ +# Azure Communication Services Configuration Module + +> see https://aka.ms/autorest + +## Configuration + +```yaml +package-name: azure-communication-administration-identity +title: CommunicationIdentityConfigurationClient +override-client-name: GeneratedCommunicationIdentityClient +description: Communication identity configuration client +package-version: 1.0.0-beta.3 +generate-metadata: false +license-header: MICROSOFT_MIT_NO_VERSION +output-folder: ../src/communicationIdentity/generated +input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/838c5092f11e8ca26e262b1f1099d5c5cdfedc3f/specification/communication/data-plane/Microsoft.CommunicationServicesIdentity/preview/2020-07-20-preview2/CommunicationIdentity.json +model-date-time-as-string: false +optional-response-headers: true +payload-flattening-threshold: 10 +use: "@microsoft.azure/autorest.typescript@5.0.1" +azure-arm: false +``` diff --git a/sdk/communication/communication-administration/swagger/PhoneNumber.md b/sdk/communication/communication-administration/swagger/PhoneNumber.md new file mode 100644 index 000000000000..df451142012b --- /dev/null +++ b/sdk/communication/communication-administration/swagger/PhoneNumber.md @@ -0,0 +1,43 @@ +# Azure Communication Services Configuration Module + +> see https://aka.ms/autorest + +## Configuration + +```yaml +package-name: azure-communication-administration-phoneNumber +override-client-name: PhoneNumberRestClient +description: Phone number configuration client +package-version: 1.0.0-beta.1 +generate-metadata: false +license-header: MICROSOFT_MIT_NO_VERSION +output-folder: ../src/phoneNumber/generated +input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/257f060be8b60d8468584682aa2d71b1faa5f82c/specification/communication/data-plane/Microsoft.CommunicationServicesAdministration/preview/2020-07-20-preview1/communicationservicesadministration.json +model-date-time-as-string: false +optional-response-headers: true +payload-flattening-threshold: 10 +use: "@microsoft.azure/autorest.typescript@5.0.1" +azure-arm: false +``` + +### Rename searchId to reservationId + +```yaml +directive: + - from: swagger-document + where: $.definitions.PhoneNumberSearch.properties.searchId + transform: > + $["x-ms-client-name"] = "reservationId"; +``` + +### Rename PhoneNumberSearch to PhoneNumberReservation + +```yaml +custom-types-subpackage: models +custom-types: PhoneNumberReservation +required-fields-as-ctor-args: true +directive: + - rename-model: + from: PhoneNumberSearch + to: PhoneNumberReservation +``` diff --git a/sdk/communication/communication-administration/test/README.md b/sdk/communication/communication-administration/test/README.md new file mode 100644 index 000000000000..219d112a3086 --- /dev/null +++ b/sdk/communication/communication-administration/test/README.md @@ -0,0 +1,19 @@ +# Testing + +To test this project, make sure to build it by following our [building instructions](https://github.com/Azure/azure-sdk-for-js/blob/master/CONTRIBUTING.md#building), then follow the [testing instructions](https://github.com/Azure/azure-sdk-for-js/blob/master/CONTRIBUTING.md#testing). + +You can use existing Azure resources for the live tests, or generate new ones by using our [New-TestResources.ps1](https://github.com/Azure/azure-sdk-for-js/blob/master/eng/common/TestResources/New-TestResources.ps1) script, which will use an [ARM template](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/textanalytics/test-resources.json) that already has all of the the necessary configurations. + +The Azure resource that is used by the tests in this project is: + +- An existing Communication Services resource. If you need to create the resource, you can use the [Azure Portal][azure_portal] or [Azure CLI][azure_cli]. + +To run the live tests, you will need to set the below environment variables: + +- `TEST_MODE`: Should have `live` assigned if you want to run live without recording. Assign `record` to run live with recording. +- `COMMUNICATION_CONNECTION_STRING`: The primary connection string of the Communication Services resource in your account. + +[azure_sub]: https://azure.microsoft.com/free/ +[azure_portal]: https://portal.azure.com + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fcommunication%2Fcommunication-administration%2FREADME.png) diff --git a/sdk/communication/communication-administration/test/communicationIdentityClient.mocked.spec.ts b/sdk/communication/communication-administration/test/communicationIdentityClient.mocked.spec.ts new file mode 100644 index 000000000000..4d8f6dca3b27 --- /dev/null +++ b/sdk/communication/communication-administration/test/communicationIdentityClient.mocked.spec.ts @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { isNode } from "@azure/core-http"; +import { CommunicationUser, isCommunicationUser } from "@azure/communication-common"; +import { assert } from "chai"; +import sinon from "sinon"; +import { CommunicationIdentityClient } from "../src"; +import { TestCommunicationIdentityClient } from "./utils/testCommunicationIdentityClient"; +import { issueTokenHttpClient, revokeTokensHttpClient } from "./utils/mockHttpClients"; + +describe("CommunicationIdentityClient [Mocked]", () => { + const dateHeader = isNode ? "date" : "x-ms-date"; + const user: CommunicationUser = { communicationUserId: "ACS_ID" }; + + afterEach(() => { + sinon.restore(); + }); + + it("creates instance of CommunicationIdentityClient", () => { + const client = new CommunicationIdentityClient( + "endpoint=https://contoso.spool.azure.local;accesskey=banana" + ); + assert.instanceOf(client, CommunicationIdentityClient); + }); + + it("sets correct headers", async () => { + const client = new TestCommunicationIdentityClient(); + const spy = sinon.spy(issueTokenHttpClient, "sendRequest"); + + await client.issueTokenTest(user, ["chat"]); + sinon.assert.calledOnce(spy); + + const request = spy.getCall(0).args[0]; + + if (isNode) { + assert.equal(request.headers.get("host"), "contoso.spool.azure.local"); + } + + assert.typeOf(request.headers.get(dateHeader), "string"); + assert.isDefined(request.headers.get("authorization")); + assert.match( + request.headers.get("authorization") as string, + /HMAC-SHA256 SignedHeaders=.+&Signature=.+/ + ); + }); + + it("sends scopes in issue token request", async () => { + const client = new TestCommunicationIdentityClient(); + const spy = sinon.spy(issueTokenHttpClient, "sendRequest"); + const response = await client.issueTokenTest(user, ["chat"]); + + assert.equal(response.user.communicationUserId, "identity"); + assert.equal(response.token, "token"); + assert.equal(response.expiresOn.toDateString(), new Date("2011/11/30").toDateString()); + sinon.assert.calledOnce(spy); + + const request = spy.getCall(0).args[0]; + assert.deepEqual(JSON.parse(request.body), { scopes: ["chat"] }); + }); + + it("[issueToken] excludes _response from results when stringified", async () => { + const client = new TestCommunicationIdentityClient(); + const response = await client.issueTokenTest(user, ["chat"]); + + assert.isDefined(response._response); + assert.isTrue(JSON.stringify(response).indexOf("token") > -1); + assert.isFalse(JSON.stringify(response).indexOf("_response") > -1); + }); + + it("[createUser] excludes _response from results when stringified", async () => { + const client = new TestCommunicationIdentityClient(); + const user = await client.createUserTest(); + + assert.isTrue(isCommunicationUser(user)); + assert.equal(user.communicationUserId, "identity"); + assert.isDefined(user._response); + assert.isTrue(JSON.stringify(user).indexOf("id") > -1); + assert.isFalse(JSON.stringify(user).indexOf("_response") > -1); + }); + + it("sends current datetime as value of tokensValidFrom if not passed to revokeTokens", async () => { + const client = new TestCommunicationIdentityClient(); + const spy = sinon.spy(revokeTokensHttpClient, "sendRequest"); + + await client.revokeTokensTest(user); + sinon.assert.calledOnce(spy); + + const request = spy.getCall(0).args[0]; + const { tokensValidFrom: received } = JSON.parse(request.body); + + assert.isNotNaN(Date.parse(received)); + }); + + it("sends tokensValidFrom in revoke tokens request", async () => { + const client = new TestCommunicationIdentityClient(); + const spy = sinon.spy(revokeTokensHttpClient, "sendRequest"); + const tokensValidFrom = new Date("2011/11/30"); + + await client.revokeTokensTest(user, tokensValidFrom); + sinon.assert.calledOnce(spy); + + const request = spy.getCall(0).args[0]; + const { tokensValidFrom: received } = JSON.parse(request.body); + const expected = tokensValidFrom.toISOString(); + + assert.equal(received, expected); + }); +}); diff --git a/sdk/communication/communication-administration/test/communicationIdentityClient.spec.ts b/sdk/communication/communication-administration/test/communicationIdentityClient.spec.ts new file mode 100644 index 000000000000..40e11d38bbaf --- /dev/null +++ b/sdk/communication/communication-administration/test/communicationIdentityClient.spec.ts @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { CommunicationUser } from "@azure/communication-common"; +import { assert } from "chai"; +import { isPlaybackMode, Recorder } from "@azure/test-utils-recorder"; +import { CommunicationIdentityClient } from "../src"; +import { createRecordedCommunicationIdentityClient } from "./utils/recordedClient"; + +describe("CommunicationIdentityClient [Playback/Live]", function() { + let user: CommunicationUser; + let recorder: Recorder; + let client: CommunicationIdentityClient; + + beforeEach(function() { + ({ client, recorder } = createRecordedCommunicationIdentityClient(this)); + }); + + afterEach(async function() { + if (!this.currentTest?.isPending()) { + await recorder.stop(); + } + }); + + it("successfully creates a user", async function() { + user = await client.createUser(); + assert.isString(user.communicationUserId); + }); + + it("successfully issues a token for a user [single scope]", async function() { + const { token, expiresOn, user: receivedUser } = await client.issueToken(user, ["chat"]); + assert.isString(token); + assert.instanceOf(expiresOn, Date); + assert.deepEqual(receivedUser, user); + }); + + it("successfully issues a token for a user [multiple scopes]", async function() { + const { token, expiresOn, user: receivedUser } = await client.issueToken(user, [ + "chat", + "pstn" + ]); + assert.isString(token); + assert.instanceOf(expiresOn, Date); + assert.deepEqual(receivedUser, user); + }); + + it("successfully revokes tokens issued for a user", async function() { + const { _response: response } = await client.revokeTokens( + user, + // Must set tokensValidFrom if in playback mode so date strings will match + // when Nock searches for requests + isPlaybackMode() ? new Date("2020-10-10T00:00:00.000Z") : undefined + ); + assert.equal(response.status, 204); + const { tokensValidFrom } = JSON.parse(response.request.body); + assert.isNotNaN(Date.parse(tokensValidFrom)); + }); + + it("successfully deletes a user", async function() { + const { _response: response } = await client.deleteUser(user); + assert.equal(response.status, 204); + }).timeout(20000); +}); diff --git a/sdk/communication/communication-administration/test/list.mocked.ts b/sdk/communication/communication-administration/test/list.mocked.ts new file mode 100644 index 000000000000..f39c8c09f225 --- /dev/null +++ b/sdk/communication/communication-administration/test/list.mocked.ts @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { assert } from "chai"; +import { ListPhonePlansRequest } from "../src"; +import { TestPhoneNumberAdministrationClient } from "./utils/testPhoneNumberAdministrationClient"; + +describe("PhoneNumberAdministrationClient Lists [Mocked]", () => { + const client = new TestPhoneNumberAdministrationClient(); + it("can list phone numbers", async () => { + let found = 0; + for await (const acquired of client.listPhoneNumbersTest()) { + assert.isString(acquired.phoneNumber, "Unexpected type of acquired phone number"); + assert.isNotEmpty(acquired.acquiredCapabilities); + assert.isNotEmpty(acquired.availableCapabilities); + + found += 1; + } + + assert.equal(found, 3, "Unexpected number of phone numbers found by getPhoneNumbers."); + }); + + it("can list supported countries", async () => { + let found = 0; + for await (const country of client.listSupportedCountriesTest()) { + assert.isString(country.countryCode); + assert.isString(country.localizedName); + assert.isTrue(country.localizedName === "France" || country.localizedName === "Canada"); + assert.isTrue(country.countryCode === "FR" || country.countryCode === "CA"); + + found += 1; + } + + assert.equal(found, 2, "Unexpected number of countries found by getSupportedCountries."); + }); + + it("can list phone plan groups", async () => { + const countryCode = "FR"; + const localizedName = "France"; + let found = 0; + for await (const phonePlanGroup of client.listPhonePlanGroupsTest(countryCode)) { + assert.equal(phonePlanGroup.localizedName, localizedName); + found += 1; + } + + assert.equal(found, 2, "Unexpected number of phone plan groups found by getPhonePlanGroups."); + }); + + it("can list phone plans", async () => { + const planGroupInfo: ListPhonePlansRequest = { + phonePlanGroupId: "1", + countryCode: "FR" + }; + let found = 0; + for await (const phonePlan of client.listPhonePlansTest(planGroupInfo)) { + assert.equal(phonePlan.localizedName, "France"); + found += 1; + } + + assert.equal(found, 2, "Unexpected number of phone plans found by getPhonePlans."); + }); + + it("can list releases", async () => { + let found = 0; + for await (const entity of client.listReleasesTest()) { + assert.isString(entity.id); + found += 1; + } + + assert.equal(found, 3, "Unexpected number of entities found by getReleases."); + }); + + it("can list searches", async () => { + let found = 0; + for await (const entity of client.listSearchesTest()) { + assert.isString(entity.id); + found += 1; + } + + assert.equal(found, 3, "Unexpected number of entities found by getSearches."); + }); +}); diff --git a/sdk/communication/communication-administration/test/list.spec.ts b/sdk/communication/communication-administration/test/list.spec.ts new file mode 100644 index 000000000000..a27ee154f84a --- /dev/null +++ b/sdk/communication/communication-administration/test/list.spec.ts @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { assert } from "chai"; +import { Recorder } from "@azure/test-utils-recorder"; +import { ListPhonePlansRequest, PhoneNumberAdministrationClient } from "../src"; +import { createRecordedPhoneNumberAdministrationClient } from "./utils/recordedClient"; + +describe("PhoneNumberAdministrationClient Lists [Playback/Live]", function() { + let recorder: Recorder; + let client: PhoneNumberAdministrationClient; + let planGroupIdToQuery: string; + + beforeEach(function() { + ({ client, recorder } = createRecordedPhoneNumberAdministrationClient(this)); + }); + + afterEach(async function() { + if (!this.currentTest?.isPending()) { + await recorder.stop(); + } + }); + + it("can list phone numbers", async () => { + for await (const acquired of client.listPhoneNumbers()) { + assert.isString(acquired.phoneNumber, "Unexpected type of acquired phone number"); + assert.isNotEmpty(acquired.acquiredCapabilities); + assert.isNotEmpty(acquired.availableCapabilities); + } + }); + + it("can list supported countries", async () => { + for await (const country of client.listSupportedCountries()) { + assert.isString(country.countryCode); + assert.isString(country.localizedName); + } + }); + + it("can list phone plan groups", async () => { + const countryCode = "US"; + + for await (const phonePlanGroup of client.listPhonePlanGroups(countryCode)) { + if (!planGroupIdToQuery) { + planGroupIdToQuery = phonePlanGroup.phonePlanGroupId; + } + + assert.isString(phonePlanGroup.phonePlanGroupId); + } + }); + + it("can list phone plans", async () => { + const planGroupInfo: ListPhonePlansRequest = { + phonePlanGroupId: planGroupIdToQuery, + countryCode: "US" + }; + + for await (const phonePlan of client.listPhonePlans(planGroupInfo)) { + assert.isString(phonePlan.phonePlanId); + } + }); + + it("can list releases", async () => { + for await (const entity of client.listReleases()) { + assert.isString(entity.id); + } + }); + + it("can list searches", async () => { + for await (const entity of client.listSearches()) { + assert.isString(entity.id); + } + }); +}); diff --git a/sdk/communication/communication-administration/test/lro.purchase.spec.ts b/sdk/communication/communication-administration/test/lro.purchase.spec.ts new file mode 100644 index 000000000000..92e25e66b6d9 --- /dev/null +++ b/sdk/communication/communication-administration/test/lro.purchase.spec.ts @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { isPlaybackMode, Recorder } from "@azure/test-utils-recorder"; +import { assert } from "chai"; +import { + CreateReservationRequest, + ListPhonePlansRequest, + PhoneNumberAdministrationClient, + PhoneNumberReservation +} from "../src"; +import { createRecordedPhoneNumberAdministrationClient } from "./utils/recordedClient"; + +describe("PhoneNumber - LROs - Purchase Reservation [Playback/Live]", function() { + let recorder: Recorder; + let client: PhoneNumberAdministrationClient; + let includePhoneNumberLiveTests: boolean; + let reservationId: string; + let areaCode: string; + let countryCode = "US"; + const phonePlanIds: string[] = []; + + beforeEach(function() { + ({ + client, + recorder, + includePhoneNumberLiveTests + } = createRecordedPhoneNumberAdministrationClient(this)); + }); + + afterEach(async function() { + if (!this.currentTest?.isPending()) { + await recorder.stop(); + } + }); + + it("can get phonePlanIds and areaCode to create reservation", async function() { + if (!includePhoneNumberLiveTests && !isPlaybackMode()) { + this.skip(); + } + + let phonePlanGroupId: string = ""; + for await (const phonePlanGroup of client.listPhonePlanGroups(countryCode)) { + if (phonePlanGroup.phoneNumberType == "Geographic") { + assert.isString(phonePlanGroup.phonePlanGroupId); + ({ phonePlanGroupId } = phonePlanGroup); + break; + } + } + + const planGroupInfo: ListPhonePlansRequest = { + phonePlanGroupId, + countryCode + }; + + for await (const phonePlan of client.listPhonePlans(planGroupInfo)) { + assert.isString(phonePlan.phonePlanId); + phonePlanIds.push(phonePlan.phonePlanId); + } + + const { primaryAreaCodes } = await client.getAreaCodes({ + locationType: "selection", + countryCode, + phonePlanId: phonePlanIds[1], + locationOptionsQueries: { + locationOptions: [ + { + labelId: "state", + optionsValue: "AL" + }, + { + labelId: "city", + optionsValue: "NOAM-US-AL-BI" + } + ] + } + }); + areaCode = primaryAreaCodes ? primaryAreaCodes[0] : ""; + }); + + it("can wait until a reservation is purchased", async function() { + if (!includePhoneNumberLiveTests && !isPlaybackMode()) { + this.skip(); + } + + const reservationRequest: CreateReservationRequest = { + name: "LRO Test Search", + description: "Test search for JS phone number admin SDK.", + phonePlanIds, + areaCode, + quantity: 1 + }; + const reservePoller = await client.beginReservePhoneNumbers(reservationRequest); + assert.ok(reservePoller.getOperationState().isStarted); + + const reservation: PhoneNumberReservation = await reservePoller.pollUntilDone(); + reservationId = reservation.reservationId || ""; + + assert.ok(reservePoller.getOperationState().isCompleted); + assert.equal(reservation.status, "Reserved"); + assert.equal(reservation.phoneNumbers?.length, 1); + + const purchasePoller = await client.beginPurchaseReservation(reservationId); + assert.ok(purchasePoller.getOperationState().isStarted); + + await purchasePoller.pollUntilDone(); + assert.ok(purchasePoller.getOperationState().isCompleted); + }).timeout(60000); +}); diff --git a/sdk/communication/communication-administration/test/lro.release.spec.ts b/sdk/communication/communication-administration/test/lro.release.spec.ts new file mode 100644 index 000000000000..06edc35a46b6 --- /dev/null +++ b/sdk/communication/communication-administration/test/lro.release.spec.ts @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { isPlaybackMode, Recorder } from "@azure/test-utils-recorder"; +import { assert } from "chai"; +import { PhoneNumberAdministrationClient, PhoneNumberRelease } from "../src"; +import { createRecordedPhoneNumberAdministrationClient } from "./utils/recordedClient"; + +describe("PhoneNumber - LROs - Release [Playback/Live]", function() { + let recorder: Recorder; + let client: PhoneNumberAdministrationClient; + let includePhoneNumberLiveTests: boolean; + let phoneNumberToRelease: string; + + beforeEach(function() { + ({ + client, + recorder, + includePhoneNumberLiveTests + } = createRecordedPhoneNumberAdministrationClient(this)); + }); + + afterEach(async function() { + if (!this.currentTest?.isPending()) { + await recorder.stop(); + } + }); + + it("can get phone number to release", async function() { + if (!includePhoneNumberLiveTests && !isPlaybackMode()) { + this.skip(); + } + + const phoneNumbers = await client.listPhoneNumbers().next(); + phoneNumberToRelease = await phoneNumbers.value.phoneNumber; + + assert.isNotEmpty(phoneNumberToRelease); + }); + + it("can wait until a phone number is released", async function() { + if (!includePhoneNumberLiveTests && !isPlaybackMode()) { + this.skip(); + } + + const poller = await client.beginReleasePhoneNumbers([phoneNumberToRelease]); + assert.ok(poller.getOperationState().isStarted); + + const release: PhoneNumberRelease = await poller.pollUntilDone(); + assert.ok(poller.getOperationState().isCompleted); + assert.equal(release.status, "Complete"); + }).timeout(30000); +}); diff --git a/sdk/communication/communication-administration/test/lro.reserve.spec.ts b/sdk/communication/communication-administration/test/lro.reserve.spec.ts new file mode 100644 index 000000000000..53c325ddd601 --- /dev/null +++ b/sdk/communication/communication-administration/test/lro.reserve.spec.ts @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { isPlaybackMode, Recorder } from "@azure/test-utils-recorder"; +import { assert } from "chai"; +import { + CreateReservationRequest, + ListPhonePlansRequest, + PhoneNumberAdministrationClient, + PhoneNumberReservation +} from "../src"; +import { createRecordedPhoneNumberAdministrationClient } from "./utils/recordedClient"; + +describe("PhoneNumber - LROs - Phone Number Reservations [Playback/Live]", function() { + let recorder: Recorder; + let client: PhoneNumberAdministrationClient; + let includePhoneNumberLiveTests: boolean; + let reservationId: string; + let areaCode: string; + let poller: PollerLike, PhoneNumberReservation>; + let countryCode = "US"; + const phonePlanIds: string[] = []; + + beforeEach(function() { + ({ + client, + recorder, + includePhoneNumberLiveTests + } = createRecordedPhoneNumberAdministrationClient(this)); + }); + + afterEach(async function() { + if (!this.currentTest?.isPending()) { + await recorder.stop(); + } + }); + + it("can get phonePlanIds and areaCode to create reservation", async function() { + if (!includePhoneNumberLiveTests && !isPlaybackMode()) { + this.skip(); + } + + let phonePlanGroupId: string = ""; + for await (const phonePlanGroup of client.listPhonePlanGroups(countryCode)) { + if (phonePlanGroup.phoneNumberType == "Geographic") { + assert.isString(phonePlanGroup.phonePlanGroupId); + ({ phonePlanGroupId } = phonePlanGroup); + assert.isString(phonePlanGroupId); + break; + } + } + + const planGroupInfo: ListPhonePlansRequest = { + phonePlanGroupId, + countryCode + }; + + for await (const phonePlan of client.listPhonePlans(planGroupInfo)) { + assert.isString(phonePlan.phonePlanId); + phonePlanIds.push(phonePlan.phonePlanId); + } + + const { primaryAreaCodes } = await client.getAreaCodes({ + locationType: "selection", + countryCode, + phonePlanId: phonePlanIds[1], + locationOptionsQueries: { + locationOptions: [ + { + labelId: "state", + optionsValue: "AL" + }, + { + labelId: "city", + optionsValue: "NOAM-US-AL-BI" + } + ] + } + }); + areaCode = primaryAreaCodes ? primaryAreaCodes[0] : ""; + }); + + it("can wait until a search is completed", async function() { + if (!includePhoneNumberLiveTests && !isPlaybackMode()) { + this.skip(); + } + + const reservationRequest: CreateReservationRequest = { + name: "LRO Test Search", + description: "Test search for JS phone number admin SDK.", + phonePlanIds, + areaCode, + quantity: 1 + }; + poller = await client.beginReservePhoneNumbers(reservationRequest); + assert.ok(poller.getOperationState().isStarted); + + const reservation: PhoneNumberReservation = await poller.pollUntilDone(); + reservationId = reservation.reservationId || ""; + + assert.ok(poller.getOperationState().isCompleted); + assert.equal(reservation.status, "Reserved"); + assert.equal(reservation.phoneNumbers?.length, 1); + }).timeout(30000); + + it("can cancel a phone number reservation", async function() { + if (!includePhoneNumberLiveTests && !isPlaybackMode()) { + this.skip(); + } + + assert.ok(poller.getOperationState().isCompleted); + await poller.cancelOperation(); + assert.ok(poller.getOperationState().isCancelled); + + const { status } = await client.getReservation(reservationId); + assert.equal(status, "Cancelling" || "Cancelled"); + }).timeout(30000); +}); diff --git a/sdk/communication/communication-administration/test/phoneNumberAdministrationClient.mocked.spec.ts b/sdk/communication/communication-administration/test/phoneNumberAdministrationClient.mocked.spec.ts new file mode 100644 index 000000000000..769831fa6df5 --- /dev/null +++ b/sdk/communication/communication-administration/test/phoneNumberAdministrationClient.mocked.spec.ts @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { isNode } from "@azure/core-http"; +import { assert } from "chai"; +import sinon from "sinon"; +import { + GetAreaCodesRequest, + NumberConfiguration, + PhoneNumberAdministrationClient, + PhoneNumberCapabilitiesUpdates +} from "../src"; +import { SDK_VERSION } from "../src/phoneNumber/constants"; +import { NumberConfigurationPhoneNumber } from "../src/phoneNumber/generated/src/models"; +import { + baseHttpClient, + getAreaCodesHttpClient, + phoneNumbersCapabilitiesHttpClient +} from "./utils/mockHttpClients"; +import { TestPhoneNumberAdministrationClient } from "./utils/testPhoneNumberAdministrationClient"; + +describe("PhoneNumberAdministrationClient [Mocked]", () => { + const dateHeader = isNode ? "date" : "x-ms-date"; + + afterEach(() => { + sinon.restore(); + }); + + it("creates instance of PhoneNumberAdministrationClient", () => { + const client = new PhoneNumberAdministrationClient( + "endpoint=https://contoso.spool.azure.local;accesskey=banana" + ); + assert.instanceOf(client, PhoneNumberAdministrationClient); + }); + + it("sets correct headers", async () => { + const client = new TestPhoneNumberAdministrationClient(); + const spy = sinon.spy(baseHttpClient, "sendRequest"); + + await client.configurePhoneNumberTest({ + phoneNumber: "+18005551234", + callbackUrl: "https://callback/" + }); + sinon.assert.calledOnce(spy); + + const request = spy.getCall(0).args[0]; + + if (isNode) { + assert.equal(request.headers.get("host"), "contoso.spool.azure.local"); + } + + assert.typeOf(request.headers.get(dateHeader), "string"); + assert.isDefined(request.headers.get("authorization")); + assert.match( + request.headers.get("authorization") as string, + /HMAC-SHA256 SignedHeaders=.+&Signature=.+/ + ); + }); + + it("sends correct NumberConfiguration in configureNumber request", async () => { + const client = new TestPhoneNumberAdministrationClient(); + const spy = sinon.spy(baseHttpClient, "sendRequest"); + + await client.configurePhoneNumberTest({ + phoneNumber: "+18005551234", + callbackUrl: "https://callback/" + }); + sinon.assert.calledOnce(spy); + + const request = spy.getCall(0).args[0]; + const expected: NumberConfiguration = { + phoneNumber: "+18005551234", + pstnConfiguration: { + callbackUrl: "https://callback/" + } + }; + assert.deepEqual(JSON.parse(request.body), expected); + }); + + it("sends correct phone number in unconfigureNumber request", async () => { + const client = new TestPhoneNumberAdministrationClient(); + const spy = sinon.spy(baseHttpClient, "sendRequest"); + + await client.unconfigurePhoneNumberTest("+18005551234"); + sinon.assert.calledOnce(spy); + + const request = spy.getCall(0).args[0]; + const expected: NumberConfigurationPhoneNumber = { + phoneNumber: "+18005551234" + }; + assert.deepEqual(JSON.parse(request.body), expected); + }); + + it("sends correct UpdateNumberCapabilitiesRequest in updatePhoneNumbersCapabilities request", async () => { + const client = new TestPhoneNumberAdministrationClient(); + const spy = sinon.spy(phoneNumbersCapabilitiesHttpClient, "sendRequest"); + const phoneNumberCapabilitiesUpdate: PhoneNumberCapabilitiesUpdates = { + "+18005551234": { add: ["Calling"], remove: ["Office365"] } + }; + const response = await client.updatePhoneNumberCapabilitiesTest(phoneNumberCapabilitiesUpdate); + + assert.equal(response.capabilitiesUpdateId, "1"); + sinon.assert.calledOnce(spy); + + const request = spy.getCall(0).args[0]; + assert.deepEqual(JSON.parse(request.body), { phoneNumberCapabilitiesUpdate }); + }); + + it("sends capabilitiesUpdateId in url of getCapabilitiesUpdate request", async () => { + const client = new TestPhoneNumberAdministrationClient(); + const capabilitiesUpdateId = "1"; + const spy = sinon.spy(phoneNumbersCapabilitiesHttpClient, "sendRequest"); + const response = await client.getCapabilitiesUpdateTest(capabilitiesUpdateId); + + assert.equal(response.capabilitiesUpdateId, capabilitiesUpdateId); + sinon.assert.calledOnce(spy); + + const request = spy.getCall(0).args[0]; + assert.equal( + request.url, + `https://contoso.spool.azure.local/administration/phonenumbers/capabilities/${capabilitiesUpdateId}?api-version=${SDK_VERSION}` + ); + }); + + it("sends location type, country code & phone plan id in url of getAreaCodes request", async () => { + const client = new TestPhoneNumberAdministrationClient(); + const searchRequest: GetAreaCodesRequest = { + locationType: "locationType", + countryCode: "US", + phonePlanId: "phonePlanId", + locationOptionsQueries: { + locationOptions: [ + { labelId: "state", optionsValue: "CA" }, + { labelId: "city", optionsValue: "NOAM-US-CA-LA" } + ] + } + }; + const spy = sinon.spy(getAreaCodesHttpClient, "sendRequest"); + const response = await client.getAreaCodesTest(searchRequest); + + assert.equal(response.primaryAreaCodes?.length, 2); + assert.equal(response.secondaryAreaCodes?.length, 1); + sinon.assert.calledOnce(spy); + + const request = spy.getCall(0).args[0]; + assert.equal( + request.url, + `https://contoso.spool.azure.local/administration/phonenumbers/countries/${searchRequest.countryCode}/areacodes?locationType=${searchRequest.locationType}&phonePlanId=${searchRequest.phonePlanId}&api-version=${SDK_VERSION}` + ); + }); +}); diff --git a/sdk/communication/communication-administration/test/phoneNumberAdministrationClient.spec.ts b/sdk/communication/communication-administration/test/phoneNumberAdministrationClient.spec.ts new file mode 100644 index 000000000000..55927dcf475b --- /dev/null +++ b/sdk/communication/communication-administration/test/phoneNumberAdministrationClient.spec.ts @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { assert } from "chai"; +import { isPlaybackMode, Recorder } from "@azure/test-utils-recorder"; +import { ListPhonePlansRequest, LocationOptions, PhoneNumberAdministrationClient } from "../src"; +import { createRecordedPhoneNumberAdministrationClient } from "./utils/recordedClient"; + +describe("PhoneNumberAdministrationClient [Playback/Live]", function() { + let recorder: Recorder; + let client: PhoneNumberAdministrationClient; + let includePhoneNumberLiveTests: boolean; + let phonePlanGroupId: string; + let phonePlanId: string; + let locationOptions: LocationOptions | undefined; + const countryCode = "US"; + + beforeEach(function() { + ({ + client, + recorder, + includePhoneNumberLiveTests + } = createRecordedPhoneNumberAdministrationClient(this)); + }); + + afterEach(async function() { + if (!this.currentTest?.isPending()) { + await recorder.stop(); + } + }); + + it("can get phonePlanGroupId and phonePlanId for other tests", async function() { + if (!includePhoneNumberLiveTests && !isPlaybackMode()) { + this.skip(); + } + + for await (const phonePlanGroup of client.listPhonePlanGroups(countryCode)) { + assert.isString(phonePlanGroup.phonePlanGroupId); + ({ phonePlanGroupId } = phonePlanGroup); + assert.isString(phonePlanGroupId); + + break; + } + + const planGroupInfo: ListPhonePlansRequest = { + phonePlanGroupId, + countryCode + }; + + for await (const phonePlan of client.listPhonePlans(planGroupInfo)) { + assert.isString(phonePlan.phonePlanId); + ({ phonePlanId } = phonePlan); + assert.isString(phonePlanId); + } + }).timeout(5000); + + it("can get location options", async function() { + if (!includePhoneNumberLiveTests && !isPlaybackMode()) { + this.skip(); + } + + ({ locationOptions } = await client.getPhonePlanLocationOptions({ + countryCode, + phonePlanGroupId, + phonePlanId + })); + + assert.isDefined(locationOptions); + assert.isString(locationOptions?.labelId); + assert.isString(locationOptions?.labelName); + }); + + it("can get area codes", async function() { + if (!includePhoneNumberLiveTests && !isPlaybackMode()) { + this.skip(); + } + + const { primaryAreaCodes } = await client.getAreaCodes({ + locationType: "selection", + countryCode, + phonePlanId, + locationOptionsQueries: { + locationOptions: [ + { labelId: "state", optionsValue: "CA" }, + { labelId: "city", optionsValue: "NOAM-US-CA-LA" } + ] + } + }); + + assert.isArray(primaryAreaCodes); + }); +}); diff --git a/sdk/communication/communication-administration/test/utils/mockHttpClients.ts b/sdk/communication/communication-administration/test/utils/mockHttpClients.ts new file mode 100644 index 000000000000..d89c5dfd9e8d --- /dev/null +++ b/sdk/communication/communication-administration/test/utils/mockHttpClients.ts @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { HttpClient, WebResourceLike, HttpOperationResponse, HttpHeaders } from "@azure/core-http"; +import { + AcquiredPhoneNumber, + AcquiredPhoneNumbers, + AreaCodes, + CommunicationIdentityToken, + PhoneNumberCountries, + PhoneNumberCountry, + PhoneNumberEntities, + PhoneNumberEntity, + PhonePlan, + PhonePlanGroup, + PhonePlanGroups, + PhonePlansResponse, + UpdateNumberCapabilitiesResponse +} from "../../src"; +import { CommunicationIdentity } from "../../src/communicationIdentity/generated/src/models"; + +export const createMockHttpClient = (status: number = 200, parsedBody?: T): HttpClient => { + return { + async sendRequest(httpRequest: WebResourceLike): Promise { + return { + status, + headers: new HttpHeaders(), + request: httpRequest, + parsedBody + }; + } + }; +}; + +export const baseHttpClient: HttpClient = createMockHttpClient(); + +export const base202HttpClient: HttpClient = createMockHttpClient(202); + +const tokenResponse = { + id: "identity", + token: "token", + expiresOn: new Date("2011/11/30") +}; + +export const issueTokenHttpClient: HttpClient = createMockHttpClient( + 200, + tokenResponse +); +export const revokeTokensHttpClient: HttpClient = createMockHttpClient(204); + +export const createUserHttpClient: HttpClient = createMockHttpClient(200, { + id: "identity" +}); + +const phoneNumbers: AcquiredPhoneNumber[] = [ + { + phoneNumber: "+18005551234", + acquiredCapabilities: ["Calling"], + availableCapabilities: ["Calling"] + }, + { + phoneNumber: "+18005555555", + acquiredCapabilities: ["Azure"], + availableCapabilities: ["Premium"] + }, + { + phoneNumber: "+18005559876", + acquiredCapabilities: ["Calling"], + availableCapabilities: ["Azure"] + } +]; + +export const listPhoneNumbersHttpClient: HttpClient = createMockHttpClient( + 200, + { phoneNumbers } +); + +const countries: PhoneNumberCountry[] = [ + { + localizedName: "France", + countryCode: "FR" + }, + { + localizedName: "Canada", + countryCode: "CA" + } +]; + +export const listSupportedCountriesHttpClient: HttpClient = createMockHttpClient< + PhoneNumberCountries +>(200, { + countries +}); + +const phonePlanGroups: PhonePlanGroup[] = [ + { + phonePlanGroupId: "1", + localizedName: "France", + localizedDescription: "The #1 plan." + }, + { + phonePlanGroupId: "2", + localizedName: "France", + localizedDescription: "The #2 plan." + } +]; + +export const listPhonePlanGroupsHttpClient: HttpClient = createMockHttpClient( + 200, + { phonePlanGroups } +); + +const phonePlans: PhonePlan[] = [ + { + phonePlanId: "1", + localizedName: "France", + locationType: "NotRequired" + }, + { + phonePlanId: "2", + localizedName: "France", + locationType: "CivicAddress" + } +]; + +export const listPhonePlansHttpClient: HttpClient = createMockHttpClient(200, { + phonePlans +}); + +const entities: PhoneNumberEntity[] = [{ id: "1" }, { id: "2" }, { id: "3" }]; + +export const listReleasesOrSearchesHttpClient: HttpClient = createMockHttpClient< + PhoneNumberEntities +>(200, { entities }); + +export const phoneNumbersCapabilitiesHttpClient: HttpClient = createMockHttpClient< + UpdateNumberCapabilitiesResponse +>(200, { capabilitiesUpdateId: "1" }); + +const areaCodes: AreaCodes = { + primaryAreaCodes: ["555", "555"], + secondaryAreaCodes: ["555"] +}; + +export const getAreaCodesHttpClient: HttpClient = createMockHttpClient(200, areaCodes); diff --git a/sdk/communication/communication-administration/test/utils/recordedClient.ts b/sdk/communication/communication-administration/test/utils/recordedClient.ts new file mode 100644 index 000000000000..c7513fc85de3 --- /dev/null +++ b/sdk/communication/communication-administration/test/utils/recordedClient.ts @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { Context } from "mocha"; +import * as dotenv from "dotenv"; + +import { env, Recorder, record, RecorderEnvironmentSetup } from "@azure/test-utils-recorder"; +import { isNode } from "@azure/core-http"; +import { CommunicationIdentityClient, PhoneNumberAdministrationClient } from "../../src"; + +if (isNode) { + dotenv.config(); +} + +export interface RecordedClient { + client: T; + recorder: Recorder; +} + +const replaceableVariables: { [k: string]: string } = { + COMMUNICATION_CONNECTION_STRING: "endpoint=https://endpoint/;accesskey=banana", + INCLUDE_PHONENUMBER_LIVE_TESTS: "false" +}; + +export const environmentSetup: RecorderEnvironmentSetup = { + replaceableVariables, + customizationsOnRecordings: [ + (recording: string): string => + recording.replace(/"token"\s?:\s?"[^"]*"/g, `"token":"sanitized"`), + (recording: string): string => recording.replace(/(https:\/\/)([^\/',]*)/, "$1endpoint"), + /** + * Must replace date saved to tokensValidFrom as to not + * break playback tests. + */ + (recording: string): string => { + return recording.replace( + /"tokensValidFrom"\s?:\s?"[^"]*"/g, + `"tokensValidFrom":"2020-10-10T00:00:00.000Z"` + ); + }, + (recording: string): string => recording.replace(/"id"\s?:\s?"[^"]*"/g, `"id":"sanitized"`), + (recording: string): string => { + return recording.replace( + /(https:\/\/[^\/',]*\/identities\/)[^\/',]*(\/token)/, + "$1sanitized$2" + ); + }, + (recording: string): string => + recording.replace(/\/identities\/[^\/'",]*/, "/identities/sanitized"), + (recording: string): string => recording.replace(/\+\d{1}\d{3}\d{3}\d{4}/g, "+18005551234"), + (recording: string): string => + recording.replace(/[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}/gi, "sanitized") + ], + queryParametersToSkip: [] +}; + +export function createRecordedCommunicationIdentityClient( + context: Context +): RecordedClient { + const recorder = record(context, environmentSetup); + + return { + client: new CommunicationIdentityClient(env.COMMUNICATION_CONNECTION_STRING), + recorder + }; +} + +export function createRecordedPhoneNumberAdministrationClient( + context: Context +): RecordedClient & { + includePhoneNumberLiveTests: boolean; +} { + const recorder = record(context, environmentSetup); + + return { + client: new PhoneNumberAdministrationClient(env.COMMUNICATION_CONNECTION_STRING), + recorder, + includePhoneNumberLiveTests: env.INCLUDE_PHONENUMBER_LIVE_TESTS == "true" + }; +} diff --git a/sdk/communication/communication-administration/test/utils/testCommunicationIdentityClient.ts b/sdk/communication/communication-administration/test/utils/testCommunicationIdentityClient.ts new file mode 100644 index 000000000000..73c08cfc9e99 --- /dev/null +++ b/sdk/communication/communication-administration/test/utils/testCommunicationIdentityClient.ts @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { OperationOptions, RestResponse } from "@azure/core-http"; +import { CommunicationUser } from "@azure/communication-common"; +import { + CommunicationIdentityClient, + TokenScope, + IssueTokenResponse, + CreateUserResponse +} from "../../src"; +import { + issueTokenHttpClient, + createUserHttpClient, + revokeTokensHttpClient +} from "./mockHttpClients"; + +export class TestCommunicationIdentityClient { + private connectionString: string = "endpoint=https://contoso.spool.azure.local;accesskey=banana"; + + public async issueTokenTest( + user: CommunicationUser, + scopes: TokenScope[], + options: OperationOptions = {} + ): Promise { + const client = new CommunicationIdentityClient(this.connectionString, { + httpClient: issueTokenHttpClient + }); + return client.issueToken(user, scopes, options); + } + + public async revokeTokensTest( + user: CommunicationUser, + revocationTime?: Date, + options: OperationOptions = {} + ): Promise { + const client = new CommunicationIdentityClient(this.connectionString, { + httpClient: revokeTokensHttpClient + }); + return client.revokeTokens(user, revocationTime, options); + } + + public async createUserTest(options: OperationOptions = {}): Promise { + const client = new CommunicationIdentityClient(this.connectionString, { + httpClient: createUserHttpClient + }); + return client.createUser(options); + } +} diff --git a/sdk/communication/communication-administration/test/utils/testPhoneNumberAdministrationClient.ts b/sdk/communication/communication-administration/test/utils/testPhoneNumberAdministrationClient.ts new file mode 100644 index 000000000000..21d5d172209a --- /dev/null +++ b/sdk/communication/communication-administration/test/utils/testPhoneNumberAdministrationClient.ts @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + AcquiredPhoneNumber, + ListPhoneNumbersOptions, + ListPhonePlansOptions, + ListPhonePlansRequest, + ListPhonePlanGroupsOptions, + ListSupportedCountriesOptions, + PageableOptions, + PhoneNumberAdministrationClient, + PhoneNumberCountry, + PhoneNumberEntity, + PhonePlan, + PhonePlanGroup, + ConfigurePhoneNumberRequest, + ConfigurePhoneNumberOptions, + VoidResponse, + PhoneNumberCapabilitiesUpdates, + UpdateCapabilitiesOptions, + UpdateNumbersCapabilitiesResponse, + GetCapabilitiesUpdateResponse, + GetAreaCodesRequest, + GetAreaCodesOptions, + GetAreaCodesResponse, + GetCapabilitiesUpdateOptions, + UnconfigurePhoneNumberOptions +} from "../../src"; +import { + baseHttpClient, + getAreaCodesHttpClient, + listPhoneNumbersHttpClient, + listPhonePlanGroupsHttpClient, + listPhonePlansHttpClient, + listReleasesOrSearchesHttpClient, + listSupportedCountriesHttpClient, + phoneNumbersCapabilitiesHttpClient +} from "./mockHttpClients"; + +export class TestPhoneNumberAdministrationClient { + private connectionString: string = "endpoint=https://contoso.spool.azure.local;accesskey=banana"; + + public listPhoneNumbersTest( + options: ListPhoneNumbersOptions = {} + ): PagedAsyncIterableIterator { + const client = new PhoneNumberAdministrationClient(this.connectionString, { + httpClient: listPhoneNumbersHttpClient + }); + + return client.listPhoneNumbers(options); + } + + public listSupportedCountriesTest( + options: ListSupportedCountriesOptions = {} + ): PagedAsyncIterableIterator { + const client = new PhoneNumberAdministrationClient(this.connectionString, { + httpClient: listSupportedCountriesHttpClient + }); + + return client.listSupportedCountries(options); + } + + public listPhonePlanGroupsTest( + countryCode: string, + options: ListPhonePlanGroupsOptions = {} + ): PagedAsyncIterableIterator { + const client = new PhoneNumberAdministrationClient(this.connectionString, { + httpClient: listPhonePlanGroupsHttpClient + }); + + return client.listPhonePlanGroups(countryCode, options); + } + + public listPhonePlansTest( + planGroupInfo: ListPhonePlansRequest, + options: ListPhonePlansOptions = {} + ): PagedAsyncIterableIterator { + const client = new PhoneNumberAdministrationClient(this.connectionString, { + httpClient: listPhonePlansHttpClient + }); + + return client.listPhonePlans(planGroupInfo, options); + } + + public listReleasesTest( + options: PageableOptions = {} + ): PagedAsyncIterableIterator { + const client = new PhoneNumberAdministrationClient(this.connectionString, { + httpClient: listReleasesOrSearchesHttpClient + }); + + return client.listReleases(options); + } + + public listSearchesTest( + options: PageableOptions = {} + ): PagedAsyncIterableIterator { + const client = new PhoneNumberAdministrationClient(this.connectionString, { + httpClient: listReleasesOrSearchesHttpClient + }); + + return client.listSearches(options); + } + + public async configurePhoneNumberTest( + config: ConfigurePhoneNumberRequest, + options: ConfigurePhoneNumberOptions = {} + ): Promise { + const client = new PhoneNumberAdministrationClient(this.connectionString, { + httpClient: baseHttpClient + }); + + return client.configurePhoneNumber(config, options); + } + + public async unconfigurePhoneNumberTest( + phoneNumber: string, + options: UnconfigurePhoneNumberOptions = {} + ): Promise { + const client = new PhoneNumberAdministrationClient(this.connectionString, { + httpClient: baseHttpClient + }); + + return client.unconfigurePhoneNumber(phoneNumber, options); + } + + public async updatePhoneNumberCapabilitiesTest( + phoneNumberCapabilitiesUpdates: PhoneNumberCapabilitiesUpdates, + options: UpdateCapabilitiesOptions = {} + ): Promise { + const client = new PhoneNumberAdministrationClient(this.connectionString, { + httpClient: phoneNumbersCapabilitiesHttpClient + }); + + return client.updatePhoneNumbersCapabilities(phoneNumberCapabilitiesUpdates, options); + } + + public async getCapabilitiesUpdateTest( + capabilitiesUpdateId: string, + options: GetCapabilitiesUpdateOptions = {} + ): Promise { + const client = new PhoneNumberAdministrationClient(this.connectionString, { + httpClient: phoneNumbersCapabilitiesHttpClient + }); + + return client.getCapabilitiesUpdate(capabilitiesUpdateId, options); + } + + public async getAreaCodesTest( + request: GetAreaCodesRequest, + options: GetAreaCodesOptions = {} + ): Promise { + const client = new PhoneNumberAdministrationClient(this.connectionString, { + httpClient: getAreaCodesHttpClient + }); + + return client.getAreaCodes(request, options); + } +} diff --git a/sdk/communication/communication-administration/tests.yml b/sdk/communication/communication-administration/tests.yml new file mode 100644 index 000000000000..af3010fa96fd --- /dev/null +++ b/sdk/communication/communication-administration/tests.yml @@ -0,0 +1,7 @@ +trigger: none + +extends: + template: ../../../eng/pipelines/templates/jobs/archetype-sdk-integration.yml + parameters: + PackageName: "@azure/communication-administration" + ResourceServiceDirectory: communication diff --git a/sdk/communication/communication-administration/tsconfig.json b/sdk/communication/communication-administration/tsconfig.json new file mode 100644 index 000000000000..01b339f5a963 --- /dev/null +++ b/sdk/communication/communication-administration/tsconfig.json @@ -0,0 +1,17 @@ +{ + "extends": "../../../tsconfig.package", + "compilerOptions": { + "outDir": "./dist-esm", + "declarationDir": "./types" + }, + "exclude": [ + "node_modules", + "types", + "temp", + "browser", + "dist", + "dist-esm", + "dist-samples", + "./samples/**/*.ts" + ] +} diff --git a/sdk/communication/communication-chat/.gitignore b/sdk/communication/communication-chat/.gitignore new file mode 100644 index 000000000000..e35e6c4bbeb0 --- /dev/null +++ b/sdk/communication/communication-chat/.gitignore @@ -0,0 +1 @@ +/**/code-model-v* \ No newline at end of file diff --git a/sdk/communication/communication-chat/.vscode/launch.json b/sdk/communication/communication-chat/.vscode/launch.json new file mode 100644 index 000000000000..458b9b5c32c6 --- /dev/null +++ b/sdk/communication/communication-chat/.vscode/launch.json @@ -0,0 +1,45 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "node", + "request": "launch", + "name": "Debug Mocha Test [Without Rollup]", + "program": "${workspaceFolder}/node_modules/mocha/bin/_mocha", + "args": [ + "-r", + "ts-node/register", + "--timeout", + "999999", + "--colors", + "${workspaceFolder}/test/*.spec.ts", + "${workspaceFolder}/test/node/*.spec.ts" + ], + "env": { + "TS_NODE_COMPILER_OPTIONS": "{\"module\": \"commonjs\"}" + }, + "console": "integratedTerminal", + "internalConsoleOptions": "neverOpen", + "protocol": "inspector" + }, + { + "type": "node", + "request": "launch", + "name": "Debug Unit Tests", + "program": "${workspaceFolder}/node_modules/mocha/bin/_mocha", + "args": [ + "-u", + "tdd", + "--timeout", + "999999", + "--colors", + "${workspaceFolder}/dist-test/index.node.js" + ], + "internalConsoleOptions": "openOnSessionStart", + "preLaunchTask": "npm: build:test" + } + ] +} diff --git a/sdk/communication/communication-chat/.vscode/tasks.json b/sdk/communication/communication-chat/.vscode/tasks.json new file mode 100644 index 000000000000..83bb44526db4 --- /dev/null +++ b/sdk/communication/communication-chat/.vscode/tasks.json @@ -0,0 +1,16 @@ +{ + // See https://go.microsoft.com/fwlink/?LinkId=733558 + // for the documentation about the tasks.json format + "version": "2.0.0", + "tasks": [ + { + "label": "Build Node", + "type": "npm", + "script": "build:node", + "group": { + "kind": "build", + "isDefault": true + } + } + ] +} diff --git a/sdk/communication/communication-chat/CHANGELOG.md b/sdk/communication/communication-chat/CHANGELOG.md new file mode 100644 index 000000000000..e71e68ede491 --- /dev/null +++ b/sdk/communication/communication-chat/CHANGELOG.md @@ -0,0 +1,19 @@ +# Release History + +## 1.0.0-beta.3 (Unreleased) + +## 1.0.0-beta.2 (2020-10-06) + +Updated `@azure/communication-chat` version + +## 1.0.0-beta.1 (2020-09-22) + +The first preview of the Azure Communication Chat Client has the following features: + +- create/get/update/delete a chat thread +- list all chat threads the user join +- create/get/update/delete a chat message +- list all chat messages in a chat thread +- add members in a chat thread +- delete a member in a chat thread +- list all members in a chat thread diff --git a/sdk/communication/communication-chat/LICENSE b/sdk/communication/communication-chat/LICENSE new file mode 100644 index 000000000000..ea8fb1516028 --- /dev/null +++ b/sdk/communication/communication-chat/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2020 Microsoft + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/sdk/communication/communication-chat/README.md b/sdk/communication/communication-chat/README.md new file mode 100644 index 000000000000..b2b0c96eff82 --- /dev/null +++ b/sdk/communication/communication-chat/README.md @@ -0,0 +1,188 @@ +# Azure Communication Chat client library for JavaScript + +Azure Communication Services for Chat lets developers add chat capabilities to their app. Use this client library to manage chat threads and their users, and send and receive chat messages. + +Read more about Azure Communication Services [here](https://docs.microsoft.com/azure/communication-services/overview) + +## Getting started + +## Prerequisites + +- An [Azure subscription][azure_sub]. +- An existing Communication Services resource. If you need to create the resource, you can use the [Azure Portal][azure_portal] or [Azure CLI][azure_cli]. +- [Node.js](https://nodejs.org) + +### Installing + +```bash +npm install @azure/communication-chat +``` + +## Key concepts + +A chat conversation is represented by a thread. Each user in the thread is called a thread member. Thread members can chat with one another privately in a 1:1 chat or huddle up in a 1:N group chat. Users also get near-real time updates for when others are typing and when they have read the messages. + +### ChatClient + +`ChatClient` is the primary interface for developers using this client library. It provides asynchronous methods to create and delete a thread. + +### ChatThreadClient + +`ChatThreadClient` provides asynchronous methods to do the message and chat thread members operations within the chat thread. + +## Examples + +### Initialize ChatClient + +Use resource url and user access token to initialize chat client. + +```JavaScript +import { ChatClient } from '@azure/communicationservices-chat'; +import { AzureCommunicationUserCredential } from "@azure/communication-common"; + +// Your unique Azure Communication service endpoint +let endpointUrl = ''; +let userAccessToken = ''; +let userCredential = new AzureCommunicationUserCredential(userAccessToken); +let chatClient = new ChatClient(endpointUrl, userCredential); + +``` + +### Create a thread with two users + +Use the `createThread` method to create a chat thread. + +`createThreadRequest` is used to describe the thread request: + +- Use `topic` to give a thread topic; +- Use `members` to list the thread members to be added to the thread; + +`chatThreadClient` is the response returned from creating a thread, it contains an `threadId` which is the unique ID of the thread. + +```Javascript +let createThreadRequest = +{ + topic: 'Preparation for London conference', + members: + [ + { + user: { communicationUserId: '' }, + displayName: 'Jack' + }, + { + user: { communicationUserId: '' }, + displayName: 'Geeta' + } + ] +}; +let chatThreadClient= await chatClient.createChatThread(createThreadRequest); +let threadId = chatThreadClient.threadId; +``` + +### Send a message to the thread + +Use `sendMessage` method to sends a message to a thread identified by threadId. + +`sendMessageRequest` is used to describe the message request: + +- Use `content` to provide the chat message content; + +`sendMessageOptions` is used to describe the operation optional params: + +- Use `priority` to specify the message priority level, such as 'Normal' or 'High' ; +- Use `senderDisplayName` to specify the display name of the sender; + +`sendChatMessageResult` is the response returned from sending a message, it contains an ID, which is the unique ID of the message. + +```JavaScript +let sendMessageRequest = +{ + content: 'Hello Geeta! Can you share the deck for the conference?' +}; +let sendMessageOptions = +{ + priority: 'Normal', + senderDisplayName : 'Jack' +}; +let sendChatMessageResult = await chatThreadClient.sendMessage(sendMessageRequest, sendMessageOptions); +let messageId = sendChatMessageResult.id; +``` + +### Receive messages from a thread + +With real-time signaling, you can subscribe to listen for new incoming messages and update the current messages in memory accordingly. + +```JavaScript + +// open notifications channel +await chatClient.startRealtimeNotifications(); +// subscribe to new notification +chatClient.on("chatMessageReceived", (e) => { + console.log("Notification chatMessageReceived!"); + // your code here +}); + +``` + +Alternatively you can retrieve chat messages by polling the `listMessages` method at specified intervals. + +```JavaScript +for await (const chatMessage of chatThreadClient.listMessages()) { + // your code here +} +``` + +### Add Users to a thread + +Once a thread is created, you can then add and remove users from that thread. By adding users, you give them access to be able to send messages to the thread. +You will need to start by getting a new access token and identity for that user. The user will need that access token in order to initialize their chat client. +More information on tokens here: [Authenticate to Azure Communication Services](https://docs.microsoft.com/azure/communication-services/concepts/authentication?tabs=javascript) + +```JavaScript +// Get a new token created for the user. The token response will contain a token and an identity for the user. +let userTokenResponse = await myTokenFunction(); + +let addMembersRequest = +{ + members: [ + { + user: { communicationUserId: userTokenResponse.identity }, + displayName: '', + shareHistoryTime: '