track2 @azure/arm-features (#16207)
This commit is contained in:
Родитель
24ca85370e
Коммит
16f6e54eff
|
@ -7,6 +7,7 @@ dependencies:
|
|||
'@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/arm-features': file:projects/arm-features.tgz
|
||||
'@rush-temp/attestation': file:projects/attestation.tgz
|
||||
'@rush-temp/communication-chat': file:projects/communication-chat.tgz
|
||||
'@rush-temp/communication-common': file:projects/communication-common.tgz
|
||||
|
@ -8486,6 +8487,26 @@ packages:
|
|||
integrity: sha512-buaeuMHFekG8QNBfImMaKYx4JpSOdVLJHUD+tg9vdNDOFzN2gpUb8NaXZBB5Pmi7WQnBII9RTk4OLr1bERthyg==
|
||||
tarball: file:projects/app-configuration.tgz
|
||||
version: 0.0.0
|
||||
file:projects/arm-features.tgz:
|
||||
dependencies:
|
||||
'@microsoft/api-extractor': 7.7.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
|
||||
mkdirp: 1.0.4
|
||||
rollup: 1.32.1
|
||||
rollup-plugin-node-resolve: 3.4.0
|
||||
rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1
|
||||
tslib: 2.3.0
|
||||
typescript: 4.2.4
|
||||
uglify-js: 3.13.10
|
||||
dev: false
|
||||
name: '@rush-temp/arm-features'
|
||||
resolution:
|
||||
integrity: sha512-Jdqy3BnYfdYfUwQ4L97IVWbg0zwT9HuL1PJ/8JZrmqMo6RZOE1jUDnYcSRA2h7Ke1Rhe8rHi0g80U3EWbWvr9A==
|
||||
tarball: file:projects/arm-features.tgz
|
||||
version: 0.0.0
|
||||
file:projects/attestation.tgz:
|
||||
dependencies:
|
||||
'@azure/core-tracing': 1.0.0-preview.12
|
||||
|
@ -12040,6 +12061,7 @@ specifiers:
|
|||
'@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/arm-features': file:./projects/arm-features.tgz
|
||||
'@rush-temp/attestation': file:./projects/attestation.tgz
|
||||
'@rush-temp/communication-chat': file:./projects/communication-chat.tgz
|
||||
'@rush-temp/communication-common': file:./projects/communication-common.tgz
|
||||
|
|
10
rush.json
10
rush.json
|
@ -1,8 +1,7 @@
|
|||
/**
|
||||
* This is the main configuration file for Rush.
|
||||
* For full documentation, please see https://rushjs.io
|
||||
*/
|
||||
{
|
||||
*/{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/rush/v5/rush.schema.json",
|
||||
/**
|
||||
* (Required) This specifies the version of the Rush engine to be used in this repo.
|
||||
|
@ -794,6 +793,11 @@
|
|||
"packageName": "@azure/mixed-reality-remote-rendering",
|
||||
"projectFolder": "sdk/remoterendering/mixed-reality-remote-rendering",
|
||||
"versionPolicyName": "client"
|
||||
},
|
||||
{
|
||||
"packageName": "@azure/arm-features",
|
||||
"projectFolder": "sdk/features/arm-features",
|
||||
"versionPolicyName": "management"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
## 30.0.0-beta.1 (2021-07-15)
|
||||
|
||||
This is the first preview for the new version of the `@azure/arm-features` package that follows the new [guidelines for TypeScript SDKs](https://azure.github.io/azure-sdk/typescript_introduction.html) for Azure services.
|
||||
|
||||
While this package remains auto generated, the SDK generator itself has undergone changes to comply with the above guidelines in order to generate packages that are idiomatic to the JavaScript/TypeScript ecosystem and consistent with other packages for Azure services. For more on this, please see [State of the Azure SDK 2021](https://devblogs.microsoft.com/azure-sdk/state-of-the-azure-sdk-2021/).
|
||||
|
||||
Please note that this version has breaking changes, all of which were made after careful consideration during the authoring of the guidelines and user studies.
|
||||
|
||||
**Noteworthy changes and features**
|
||||
- Authentication: The packages `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` are no longer supported. Use package [@azure/identity](https://www.npmjs.com/package/@azure/identity) instead. Select a credential from Azure Identity examples based on the authentication method of your choice.
|
||||
- Callbacks: Method overloads that used callbacks have been removed and the use of promises is encouraged instead.
|
||||
- List operations now return an iterable result that follows the `PagedAsyncIterableIterator` interface as opposed to the previous model where you had to make a new request using the link to the next page.
|
||||
- Long running operations i.e. the methods whose names started with `begin` now return a poller object that gives you a better control over the operation. To get the final result like before use the corresponding method that will have the suffix `AndWait`.
|
||||
- The SDK only supports ECMAScript 2015 (ES6) and beyond, all projects that referenced this SDK should be upgraded to use ES6.
|
|
@ -1,6 +1,6 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2019 Microsoft
|
||||
Copyright (c) 2021 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
|
||||
|
@ -18,4 +18,4 @@ 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.
|
||||
SOFTWARE.
|
|
@ -1,109 +1,91 @@
|
|||
## Azure FeatureClient SDK for JavaScript
|
||||
# Azure Feature client library for JavaScript
|
||||
|
||||
This package contains an isomorphic SDK (runs both in Node.js and in browsers) for FeatureClient.
|
||||
This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure Feature client.
|
||||
|
||||
Azure Feature Exposure Control (AFEC) provides a mechanism for the resource providers to control feature exposure to users. Resource providers typically use this mechanism to provide public/private preview for new features prior to making them generally available. Users need to explicitly register for AFEC features to get access to such functionality.
|
||||
|
||||
[Source code](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/features/arm-features) |
|
||||
[Package (NPM)](https://www.npmjs.com/package/@azure/arm-features) |
|
||||
[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-features) |
|
||||
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)
|
||||
|
||||
## Getting started
|
||||
|
||||
### Currently supported environments
|
||||
|
||||
- [LTS versions of Node.js](https://nodejs.org/about/releases/)
|
||||
- Latest versions of Safari, Chrome, Edge, and Firefox.
|
||||
- Latest versions of Safari, Chrome, Edge and Firefox.
|
||||
|
||||
### Prerequisites
|
||||
|
||||
You must have an [Azure subscription](https://azure.microsoft.com/free/).
|
||||
- An [Azure subscription][azure_sub].
|
||||
|
||||
### How to install
|
||||
### Install the `@azure/arm-features` package
|
||||
|
||||
To use this SDK in your project, you will need to install two packages.
|
||||
- `@azure/arm-features` that contains the client.
|
||||
- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory.
|
||||
Install the Azure Feature client library for JavaScript with `npm`:
|
||||
|
||||
Install both packages using the below command:
|
||||
```bash
|
||||
npm install --save @azure/arm-features @azure/identity
|
||||
npm install @azure/arm-features
|
||||
```
|
||||
|
||||
> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features.
|
||||
If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options.
|
||||
### Create and authenticate a `FeatureClient`
|
||||
|
||||
### How to use
|
||||
To create a client object to access the Azure Feature API, you will need the `endpoint` of your Azure Feature resource and a `credential`. The Azure Feature client can use Azure Active Directory credentials to authenticate.
|
||||
You can find the endpoint for your Azure Feature resource in the [Azure Portal][azure_portal].
|
||||
|
||||
- If you are writing a client side browser application,
|
||||
- Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions.
|
||||
- Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below.
|
||||
- If you are writing a server side application,
|
||||
- [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples)
|
||||
- Complete the set up steps required by the credential if any.
|
||||
- Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below.
|
||||
#### Using an Azure Active Directory Credential
|
||||
|
||||
In the below samples, we pass the credential and the Azure subscription id to instantiate the client.
|
||||
Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started.
|
||||
You can authenticate with Azure Active Directory using the [Azure Identity library][azure_identity]. To use the [DefaultAzureCredential][defaultazurecredential] provider shown below, or other credential providers provided with the Azure SDK, please install the `@azure/identity` package:
|
||||
|
||||
#### nodejs - Authentication, client creation, and listOperations as an example written in JavaScript.
|
||||
```bash
|
||||
npm install @azure/identity
|
||||
```
|
||||
|
||||
##### Sample code
|
||||
You will also need to register a new AAD application and grant access to Azure Feature by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions).
|
||||
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`.
|
||||
|
||||
```javascript
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
const { FeatureClient } = require("@azure/arm-features");
|
||||
const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];
|
||||
|
||||
// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples
|
||||
// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead.
|
||||
const creds = new DefaultAzureCredential();
|
||||
const client = new FeatureClient(creds, subscriptionId);
|
||||
|
||||
client.listOperations().then((result) => {
|
||||
console.log("The result is:");
|
||||
console.log(result);
|
||||
}).catch((err) => {
|
||||
console.log("An error occurred:");
|
||||
console.error(err);
|
||||
});
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
const client = new FeatureClient("<endpoint>", new DefaultAzureCredential());
|
||||
```
|
||||
|
||||
#### browser - Authentication, client creation, and listOperations as an example written in JavaScript.
|
||||
## Key concepts
|
||||
|
||||
In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser.
|
||||
- See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser.
|
||||
- Note down the client Id from the previous step and use it in the browser sample below.
|
||||
### FeatureClient
|
||||
|
||||
##### Sample code
|
||||
`FeatureClient` is the primary interface for developers using the Azure Feature client library. Explore the methods on this client object to understand the different features of the Azure Feature service that you can access.
|
||||
|
||||
- index.html
|
||||
## Troubleshooting
|
||||
|
||||
```html
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>@azure/arm-features sample</title>
|
||||
<script src="node_modules/@azure/ms-rest-azure-js/dist/msRestAzure.js"></script>
|
||||
<script src="node_modules/@azure/identity/dist/index.js"></script>
|
||||
<script src="node_modules/@azure/arm-features/dist/arm-features.js"></script>
|
||||
<script type="text/javascript">
|
||||
const subscriptionId = "<Subscription_Id>";
|
||||
// Create credentials using the `@azure/identity` package.
|
||||
// Please note that you can also use credentials from the `@azure/ms-rest-browserauth` package instead.
|
||||
const credential = new InteractiveBrowserCredential(
|
||||
{
|
||||
clientId: "<client id for your Azure AD app>",
|
||||
tenantId: "<optional tenant for your organization>"
|
||||
});
|
||||
const client = new Azure.ArmFeatures.FeatureClient(creds, subscriptionId);
|
||||
client.listOperations().then((result) => {
|
||||
console.log("The result is:");
|
||||
console.log(result);
|
||||
}).catch((err) => {
|
||||
console.log("An error occurred:");
|
||||
console.error(err);
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body></body>
|
||||
</html>
|
||||
### Logging
|
||||
|
||||
Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`:
|
||||
|
||||
```javascript
|
||||
import { setLogLevel } from "@azure/logger";
|
||||
setLogLevel("info");
|
||||
```
|
||||
|
||||
For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/core/logger).
|
||||
|
||||
## Next steps
|
||||
|
||||
Please take a look at the [samples](https://github.com/Azure-Samples/azure-samples-js-management) 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)
|
||||
- [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/features/arm-features/README.png)
|
||||
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Ffeatures%2Farm-features%2FREADME.png)
|
||||
|
||||
[azure_cli]: https://docs.microsoft.com/cli/azure
|
||||
[azure_sub]: https://azure.microsoft.com/free/
|
||||
[azure_sub]: https://azure.microsoft.com/free/
|
||||
[azure_portal]: https://portal.azure.com
|
||||
[azure_identity]: https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/identity/identity
|
||||
[defaultazurecredential]: https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/identity/identity#defaultazurecredential
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"commit": "dc6782abab8ad67fdd04c94ef916727d208f7d2a",
|
||||
"readme": "specification/resources/resource-manager/readme.md",
|
||||
"autorest_command": "autorest --version=3.1.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --typescript-sdks-folder=E:\\projects\\azure-sdk-for-js ../azure-rest-api-specs/specification/resources/resource-manager/readme.md --use=@autorest/typescript@6.0.0-beta.7",
|
||||
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
|
||||
"use": "@autorest/typescript@6.0.0-beta.7"
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
|
||||
"mainEntryPointFilePath": "./esm/index.d.ts",
|
||||
"docModel": { "enabled": true },
|
||||
"apiReport": { "enabled": true, "reportFolder": "./review" },
|
||||
"dtsRollup": {
|
||||
"enabled": true,
|
||||
"untrimmedFilePath": "",
|
||||
"publicTrimmedFilePath": "./esm/index.d.ts"
|
||||
},
|
||||
"messages": {
|
||||
"tsdocMessageReporting": { "default": { "logLevel": "none" } },
|
||||
"extractorMessageReporting": {
|
||||
"ae-missing-release-tag": { "logLevel": "none" },
|
||||
"ae-unresolved-link": { "logLevel": "none" }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,13 +1,18 @@
|
|||
{
|
||||
"name": "@azure/arm-features",
|
||||
"sdk-type": "mgmt",
|
||||
"author": "Microsoft Corporation",
|
||||
"description": "FeatureClient Library with typescript type definitions for node.js and browser.",
|
||||
"version": "1.1.0",
|
||||
"description": "A generated SDK for FeatureClient.",
|
||||
"version": "30.0.0-beta.1",
|
||||
"engines": {
|
||||
"node": ">=12.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@azure/ms-rest-azure-js": "^1.4.0",
|
||||
"@azure/ms-rest-js": "^1.11.0",
|
||||
"@azure/core-auth": "^1.1.4",
|
||||
"tslib": "^1.9.3"
|
||||
"@azure/core-paging": "^1.1.1",
|
||||
"@azure/core-client": "^1.0.0",
|
||||
"@azure/core-auth": "^1.3.0",
|
||||
"@azure/core-rest-pipeline": "^1.1.0",
|
||||
"tslib": "^2.2.0"
|
||||
},
|
||||
"keywords": [
|
||||
"node",
|
||||
|
@ -17,14 +22,20 @@
|
|||
"isomorphic"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "./dist/arm-features.js",
|
||||
"module": "./esm/featureClient.js",
|
||||
"types": "./esm/featureClient.d.ts",
|
||||
"main": "./dist/index.js",
|
||||
"module": "./esm/index.js",
|
||||
"types": "./esm/index.d.ts",
|
||||
"devDependencies": {
|
||||
"typescript": "^3.6.0",
|
||||
"rollup": "^0.66.2",
|
||||
"rollup-plugin-node-resolve": "^3.4.0",
|
||||
"@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",
|
||||
"mkdirp": "^1.0.4",
|
||||
"rollup": "^1.16.3",
|
||||
"rollup-plugin-sourcemaps": "^0.4.2",
|
||||
"rollup-plugin-node-resolve": "^3.4.0",
|
||||
"typescript": "~4.2.0",
|
||||
"uglify-js": "^3.4.9"
|
||||
},
|
||||
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/features/arm-features",
|
||||
|
@ -46,14 +57,40 @@
|
|||
"esm/**/*.d.ts.map",
|
||||
"src/**/*.ts",
|
||||
"README.md",
|
||||
"LICENSE",
|
||||
"rollup.config.js",
|
||||
"tsconfig.json"
|
||||
"tsconfig.json",
|
||||
"review/*",
|
||||
"CHANGELOG.md"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "tsc && rollup -c rollup.config.js && npm run minify",
|
||||
"minify": "uglifyjs -c -m --comments --source-map \"content='./dist/arm-features.js.map'\" -o ./dist/arm-features.min.js ./dist/arm-features.js",
|
||||
"prepack": "npm install && npm run build"
|
||||
"build": "tsc && rollup -c rollup.config.js && npm run minify && mkdirp ./review && npm run extract-api",
|
||||
"minify": "uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js",
|
||||
"prepack": "npm run build",
|
||||
"pack": "npm pack 2>&1",
|
||||
"extract-api": "mkdirp ./review && api-extractor run --local",
|
||||
"lint": "echo skipped",
|
||||
"audit": "echo skipped",
|
||||
"clean": "echo skipped",
|
||||
"build:node": "echo skipped",
|
||||
"build:browser": "echo skipped",
|
||||
"build:test": "echo skipped",
|
||||
"build:samples": "echo skipped.",
|
||||
"check-format": "echo skipped",
|
||||
"execute:samples": "echo skipped",
|
||||
"format": "echo skipped",
|
||||
"test": "echo skipped",
|
||||
"prebuild": "echo skipped",
|
||||
"test:node": "echo skipped",
|
||||
"test:browser": "echo skipped",
|
||||
"unit-test": "echo skipped",
|
||||
"unit-test:node": "echo skipped",
|
||||
"unit-test:browser": "echo skipped",
|
||||
"integration-test:browser": "echo skipped",
|
||||
"integration-test:node": "echo skipped",
|
||||
"integration-test": "echo skipped",
|
||||
"docs": "echo skipped"
|
||||
},
|
||||
"sideEffects": false,
|
||||
"autoPublish": true
|
||||
}
|
||||
}
|
|
@ -0,0 +1,343 @@
|
|||
## API Report File for "@azure/arm-features"
|
||||
|
||||
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
||||
|
||||
```ts
|
||||
|
||||
import * as coreAuth from '@azure/core-auth';
|
||||
import * as coreClient from '@azure/core-client';
|
||||
import { PagedAsyncIterableIterator } from '@azure/core-paging';
|
||||
|
||||
// @public
|
||||
export interface AuthorizationProfile {
|
||||
readonly approvedTime?: Date;
|
||||
readonly approver?: string;
|
||||
readonly requestedTime?: Date;
|
||||
readonly requester?: string;
|
||||
readonly requesterObjectId?: string;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface ErrorDefinition {
|
||||
readonly code?: string;
|
||||
details?: ErrorDefinition[];
|
||||
readonly message?: string;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface ErrorResponse {
|
||||
error?: ErrorDefinition;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export class FeatureClient extends FeatureClientContext {
|
||||
constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, providerNamespace: string, options?: FeatureClientOptionalParams);
|
||||
// (undocumented)
|
||||
features: Features;
|
||||
listOperations(options?: FeatureClientListOperationsOptionalParams): PagedAsyncIterableIterator<Operation>;
|
||||
listOperationsNext(nextLink: string, options?: FeatureClientListOperationsNextOptionalParams): PagedAsyncIterableIterator<Operation>;
|
||||
// (undocumented)
|
||||
subscriptionFeatureRegistrations: SubscriptionFeatureRegistrations;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export class FeatureClientContext extends coreClient.ServiceClient {
|
||||
// (undocumented)
|
||||
$host: string;
|
||||
constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, providerNamespace: string, options?: FeatureClientOptionalParams);
|
||||
// (undocumented)
|
||||
apiVersion: string;
|
||||
// (undocumented)
|
||||
providerNamespace: string;
|
||||
// (undocumented)
|
||||
subscriptionId: string;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface FeatureClientListOperationsNextNextOptionalParams extends coreClient.OperationOptions {
|
||||
}
|
||||
|
||||
// @public
|
||||
export type FeatureClientListOperationsNextNextResponse = OperationListResult;
|
||||
|
||||
// @public
|
||||
export interface FeatureClientListOperationsNextOptionalParams extends coreClient.OperationOptions {
|
||||
}
|
||||
|
||||
// @public
|
||||
export type FeatureClientListOperationsNextResponse = OperationListResult;
|
||||
|
||||
// @public
|
||||
export interface FeatureClientListOperationsOptionalParams extends coreClient.OperationOptions {
|
||||
}
|
||||
|
||||
// @public
|
||||
export type FeatureClientListOperationsResponse = OperationListResult;
|
||||
|
||||
// @public
|
||||
export interface FeatureClientOptionalParams extends coreClient.ServiceClientOptions {
|
||||
$host?: string;
|
||||
apiVersion?: string;
|
||||
endpoint?: string;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface FeatureOperationsListResult {
|
||||
nextLink?: string;
|
||||
value?: FeatureResult[];
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface FeatureProperties {
|
||||
state?: string;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface FeatureResult {
|
||||
id?: string;
|
||||
name?: string;
|
||||
properties?: FeatureProperties;
|
||||
type?: string;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface Features {
|
||||
get(resourceProviderNamespace: string, featureName: string, options?: FeaturesGetOptionalParams): Promise<FeaturesGetResponse>;
|
||||
list(resourceProviderNamespace: string, options?: FeaturesListOptionalParams): PagedAsyncIterableIterator<FeatureResult>;
|
||||
listAll(options?: FeaturesListAllOptionalParams): PagedAsyncIterableIterator<FeatureResult>;
|
||||
listAllNext(nextLink: string, options?: FeaturesListAllNextOptionalParams): PagedAsyncIterableIterator<FeatureResult>;
|
||||
listNext(resourceProviderNamespace: string, nextLink: string, options?: FeaturesListNextOptionalParams): PagedAsyncIterableIterator<FeatureResult>;
|
||||
register(resourceProviderNamespace: string, featureName: string, options?: FeaturesRegisterOptionalParams): Promise<FeaturesRegisterResponse>;
|
||||
unregister(resourceProviderNamespace: string, featureName: string, options?: FeaturesUnregisterOptionalParams): Promise<FeaturesUnregisterResponse>;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface FeaturesGetOptionalParams extends coreClient.OperationOptions {
|
||||
}
|
||||
|
||||
// @public
|
||||
export type FeaturesGetResponse = FeatureResult;
|
||||
|
||||
// @public
|
||||
export interface FeaturesListAllNextNextOptionalParams extends coreClient.OperationOptions {
|
||||
}
|
||||
|
||||
// @public
|
||||
export type FeaturesListAllNextNextResponse = FeatureOperationsListResult;
|
||||
|
||||
// @public
|
||||
export interface FeaturesListAllNextOptionalParams extends coreClient.OperationOptions {
|
||||
}
|
||||
|
||||
// @public
|
||||
export type FeaturesListAllNextResponse = FeatureOperationsListResult;
|
||||
|
||||
// @public
|
||||
export interface FeaturesListAllOptionalParams extends coreClient.OperationOptions {
|
||||
}
|
||||
|
||||
// @public
|
||||
export type FeaturesListAllResponse = FeatureOperationsListResult;
|
||||
|
||||
// @public
|
||||
export interface FeaturesListNextNextOptionalParams extends coreClient.OperationOptions {
|
||||
}
|
||||
|
||||
// @public
|
||||
export type FeaturesListNextNextResponse = FeatureOperationsListResult;
|
||||
|
||||
// @public
|
||||
export interface FeaturesListNextOptionalParams extends coreClient.OperationOptions {
|
||||
}
|
||||
|
||||
// @public
|
||||
export type FeaturesListNextResponse = FeatureOperationsListResult;
|
||||
|
||||
// @public
|
||||
export interface FeaturesListOptionalParams extends coreClient.OperationOptions {
|
||||
}
|
||||
|
||||
// @public
|
||||
export type FeaturesListResponse = FeatureOperationsListResult;
|
||||
|
||||
// @public
|
||||
export interface FeaturesRegisterOptionalParams extends coreClient.OperationOptions {
|
||||
}
|
||||
|
||||
// @public
|
||||
export type FeaturesRegisterResponse = FeatureResult;
|
||||
|
||||
// @public
|
||||
export interface FeaturesUnregisterOptionalParams extends coreClient.OperationOptions {
|
||||
}
|
||||
|
||||
// @public
|
||||
export type FeaturesUnregisterResponse = FeatureResult;
|
||||
|
||||
// @public
|
||||
export enum KnownSubscriptionFeatureRegistrationApprovalType {
|
||||
// (undocumented)
|
||||
ApprovalRequired = "ApprovalRequired",
|
||||
// (undocumented)
|
||||
AutoApproval = "AutoApproval",
|
||||
// (undocumented)
|
||||
NotSpecified = "NotSpecified"
|
||||
}
|
||||
|
||||
// @public
|
||||
export enum KnownSubscriptionFeatureRegistrationState {
|
||||
// (undocumented)
|
||||
NotRegistered = "NotRegistered",
|
||||
// (undocumented)
|
||||
NotSpecified = "NotSpecified",
|
||||
// (undocumented)
|
||||
Pending = "Pending",
|
||||
// (undocumented)
|
||||
Registered = "Registered",
|
||||
// (undocumented)
|
||||
Registering = "Registering",
|
||||
// (undocumented)
|
||||
Unregistered = "Unregistered",
|
||||
// (undocumented)
|
||||
Unregistering = "Unregistering"
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface Operation {
|
||||
display?: OperationDisplay;
|
||||
name?: string;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface OperationDisplay {
|
||||
operation?: string;
|
||||
provider?: string;
|
||||
resource?: string;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface OperationListResult {
|
||||
nextLink?: string;
|
||||
value?: Operation[];
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface ProxyResource {
|
||||
readonly id?: string;
|
||||
readonly name?: string;
|
||||
readonly type?: string;
|
||||
}
|
||||
|
||||
// @public
|
||||
export type SubscriptionFeatureRegistration = ProxyResource & {
|
||||
properties?: SubscriptionFeatureRegistrationProperties;
|
||||
};
|
||||
|
||||
// @public
|
||||
export type SubscriptionFeatureRegistrationApprovalType = string;
|
||||
|
||||
// @public
|
||||
export interface SubscriptionFeatureRegistrationList {
|
||||
nextLink?: string;
|
||||
value?: SubscriptionFeatureRegistration[];
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export interface SubscriptionFeatureRegistrationProperties {
|
||||
readonly approvalType?: SubscriptionFeatureRegistrationApprovalType;
|
||||
authorizationProfile?: AuthorizationProfile;
|
||||
description?: string;
|
||||
readonly displayName?: string;
|
||||
readonly documentationLink?: string;
|
||||
readonly featureName?: string;
|
||||
metadata?: {
|
||||
[propertyName: string]: string;
|
||||
};
|
||||
readonly providerNamespace?: string;
|
||||
readonly registrationDate?: Date;
|
||||
readonly releaseDate?: Date;
|
||||
shouldFeatureDisplayInPortal?: boolean;
|
||||
state?: SubscriptionFeatureRegistrationState;
|
||||
readonly subscriptionId?: string;
|
||||
readonly tenantId?: string;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface SubscriptionFeatureRegistrations {
|
||||
createOrUpdate(featureName: string, options?: SubscriptionFeatureRegistrationsCreateOrUpdateOptionalParams): Promise<SubscriptionFeatureRegistrationsCreateOrUpdateResponse>;
|
||||
delete(featureName: string, options?: SubscriptionFeatureRegistrationsDeleteOptionalParams): Promise<void>;
|
||||
get(featureName: string, options?: SubscriptionFeatureRegistrationsGetOptionalParams): Promise<SubscriptionFeatureRegistrationsGetResponse>;
|
||||
listAllBySubscription(options?: SubscriptionFeatureRegistrationsListAllBySubscriptionOptionalParams): PagedAsyncIterableIterator<SubscriptionFeatureRegistration>;
|
||||
listAllBySubscriptionNext(nextLink: string, options?: SubscriptionFeatureRegistrationsListAllBySubscriptionNextOptionalParams): PagedAsyncIterableIterator<SubscriptionFeatureRegistration>;
|
||||
listBySubscription(options?: SubscriptionFeatureRegistrationsListBySubscriptionOptionalParams): PagedAsyncIterableIterator<SubscriptionFeatureRegistration>;
|
||||
listBySubscriptionNext(nextLink: string, options?: SubscriptionFeatureRegistrationsListBySubscriptionNextOptionalParams): PagedAsyncIterableIterator<SubscriptionFeatureRegistration>;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface SubscriptionFeatureRegistrationsCreateOrUpdateOptionalParams extends coreClient.OperationOptions {
|
||||
subscriptionFeatureRegistrationType?: SubscriptionFeatureRegistration;
|
||||
}
|
||||
|
||||
// @public
|
||||
export type SubscriptionFeatureRegistrationsCreateOrUpdateResponse = SubscriptionFeatureRegistration;
|
||||
|
||||
// @public
|
||||
export interface SubscriptionFeatureRegistrationsDeleteOptionalParams extends coreClient.OperationOptions {
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface SubscriptionFeatureRegistrationsGetOptionalParams extends coreClient.OperationOptions {
|
||||
}
|
||||
|
||||
// @public
|
||||
export type SubscriptionFeatureRegistrationsGetResponse = SubscriptionFeatureRegistration;
|
||||
|
||||
// @public
|
||||
export interface SubscriptionFeatureRegistrationsListAllBySubscriptionNextNextOptionalParams extends coreClient.OperationOptions {
|
||||
}
|
||||
|
||||
// @public
|
||||
export type SubscriptionFeatureRegistrationsListAllBySubscriptionNextNextResponse = SubscriptionFeatureRegistrationList;
|
||||
|
||||
// @public
|
||||
export interface SubscriptionFeatureRegistrationsListAllBySubscriptionNextOptionalParams extends coreClient.OperationOptions {
|
||||
}
|
||||
|
||||
// @public
|
||||
export type SubscriptionFeatureRegistrationsListAllBySubscriptionNextResponse = SubscriptionFeatureRegistrationList;
|
||||
|
||||
// @public
|
||||
export interface SubscriptionFeatureRegistrationsListAllBySubscriptionOptionalParams extends coreClient.OperationOptions {
|
||||
}
|
||||
|
||||
// @public
|
||||
export type SubscriptionFeatureRegistrationsListAllBySubscriptionResponse = SubscriptionFeatureRegistrationList;
|
||||
|
||||
// @public
|
||||
export interface SubscriptionFeatureRegistrationsListBySubscriptionNextNextOptionalParams extends coreClient.OperationOptions {
|
||||
}
|
||||
|
||||
// @public
|
||||
export type SubscriptionFeatureRegistrationsListBySubscriptionNextNextResponse = SubscriptionFeatureRegistrationList;
|
||||
|
||||
// @public
|
||||
export interface SubscriptionFeatureRegistrationsListBySubscriptionNextOptionalParams extends coreClient.OperationOptions {
|
||||
}
|
||||
|
||||
// @public
|
||||
export type SubscriptionFeatureRegistrationsListBySubscriptionNextResponse = SubscriptionFeatureRegistrationList;
|
||||
|
||||
// @public
|
||||
export interface SubscriptionFeatureRegistrationsListBySubscriptionOptionalParams extends coreClient.OperationOptions {
|
||||
}
|
||||
|
||||
// @public
|
||||
export type SubscriptionFeatureRegistrationsListBySubscriptionResponse = SubscriptionFeatureRegistrationList;
|
||||
|
||||
// @public
|
||||
export type SubscriptionFeatureRegistrationState = string;
|
||||
|
||||
|
||||
// (No @packageDocumentation comment for this package)
|
||||
|
||||
```
|
|
@ -1,37 +1,188 @@
|
|||
import rollup from "rollup";
|
||||
import nodeResolve from "rollup-plugin-node-resolve";
|
||||
import sourcemaps from "rollup-plugin-sourcemaps";
|
||||
|
||||
/**
|
||||
* @type {rollup.RollupFileOptions}
|
||||
*/
|
||||
const config = {
|
||||
input: "./esm/featureClient.js",
|
||||
external: [
|
||||
"@azure/ms-rest-js",
|
||||
"@azure/ms-rest-azure-js"
|
||||
],
|
||||
output: {
|
||||
file: "./dist/arm-features.js",
|
||||
format: "umd",
|
||||
name: "Azure.ArmFeatures",
|
||||
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.
|
||||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/`
|
||||
},
|
||||
plugins: [
|
||||
nodeResolve({ module: true }),
|
||||
sourcemaps()
|
||||
]
|
||||
*/
|
||||
|
||||
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 nodeBuiltins from "builtin-modules";
|
||||
|
||||
/**
|
||||
* Gets the proper configuration needed for rollup's commonJS plugin for @opentelemetry/api.
|
||||
*
|
||||
* NOTE: this manual configuration is only needed because OpenTelemetry uses an
|
||||
* __exportStar downleveled helper function to declare its exports which confuses
|
||||
* rollup's automatic discovery mechanism.
|
||||
*
|
||||
* @returns an object reference that can be `...`'d into your cjs() configuration.
|
||||
*/
|
||||
export function openTelemetryCommonJs() {
|
||||
const namedExports = {};
|
||||
|
||||
for (const key of [
|
||||
"@opentelemetry/api",
|
||||
"@azure/core-tracing/node_modules/@opentelemetry/api"
|
||||
]) {
|
||||
namedExports[key] = [
|
||||
"SpanKind",
|
||||
"TraceFlags",
|
||||
"getSpan",
|
||||
"setSpan",
|
||||
"SpanStatusCode",
|
||||
"getSpanContext",
|
||||
"setSpanContext"
|
||||
];
|
||||
}
|
||||
|
||||
const releasedOpenTelemetryVersions = ["0.10.2", "1.0.0-rc.0"];
|
||||
|
||||
for (const version of releasedOpenTelemetryVersions) {
|
||||
namedExports[
|
||||
// working around a limitation in the rollup common.js plugin - it's not able to resolve these modules so the named exports listed above will not get applied. We have to drill down to the actual path.
|
||||
`../../../common/temp/node_modules/.pnpm/@opentelemetry/api@${version}/node_modules/@opentelemetry/api/build/src/index.js`
|
||||
] = [
|
||||
"SpanKind",
|
||||
"TraceFlags",
|
||||
"getSpan",
|
||||
"setSpan",
|
||||
"StatusCode",
|
||||
"CanonicalCode",
|
||||
"getSpanContext",
|
||||
"setSpanContext"
|
||||
];
|
||||
}
|
||||
|
||||
return namedExports;
|
||||
}
|
||||
|
||||
// #region Warning Handler
|
||||
|
||||
/**
|
||||
* A function that can determine whether a rollupwarning should be ignored. If
|
||||
* the function returns `true`, then the warning will not be displayed.
|
||||
*/
|
||||
|
||||
function ignoreNiseSinonEvalWarnings(warning) {
|
||||
return (
|
||||
warning.code === "EVAL" &&
|
||||
warning.id &&
|
||||
(warning.id.includes("node_modules/nise") ||
|
||||
warning.id.includes("node_modules/sinon")) === true
|
||||
);
|
||||
}
|
||||
|
||||
function ignoreChaiCircularDependencyWarnings(warning) {
|
||||
return (
|
||||
warning.code === "CIRCULAR_DEPENDENCY" &&
|
||||
warning.importer && warning.importer.includes("node_modules/chai") === true
|
||||
);
|
||||
}
|
||||
|
||||
const warningInhibitors = [
|
||||
ignoreChaiCircularDependencyWarnings,
|
||||
ignoreNiseSinonEvalWarnings
|
||||
];
|
||||
|
||||
/**
|
||||
* Construct a warning handler for the shared rollup configuration
|
||||
* that ignores certain warnings that are not relevant to testing.
|
||||
*/
|
||||
function makeOnWarnForTesting() {
|
||||
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 = {
|
||||
input: {
|
||||
include: ["dist-esm/test/**/*.spec.js"],
|
||||
exclude: ["dist-esm/test/**/node/**"]
|
||||
},
|
||||
output: {
|
||||
file: `dist-test/index.browser.js`,
|
||||
format: "umd",
|
||||
sourcemap: true
|
||||
},
|
||||
preserveSymlinks: false,
|
||||
plugins: [
|
||||
multiEntry({ exports: false }),
|
||||
nodeResolve({
|
||||
mainFields: ["module", "browser"]
|
||||
}),
|
||||
cjs({
|
||||
namedExports: {
|
||||
// Chai's strange internal architecture makes it impossible to statically
|
||||
// analyze its exports.
|
||||
chai: [
|
||||
"version",
|
||||
"use",
|
||||
"util",
|
||||
"config",
|
||||
"expect",
|
||||
"should",
|
||||
"assert"
|
||||
],
|
||||
...openTelemetryCommonJs()
|
||||
}
|
||||
}),
|
||||
json(),
|
||||
sourcemaps()
|
||||
//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
|
||||
};
|
||||
|
||||
return config;
|
||||
}
|
||||
|
||||
const defaultConfigurationOptions = {
|
||||
disableBrowserBundle: false
|
||||
};
|
||||
|
||||
export default config;
|
||||
export function makeConfig(pkg, options) {
|
||||
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 = [baseConfig];
|
||||
|
||||
if (!options.disableBrowserBundle) {
|
||||
config.push(makeBrowserTestConfig());
|
||||
}
|
||||
|
||||
return config;
|
||||
}
|
||||
|
||||
export default makeConfig(require("./package.json"));
|
||||
|
|
|
@ -1,142 +1,241 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* 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 * as msRest from "@azure/ms-rest-js";
|
||||
import { TokenCredential } from "@azure/core-auth";
|
||||
import * as Models from "./models";
|
||||
import * as Mappers from "./models/mappers";
|
||||
import * as coreClient from "@azure/core-client";
|
||||
import * as coreAuth from "@azure/core-auth";
|
||||
import "@azure/core-paging";
|
||||
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
||||
import {
|
||||
FeaturesImpl,
|
||||
SubscriptionFeatureRegistrationsImpl
|
||||
} from "./operations";
|
||||
import {
|
||||
Features,
|
||||
SubscriptionFeatureRegistrations
|
||||
} from "./operationsInterfaces";
|
||||
import * as Parameters from "./models/parameters";
|
||||
import * as operations from "./operations";
|
||||
import * as Mappers from "./models/mappers";
|
||||
import { FeatureClientContext } from "./featureClientContext";
|
||||
import {
|
||||
FeatureClientOptionalParams,
|
||||
Operation,
|
||||
FeatureClientListOperationsNextOptionalParams,
|
||||
FeatureClientListOperationsOptionalParams,
|
||||
FeatureClientListOperationsNextNextOptionalParams,
|
||||
FeatureClientListOperationsResponse,
|
||||
FeatureClientListOperationsNextResponse,
|
||||
FeatureClientListOperationsNextNextResponse
|
||||
} from "./models";
|
||||
|
||||
|
||||
class FeatureClient extends FeatureClientContext {
|
||||
// Operation groups
|
||||
features: operations.Features;
|
||||
|
||||
/// <reference lib="esnext.asynciterable" />
|
||||
export class FeatureClient extends FeatureClientContext {
|
||||
/**
|
||||
* Initializes a new instance of the FeatureClient class.
|
||||
* @param credentials Credentials needed for the client to connect to Azure. Credentials
|
||||
* implementing the TokenCredential interface from the @azure/identity package are recommended. For
|
||||
* more information about these credentials, see
|
||||
* {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the
|
||||
* ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and
|
||||
* @azure/ms-rest-browserauth are also supported.
|
||||
* @param subscriptionId The ID of the target subscription.
|
||||
* @param [options] The parameter options
|
||||
* @param credentials Subscription credentials which uniquely identify client subscription.
|
||||
* @param subscriptionId The Azure subscription ID.
|
||||
* @param providerNamespace The provider namespace.
|
||||
* @param options The parameter options
|
||||
*/
|
||||
constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.FeatureClientOptions) {
|
||||
super(credentials, subscriptionId, options);
|
||||
this.features = new operations.Features(this);
|
||||
constructor(
|
||||
credentials: coreAuth.TokenCredential,
|
||||
subscriptionId: string,
|
||||
providerNamespace: string,
|
||||
options?: FeatureClientOptionalParams
|
||||
) {
|
||||
super(credentials, subscriptionId, providerNamespace, options);
|
||||
this.features = new FeaturesImpl(this);
|
||||
this.subscriptionFeatureRegistrations = new SubscriptionFeatureRegistrationsImpl(
|
||||
this
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists all of the available Microsoft.Features REST API operations.
|
||||
* @param [options] The optional parameters
|
||||
* @returns Promise<Models.ListOperationsResponse>
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
listOperations(options?: msRest.RequestOptionsBase): Promise<Models.ListOperationsResponse>;
|
||||
/**
|
||||
* @param callback The callback
|
||||
*/
|
||||
listOperations(callback: msRest.ServiceCallback<Models.OperationListResult>): void;
|
||||
/**
|
||||
* @param options The optional parameters
|
||||
* @param callback The callback
|
||||
*/
|
||||
listOperations(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.OperationListResult>): void;
|
||||
listOperations(options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.OperationListResult>, callback?: msRest.ServiceCallback<Models.OperationListResult>): Promise<Models.ListOperationsResponse> {
|
||||
return this.sendOperationRequest(
|
||||
{
|
||||
options
|
||||
public listOperations(
|
||||
options?: FeatureClientListOperationsOptionalParams
|
||||
): PagedAsyncIterableIterator<Operation> {
|
||||
const iter = this.listOperationsPagingAll(options);
|
||||
return {
|
||||
next() {
|
||||
return iter.next();
|
||||
},
|
||||
listOperationsOperationSpec,
|
||||
callback) as Promise<Models.ListOperationsResponse>;
|
||||
[Symbol.asyncIterator]() {
|
||||
return this;
|
||||
},
|
||||
byPage: () => {
|
||||
return this.listOperationsPagingPage(options);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private async *listOperationsPagingPage(
|
||||
options?: FeatureClientListOperationsOptionalParams
|
||||
): AsyncIterableIterator<Operation[]> {
|
||||
let result = await this._listOperations(options);
|
||||
yield result.value || [];
|
||||
let continuationToken = result.nextLink;
|
||||
while (continuationToken) {
|
||||
result = await this._listOperationsNext(continuationToken, options);
|
||||
continuationToken = result.nextLink;
|
||||
yield result.value || [];
|
||||
}
|
||||
}
|
||||
|
||||
private async *listOperationsPagingAll(
|
||||
options?: FeatureClientListOperationsOptionalParams
|
||||
): AsyncIterableIterator<Operation> {
|
||||
for await (const page of this.listOperationsPagingPage(options)) {
|
||||
yield* page;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* ListOperationsNext
|
||||
* @param nextLink The nextLink from the previous successful call to the ListOperations method.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
public listOperationsNext(
|
||||
nextLink: string,
|
||||
options?: FeatureClientListOperationsNextOptionalParams
|
||||
): PagedAsyncIterableIterator<Operation> {
|
||||
const iter = this.listOperationsNextPagingAll(nextLink, options);
|
||||
return {
|
||||
next() {
|
||||
return iter.next();
|
||||
},
|
||||
[Symbol.asyncIterator]() {
|
||||
return this;
|
||||
},
|
||||
byPage: () => {
|
||||
return this.listOperationsNextPagingPage(nextLink, options);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private async *listOperationsNextPagingPage(
|
||||
nextLink: string,
|
||||
options?: FeatureClientListOperationsNextOptionalParams
|
||||
): AsyncIterableIterator<Operation[]> {
|
||||
let result = await this._listOperationsNext(nextLink, options);
|
||||
yield result.value || [];
|
||||
let continuationToken = result.nextLink;
|
||||
while (continuationToken) {
|
||||
result = await this._listOperationsNextNext(continuationToken, options);
|
||||
continuationToken = result.nextLink;
|
||||
yield result.value || [];
|
||||
}
|
||||
}
|
||||
|
||||
private async *listOperationsNextPagingAll(
|
||||
nextLink: string,
|
||||
options?: FeatureClientListOperationsNextOptionalParams
|
||||
): AsyncIterableIterator<Operation> {
|
||||
for await (const page of this.listOperationsNextPagingPage(
|
||||
nextLink,
|
||||
options
|
||||
)) {
|
||||
yield* page;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists all of the available Microsoft.Features REST API operations.
|
||||
* @param nextPageLink The NextLink from the previous successful call to List operation.
|
||||
* @param [options] The optional parameters
|
||||
* @returns Promise<Models.ListOperationsNextResponse>
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
listOperationsNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.ListOperationsNextResponse>;
|
||||
/**
|
||||
* @param nextPageLink The NextLink from the previous successful call to List operation.
|
||||
* @param callback The callback
|
||||
*/
|
||||
listOperationsNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.OperationListResult>): void;
|
||||
/**
|
||||
* @param nextPageLink The NextLink from the previous successful call to List operation.
|
||||
* @param options The optional parameters
|
||||
* @param callback The callback
|
||||
*/
|
||||
listOperationsNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.OperationListResult>): void;
|
||||
listOperationsNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.OperationListResult>, callback?: msRest.ServiceCallback<Models.OperationListResult>): Promise<Models.ListOperationsNextResponse> {
|
||||
return this.sendOperationRequest(
|
||||
{
|
||||
nextPageLink,
|
||||
options
|
||||
},
|
||||
listOperationsNextOperationSpec,
|
||||
callback) as Promise<Models.ListOperationsNextResponse>;
|
||||
private _listOperations(
|
||||
options?: FeatureClientListOperationsOptionalParams
|
||||
): Promise<FeatureClientListOperationsResponse> {
|
||||
return this.sendOperationRequest({ options }, listOperationsOperationSpec);
|
||||
}
|
||||
|
||||
/**
|
||||
* ListOperationsNext
|
||||
* @param nextLink The nextLink from the previous successful call to the ListOperations method.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
private _listOperationsNext(
|
||||
nextLink: string,
|
||||
options?: FeatureClientListOperationsNextOptionalParams
|
||||
): Promise<FeatureClientListOperationsNextResponse> {
|
||||
return this.sendOperationRequest(
|
||||
{ nextLink, options },
|
||||
listOperationsNextOperationSpec
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* ListOperationsNextNext
|
||||
* @param nextLink The nextLink from the previous successful call to the ListOperationsNext method.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
private _listOperationsNextNext(
|
||||
nextLink: string,
|
||||
options?: FeatureClientListOperationsNextNextOptionalParams
|
||||
): Promise<FeatureClientListOperationsNextNextResponse> {
|
||||
return this.sendOperationRequest(
|
||||
{ nextLink, options },
|
||||
listOperationsNextNextOperationSpec
|
||||
);
|
||||
}
|
||||
|
||||
features: Features;
|
||||
subscriptionFeatureRegistrations: SubscriptionFeatureRegistrations;
|
||||
}
|
||||
|
||||
// Operation Specifications
|
||||
const serializer = new msRest.Serializer(Mappers);
|
||||
const listOperationsOperationSpec: msRest.OperationSpec = {
|
||||
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
||||
|
||||
const listOperationsOperationSpec: coreClient.OperationSpec = {
|
||||
path: "/providers/Microsoft.Features/operations",
|
||||
httpMethod: "GET",
|
||||
path: "providers/Microsoft.Features/operations",
|
||||
queryParameters: [
|
||||
Parameters.apiVersion
|
||||
],
|
||||
headerParameters: [
|
||||
Parameters.acceptLanguage
|
||||
],
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.OperationListResult
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.CloudError
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [Parameters.$host],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
};
|
||||
|
||||
const listOperationsNextOperationSpec: msRest.OperationSpec = {
|
||||
httpMethod: "GET",
|
||||
baseUrl: "https://management.azure.com",
|
||||
const listOperationsNextOperationSpec: coreClient.OperationSpec = {
|
||||
path: "{nextLink}",
|
||||
urlParameters: [
|
||||
Parameters.nextPageLink
|
||||
],
|
||||
headerParameters: [
|
||||
Parameters.acceptLanguage
|
||||
],
|
||||
httpMethod: "GET",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.OperationListResult
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.CloudError
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [Parameters.$host, Parameters.nextLink],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
};
|
||||
|
||||
export {
|
||||
FeatureClient,
|
||||
FeatureClientContext,
|
||||
Models as FeatureModels,
|
||||
Mappers as FeatureMappers
|
||||
const listOperationsNextNextOperationSpec: coreClient.OperationSpec = {
|
||||
path: "{nextLink}",
|
||||
httpMethod: "GET",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.OperationListResult
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [Parameters.$host, Parameters.nextLink],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
};
|
||||
export * from "./operations";
|
||||
|
|
|
@ -1,68 +1,77 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* 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 * as Models from "./models";
|
||||
import * as msRest from "@azure/ms-rest-js";
|
||||
import { TokenCredential } from "@azure/core-auth";
|
||||
import * as msRestAzure from "@azure/ms-rest-azure-js";
|
||||
import * as coreClient from "@azure/core-client";
|
||||
import * as coreAuth from "@azure/core-auth";
|
||||
import { FeatureClientOptionalParams } from "./models";
|
||||
|
||||
const packageName = "@azure/arm-features";
|
||||
const packageVersion = "1.1.0";
|
||||
|
||||
export class FeatureClientContext extends msRestAzure.AzureServiceClient {
|
||||
credentials: msRest.ServiceClientCredentials | TokenCredential;
|
||||
export class FeatureClientContext extends coreClient.ServiceClient {
|
||||
$host: string;
|
||||
apiVersion: string;
|
||||
subscriptionId: string;
|
||||
apiVersion?: string;
|
||||
providerNamespace: string;
|
||||
|
||||
/**
|
||||
* Initializes a new instance of the FeatureClient class.
|
||||
* @param credentials Credentials needed for the client to connect to Azure. Credentials
|
||||
* implementing the TokenCredential interface from the @azure/identity package are recommended. For
|
||||
* more information about these credentials, see
|
||||
* {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the
|
||||
* ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and
|
||||
* @azure/ms-rest-browserauth are also supported.
|
||||
* @param subscriptionId The ID of the target subscription.
|
||||
* @param [options] The parameter options
|
||||
* Initializes a new instance of the FeatureClientContext class.
|
||||
* @param credentials Subscription credentials which uniquely identify client subscription.
|
||||
* @param subscriptionId The Azure subscription ID.
|
||||
* @param providerNamespace The provider namespace.
|
||||
* @param options The parameter options
|
||||
*/
|
||||
constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.FeatureClientOptions) {
|
||||
if (credentials == undefined) {
|
||||
throw new Error('\'credentials\' cannot be null.');
|
||||
constructor(
|
||||
credentials: coreAuth.TokenCredential,
|
||||
subscriptionId: string,
|
||||
providerNamespace: string,
|
||||
options?: FeatureClientOptionalParams
|
||||
) {
|
||||
if (credentials === undefined) {
|
||||
throw new Error("'credentials' cannot be null");
|
||||
}
|
||||
if (subscriptionId == undefined) {
|
||||
throw new Error('\'subscriptionId\' cannot be null.');
|
||||
if (subscriptionId === undefined) {
|
||||
throw new Error("'subscriptionId' cannot be null");
|
||||
}
|
||||
if (providerNamespace === undefined) {
|
||||
throw new Error("'providerNamespace' cannot be null");
|
||||
}
|
||||
|
||||
// Initializing default values for options
|
||||
if (!options) {
|
||||
options = {};
|
||||
}
|
||||
if(!options.userAgent) {
|
||||
const defaultUserAgent = msRestAzure.getDefaultUserAgentValue();
|
||||
options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`;
|
||||
const defaults: FeatureClientOptionalParams = {
|
||||
requestContentType: "application/json; charset=utf-8",
|
||||
credential: credentials
|
||||
};
|
||||
|
||||
const packageDetails = `azsdk-js-arm-features/30.0.0-beta.1`;
|
||||
const userAgentPrefix =
|
||||
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
||||
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
||||
: `${packageDetails}`;
|
||||
|
||||
if (!options.credentialScopes) {
|
||||
options.credentialScopes = ["https://management.azure.com/.default"];
|
||||
}
|
||||
|
||||
super(credentials, options);
|
||||
|
||||
this.apiVersion = '2015-12-01';
|
||||
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;
|
||||
const optionsWithDefaults = {
|
||||
...defaults,
|
||||
...options,
|
||||
userAgentOptions: {
|
||||
userAgentPrefix
|
||||
},
|
||||
baseUri: options.endpoint || "https://management.azure.com"
|
||||
};
|
||||
super(optionsWithDefaults);
|
||||
// Parameter assignments
|
||||
this.subscriptionId = subscriptionId;
|
||||
this.providerNamespace = providerNamespace;
|
||||
|
||||
if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) {
|
||||
this.acceptLanguage = options.acceptLanguage;
|
||||
}
|
||||
if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) {
|
||||
this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout;
|
||||
}
|
||||
// Assigning values to Constant parameters
|
||||
this.$host = options.$host || "https://management.azure.com";
|
||||
this.apiVersion = options.apiVersion || "2021-07-01";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
/// <reference lib="esnext.asynciterable" />
|
||||
export * from "./models";
|
||||
export { FeatureClient } from "./featureClient";
|
||||
export { FeatureClientContext } from "./featureClientContext";
|
||||
export * from "./operationsInterfaces";
|
|
@ -1,14 +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 {
|
||||
CloudError,
|
||||
FeatureOperationsListResult,
|
||||
FeatureProperties,
|
||||
FeatureResult
|
||||
} from "../models/mappers";
|
|
@ -1,268 +1,404 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* 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";
|
||||
import * as coreClient from "@azure/core-client";
|
||||
|
||||
export { BaseResource, CloudError };
|
||||
|
||||
/**
|
||||
* Information about feature.
|
||||
*/
|
||||
export interface FeatureProperties {
|
||||
/**
|
||||
* The registration state of the feature for the subscription.
|
||||
*/
|
||||
state?: string;
|
||||
/** Result of the request to list Microsoft.Features operations. It contains a list of operations and a URL link to get the next set of results. */
|
||||
export interface OperationListResult {
|
||||
/** List of Microsoft.Features operations. */
|
||||
value?: Operation[];
|
||||
/** URL to get the next set of operation list results if there are any. */
|
||||
nextLink?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Previewed feature information.
|
||||
*/
|
||||
export interface FeatureResult {
|
||||
/**
|
||||
* The name of the feature.
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* Properties of the previewed feature.
|
||||
*/
|
||||
properties?: FeatureProperties;
|
||||
/**
|
||||
* The resource ID of the feature.
|
||||
*/
|
||||
id?: string;
|
||||
/**
|
||||
* The resource type of the feature.
|
||||
*/
|
||||
type?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* The object that represents the operation.
|
||||
*/
|
||||
export interface OperationDisplay {
|
||||
/**
|
||||
* Service provider: Microsoft.Features
|
||||
*/
|
||||
provider?: string;
|
||||
/**
|
||||
* Resource on which the operation is performed: Profile, endpoint, etc.
|
||||
*/
|
||||
resource?: string;
|
||||
/**
|
||||
* Operation type: Read, write, delete, etc.
|
||||
*/
|
||||
operation?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Microsoft.Features operation
|
||||
*/
|
||||
/** Microsoft.Features operation */
|
||||
export interface Operation {
|
||||
/**
|
||||
* Operation name: {provider}/{resource}/{operation}
|
||||
*/
|
||||
/** Operation name: {provider}/{resource}/{operation} */
|
||||
name?: string;
|
||||
/**
|
||||
* The object that represents the operation.
|
||||
*/
|
||||
/** The object that represents the operation. */
|
||||
display?: OperationDisplay;
|
||||
}
|
||||
|
||||
/**
|
||||
* An interface representing FeatureClientOptions.
|
||||
*/
|
||||
export interface FeatureClientOptions extends AzureServiceClientOptions {
|
||||
baseUri?: string;
|
||||
/** The object that represents the operation. */
|
||||
export interface OperationDisplay {
|
||||
/** Service provider: Microsoft.Features */
|
||||
provider?: string;
|
||||
/** Resource on which the operation is performed: Profile, endpoint, etc. */
|
||||
resource?: string;
|
||||
/** Operation type: Read, write, delete, etc. */
|
||||
operation?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @interface
|
||||
* Result of the request to list Microsoft.Features operations. It contains a list of operations
|
||||
* and a URL link to get the next set of results.
|
||||
* @extends Array<Operation>
|
||||
*/
|
||||
export interface OperationListResult extends Array<Operation> {
|
||||
/** Error response indicates that the service is not able to process the incoming request. */
|
||||
export interface ErrorResponse {
|
||||
/** The error details. */
|
||||
error?: ErrorDefinition;
|
||||
}
|
||||
|
||||
/** Error definition. */
|
||||
export interface ErrorDefinition {
|
||||
/**
|
||||
* URL to get the next set of operation list results if there are any.
|
||||
* Service specific error code which serves as the substatus for the HTTP error code.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly code?: string;
|
||||
/**
|
||||
* Description of the error.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly message?: string;
|
||||
/** Internal error details. */
|
||||
details?: ErrorDefinition[];
|
||||
}
|
||||
|
||||
/** List of previewed features. */
|
||||
export interface FeatureOperationsListResult {
|
||||
/** The array of features. */
|
||||
value?: FeatureResult[];
|
||||
/** The URL to use for getting the next set of results. */
|
||||
nextLink?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @interface
|
||||
* List of previewed features.
|
||||
* @extends Array<FeatureResult>
|
||||
*/
|
||||
export interface FeatureOperationsListResult extends Array<FeatureResult> {
|
||||
/** Previewed feature information. */
|
||||
export interface FeatureResult {
|
||||
/** The name of the feature. */
|
||||
name?: string;
|
||||
/** Properties of the previewed feature. */
|
||||
properties?: FeatureProperties;
|
||||
/** The resource ID of the feature. */
|
||||
id?: string;
|
||||
/** The resource type of the feature. */
|
||||
type?: string;
|
||||
}
|
||||
|
||||
/** Information about feature. */
|
||||
export interface FeatureProperties {
|
||||
/** The registration state of the feature for the subscription. */
|
||||
state?: string;
|
||||
}
|
||||
|
||||
/** An Azure proxy resource. */
|
||||
export interface ProxyResource {
|
||||
/**
|
||||
* The URL to use for getting the next set of results.
|
||||
* 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;
|
||||
}
|
||||
|
||||
export interface SubscriptionFeatureRegistrationProperties {
|
||||
/**
|
||||
* The tenantId.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly tenantId?: string;
|
||||
/**
|
||||
* The subscriptionId.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly subscriptionId?: string;
|
||||
/**
|
||||
* The featureName.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly featureName?: string;
|
||||
/**
|
||||
* The featureDisplayName.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly displayName?: string;
|
||||
/**
|
||||
* The providerNamespace.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly providerNamespace?: string;
|
||||
/** The state. */
|
||||
state?: SubscriptionFeatureRegistrationState;
|
||||
/** Authorization Profile */
|
||||
authorizationProfile?: AuthorizationProfile;
|
||||
/** Key-value pairs for meta data. */
|
||||
metadata?: { [propertyName: string]: string };
|
||||
/**
|
||||
* The feature release date.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly releaseDate?: Date;
|
||||
/**
|
||||
* The feature registration date.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly registrationDate?: Date;
|
||||
/**
|
||||
* The feature documentation link.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly documentationLink?: string;
|
||||
/**
|
||||
* The feature approval type.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly approvalType?: SubscriptionFeatureRegistrationApprovalType;
|
||||
/** Indicates whether feature should be displayed in Portal. */
|
||||
shouldFeatureDisplayInPortal?: boolean;
|
||||
/** The feature description. */
|
||||
description?: string;
|
||||
}
|
||||
|
||||
/** Authorization Profile */
|
||||
export interface AuthorizationProfile {
|
||||
/**
|
||||
* The requested time
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly requestedTime?: Date;
|
||||
/**
|
||||
* The requester
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly requester?: string;
|
||||
/**
|
||||
* The requester object id
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly requesterObjectId?: string;
|
||||
/**
|
||||
* The approved time
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly approvedTime?: Date;
|
||||
/**
|
||||
* The approver
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly approver?: string;
|
||||
}
|
||||
|
||||
/** The list of subscription feature registrations. */
|
||||
export interface SubscriptionFeatureRegistrationList {
|
||||
/** The link used to get the next page of subscription feature registrations list. */
|
||||
nextLink?: string;
|
||||
/** The list of subscription feature registrations. */
|
||||
value?: SubscriptionFeatureRegistration[];
|
||||
}
|
||||
|
||||
/** Subscription feature registration details */
|
||||
export type SubscriptionFeatureRegistration = ProxyResource & {
|
||||
properties?: SubscriptionFeatureRegistrationProperties;
|
||||
};
|
||||
|
||||
/** Known values of {@link SubscriptionFeatureRegistrationState} that the service accepts. */
|
||||
export enum KnownSubscriptionFeatureRegistrationState {
|
||||
NotSpecified = "NotSpecified",
|
||||
NotRegistered = "NotRegistered",
|
||||
Pending = "Pending",
|
||||
Registering = "Registering",
|
||||
Registered = "Registered",
|
||||
Unregistering = "Unregistering",
|
||||
Unregistered = "Unregistered"
|
||||
}
|
||||
|
||||
/**
|
||||
* Contains response data for the listOperations operation.
|
||||
* Defines values for SubscriptionFeatureRegistrationState. \
|
||||
* {@link KnownSubscriptionFeatureRegistrationState} can be used interchangeably with SubscriptionFeatureRegistrationState,
|
||||
* this enum contains the known values that the service supports.
|
||||
* ### Known values supported by the service
|
||||
* **NotSpecified** \
|
||||
* **NotRegistered** \
|
||||
* **Pending** \
|
||||
* **Registering** \
|
||||
* **Registered** \
|
||||
* **Unregistering** \
|
||||
* **Unregistered**
|
||||
*/
|
||||
export type ListOperationsResponse = OperationListResult & {
|
||||
/**
|
||||
* The underlying HTTP response.
|
||||
*/
|
||||
_response: msRest.HttpResponse & {
|
||||
/**
|
||||
* The response body as text (string format)
|
||||
*/
|
||||
bodyAsText: string;
|
||||
export type SubscriptionFeatureRegistrationState = string;
|
||||
|
||||
/**
|
||||
* The response body as parsed JSON or XML
|
||||
*/
|
||||
parsedBody: OperationListResult;
|
||||
};
|
||||
};
|
||||
/** Known values of {@link SubscriptionFeatureRegistrationApprovalType} that the service accepts. */
|
||||
export enum KnownSubscriptionFeatureRegistrationApprovalType {
|
||||
NotSpecified = "NotSpecified",
|
||||
ApprovalRequired = "ApprovalRequired",
|
||||
AutoApproval = "AutoApproval"
|
||||
}
|
||||
|
||||
/**
|
||||
* Contains response data for the listOperationsNext operation.
|
||||
* Defines values for SubscriptionFeatureRegistrationApprovalType. \
|
||||
* {@link KnownSubscriptionFeatureRegistrationApprovalType} can be used interchangeably with SubscriptionFeatureRegistrationApprovalType,
|
||||
* this enum contains the known values that the service supports.
|
||||
* ### Known values supported by the service
|
||||
* **NotSpecified** \
|
||||
* **ApprovalRequired** \
|
||||
* **AutoApproval**
|
||||
*/
|
||||
export type ListOperationsNextResponse = OperationListResult & {
|
||||
/**
|
||||
* The underlying HTTP response.
|
||||
*/
|
||||
_response: msRest.HttpResponse & {
|
||||
/**
|
||||
* The response body as text (string format)
|
||||
*/
|
||||
bodyAsText: string;
|
||||
export type SubscriptionFeatureRegistrationApprovalType = string;
|
||||
|
||||
/**
|
||||
* The response body as parsed JSON or XML
|
||||
*/
|
||||
parsedBody: OperationListResult;
|
||||
};
|
||||
};
|
||||
/** Optional parameters. */
|
||||
export interface FeatureClientListOperationsOptionalParams
|
||||
extends coreClient.OperationOptions {}
|
||||
|
||||
/**
|
||||
* Contains response data for the listAll operation.
|
||||
*/
|
||||
export type FeaturesListAllResponse = FeatureOperationsListResult & {
|
||||
/**
|
||||
* The underlying HTTP response.
|
||||
*/
|
||||
_response: msRest.HttpResponse & {
|
||||
/**
|
||||
* The response body as text (string format)
|
||||
*/
|
||||
bodyAsText: string;
|
||||
/** Contains response data for the listOperations operation. */
|
||||
export type FeatureClientListOperationsResponse = OperationListResult;
|
||||
|
||||
/**
|
||||
* The response body as parsed JSON or XML
|
||||
*/
|
||||
parsedBody: FeatureOperationsListResult;
|
||||
};
|
||||
};
|
||||
/** Optional parameters. */
|
||||
export interface FeatureClientListOperationsNextOptionalParams
|
||||
extends coreClient.OperationOptions {}
|
||||
|
||||
/**
|
||||
* Contains response data for the list operation.
|
||||
*/
|
||||
export type FeaturesListResponse = FeatureOperationsListResult & {
|
||||
/**
|
||||
* The underlying HTTP response.
|
||||
*/
|
||||
_response: msRest.HttpResponse & {
|
||||
/**
|
||||
* The response body as text (string format)
|
||||
*/
|
||||
bodyAsText: string;
|
||||
/** Contains response data for the listOperationsNext operation. */
|
||||
export type FeatureClientListOperationsNextResponse = OperationListResult;
|
||||
|
||||
/**
|
||||
* The response body as parsed JSON or XML
|
||||
*/
|
||||
parsedBody: FeatureOperationsListResult;
|
||||
};
|
||||
};
|
||||
/** Optional parameters. */
|
||||
export interface FeatureClientListOperationsNextNextOptionalParams
|
||||
extends coreClient.OperationOptions {}
|
||||
|
||||
/**
|
||||
* Contains response data for the get operation.
|
||||
*/
|
||||
export type FeaturesGetResponse = FeatureResult & {
|
||||
/**
|
||||
* The underlying HTTP response.
|
||||
*/
|
||||
_response: msRest.HttpResponse & {
|
||||
/**
|
||||
* The response body as text (string format)
|
||||
*/
|
||||
bodyAsText: string;
|
||||
/** Contains response data for the listOperationsNextNext operation. */
|
||||
export type FeatureClientListOperationsNextNextResponse = OperationListResult;
|
||||
|
||||
/**
|
||||
* The response body as parsed JSON or XML
|
||||
*/
|
||||
parsedBody: FeatureResult;
|
||||
};
|
||||
};
|
||||
/** Optional parameters. */
|
||||
export interface FeaturesListAllOptionalParams
|
||||
extends coreClient.OperationOptions {}
|
||||
|
||||
/**
|
||||
* Contains response data for the register operation.
|
||||
*/
|
||||
export type FeaturesRegisterResponse = FeatureResult & {
|
||||
/**
|
||||
* The underlying HTTP response.
|
||||
*/
|
||||
_response: msRest.HttpResponse & {
|
||||
/**
|
||||
* The response body as text (string format)
|
||||
*/
|
||||
bodyAsText: string;
|
||||
/** Contains response data for the listAll operation. */
|
||||
export type FeaturesListAllResponse = FeatureOperationsListResult;
|
||||
|
||||
/**
|
||||
* The response body as parsed JSON or XML
|
||||
*/
|
||||
parsedBody: FeatureResult;
|
||||
};
|
||||
};
|
||||
/** Optional parameters. */
|
||||
export interface FeaturesListOptionalParams
|
||||
extends coreClient.OperationOptions {}
|
||||
|
||||
/**
|
||||
* Contains response data for the listAllNext operation.
|
||||
*/
|
||||
export type FeaturesListAllNextResponse = FeatureOperationsListResult & {
|
||||
/**
|
||||
* The underlying HTTP response.
|
||||
*/
|
||||
_response: msRest.HttpResponse & {
|
||||
/**
|
||||
* The response body as text (string format)
|
||||
*/
|
||||
bodyAsText: string;
|
||||
/** Contains response data for the list operation. */
|
||||
export type FeaturesListResponse = FeatureOperationsListResult;
|
||||
|
||||
/**
|
||||
* The response body as parsed JSON or XML
|
||||
*/
|
||||
parsedBody: FeatureOperationsListResult;
|
||||
};
|
||||
};
|
||||
/** Optional parameters. */
|
||||
export interface FeaturesGetOptionalParams
|
||||
extends coreClient.OperationOptions {}
|
||||
|
||||
/**
|
||||
* Contains response data for the listNext operation.
|
||||
*/
|
||||
export type FeaturesListNextResponse = FeatureOperationsListResult & {
|
||||
/**
|
||||
* The underlying HTTP response.
|
||||
*/
|
||||
_response: msRest.HttpResponse & {
|
||||
/**
|
||||
* The response body as text (string format)
|
||||
*/
|
||||
bodyAsText: string;
|
||||
/** Contains response data for the get operation. */
|
||||
export type FeaturesGetResponse = FeatureResult;
|
||||
|
||||
/**
|
||||
* The response body as parsed JSON or XML
|
||||
*/
|
||||
parsedBody: FeatureOperationsListResult;
|
||||
};
|
||||
};
|
||||
/** Optional parameters. */
|
||||
export interface FeaturesRegisterOptionalParams
|
||||
extends coreClient.OperationOptions {}
|
||||
|
||||
/** Contains response data for the register operation. */
|
||||
export type FeaturesRegisterResponse = FeatureResult;
|
||||
|
||||
/** Optional parameters. */
|
||||
export interface FeaturesUnregisterOptionalParams
|
||||
extends coreClient.OperationOptions {}
|
||||
|
||||
/** Contains response data for the unregister operation. */
|
||||
export type FeaturesUnregisterResponse = FeatureResult;
|
||||
|
||||
/** Optional parameters. */
|
||||
export interface FeaturesListAllNextOptionalParams
|
||||
extends coreClient.OperationOptions {}
|
||||
|
||||
/** Contains response data for the listAllNext operation. */
|
||||
export type FeaturesListAllNextResponse = FeatureOperationsListResult;
|
||||
|
||||
/** Optional parameters. */
|
||||
export interface FeaturesListNextOptionalParams
|
||||
extends coreClient.OperationOptions {}
|
||||
|
||||
/** Contains response data for the listNext operation. */
|
||||
export type FeaturesListNextResponse = FeatureOperationsListResult;
|
||||
|
||||
/** Optional parameters. */
|
||||
export interface FeaturesListAllNextNextOptionalParams
|
||||
extends coreClient.OperationOptions {}
|
||||
|
||||
/** Contains response data for the listAllNextNext operation. */
|
||||
export type FeaturesListAllNextNextResponse = FeatureOperationsListResult;
|
||||
|
||||
/** Optional parameters. */
|
||||
export interface FeaturesListNextNextOptionalParams
|
||||
extends coreClient.OperationOptions {}
|
||||
|
||||
/** Contains response data for the listNextNext operation. */
|
||||
export type FeaturesListNextNextResponse = FeatureOperationsListResult;
|
||||
|
||||
/** Optional parameters. */
|
||||
export interface SubscriptionFeatureRegistrationsGetOptionalParams
|
||||
extends coreClient.OperationOptions {}
|
||||
|
||||
/** Contains response data for the get operation. */
|
||||
export type SubscriptionFeatureRegistrationsGetResponse = SubscriptionFeatureRegistration;
|
||||
|
||||
/** Optional parameters. */
|
||||
export interface SubscriptionFeatureRegistrationsCreateOrUpdateOptionalParams
|
||||
extends coreClient.OperationOptions {
|
||||
/** Subscription Feature Registration Type details. */
|
||||
subscriptionFeatureRegistrationType?: SubscriptionFeatureRegistration;
|
||||
}
|
||||
|
||||
/** Contains response data for the createOrUpdate operation. */
|
||||
export type SubscriptionFeatureRegistrationsCreateOrUpdateResponse = SubscriptionFeatureRegistration;
|
||||
|
||||
/** Optional parameters. */
|
||||
export interface SubscriptionFeatureRegistrationsDeleteOptionalParams
|
||||
extends coreClient.OperationOptions {}
|
||||
|
||||
/** Optional parameters. */
|
||||
export interface SubscriptionFeatureRegistrationsListBySubscriptionOptionalParams
|
||||
extends coreClient.OperationOptions {}
|
||||
|
||||
/** Contains response data for the listBySubscription operation. */
|
||||
export type SubscriptionFeatureRegistrationsListBySubscriptionResponse = SubscriptionFeatureRegistrationList;
|
||||
|
||||
/** Optional parameters. */
|
||||
export interface SubscriptionFeatureRegistrationsListAllBySubscriptionOptionalParams
|
||||
extends coreClient.OperationOptions {}
|
||||
|
||||
/** Contains response data for the listAllBySubscription operation. */
|
||||
export type SubscriptionFeatureRegistrationsListAllBySubscriptionResponse = SubscriptionFeatureRegistrationList;
|
||||
|
||||
/** Optional parameters. */
|
||||
export interface SubscriptionFeatureRegistrationsListBySubscriptionNextOptionalParams
|
||||
extends coreClient.OperationOptions {}
|
||||
|
||||
/** Contains response data for the listBySubscriptionNext operation. */
|
||||
export type SubscriptionFeatureRegistrationsListBySubscriptionNextResponse = SubscriptionFeatureRegistrationList;
|
||||
|
||||
/** Optional parameters. */
|
||||
export interface SubscriptionFeatureRegistrationsListAllBySubscriptionNextOptionalParams
|
||||
extends coreClient.OperationOptions {}
|
||||
|
||||
/** Contains response data for the listAllBySubscriptionNext operation. */
|
||||
export type SubscriptionFeatureRegistrationsListAllBySubscriptionNextResponse = SubscriptionFeatureRegistrationList;
|
||||
|
||||
/** Optional parameters. */
|
||||
export interface SubscriptionFeatureRegistrationsListBySubscriptionNextNextOptionalParams
|
||||
extends coreClient.OperationOptions {}
|
||||
|
||||
/** Contains response data for the listBySubscriptionNextNext operation. */
|
||||
export type SubscriptionFeatureRegistrationsListBySubscriptionNextNextResponse = SubscriptionFeatureRegistrationList;
|
||||
|
||||
/** Optional parameters. */
|
||||
export interface SubscriptionFeatureRegistrationsListAllBySubscriptionNextNextOptionalParams
|
||||
extends coreClient.OperationOptions {}
|
||||
|
||||
/** Contains response data for the listAllBySubscriptionNextNext operation. */
|
||||
export type SubscriptionFeatureRegistrationsListAllBySubscriptionNextNextResponse = SubscriptionFeatureRegistrationList;
|
||||
|
||||
/** Optional parameters. */
|
||||
export interface FeatureClientOptionalParams
|
||||
extends coreClient.ServiceClientOptions {
|
||||
/** server parameter */
|
||||
$host?: string;
|
||||
/** Api Version */
|
||||
apiVersion?: string;
|
||||
/** Overrides client endpoint. */
|
||||
endpoint?: string;
|
||||
}
|
||||
|
|
|
@ -1,25 +1,32 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* 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";
|
||||
import * as coreClient from "@azure/core-client";
|
||||
|
||||
export const CloudError = CloudErrorMapper;
|
||||
export const BaseResource = BaseResourceMapper;
|
||||
|
||||
export const FeatureProperties: msRest.CompositeMapper = {
|
||||
serializedName: "FeatureProperties",
|
||||
export const OperationListResult: coreClient.CompositeMapper = {
|
||||
type: {
|
||||
name: "Composite",
|
||||
className: "FeatureProperties",
|
||||
className: "OperationListResult",
|
||||
modelProperties: {
|
||||
state: {
|
||||
serializedName: "state",
|
||||
value: {
|
||||
serializedName: "value",
|
||||
type: {
|
||||
name: "Sequence",
|
||||
element: {
|
||||
type: {
|
||||
name: "Composite",
|
||||
className: "Operation"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
nextLink: {
|
||||
serializedName: "nextLink",
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
|
@ -28,8 +35,134 @@ export const FeatureProperties: msRest.CompositeMapper = {
|
|||
}
|
||||
};
|
||||
|
||||
export const FeatureResult: msRest.CompositeMapper = {
|
||||
serializedName: "FeatureResult",
|
||||
export const Operation: coreClient.CompositeMapper = {
|
||||
type: {
|
||||
name: "Composite",
|
||||
className: "Operation",
|
||||
modelProperties: {
|
||||
name: {
|
||||
serializedName: "name",
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
},
|
||||
display: {
|
||||
serializedName: "display",
|
||||
type: {
|
||||
name: "Composite",
|
||||
className: "OperationDisplay"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const OperationDisplay: coreClient.CompositeMapper = {
|
||||
type: {
|
||||
name: "Composite",
|
||||
className: "OperationDisplay",
|
||||
modelProperties: {
|
||||
provider: {
|
||||
serializedName: "provider",
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
},
|
||||
resource: {
|
||||
serializedName: "resource",
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
},
|
||||
operation: {
|
||||
serializedName: "operation",
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const ErrorResponse: coreClient.CompositeMapper = {
|
||||
type: {
|
||||
name: "Composite",
|
||||
className: "ErrorResponse",
|
||||
modelProperties: {
|
||||
error: {
|
||||
serializedName: "error",
|
||||
type: {
|
||||
name: "Composite",
|
||||
className: "ErrorDefinition"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const ErrorDefinition: coreClient.CompositeMapper = {
|
||||
type: {
|
||||
name: "Composite",
|
||||
className: "ErrorDefinition",
|
||||
modelProperties: {
|
||||
code: {
|
||||
serializedName: "code",
|
||||
readOnly: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
},
|
||||
message: {
|
||||
serializedName: "message",
|
||||
readOnly: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
},
|
||||
details: {
|
||||
serializedName: "details",
|
||||
type: {
|
||||
name: "Sequence",
|
||||
element: {
|
||||
type: {
|
||||
name: "Composite",
|
||||
className: "ErrorDefinition"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const FeatureOperationsListResult: coreClient.CompositeMapper = {
|
||||
type: {
|
||||
name: "Composite",
|
||||
className: "FeatureOperationsListResult",
|
||||
modelProperties: {
|
||||
value: {
|
||||
serializedName: "value",
|
||||
type: {
|
||||
name: "Sequence",
|
||||
element: {
|
||||
type: {
|
||||
name: "Composite",
|
||||
className: "FeatureResult"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
nextLink: {
|
||||
serializedName: "nextLink",
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const FeatureResult: coreClient.CompositeMapper = {
|
||||
type: {
|
||||
name: "Composite",
|
||||
className: "FeatureResult",
|
||||
|
@ -63,26 +196,13 @@ export const FeatureResult: msRest.CompositeMapper = {
|
|||
}
|
||||
};
|
||||
|
||||
export const OperationDisplay: msRest.CompositeMapper = {
|
||||
serializedName: "Operation_display",
|
||||
export const FeatureProperties: coreClient.CompositeMapper = {
|
||||
type: {
|
||||
name: "Composite",
|
||||
className: "OperationDisplay",
|
||||
className: "FeatureProperties",
|
||||
modelProperties: {
|
||||
provider: {
|
||||
serializedName: "provider",
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
},
|
||||
resource: {
|
||||
serializedName: "resource",
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
},
|
||||
operation: {
|
||||
serializedName: "operation",
|
||||
state: {
|
||||
serializedName: "state",
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
|
@ -91,49 +211,138 @@ export const OperationDisplay: msRest.CompositeMapper = {
|
|||
}
|
||||
};
|
||||
|
||||
export const Operation: msRest.CompositeMapper = {
|
||||
serializedName: "Operation",
|
||||
export const ProxyResource: coreClient.CompositeMapper = {
|
||||
type: {
|
||||
name: "Composite",
|
||||
className: "Operation",
|
||||
className: "ProxyResource",
|
||||
modelProperties: {
|
||||
id: {
|
||||
serializedName: "id",
|
||||
readOnly: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
},
|
||||
name: {
|
||||
serializedName: "name",
|
||||
readOnly: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
},
|
||||
display: {
|
||||
serializedName: "display",
|
||||
type: {
|
||||
serializedName: "type",
|
||||
readOnly: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const SubscriptionFeatureRegistrationProperties: coreClient.CompositeMapper = {
|
||||
type: {
|
||||
name: "Composite",
|
||||
className: "SubscriptionFeatureRegistrationProperties",
|
||||
modelProperties: {
|
||||
tenantId: {
|
||||
serializedName: "tenantId",
|
||||
readOnly: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
},
|
||||
subscriptionId: {
|
||||
serializedName: "subscriptionId",
|
||||
readOnly: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
},
|
||||
featureName: {
|
||||
serializedName: "featureName",
|
||||
readOnly: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
},
|
||||
displayName: {
|
||||
serializedName: "displayName",
|
||||
readOnly: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
},
|
||||
providerNamespace: {
|
||||
serializedName: "providerNamespace",
|
||||
readOnly: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
},
|
||||
state: {
|
||||
serializedName: "state",
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
},
|
||||
authorizationProfile: {
|
||||
serializedName: "authorizationProfile",
|
||||
type: {
|
||||
name: "Composite",
|
||||
className: "OperationDisplay"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const OperationListResult: msRest.CompositeMapper = {
|
||||
serializedName: "OperationListResult",
|
||||
type: {
|
||||
name: "Composite",
|
||||
className: "OperationListResult",
|
||||
modelProperties: {
|
||||
value: {
|
||||
serializedName: "",
|
||||
type: {
|
||||
name: "Sequence",
|
||||
element: {
|
||||
type: {
|
||||
name: "Composite",
|
||||
className: "Operation"
|
||||
}
|
||||
}
|
||||
className: "AuthorizationProfile"
|
||||
}
|
||||
},
|
||||
nextLink: {
|
||||
serializedName: "nextLink",
|
||||
metadata: {
|
||||
serializedName: "metadata",
|
||||
type: {
|
||||
name: "Dictionary",
|
||||
value: { type: { name: "String" }, constraints: { MaxLength: 1000 } }
|
||||
}
|
||||
},
|
||||
releaseDate: {
|
||||
serializedName: "releaseDate",
|
||||
readOnly: true,
|
||||
type: {
|
||||
name: "DateTime"
|
||||
}
|
||||
},
|
||||
registrationDate: {
|
||||
serializedName: "registrationDate",
|
||||
readOnly: true,
|
||||
type: {
|
||||
name: "DateTime"
|
||||
}
|
||||
},
|
||||
documentationLink: {
|
||||
constraints: {
|
||||
MaxLength: 1000
|
||||
},
|
||||
serializedName: "documentationLink",
|
||||
readOnly: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
},
|
||||
approvalType: {
|
||||
serializedName: "approvalType",
|
||||
readOnly: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
},
|
||||
shouldFeatureDisplayInPortal: {
|
||||
serializedName: "shouldFeatureDisplayInPortal",
|
||||
type: {
|
||||
name: "Boolean"
|
||||
}
|
||||
},
|
||||
description: {
|
||||
constraints: {
|
||||
MaxLength: 1000
|
||||
},
|
||||
serializedName: "description",
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
|
@ -142,26 +351,42 @@ export const OperationListResult: msRest.CompositeMapper = {
|
|||
}
|
||||
};
|
||||
|
||||
export const FeatureOperationsListResult: msRest.CompositeMapper = {
|
||||
serializedName: "FeatureOperationsListResult",
|
||||
export const AuthorizationProfile: coreClient.CompositeMapper = {
|
||||
type: {
|
||||
name: "Composite",
|
||||
className: "FeatureOperationsListResult",
|
||||
className: "AuthorizationProfile",
|
||||
modelProperties: {
|
||||
value: {
|
||||
serializedName: "",
|
||||
requestedTime: {
|
||||
serializedName: "requestedTime",
|
||||
readOnly: true,
|
||||
type: {
|
||||
name: "Sequence",
|
||||
element: {
|
||||
type: {
|
||||
name: "Composite",
|
||||
className: "FeatureResult"
|
||||
}
|
||||
}
|
||||
name: "DateTime"
|
||||
}
|
||||
},
|
||||
nextLink: {
|
||||
serializedName: "nextLink",
|
||||
requester: {
|
||||
serializedName: "requester",
|
||||
readOnly: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
},
|
||||
requesterObjectId: {
|
||||
serializedName: "requesterObjectId",
|
||||
readOnly: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
},
|
||||
approvedTime: {
|
||||
serializedName: "approvedTime",
|
||||
readOnly: true,
|
||||
type: {
|
||||
name: "DateTime"
|
||||
}
|
||||
},
|
||||
approver: {
|
||||
serializedName: "approver",
|
||||
readOnly: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
|
@ -169,3 +394,47 @@ export const FeatureOperationsListResult: msRest.CompositeMapper = {
|
|||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const SubscriptionFeatureRegistrationList: coreClient.CompositeMapper = {
|
||||
type: {
|
||||
name: "Composite",
|
||||
className: "SubscriptionFeatureRegistrationList",
|
||||
modelProperties: {
|
||||
nextLink: {
|
||||
serializedName: "nextLink",
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
},
|
||||
value: {
|
||||
serializedName: "value",
|
||||
type: {
|
||||
name: "Sequence",
|
||||
element: {
|
||||
type: {
|
||||
name: "Composite",
|
||||
className: "SubscriptionFeatureRegistration"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const SubscriptionFeatureRegistration: coreClient.CompositeMapper = {
|
||||
type: {
|
||||
name: "Composite",
|
||||
className: "SubscriptionFeatureRegistration",
|
||||
modelProperties: {
|
||||
...ProxyResource.type.modelProperties,
|
||||
properties: {
|
||||
serializedName: "properties",
|
||||
type: {
|
||||
name: "Composite",
|
||||
className: "SubscriptionFeatureRegistrationProperties"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,73 +1,135 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* 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 * as msRest from "@azure/ms-rest-js";
|
||||
import {
|
||||
OperationParameter,
|
||||
OperationURLParameter,
|
||||
OperationQueryParameter
|
||||
} from "@azure/core-client";
|
||||
import { SubscriptionFeatureRegistration as SubscriptionFeatureRegistrationMapper } from "../models/mappers";
|
||||
|
||||
export const acceptLanguage: msRest.OperationParameter = {
|
||||
parameterPath: "acceptLanguage",
|
||||
export const accept: OperationParameter = {
|
||||
parameterPath: "accept",
|
||||
mapper: {
|
||||
serializedName: "accept-language",
|
||||
defaultValue: 'en-US',
|
||||
defaultValue: "application/json, text/json",
|
||||
isConstant: true,
|
||||
serializedName: "Accept",
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
};
|
||||
export const apiVersion: msRest.OperationQueryParameter = {
|
||||
parameterPath: "apiVersion",
|
||||
|
||||
export const $host: OperationURLParameter = {
|
||||
parameterPath: "$host",
|
||||
mapper: {
|
||||
serializedName: "$host",
|
||||
required: true,
|
||||
serializedName: "api-version",
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
};
|
||||
export const featureName: msRest.OperationURLParameter = {
|
||||
parameterPath: "featureName",
|
||||
mapper: {
|
||||
required: true,
|
||||
serializedName: "featureName",
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
};
|
||||
export const nextPageLink: msRest.OperationURLParameter = {
|
||||
parameterPath: "nextPageLink",
|
||||
mapper: {
|
||||
required: true,
|
||||
serializedName: "nextLink",
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
},
|
||||
skipEncoding: true
|
||||
};
|
||||
export const resourceProviderNamespace: msRest.OperationURLParameter = {
|
||||
parameterPath: "resourceProviderNamespace",
|
||||
|
||||
export const apiVersion: OperationQueryParameter = {
|
||||
parameterPath: "apiVersion",
|
||||
mapper: {
|
||||
required: true,
|
||||
serializedName: "resourceProviderNamespace",
|
||||
defaultValue: "2021-07-01",
|
||||
isConstant: true,
|
||||
serializedName: "api-version",
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
};
|
||||
export const subscriptionId: msRest.OperationURLParameter = {
|
||||
|
||||
export const nextLink: OperationURLParameter = {
|
||||
parameterPath: "nextLink",
|
||||
mapper: {
|
||||
serializedName: "nextLink",
|
||||
required: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
},
|
||||
skipEncoding: true
|
||||
};
|
||||
|
||||
export const subscriptionId: OperationURLParameter = {
|
||||
parameterPath: "subscriptionId",
|
||||
mapper: {
|
||||
required: true,
|
||||
serializedName: "subscriptionId",
|
||||
required: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const resourceProviderNamespace: OperationURLParameter = {
|
||||
parameterPath: "resourceProviderNamespace",
|
||||
mapper: {
|
||||
serializedName: "resourceProviderNamespace",
|
||||
required: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const featureName: OperationURLParameter = {
|
||||
parameterPath: "featureName",
|
||||
mapper: {
|
||||
serializedName: "featureName",
|
||||
required: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const accept1: OperationParameter = {
|
||||
parameterPath: "accept",
|
||||
mapper: {
|
||||
defaultValue: "application/json",
|
||||
isConstant: true,
|
||||
serializedName: "Accept",
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const providerNamespace: OperationURLParameter = {
|
||||
parameterPath: "providerNamespace",
|
||||
mapper: {
|
||||
serializedName: "providerNamespace",
|
||||
required: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const contentType: OperationParameter = {
|
||||
parameterPath: ["options", "contentType"],
|
||||
mapper: {
|
||||
defaultValue: "application/json",
|
||||
isConstant: true,
|
||||
serializedName: "Content-Type",
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const subscriptionFeatureRegistrationType: OperationParameter = {
|
||||
parameterPath: ["options", "subscriptionFeatureRegistrationType"],
|
||||
mapper: SubscriptionFeatureRegistrationMapper
|
||||
};
|
||||
|
|
|
@ -1,26 +1,48 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* 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 * as msRest from "@azure/ms-rest-js";
|
||||
import * as Models from "../models";
|
||||
import * as Mappers from "../models/featuresMappers";
|
||||
import "@azure/core-paging";
|
||||
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
||||
import { Features } from "../operationsInterfaces";
|
||||
import * as coreClient from "@azure/core-client";
|
||||
import * as Mappers from "../models/mappers";
|
||||
import * as Parameters from "../models/parameters";
|
||||
import { FeatureClientContext } from "../featureClientContext";
|
||||
import {
|
||||
FeatureResult,
|
||||
FeaturesListAllNextOptionalParams,
|
||||
FeaturesListAllOptionalParams,
|
||||
FeaturesListNextOptionalParams,
|
||||
FeaturesListOptionalParams,
|
||||
FeaturesListAllNextNextOptionalParams,
|
||||
FeaturesListNextNextOptionalParams,
|
||||
FeaturesListAllResponse,
|
||||
FeaturesListResponse,
|
||||
FeaturesGetOptionalParams,
|
||||
FeaturesGetResponse,
|
||||
FeaturesRegisterOptionalParams,
|
||||
FeaturesRegisterResponse,
|
||||
FeaturesUnregisterOptionalParams,
|
||||
FeaturesUnregisterResponse,
|
||||
FeaturesListAllNextResponse,
|
||||
FeaturesListNextResponse,
|
||||
FeaturesListAllNextNextResponse,
|
||||
FeaturesListNextNextResponse
|
||||
} from "../models";
|
||||
|
||||
/// <reference lib="esnext.asynciterable" />
|
||||
/** Class representing a Features. */
|
||||
export class Features {
|
||||
export class FeaturesImpl implements Features {
|
||||
private readonly client: FeatureClientContext;
|
||||
|
||||
/**
|
||||
* Create a Features.
|
||||
* @param {FeatureClientContext} client Reference to the service client.
|
||||
* Initialize a new instance of the class Features class.
|
||||
* @param client Reference to the service client
|
||||
*/
|
||||
constructor(client: FeatureClientContext) {
|
||||
this.client = client;
|
||||
|
@ -28,316 +50,542 @@ export class Features {
|
|||
|
||||
/**
|
||||
* Gets all the preview features that are available through AFEC for the subscription.
|
||||
* @param [options] The optional parameters
|
||||
* @returns Promise<Models.FeaturesListAllResponse>
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
listAll(options?: msRest.RequestOptionsBase): Promise<Models.FeaturesListAllResponse>;
|
||||
/**
|
||||
* @param callback The callback
|
||||
*/
|
||||
listAll(callback: msRest.ServiceCallback<Models.FeatureOperationsListResult>): void;
|
||||
/**
|
||||
* @param options The optional parameters
|
||||
* @param callback The callback
|
||||
*/
|
||||
listAll(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.FeatureOperationsListResult>): void;
|
||||
listAll(options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.FeatureOperationsListResult>, callback?: msRest.ServiceCallback<Models.FeatureOperationsListResult>): Promise<Models.FeaturesListAllResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{
|
||||
options
|
||||
public listAll(
|
||||
options?: FeaturesListAllOptionalParams
|
||||
): PagedAsyncIterableIterator<FeatureResult> {
|
||||
const iter = this.listAllPagingAll(options);
|
||||
return {
|
||||
next() {
|
||||
return iter.next();
|
||||
},
|
||||
listAllOperationSpec,
|
||||
callback) as Promise<Models.FeaturesListAllResponse>;
|
||||
[Symbol.asyncIterator]() {
|
||||
return this;
|
||||
},
|
||||
byPage: () => {
|
||||
return this.listAllPagingPage(options);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private async *listAllPagingPage(
|
||||
options?: FeaturesListAllOptionalParams
|
||||
): AsyncIterableIterator<FeatureResult[]> {
|
||||
let result = await this._listAll(options);
|
||||
yield result.value || [];
|
||||
let continuationToken = result.nextLink;
|
||||
while (continuationToken) {
|
||||
result = await this._listAllNext(continuationToken, options);
|
||||
continuationToken = result.nextLink;
|
||||
yield result.value || [];
|
||||
}
|
||||
}
|
||||
|
||||
private async *listAllPagingAll(
|
||||
options?: FeaturesListAllOptionalParams
|
||||
): AsyncIterableIterator<FeatureResult> {
|
||||
for await (const page of this.listAllPagingPage(options)) {
|
||||
yield* page;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets all the preview features in a provider namespace that are available through AFEC for the
|
||||
* subscription.
|
||||
* @param resourceProviderNamespace The namespace of the resource provider for getting features.
|
||||
* @param [options] The optional parameters
|
||||
* @returns Promise<Models.FeaturesListResponse>
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
list(resourceProviderNamespace: string, options?: msRest.RequestOptionsBase): Promise<Models.FeaturesListResponse>;
|
||||
/**
|
||||
* @param resourceProviderNamespace The namespace of the resource provider for getting features.
|
||||
* @param callback The callback
|
||||
*/
|
||||
list(resourceProviderNamespace: string, callback: msRest.ServiceCallback<Models.FeatureOperationsListResult>): void;
|
||||
/**
|
||||
* @param resourceProviderNamespace The namespace of the resource provider for getting features.
|
||||
* @param options The optional parameters
|
||||
* @param callback The callback
|
||||
*/
|
||||
list(resourceProviderNamespace: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.FeatureOperationsListResult>): void;
|
||||
list(resourceProviderNamespace: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.FeatureOperationsListResult>, callback?: msRest.ServiceCallback<Models.FeatureOperationsListResult>): Promise<Models.FeaturesListResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{
|
||||
resourceProviderNamespace,
|
||||
options
|
||||
public list(
|
||||
resourceProviderNamespace: string,
|
||||
options?: FeaturesListOptionalParams
|
||||
): PagedAsyncIterableIterator<FeatureResult> {
|
||||
const iter = this.listPagingAll(resourceProviderNamespace, options);
|
||||
return {
|
||||
next() {
|
||||
return iter.next();
|
||||
},
|
||||
listOperationSpec,
|
||||
callback) as Promise<Models.FeaturesListResponse>;
|
||||
[Symbol.asyncIterator]() {
|
||||
return this;
|
||||
},
|
||||
byPage: () => {
|
||||
return this.listPagingPage(resourceProviderNamespace, options);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private async *listPagingPage(
|
||||
resourceProviderNamespace: string,
|
||||
options?: FeaturesListOptionalParams
|
||||
): AsyncIterableIterator<FeatureResult[]> {
|
||||
let result = await this._list(resourceProviderNamespace, options);
|
||||
yield result.value || [];
|
||||
let continuationToken = result.nextLink;
|
||||
while (continuationToken) {
|
||||
result = await this._listNext(
|
||||
resourceProviderNamespace,
|
||||
continuationToken,
|
||||
options
|
||||
);
|
||||
continuationToken = result.nextLink;
|
||||
yield result.value || [];
|
||||
}
|
||||
}
|
||||
|
||||
private async *listPagingAll(
|
||||
resourceProviderNamespace: string,
|
||||
options?: FeaturesListOptionalParams
|
||||
): AsyncIterableIterator<FeatureResult> {
|
||||
for await (const page of this.listPagingPage(
|
||||
resourceProviderNamespace,
|
||||
options
|
||||
)) {
|
||||
yield* page;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* ListAllNext
|
||||
* @param nextLink The nextLink from the previous successful call to the ListAll method.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
public listAllNext(
|
||||
nextLink: string,
|
||||
options?: FeaturesListAllNextOptionalParams
|
||||
): PagedAsyncIterableIterator<FeatureResult> {
|
||||
const iter = this.listAllNextPagingAll(nextLink, options);
|
||||
return {
|
||||
next() {
|
||||
return iter.next();
|
||||
},
|
||||
[Symbol.asyncIterator]() {
|
||||
return this;
|
||||
},
|
||||
byPage: () => {
|
||||
return this.listAllNextPagingPage(nextLink, options);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private async *listAllNextPagingPage(
|
||||
nextLink: string,
|
||||
options?: FeaturesListAllNextOptionalParams
|
||||
): AsyncIterableIterator<FeatureResult[]> {
|
||||
let result = await this._listAllNext(nextLink, options);
|
||||
yield result.value || [];
|
||||
let continuationToken = result.nextLink;
|
||||
while (continuationToken) {
|
||||
result = await this._listAllNextNext(continuationToken, options);
|
||||
continuationToken = result.nextLink;
|
||||
yield result.value || [];
|
||||
}
|
||||
}
|
||||
|
||||
private async *listAllNextPagingAll(
|
||||
nextLink: string,
|
||||
options?: FeaturesListAllNextOptionalParams
|
||||
): AsyncIterableIterator<FeatureResult> {
|
||||
for await (const page of this.listAllNextPagingPage(nextLink, options)) {
|
||||
yield* page;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* ListNext
|
||||
* @param resourceProviderNamespace The namespace of the resource provider for getting features.
|
||||
* @param nextLink The nextLink from the previous successful call to the List method.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
public listNext(
|
||||
resourceProviderNamespace: string,
|
||||
nextLink: string,
|
||||
options?: FeaturesListNextOptionalParams
|
||||
): PagedAsyncIterableIterator<FeatureResult> {
|
||||
const iter = this.listNextPagingAll(
|
||||
resourceProviderNamespace,
|
||||
nextLink,
|
||||
options
|
||||
);
|
||||
return {
|
||||
next() {
|
||||
return iter.next();
|
||||
},
|
||||
[Symbol.asyncIterator]() {
|
||||
return this;
|
||||
},
|
||||
byPage: () => {
|
||||
return this.listNextPagingPage(
|
||||
resourceProviderNamespace,
|
||||
nextLink,
|
||||
options
|
||||
);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private async *listNextPagingPage(
|
||||
resourceProviderNamespace: string,
|
||||
nextLink: string,
|
||||
options?: FeaturesListNextOptionalParams
|
||||
): AsyncIterableIterator<FeatureResult[]> {
|
||||
let result = await this._listNext(
|
||||
resourceProviderNamespace,
|
||||
nextLink,
|
||||
options
|
||||
);
|
||||
yield result.value || [];
|
||||
let continuationToken = result.nextLink;
|
||||
while (continuationToken) {
|
||||
result = await this._listNextNext(
|
||||
resourceProviderNamespace,
|
||||
continuationToken,
|
||||
options
|
||||
);
|
||||
continuationToken = result.nextLink;
|
||||
yield result.value || [];
|
||||
}
|
||||
}
|
||||
|
||||
private async *listNextPagingAll(
|
||||
resourceProviderNamespace: string,
|
||||
nextLink: string,
|
||||
options?: FeaturesListNextOptionalParams
|
||||
): AsyncIterableIterator<FeatureResult> {
|
||||
for await (const page of this.listNextPagingPage(
|
||||
resourceProviderNamespace,
|
||||
nextLink,
|
||||
options
|
||||
)) {
|
||||
yield* page;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets all the preview features that are available through AFEC for the subscription.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
private _listAll(
|
||||
options?: FeaturesListAllOptionalParams
|
||||
): Promise<FeaturesListAllResponse> {
|
||||
return this.client.sendOperationRequest({ options }, listAllOperationSpec);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets all the preview features in a provider namespace that are available through AFEC for the
|
||||
* subscription.
|
||||
* @param resourceProviderNamespace The namespace of the resource provider for getting features.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
private _list(
|
||||
resourceProviderNamespace: string,
|
||||
options?: FeaturesListOptionalParams
|
||||
): Promise<FeaturesListResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{ resourceProviderNamespace, options },
|
||||
listOperationSpec
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the preview feature with the specified name.
|
||||
* @param resourceProviderNamespace The resource provider namespace for the feature.
|
||||
* @param featureName The name of the feature to get.
|
||||
* @param [options] The optional parameters
|
||||
* @returns Promise<Models.FeaturesGetResponse>
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
get(resourceProviderNamespace: string, featureName: string, options?: msRest.RequestOptionsBase): Promise<Models.FeaturesGetResponse>;
|
||||
/**
|
||||
* @param resourceProviderNamespace The resource provider namespace for the feature.
|
||||
* @param featureName The name of the feature to get.
|
||||
* @param callback The callback
|
||||
*/
|
||||
get(resourceProviderNamespace: string, featureName: string, callback: msRest.ServiceCallback<Models.FeatureResult>): void;
|
||||
/**
|
||||
* @param resourceProviderNamespace The resource provider namespace for the feature.
|
||||
* @param featureName The name of the feature to get.
|
||||
* @param options The optional parameters
|
||||
* @param callback The callback
|
||||
*/
|
||||
get(resourceProviderNamespace: string, featureName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.FeatureResult>): void;
|
||||
get(resourceProviderNamespace: string, featureName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.FeatureResult>, callback?: msRest.ServiceCallback<Models.FeatureResult>): Promise<Models.FeaturesGetResponse> {
|
||||
get(
|
||||
resourceProviderNamespace: string,
|
||||
featureName: string,
|
||||
options?: FeaturesGetOptionalParams
|
||||
): Promise<FeaturesGetResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{
|
||||
resourceProviderNamespace,
|
||||
featureName,
|
||||
options
|
||||
},
|
||||
getOperationSpec,
|
||||
callback) as Promise<Models.FeaturesGetResponse>;
|
||||
{ resourceProviderNamespace, featureName, options },
|
||||
getOperationSpec
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers the preview feature for the subscription.
|
||||
* @param resourceProviderNamespace The namespace of the resource provider.
|
||||
* @param featureName The name of the feature to register.
|
||||
* @param [options] The optional parameters
|
||||
* @returns Promise<Models.FeaturesRegisterResponse>
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
register(resourceProviderNamespace: string, featureName: string, options?: msRest.RequestOptionsBase): Promise<Models.FeaturesRegisterResponse>;
|
||||
/**
|
||||
* @param resourceProviderNamespace The namespace of the resource provider.
|
||||
* @param featureName The name of the feature to register.
|
||||
* @param callback The callback
|
||||
*/
|
||||
register(resourceProviderNamespace: string, featureName: string, callback: msRest.ServiceCallback<Models.FeatureResult>): void;
|
||||
/**
|
||||
* @param resourceProviderNamespace The namespace of the resource provider.
|
||||
* @param featureName The name of the feature to register.
|
||||
* @param options The optional parameters
|
||||
* @param callback The callback
|
||||
*/
|
||||
register(resourceProviderNamespace: string, featureName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.FeatureResult>): void;
|
||||
register(resourceProviderNamespace: string, featureName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.FeatureResult>, callback?: msRest.ServiceCallback<Models.FeatureResult>): Promise<Models.FeaturesRegisterResponse> {
|
||||
register(
|
||||
resourceProviderNamespace: string,
|
||||
featureName: string,
|
||||
options?: FeaturesRegisterOptionalParams
|
||||
): Promise<FeaturesRegisterResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{
|
||||
resourceProviderNamespace,
|
||||
featureName,
|
||||
options
|
||||
},
|
||||
registerOperationSpec,
|
||||
callback) as Promise<Models.FeaturesRegisterResponse>;
|
||||
{ resourceProviderNamespace, featureName, options },
|
||||
registerOperationSpec
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets all the preview features that are available through AFEC for the subscription.
|
||||
* @param nextPageLink The NextLink from the previous successful call to List operation.
|
||||
* @param [options] The optional parameters
|
||||
* @returns Promise<Models.FeaturesListAllNextResponse>
|
||||
* Unregisters the preview feature for the subscription.
|
||||
* @param resourceProviderNamespace The namespace of the resource provider.
|
||||
* @param featureName The name of the feature to unregister.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
listAllNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.FeaturesListAllNextResponse>;
|
||||
/**
|
||||
* @param nextPageLink The NextLink from the previous successful call to List operation.
|
||||
* @param callback The callback
|
||||
*/
|
||||
listAllNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.FeatureOperationsListResult>): void;
|
||||
/**
|
||||
* @param nextPageLink The NextLink from the previous successful call to List operation.
|
||||
* @param options The optional parameters
|
||||
* @param callback The callback
|
||||
*/
|
||||
listAllNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.FeatureOperationsListResult>): void;
|
||||
listAllNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.FeatureOperationsListResult>, callback?: msRest.ServiceCallback<Models.FeatureOperationsListResult>): Promise<Models.FeaturesListAllNextResponse> {
|
||||
unregister(
|
||||
resourceProviderNamespace: string,
|
||||
featureName: string,
|
||||
options?: FeaturesUnregisterOptionalParams
|
||||
): Promise<FeaturesUnregisterResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{
|
||||
nextPageLink,
|
||||
options
|
||||
},
|
||||
listAllNextOperationSpec,
|
||||
callback) as Promise<Models.FeaturesListAllNextResponse>;
|
||||
{ resourceProviderNamespace, featureName, options },
|
||||
unregisterOperationSpec
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets all the preview features in a provider namespace that are available through AFEC for the
|
||||
* subscription.
|
||||
* @param nextPageLink The NextLink from the previous successful call to List operation.
|
||||
* @param [options] The optional parameters
|
||||
* @returns Promise<Models.FeaturesListNextResponse>
|
||||
* ListAllNext
|
||||
* @param nextLink The nextLink from the previous successful call to the ListAll method.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.FeaturesListNextResponse>;
|
||||
/**
|
||||
* @param nextPageLink The NextLink from the previous successful call to List operation.
|
||||
* @param callback The callback
|
||||
*/
|
||||
listNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.FeatureOperationsListResult>): 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<Models.FeatureOperationsListResult>): void;
|
||||
listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.FeatureOperationsListResult>, callback?: msRest.ServiceCallback<Models.FeatureOperationsListResult>): Promise<Models.FeaturesListNextResponse> {
|
||||
private _listAllNext(
|
||||
nextLink: string,
|
||||
options?: FeaturesListAllNextOptionalParams
|
||||
): Promise<FeaturesListAllNextResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{
|
||||
nextPageLink,
|
||||
options
|
||||
},
|
||||
listNextOperationSpec,
|
||||
callback) as Promise<Models.FeaturesListNextResponse>;
|
||||
{ nextLink, options },
|
||||
listAllNextOperationSpec
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* ListNext
|
||||
* @param resourceProviderNamespace The namespace of the resource provider for getting features.
|
||||
* @param nextLink The nextLink from the previous successful call to the List method.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
private _listNext(
|
||||
resourceProviderNamespace: string,
|
||||
nextLink: string,
|
||||
options?: FeaturesListNextOptionalParams
|
||||
): Promise<FeaturesListNextResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{ resourceProviderNamespace, nextLink, options },
|
||||
listNextOperationSpec
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* ListAllNextNext
|
||||
* @param nextLink The nextLink from the previous successful call to the ListAllNext method.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
private _listAllNextNext(
|
||||
nextLink: string,
|
||||
options?: FeaturesListAllNextNextOptionalParams
|
||||
): Promise<FeaturesListAllNextNextResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{ nextLink, options },
|
||||
listAllNextNextOperationSpec
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* ListNextNext
|
||||
* @param resourceProviderNamespace The namespace of the resource provider for getting features.
|
||||
* @param nextLink The nextLink from the previous successful call to the ListNext method.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
private _listNextNext(
|
||||
resourceProviderNamespace: string,
|
||||
nextLink: string,
|
||||
options?: FeaturesListNextNextOptionalParams
|
||||
): Promise<FeaturesListNextNextResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{ resourceProviderNamespace, nextLink, options },
|
||||
listNextNextOperationSpec
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Operation Specifications
|
||||
const serializer = new msRest.Serializer(Mappers);
|
||||
const listAllOperationSpec: msRest.OperationSpec = {
|
||||
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
||||
|
||||
const listAllOperationSpec: coreClient.OperationSpec = {
|
||||
path: "/subscriptions/{subscriptionId}/providers/Microsoft.Features/features",
|
||||
httpMethod: "GET",
|
||||
path: "subscriptions/{subscriptionId}/providers/Microsoft.Features/features",
|
||||
urlParameters: [
|
||||
Parameters.subscriptionId
|
||||
],
|
||||
queryParameters: [
|
||||
Parameters.apiVersion
|
||||
],
|
||||
headerParameters: [
|
||||
Parameters.acceptLanguage
|
||||
],
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.FeatureOperationsListResult
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.CloudError
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [Parameters.$host, Parameters.subscriptionId],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
};
|
||||
|
||||
const listOperationSpec: msRest.OperationSpec = {
|
||||
const listOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/providers/Microsoft.Features/providers/{resourceProviderNamespace}/features",
|
||||
httpMethod: "GET",
|
||||
path: "subscriptions/{subscriptionId}/providers/Microsoft.Features/providers/{resourceProviderNamespace}/features",
|
||||
urlParameters: [
|
||||
Parameters.resourceProviderNamespace,
|
||||
Parameters.subscriptionId
|
||||
],
|
||||
queryParameters: [
|
||||
Parameters.apiVersion
|
||||
],
|
||||
headerParameters: [
|
||||
Parameters.acceptLanguage
|
||||
],
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.FeatureOperationsListResult
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.CloudError
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.resourceProviderNamespace
|
||||
],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
};
|
||||
|
||||
const getOperationSpec: msRest.OperationSpec = {
|
||||
const getOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/providers/Microsoft.Features/providers/{resourceProviderNamespace}/features/{featureName}",
|
||||
httpMethod: "GET",
|
||||
path: "subscriptions/{subscriptionId}/providers/Microsoft.Features/providers/{resourceProviderNamespace}/features/{featureName}",
|
||||
urlParameters: [
|
||||
Parameters.resourceProviderNamespace,
|
||||
Parameters.featureName,
|
||||
Parameters.subscriptionId
|
||||
],
|
||||
queryParameters: [
|
||||
Parameters.apiVersion
|
||||
],
|
||||
headerParameters: [
|
||||
Parameters.acceptLanguage
|
||||
],
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.FeatureResult
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.CloudError
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.resourceProviderNamespace,
|
||||
Parameters.featureName
|
||||
],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
};
|
||||
|
||||
const registerOperationSpec: msRest.OperationSpec = {
|
||||
const registerOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/providers/Microsoft.Features/providers/{resourceProviderNamespace}/features/{featureName}/register",
|
||||
httpMethod: "POST",
|
||||
path: "subscriptions/{subscriptionId}/providers/Microsoft.Features/providers/{resourceProviderNamespace}/features/{featureName}/register",
|
||||
urlParameters: [
|
||||
Parameters.resourceProviderNamespace,
|
||||
Parameters.featureName,
|
||||
Parameters.subscriptionId
|
||||
],
|
||||
queryParameters: [
|
||||
Parameters.apiVersion
|
||||
],
|
||||
headerParameters: [
|
||||
Parameters.acceptLanguage
|
||||
],
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.FeatureResult
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.CloudError
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.resourceProviderNamespace,
|
||||
Parameters.featureName
|
||||
],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
};
|
||||
|
||||
const listAllNextOperationSpec: msRest.OperationSpec = {
|
||||
httpMethod: "GET",
|
||||
baseUrl: "https://management.azure.com",
|
||||
path: "{nextLink}",
|
||||
const unregisterOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/providers/Microsoft.Features/providers/{resourceProviderNamespace}/features/{featureName}/unregister",
|
||||
httpMethod: "POST",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.FeatureResult
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
Parameters.nextPageLink
|
||||
],
|
||||
headerParameters: [
|
||||
Parameters.acceptLanguage
|
||||
Parameters.$host,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.resourceProviderNamespace,
|
||||
Parameters.featureName
|
||||
],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
};
|
||||
const listAllNextOperationSpec: coreClient.OperationSpec = {
|
||||
path: "{nextLink}",
|
||||
httpMethod: "GET",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.FeatureOperationsListResult
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.CloudError
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.nextLink,
|
||||
Parameters.subscriptionId
|
||||
],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
};
|
||||
|
||||
const listNextOperationSpec: msRest.OperationSpec = {
|
||||
httpMethod: "GET",
|
||||
baseUrl: "https://management.azure.com",
|
||||
const listNextOperationSpec: coreClient.OperationSpec = {
|
||||
path: "{nextLink}",
|
||||
urlParameters: [
|
||||
Parameters.nextPageLink
|
||||
],
|
||||
headerParameters: [
|
||||
Parameters.acceptLanguage
|
||||
],
|
||||
httpMethod: "GET",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.FeatureOperationsListResult
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.CloudError
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.nextLink,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.resourceProviderNamespace
|
||||
],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
};
|
||||
const listAllNextNextOperationSpec: coreClient.OperationSpec = {
|
||||
path: "{nextLink}",
|
||||
httpMethod: "GET",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.FeatureOperationsListResult
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.nextLink,
|
||||
Parameters.subscriptionId
|
||||
],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
};
|
||||
const listNextNextOperationSpec: coreClient.OperationSpec = {
|
||||
path: "{nextLink}",
|
||||
httpMethod: "GET",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.FeatureOperationsListResult
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.nextLink,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.resourceProviderNamespace
|
||||
],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
};
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* 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 * from "./features";
|
||||
export * from "./subscriptionFeatureRegistrations";
|
||||
|
|
|
@ -0,0 +1,569 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
import "@azure/core-paging";
|
||||
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
||||
import { SubscriptionFeatureRegistrations } from "../operationsInterfaces";
|
||||
import * as coreClient from "@azure/core-client";
|
||||
import * as Mappers from "../models/mappers";
|
||||
import * as Parameters from "../models/parameters";
|
||||
import { FeatureClientContext } from "../featureClientContext";
|
||||
import {
|
||||
SubscriptionFeatureRegistration,
|
||||
SubscriptionFeatureRegistrationsListBySubscriptionNextOptionalParams,
|
||||
SubscriptionFeatureRegistrationsListBySubscriptionOptionalParams,
|
||||
SubscriptionFeatureRegistrationsListAllBySubscriptionNextOptionalParams,
|
||||
SubscriptionFeatureRegistrationsListAllBySubscriptionOptionalParams,
|
||||
SubscriptionFeatureRegistrationsListBySubscriptionNextNextOptionalParams,
|
||||
SubscriptionFeatureRegistrationsListAllBySubscriptionNextNextOptionalParams,
|
||||
SubscriptionFeatureRegistrationsGetOptionalParams,
|
||||
SubscriptionFeatureRegistrationsGetResponse,
|
||||
SubscriptionFeatureRegistrationsCreateOrUpdateOptionalParams,
|
||||
SubscriptionFeatureRegistrationsCreateOrUpdateResponse,
|
||||
SubscriptionFeatureRegistrationsDeleteOptionalParams,
|
||||
SubscriptionFeatureRegistrationsListBySubscriptionResponse,
|
||||
SubscriptionFeatureRegistrationsListAllBySubscriptionResponse,
|
||||
SubscriptionFeatureRegistrationsListBySubscriptionNextResponse,
|
||||
SubscriptionFeatureRegistrationsListAllBySubscriptionNextResponse,
|
||||
SubscriptionFeatureRegistrationsListBySubscriptionNextNextResponse,
|
||||
SubscriptionFeatureRegistrationsListAllBySubscriptionNextNextResponse
|
||||
} from "../models";
|
||||
|
||||
/// <reference lib="esnext.asynciterable" />
|
||||
/** Class representing a SubscriptionFeatureRegistrations. */
|
||||
export class SubscriptionFeatureRegistrationsImpl
|
||||
implements SubscriptionFeatureRegistrations {
|
||||
private readonly client: FeatureClientContext;
|
||||
|
||||
/**
|
||||
* Initialize a new instance of the class SubscriptionFeatureRegistrations class.
|
||||
* @param client Reference to the service client
|
||||
*/
|
||||
constructor(client: FeatureClientContext) {
|
||||
this.client = client;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns subscription feature registrations for given subscription and provider namespace.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
public listBySubscription(
|
||||
options?: SubscriptionFeatureRegistrationsListBySubscriptionOptionalParams
|
||||
): PagedAsyncIterableIterator<SubscriptionFeatureRegistration> {
|
||||
const iter = this.listBySubscriptionPagingAll(options);
|
||||
return {
|
||||
next() {
|
||||
return iter.next();
|
||||
},
|
||||
[Symbol.asyncIterator]() {
|
||||
return this;
|
||||
},
|
||||
byPage: () => {
|
||||
return this.listBySubscriptionPagingPage(options);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private async *listBySubscriptionPagingPage(
|
||||
options?: SubscriptionFeatureRegistrationsListBySubscriptionOptionalParams
|
||||
): AsyncIterableIterator<SubscriptionFeatureRegistration[]> {
|
||||
let result = await this._listBySubscription(options);
|
||||
yield result.value || [];
|
||||
let continuationToken = result.nextLink;
|
||||
while (continuationToken) {
|
||||
result = await this._listBySubscriptionNext(continuationToken, options);
|
||||
continuationToken = result.nextLink;
|
||||
yield result.value || [];
|
||||
}
|
||||
}
|
||||
|
||||
private async *listBySubscriptionPagingAll(
|
||||
options?: SubscriptionFeatureRegistrationsListBySubscriptionOptionalParams
|
||||
): AsyncIterableIterator<SubscriptionFeatureRegistration> {
|
||||
for await (const page of this.listBySubscriptionPagingPage(options)) {
|
||||
yield* page;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns subscription feature registrations for given subscription.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
public listAllBySubscription(
|
||||
options?: SubscriptionFeatureRegistrationsListAllBySubscriptionOptionalParams
|
||||
): PagedAsyncIterableIterator<SubscriptionFeatureRegistration> {
|
||||
const iter = this.listAllBySubscriptionPagingAll(options);
|
||||
return {
|
||||
next() {
|
||||
return iter.next();
|
||||
},
|
||||
[Symbol.asyncIterator]() {
|
||||
return this;
|
||||
},
|
||||
byPage: () => {
|
||||
return this.listAllBySubscriptionPagingPage(options);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private async *listAllBySubscriptionPagingPage(
|
||||
options?: SubscriptionFeatureRegistrationsListAllBySubscriptionOptionalParams
|
||||
): AsyncIterableIterator<SubscriptionFeatureRegistration[]> {
|
||||
let result = await this._listAllBySubscription(options);
|
||||
yield result.value || [];
|
||||
let continuationToken = result.nextLink;
|
||||
while (continuationToken) {
|
||||
result = await this._listAllBySubscriptionNext(
|
||||
continuationToken,
|
||||
options
|
||||
);
|
||||
continuationToken = result.nextLink;
|
||||
yield result.value || [];
|
||||
}
|
||||
}
|
||||
|
||||
private async *listAllBySubscriptionPagingAll(
|
||||
options?: SubscriptionFeatureRegistrationsListAllBySubscriptionOptionalParams
|
||||
): AsyncIterableIterator<SubscriptionFeatureRegistration> {
|
||||
for await (const page of this.listAllBySubscriptionPagingPage(options)) {
|
||||
yield* page;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* ListBySubscriptionNext
|
||||
* @param nextLink The nextLink from the previous successful call to the ListBySubscription method.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
public listBySubscriptionNext(
|
||||
nextLink: string,
|
||||
options?: SubscriptionFeatureRegistrationsListBySubscriptionNextOptionalParams
|
||||
): PagedAsyncIterableIterator<SubscriptionFeatureRegistration> {
|
||||
const iter = this.listBySubscriptionNextPagingAll(nextLink, options);
|
||||
return {
|
||||
next() {
|
||||
return iter.next();
|
||||
},
|
||||
[Symbol.asyncIterator]() {
|
||||
return this;
|
||||
},
|
||||
byPage: () => {
|
||||
return this.listBySubscriptionNextPagingPage(nextLink, options);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private async *listBySubscriptionNextPagingPage(
|
||||
nextLink: string,
|
||||
options?: SubscriptionFeatureRegistrationsListBySubscriptionNextOptionalParams
|
||||
): AsyncIterableIterator<SubscriptionFeatureRegistration[]> {
|
||||
let result = await this._listBySubscriptionNext(nextLink, options);
|
||||
yield result.value || [];
|
||||
let continuationToken = result.nextLink;
|
||||
while (continuationToken) {
|
||||
result = await this._listBySubscriptionNextNext(
|
||||
continuationToken,
|
||||
options
|
||||
);
|
||||
continuationToken = result.nextLink;
|
||||
yield result.value || [];
|
||||
}
|
||||
}
|
||||
|
||||
private async *listBySubscriptionNextPagingAll(
|
||||
nextLink: string,
|
||||
options?: SubscriptionFeatureRegistrationsListBySubscriptionNextOptionalParams
|
||||
): AsyncIterableIterator<SubscriptionFeatureRegistration> {
|
||||
for await (const page of this.listBySubscriptionNextPagingPage(
|
||||
nextLink,
|
||||
options
|
||||
)) {
|
||||
yield* page;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* ListAllBySubscriptionNext
|
||||
* @param nextLink The nextLink from the previous successful call to the ListAllBySubscription method.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
public listAllBySubscriptionNext(
|
||||
nextLink: string,
|
||||
options?: SubscriptionFeatureRegistrationsListAllBySubscriptionNextOptionalParams
|
||||
): PagedAsyncIterableIterator<SubscriptionFeatureRegistration> {
|
||||
const iter = this.listAllBySubscriptionNextPagingAll(nextLink, options);
|
||||
return {
|
||||
next() {
|
||||
return iter.next();
|
||||
},
|
||||
[Symbol.asyncIterator]() {
|
||||
return this;
|
||||
},
|
||||
byPage: () => {
|
||||
return this.listAllBySubscriptionNextPagingPage(nextLink, options);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private async *listAllBySubscriptionNextPagingPage(
|
||||
nextLink: string,
|
||||
options?: SubscriptionFeatureRegistrationsListAllBySubscriptionNextOptionalParams
|
||||
): AsyncIterableIterator<SubscriptionFeatureRegistration[]> {
|
||||
let result = await this._listAllBySubscriptionNext(nextLink, options);
|
||||
yield result.value || [];
|
||||
let continuationToken = result.nextLink;
|
||||
while (continuationToken) {
|
||||
result = await this._listAllBySubscriptionNextNext(
|
||||
continuationToken,
|
||||
options
|
||||
);
|
||||
continuationToken = result.nextLink;
|
||||
yield result.value || [];
|
||||
}
|
||||
}
|
||||
|
||||
private async *listAllBySubscriptionNextPagingAll(
|
||||
nextLink: string,
|
||||
options?: SubscriptionFeatureRegistrationsListAllBySubscriptionNextOptionalParams
|
||||
): AsyncIterableIterator<SubscriptionFeatureRegistration> {
|
||||
for await (const page of this.listAllBySubscriptionNextPagingPage(
|
||||
nextLink,
|
||||
options
|
||||
)) {
|
||||
yield* page;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a feature registration
|
||||
* @param featureName The feature name.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
get(
|
||||
featureName: string,
|
||||
options?: SubscriptionFeatureRegistrationsGetOptionalParams
|
||||
): Promise<SubscriptionFeatureRegistrationsGetResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{ featureName, options },
|
||||
getOperationSpec
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create or update a feature registration.
|
||||
* @param featureName The feature name.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
createOrUpdate(
|
||||
featureName: string,
|
||||
options?: SubscriptionFeatureRegistrationsCreateOrUpdateOptionalParams
|
||||
): Promise<SubscriptionFeatureRegistrationsCreateOrUpdateResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{ featureName, options },
|
||||
createOrUpdateOperationSpec
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a feature registration
|
||||
* @param featureName The feature name.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
delete(
|
||||
featureName: string,
|
||||
options?: SubscriptionFeatureRegistrationsDeleteOptionalParams
|
||||
): Promise<void> {
|
||||
return this.client.sendOperationRequest(
|
||||
{ featureName, options },
|
||||
deleteOperationSpec
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns subscription feature registrations for given subscription and provider namespace.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
private _listBySubscription(
|
||||
options?: SubscriptionFeatureRegistrationsListBySubscriptionOptionalParams
|
||||
): Promise<SubscriptionFeatureRegistrationsListBySubscriptionResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{ options },
|
||||
listBySubscriptionOperationSpec
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns subscription feature registrations for given subscription.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
private _listAllBySubscription(
|
||||
options?: SubscriptionFeatureRegistrationsListAllBySubscriptionOptionalParams
|
||||
): Promise<SubscriptionFeatureRegistrationsListAllBySubscriptionResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{ options },
|
||||
listAllBySubscriptionOperationSpec
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* ListBySubscriptionNext
|
||||
* @param nextLink The nextLink from the previous successful call to the ListBySubscription method.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
private _listBySubscriptionNext(
|
||||
nextLink: string,
|
||||
options?: SubscriptionFeatureRegistrationsListBySubscriptionNextOptionalParams
|
||||
): Promise<SubscriptionFeatureRegistrationsListBySubscriptionNextResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{ nextLink, options },
|
||||
listBySubscriptionNextOperationSpec
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* ListAllBySubscriptionNext
|
||||
* @param nextLink The nextLink from the previous successful call to the ListAllBySubscription method.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
private _listAllBySubscriptionNext(
|
||||
nextLink: string,
|
||||
options?: SubscriptionFeatureRegistrationsListAllBySubscriptionNextOptionalParams
|
||||
): Promise<
|
||||
SubscriptionFeatureRegistrationsListAllBySubscriptionNextResponse
|
||||
> {
|
||||
return this.client.sendOperationRequest(
|
||||
{ nextLink, options },
|
||||
listAllBySubscriptionNextOperationSpec
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* ListBySubscriptionNextNext
|
||||
* @param nextLink The nextLink from the previous successful call to the ListBySubscriptionNext method.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
private _listBySubscriptionNextNext(
|
||||
nextLink: string,
|
||||
options?: SubscriptionFeatureRegistrationsListBySubscriptionNextNextOptionalParams
|
||||
): Promise<
|
||||
SubscriptionFeatureRegistrationsListBySubscriptionNextNextResponse
|
||||
> {
|
||||
return this.client.sendOperationRequest(
|
||||
{ nextLink, options },
|
||||
listBySubscriptionNextNextOperationSpec
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* ListAllBySubscriptionNextNext
|
||||
* @param nextLink The nextLink from the previous successful call to the ListAllBySubscriptionNext
|
||||
* method.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
private _listAllBySubscriptionNextNext(
|
||||
nextLink: string,
|
||||
options?: SubscriptionFeatureRegistrationsListAllBySubscriptionNextNextOptionalParams
|
||||
): Promise<
|
||||
SubscriptionFeatureRegistrationsListAllBySubscriptionNextNextResponse
|
||||
> {
|
||||
return this.client.sendOperationRequest(
|
||||
{ nextLink, options },
|
||||
listAllBySubscriptionNextNextOperationSpec
|
||||
);
|
||||
}
|
||||
}
|
||||
// Operation Specifications
|
||||
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
||||
|
||||
const getOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/providers/Microsoft.Features/featureProviders/{providerNamespace}/subscriptionFeatureRegistrations/{featureName}",
|
||||
httpMethod: "GET",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.SubscriptionFeatureRegistration
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.featureName,
|
||||
Parameters.providerNamespace
|
||||
],
|
||||
headerParameters: [Parameters.accept1],
|
||||
serializer
|
||||
};
|
||||
const createOrUpdateOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/providers/Microsoft.Features/featureProviders/{providerNamespace}/subscriptionFeatureRegistrations/{featureName}",
|
||||
httpMethod: "PUT",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.SubscriptionFeatureRegistration
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
requestBody: Parameters.subscriptionFeatureRegistrationType,
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.featureName,
|
||||
Parameters.providerNamespace
|
||||
],
|
||||
headerParameters: [Parameters.accept1, Parameters.contentType],
|
||||
mediaType: "json",
|
||||
serializer
|
||||
};
|
||||
const deleteOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/providers/Microsoft.Features/featureProviders/{providerNamespace}/subscriptionFeatureRegistrations/{featureName}",
|
||||
httpMethod: "DELETE",
|
||||
responses: {
|
||||
200: {},
|
||||
204: {},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.featureName,
|
||||
Parameters.providerNamespace
|
||||
],
|
||||
headerParameters: [Parameters.accept1],
|
||||
serializer
|
||||
};
|
||||
const listBySubscriptionOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/providers/Microsoft.Features/featureProviders/{providerNamespace}/subscriptionFeatureRegistrations",
|
||||
httpMethod: "GET",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.SubscriptionFeatureRegistrationList
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.providerNamespace
|
||||
],
|
||||
headerParameters: [Parameters.accept1],
|
||||
serializer
|
||||
};
|
||||
const listAllBySubscriptionOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/providers/Microsoft.Features/subscriptionFeatureRegistrations",
|
||||
httpMethod: "GET",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.SubscriptionFeatureRegistrationList
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [Parameters.$host, Parameters.subscriptionId],
|
||||
headerParameters: [Parameters.accept1],
|
||||
serializer
|
||||
};
|
||||
const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = {
|
||||
path: "{nextLink}",
|
||||
httpMethod: "GET",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.SubscriptionFeatureRegistrationList
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.nextLink,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.providerNamespace
|
||||
],
|
||||
headerParameters: [Parameters.accept1],
|
||||
serializer
|
||||
};
|
||||
const listAllBySubscriptionNextOperationSpec: coreClient.OperationSpec = {
|
||||
path: "{nextLink}",
|
||||
httpMethod: "GET",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.SubscriptionFeatureRegistrationList
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.nextLink,
|
||||
Parameters.subscriptionId
|
||||
],
|
||||
headerParameters: [Parameters.accept1],
|
||||
serializer
|
||||
};
|
||||
const listBySubscriptionNextNextOperationSpec: coreClient.OperationSpec = {
|
||||
path: "{nextLink}",
|
||||
httpMethod: "GET",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.SubscriptionFeatureRegistrationList
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.nextLink,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.providerNamespace
|
||||
],
|
||||
headerParameters: [Parameters.accept1],
|
||||
serializer
|
||||
};
|
||||
const listAllBySubscriptionNextNextOperationSpec: coreClient.OperationSpec = {
|
||||
path: "{nextLink}",
|
||||
httpMethod: "GET",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.SubscriptionFeatureRegistrationList
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.nextLink,
|
||||
Parameters.subscriptionId
|
||||
],
|
||||
headerParameters: [Parameters.accept1],
|
||||
serializer
|
||||
};
|
|
@ -0,0 +1,98 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
import "@azure/core-paging";
|
||||
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
||||
import {
|
||||
FeatureResult,
|
||||
FeaturesListAllNextOptionalParams,
|
||||
FeaturesListAllOptionalParams,
|
||||
FeaturesListNextOptionalParams,
|
||||
FeaturesListOptionalParams,
|
||||
FeaturesGetOptionalParams,
|
||||
FeaturesGetResponse,
|
||||
FeaturesRegisterOptionalParams,
|
||||
FeaturesRegisterResponse,
|
||||
FeaturesUnregisterOptionalParams,
|
||||
FeaturesUnregisterResponse
|
||||
} from "../models";
|
||||
|
||||
/// <reference lib="esnext.asynciterable" />
|
||||
/** Interface representing a Features. */
|
||||
export interface Features {
|
||||
/**
|
||||
* Gets all the preview features that are available through AFEC for the subscription.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
listAll(
|
||||
options?: FeaturesListAllOptionalParams
|
||||
): PagedAsyncIterableIterator<FeatureResult>;
|
||||
/**
|
||||
* Gets all the preview features in a provider namespace that are available through AFEC for the
|
||||
* subscription.
|
||||
* @param resourceProviderNamespace The namespace of the resource provider for getting features.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
list(
|
||||
resourceProviderNamespace: string,
|
||||
options?: FeaturesListOptionalParams
|
||||
): PagedAsyncIterableIterator<FeatureResult>;
|
||||
/**
|
||||
* ListAllNext
|
||||
* @param nextLink The nextLink from the previous successful call to the ListAll method.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
listAllNext(
|
||||
nextLink: string,
|
||||
options?: FeaturesListAllNextOptionalParams
|
||||
): PagedAsyncIterableIterator<FeatureResult>;
|
||||
/**
|
||||
* ListNext
|
||||
* @param resourceProviderNamespace The namespace of the resource provider for getting features.
|
||||
* @param nextLink The nextLink from the previous successful call to the List method.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
listNext(
|
||||
resourceProviderNamespace: string,
|
||||
nextLink: string,
|
||||
options?: FeaturesListNextOptionalParams
|
||||
): PagedAsyncIterableIterator<FeatureResult>;
|
||||
/**
|
||||
* Gets the preview feature with the specified name.
|
||||
* @param resourceProviderNamespace The resource provider namespace for the feature.
|
||||
* @param featureName The name of the feature to get.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
get(
|
||||
resourceProviderNamespace: string,
|
||||
featureName: string,
|
||||
options?: FeaturesGetOptionalParams
|
||||
): Promise<FeaturesGetResponse>;
|
||||
/**
|
||||
* Registers the preview feature for the subscription.
|
||||
* @param resourceProviderNamespace The namespace of the resource provider.
|
||||
* @param featureName The name of the feature to register.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
register(
|
||||
resourceProviderNamespace: string,
|
||||
featureName: string,
|
||||
options?: FeaturesRegisterOptionalParams
|
||||
): Promise<FeaturesRegisterResponse>;
|
||||
/**
|
||||
* Unregisters the preview feature for the subscription.
|
||||
* @param resourceProviderNamespace The namespace of the resource provider.
|
||||
* @param featureName The name of the feature to unregister.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
unregister(
|
||||
resourceProviderNamespace: string,
|
||||
featureName: string,
|
||||
options?: FeaturesUnregisterOptionalParams
|
||||
): Promise<FeaturesUnregisterResponse>;
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
export * from "./features";
|
||||
export * from "./subscriptionFeatureRegistrations";
|
|
@ -0,0 +1,86 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
import "@azure/core-paging";
|
||||
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
||||
import {
|
||||
SubscriptionFeatureRegistration,
|
||||
SubscriptionFeatureRegistrationsListBySubscriptionNextOptionalParams,
|
||||
SubscriptionFeatureRegistrationsListBySubscriptionOptionalParams,
|
||||
SubscriptionFeatureRegistrationsListAllBySubscriptionNextOptionalParams,
|
||||
SubscriptionFeatureRegistrationsListAllBySubscriptionOptionalParams,
|
||||
SubscriptionFeatureRegistrationsGetOptionalParams,
|
||||
SubscriptionFeatureRegistrationsGetResponse,
|
||||
SubscriptionFeatureRegistrationsCreateOrUpdateOptionalParams,
|
||||
SubscriptionFeatureRegistrationsCreateOrUpdateResponse,
|
||||
SubscriptionFeatureRegistrationsDeleteOptionalParams
|
||||
} from "../models";
|
||||
|
||||
/// <reference lib="esnext.asynciterable" />
|
||||
/** Interface representing a SubscriptionFeatureRegistrations. */
|
||||
export interface SubscriptionFeatureRegistrations {
|
||||
/**
|
||||
* Returns subscription feature registrations for given subscription and provider namespace.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
listBySubscription(
|
||||
options?: SubscriptionFeatureRegistrationsListBySubscriptionOptionalParams
|
||||
): PagedAsyncIterableIterator<SubscriptionFeatureRegistration>;
|
||||
/**
|
||||
* Returns subscription feature registrations for given subscription.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
listAllBySubscription(
|
||||
options?: SubscriptionFeatureRegistrationsListAllBySubscriptionOptionalParams
|
||||
): PagedAsyncIterableIterator<SubscriptionFeatureRegistration>;
|
||||
/**
|
||||
* ListBySubscriptionNext
|
||||
* @param nextLink The nextLink from the previous successful call to the ListBySubscription method.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
listBySubscriptionNext(
|
||||
nextLink: string,
|
||||
options?: SubscriptionFeatureRegistrationsListBySubscriptionNextOptionalParams
|
||||
): PagedAsyncIterableIterator<SubscriptionFeatureRegistration>;
|
||||
/**
|
||||
* ListAllBySubscriptionNext
|
||||
* @param nextLink The nextLink from the previous successful call to the ListAllBySubscription method.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
listAllBySubscriptionNext(
|
||||
nextLink: string,
|
||||
options?: SubscriptionFeatureRegistrationsListAllBySubscriptionNextOptionalParams
|
||||
): PagedAsyncIterableIterator<SubscriptionFeatureRegistration>;
|
||||
/**
|
||||
* Returns a feature registration
|
||||
* @param featureName The feature name.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
get(
|
||||
featureName: string,
|
||||
options?: SubscriptionFeatureRegistrationsGetOptionalParams
|
||||
): Promise<SubscriptionFeatureRegistrationsGetResponse>;
|
||||
/**
|
||||
* Create or update a feature registration.
|
||||
* @param featureName The feature name.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
createOrUpdate(
|
||||
featureName: string,
|
||||
options?: SubscriptionFeatureRegistrationsCreateOrUpdateOptionalParams
|
||||
): Promise<SubscriptionFeatureRegistrationsCreateOrUpdateResponse>;
|
||||
/**
|
||||
* Deletes a feature registration
|
||||
* @param featureName The feature name.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
delete(
|
||||
featureName: string,
|
||||
options?: SubscriptionFeatureRegistrationsDeleteOptionalParams
|
||||
): Promise<void>;
|
||||
}
|
|
@ -3,13 +3,14 @@
|
|||
"module": "es6",
|
||||
"moduleResolution": "node",
|
||||
"strict": true,
|
||||
"target": "es5",
|
||||
"target": "es6",
|
||||
"sourceMap": true,
|
||||
"declarationMap": true,
|
||||
"esModuleInterop": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"lib": ["es6"],
|
||||
"preserveConstEnums": true,
|
||||
"lib": ["es6", "dom"],
|
||||
"declaration": true,
|
||||
"outDir": "./esm",
|
||||
"importHelpers": true
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
trigger:
|
||||
branches:
|
||||
include:
|
||||
- main
|
||||
- release/*
|
||||
- hotfix/*
|
||||
paths:
|
||||
include:
|
||||
- sdk/features/
|
||||
|
||||
pr:
|
||||
branches:
|
||||
include:
|
||||
- main
|
||||
- release/*
|
||||
- hotfix/*
|
||||
paths:
|
||||
include:
|
||||
- sdk/features/
|
||||
|
||||
extends:
|
||||
template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml
|
||||
parameters:
|
||||
ServiceDirectory: features
|
||||
Artifacts:
|
||||
- name: azure-arm-features
|
||||
safeName: azurearmfeatures
|
||||
|
Загрузка…
Ссылка в новой задаче