eventhub-track2 (#17486)
This commit is contained in:
Родитель
3a21acf826
Коммит
a4eb25d874
|
@ -10,6 +10,7 @@ dependencies:
|
|||
'@rush-temp/arm-appservice': file:projects/arm-appservice.tgz
|
||||
'@rush-temp/arm-authorization': file:projects/arm-authorization.tgz
|
||||
'@rush-temp/arm-compute': file:projects/arm-compute.tgz
|
||||
'@rush-temp/arm-eventhub': file:projects/arm-eventhub.tgz
|
||||
'@rush-temp/arm-features': file:projects/arm-features.tgz
|
||||
'@rush-temp/arm-keyvault': file:projects/arm-keyvault.tgz
|
||||
'@rush-temp/arm-links': file:projects/arm-links.tgz
|
||||
|
@ -8543,6 +8544,25 @@ packages:
|
|||
integrity: sha512-T3UFCbTMY/dds1j8CFcJLUkkyV3oR9pnPcpbK3DvLauxAZGylmQbuZv36iTLpGpMO0cxKIdgGm1G6EdgfgMOPw==
|
||||
tarball: file:projects/arm-compute.tgz
|
||||
version: 0.0.0
|
||||
file:projects/arm-eventhub.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-sourcemaps: 0.4.2_rollup@1.32.1
|
||||
tslib: 2.3.1
|
||||
typescript: 4.2.4
|
||||
uglify-js: 3.14.1
|
||||
dev: false
|
||||
name: '@rush-temp/arm-eventhub'
|
||||
resolution:
|
||||
integrity: sha512-prxNN24vp5ndwaqivPOFLkNF0Id6m0zm5YL0Azqgv6PoZzThFLxEkgaWtsUxFQicLGqXWB7XomzA0EUyPHyDbQ==
|
||||
tarball: file:projects/arm-eventhub.tgz
|
||||
version: 0.0.0
|
||||
file:projects/arm-features.tgz:
|
||||
dependencies:
|
||||
'@microsoft/api-extractor': 7.7.11
|
||||
|
@ -12655,6 +12675,7 @@ specifiers:
|
|||
'@rush-temp/arm-appservice': file:./projects/arm-appservice.tgz
|
||||
'@rush-temp/arm-authorization': file:./projects/arm-authorization.tgz
|
||||
'@rush-temp/arm-compute': file:./projects/arm-compute.tgz
|
||||
'@rush-temp/arm-eventhub': file:./projects/arm-eventhub.tgz
|
||||
'@rush-temp/arm-features': file:./projects/arm-features.tgz
|
||||
'@rush-temp/arm-keyvault': file:./projects/arm-keyvault.tgz
|
||||
'@rush-temp/arm-links': file:./projects/arm-links.tgz
|
||||
|
|
|
@ -905,6 +905,11 @@
|
|||
"packageName": "@azure/arm-authorization",
|
||||
"projectFolder": "sdk/authorization/arm-authorization",
|
||||
"versionPolicyName": "management"
|
||||
},
|
||||
{
|
||||
"packageName": "@azure/arm-eventhub",
|
||||
"projectFolder": "sdk/eventhub/arm-eventhub",
|
||||
"versionPolicyName": "management"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
## 30.0.0-beta.1 (2021-09-07)
|
||||
|
||||
This is the first preview for the new version of the `@azure/arm-eventhub` 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 Lro related object returned by methods whose names started with `begin`, now uses `pollUntilDone` to check whether the request is finished, instead of `pollUntilFinished`. To get the final result, 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,93 @@
|
|||
## Azure EventHubManagementClient SDK for JavaScript
|
||||
# Azure EventHubManagement client library for JavaScript
|
||||
|
||||
This package contains an isomorphic SDK (runs both in Node.js and in browsers) for EventHubManagementClient.
|
||||
This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure EventHubManagement client.
|
||||
|
||||
Azure Event Hubs client for managing Event Hubs Cluster, IPFilter Rules and VirtualNetworkRules resources.
|
||||
|
||||
[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/eventhub/arm-eventhub) |
|
||||
[Package (NPM)](https://www.npmjs.com/package/@azure/arm-eventhub) |
|
||||
[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-eventhub) |
|
||||
[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-eventhub` package
|
||||
|
||||
To use this SDK in your project, you will need to install two packages.
|
||||
- `@azure/arm-eventhub` that contains the client.
|
||||
- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory.
|
||||
Install the Azure EventHubManagement client library for JavaScript with `npm`:
|
||||
|
||||
Install both packages using the below command:
|
||||
```bash
|
||||
npm install --save @azure/arm-eventhub @azure/identity
|
||||
npm install @azure/arm-eventhub
|
||||
```
|
||||
|
||||
> **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 `EventHubManagementClient`
|
||||
|
||||
### How to use
|
||||
To create a client object to access the Azure EventHubManagement API, you will need the `endpoint` of your Azure EventHubManagement resource and a `credential`. The Azure EventHubManagement client can use Azure Active Directory credentials to authenticate.
|
||||
You can find the endpoint for your Azure EventHubManagement 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 list operations 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 EventHubManagement** 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`.
|
||||
|
||||
For more information about how to create an Azure AD Application check out [this guide](https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal).
|
||||
```javascript
|
||||
const { EventHubManagementClient } = require("@azure/arm-eventhub");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const client = new EventHubManagementClient(new DefaultAzureCredential(), subscriptionId);
|
||||
```
|
||||
|
||||
## Key concepts
|
||||
|
||||
### EventHubManagementClient
|
||||
|
||||
`EventHubManagementClient` is the primary interface for developers using the Azure EventHubManagement client library. Explore the methods on this client object to understand the different features of the Azure EventHubManagement service that you can access.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### 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
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
const { EventHubManagementClient } = require("@azure/arm-eventhub");
|
||||
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 EventHubManagementClient(creds, subscriptionId);
|
||||
|
||||
client.operations.list().then((result) => {
|
||||
console.log("The result is:");
|
||||
console.log(result);
|
||||
}).catch((err) => {
|
||||
console.log("An error occurred:");
|
||||
console.error(err);
|
||||
});
|
||||
const { setLogLevel } = require("@azure/logger");
|
||||
setLogLevel("info");
|
||||
```
|
||||
|
||||
#### browser - Authentication, client creation, and list operations as an example written in JavaScript.
|
||||
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/main/sdk/core/logger).
|
||||
|
||||
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.
|
||||
## Next steps
|
||||
|
||||
##### Sample code
|
||||
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.
|
||||
|
||||
- index.html
|
||||
## Contributing
|
||||
|
||||
```html
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>@azure/arm-eventhub 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-eventhub/dist/arm-eventhub.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.ArmEventhub.EventHubManagementClient(creds, subscriptionId);
|
||||
client.operations.list().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>
|
||||
```
|
||||
If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/main/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\eventhub\arm-eventhub\/README.png)
|
||||
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Feventhub%2Farm-eventhub%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/main/sdk/identity/identity
|
||||
[defaultazurecredential]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#defaultazurecredential
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"commit": "5d09c12c024fa7efbaca6a95b9741a46a886fe6f",
|
||||
"readme": "specification/eventhub/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=D:\\mydev\\azure-sdk-for-js ../azure-rest-api-specs/specification/eventhub/resource-manager/readme.md --use=@autorest/typescript@6.0.0-beta.12",
|
||||
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
|
||||
"use": "@autorest/typescript@6.0.0-beta.12"
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
|
||||
"mainEntryPointFilePath": "./dist-esm/index.d.ts",
|
||||
"docModel": { "enabled": true },
|
||||
"apiReport": { "enabled": true, "reportFolder": "./review" },
|
||||
"dtsRollup": {
|
||||
"enabled": true,
|
||||
"untrimmedFilePath": "",
|
||||
"publicTrimmedFilePath": "./types/arm-eventhub.d.ts"
|
||||
},
|
||||
"messages": {
|
||||
"tsdocMessageReporting": { "default": { "logLevel": "none" } },
|
||||
"extractorMessageReporting": {
|
||||
"ae-missing-release-tag": { "logLevel": "none" },
|
||||
"ae-unresolved-link": { "logLevel": "none" }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,58 +1,87 @@
|
|||
{
|
||||
"name": "@azure/arm-eventhub",
|
||||
"sdk-type": "mgmt",
|
||||
"author": "Microsoft Corporation",
|
||||
"description": "EventHubManagementClient Library with typescript type definitions for node.js and browser.",
|
||||
"version": "3.3.0",
|
||||
"description": "A generated SDK for EventHubManagementClient.",
|
||||
"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-lro": "^2.2.0",
|
||||
"@azure/abort-controller": "^1.0.0",
|
||||
"@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",
|
||||
"azure",
|
||||
"typescript",
|
||||
"browser",
|
||||
"isomorphic"
|
||||
],
|
||||
"keywords": ["node", "azure", "typescript", "browser", "isomorphic"],
|
||||
"license": "MIT",
|
||||
"main": "./dist/arm-eventhub.js",
|
||||
"module": "./esm/eventHubManagementClient.js",
|
||||
"types": "./esm/eventHubManagementClient.d.ts",
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist-esm/index.js",
|
||||
"types": "./types/arm-eventhub.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",
|
||||
"typescript": "~4.2.0",
|
||||
"uglify-js": "^3.4.9"
|
||||
},
|
||||
"homepage": "https://github.com/azure/azure-sdk-for-js/tree/main/sdk/eventhub/arm-eventhub",
|
||||
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/eventhub/arm-eventhub",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/azure/azure-sdk-for-js.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/azure/azure-sdk-for-js/issues"
|
||||
"url": "https://github.com/Azure/azure-sdk-for-js.git"
|
||||
},
|
||||
"bugs": { "url": "https://github.com/Azure/azure-sdk-for-js/issues" },
|
||||
"files": [
|
||||
"dist/**/*.js",
|
||||
"dist/**/*.js.map",
|
||||
"dist/**/*.d.ts",
|
||||
"dist/**/*.d.ts.map",
|
||||
"esm/**/*.js",
|
||||
"esm/**/*.js.map",
|
||||
"esm/**/*.d.ts",
|
||||
"esm/**/*.d.ts.map",
|
||||
"dist-esm/**/*.js",
|
||||
"dist-esm/**/*.js.map",
|
||||
"dist-esm/**/*.d.ts",
|
||||
"dist-esm/**/*.d.ts.map",
|
||||
"src/**/*.ts",
|
||||
"README.md",
|
||||
"LICENSE",
|
||||
"rollup.config.js",
|
||||
"tsconfig.json"
|
||||
"tsconfig.json",
|
||||
"review/*",
|
||||
"CHANGELOG.md",
|
||||
"types/*"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "tsc && rollup -c rollup.config.js && npm run minify",
|
||||
"minify": "uglifyjs -c -m --comments --source-map \"content='./dist/arm-eventhub.js.map'\" -o ./dist/arm-eventhub.min.js ./dist/arm-eventhub.js",
|
||||
"prepack": "npm install && npm run build"
|
||||
"build": "tsc && rollup -c 2>&1 && 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": "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
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -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/eventHubManagementClient.js",
|
||||
external: [
|
||||
"@azure/ms-rest-js",
|
||||
"@azure/ms-rest-azure-js"
|
||||
],
|
||||
output: {
|
||||
file: "./dist/arm-eventhub.js",
|
||||
format: "umd",
|
||||
name: "Azure.ArmEventhub",
|
||||
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,59 +1,73 @@
|
|||
/*
|
||||
* 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 operations from "./operations";
|
||||
import * as coreAuth from "@azure/core-auth";
|
||||
import {
|
||||
ClustersImpl,
|
||||
NamespacesImpl,
|
||||
PrivateEndpointConnectionsImpl,
|
||||
PrivateLinkResourcesImpl,
|
||||
ConfigurationImpl,
|
||||
DisasterRecoveryConfigsImpl,
|
||||
EventHubsImpl,
|
||||
ConsumerGroupsImpl,
|
||||
OperationsImpl,
|
||||
RegionsImpl
|
||||
} from "./operations";
|
||||
import {
|
||||
Clusters,
|
||||
Namespaces,
|
||||
PrivateEndpointConnections,
|
||||
PrivateLinkResources,
|
||||
Configuration,
|
||||
DisasterRecoveryConfigs,
|
||||
EventHubs,
|
||||
ConsumerGroups,
|
||||
Operations,
|
||||
Regions
|
||||
} from "./operationsInterfaces";
|
||||
import { EventHubManagementClientContext } from "./eventHubManagementClientContext";
|
||||
import { EventHubManagementClientOptionalParams } from "./models";
|
||||
|
||||
|
||||
class EventHubManagementClient extends EventHubManagementClientContext {
|
||||
// Operation groups
|
||||
operations: operations.Operations;
|
||||
namespaces: operations.Namespaces;
|
||||
disasterRecoveryConfigs: operations.DisasterRecoveryConfigs;
|
||||
eventHubs: operations.EventHubs;
|
||||
consumerGroups: operations.ConsumerGroups;
|
||||
regions: operations.Regions;
|
||||
|
||||
export class EventHubManagementClient extends EventHubManagementClientContext {
|
||||
/**
|
||||
* Initializes a new instance of the EventHubManagementClient 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 credentials Subscription credentials which uniquely identify client subscription.
|
||||
* @param subscriptionId Subscription credentials that uniquely identify a Microsoft Azure
|
||||
* subscription. The subscription ID forms part of the URI for every service call.
|
||||
* @param [options] The parameter options
|
||||
* subscription. The subscription ID forms part of the URI for every service call.
|
||||
* @param options The parameter options
|
||||
*/
|
||||
constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.EventHubManagementClientOptions) {
|
||||
constructor(
|
||||
credentials: coreAuth.TokenCredential,
|
||||
subscriptionId: string,
|
||||
options?: EventHubManagementClientOptionalParams
|
||||
) {
|
||||
super(credentials, subscriptionId, options);
|
||||
this.operations = new operations.Operations(this);
|
||||
this.namespaces = new operations.Namespaces(this);
|
||||
this.disasterRecoveryConfigs = new operations.DisasterRecoveryConfigs(this);
|
||||
this.eventHubs = new operations.EventHubs(this);
|
||||
this.consumerGroups = new operations.ConsumerGroups(this);
|
||||
this.regions = new operations.Regions(this);
|
||||
this.clusters = new ClustersImpl(this);
|
||||
this.namespaces = new NamespacesImpl(this);
|
||||
this.privateEndpointConnections = new PrivateEndpointConnectionsImpl(this);
|
||||
this.privateLinkResources = new PrivateLinkResourcesImpl(this);
|
||||
this.configuration = new ConfigurationImpl(this);
|
||||
this.disasterRecoveryConfigs = new DisasterRecoveryConfigsImpl(this);
|
||||
this.eventHubs = new EventHubsImpl(this);
|
||||
this.consumerGroups = new ConsumerGroupsImpl(this);
|
||||
this.operations = new OperationsImpl(this);
|
||||
this.regions = new RegionsImpl(this);
|
||||
}
|
||||
|
||||
clusters: Clusters;
|
||||
namespaces: Namespaces;
|
||||
privateEndpointConnections: PrivateEndpointConnections;
|
||||
privateLinkResources: PrivateLinkResources;
|
||||
configuration: Configuration;
|
||||
disasterRecoveryConfigs: DisasterRecoveryConfigs;
|
||||
eventHubs: EventHubs;
|
||||
consumerGroups: ConsumerGroups;
|
||||
operations: Operations;
|
||||
regions: Regions;
|
||||
}
|
||||
|
||||
// Operation Specifications
|
||||
|
||||
export {
|
||||
EventHubManagementClient,
|
||||
EventHubManagementClientContext,
|
||||
Models as EventHubManagementModels,
|
||||
Mappers as EventHubManagementMappers
|
||||
};
|
||||
export * from "./operations";
|
||||
|
|
|
@ -1,69 +1,71 @@
|
|||
/*
|
||||
* 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 { EventHubManagementClientOptionalParams } from "./models";
|
||||
|
||||
const packageName = "@azure/arm-eventhub";
|
||||
const packageVersion = "3.3.0";
|
||||
|
||||
export class EventHubManagementClientContext extends msRestAzure.AzureServiceClient {
|
||||
credentials: msRest.ServiceClientCredentials | TokenCredential;
|
||||
export class EventHubManagementClientContext extends coreClient.ServiceClient {
|
||||
$host: string;
|
||||
subscriptionId: string;
|
||||
apiVersion?: string;
|
||||
apiVersion: string;
|
||||
|
||||
/**
|
||||
* Initializes a new instance of the EventHubManagementClient 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.
|
||||
* Initializes a new instance of the EventHubManagementClientContext class.
|
||||
* @param credentials Subscription credentials which uniquely identify client subscription.
|
||||
* @param subscriptionId Subscription credentials that uniquely identify a Microsoft Azure
|
||||
* subscription. The subscription ID forms part of the URI for every service call.
|
||||
* @param [options] The parameter options
|
||||
* subscription. The subscription ID forms part of the URI for every service call.
|
||||
* @param options The parameter options
|
||||
*/
|
||||
constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.EventHubManagementClientOptions) {
|
||||
if (credentials == undefined) {
|
||||
throw new Error('\'credentials\' cannot be null.');
|
||||
constructor(
|
||||
credentials: coreAuth.TokenCredential,
|
||||
subscriptionId: string,
|
||||
options?: EventHubManagementClientOptionalParams
|
||||
) {
|
||||
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");
|
||||
}
|
||||
|
||||
// Initializing default values for options
|
||||
if (!options) {
|
||||
options = {};
|
||||
}
|
||||
if(!options.userAgent) {
|
||||
const defaultUserAgent = msRestAzure.getDefaultUserAgentValue();
|
||||
options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`;
|
||||
const defaults: EventHubManagementClientOptionalParams = {
|
||||
requestContentType: "application/json; charset=utf-8",
|
||||
credential: credentials
|
||||
};
|
||||
|
||||
const packageDetails = `azsdk-js-arm-eventhub/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 = '2017-04-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;
|
||||
|
||||
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 || "2018-01-01-preview";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 { EventHubManagementClient } from "./eventHubManagementClient";
|
||||
export { EventHubManagementClientContext } from "./eventHubManagementClientContext";
|
||||
export * from "./operationsInterfaces";
|
|
@ -0,0 +1,34 @@
|
|||
/*
|
||||
* 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 { LongRunningOperation, LroResponse } from "@azure/core-lro";
|
||||
|
||||
export class LroImpl<T> implements LongRunningOperation<T> {
|
||||
constructor(
|
||||
private sendOperationFn: (args: any, spec: any) => Promise<LroResponse<T>>,
|
||||
private args: Record<string, unknown>,
|
||||
private spec: {
|
||||
readonly requestBody?: unknown;
|
||||
readonly path?: string;
|
||||
readonly httpMethod: string;
|
||||
} & Record<string, any>,
|
||||
public requestPath: string = spec.path!,
|
||||
public requestMethod: string = spec.httpMethod
|
||||
) {}
|
||||
public async sendInitialRequest(): Promise<LroResponse<T>> {
|
||||
return this.sendOperationFn(this.args, this.spec);
|
||||
}
|
||||
public async sendPollRequest(path: string): Promise<LroResponse<T>> {
|
||||
const { requestBody, ...restSpec } = this.spec;
|
||||
return this.sendOperationFn(this.args, {
|
||||
...restSpec,
|
||||
path,
|
||||
httpMethod: "GET"
|
||||
});
|
||||
}
|
||||
}
|
|
@ -1,30 +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 {
|
||||
ArmDisasterRecovery,
|
||||
AuthorizationRule,
|
||||
BaseResource,
|
||||
CaptureDescription,
|
||||
ConsumerGroup,
|
||||
ConsumerGroupListResult,
|
||||
Destination,
|
||||
EHNamespace,
|
||||
ErrorResponse,
|
||||
Eventhub,
|
||||
MessagingPlan,
|
||||
MessagingRegions,
|
||||
MessagingRegionsProperties,
|
||||
NetworkRuleSet,
|
||||
NWRuleSetIpRules,
|
||||
NWRuleSetVirtualNetworkRules,
|
||||
Resource,
|
||||
Sku,
|
||||
Subnet,
|
||||
TrackedResource
|
||||
} from "../models/mappers";
|
|
@ -1,34 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
export {
|
||||
AccessKeys,
|
||||
ArmDisasterRecovery,
|
||||
ArmDisasterRecoveryListResult,
|
||||
AuthorizationRule,
|
||||
AuthorizationRuleListResult,
|
||||
BaseResource,
|
||||
CaptureDescription,
|
||||
CheckNameAvailabilityParameter,
|
||||
CheckNameAvailabilityResult,
|
||||
ConsumerGroup,
|
||||
Destination,
|
||||
EHNamespace,
|
||||
ErrorResponse,
|
||||
Eventhub,
|
||||
MessagingPlan,
|
||||
MessagingRegions,
|
||||
MessagingRegionsProperties,
|
||||
NetworkRuleSet,
|
||||
NWRuleSetIpRules,
|
||||
NWRuleSetVirtualNetworkRules,
|
||||
Resource,
|
||||
Sku,
|
||||
Subnet,
|
||||
TrackedResource
|
||||
} from "../models/mappers";
|
|
@ -1,33 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
export {
|
||||
AccessKeys,
|
||||
ArmDisasterRecovery,
|
||||
AuthorizationRule,
|
||||
AuthorizationRuleListResult,
|
||||
BaseResource,
|
||||
CaptureDescription,
|
||||
ConsumerGroup,
|
||||
Destination,
|
||||
EHNamespace,
|
||||
ErrorResponse,
|
||||
Eventhub,
|
||||
EventHubListResult,
|
||||
MessagingPlan,
|
||||
MessagingRegions,
|
||||
MessagingRegionsProperties,
|
||||
NetworkRuleSet,
|
||||
NWRuleSetIpRules,
|
||||
NWRuleSetVirtualNetworkRules,
|
||||
RegenerateAccessKeyParameters,
|
||||
Resource,
|
||||
Sku,
|
||||
Subnet,
|
||||
TrackedResource
|
||||
} from "../models/mappers";
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -1,35 +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 {
|
||||
AccessKeys,
|
||||
ArmDisasterRecovery,
|
||||
AuthorizationRule,
|
||||
AuthorizationRuleListResult,
|
||||
BaseResource,
|
||||
CaptureDescription,
|
||||
CheckNameAvailabilityParameter,
|
||||
CheckNameAvailabilityResult,
|
||||
ConsumerGroup,
|
||||
Destination,
|
||||
EHNamespace,
|
||||
EHNamespaceListResult,
|
||||
ErrorResponse,
|
||||
Eventhub,
|
||||
MessagingPlan,
|
||||
MessagingRegions,
|
||||
MessagingRegionsProperties,
|
||||
NetworkRuleSet,
|
||||
NWRuleSetIpRules,
|
||||
NWRuleSetVirtualNetworkRules,
|
||||
RegenerateAccessKeyParameters,
|
||||
Resource,
|
||||
Sku,
|
||||
Subnet,
|
||||
TrackedResource
|
||||
} from "../models/mappers";
|
|
@ -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 {
|
||||
ErrorResponse,
|
||||
Operation,
|
||||
OperationDisplay,
|
||||
OperationListResult
|
||||
} from "../models/mappers";
|
|
@ -1,181 +1,350 @@
|
|||
/*
|
||||
* 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 {
|
||||
Cluster as ClusterMapper,
|
||||
IpFilterRule as IpFilterRuleMapper,
|
||||
EHNamespace as EHNamespaceMapper,
|
||||
VirtualNetworkRule as VirtualNetworkRuleMapper,
|
||||
NetworkRuleSet as NetworkRuleSetMapper,
|
||||
AuthorizationRule as AuthorizationRuleMapper,
|
||||
RegenerateAccessKeyParameters as RegenerateAccessKeyParametersMapper,
|
||||
CheckNameAvailabilityParameter as CheckNameAvailabilityParameterMapper,
|
||||
PrivateEndpointConnection as PrivateEndpointConnectionMapper,
|
||||
ClusterQuotaConfigurationProperties as ClusterQuotaConfigurationPropertiesMapper,
|
||||
ArmDisasterRecovery as ArmDisasterRecoveryMapper,
|
||||
Eventhub as EventhubMapper,
|
||||
ConsumerGroup as ConsumerGroupMapper
|
||||
} 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",
|
||||
isConstant: true,
|
||||
serializedName: "Accept",
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
};
|
||||
export const alias: msRest.OperationURLParameter = {
|
||||
parameterPath: "alias",
|
||||
|
||||
export const $host: OperationURLParameter = {
|
||||
parameterPath: "$host",
|
||||
mapper: {
|
||||
serializedName: "$host",
|
||||
required: true,
|
||||
serializedName: "alias",
|
||||
constraints: {
|
||||
MaxLength: 50,
|
||||
MinLength: 1
|
||||
},
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
};
|
||||
export const apiVersion: msRest.OperationQueryParameter = {
|
||||
parameterPath: "apiVersion",
|
||||
mapper: {
|
||||
required: true,
|
||||
serializedName: "api-version",
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
};
|
||||
export const authorizationRuleName: msRest.OperationURLParameter = {
|
||||
parameterPath: "authorizationRuleName",
|
||||
mapper: {
|
||||
required: true,
|
||||
serializedName: "authorizationRuleName",
|
||||
constraints: {
|
||||
MinLength: 1
|
||||
},
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
};
|
||||
export const consumerGroupName: msRest.OperationURLParameter = {
|
||||
parameterPath: "consumerGroupName",
|
||||
mapper: {
|
||||
required: true,
|
||||
serializedName: "consumerGroupName",
|
||||
constraints: {
|
||||
MaxLength: 50,
|
||||
MinLength: 1
|
||||
},
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
};
|
||||
export const eventHubName: msRest.OperationURLParameter = {
|
||||
parameterPath: "eventHubName",
|
||||
mapper: {
|
||||
required: true,
|
||||
serializedName: "eventHubName",
|
||||
constraints: {
|
||||
MinLength: 1
|
||||
},
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
};
|
||||
export const namespaceName: msRest.OperationURLParameter = {
|
||||
parameterPath: "namespaceName",
|
||||
mapper: {
|
||||
required: true,
|
||||
serializedName: "namespaceName",
|
||||
constraints: {
|
||||
MaxLength: 50,
|
||||
MinLength: 6
|
||||
},
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
};
|
||||
export const nextPageLink: msRest.OperationURLParameter = {
|
||||
parameterPath: "nextPageLink",
|
||||
mapper: {
|
||||
required: true,
|
||||
serializedName: "nextLink",
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
},
|
||||
skipEncoding: true
|
||||
};
|
||||
export const resourceGroupName: msRest.OperationURLParameter = {
|
||||
|
||||
export const subscriptionId: OperationURLParameter = {
|
||||
parameterPath: "subscriptionId",
|
||||
mapper: {
|
||||
serializedName: "subscriptionId",
|
||||
required: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const apiVersion: OperationQueryParameter = {
|
||||
parameterPath: "apiVersion",
|
||||
mapper: {
|
||||
defaultValue: "2018-01-01-preview",
|
||||
isConstant: true,
|
||||
serializedName: "api-version",
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const resourceGroupName: OperationURLParameter = {
|
||||
parameterPath: "resourceGroupName",
|
||||
mapper: {
|
||||
required: true,
|
||||
serializedName: "resourceGroupName",
|
||||
constraints: {
|
||||
MaxLength: 90,
|
||||
MinLength: 1
|
||||
},
|
||||
serializedName: "resourceGroupName",
|
||||
required: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
};
|
||||
export const skip: msRest.OperationQueryParameter = {
|
||||
parameterPath: [
|
||||
"options",
|
||||
"skip"
|
||||
],
|
||||
|
||||
export const clusterName: OperationURLParameter = {
|
||||
parameterPath: "clusterName",
|
||||
mapper: {
|
||||
serializedName: "$skip",
|
||||
constraints: {
|
||||
InclusiveMaximum: 1000,
|
||||
InclusiveMinimum: 0
|
||||
MaxLength: 50,
|
||||
MinLength: 6
|
||||
},
|
||||
serializedName: "clusterName",
|
||||
required: true,
|
||||
type: {
|
||||
name: "Number"
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
};
|
||||
export const sku: msRest.OperationURLParameter = {
|
||||
parameterPath: "sku",
|
||||
|
||||
export const contentType: OperationParameter = {
|
||||
parameterPath: ["options", "contentType"],
|
||||
mapper: {
|
||||
defaultValue: "application/json",
|
||||
isConstant: true,
|
||||
serializedName: "Content-Type",
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const parameters: OperationParameter = {
|
||||
parameterPath: "parameters",
|
||||
mapper: ClusterMapper
|
||||
};
|
||||
|
||||
export const nextLink: OperationURLParameter = {
|
||||
parameterPath: "nextLink",
|
||||
mapper: {
|
||||
serializedName: "nextLink",
|
||||
required: true,
|
||||
serializedName: "sku",
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
},
|
||||
skipEncoding: true
|
||||
};
|
||||
|
||||
export const namespaceName: OperationURLParameter = {
|
||||
parameterPath: "namespaceName",
|
||||
mapper: {
|
||||
constraints: {
|
||||
MaxLength: 50,
|
||||
MinLength: 6
|
||||
},
|
||||
serializedName: "namespaceName",
|
||||
required: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const parameters1: OperationParameter = {
|
||||
parameterPath: "parameters",
|
||||
mapper: IpFilterRuleMapper
|
||||
};
|
||||
|
||||
export const ipFilterRuleName: OperationURLParameter = {
|
||||
parameterPath: "ipFilterRuleName",
|
||||
mapper: {
|
||||
constraints: {
|
||||
MinLength: 1
|
||||
},
|
||||
serializedName: "ipFilterRuleName",
|
||||
required: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const parameters2: OperationParameter = {
|
||||
parameterPath: "parameters",
|
||||
mapper: EHNamespaceMapper
|
||||
};
|
||||
|
||||
export const parameters3: OperationParameter = {
|
||||
parameterPath: "parameters",
|
||||
mapper: VirtualNetworkRuleMapper
|
||||
};
|
||||
|
||||
export const virtualNetworkRuleName: OperationURLParameter = {
|
||||
parameterPath: "virtualNetworkRuleName",
|
||||
mapper: {
|
||||
constraints: {
|
||||
MinLength: 1
|
||||
},
|
||||
serializedName: "virtualNetworkRuleName",
|
||||
required: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const parameters4: OperationParameter = {
|
||||
parameterPath: "parameters",
|
||||
mapper: NetworkRuleSetMapper
|
||||
};
|
||||
|
||||
export const parameters5: OperationParameter = {
|
||||
parameterPath: "parameters",
|
||||
mapper: AuthorizationRuleMapper
|
||||
};
|
||||
|
||||
export const authorizationRuleName: OperationURLParameter = {
|
||||
parameterPath: "authorizationRuleName",
|
||||
mapper: {
|
||||
constraints: {
|
||||
MinLength: 1
|
||||
},
|
||||
serializedName: "authorizationRuleName",
|
||||
required: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const parameters6: OperationParameter = {
|
||||
parameterPath: "parameters",
|
||||
mapper: RegenerateAccessKeyParametersMapper
|
||||
};
|
||||
|
||||
export const parameters7: OperationParameter = {
|
||||
parameterPath: "parameters",
|
||||
mapper: CheckNameAvailabilityParameterMapper
|
||||
};
|
||||
|
||||
export const parameters8: OperationParameter = {
|
||||
parameterPath: "parameters",
|
||||
mapper: PrivateEndpointConnectionMapper
|
||||
};
|
||||
|
||||
export const privateEndpointConnectionName: OperationURLParameter = {
|
||||
parameterPath: "privateEndpointConnectionName",
|
||||
mapper: {
|
||||
serializedName: "privateEndpointConnectionName",
|
||||
required: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const parameters9: OperationParameter = {
|
||||
parameterPath: "parameters",
|
||||
mapper: ClusterQuotaConfigurationPropertiesMapper
|
||||
};
|
||||
|
||||
export const alias: OperationURLParameter = {
|
||||
parameterPath: "alias",
|
||||
mapper: {
|
||||
constraints: {
|
||||
MaxLength: 50,
|
||||
MinLength: 1
|
||||
},
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
};
|
||||
export const subscriptionId: msRest.OperationURLParameter = {
|
||||
parameterPath: "subscriptionId",
|
||||
mapper: {
|
||||
serializedName: "alias",
|
||||
required: true,
|
||||
serializedName: "subscriptionId",
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
};
|
||||
export const top: msRest.OperationQueryParameter = {
|
||||
parameterPath: [
|
||||
"options",
|
||||
"top"
|
||||
],
|
||||
|
||||
export const parameters10: OperationParameter = {
|
||||
parameterPath: "parameters",
|
||||
mapper: ArmDisasterRecoveryMapper
|
||||
};
|
||||
|
||||
export const eventHubName: OperationURLParameter = {
|
||||
parameterPath: "eventHubName",
|
||||
mapper: {
|
||||
constraints: {
|
||||
MaxLength: 256,
|
||||
MinLength: 1
|
||||
},
|
||||
serializedName: "eventHubName",
|
||||
required: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const skip: OperationQueryParameter = {
|
||||
parameterPath: ["options", "skip"],
|
||||
mapper: {
|
||||
serializedName: "$top",
|
||||
constraints: {
|
||||
InclusiveMaximum: 1000,
|
||||
InclusiveMinimum: 1
|
||||
InclusiveMinimum: 0
|
||||
},
|
||||
serializedName: "$skip",
|
||||
type: {
|
||||
name: "Number"
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const top: OperationQueryParameter = {
|
||||
parameterPath: ["options", "top"],
|
||||
mapper: {
|
||||
constraints: {
|
||||
InclusiveMaximum: 1000,
|
||||
InclusiveMinimum: 1
|
||||
},
|
||||
serializedName: "$top",
|
||||
type: {
|
||||
name: "Number"
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const parameters11: OperationParameter = {
|
||||
parameterPath: "parameters",
|
||||
mapper: EventhubMapper
|
||||
};
|
||||
|
||||
export const parameters12: OperationParameter = {
|
||||
parameterPath: "parameters",
|
||||
mapper: ConsumerGroupMapper
|
||||
};
|
||||
|
||||
export const consumerGroupName: OperationURLParameter = {
|
||||
parameterPath: "consumerGroupName",
|
||||
mapper: {
|
||||
constraints: {
|
||||
MaxLength: 50,
|
||||
MinLength: 1
|
||||
},
|
||||
serializedName: "consumerGroupName",
|
||||
required: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const sku: OperationURLParameter = {
|
||||
parameterPath: "sku",
|
||||
mapper: {
|
||||
constraints: {
|
||||
MaxLength: 50,
|
||||
MinLength: 1
|
||||
},
|
||||
serializedName: "sku",
|
||||
required: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,30 +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 {
|
||||
ArmDisasterRecovery,
|
||||
AuthorizationRule,
|
||||
BaseResource,
|
||||
CaptureDescription,
|
||||
ConsumerGroup,
|
||||
Destination,
|
||||
EHNamespace,
|
||||
ErrorResponse,
|
||||
Eventhub,
|
||||
MessagingPlan,
|
||||
MessagingRegions,
|
||||
MessagingRegionsListResult,
|
||||
MessagingRegionsProperties,
|
||||
NetworkRuleSet,
|
||||
NWRuleSetIpRules,
|
||||
NWRuleSetVirtualNetworkRules,
|
||||
Resource,
|
||||
Sku,
|
||||
Subnet,
|
||||
TrackedResource
|
||||
} from "../models/mappers";
|
|
@ -0,0 +1,636 @@
|
|||
/*
|
||||
* 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 { Clusters } from "../operationsInterfaces";
|
||||
import * as coreClient from "@azure/core-client";
|
||||
import * as Mappers from "../models/mappers";
|
||||
import * as Parameters from "../models/parameters";
|
||||
import { EventHubManagementClientContext } from "../eventHubManagementClientContext";
|
||||
import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
|
||||
import { LroImpl } from "../lroImpl";
|
||||
import {
|
||||
Cluster,
|
||||
ClustersListByResourceGroupNextOptionalParams,
|
||||
ClustersListByResourceGroupOptionalParams,
|
||||
ClustersListAvailableClusterRegionOptionalParams,
|
||||
ClustersListAvailableClusterRegionResponse,
|
||||
ClustersListByResourceGroupResponse,
|
||||
ClustersGetOptionalParams,
|
||||
ClustersGetResponse,
|
||||
ClustersCreateOrUpdateOptionalParams,
|
||||
ClustersCreateOrUpdateResponse,
|
||||
ClustersUpdateOptionalParams,
|
||||
ClustersUpdateResponse,
|
||||
ClustersDeleteOptionalParams,
|
||||
ClustersListNamespacesOptionalParams,
|
||||
ClustersListNamespacesResponse,
|
||||
ClustersListByResourceGroupNextResponse
|
||||
} from "../models";
|
||||
|
||||
/// <reference lib="esnext.asynciterable" />
|
||||
/** Class containing Clusters operations. */
|
||||
export class ClustersImpl implements Clusters {
|
||||
private readonly client: EventHubManagementClientContext;
|
||||
|
||||
/**
|
||||
* Initialize a new instance of the class Clusters class.
|
||||
* @param client Reference to the service client
|
||||
*/
|
||||
constructor(client: EventHubManagementClientContext) {
|
||||
this.client = client;
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists the available Event Hubs Clusters within an ARM resource group
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
public listByResourceGroup(
|
||||
resourceGroupName: string,
|
||||
options?: ClustersListByResourceGroupOptionalParams
|
||||
): PagedAsyncIterableIterator<Cluster> {
|
||||
const iter = this.listByResourceGroupPagingAll(resourceGroupName, options);
|
||||
return {
|
||||
next() {
|
||||
return iter.next();
|
||||
},
|
||||
[Symbol.asyncIterator]() {
|
||||
return this;
|
||||
},
|
||||
byPage: () => {
|
||||
return this.listByResourceGroupPagingPage(resourceGroupName, options);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private async *listByResourceGroupPagingPage(
|
||||
resourceGroupName: string,
|
||||
options?: ClustersListByResourceGroupOptionalParams
|
||||
): AsyncIterableIterator<Cluster[]> {
|
||||
let result = await this._listByResourceGroup(resourceGroupName, options);
|
||||
yield result.value || [];
|
||||
let continuationToken = result.nextLink;
|
||||
while (continuationToken) {
|
||||
result = await this._listByResourceGroupNext(
|
||||
resourceGroupName,
|
||||
continuationToken,
|
||||
options
|
||||
);
|
||||
continuationToken = result.nextLink;
|
||||
yield result.value || [];
|
||||
}
|
||||
}
|
||||
|
||||
private async *listByResourceGroupPagingAll(
|
||||
resourceGroupName: string,
|
||||
options?: ClustersListByResourceGroupOptionalParams
|
||||
): AsyncIterableIterator<Cluster> {
|
||||
for await (const page of this.listByResourceGroupPagingPage(
|
||||
resourceGroupName,
|
||||
options
|
||||
)) {
|
||||
yield* page;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* List the quantity of available pre-provisioned Event Hubs Clusters, indexed by Azure region.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
listAvailableClusterRegion(
|
||||
options?: ClustersListAvailableClusterRegionOptionalParams
|
||||
): Promise<ClustersListAvailableClusterRegionResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{ options },
|
||||
listAvailableClusterRegionOperationSpec
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists the available Event Hubs Clusters within an ARM resource group
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
private _listByResourceGroup(
|
||||
resourceGroupName: string,
|
||||
options?: ClustersListByResourceGroupOptionalParams
|
||||
): Promise<ClustersListByResourceGroupResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{ resourceGroupName, options },
|
||||
listByResourceGroupOperationSpec
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the resource description of the specified Event Hubs Cluster.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param clusterName The name of the Event Hubs Cluster.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
get(
|
||||
resourceGroupName: string,
|
||||
clusterName: string,
|
||||
options?: ClustersGetOptionalParams
|
||||
): Promise<ClustersGetResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{ resourceGroupName, clusterName, options },
|
||||
getOperationSpec
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates or updates an instance of an Event Hubs Cluster.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param clusterName The name of the Event Hubs Cluster.
|
||||
* @param parameters Parameters for creating a eventhub cluster resource.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
async beginCreateOrUpdate(
|
||||
resourceGroupName: string,
|
||||
clusterName: string,
|
||||
parameters: Cluster,
|
||||
options?: ClustersCreateOrUpdateOptionalParams
|
||||
): Promise<
|
||||
PollerLike<
|
||||
PollOperationState<ClustersCreateOrUpdateResponse>,
|
||||
ClustersCreateOrUpdateResponse
|
||||
>
|
||||
> {
|
||||
const directSendOperation = async (
|
||||
args: coreClient.OperationArguments,
|
||||
spec: coreClient.OperationSpec
|
||||
): Promise<ClustersCreateOrUpdateResponse> => {
|
||||
return this.client.sendOperationRequest(args, spec);
|
||||
};
|
||||
const sendOperation = async (
|
||||
args: coreClient.OperationArguments,
|
||||
spec: coreClient.OperationSpec
|
||||
) => {
|
||||
let currentRawResponse:
|
||||
| coreClient.FullOperationResponse
|
||||
| undefined = undefined;
|
||||
const providedCallback = args.options?.onResponse;
|
||||
const callback: coreClient.RawResponseCallback = (
|
||||
rawResponse: coreClient.FullOperationResponse,
|
||||
flatResponse: unknown
|
||||
) => {
|
||||
currentRawResponse = rawResponse;
|
||||
providedCallback?.(rawResponse, flatResponse);
|
||||
};
|
||||
const updatedArgs = {
|
||||
...args,
|
||||
options: {
|
||||
...args.options,
|
||||
onResponse: callback
|
||||
}
|
||||
};
|
||||
const flatResponse = await directSendOperation(updatedArgs, spec);
|
||||
return {
|
||||
flatResponse,
|
||||
rawResponse: {
|
||||
statusCode: currentRawResponse!.status,
|
||||
body: currentRawResponse!.parsedBody,
|
||||
headers: currentRawResponse!.headers.toJSON()
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
const lro = new LroImpl(
|
||||
sendOperation,
|
||||
{ resourceGroupName, clusterName, parameters, options },
|
||||
createOrUpdateOperationSpec
|
||||
);
|
||||
return new LroEngine(lro, {
|
||||
resumeFrom: options?.resumeFrom,
|
||||
intervalInMs: options?.updateIntervalInMs
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates or updates an instance of an Event Hubs Cluster.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param clusterName The name of the Event Hubs Cluster.
|
||||
* @param parameters Parameters for creating a eventhub cluster resource.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
async beginCreateOrUpdateAndWait(
|
||||
resourceGroupName: string,
|
||||
clusterName: string,
|
||||
parameters: Cluster,
|
||||
options?: ClustersCreateOrUpdateOptionalParams
|
||||
): Promise<ClustersCreateOrUpdateResponse> {
|
||||
const poller = await this.beginCreateOrUpdate(
|
||||
resourceGroupName,
|
||||
clusterName,
|
||||
parameters,
|
||||
options
|
||||
);
|
||||
return poller.pollUntilDone();
|
||||
}
|
||||
|
||||
/**
|
||||
* Modifies mutable properties on the Event Hubs Cluster. This operation is idempotent.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param clusterName The name of the Event Hubs Cluster.
|
||||
* @param parameters The properties of the Event Hubs Cluster which should be updated.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
async beginUpdate(
|
||||
resourceGroupName: string,
|
||||
clusterName: string,
|
||||
parameters: Cluster,
|
||||
options?: ClustersUpdateOptionalParams
|
||||
): Promise<
|
||||
PollerLike<
|
||||
PollOperationState<ClustersUpdateResponse>,
|
||||
ClustersUpdateResponse
|
||||
>
|
||||
> {
|
||||
const directSendOperation = async (
|
||||
args: coreClient.OperationArguments,
|
||||
spec: coreClient.OperationSpec
|
||||
): Promise<ClustersUpdateResponse> => {
|
||||
return this.client.sendOperationRequest(args, spec);
|
||||
};
|
||||
const sendOperation = async (
|
||||
args: coreClient.OperationArguments,
|
||||
spec: coreClient.OperationSpec
|
||||
) => {
|
||||
let currentRawResponse:
|
||||
| coreClient.FullOperationResponse
|
||||
| undefined = undefined;
|
||||
const providedCallback = args.options?.onResponse;
|
||||
const callback: coreClient.RawResponseCallback = (
|
||||
rawResponse: coreClient.FullOperationResponse,
|
||||
flatResponse: unknown
|
||||
) => {
|
||||
currentRawResponse = rawResponse;
|
||||
providedCallback?.(rawResponse, flatResponse);
|
||||
};
|
||||
const updatedArgs = {
|
||||
...args,
|
||||
options: {
|
||||
...args.options,
|
||||
onResponse: callback
|
||||
}
|
||||
};
|
||||
const flatResponse = await directSendOperation(updatedArgs, spec);
|
||||
return {
|
||||
flatResponse,
|
||||
rawResponse: {
|
||||
statusCode: currentRawResponse!.status,
|
||||
body: currentRawResponse!.parsedBody,
|
||||
headers: currentRawResponse!.headers.toJSON()
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
const lro = new LroImpl(
|
||||
sendOperation,
|
||||
{ resourceGroupName, clusterName, parameters, options },
|
||||
updateOperationSpec
|
||||
);
|
||||
return new LroEngine(lro, {
|
||||
resumeFrom: options?.resumeFrom,
|
||||
intervalInMs: options?.updateIntervalInMs
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Modifies mutable properties on the Event Hubs Cluster. This operation is idempotent.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param clusterName The name of the Event Hubs Cluster.
|
||||
* @param parameters The properties of the Event Hubs Cluster which should be updated.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
async beginUpdateAndWait(
|
||||
resourceGroupName: string,
|
||||
clusterName: string,
|
||||
parameters: Cluster,
|
||||
options?: ClustersUpdateOptionalParams
|
||||
): Promise<ClustersUpdateResponse> {
|
||||
const poller = await this.beginUpdate(
|
||||
resourceGroupName,
|
||||
clusterName,
|
||||
parameters,
|
||||
options
|
||||
);
|
||||
return poller.pollUntilDone();
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes an existing Event Hubs Cluster. This operation is idempotent.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param clusterName The name of the Event Hubs Cluster.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
async beginDelete(
|
||||
resourceGroupName: string,
|
||||
clusterName: string,
|
||||
options?: ClustersDeleteOptionalParams
|
||||
): Promise<PollerLike<PollOperationState<void>, void>> {
|
||||
const directSendOperation = async (
|
||||
args: coreClient.OperationArguments,
|
||||
spec: coreClient.OperationSpec
|
||||
): Promise<void> => {
|
||||
return this.client.sendOperationRequest(args, spec);
|
||||
};
|
||||
const sendOperation = async (
|
||||
args: coreClient.OperationArguments,
|
||||
spec: coreClient.OperationSpec
|
||||
) => {
|
||||
let currentRawResponse:
|
||||
| coreClient.FullOperationResponse
|
||||
| undefined = undefined;
|
||||
const providedCallback = args.options?.onResponse;
|
||||
const callback: coreClient.RawResponseCallback = (
|
||||
rawResponse: coreClient.FullOperationResponse,
|
||||
flatResponse: unknown
|
||||
) => {
|
||||
currentRawResponse = rawResponse;
|
||||
providedCallback?.(rawResponse, flatResponse);
|
||||
};
|
||||
const updatedArgs = {
|
||||
...args,
|
||||
options: {
|
||||
...args.options,
|
||||
onResponse: callback
|
||||
}
|
||||
};
|
||||
const flatResponse = await directSendOperation(updatedArgs, spec);
|
||||
return {
|
||||
flatResponse,
|
||||
rawResponse: {
|
||||
statusCode: currentRawResponse!.status,
|
||||
body: currentRawResponse!.parsedBody,
|
||||
headers: currentRawResponse!.headers.toJSON()
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
const lro = new LroImpl(
|
||||
sendOperation,
|
||||
{ resourceGroupName, clusterName, options },
|
||||
deleteOperationSpec
|
||||
);
|
||||
return new LroEngine(lro, {
|
||||
resumeFrom: options?.resumeFrom,
|
||||
intervalInMs: options?.updateIntervalInMs
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes an existing Event Hubs Cluster. This operation is idempotent.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param clusterName The name of the Event Hubs Cluster.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
async beginDeleteAndWait(
|
||||
resourceGroupName: string,
|
||||
clusterName: string,
|
||||
options?: ClustersDeleteOptionalParams
|
||||
): Promise<void> {
|
||||
const poller = await this.beginDelete(
|
||||
resourceGroupName,
|
||||
clusterName,
|
||||
options
|
||||
);
|
||||
return poller.pollUntilDone();
|
||||
}
|
||||
|
||||
/**
|
||||
* List all Event Hubs Namespace IDs in an Event Hubs Dedicated Cluster.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param clusterName The name of the Event Hubs Cluster.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
listNamespaces(
|
||||
resourceGroupName: string,
|
||||
clusterName: string,
|
||||
options?: ClustersListNamespacesOptionalParams
|
||||
): Promise<ClustersListNamespacesResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{ resourceGroupName, clusterName, options },
|
||||
listNamespacesOperationSpec
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* ListByResourceGroupNext
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
private _listByResourceGroupNext(
|
||||
resourceGroupName: string,
|
||||
nextLink: string,
|
||||
options?: ClustersListByResourceGroupNextOptionalParams
|
||||
): Promise<ClustersListByResourceGroupNextResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{ resourceGroupName, nextLink, options },
|
||||
listByResourceGroupNextOperationSpec
|
||||
);
|
||||
}
|
||||
}
|
||||
// Operation Specifications
|
||||
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
||||
|
||||
const listAvailableClusterRegionOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/providers/Microsoft.EventHub/availableClusterRegions",
|
||||
httpMethod: "GET",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.AvailableClustersList
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [Parameters.$host, Parameters.subscriptionId],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
};
|
||||
const listByResourceGroupOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters",
|
||||
httpMethod: "GET",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.ClusterListResult
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.resourceGroupName
|
||||
],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
};
|
||||
const getOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}",
|
||||
httpMethod: "GET",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.Cluster
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.resourceGroupName,
|
||||
Parameters.clusterName
|
||||
],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
};
|
||||
const createOrUpdateOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}",
|
||||
httpMethod: "PUT",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.Cluster
|
||||
},
|
||||
201: {
|
||||
bodyMapper: Mappers.Cluster
|
||||
},
|
||||
202: {
|
||||
bodyMapper: Mappers.Cluster
|
||||
},
|
||||
204: {
|
||||
bodyMapper: Mappers.Cluster
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
requestBody: Parameters.parameters,
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.resourceGroupName,
|
||||
Parameters.clusterName
|
||||
],
|
||||
headerParameters: [Parameters.accept, Parameters.contentType],
|
||||
mediaType: "json",
|
||||
serializer
|
||||
};
|
||||
const updateOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}",
|
||||
httpMethod: "PATCH",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.Cluster
|
||||
},
|
||||
201: {
|
||||
bodyMapper: Mappers.Cluster
|
||||
},
|
||||
202: {
|
||||
bodyMapper: Mappers.Cluster
|
||||
},
|
||||
204: {
|
||||
bodyMapper: Mappers.Cluster
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
requestBody: Parameters.parameters,
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.resourceGroupName,
|
||||
Parameters.clusterName
|
||||
],
|
||||
headerParameters: [Parameters.accept, Parameters.contentType],
|
||||
mediaType: "json",
|
||||
serializer
|
||||
};
|
||||
const deleteOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}",
|
||||
httpMethod: "DELETE",
|
||||
responses: {
|
||||
200: {},
|
||||
201: {},
|
||||
202: {},
|
||||
204: {},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.resourceGroupName,
|
||||
Parameters.clusterName
|
||||
],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
};
|
||||
const listNamespacesOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}/namespaces",
|
||||
httpMethod: "GET",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.EHNamespaceIdListResult
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.resourceGroupName,
|
||||
Parameters.clusterName
|
||||
],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
};
|
||||
const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = {
|
||||
path: "{nextLink}",
|
||||
httpMethod: "GET",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.ClusterListResult
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.resourceGroupName,
|
||||
Parameters.nextLink
|
||||
],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
};
|
|
@ -0,0 +1,124 @@
|
|||
/*
|
||||
* 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 { Configuration } from "../operationsInterfaces";
|
||||
import * as coreClient from "@azure/core-client";
|
||||
import * as Mappers from "../models/mappers";
|
||||
import * as Parameters from "../models/parameters";
|
||||
import { EventHubManagementClientContext } from "../eventHubManagementClientContext";
|
||||
import {
|
||||
ClusterQuotaConfigurationProperties,
|
||||
ConfigurationPatchOptionalParams,
|
||||
ConfigurationPatchResponse,
|
||||
ConfigurationGetOptionalParams,
|
||||
ConfigurationGetResponse
|
||||
} from "../models";
|
||||
|
||||
/** Class containing Configuration operations. */
|
||||
export class ConfigurationImpl implements Configuration {
|
||||
private readonly client: EventHubManagementClientContext;
|
||||
|
||||
/**
|
||||
* Initialize a new instance of the class Configuration class.
|
||||
* @param client Reference to the service client
|
||||
*/
|
||||
constructor(client: EventHubManagementClientContext) {
|
||||
this.client = client;
|
||||
}
|
||||
|
||||
/**
|
||||
* Replace all specified Event Hubs Cluster settings with those contained in the request body. Leaves
|
||||
* the settings not specified in the request body unmodified.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param clusterName The name of the Event Hubs Cluster.
|
||||
* @param parameters Parameters for creating an Event Hubs Cluster resource.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
patch(
|
||||
resourceGroupName: string,
|
||||
clusterName: string,
|
||||
parameters: ClusterQuotaConfigurationProperties,
|
||||
options?: ConfigurationPatchOptionalParams
|
||||
): Promise<ConfigurationPatchResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{ resourceGroupName, clusterName, parameters, options },
|
||||
patchOperationSpec
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all Event Hubs Cluster settings - a collection of key/value pairs which represent the quotas and
|
||||
* settings imposed on the cluster.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param clusterName The name of the Event Hubs Cluster.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
get(
|
||||
resourceGroupName: string,
|
||||
clusterName: string,
|
||||
options?: ConfigurationGetOptionalParams
|
||||
): Promise<ConfigurationGetResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{ resourceGroupName, clusterName, options },
|
||||
getOperationSpec
|
||||
);
|
||||
}
|
||||
}
|
||||
// Operation Specifications
|
||||
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
||||
|
||||
const patchOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}/quotaConfiguration/default",
|
||||
httpMethod: "PATCH",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.ClusterQuotaConfigurationProperties
|
||||
},
|
||||
201: {
|
||||
bodyMapper: Mappers.ClusterQuotaConfigurationProperties
|
||||
},
|
||||
202: {},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
requestBody: Parameters.parameters9,
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.resourceGroupName,
|
||||
Parameters.clusterName
|
||||
],
|
||||
headerParameters: [Parameters.accept, Parameters.contentType],
|
||||
mediaType: "json",
|
||||
serializer
|
||||
};
|
||||
const getOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}/quotaConfiguration/default",
|
||||
httpMethod: "GET",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.ClusterQuotaConfigurationProperties
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.resourceGroupName,
|
||||
Parameters.clusterName
|
||||
],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
};
|
|
@ -1,31 +1,125 @@
|
|||
/*
|
||||
* 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/consumerGroupsMappers";
|
||||
import "@azure/core-paging";
|
||||
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
||||
import { ConsumerGroups } from "../operationsInterfaces";
|
||||
import * as coreClient from "@azure/core-client";
|
||||
import * as Mappers from "../models/mappers";
|
||||
import * as Parameters from "../models/parameters";
|
||||
import { EventHubManagementClientContext } from "../eventHubManagementClientContext";
|
||||
import {
|
||||
ConsumerGroup,
|
||||
ConsumerGroupsListByEventHubNextOptionalParams,
|
||||
ConsumerGroupsListByEventHubOptionalParams,
|
||||
ConsumerGroupsCreateOrUpdateOptionalParams,
|
||||
ConsumerGroupsCreateOrUpdateResponse,
|
||||
ConsumerGroupsDeleteOptionalParams,
|
||||
ConsumerGroupsGetOptionalParams,
|
||||
ConsumerGroupsGetResponse,
|
||||
ConsumerGroupsListByEventHubResponse,
|
||||
ConsumerGroupsListByEventHubNextResponse
|
||||
} from "../models";
|
||||
|
||||
/** Class representing a ConsumerGroups. */
|
||||
export class ConsumerGroups {
|
||||
/// <reference lib="esnext.asynciterable" />
|
||||
/** Class containing ConsumerGroups operations. */
|
||||
export class ConsumerGroupsImpl implements ConsumerGroups {
|
||||
private readonly client: EventHubManagementClientContext;
|
||||
|
||||
/**
|
||||
* Create a ConsumerGroups.
|
||||
* @param {EventHubManagementClientContext} client Reference to the service client.
|
||||
* Initialize a new instance of the class ConsumerGroups class.
|
||||
* @param client Reference to the service client
|
||||
*/
|
||||
constructor(client: EventHubManagementClientContext) {
|
||||
this.client = client;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets all the consumer groups in a Namespace. An empty feed is returned if no consumer group exists
|
||||
* in the Namespace.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param namespaceName The Namespace name
|
||||
* @param eventHubName The Event Hub name
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
public listByEventHub(
|
||||
resourceGroupName: string,
|
||||
namespaceName: string,
|
||||
eventHubName: string,
|
||||
options?: ConsumerGroupsListByEventHubOptionalParams
|
||||
): PagedAsyncIterableIterator<ConsumerGroup> {
|
||||
const iter = this.listByEventHubPagingAll(
|
||||
resourceGroupName,
|
||||
namespaceName,
|
||||
eventHubName,
|
||||
options
|
||||
);
|
||||
return {
|
||||
next() {
|
||||
return iter.next();
|
||||
},
|
||||
[Symbol.asyncIterator]() {
|
||||
return this;
|
||||
},
|
||||
byPage: () => {
|
||||
return this.listByEventHubPagingPage(
|
||||
resourceGroupName,
|
||||
namespaceName,
|
||||
eventHubName,
|
||||
options
|
||||
);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private async *listByEventHubPagingPage(
|
||||
resourceGroupName: string,
|
||||
namespaceName: string,
|
||||
eventHubName: string,
|
||||
options?: ConsumerGroupsListByEventHubOptionalParams
|
||||
): AsyncIterableIterator<ConsumerGroup[]> {
|
||||
let result = await this._listByEventHub(
|
||||
resourceGroupName,
|
||||
namespaceName,
|
||||
eventHubName,
|
||||
options
|
||||
);
|
||||
yield result.value || [];
|
||||
let continuationToken = result.nextLink;
|
||||
while (continuationToken) {
|
||||
result = await this._listByEventHubNext(
|
||||
resourceGroupName,
|
||||
namespaceName,
|
||||
eventHubName,
|
||||
continuationToken,
|
||||
options
|
||||
);
|
||||
continuationToken = result.nextLink;
|
||||
yield result.value || [];
|
||||
}
|
||||
}
|
||||
|
||||
private async *listByEventHubPagingAll(
|
||||
resourceGroupName: string,
|
||||
namespaceName: string,
|
||||
eventHubName: string,
|
||||
options?: ConsumerGroupsListByEventHubOptionalParams
|
||||
): AsyncIterableIterator<ConsumerGroup> {
|
||||
for await (const page of this.listByEventHubPagingPage(
|
||||
resourceGroupName,
|
||||
namespaceName,
|
||||
eventHubName,
|
||||
options
|
||||
)) {
|
||||
yield* page;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates or updates an Event Hubs consumer group as a nested resource within a Namespace.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
|
@ -33,30 +127,16 @@ export class ConsumerGroups {
|
|||
* @param eventHubName The Event Hub name
|
||||
* @param consumerGroupName The consumer group name
|
||||
* @param parameters Parameters supplied to create or update a consumer group resource.
|
||||
* @param [options] The optional parameters
|
||||
* @returns Promise<Models.ConsumerGroupsCreateOrUpdateResponse>
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
createOrUpdate(resourceGroupName: string, namespaceName: string, eventHubName: string, consumerGroupName: string, parameters: Models.ConsumerGroup, options?: msRest.RequestOptionsBase): Promise<Models.ConsumerGroupsCreateOrUpdateResponse>;
|
||||
/**
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param namespaceName The Namespace name
|
||||
* @param eventHubName The Event Hub name
|
||||
* @param consumerGroupName The consumer group name
|
||||
* @param parameters Parameters supplied to create or update a consumer group resource.
|
||||
* @param callback The callback
|
||||
*/
|
||||
createOrUpdate(resourceGroupName: string, namespaceName: string, eventHubName: string, consumerGroupName: string, parameters: Models.ConsumerGroup, callback: msRest.ServiceCallback<Models.ConsumerGroup>): void;
|
||||
/**
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param namespaceName The Namespace name
|
||||
* @param eventHubName The Event Hub name
|
||||
* @param consumerGroupName The consumer group name
|
||||
* @param parameters Parameters supplied to create or update a consumer group resource.
|
||||
* @param options The optional parameters
|
||||
* @param callback The callback
|
||||
*/
|
||||
createOrUpdate(resourceGroupName: string, namespaceName: string, eventHubName: string, consumerGroupName: string, parameters: Models.ConsumerGroup, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.ConsumerGroup>): void;
|
||||
createOrUpdate(resourceGroupName: string, namespaceName: string, eventHubName: string, consumerGroupName: string, parameters: Models.ConsumerGroup, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.ConsumerGroup>, callback?: msRest.ServiceCallback<Models.ConsumerGroup>): Promise<Models.ConsumerGroupsCreateOrUpdateResponse> {
|
||||
createOrUpdate(
|
||||
resourceGroupName: string,
|
||||
namespaceName: string,
|
||||
eventHubName: string,
|
||||
consumerGroupName: string,
|
||||
parameters: ConsumerGroup,
|
||||
options?: ConsumerGroupsCreateOrUpdateOptionalParams
|
||||
): Promise<ConsumerGroupsCreateOrUpdateResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{
|
||||
resourceGroupName,
|
||||
|
@ -66,8 +146,8 @@ export class ConsumerGroups {
|
|||
parameters,
|
||||
options
|
||||
},
|
||||
createOrUpdateOperationSpec,
|
||||
callback) as Promise<Models.ConsumerGroupsCreateOrUpdateResponse>;
|
||||
createOrUpdateOperationSpec
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -76,28 +156,15 @@ export class ConsumerGroups {
|
|||
* @param namespaceName The Namespace name
|
||||
* @param eventHubName The Event Hub name
|
||||
* @param consumerGroupName The consumer group name
|
||||
* @param [options] The optional parameters
|
||||
* @returns Promise<msRest.RestResponse>
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
deleteMethod(resourceGroupName: string, namespaceName: string, eventHubName: string, consumerGroupName: string, options?: msRest.RequestOptionsBase): Promise<msRest.RestResponse>;
|
||||
/**
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param namespaceName The Namespace name
|
||||
* @param eventHubName The Event Hub name
|
||||
* @param consumerGroupName The consumer group name
|
||||
* @param callback The callback
|
||||
*/
|
||||
deleteMethod(resourceGroupName: string, namespaceName: string, eventHubName: string, consumerGroupName: string, callback: msRest.ServiceCallback<void>): void;
|
||||
/**
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param namespaceName The Namespace name
|
||||
* @param eventHubName The Event Hub name
|
||||
* @param consumerGroupName The consumer group name
|
||||
* @param options The optional parameters
|
||||
* @param callback The callback
|
||||
*/
|
||||
deleteMethod(resourceGroupName: string, namespaceName: string, eventHubName: string, consumerGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<void>): void;
|
||||
deleteMethod(resourceGroupName: string, namespaceName: string, eventHubName: string, consumerGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<void>, callback?: msRest.ServiceCallback<void>): Promise<msRest.RestResponse> {
|
||||
delete(
|
||||
resourceGroupName: string,
|
||||
namespaceName: string,
|
||||
eventHubName: string,
|
||||
consumerGroupName: string,
|
||||
options?: ConsumerGroupsDeleteOptionalParams
|
||||
): Promise<void> {
|
||||
return this.client.sendOperationRequest(
|
||||
{
|
||||
resourceGroupName,
|
||||
|
@ -106,8 +173,8 @@ export class ConsumerGroups {
|
|||
consumerGroupName,
|
||||
options
|
||||
},
|
||||
deleteMethodOperationSpec,
|
||||
callback);
|
||||
deleteOperationSpec
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -116,28 +183,15 @@ export class ConsumerGroups {
|
|||
* @param namespaceName The Namespace name
|
||||
* @param eventHubName The Event Hub name
|
||||
* @param consumerGroupName The consumer group name
|
||||
* @param [options] The optional parameters
|
||||
* @returns Promise<Models.ConsumerGroupsGetResponse>
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
get(resourceGroupName: string, namespaceName: string, eventHubName: string, consumerGroupName: string, options?: msRest.RequestOptionsBase): Promise<Models.ConsumerGroupsGetResponse>;
|
||||
/**
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param namespaceName The Namespace name
|
||||
* @param eventHubName The Event Hub name
|
||||
* @param consumerGroupName The consumer group name
|
||||
* @param callback The callback
|
||||
*/
|
||||
get(resourceGroupName: string, namespaceName: string, eventHubName: string, consumerGroupName: string, callback: msRest.ServiceCallback<Models.ConsumerGroup>): void;
|
||||
/**
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param namespaceName The Namespace name
|
||||
* @param eventHubName The Event Hub name
|
||||
* @param consumerGroupName The consumer group name
|
||||
* @param options The optional parameters
|
||||
* @param callback The callback
|
||||
*/
|
||||
get(resourceGroupName: string, namespaceName: string, eventHubName: string, consumerGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.ConsumerGroup>): void;
|
||||
get(resourceGroupName: string, namespaceName: string, eventHubName: string, consumerGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.ConsumerGroup>, callback?: msRest.ServiceCallback<Models.ConsumerGroup>): Promise<Models.ConsumerGroupsGetResponse> {
|
||||
get(
|
||||
resourceGroupName: string,
|
||||
namespaceName: string,
|
||||
eventHubName: string,
|
||||
consumerGroupName: string,
|
||||
options?: ConsumerGroupsGetOptionalParams
|
||||
): Promise<ConsumerGroupsGetResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{
|
||||
resourceGroupName,
|
||||
|
@ -146,102 +200,58 @@ export class ConsumerGroups {
|
|||
consumerGroupName,
|
||||
options
|
||||
},
|
||||
getOperationSpec,
|
||||
callback) as Promise<Models.ConsumerGroupsGetResponse>;
|
||||
getOperationSpec
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets all the consumer groups in a Namespace. An empty feed is returned if no consumer group
|
||||
* exists in the Namespace.
|
||||
* Gets all the consumer groups in a Namespace. An empty feed is returned if no consumer group exists
|
||||
* in the Namespace.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param namespaceName The Namespace name
|
||||
* @param eventHubName The Event Hub name
|
||||
* @param [options] The optional parameters
|
||||
* @returns Promise<Models.ConsumerGroupsListByEventHubResponse>
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
listByEventHub(resourceGroupName: string, namespaceName: string, eventHubName: string, options?: Models.ConsumerGroupsListByEventHubOptionalParams): Promise<Models.ConsumerGroupsListByEventHubResponse>;
|
||||
/**
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param namespaceName The Namespace name
|
||||
* @param eventHubName The Event Hub name
|
||||
* @param callback The callback
|
||||
*/
|
||||
listByEventHub(resourceGroupName: string, namespaceName: string, eventHubName: string, callback: msRest.ServiceCallback<Models.ConsumerGroupListResult>): void;
|
||||
/**
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param namespaceName The Namespace name
|
||||
* @param eventHubName The Event Hub name
|
||||
* @param options The optional parameters
|
||||
* @param callback The callback
|
||||
*/
|
||||
listByEventHub(resourceGroupName: string, namespaceName: string, eventHubName: string, options: Models.ConsumerGroupsListByEventHubOptionalParams, callback: msRest.ServiceCallback<Models.ConsumerGroupListResult>): void;
|
||||
listByEventHub(resourceGroupName: string, namespaceName: string, eventHubName: string, options?: Models.ConsumerGroupsListByEventHubOptionalParams | msRest.ServiceCallback<Models.ConsumerGroupListResult>, callback?: msRest.ServiceCallback<Models.ConsumerGroupListResult>): Promise<Models.ConsumerGroupsListByEventHubResponse> {
|
||||
private _listByEventHub(
|
||||
resourceGroupName: string,
|
||||
namespaceName: string,
|
||||
eventHubName: string,
|
||||
options?: ConsumerGroupsListByEventHubOptionalParams
|
||||
): Promise<ConsumerGroupsListByEventHubResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{
|
||||
resourceGroupName,
|
||||
namespaceName,
|
||||
eventHubName,
|
||||
options
|
||||
},
|
||||
listByEventHubOperationSpec,
|
||||
callback) as Promise<Models.ConsumerGroupsListByEventHubResponse>;
|
||||
{ resourceGroupName, namespaceName, eventHubName, options },
|
||||
listByEventHubOperationSpec
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets all the consumer groups in a Namespace. An empty feed is returned if no consumer group
|
||||
* exists in the Namespace.
|
||||
* @param nextPageLink The NextLink from the previous successful call to List operation.
|
||||
* @param [options] The optional parameters
|
||||
* @returns Promise<Models.ConsumerGroupsListByEventHubNextResponse>
|
||||
* ListByEventHubNext
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param namespaceName The Namespace name
|
||||
* @param eventHubName The Event Hub name
|
||||
* @param nextLink The nextLink from the previous successful call to the ListByEventHub method.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
listByEventHubNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.ConsumerGroupsListByEventHubNextResponse>;
|
||||
/**
|
||||
* @param nextPageLink The NextLink from the previous successful call to List operation.
|
||||
* @param callback The callback
|
||||
*/
|
||||
listByEventHubNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.ConsumerGroupListResult>): void;
|
||||
/**
|
||||
* @param nextPageLink The NextLink from the previous successful call to List operation.
|
||||
* @param options The optional parameters
|
||||
* @param callback The callback
|
||||
*/
|
||||
listByEventHubNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.ConsumerGroupListResult>): void;
|
||||
listByEventHubNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.ConsumerGroupListResult>, callback?: msRest.ServiceCallback<Models.ConsumerGroupListResult>): Promise<Models.ConsumerGroupsListByEventHubNextResponse> {
|
||||
private _listByEventHubNext(
|
||||
resourceGroupName: string,
|
||||
namespaceName: string,
|
||||
eventHubName: string,
|
||||
nextLink: string,
|
||||
options?: ConsumerGroupsListByEventHubNextOptionalParams
|
||||
): Promise<ConsumerGroupsListByEventHubNextResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{
|
||||
nextPageLink,
|
||||
options
|
||||
},
|
||||
listByEventHubNextOperationSpec,
|
||||
callback) as Promise<Models.ConsumerGroupsListByEventHubNextResponse>;
|
||||
{ resourceGroupName, namespaceName, eventHubName, nextLink, options },
|
||||
listByEventHubNextOperationSpec
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Operation Specifications
|
||||
const serializer = new msRest.Serializer(Mappers);
|
||||
const createOrUpdateOperationSpec: msRest.OperationSpec = {
|
||||
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
||||
|
||||
const createOrUpdateOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups/{consumerGroupName}",
|
||||
httpMethod: "PUT",
|
||||
path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups/{consumerGroupName}",
|
||||
urlParameters: [
|
||||
Parameters.resourceGroupName,
|
||||
Parameters.namespaceName,
|
||||
Parameters.eventHubName,
|
||||
Parameters.consumerGroupName,
|
||||
Parameters.subscriptionId
|
||||
],
|
||||
queryParameters: [
|
||||
Parameters.apiVersion
|
||||
],
|
||||
headerParameters: [
|
||||
Parameters.acceptLanguage
|
||||
],
|
||||
requestBody: {
|
||||
parameterPath: "parameters",
|
||||
mapper: {
|
||||
...Mappers.ConsumerGroup,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.ConsumerGroup
|
||||
|
@ -250,25 +260,24 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = {
|
|||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
serializer
|
||||
};
|
||||
|
||||
const deleteMethodOperationSpec: msRest.OperationSpec = {
|
||||
httpMethod: "DELETE",
|
||||
path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups/{consumerGroupName}",
|
||||
requestBody: Parameters.parameters12,
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.resourceGroupName,
|
||||
Parameters.namespaceName,
|
||||
Parameters.eventHubName,
|
||||
Parameters.consumerGroupName,
|
||||
Parameters.subscriptionId
|
||||
],
|
||||
queryParameters: [
|
||||
Parameters.apiVersion
|
||||
],
|
||||
headerParameters: [
|
||||
Parameters.acceptLanguage
|
||||
Parameters.consumerGroupName
|
||||
],
|
||||
headerParameters: [Parameters.accept, Parameters.contentType],
|
||||
mediaType: "json",
|
||||
serializer
|
||||
};
|
||||
const deleteOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups/{consumerGroupName}",
|
||||
httpMethod: "DELETE",
|
||||
responses: {
|
||||
200: {},
|
||||
204: {},
|
||||
|
@ -276,25 +285,22 @@ const deleteMethodOperationSpec: msRest.OperationSpec = {
|
|||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
serializer
|
||||
};
|
||||
|
||||
const getOperationSpec: msRest.OperationSpec = {
|
||||
httpMethod: "GET",
|
||||
path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups/{consumerGroupName}",
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.resourceGroupName,
|
||||
Parameters.namespaceName,
|
||||
Parameters.eventHubName,
|
||||
Parameters.consumerGroupName,
|
||||
Parameters.subscriptionId
|
||||
],
|
||||
queryParameters: [
|
||||
Parameters.apiVersion
|
||||
],
|
||||
headerParameters: [
|
||||
Parameters.acceptLanguage
|
||||
Parameters.consumerGroupName
|
||||
],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
};
|
||||
const getOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups/{consumerGroupName}",
|
||||
httpMethod: "GET",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.ConsumerGroup
|
||||
|
@ -303,47 +309,22 @@ const getOperationSpec: msRest.OperationSpec = {
|
|||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
serializer
|
||||
};
|
||||
|
||||
const listByEventHubOperationSpec: msRest.OperationSpec = {
|
||||
httpMethod: "GET",
|
||||
path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups",
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.resourceGroupName,
|
||||
Parameters.namespaceName,
|
||||
Parameters.eventHubName,
|
||||
Parameters.subscriptionId
|
||||
Parameters.consumerGroupName
|
||||
],
|
||||
queryParameters: [
|
||||
Parameters.apiVersion,
|
||||
Parameters.skip,
|
||||
Parameters.top
|
||||
],
|
||||
headerParameters: [
|
||||
Parameters.acceptLanguage
|
||||
],
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.ConsumerGroupListResult
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
};
|
||||
|
||||
const listByEventHubNextOperationSpec: msRest.OperationSpec = {
|
||||
const listByEventHubOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups",
|
||||
httpMethod: "GET",
|
||||
baseUrl: "https://management.azure.com",
|
||||
path: "{nextLink}",
|
||||
urlParameters: [
|
||||
Parameters.nextPageLink
|
||||
],
|
||||
headerParameters: [
|
||||
Parameters.acceptLanguage
|
||||
],
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.ConsumerGroupListResult
|
||||
|
@ -352,5 +333,37 @@ const listByEventHubNextOperationSpec: msRest.OperationSpec = {
|
|||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion, Parameters.skip, Parameters.top],
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.resourceGroupName,
|
||||
Parameters.namespaceName,
|
||||
Parameters.eventHubName
|
||||
],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
};
|
||||
const listByEventHubNextOperationSpec: coreClient.OperationSpec = {
|
||||
path: "{nextLink}",
|
||||
httpMethod: "GET",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.ConsumerGroupListResult
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion, Parameters.skip, Parameters.top],
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.resourceGroupName,
|
||||
Parameters.nextLink,
|
||||
Parameters.namespaceName,
|
||||
Parameters.eventHubName
|
||||
],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
};
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -1,16 +1,18 @@
|
|||
/*
|
||||
* 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 "./operations";
|
||||
export * from "./clusters";
|
||||
export * from "./namespaces";
|
||||
export * from "./privateEndpointConnections";
|
||||
export * from "./privateLinkResources";
|
||||
export * from "./configuration";
|
||||
export * from "./disasterRecoveryConfigs";
|
||||
export * from "./eventHubs";
|
||||
export * from "./consumerGroups";
|
||||
export * from "./operations";
|
||||
export * from "./regions";
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -1,26 +1,34 @@
|
|||
/*
|
||||
* 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/operationsMappers";
|
||||
import "@azure/core-paging";
|
||||
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
||||
import { Operations } from "../operationsInterfaces";
|
||||
import * as coreClient from "@azure/core-client";
|
||||
import * as Mappers from "../models/mappers";
|
||||
import * as Parameters from "../models/parameters";
|
||||
import { EventHubManagementClientContext } from "../eventHubManagementClientContext";
|
||||
import {
|
||||
Operation,
|
||||
OperationsListNextOptionalParams,
|
||||
OperationsListOptionalParams,
|
||||
OperationsListResponse,
|
||||
OperationsListNextResponse
|
||||
} from "../models";
|
||||
|
||||
/** Class representing a Operations. */
|
||||
export class Operations {
|
||||
/// <reference lib="esnext.asynciterable" />
|
||||
/** Class containing Operations operations. */
|
||||
export class OperationsImpl implements Operations {
|
||||
private readonly client: EventHubManagementClientContext;
|
||||
|
||||
/**
|
||||
* Create a Operations.
|
||||
* @param {EventHubManagementClientContext} client Reference to the service client.
|
||||
* Initialize a new instance of the class Operations class.
|
||||
* @param client Reference to the service client
|
||||
*/
|
||||
constructor(client: EventHubManagementClientContext) {
|
||||
this.client = client;
|
||||
|
@ -28,89 +36,77 @@ export class Operations {
|
|||
|
||||
/**
|
||||
* Lists all of the available Event Hub REST API operations.
|
||||
* @param [options] The optional parameters
|
||||
* @returns Promise<Models.OperationsListResponse>
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
list(options?: msRest.RequestOptionsBase): Promise<Models.OperationsListResponse>;
|
||||
/**
|
||||
* @param callback The callback
|
||||
*/
|
||||
list(callback: msRest.ServiceCallback<Models.OperationListResult>): void;
|
||||
/**
|
||||
* @param options The optional parameters
|
||||
* @param callback The callback
|
||||
*/
|
||||
list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.OperationListResult>): void;
|
||||
list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.OperationListResult>, callback?: msRest.ServiceCallback<Models.OperationListResult>): Promise<Models.OperationsListResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{
|
||||
options
|
||||
public list(
|
||||
options?: OperationsListOptionalParams
|
||||
): PagedAsyncIterableIterator<Operation> {
|
||||
const iter = this.listPagingAll(options);
|
||||
return {
|
||||
next() {
|
||||
return iter.next();
|
||||
},
|
||||
listOperationSpec,
|
||||
callback) as Promise<Models.OperationsListResponse>;
|
||||
[Symbol.asyncIterator]() {
|
||||
return this;
|
||||
},
|
||||
byPage: () => {
|
||||
return this.listPagingPage(options);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private async *listPagingPage(
|
||||
options?: OperationsListOptionalParams
|
||||
): AsyncIterableIterator<Operation[]> {
|
||||
let result = await this._list(options);
|
||||
yield result.value || [];
|
||||
let continuationToken = result.nextLink;
|
||||
while (continuationToken) {
|
||||
result = await this._listNext(continuationToken, options);
|
||||
continuationToken = result.nextLink;
|
||||
yield result.value || [];
|
||||
}
|
||||
}
|
||||
|
||||
private async *listPagingAll(
|
||||
options?: OperationsListOptionalParams
|
||||
): AsyncIterableIterator<Operation> {
|
||||
for await (const page of this.listPagingPage(options)) {
|
||||
yield* page;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists all of the available Event Hub REST API operations.
|
||||
* @param nextPageLink The NextLink from the previous successful call to List operation.
|
||||
* @param [options] The optional parameters
|
||||
* @returns Promise<Models.OperationsListNextResponse>
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.OperationsListNextResponse>;
|
||||
private _list(
|
||||
options?: OperationsListOptionalParams
|
||||
): Promise<OperationsListResponse> {
|
||||
return this.client.sendOperationRequest({ options }, listOperationSpec);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param nextPageLink The NextLink from the previous successful call to List operation.
|
||||
* @param callback The callback
|
||||
* ListNext
|
||||
* @param nextLink The nextLink from the previous successful call to the List method.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
listNext(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
|
||||
*/
|
||||
listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.OperationListResult>): void;
|
||||
listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.OperationListResult>, callback?: msRest.ServiceCallback<Models.OperationListResult>): Promise<Models.OperationsListNextResponse> {
|
||||
private _listNext(
|
||||
nextLink: string,
|
||||
options?: OperationsListNextOptionalParams
|
||||
): Promise<OperationsListNextResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{
|
||||
nextPageLink,
|
||||
options
|
||||
},
|
||||
listNextOperationSpec,
|
||||
callback) as Promise<Models.OperationsListNextResponse>;
|
||||
{ nextLink, options },
|
||||
listNextOperationSpec
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Operation Specifications
|
||||
const serializer = new msRest.Serializer(Mappers);
|
||||
const listOperationSpec: msRest.OperationSpec = {
|
||||
httpMethod: "GET",
|
||||
path: "providers/Microsoft.EventHub/operations",
|
||||
queryParameters: [
|
||||
Parameters.apiVersion
|
||||
],
|
||||
headerParameters: [
|
||||
Parameters.acceptLanguage
|
||||
],
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.OperationListResult
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
serializer
|
||||
};
|
||||
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
||||
|
||||
const listNextOperationSpec: msRest.OperationSpec = {
|
||||
const listOperationSpec: coreClient.OperationSpec = {
|
||||
path: "/providers/Microsoft.EventHub/operations",
|
||||
httpMethod: "GET",
|
||||
baseUrl: "https://management.azure.com",
|
||||
path: "{nextLink}",
|
||||
urlParameters: [
|
||||
Parameters.nextPageLink
|
||||
],
|
||||
headerParameters: [
|
||||
Parameters.acceptLanguage
|
||||
],
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.OperationListResult
|
||||
|
@ -119,5 +115,24 @@ const listNextOperationSpec: msRest.OperationSpec = {
|
|||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [Parameters.$host],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
};
|
||||
const listNextOperationSpec: 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
|
||||
};
|
||||
|
|
|
@ -0,0 +1,405 @@
|
|||
/*
|
||||
* 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 { PrivateEndpointConnections } from "../operationsInterfaces";
|
||||
import * as coreClient from "@azure/core-client";
|
||||
import * as Mappers from "../models/mappers";
|
||||
import * as Parameters from "../models/parameters";
|
||||
import { EventHubManagementClientContext } from "../eventHubManagementClientContext";
|
||||
import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
|
||||
import { LroImpl } from "../lroImpl";
|
||||
import {
|
||||
PrivateEndpointConnection,
|
||||
PrivateEndpointConnectionsListNextOptionalParams,
|
||||
PrivateEndpointConnectionsListOptionalParams,
|
||||
PrivateEndpointConnectionsListResponse,
|
||||
PrivateEndpointConnectionsCreateOrUpdateOptionalParams,
|
||||
PrivateEndpointConnectionsCreateOrUpdateResponse,
|
||||
PrivateEndpointConnectionsDeleteOptionalParams,
|
||||
PrivateEndpointConnectionsGetOptionalParams,
|
||||
PrivateEndpointConnectionsGetResponse,
|
||||
PrivateEndpointConnectionsListNextResponse
|
||||
} from "../models";
|
||||
|
||||
/// <reference lib="esnext.asynciterable" />
|
||||
/** Class containing PrivateEndpointConnections operations. */
|
||||
export class PrivateEndpointConnectionsImpl
|
||||
implements PrivateEndpointConnections {
|
||||
private readonly client: EventHubManagementClientContext;
|
||||
|
||||
/**
|
||||
* Initialize a new instance of the class PrivateEndpointConnections class.
|
||||
* @param client Reference to the service client
|
||||
*/
|
||||
constructor(client: EventHubManagementClientContext) {
|
||||
this.client = client;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the available PrivateEndpointConnections within a namespace.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param namespaceName The Namespace name
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
public list(
|
||||
resourceGroupName: string,
|
||||
namespaceName: string,
|
||||
options?: PrivateEndpointConnectionsListOptionalParams
|
||||
): PagedAsyncIterableIterator<PrivateEndpointConnection> {
|
||||
const iter = this.listPagingAll(resourceGroupName, namespaceName, options);
|
||||
return {
|
||||
next() {
|
||||
return iter.next();
|
||||
},
|
||||
[Symbol.asyncIterator]() {
|
||||
return this;
|
||||
},
|
||||
byPage: () => {
|
||||
return this.listPagingPage(resourceGroupName, namespaceName, options);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private async *listPagingPage(
|
||||
resourceGroupName: string,
|
||||
namespaceName: string,
|
||||
options?: PrivateEndpointConnectionsListOptionalParams
|
||||
): AsyncIterableIterator<PrivateEndpointConnection[]> {
|
||||
let result = await this._list(resourceGroupName, namespaceName, options);
|
||||
yield result.value || [];
|
||||
let continuationToken = result.nextLink;
|
||||
while (continuationToken) {
|
||||
result = await this._listNext(
|
||||
resourceGroupName,
|
||||
namespaceName,
|
||||
continuationToken,
|
||||
options
|
||||
);
|
||||
continuationToken = result.nextLink;
|
||||
yield result.value || [];
|
||||
}
|
||||
}
|
||||
|
||||
private async *listPagingAll(
|
||||
resourceGroupName: string,
|
||||
namespaceName: string,
|
||||
options?: PrivateEndpointConnectionsListOptionalParams
|
||||
): AsyncIterableIterator<PrivateEndpointConnection> {
|
||||
for await (const page of this.listPagingPage(
|
||||
resourceGroupName,
|
||||
namespaceName,
|
||||
options
|
||||
)) {
|
||||
yield* page;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the available PrivateEndpointConnections within a namespace.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param namespaceName The Namespace name
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
private _list(
|
||||
resourceGroupName: string,
|
||||
namespaceName: string,
|
||||
options?: PrivateEndpointConnectionsListOptionalParams
|
||||
): Promise<PrivateEndpointConnectionsListResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{ resourceGroupName, namespaceName, options },
|
||||
listOperationSpec
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates or updates PrivateEndpointConnections of service namespace.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param namespaceName The Namespace name
|
||||
* @param privateEndpointConnectionName The PrivateEndpointConnection name
|
||||
* @param parameters Parameters supplied to update Status of PrivateEndPoint Connection to namespace
|
||||
* resource.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
createOrUpdate(
|
||||
resourceGroupName: string,
|
||||
namespaceName: string,
|
||||
privateEndpointConnectionName: string,
|
||||
parameters: PrivateEndpointConnection,
|
||||
options?: PrivateEndpointConnectionsCreateOrUpdateOptionalParams
|
||||
): Promise<PrivateEndpointConnectionsCreateOrUpdateResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{
|
||||
resourceGroupName,
|
||||
namespaceName,
|
||||
privateEndpointConnectionName,
|
||||
parameters,
|
||||
options
|
||||
},
|
||||
createOrUpdateOperationSpec
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes an existing namespace. This operation also removes all associated resources under the
|
||||
* namespace.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param namespaceName The Namespace name
|
||||
* @param privateEndpointConnectionName The PrivateEndpointConnection name
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
async beginDelete(
|
||||
resourceGroupName: string,
|
||||
namespaceName: string,
|
||||
privateEndpointConnectionName: string,
|
||||
options?: PrivateEndpointConnectionsDeleteOptionalParams
|
||||
): Promise<PollerLike<PollOperationState<void>, void>> {
|
||||
const directSendOperation = async (
|
||||
args: coreClient.OperationArguments,
|
||||
spec: coreClient.OperationSpec
|
||||
): Promise<void> => {
|
||||
return this.client.sendOperationRequest(args, spec);
|
||||
};
|
||||
const sendOperation = async (
|
||||
args: coreClient.OperationArguments,
|
||||
spec: coreClient.OperationSpec
|
||||
) => {
|
||||
let currentRawResponse:
|
||||
| coreClient.FullOperationResponse
|
||||
| undefined = undefined;
|
||||
const providedCallback = args.options?.onResponse;
|
||||
const callback: coreClient.RawResponseCallback = (
|
||||
rawResponse: coreClient.FullOperationResponse,
|
||||
flatResponse: unknown
|
||||
) => {
|
||||
currentRawResponse = rawResponse;
|
||||
providedCallback?.(rawResponse, flatResponse);
|
||||
};
|
||||
const updatedArgs = {
|
||||
...args,
|
||||
options: {
|
||||
...args.options,
|
||||
onResponse: callback
|
||||
}
|
||||
};
|
||||
const flatResponse = await directSendOperation(updatedArgs, spec);
|
||||
return {
|
||||
flatResponse,
|
||||
rawResponse: {
|
||||
statusCode: currentRawResponse!.status,
|
||||
body: currentRawResponse!.parsedBody,
|
||||
headers: currentRawResponse!.headers.toJSON()
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
const lro = new LroImpl(
|
||||
sendOperation,
|
||||
{
|
||||
resourceGroupName,
|
||||
namespaceName,
|
||||
privateEndpointConnectionName,
|
||||
options
|
||||
},
|
||||
deleteOperationSpec
|
||||
);
|
||||
return new LroEngine(lro, {
|
||||
resumeFrom: options?.resumeFrom,
|
||||
intervalInMs: options?.updateIntervalInMs
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes an existing namespace. This operation also removes all associated resources under the
|
||||
* namespace.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param namespaceName The Namespace name
|
||||
* @param privateEndpointConnectionName The PrivateEndpointConnection name
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
async beginDeleteAndWait(
|
||||
resourceGroupName: string,
|
||||
namespaceName: string,
|
||||
privateEndpointConnectionName: string,
|
||||
options?: PrivateEndpointConnectionsDeleteOptionalParams
|
||||
): Promise<void> {
|
||||
const poller = await this.beginDelete(
|
||||
resourceGroupName,
|
||||
namespaceName,
|
||||
privateEndpointConnectionName,
|
||||
options
|
||||
);
|
||||
return poller.pollUntilDone();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a description for the specified Private Endpoint Connection name.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param namespaceName The Namespace name
|
||||
* @param privateEndpointConnectionName The PrivateEndpointConnection name
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
get(
|
||||
resourceGroupName: string,
|
||||
namespaceName: string,
|
||||
privateEndpointConnectionName: string,
|
||||
options?: PrivateEndpointConnectionsGetOptionalParams
|
||||
): Promise<PrivateEndpointConnectionsGetResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{
|
||||
resourceGroupName,
|
||||
namespaceName,
|
||||
privateEndpointConnectionName,
|
||||
options
|
||||
},
|
||||
getOperationSpec
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* ListNext
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param namespaceName The Namespace name
|
||||
* @param nextLink The nextLink from the previous successful call to the List method.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
private _listNext(
|
||||
resourceGroupName: string,
|
||||
namespaceName: string,
|
||||
nextLink: string,
|
||||
options?: PrivateEndpointConnectionsListNextOptionalParams
|
||||
): Promise<PrivateEndpointConnectionsListNextResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{ resourceGroupName, namespaceName, nextLink, options },
|
||||
listNextOperationSpec
|
||||
);
|
||||
}
|
||||
}
|
||||
// Operation Specifications
|
||||
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
||||
|
||||
const listOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateEndpointConnections",
|
||||
httpMethod: "GET",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.PrivateEndpointConnectionListResult
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.resourceGroupName,
|
||||
Parameters.namespaceName
|
||||
],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
};
|
||||
const createOrUpdateOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}",
|
||||
httpMethod: "PUT",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.PrivateEndpointConnection
|
||||
},
|
||||
201: {
|
||||
bodyMapper: Mappers.PrivateEndpointConnection
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
requestBody: Parameters.parameters8,
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.resourceGroupName,
|
||||
Parameters.namespaceName,
|
||||
Parameters.privateEndpointConnectionName
|
||||
],
|
||||
headerParameters: [Parameters.accept, Parameters.contentType],
|
||||
mediaType: "json",
|
||||
serializer
|
||||
};
|
||||
const deleteOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}",
|
||||
httpMethod: "DELETE",
|
||||
responses: {
|
||||
200: {},
|
||||
201: {},
|
||||
202: {},
|
||||
204: {},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.resourceGroupName,
|
||||
Parameters.namespaceName,
|
||||
Parameters.privateEndpointConnectionName
|
||||
],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
};
|
||||
const getOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}",
|
||||
httpMethod: "GET",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.PrivateEndpointConnection
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.resourceGroupName,
|
||||
Parameters.namespaceName,
|
||||
Parameters.privateEndpointConnectionName
|
||||
],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
};
|
||||
const listNextOperationSpec: coreClient.OperationSpec = {
|
||||
path: "{nextLink}",
|
||||
httpMethod: "GET",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.PrivateEndpointConnectionListResult
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.resourceGroupName,
|
||||
Parameters.nextLink,
|
||||
Parameters.namespaceName
|
||||
],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
};
|
|
@ -0,0 +1,72 @@
|
|||
/*
|
||||
* 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 { PrivateLinkResources } from "../operationsInterfaces";
|
||||
import * as coreClient from "@azure/core-client";
|
||||
import * as Mappers from "../models/mappers";
|
||||
import * as Parameters from "../models/parameters";
|
||||
import { EventHubManagementClientContext } from "../eventHubManagementClientContext";
|
||||
import {
|
||||
PrivateLinkResourcesGetOptionalParams,
|
||||
PrivateLinkResourcesGetResponse
|
||||
} from "../models";
|
||||
|
||||
/** Class containing PrivateLinkResources operations. */
|
||||
export class PrivateLinkResourcesImpl implements PrivateLinkResources {
|
||||
private readonly client: EventHubManagementClientContext;
|
||||
|
||||
/**
|
||||
* Initialize a new instance of the class PrivateLinkResources class.
|
||||
* @param client Reference to the service client
|
||||
*/
|
||||
constructor(client: EventHubManagementClientContext) {
|
||||
this.client = client;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets lists of resources that supports Privatelinks.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param namespaceName The Namespace name
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
get(
|
||||
resourceGroupName: string,
|
||||
namespaceName: string,
|
||||
options?: PrivateLinkResourcesGetOptionalParams
|
||||
): Promise<PrivateLinkResourcesGetResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{ resourceGroupName, namespaceName, options },
|
||||
getOperationSpec
|
||||
);
|
||||
}
|
||||
}
|
||||
// Operation Specifications
|
||||
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
||||
|
||||
const getOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateLinkResources",
|
||||
httpMethod: "GET",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.PrivateLinkResourcesListResult
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.resourceGroupName,
|
||||
Parameters.namespaceName
|
||||
],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
};
|
|
@ -1,26 +1,34 @@
|
|||
/*
|
||||
* 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/regionsMappers";
|
||||
import "@azure/core-paging";
|
||||
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
||||
import { Regions } from "../operationsInterfaces";
|
||||
import * as coreClient from "@azure/core-client";
|
||||
import * as Mappers from "../models/mappers";
|
||||
import * as Parameters from "../models/parameters";
|
||||
import { EventHubManagementClientContext } from "../eventHubManagementClientContext";
|
||||
import {
|
||||
MessagingRegions,
|
||||
RegionsListBySkuNextOptionalParams,
|
||||
RegionsListBySkuOptionalParams,
|
||||
RegionsListBySkuResponse,
|
||||
RegionsListBySkuNextResponse
|
||||
} from "../models";
|
||||
|
||||
/** Class representing a Regions. */
|
||||
export class Regions {
|
||||
/// <reference lib="esnext.asynciterable" />
|
||||
/** Class containing Regions operations. */
|
||||
export class RegionsImpl implements Regions {
|
||||
private readonly client: EventHubManagementClientContext;
|
||||
|
||||
/**
|
||||
* Create a Regions.
|
||||
* @param {EventHubManagementClientContext} client Reference to the service client.
|
||||
* Initialize a new instance of the class Regions class.
|
||||
* @param client Reference to the service client
|
||||
*/
|
||||
constructor(client: EventHubManagementClientContext) {
|
||||
this.client = client;
|
||||
|
@ -29,103 +37,119 @@ export class Regions {
|
|||
/**
|
||||
* Gets the available Regions for a given sku
|
||||
* @param sku The sku type.
|
||||
* @param [options] The optional parameters
|
||||
* @returns Promise<Models.RegionsListBySkuResponse>
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
listBySku(sku: string, options?: msRest.RequestOptionsBase): Promise<Models.RegionsListBySkuResponse>;
|
||||
/**
|
||||
* @param sku The sku type.
|
||||
* @param callback The callback
|
||||
*/
|
||||
listBySku(sku: string, callback: msRest.ServiceCallback<Models.MessagingRegionsListResult>): void;
|
||||
/**
|
||||
* @param sku The sku type.
|
||||
* @param options The optional parameters
|
||||
* @param callback The callback
|
||||
*/
|
||||
listBySku(sku: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.MessagingRegionsListResult>): void;
|
||||
listBySku(sku: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.MessagingRegionsListResult>, callback?: msRest.ServiceCallback<Models.MessagingRegionsListResult>): Promise<Models.RegionsListBySkuResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{
|
||||
sku,
|
||||
options
|
||||
public listBySku(
|
||||
sku: string,
|
||||
options?: RegionsListBySkuOptionalParams
|
||||
): PagedAsyncIterableIterator<MessagingRegions> {
|
||||
const iter = this.listBySkuPagingAll(sku, options);
|
||||
return {
|
||||
next() {
|
||||
return iter.next();
|
||||
},
|
||||
listBySkuOperationSpec,
|
||||
callback) as Promise<Models.RegionsListBySkuResponse>;
|
||||
[Symbol.asyncIterator]() {
|
||||
return this;
|
||||
},
|
||||
byPage: () => {
|
||||
return this.listBySkuPagingPage(sku, options);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private async *listBySkuPagingPage(
|
||||
sku: string,
|
||||
options?: RegionsListBySkuOptionalParams
|
||||
): AsyncIterableIterator<MessagingRegions[]> {
|
||||
let result = await this._listBySku(sku, options);
|
||||
yield result.value || [];
|
||||
let continuationToken = result.nextLink;
|
||||
while (continuationToken) {
|
||||
result = await this._listBySkuNext(sku, continuationToken, options);
|
||||
continuationToken = result.nextLink;
|
||||
yield result.value || [];
|
||||
}
|
||||
}
|
||||
|
||||
private async *listBySkuPagingAll(
|
||||
sku: string,
|
||||
options?: RegionsListBySkuOptionalParams
|
||||
): AsyncIterableIterator<MessagingRegions> {
|
||||
for await (const page of this.listBySkuPagingPage(sku, options)) {
|
||||
yield* page;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the available Regions for a given sku
|
||||
* @param nextPageLink The NextLink from the previous successful call to List operation.
|
||||
* @param [options] The optional parameters
|
||||
* @returns Promise<Models.RegionsListBySkuNextResponse>
|
||||
* @param sku The sku type.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
listBySkuNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.RegionsListBySkuNextResponse>;
|
||||
/**
|
||||
* @param nextPageLink The NextLink from the previous successful call to List operation.
|
||||
* @param callback The callback
|
||||
*/
|
||||
listBySkuNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.MessagingRegionsListResult>): void;
|
||||
/**
|
||||
* @param nextPageLink The NextLink from the previous successful call to List operation.
|
||||
* @param options The optional parameters
|
||||
* @param callback The callback
|
||||
*/
|
||||
listBySkuNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.MessagingRegionsListResult>): void;
|
||||
listBySkuNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.MessagingRegionsListResult>, callback?: msRest.ServiceCallback<Models.MessagingRegionsListResult>): Promise<Models.RegionsListBySkuNextResponse> {
|
||||
private _listBySku(
|
||||
sku: string,
|
||||
options?: RegionsListBySkuOptionalParams
|
||||
): Promise<RegionsListBySkuResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{
|
||||
nextPageLink,
|
||||
options
|
||||
},
|
||||
listBySkuNextOperationSpec,
|
||||
callback) as Promise<Models.RegionsListBySkuNextResponse>;
|
||||
{ sku, options },
|
||||
listBySkuOperationSpec
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* ListBySkuNext
|
||||
* @param sku The sku type.
|
||||
* @param nextLink The nextLink from the previous successful call to the ListBySku method.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
private _listBySkuNext(
|
||||
sku: string,
|
||||
nextLink: string,
|
||||
options?: RegionsListBySkuNextOptionalParams
|
||||
): Promise<RegionsListBySkuNextResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{ sku, nextLink, options },
|
||||
listBySkuNextOperationSpec
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Operation Specifications
|
||||
const serializer = new msRest.Serializer(Mappers);
|
||||
const listBySkuOperationSpec: msRest.OperationSpec = {
|
||||
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
||||
|
||||
const listBySkuOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/providers/Microsoft.EventHub/sku/{sku}/regions",
|
||||
httpMethod: "GET",
|
||||
path: "subscriptions/{subscriptionId}/providers/Microsoft.EventHub/sku/{sku}/regions",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.MessagingRegionsListResult
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.sku],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
};
|
||||
const listBySkuNextOperationSpec: coreClient.OperationSpec = {
|
||||
path: "{nextLink}",
|
||||
httpMethod: "GET",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.MessagingRegionsListResult
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.nextLink,
|
||||
Parameters.sku
|
||||
],
|
||||
queryParameters: [
|
||||
Parameters.apiVersion
|
||||
],
|
||||
headerParameters: [
|
||||
Parameters.acceptLanguage
|
||||
],
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.MessagingRegionsListResult
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
serializer
|
||||
};
|
||||
|
||||
const listBySkuNextOperationSpec: msRest.OperationSpec = {
|
||||
httpMethod: "GET",
|
||||
baseUrl: "https://management.azure.com",
|
||||
path: "{nextLink}",
|
||||
urlParameters: [
|
||||
Parameters.nextPageLink
|
||||
],
|
||||
headerParameters: [
|
||||
Parameters.acceptLanguage
|
||||
],
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.MessagingRegionsListResult
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
};
|
||||
|
|
|
@ -0,0 +1,153 @@
|
|||
/*
|
||||
* 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 { PollerLike, PollOperationState } from "@azure/core-lro";
|
||||
import {
|
||||
Cluster,
|
||||
ClustersListByResourceGroupOptionalParams,
|
||||
ClustersListAvailableClusterRegionOptionalParams,
|
||||
ClustersListAvailableClusterRegionResponse,
|
||||
ClustersGetOptionalParams,
|
||||
ClustersGetResponse,
|
||||
ClustersCreateOrUpdateOptionalParams,
|
||||
ClustersCreateOrUpdateResponse,
|
||||
ClustersUpdateOptionalParams,
|
||||
ClustersUpdateResponse,
|
||||
ClustersDeleteOptionalParams,
|
||||
ClustersListNamespacesOptionalParams,
|
||||
ClustersListNamespacesResponse
|
||||
} from "../models";
|
||||
|
||||
/// <reference lib="esnext.asynciterable" />
|
||||
/** Interface representing a Clusters. */
|
||||
export interface Clusters {
|
||||
/**
|
||||
* Lists the available Event Hubs Clusters within an ARM resource group
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
listByResourceGroup(
|
||||
resourceGroupName: string,
|
||||
options?: ClustersListByResourceGroupOptionalParams
|
||||
): PagedAsyncIterableIterator<Cluster>;
|
||||
/**
|
||||
* List the quantity of available pre-provisioned Event Hubs Clusters, indexed by Azure region.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
listAvailableClusterRegion(
|
||||
options?: ClustersListAvailableClusterRegionOptionalParams
|
||||
): Promise<ClustersListAvailableClusterRegionResponse>;
|
||||
/**
|
||||
* Gets the resource description of the specified Event Hubs Cluster.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param clusterName The name of the Event Hubs Cluster.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
get(
|
||||
resourceGroupName: string,
|
||||
clusterName: string,
|
||||
options?: ClustersGetOptionalParams
|
||||
): Promise<ClustersGetResponse>;
|
||||
/**
|
||||
* Creates or updates an instance of an Event Hubs Cluster.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param clusterName The name of the Event Hubs Cluster.
|
||||
* @param parameters Parameters for creating a eventhub cluster resource.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
beginCreateOrUpdate(
|
||||
resourceGroupName: string,
|
||||
clusterName: string,
|
||||
parameters: Cluster,
|
||||
options?: ClustersCreateOrUpdateOptionalParams
|
||||
): Promise<
|
||||
PollerLike<
|
||||
PollOperationState<ClustersCreateOrUpdateResponse>,
|
||||
ClustersCreateOrUpdateResponse
|
||||
>
|
||||
>;
|
||||
/**
|
||||
* Creates or updates an instance of an Event Hubs Cluster.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param clusterName The name of the Event Hubs Cluster.
|
||||
* @param parameters Parameters for creating a eventhub cluster resource.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
beginCreateOrUpdateAndWait(
|
||||
resourceGroupName: string,
|
||||
clusterName: string,
|
||||
parameters: Cluster,
|
||||
options?: ClustersCreateOrUpdateOptionalParams
|
||||
): Promise<ClustersCreateOrUpdateResponse>;
|
||||
/**
|
||||
* Modifies mutable properties on the Event Hubs Cluster. This operation is idempotent.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param clusterName The name of the Event Hubs Cluster.
|
||||
* @param parameters The properties of the Event Hubs Cluster which should be updated.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
beginUpdate(
|
||||
resourceGroupName: string,
|
||||
clusterName: string,
|
||||
parameters: Cluster,
|
||||
options?: ClustersUpdateOptionalParams
|
||||
): Promise<
|
||||
PollerLike<
|
||||
PollOperationState<ClustersUpdateResponse>,
|
||||
ClustersUpdateResponse
|
||||
>
|
||||
>;
|
||||
/**
|
||||
* Modifies mutable properties on the Event Hubs Cluster. This operation is idempotent.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param clusterName The name of the Event Hubs Cluster.
|
||||
* @param parameters The properties of the Event Hubs Cluster which should be updated.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
beginUpdateAndWait(
|
||||
resourceGroupName: string,
|
||||
clusterName: string,
|
||||
parameters: Cluster,
|
||||
options?: ClustersUpdateOptionalParams
|
||||
): Promise<ClustersUpdateResponse>;
|
||||
/**
|
||||
* Deletes an existing Event Hubs Cluster. This operation is idempotent.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param clusterName The name of the Event Hubs Cluster.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
beginDelete(
|
||||
resourceGroupName: string,
|
||||
clusterName: string,
|
||||
options?: ClustersDeleteOptionalParams
|
||||
): Promise<PollerLike<PollOperationState<void>, void>>;
|
||||
/**
|
||||
* Deletes an existing Event Hubs Cluster. This operation is idempotent.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param clusterName The name of the Event Hubs Cluster.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
beginDeleteAndWait(
|
||||
resourceGroupName: string,
|
||||
clusterName: string,
|
||||
options?: ClustersDeleteOptionalParams
|
||||
): Promise<void>;
|
||||
/**
|
||||
* List all Event Hubs Namespace IDs in an Event Hubs Dedicated Cluster.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param clusterName The name of the Event Hubs Cluster.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
listNamespaces(
|
||||
resourceGroupName: string,
|
||||
clusterName: string,
|
||||
options?: ClustersListNamespacesOptionalParams
|
||||
): Promise<ClustersListNamespacesResponse>;
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
/*
|
||||
* 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 {
|
||||
ClusterQuotaConfigurationProperties,
|
||||
ConfigurationPatchOptionalParams,
|
||||
ConfigurationPatchResponse,
|
||||
ConfigurationGetOptionalParams,
|
||||
ConfigurationGetResponse
|
||||
} from "../models";
|
||||
|
||||
/** Interface representing a Configuration. */
|
||||
export interface Configuration {
|
||||
/**
|
||||
* Replace all specified Event Hubs Cluster settings with those contained in the request body. Leaves
|
||||
* the settings not specified in the request body unmodified.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param clusterName The name of the Event Hubs Cluster.
|
||||
* @param parameters Parameters for creating an Event Hubs Cluster resource.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
patch(
|
||||
resourceGroupName: string,
|
||||
clusterName: string,
|
||||
parameters: ClusterQuotaConfigurationProperties,
|
||||
options?: ConfigurationPatchOptionalParams
|
||||
): Promise<ConfigurationPatchResponse>;
|
||||
/**
|
||||
* Get all Event Hubs Cluster settings - a collection of key/value pairs which represent the quotas and
|
||||
* settings imposed on the cluster.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param clusterName The name of the Event Hubs Cluster.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
get(
|
||||
resourceGroupName: string,
|
||||
clusterName: string,
|
||||
options?: ConfigurationGetOptionalParams
|
||||
): Promise<ConfigurationGetResponse>;
|
||||
}
|
|
@ -0,0 +1,85 @@
|
|||
/*
|
||||
* 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 {
|
||||
ConsumerGroup,
|
||||
ConsumerGroupsListByEventHubOptionalParams,
|
||||
ConsumerGroupsCreateOrUpdateOptionalParams,
|
||||
ConsumerGroupsCreateOrUpdateResponse,
|
||||
ConsumerGroupsDeleteOptionalParams,
|
||||
ConsumerGroupsGetOptionalParams,
|
||||
ConsumerGroupsGetResponse
|
||||
} from "../models";
|
||||
|
||||
/// <reference lib="esnext.asynciterable" />
|
||||
/** Interface representing a ConsumerGroups. */
|
||||
export interface ConsumerGroups {
|
||||
/**
|
||||
* Gets all the consumer groups in a Namespace. An empty feed is returned if no consumer group exists
|
||||
* in the Namespace.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param namespaceName The Namespace name
|
||||
* @param eventHubName The Event Hub name
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
listByEventHub(
|
||||
resourceGroupName: string,
|
||||
namespaceName: string,
|
||||
eventHubName: string,
|
||||
options?: ConsumerGroupsListByEventHubOptionalParams
|
||||
): PagedAsyncIterableIterator<ConsumerGroup>;
|
||||
/**
|
||||
* Creates or updates an Event Hubs consumer group as a nested resource within a Namespace.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param namespaceName The Namespace name
|
||||
* @param eventHubName The Event Hub name
|
||||
* @param consumerGroupName The consumer group name
|
||||
* @param parameters Parameters supplied to create or update a consumer group resource.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
createOrUpdate(
|
||||
resourceGroupName: string,
|
||||
namespaceName: string,
|
||||
eventHubName: string,
|
||||
consumerGroupName: string,
|
||||
parameters: ConsumerGroup,
|
||||
options?: ConsumerGroupsCreateOrUpdateOptionalParams
|
||||
): Promise<ConsumerGroupsCreateOrUpdateResponse>;
|
||||
/**
|
||||
* Deletes a consumer group from the specified Event Hub and resource group.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param namespaceName The Namespace name
|
||||
* @param eventHubName The Event Hub name
|
||||
* @param consumerGroupName The consumer group name
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
delete(
|
||||
resourceGroupName: string,
|
||||
namespaceName: string,
|
||||
eventHubName: string,
|
||||
consumerGroupName: string,
|
||||
options?: ConsumerGroupsDeleteOptionalParams
|
||||
): Promise<void>;
|
||||
/**
|
||||
* Gets a description for the specified consumer group.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param namespaceName The Namespace name
|
||||
* @param eventHubName The Event Hub name
|
||||
* @param consumerGroupName The consumer group name
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
get(
|
||||
resourceGroupName: string,
|
||||
namespaceName: string,
|
||||
eventHubName: string,
|
||||
consumerGroupName: string,
|
||||
options?: ConsumerGroupsGetOptionalParams
|
||||
): Promise<ConsumerGroupsGetResponse>;
|
||||
}
|
|
@ -0,0 +1,170 @@
|
|||
/*
|
||||
* 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 {
|
||||
AuthorizationRule,
|
||||
DisasterRecoveryConfigsListAuthorizationRulesOptionalParams,
|
||||
ArmDisasterRecovery,
|
||||
DisasterRecoveryConfigsListOptionalParams,
|
||||
DisasterRecoveryConfigsGetAuthorizationRuleOptionalParams,
|
||||
DisasterRecoveryConfigsGetAuthorizationRuleResponse,
|
||||
DisasterRecoveryConfigsListKeysOptionalParams,
|
||||
DisasterRecoveryConfigsListKeysResponse,
|
||||
CheckNameAvailabilityParameter,
|
||||
DisasterRecoveryConfigsCheckNameAvailabilityOptionalParams,
|
||||
DisasterRecoveryConfigsCheckNameAvailabilityResponse,
|
||||
DisasterRecoveryConfigsCreateOrUpdateOptionalParams,
|
||||
DisasterRecoveryConfigsCreateOrUpdateResponse,
|
||||
DisasterRecoveryConfigsDeleteOptionalParams,
|
||||
DisasterRecoveryConfigsGetOptionalParams,
|
||||
DisasterRecoveryConfigsGetResponse,
|
||||
DisasterRecoveryConfigsBreakPairingOptionalParams,
|
||||
DisasterRecoveryConfigsFailOverOptionalParams
|
||||
} from "../models";
|
||||
|
||||
/// <reference lib="esnext.asynciterable" />
|
||||
/** Interface representing a DisasterRecoveryConfigs. */
|
||||
export interface DisasterRecoveryConfigs {
|
||||
/**
|
||||
* Gets a list of authorization rules for a Namespace.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param namespaceName The Namespace name
|
||||
* @param alias The Disaster Recovery configuration name
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
listAuthorizationRules(
|
||||
resourceGroupName: string,
|
||||
namespaceName: string,
|
||||
alias: string,
|
||||
options?: DisasterRecoveryConfigsListAuthorizationRulesOptionalParams
|
||||
): PagedAsyncIterableIterator<AuthorizationRule>;
|
||||
/**
|
||||
* Gets all Alias(Disaster Recovery configurations)
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param namespaceName The Namespace name
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
list(
|
||||
resourceGroupName: string,
|
||||
namespaceName: string,
|
||||
options?: DisasterRecoveryConfigsListOptionalParams
|
||||
): PagedAsyncIterableIterator<ArmDisasterRecovery>;
|
||||
/**
|
||||
* Gets an AuthorizationRule for a Namespace by rule name.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param namespaceName The Namespace name
|
||||
* @param alias The Disaster Recovery configuration name
|
||||
* @param authorizationRuleName The authorization rule name.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
getAuthorizationRule(
|
||||
resourceGroupName: string,
|
||||
namespaceName: string,
|
||||
alias: string,
|
||||
authorizationRuleName: string,
|
||||
options?: DisasterRecoveryConfigsGetAuthorizationRuleOptionalParams
|
||||
): Promise<DisasterRecoveryConfigsGetAuthorizationRuleResponse>;
|
||||
/**
|
||||
* Gets the primary and secondary connection strings for the Namespace.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param namespaceName The Namespace name
|
||||
* @param alias The Disaster Recovery configuration name
|
||||
* @param authorizationRuleName The authorization rule name.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
listKeys(
|
||||
resourceGroupName: string,
|
||||
namespaceName: string,
|
||||
alias: string,
|
||||
authorizationRuleName: string,
|
||||
options?: DisasterRecoveryConfigsListKeysOptionalParams
|
||||
): Promise<DisasterRecoveryConfigsListKeysResponse>;
|
||||
/**
|
||||
* Check the give Namespace name availability.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param namespaceName The Namespace name
|
||||
* @param parameters Parameters to check availability of the given Alias name
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
checkNameAvailability(
|
||||
resourceGroupName: string,
|
||||
namespaceName: string,
|
||||
parameters: CheckNameAvailabilityParameter,
|
||||
options?: DisasterRecoveryConfigsCheckNameAvailabilityOptionalParams
|
||||
): Promise<DisasterRecoveryConfigsCheckNameAvailabilityResponse>;
|
||||
/**
|
||||
* Creates or updates a new Alias(Disaster Recovery configuration)
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param namespaceName The Namespace name
|
||||
* @param alias The Disaster Recovery configuration name
|
||||
* @param parameters Parameters required to create an Alias(Disaster Recovery configuration)
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
createOrUpdate(
|
||||
resourceGroupName: string,
|
||||
namespaceName: string,
|
||||
alias: string,
|
||||
parameters: ArmDisasterRecovery,
|
||||
options?: DisasterRecoveryConfigsCreateOrUpdateOptionalParams
|
||||
): Promise<DisasterRecoveryConfigsCreateOrUpdateResponse>;
|
||||
/**
|
||||
* Deletes an Alias(Disaster Recovery configuration)
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param namespaceName The Namespace name
|
||||
* @param alias The Disaster Recovery configuration name
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
delete(
|
||||
resourceGroupName: string,
|
||||
namespaceName: string,
|
||||
alias: string,
|
||||
options?: DisasterRecoveryConfigsDeleteOptionalParams
|
||||
): Promise<void>;
|
||||
/**
|
||||
* Retrieves Alias(Disaster Recovery configuration) for primary or secondary namespace
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param namespaceName The Namespace name
|
||||
* @param alias The Disaster Recovery configuration name
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
get(
|
||||
resourceGroupName: string,
|
||||
namespaceName: string,
|
||||
alias: string,
|
||||
options?: DisasterRecoveryConfigsGetOptionalParams
|
||||
): Promise<DisasterRecoveryConfigsGetResponse>;
|
||||
/**
|
||||
* This operation disables the Disaster Recovery and stops replicating changes from primary to
|
||||
* secondary namespaces
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param namespaceName The Namespace name
|
||||
* @param alias The Disaster Recovery configuration name
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
breakPairing(
|
||||
resourceGroupName: string,
|
||||
namespaceName: string,
|
||||
alias: string,
|
||||
options?: DisasterRecoveryConfigsBreakPairingOptionalParams
|
||||
): Promise<void>;
|
||||
/**
|
||||
* Invokes GEO DR failover and reconfigure the alias to point to the secondary namespace
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param namespaceName The Namespace name
|
||||
* @param alias The Disaster Recovery configuration name
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
failOver(
|
||||
resourceGroupName: string,
|
||||
namespaceName: string,
|
||||
alias: string,
|
||||
options?: DisasterRecoveryConfigsFailOverOptionalParams
|
||||
): Promise<void>;
|
||||
}
|
|
@ -0,0 +1,182 @@
|
|||
/*
|
||||
* 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 {
|
||||
AuthorizationRule,
|
||||
EventHubsListAuthorizationRulesOptionalParams,
|
||||
Eventhub,
|
||||
EventHubsListByNamespaceOptionalParams,
|
||||
EventHubsCreateOrUpdateAuthorizationRuleOptionalParams,
|
||||
EventHubsCreateOrUpdateAuthorizationRuleResponse,
|
||||
EventHubsGetAuthorizationRuleOptionalParams,
|
||||
EventHubsGetAuthorizationRuleResponse,
|
||||
EventHubsDeleteAuthorizationRuleOptionalParams,
|
||||
EventHubsListKeysOptionalParams,
|
||||
EventHubsListKeysResponse,
|
||||
RegenerateAccessKeyParameters,
|
||||
EventHubsRegenerateKeysOptionalParams,
|
||||
EventHubsRegenerateKeysResponse,
|
||||
EventHubsCreateOrUpdateOptionalParams,
|
||||
EventHubsCreateOrUpdateResponse,
|
||||
EventHubsDeleteOptionalParams,
|
||||
EventHubsGetOptionalParams,
|
||||
EventHubsGetResponse
|
||||
} from "../models";
|
||||
|
||||
/// <reference lib="esnext.asynciterable" />
|
||||
/** Interface representing a EventHubs. */
|
||||
export interface EventHubs {
|
||||
/**
|
||||
* Gets the authorization rules for an Event Hub.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param namespaceName The Namespace name
|
||||
* @param eventHubName The Event Hub name
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
listAuthorizationRules(
|
||||
resourceGroupName: string,
|
||||
namespaceName: string,
|
||||
eventHubName: string,
|
||||
options?: EventHubsListAuthorizationRulesOptionalParams
|
||||
): PagedAsyncIterableIterator<AuthorizationRule>;
|
||||
/**
|
||||
* Gets all the Event Hubs in a Namespace.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param namespaceName The Namespace name
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
listByNamespace(
|
||||
resourceGroupName: string,
|
||||
namespaceName: string,
|
||||
options?: EventHubsListByNamespaceOptionalParams
|
||||
): PagedAsyncIterableIterator<Eventhub>;
|
||||
/**
|
||||
* Creates or updates an AuthorizationRule for the specified Event Hub. Creation/update of the
|
||||
* AuthorizationRule will take a few seconds to take effect.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param namespaceName The Namespace name
|
||||
* @param eventHubName The Event Hub name
|
||||
* @param authorizationRuleName The authorization rule name.
|
||||
* @param parameters The shared access AuthorizationRule.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
createOrUpdateAuthorizationRule(
|
||||
resourceGroupName: string,
|
||||
namespaceName: string,
|
||||
eventHubName: string,
|
||||
authorizationRuleName: string,
|
||||
parameters: AuthorizationRule,
|
||||
options?: EventHubsCreateOrUpdateAuthorizationRuleOptionalParams
|
||||
): Promise<EventHubsCreateOrUpdateAuthorizationRuleResponse>;
|
||||
/**
|
||||
* Gets an AuthorizationRule for an Event Hub by rule name.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param namespaceName The Namespace name
|
||||
* @param eventHubName The Event Hub name
|
||||
* @param authorizationRuleName The authorization rule name.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
getAuthorizationRule(
|
||||
resourceGroupName: string,
|
||||
namespaceName: string,
|
||||
eventHubName: string,
|
||||
authorizationRuleName: string,
|
||||
options?: EventHubsGetAuthorizationRuleOptionalParams
|
||||
): Promise<EventHubsGetAuthorizationRuleResponse>;
|
||||
/**
|
||||
* Deletes an Event Hub AuthorizationRule.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param namespaceName The Namespace name
|
||||
* @param eventHubName The Event Hub name
|
||||
* @param authorizationRuleName The authorization rule name.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
deleteAuthorizationRule(
|
||||
resourceGroupName: string,
|
||||
namespaceName: string,
|
||||
eventHubName: string,
|
||||
authorizationRuleName: string,
|
||||
options?: EventHubsDeleteAuthorizationRuleOptionalParams
|
||||
): Promise<void>;
|
||||
/**
|
||||
* Gets the ACS and SAS connection strings for the Event Hub.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param namespaceName The Namespace name
|
||||
* @param eventHubName The Event Hub name
|
||||
* @param authorizationRuleName The authorization rule name.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
listKeys(
|
||||
resourceGroupName: string,
|
||||
namespaceName: string,
|
||||
eventHubName: string,
|
||||
authorizationRuleName: string,
|
||||
options?: EventHubsListKeysOptionalParams
|
||||
): Promise<EventHubsListKeysResponse>;
|
||||
/**
|
||||
* Regenerates the ACS and SAS connection strings for the Event Hub.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param namespaceName The Namespace name
|
||||
* @param eventHubName The Event Hub name
|
||||
* @param authorizationRuleName The authorization rule name.
|
||||
* @param parameters Parameters supplied to regenerate the AuthorizationRule Keys
|
||||
* (PrimaryKey/SecondaryKey).
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
regenerateKeys(
|
||||
resourceGroupName: string,
|
||||
namespaceName: string,
|
||||
eventHubName: string,
|
||||
authorizationRuleName: string,
|
||||
parameters: RegenerateAccessKeyParameters,
|
||||
options?: EventHubsRegenerateKeysOptionalParams
|
||||
): Promise<EventHubsRegenerateKeysResponse>;
|
||||
/**
|
||||
* Creates or updates a new Event Hub as a nested resource within a Namespace.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param namespaceName The Namespace name
|
||||
* @param eventHubName The Event Hub name
|
||||
* @param parameters Parameters supplied to create an Event Hub resource.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
createOrUpdate(
|
||||
resourceGroupName: string,
|
||||
namespaceName: string,
|
||||
eventHubName: string,
|
||||
parameters: Eventhub,
|
||||
options?: EventHubsCreateOrUpdateOptionalParams
|
||||
): Promise<EventHubsCreateOrUpdateResponse>;
|
||||
/**
|
||||
* Deletes an Event Hub from the specified Namespace and resource group.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param namespaceName The Namespace name
|
||||
* @param eventHubName The Event Hub name
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
delete(
|
||||
resourceGroupName: string,
|
||||
namespaceName: string,
|
||||
eventHubName: string,
|
||||
options?: EventHubsDeleteOptionalParams
|
||||
): Promise<void>;
|
||||
/**
|
||||
* Gets an Event Hubs description for the specified Event Hub.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param namespaceName The Namespace name
|
||||
* @param eventHubName The Event Hub name
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
get(
|
||||
resourceGroupName: string,
|
||||
namespaceName: string,
|
||||
eventHubName: string,
|
||||
options?: EventHubsGetOptionalParams
|
||||
): Promise<EventHubsGetResponse>;
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
/*
|
||||
* 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 "./clusters";
|
||||
export * from "./namespaces";
|
||||
export * from "./privateEndpointConnections";
|
||||
export * from "./privateLinkResources";
|
||||
export * from "./configuration";
|
||||
export * from "./disasterRecoveryConfigs";
|
||||
export * from "./eventHubs";
|
||||
export * from "./consumerGroups";
|
||||
export * from "./operations";
|
||||
export * from "./regions";
|
|
@ -0,0 +1,377 @@
|
|||
/*
|
||||
* 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 { PollerLike, PollOperationState } from "@azure/core-lro";
|
||||
import {
|
||||
IpFilterRule,
|
||||
NamespacesListIPFilterRulesOptionalParams,
|
||||
EHNamespace,
|
||||
NamespacesListOptionalParams,
|
||||
NamespacesListByResourceGroupOptionalParams,
|
||||
VirtualNetworkRule,
|
||||
NamespacesListVirtualNetworkRulesOptionalParams,
|
||||
AuthorizationRule,
|
||||
NamespacesListAuthorizationRulesOptionalParams,
|
||||
NamespacesCreateOrUpdateIpFilterRuleOptionalParams,
|
||||
NamespacesCreateOrUpdateIpFilterRuleResponse,
|
||||
NamespacesDeleteIpFilterRuleOptionalParams,
|
||||
NamespacesGetIpFilterRuleOptionalParams,
|
||||
NamespacesGetIpFilterRuleResponse,
|
||||
NamespacesCreateOrUpdateOptionalParams,
|
||||
NamespacesCreateOrUpdateResponse,
|
||||
NamespacesDeleteOptionalParams,
|
||||
NamespacesGetOptionalParams,
|
||||
NamespacesGetResponse,
|
||||
NamespacesUpdateOptionalParams,
|
||||
NamespacesUpdateResponse,
|
||||
NamespacesCreateOrUpdateVirtualNetworkRuleOptionalParams,
|
||||
NamespacesCreateOrUpdateVirtualNetworkRuleResponse,
|
||||
NamespacesDeleteVirtualNetworkRuleOptionalParams,
|
||||
NamespacesGetVirtualNetworkRuleOptionalParams,
|
||||
NamespacesGetVirtualNetworkRuleResponse,
|
||||
NetworkRuleSet,
|
||||
NamespacesCreateOrUpdateNetworkRuleSetOptionalParams,
|
||||
NamespacesCreateOrUpdateNetworkRuleSetResponse,
|
||||
NamespacesGetNetworkRuleSetOptionalParams,
|
||||
NamespacesGetNetworkRuleSetResponse,
|
||||
NamespacesCreateOrUpdateAuthorizationRuleOptionalParams,
|
||||
NamespacesCreateOrUpdateAuthorizationRuleResponse,
|
||||
NamespacesDeleteAuthorizationRuleOptionalParams,
|
||||
NamespacesGetAuthorizationRuleOptionalParams,
|
||||
NamespacesGetAuthorizationRuleResponse,
|
||||
NamespacesListKeysOptionalParams,
|
||||
NamespacesListKeysResponse,
|
||||
RegenerateAccessKeyParameters,
|
||||
NamespacesRegenerateKeysOptionalParams,
|
||||
NamespacesRegenerateKeysResponse,
|
||||
CheckNameAvailabilityParameter,
|
||||
NamespacesCheckNameAvailabilityOptionalParams,
|
||||
NamespacesCheckNameAvailabilityResponse
|
||||
} from "../models";
|
||||
|
||||
/// <reference lib="esnext.asynciterable" />
|
||||
/** Interface representing a Namespaces. */
|
||||
export interface Namespaces {
|
||||
/**
|
||||
* Gets a list of IP Filter rules for a Namespace.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param namespaceName The Namespace name
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
listIPFilterRules(
|
||||
resourceGroupName: string,
|
||||
namespaceName: string,
|
||||
options?: NamespacesListIPFilterRulesOptionalParams
|
||||
): PagedAsyncIterableIterator<IpFilterRule>;
|
||||
/**
|
||||
* Lists all the available Namespaces within a subscription, irrespective of the resource groups.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
list(
|
||||
options?: NamespacesListOptionalParams
|
||||
): PagedAsyncIterableIterator<EHNamespace>;
|
||||
/**
|
||||
* Lists the available Namespaces within a resource group.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
listByResourceGroup(
|
||||
resourceGroupName: string,
|
||||
options?: NamespacesListByResourceGroupOptionalParams
|
||||
): PagedAsyncIterableIterator<EHNamespace>;
|
||||
/**
|
||||
* Gets a list of VirtualNetwork rules for a Namespace.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param namespaceName The Namespace name
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
listVirtualNetworkRules(
|
||||
resourceGroupName: string,
|
||||
namespaceName: string,
|
||||
options?: NamespacesListVirtualNetworkRulesOptionalParams
|
||||
): PagedAsyncIterableIterator<VirtualNetworkRule>;
|
||||
/**
|
||||
* Gets a list of authorization rules for a Namespace.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param namespaceName The Namespace name
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
listAuthorizationRules(
|
||||
resourceGroupName: string,
|
||||
namespaceName: string,
|
||||
options?: NamespacesListAuthorizationRulesOptionalParams
|
||||
): PagedAsyncIterableIterator<AuthorizationRule>;
|
||||
/**
|
||||
* Creates or updates an IpFilterRule for a Namespace.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param namespaceName The Namespace name
|
||||
* @param ipFilterRuleName The IP Filter Rule name.
|
||||
* @param parameters The Namespace IpFilterRule.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
createOrUpdateIpFilterRule(
|
||||
resourceGroupName: string,
|
||||
namespaceName: string,
|
||||
ipFilterRuleName: string,
|
||||
parameters: IpFilterRule,
|
||||
options?: NamespacesCreateOrUpdateIpFilterRuleOptionalParams
|
||||
): Promise<NamespacesCreateOrUpdateIpFilterRuleResponse>;
|
||||
/**
|
||||
* Deletes an IpFilterRule for a Namespace.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param namespaceName The Namespace name
|
||||
* @param ipFilterRuleName The IP Filter Rule name.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
deleteIpFilterRule(
|
||||
resourceGroupName: string,
|
||||
namespaceName: string,
|
||||
ipFilterRuleName: string,
|
||||
options?: NamespacesDeleteIpFilterRuleOptionalParams
|
||||
): Promise<void>;
|
||||
/**
|
||||
* Gets an IpFilterRule for a Namespace by rule name.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param namespaceName The Namespace name
|
||||
* @param ipFilterRuleName The IP Filter Rule name.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
getIpFilterRule(
|
||||
resourceGroupName: string,
|
||||
namespaceName: string,
|
||||
ipFilterRuleName: string,
|
||||
options?: NamespacesGetIpFilterRuleOptionalParams
|
||||
): Promise<NamespacesGetIpFilterRuleResponse>;
|
||||
/**
|
||||
* Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This
|
||||
* operation is idempotent.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param namespaceName The Namespace name
|
||||
* @param parameters Parameters for creating a namespace resource.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
beginCreateOrUpdate(
|
||||
resourceGroupName: string,
|
||||
namespaceName: string,
|
||||
parameters: EHNamespace,
|
||||
options?: NamespacesCreateOrUpdateOptionalParams
|
||||
): Promise<
|
||||
PollerLike<
|
||||
PollOperationState<NamespacesCreateOrUpdateResponse>,
|
||||
NamespacesCreateOrUpdateResponse
|
||||
>
|
||||
>;
|
||||
/**
|
||||
* Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This
|
||||
* operation is idempotent.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param namespaceName The Namespace name
|
||||
* @param parameters Parameters for creating a namespace resource.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
beginCreateOrUpdateAndWait(
|
||||
resourceGroupName: string,
|
||||
namespaceName: string,
|
||||
parameters: EHNamespace,
|
||||
options?: NamespacesCreateOrUpdateOptionalParams
|
||||
): Promise<NamespacesCreateOrUpdateResponse>;
|
||||
/**
|
||||
* Deletes an existing namespace. This operation also removes all associated resources under the
|
||||
* namespace.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param namespaceName The Namespace name
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
beginDelete(
|
||||
resourceGroupName: string,
|
||||
namespaceName: string,
|
||||
options?: NamespacesDeleteOptionalParams
|
||||
): Promise<PollerLike<PollOperationState<void>, void>>;
|
||||
/**
|
||||
* Deletes an existing namespace. This operation also removes all associated resources under the
|
||||
* namespace.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param namespaceName The Namespace name
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
beginDeleteAndWait(
|
||||
resourceGroupName: string,
|
||||
namespaceName: string,
|
||||
options?: NamespacesDeleteOptionalParams
|
||||
): Promise<void>;
|
||||
/**
|
||||
* Gets the description of the specified namespace.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param namespaceName The Namespace name
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
get(
|
||||
resourceGroupName: string,
|
||||
namespaceName: string,
|
||||
options?: NamespacesGetOptionalParams
|
||||
): Promise<NamespacesGetResponse>;
|
||||
/**
|
||||
* Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This
|
||||
* operation is idempotent.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param namespaceName The Namespace name
|
||||
* @param parameters Parameters for updating a namespace resource.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
update(
|
||||
resourceGroupName: string,
|
||||
namespaceName: string,
|
||||
parameters: EHNamespace,
|
||||
options?: NamespacesUpdateOptionalParams
|
||||
): Promise<NamespacesUpdateResponse>;
|
||||
/**
|
||||
* Creates or updates an VirtualNetworkRule for a Namespace.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param namespaceName The Namespace name
|
||||
* @param virtualNetworkRuleName The Virtual Network Rule name.
|
||||
* @param parameters The Namespace VirtualNetworkRule.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
createOrUpdateVirtualNetworkRule(
|
||||
resourceGroupName: string,
|
||||
namespaceName: string,
|
||||
virtualNetworkRuleName: string,
|
||||
parameters: VirtualNetworkRule,
|
||||
options?: NamespacesCreateOrUpdateVirtualNetworkRuleOptionalParams
|
||||
): Promise<NamespacesCreateOrUpdateVirtualNetworkRuleResponse>;
|
||||
/**
|
||||
* Deletes an VirtualNetworkRule for a Namespace.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param namespaceName The Namespace name
|
||||
* @param virtualNetworkRuleName The Virtual Network Rule name.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
deleteVirtualNetworkRule(
|
||||
resourceGroupName: string,
|
||||
namespaceName: string,
|
||||
virtualNetworkRuleName: string,
|
||||
options?: NamespacesDeleteVirtualNetworkRuleOptionalParams
|
||||
): Promise<void>;
|
||||
/**
|
||||
* Gets an VirtualNetworkRule for a Namespace by rule name.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param namespaceName The Namespace name
|
||||
* @param virtualNetworkRuleName The Virtual Network Rule name.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
getVirtualNetworkRule(
|
||||
resourceGroupName: string,
|
||||
namespaceName: string,
|
||||
virtualNetworkRuleName: string,
|
||||
options?: NamespacesGetVirtualNetworkRuleOptionalParams
|
||||
): Promise<NamespacesGetVirtualNetworkRuleResponse>;
|
||||
/**
|
||||
* Create or update NetworkRuleSet for a Namespace.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param namespaceName The Namespace name
|
||||
* @param parameters The Namespace IpFilterRule.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
createOrUpdateNetworkRuleSet(
|
||||
resourceGroupName: string,
|
||||
namespaceName: string,
|
||||
parameters: NetworkRuleSet,
|
||||
options?: NamespacesCreateOrUpdateNetworkRuleSetOptionalParams
|
||||
): Promise<NamespacesCreateOrUpdateNetworkRuleSetResponse>;
|
||||
/**
|
||||
* Gets NetworkRuleSet for a Namespace.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param namespaceName The Namespace name
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
getNetworkRuleSet(
|
||||
resourceGroupName: string,
|
||||
namespaceName: string,
|
||||
options?: NamespacesGetNetworkRuleSetOptionalParams
|
||||
): Promise<NamespacesGetNetworkRuleSetResponse>;
|
||||
/**
|
||||
* Creates or updates an AuthorizationRule for a Namespace.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param namespaceName The Namespace name
|
||||
* @param authorizationRuleName The authorization rule name.
|
||||
* @param parameters The shared access AuthorizationRule.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
createOrUpdateAuthorizationRule(
|
||||
resourceGroupName: string,
|
||||
namespaceName: string,
|
||||
authorizationRuleName: string,
|
||||
parameters: AuthorizationRule,
|
||||
options?: NamespacesCreateOrUpdateAuthorizationRuleOptionalParams
|
||||
): Promise<NamespacesCreateOrUpdateAuthorizationRuleResponse>;
|
||||
/**
|
||||
* Deletes an AuthorizationRule for a Namespace.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param namespaceName The Namespace name
|
||||
* @param authorizationRuleName The authorization rule name.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
deleteAuthorizationRule(
|
||||
resourceGroupName: string,
|
||||
namespaceName: string,
|
||||
authorizationRuleName: string,
|
||||
options?: NamespacesDeleteAuthorizationRuleOptionalParams
|
||||
): Promise<void>;
|
||||
/**
|
||||
* Gets an AuthorizationRule for a Namespace by rule name.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param namespaceName The Namespace name
|
||||
* @param authorizationRuleName The authorization rule name.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
getAuthorizationRule(
|
||||
resourceGroupName: string,
|
||||
namespaceName: string,
|
||||
authorizationRuleName: string,
|
||||
options?: NamespacesGetAuthorizationRuleOptionalParams
|
||||
): Promise<NamespacesGetAuthorizationRuleResponse>;
|
||||
/**
|
||||
* Gets the primary and secondary connection strings for the Namespace.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param namespaceName The Namespace name
|
||||
* @param authorizationRuleName The authorization rule name.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
listKeys(
|
||||
resourceGroupName: string,
|
||||
namespaceName: string,
|
||||
authorizationRuleName: string,
|
||||
options?: NamespacesListKeysOptionalParams
|
||||
): Promise<NamespacesListKeysResponse>;
|
||||
/**
|
||||
* Regenerates the primary or secondary connection strings for the specified Namespace.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param namespaceName The Namespace name
|
||||
* @param authorizationRuleName The authorization rule name.
|
||||
* @param parameters Parameters required to regenerate the connection string.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
regenerateKeys(
|
||||
resourceGroupName: string,
|
||||
namespaceName: string,
|
||||
authorizationRuleName: string,
|
||||
parameters: RegenerateAccessKeyParameters,
|
||||
options?: NamespacesRegenerateKeysOptionalParams
|
||||
): Promise<NamespacesRegenerateKeysResponse>;
|
||||
/**
|
||||
* Check the give Namespace name availability.
|
||||
* @param parameters Parameters to check availability of the given Namespace name
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
checkNameAvailability(
|
||||
parameters: CheckNameAvailabilityParameter,
|
||||
options?: NamespacesCheckNameAvailabilityOptionalParams
|
||||
): Promise<NamespacesCheckNameAvailabilityResponse>;
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
/*
|
||||
* 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 { Operation, OperationsListOptionalParams } from "../models";
|
||||
|
||||
/// <reference lib="esnext.asynciterable" />
|
||||
/** Interface representing a Operations. */
|
||||
export interface Operations {
|
||||
/**
|
||||
* Lists all of the available Event Hub REST API operations.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
list(
|
||||
options?: OperationsListOptionalParams
|
||||
): PagedAsyncIterableIterator<Operation>;
|
||||
}
|
|
@ -0,0 +1,93 @@
|
|||
/*
|
||||
* 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 { PollerLike, PollOperationState } from "@azure/core-lro";
|
||||
import {
|
||||
PrivateEndpointConnection,
|
||||
PrivateEndpointConnectionsListOptionalParams,
|
||||
PrivateEndpointConnectionsCreateOrUpdateOptionalParams,
|
||||
PrivateEndpointConnectionsCreateOrUpdateResponse,
|
||||
PrivateEndpointConnectionsDeleteOptionalParams,
|
||||
PrivateEndpointConnectionsGetOptionalParams,
|
||||
PrivateEndpointConnectionsGetResponse
|
||||
} from "../models";
|
||||
|
||||
/// <reference lib="esnext.asynciterable" />
|
||||
/** Interface representing a PrivateEndpointConnections. */
|
||||
export interface PrivateEndpointConnections {
|
||||
/**
|
||||
* Gets the available PrivateEndpointConnections within a namespace.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param namespaceName The Namespace name
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
list(
|
||||
resourceGroupName: string,
|
||||
namespaceName: string,
|
||||
options?: PrivateEndpointConnectionsListOptionalParams
|
||||
): PagedAsyncIterableIterator<PrivateEndpointConnection>;
|
||||
/**
|
||||
* Creates or updates PrivateEndpointConnections of service namespace.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param namespaceName The Namespace name
|
||||
* @param privateEndpointConnectionName The PrivateEndpointConnection name
|
||||
* @param parameters Parameters supplied to update Status of PrivateEndPoint Connection to namespace
|
||||
* resource.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
createOrUpdate(
|
||||
resourceGroupName: string,
|
||||
namespaceName: string,
|
||||
privateEndpointConnectionName: string,
|
||||
parameters: PrivateEndpointConnection,
|
||||
options?: PrivateEndpointConnectionsCreateOrUpdateOptionalParams
|
||||
): Promise<PrivateEndpointConnectionsCreateOrUpdateResponse>;
|
||||
/**
|
||||
* Deletes an existing namespace. This operation also removes all associated resources under the
|
||||
* namespace.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param namespaceName The Namespace name
|
||||
* @param privateEndpointConnectionName The PrivateEndpointConnection name
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
beginDelete(
|
||||
resourceGroupName: string,
|
||||
namespaceName: string,
|
||||
privateEndpointConnectionName: string,
|
||||
options?: PrivateEndpointConnectionsDeleteOptionalParams
|
||||
): Promise<PollerLike<PollOperationState<void>, void>>;
|
||||
/**
|
||||
* Deletes an existing namespace. This operation also removes all associated resources under the
|
||||
* namespace.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param namespaceName The Namespace name
|
||||
* @param privateEndpointConnectionName The PrivateEndpointConnection name
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
beginDeleteAndWait(
|
||||
resourceGroupName: string,
|
||||
namespaceName: string,
|
||||
privateEndpointConnectionName: string,
|
||||
options?: PrivateEndpointConnectionsDeleteOptionalParams
|
||||
): Promise<void>;
|
||||
/**
|
||||
* Gets a description for the specified Private Endpoint Connection name.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param namespaceName The Namespace name
|
||||
* @param privateEndpointConnectionName The PrivateEndpointConnection name
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
get(
|
||||
resourceGroupName: string,
|
||||
namespaceName: string,
|
||||
privateEndpointConnectionName: string,
|
||||
options?: PrivateEndpointConnectionsGetOptionalParams
|
||||
): Promise<PrivateEndpointConnectionsGetResponse>;
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
/*
|
||||
* 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 {
|
||||
PrivateLinkResourcesGetOptionalParams,
|
||||
PrivateLinkResourcesGetResponse
|
||||
} from "../models";
|
||||
|
||||
/** Interface representing a PrivateLinkResources. */
|
||||
export interface PrivateLinkResources {
|
||||
/**
|
||||
* Gets lists of resources that supports Privatelinks.
|
||||
* @param resourceGroupName Name of the resource group within the azure subscription.
|
||||
* @param namespaceName The Namespace name
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
get(
|
||||
resourceGroupName: string,
|
||||
namespaceName: string,
|
||||
options?: PrivateLinkResourcesGetOptionalParams
|
||||
): Promise<PrivateLinkResourcesGetResponse>;
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* 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 { MessagingRegions, RegionsListBySkuOptionalParams } from "../models";
|
||||
|
||||
/// <reference lib="esnext.asynciterable" />
|
||||
/** Interface representing a Regions. */
|
||||
export interface Regions {
|
||||
/**
|
||||
* Gets the available Regions for a given sku
|
||||
* @param sku The sku type.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
listBySku(
|
||||
sku: string,
|
||||
options?: RegionsListBySkuOptionalParams
|
||||
): PagedAsyncIterableIterator<MessagingRegions>;
|
||||
}
|
|
@ -3,15 +3,15 @@
|
|||
"module": "es6",
|
||||
"moduleResolution": "node",
|
||||
"strict": true,
|
||||
"target": "es5",
|
||||
"target": "es6",
|
||||
"sourceMap": true,
|
||||
"declarationMap": true,
|
||||
"esModuleInterop": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"lib": ["es6"],
|
||||
"lib": ["es6", "dom"],
|
||||
"declaration": true,
|
||||
"outDir": "./esm",
|
||||
"outDir": "./dist-esm",
|
||||
"importHelpers": true
|
||||
},
|
||||
"include": ["./src/**/*.ts"],
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file.
|
||||
|
||||
trigger:
|
||||
branches:
|
||||
include:
|
||||
|
@ -9,7 +8,6 @@ trigger:
|
|||
paths:
|
||||
include:
|
||||
- sdk/eventhub/
|
||||
|
||||
pr:
|
||||
branches:
|
||||
include:
|
||||
|
@ -17,10 +15,11 @@ pr:
|
|||
- feature/*
|
||||
- release/*
|
||||
- hotfix/*
|
||||
exclude:
|
||||
- feature/v4
|
||||
paths:
|
||||
include:
|
||||
- sdk/eventhub/
|
||||
|
||||
extends:
|
||||
template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml
|
||||
parameters:
|
||||
|
@ -35,4 +34,5 @@ extends:
|
|||
safename: azureeventprocessorhost
|
||||
- name: azure-eventhubs-checkpointstore-table
|
||||
safeName: azureeventhubscheckpointstoretable
|
||||
|
||||
- name: azure-arm-eventhub
|
||||
safeName: azurearmeventhub
|
||||
|
|
Загрузка…
Ссылка в новой задаче