* confluent-track2

* update
This commit is contained in:
colawwj 2022-01-10 09:58:11 +08:00 коммит произвёл GitHub
Родитель 8b4c167784
Коммит db5fd51600
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
34 изменённых файлов: 2895 добавлений и 2261 удалений

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -17,3 +17,4 @@ https://docs.microsoft.com/javascript/api/@azure/arm-attestation
https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/attestation/arm-attestation
https://docs.microsoft.com/javascript/api/@azure/arm-changeanalysis
https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/changeanalysis/arm-changeanalysis
https://docs.microsoft.com/javascript/api/@azure/arm-confluent?view=azure-node-preview

Просмотреть файл

@ -1215,6 +1215,11 @@
"packageName": "@azure/arm-containerinstance",
"projectFolder": "sdk/containerinstance/arm-containerinstance",
"versionPolicyName": "management"
},
{
"packageName": "@azure/arm-confluent",
"projectFolder": "sdk/confluent/arm-confluent",
"versionPolicyName": "management"
}
]
}

Просмотреть файл

@ -0,0 +1,11 @@
# Release History
## 3.0.0-beta.1 (2022-01-05)
The package of @azure/arm-confluent is using our next generation design principles since version 3.0.0-beta.1, which contains breaking changes.
To understand the detail of the change, please refer to [Changelog](https://aka.ms/js-track2-changelog).
To migrate the existing applications to the latest version, please refer to [Migration Guide](https://aka.ms/js-track2-migration-guide).
To learn more, please refer to our documentation [Quick Start](https://aka.ms/js-track2-quickstart).

Просмотреть файл

@ -1,6 +1,6 @@
The MIT License (MIT)
Copyright (c) 2021 Microsoft
Copyright (c) 2022 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,98 @@
## Azure ConfluentManagementClient SDK for JavaScript
# Azure ConfluentManagement client library for JavaScript
This package contains an isomorphic SDK (runs both in Node.js and in browsers) for ConfluentManagementClient.
This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure ConfluentManagement client.
[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/confluent/arm-confluent) |
[Package (NPM)](https://www.npmjs.com/package/@azure/arm-confluent) |
[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-confluent?view=azure-node-preview) |
[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-confluent` package
To use this SDK in your project, you will need to install two packages.
- `@azure/arm-confluent` that contains the client.
- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory.
Install the Azure ConfluentManagement client library for JavaScript with `npm`:
Install both packages using the below command:
```bash
npm install --save @azure/arm-confluent @azure/identity
npm install @azure/arm-confluent
```
> **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 `ConfluentManagementClient`
### How to use
To create a client object to access the Azure ConfluentManagement API, you will need the `endpoint` of your Azure ConfluentManagement resource and a `credential`. The Azure ConfluentManagement client can use Azure Active Directory credentials to authenticate.
You can find the endpoint for your Azure ConfluentManagement 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.
You can authenticate with Azure Active Directory using a credential from the [@azure/identity][azure_identity] library or [an existing AAD Token](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token).
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.
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 marketplaceAgreements 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 ConfluentManagement** 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 { DefaultAzureCredential } = require("@azure/identity");
const { ConfluentManagementClient } = require("@azure/arm-confluent");
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 ConfluentManagementClient(creds, subscriptionId);
client.marketplaceAgreements.list().then((result) => {
console.log("The result is:");
console.log(result);
}).catch((err) => {
console.log("An error occurred:");
console.error(err);
});
const { DefaultAzureCredential } = require("@azure/identity");
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new ConfluentManagementClient(new DefaultAzureCredential(), subscriptionId);
```
#### browser - Authentication, client creation, and list marketplaceAgreements as an example written in JavaScript.
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.
### JavaScript Bundle
To use this client library in the browser, first you need to use a bundler. For details on how to do this, please refer to our [bundling documentation](https://aka.ms/AzureSDKBundling).
##### Sample code
## Key concepts
- index.html
### ConfluentManagementClient
```html
<!DOCTYPE html>
<html lang="en">
<head>
<title>@azure/arm-confluent 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-confluent/dist/arm-confluent.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.ArmConfluent.ConfluentManagementClient(creds, subscriptionId);
client.marketplaceAgreements.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>
`ConfluentManagementClient` is the primary interface for developers using the Azure ConfluentManagement client library. Explore the methods on this client object to understand the different features of the Azure ConfluentManagement 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 { setLogLevel } = require("@azure/logger");
setLogLevel("info");
```
For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/logger).
## Next steps
Please take a look at the [samples](https://github.com/Azure-Samples/azure-samples-js-management) directory for detailed examples on how to use this library.
## Contributing
If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/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/confluent/arm-confluent/README.png)
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fconfluent%2Farm-confluent%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": "c2820d17c45444d200e701e5dbb631f49befe2dc",
"readme": "specification/confluent/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 --generate-test --typescript-sdks-folder=D:\\mydev\\azure-sdk-for-js ../azure-rest-api-specs/specification/confluent/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20211217.1",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
"use": "@autorest/typescript@6.0.0-alpha.16.20211217.1"
}

Просмотреть файл

@ -0,0 +1,18 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
"mainEntryPointFilePath": "./dist-esm/src/index.d.ts",
"docModel": { "enabled": true },
"apiReport": { "enabled": true, "reportFolder": "./review" },
"dtsRollup": {
"enabled": true,
"untrimmedFilePath": "",
"publicTrimmedFilePath": "./types/arm-confluent.d.ts"
},
"messages": {
"tsdocMessageReporting": { "default": { "logLevel": "none" } },
"extractorMessageReporting": {
"ae-missing-release-tag": { "logLevel": "none" },
"ae-unresolved-link": { "logLevel": "none" }
}
}
}

Просмотреть файл

@ -1,58 +1,91 @@
{
"name": "@azure/arm-confluent",
"sdk-type": "mgmt",
"author": "Microsoft Corporation",
"description": "ConfluentManagementClient Library with typescript type definitions for node.js and browser.",
"version": "2.1.0",
"description": "A generated SDK for ConfluentManagementClient.",
"version": "3.0.0-beta.1",
"engines": { "node": ">=12.0.0" },
"dependencies": {
"@azure/ms-rest-azure-js": "^2.1.0",
"@azure/ms-rest-js": "^2.2.0",
"@azure/core-auth": "^1.1.4",
"tslib": "^1.10.0"
"@azure/core-lro": "^2.2.0",
"@azure/abort-controller": "^1.0.0",
"@azure/core-paging": "^1.2.0",
"@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-confluent.js",
"module": "./esm/confluentManagementClient.js",
"types": "./esm/confluentManagementClient.d.ts",
"main": "./dist/index.js",
"module": "./dist-esm/src/index.js",
"types": "./types/arm-confluent.d.ts",
"devDependencies": {
"typescript": "^3.6.0",
"rollup": "^1.18.0",
"rollup-plugin-node-resolve": "^5.2.0",
"@microsoft/api-extractor": "^7.18.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",
"uglify-js": "^3.6.0"
"typescript": "~4.2.0",
"uglify-js": "^3.4.9",
"rimraf": "^3.0.0",
"@azure/identity": "^2.0.1",
"@azure-tools/test-recorder": "^1.0.0",
"mocha": "^7.1.1",
"cross-env": "^7.0.2"
},
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/confluent/arm-confluent",
"repository": {
"type": "git",
"url": "https://github.com/Azure/azure-sdk-for-js.git"
},
"bugs": {
"url": "https://github.com/Azure/azure-sdk-for-js/issues"
},
"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-confluent.js.map'\" -o ./dist/arm-confluent.min.js ./dist/arm-confluent.js",
"prepack": "npm install && npm run build"
"build": "npm run clean && 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": "rimraf dist dist-browser dist-esm test-dist temp types *.tgz *.log",
"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": "npm run integration-test",
"test:node": "echo skipped",
"test:browser": "echo skipped",
"unit-test": "npm run unit-test:node && npm run unit-test:browser",
"unit-test:node": "cross-env TEST_MODE=playback npm run integration-test:node",
"unit-test:browser": "echo skipped",
"integration-test": "npm run integration-test:node && npm run integration-test:browser",
"integration-test:node": "mocha -r esm --require ts-node/register --timeout 1200000 --full-trace test/*.ts --reporter ../../../common/tools/mocha-multi-reporter.js",
"integration-test:browser": "echo skipped",
"docs": "echo skipped"
},
"sideEffects": false,
"autoPublish": true

Просмотреть файл

@ -0,0 +1,5 @@
let nock = require('nock');
module.exports.hash = "7a6be38bb8cb644d64b4094802301751";
module.exports.testInfo = {"uniqueName":{},"newDate":{}}

Просмотреть файл

@ -0,0 +1,352 @@
## API Report File for "@azure/arm-confluent"
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
```ts
import * as coreAuth from '@azure/core-auth';
import * as coreClient from '@azure/core-client';
import { PagedAsyncIterableIterator } from '@azure/core-paging';
import { PollerLike } from '@azure/core-lro';
import { PollOperationState } from '@azure/core-lro';
// @public
export interface ConfluentAgreementResource {
accepted?: boolean;
readonly id?: string;
licenseTextLink?: string;
readonly name?: string;
plan?: string;
privacyPolicyLink?: string;
product?: string;
publisher?: string;
retrieveDatetime?: Date;
signature?: string;
readonly systemData?: SystemData;
readonly type?: string;
}
// @public
export interface ConfluentAgreementResourceListResponse {
nextLink?: string;
value?: ConfluentAgreementResource[];
}
// @public (undocumented)
export class ConfluentManagementClient extends coreClient.ServiceClient {
// (undocumented)
$host: string;
constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: ConfluentManagementClientOptionalParams);
// (undocumented)
apiVersion: string;
// (undocumented)
marketplaceAgreements: MarketplaceAgreements;
// (undocumented)
organization: Organization;
// (undocumented)
organizationOperations: OrganizationOperations;
// (undocumented)
subscriptionId: string;
// (undocumented)
validations: Validations;
}
// @public
export interface ConfluentManagementClientOptionalParams extends coreClient.ServiceClientOptions {
$host?: string;
apiVersion?: string;
endpoint?: string;
}
// @public
export type CreatedByType = string;
// @public
export interface ErrorResponseBody {
readonly code?: string;
readonly details?: ErrorResponseBody[];
readonly message?: string;
readonly target?: string;
}
// @public
export enum KnownCreatedByType {
// (undocumented)
Application = "Application",
// (undocumented)
Key = "Key",
// (undocumented)
ManagedIdentity = "ManagedIdentity",
// (undocumented)
User = "User"
}
// @public
export enum KnownProvisionState {
// (undocumented)
Accepted = "Accepted",
// (undocumented)
Canceled = "Canceled",
// (undocumented)
Creating = "Creating",
// (undocumented)
Deleted = "Deleted",
// (undocumented)
Deleting = "Deleting",
// (undocumented)
Failed = "Failed",
// (undocumented)
NotSpecified = "NotSpecified",
// (undocumented)
Succeeded = "Succeeded",
// (undocumented)
Updating = "Updating"
}
// @public
export enum KnownSaaSOfferStatus {
// (undocumented)
Failed = "Failed",
// (undocumented)
InProgress = "InProgress",
// (undocumented)
PendingFulfillmentStart = "PendingFulfillmentStart",
// (undocumented)
Reinstated = "Reinstated",
// (undocumented)
Started = "Started",
// (undocumented)
Subscribed = "Subscribed",
// (undocumented)
Succeeded = "Succeeded",
// (undocumented)
Suspended = "Suspended",
// (undocumented)
Unsubscribed = "Unsubscribed",
// (undocumented)
Updating = "Updating"
}
// @public
export interface MarketplaceAgreements {
create(options?: MarketplaceAgreementsCreateOptionalParams): Promise<MarketplaceAgreementsCreateResponse>;
list(options?: MarketplaceAgreementsListOptionalParams): PagedAsyncIterableIterator<ConfluentAgreementResource>;
}
// @public
export interface MarketplaceAgreementsCreateOptionalParams extends coreClient.OperationOptions {
body?: ConfluentAgreementResource;
}
// @public
export type MarketplaceAgreementsCreateResponse = ConfluentAgreementResource;
// @public
export interface MarketplaceAgreementsListNextOptionalParams extends coreClient.OperationOptions {
}
// @public
export type MarketplaceAgreementsListNextResponse = ConfluentAgreementResourceListResponse;
// @public
export interface MarketplaceAgreementsListOptionalParams extends coreClient.OperationOptions {
}
// @public
export type MarketplaceAgreementsListResponse = ConfluentAgreementResourceListResponse;
// @public
export interface OfferDetail {
id: string;
planId: string;
planName: string;
publisherId: string;
readonly status?: SaaSOfferStatus;
termUnit: string;
}
// @public
export interface OperationDisplay {
description?: string;
operation?: string;
provider?: string;
resource?: string;
}
// @public
export interface OperationListResult {
nextLink?: string;
value?: OperationResult[];
}
// @public
export interface OperationResult {
display?: OperationDisplay;
isDataAction?: boolean;
name?: string;
}
// @public
export interface Organization {
beginCreate(resourceGroupName: string, organizationName: string, options?: OrganizationCreateOptionalParams): Promise<PollerLike<PollOperationState<OrganizationCreateResponse>, OrganizationCreateResponse>>;
beginCreateAndWait(resourceGroupName: string, organizationName: string, options?: OrganizationCreateOptionalParams): Promise<OrganizationCreateResponse>;
beginDelete(resourceGroupName: string, organizationName: string, options?: OrganizationDeleteOptionalParams): Promise<PollerLike<PollOperationState<void>, void>>;
beginDeleteAndWait(resourceGroupName: string, organizationName: string, options?: OrganizationDeleteOptionalParams): Promise<void>;
get(resourceGroupName: string, organizationName: string, options?: OrganizationGetOptionalParams): Promise<OrganizationGetResponse>;
listByResourceGroup(resourceGroupName: string, options?: OrganizationListByResourceGroupOptionalParams): PagedAsyncIterableIterator<OrganizationResource>;
listBySubscription(options?: OrganizationListBySubscriptionOptionalParams): PagedAsyncIterableIterator<OrganizationResource>;
update(resourceGroupName: string, organizationName: string, options?: OrganizationUpdateOptionalParams): Promise<OrganizationUpdateResponse>;
}
// @public
export interface OrganizationCreateOptionalParams extends coreClient.OperationOptions {
body?: OrganizationResource;
resumeFrom?: string;
updateIntervalInMs?: number;
}
// @public
export type OrganizationCreateResponse = OrganizationResource;
// @public
export interface OrganizationDeleteOptionalParams extends coreClient.OperationOptions {
resumeFrom?: string;
updateIntervalInMs?: number;
}
// @public
export interface OrganizationGetOptionalParams extends coreClient.OperationOptions {
}
// @public
export type OrganizationGetResponse = OrganizationResource;
// @public
export interface OrganizationListByResourceGroupNextOptionalParams extends coreClient.OperationOptions {
}
// @public
export type OrganizationListByResourceGroupNextResponse = OrganizationResourceListResult;
// @public
export interface OrganizationListByResourceGroupOptionalParams extends coreClient.OperationOptions {
}
// @public
export type OrganizationListByResourceGroupResponse = OrganizationResourceListResult;
// @public
export interface OrganizationListBySubscriptionNextOptionalParams extends coreClient.OperationOptions {
}
// @public
export type OrganizationListBySubscriptionNextResponse = OrganizationResourceListResult;
// @public
export interface OrganizationListBySubscriptionOptionalParams extends coreClient.OperationOptions {
}
// @public
export type OrganizationListBySubscriptionResponse = OrganizationResourceListResult;
// @public
export interface OrganizationOperations {
list(options?: OrganizationOperationsListOptionalParams): PagedAsyncIterableIterator<OperationResult>;
}
// @public
export interface OrganizationOperationsListNextOptionalParams extends coreClient.OperationOptions {
}
// @public
export type OrganizationOperationsListNextResponse = OperationListResult;
// @public
export interface OrganizationOperationsListOptionalParams extends coreClient.OperationOptions {
}
// @public
export type OrganizationOperationsListResponse = OperationListResult;
// @public
export interface OrganizationResource {
readonly createdTime?: Date;
readonly id?: string;
location?: string;
readonly name?: string;
offerDetail: OfferDetail;
readonly organizationId?: string;
readonly provisioningState?: ProvisionState;
readonly ssoUrl?: string;
readonly systemData?: SystemData;
tags?: {
[propertyName: string]: string;
};
readonly type?: string;
userDetail: UserDetail;
}
// @public
export interface OrganizationResourceListResult {
nextLink?: string;
value?: OrganizationResource[];
}
// @public
export interface OrganizationResourceUpdate {
tags?: {
[propertyName: string]: string;
};
}
// @public
export interface OrganizationUpdateOptionalParams extends coreClient.OperationOptions {
body?: OrganizationResourceUpdate;
}
// @public
export type OrganizationUpdateResponse = OrganizationResource;
// @public
export type ProvisionState = string;
// @public
export interface ResourceProviderDefaultErrorResponse {
readonly error?: ErrorResponseBody;
}
// @public
export type SaaSOfferStatus = string;
// @public
export interface SystemData {
createdAt?: Date;
createdBy?: string;
createdByType?: CreatedByType;
lastModifiedAt?: Date;
lastModifiedBy?: string;
lastModifiedByType?: CreatedByType;
}
// @public
export interface UserDetail {
emailAddress: string;
firstName?: string;
lastName?: string;
}
// @public
export interface Validations {
validateOrganization(resourceGroupName: string, organizationName: string, body: OrganizationResource, options?: ValidationsValidateOrganizationOptionalParams): Promise<ValidationsValidateOrganizationResponse>;
}
// @public
export interface ValidationsValidateOrganizationOptionalParams extends coreClient.OperationOptions {
}
// @public
export type ValidationsValidateOrganizationResponse = OrganizationResource;
// (No @packageDocumentation comment for this package)
```

Просмотреть файл

@ -1,37 +1,188 @@
import rollup from "rollup";
import nodeResolve from "rollup-plugin-node-resolve";
import sourcemaps from "rollup-plugin-sourcemaps";
/**
* @type {rollup.RollupFileOptions}
*/
const config = {
input: "./esm/confluentManagementClient.js",
external: [
"@azure/ms-rest-js",
"@azure/ms-rest-azure-js"
],
output: {
file: "./dist/arm-confluent.js",
format: "umd",
name: "Azure.ArmConfluent",
sourcemap: true,
globals: {
"@azure/ms-rest-js": "msRest",
"@azure/ms-rest-azure-js": "msRestAzure"
},
banner: `/*
/*
* 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({ mainFields: ['module', 'main'] }),
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"));

Просмотреть файл

@ -3,54 +3,89 @@
* 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 { ConfluentManagementClientContext } from "./confluentManagementClientContext";
import * as coreClient from "@azure/core-client";
import * as coreAuth from "@azure/core-auth";
import {
MarketplaceAgreementsImpl,
OrganizationOperationsImpl,
OrganizationImpl,
ValidationsImpl
} from "./operations";
import {
MarketplaceAgreements,
OrganizationOperations,
Organization,
Validations
} from "./operationsInterfaces";
import { ConfluentManagementClientOptionalParams } from "./models";
class ConfluentManagementClient extends ConfluentManagementClientContext {
// Operation groups
marketplaceAgreements: operations.MarketplaceAgreements;
organizationOperations: operations.OrganizationOperations;
organization: operations.Organization;
validations: operations.Validations;
export class ConfluentManagementClient extends coreClient.ServiceClient {
$host: string;
apiVersion: string;
subscriptionId: string;
/**
* Initializes a new instance of the ConfluentManagementClient 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 Microsoft Azure subscription id
* @param [options] The parameter options
* @param options The parameter options
*/
constructor(
credentials: msRest.ServiceClientCredentials | TokenCredential,
credentials: coreAuth.TokenCredential,
subscriptionId: string,
options?: Models.ConfluentManagementClientOptions
options?: ConfluentManagementClientOptionalParams
) {
super(credentials, subscriptionId, options);
this.marketplaceAgreements = new operations.MarketplaceAgreements(this);
this.organizationOperations = new operations.OrganizationOperations(this);
this.organization = new operations.Organization(this);
this.validations = new operations.Validations(this);
if (credentials === undefined) {
throw new Error("'credentials' cannot be null");
}
if (subscriptionId === undefined) {
throw new Error("'subscriptionId' cannot be null");
}
// Initializing default values for options
if (!options) {
options = {};
}
const defaults: ConfluentManagementClientOptionalParams = {
requestContentType: "application/json; charset=utf-8",
credential: credentials
};
const packageDetails = `azsdk-js-arm-confluent/3.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"];
}
const optionsWithDefaults = {
...defaults,
...options,
userAgentOptions: {
userAgentPrefix
},
baseUri: options.endpoint || "https://management.azure.com"
};
super(optionsWithDefaults);
// Parameter assignments
this.subscriptionId = subscriptionId;
// Assigning values to Constant parameters
this.$host = options.$host || "https://management.azure.com";
this.apiVersion = options.apiVersion || "2021-09-01-preview";
this.marketplaceAgreements = new MarketplaceAgreementsImpl(this);
this.organizationOperations = new OrganizationOperationsImpl(this);
this.organization = new OrganizationImpl(this);
this.validations = new ValidationsImpl(this);
}
marketplaceAgreements: MarketplaceAgreements;
organizationOperations: OrganizationOperations;
organization: Organization;
validations: Validations;
}
// Operation Specifications
export {
ConfluentManagementClient,
ConfluentManagementClientContext,
Models as ConfluentManagementModels,
Mappers as ConfluentManagementMappers
};
export * from "./operations";

Просмотреть файл

@ -1,74 +0,0 @@
/*
* 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 * 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";
const packageName = "@azure/arm-confluent";
const packageVersion = "2.1.0";
export class ConfluentManagementClientContext extends msRestAzure.AzureServiceClient {
credentials: msRest.ServiceClientCredentials | TokenCredential;
apiVersion?: string;
subscriptionId: string;
/**
* Initializes a new instance of the ConfluentManagementClient class.
* @param credentials Credentials needed for the client to connect to Azure. Credentials
* implementing the TokenCredential interface from the @azure/identity package are recommended. For
* more information about these credentials, see
* {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the
* ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and
* @azure/ms-rest-browserauth are also supported.
* @param subscriptionId Microsoft Azure subscription id
* @param [options] The parameter options
*/
constructor(
credentials: msRest.ServiceClientCredentials | TokenCredential,
subscriptionId: string,
options?: Models.ConfluentManagementClientOptions
) {
if (credentials == undefined) {
throw new Error("'credentials' cannot be null.");
}
if (subscriptionId == undefined) {
throw new Error("'subscriptionId' cannot be null.");
}
if (!options) {
options = {};
}
if (!options.userAgent) {
const defaultUserAgent = msRestAzure.getDefaultUserAgentValue();
options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`;
}
super(credentials, options);
this.apiVersion = "2021-03-01-preview";
this.acceptLanguage = "en-US";
this.longRunningOperationRetryTimeout = 30;
this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com";
this.requestContentType = "application/json; charset=utf-8";
this.credentials = credentials;
this.subscriptionId = subscriptionId;
if (options.acceptLanguage !== null && options.acceptLanguage !== undefined) {
this.acceptLanguage = options.acceptLanguage;
}
if (
options.longRunningOperationRetryTimeout !== null &&
options.longRunningOperationRetryTimeout !== undefined
) {
this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout;
}
}
}

Просмотреть файл

@ -6,13 +6,7 @@
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
export {
BaseResource,
ConfluentAgreementResource,
ErrorResponseBody,
OfferDetail,
OrganizationResource,
ResourceProviderDefaultErrorResponse,
SystemData,
UserDetail
} from "../models/mappers";
/// <reference lib="esnext.asynciterable" />
export * from "./models";
export { ConfluentManagementClient } from "./confluentManagementClient";
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"
});
}
}

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -6,87 +6,62 @@
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
import { CloudErrorMapper, BaseResourceMapper } from "@azure/ms-rest-azure-js";
import * as msRest from "@azure/ms-rest-js";
import * as coreClient from "@azure/core-client";
export const CloudError = CloudErrorMapper;
export const BaseResource = BaseResourceMapper;
export const SystemData: msRest.CompositeMapper = {
serializedName: "systemData",
export const ConfluentAgreementResourceListResponse: coreClient.CompositeMapper = {
type: {
name: "Composite",
className: "SystemData",
className: "ConfluentAgreementResourceListResponse",
modelProperties: {
createdBy: {
serializedName: "createdBy",
value: {
serializedName: "value",
type: {
name: "Sequence",
element: {
type: {
name: "Composite",
className: "ConfluentAgreementResource"
}
}
}
},
nextLink: {
serializedName: "nextLink",
type: {
name: "String"
}
},
createdByType: {
serializedName: "createdByType",
type: {
name: "String"
}
},
createdAt: {
serializedName: "createdAt",
type: {
name: "DateTime"
}
},
lastModifiedBy: {
serializedName: "lastModifiedBy",
type: {
name: "String"
}
},
lastModifiedByType: {
serializedName: "lastModifiedByType",
type: {
name: "String"
}
},
lastModifiedAt: {
serializedName: "lastModifiedAt",
type: {
name: "DateTime"
}
}
}
}
};
export const ConfluentAgreementResource: msRest.CompositeMapper = {
serializedName: "ConfluentAgreementResource",
export const ConfluentAgreementResource: coreClient.CompositeMapper = {
type: {
name: "Composite",
className: "ConfluentAgreementResource",
modelProperties: {
id: {
readOnly: true,
serializedName: "id",
readOnly: true,
type: {
name: "String"
}
},
name: {
readOnly: true,
serializedName: "name",
readOnly: true,
type: {
name: "String"
}
},
type: {
readOnly: true,
serializedName: "type",
readOnly: true,
type: {
name: "String"
}
},
systemData: {
readOnly: true,
serializedName: "systemData",
type: {
name: "Composite",
@ -145,8 +120,166 @@ export const ConfluentAgreementResource: msRest.CompositeMapper = {
}
};
export const OperationDisplay: msRest.CompositeMapper = {
serializedName: "OperationDisplay",
export const SystemData: coreClient.CompositeMapper = {
type: {
name: "Composite",
className: "SystemData",
modelProperties: {
createdBy: {
serializedName: "createdBy",
type: {
name: "String"
}
},
createdByType: {
serializedName: "createdByType",
type: {
name: "String"
}
},
createdAt: {
serializedName: "createdAt",
type: {
name: "DateTime"
}
},
lastModifiedBy: {
serializedName: "lastModifiedBy",
type: {
name: "String"
}
},
lastModifiedByType: {
serializedName: "lastModifiedByType",
type: {
name: "String"
}
},
lastModifiedAt: {
serializedName: "lastModifiedAt",
type: {
name: "DateTime"
}
}
}
}
};
export const ResourceProviderDefaultErrorResponse: coreClient.CompositeMapper = {
type: {
name: "Composite",
className: "ResourceProviderDefaultErrorResponse",
modelProperties: {
error: {
serializedName: "error",
type: {
name: "Composite",
className: "ErrorResponseBody"
}
}
}
}
};
export const ErrorResponseBody: coreClient.CompositeMapper = {
type: {
name: "Composite",
className: "ErrorResponseBody",
modelProperties: {
code: {
serializedName: "code",
readOnly: true,
type: {
name: "String"
}
},
message: {
serializedName: "message",
readOnly: true,
type: {
name: "String"
}
},
target: {
serializedName: "target",
readOnly: true,
type: {
name: "String"
}
},
details: {
serializedName: "details",
readOnly: true,
type: {
name: "Sequence",
element: {
type: {
name: "Composite",
className: "ErrorResponseBody"
}
}
}
}
}
}
};
export const OperationListResult: coreClient.CompositeMapper = {
type: {
name: "Composite",
className: "OperationListResult",
modelProperties: {
value: {
serializedName: "value",
type: {
name: "Sequence",
element: {
type: {
name: "Composite",
className: "OperationResult"
}
}
}
},
nextLink: {
serializedName: "nextLink",
type: {
name: "String"
}
}
}
}
};
export const OperationResult: coreClient.CompositeMapper = {
type: {
name: "Composite",
className: "OperationResult",
modelProperties: {
name: {
serializedName: "name",
type: {
name: "String"
}
},
display: {
serializedName: "display",
type: {
name: "Composite",
className: "OperationDisplay"
}
},
isDataAction: {
serializedName: "isDataAction",
type: {
name: "Boolean"
}
}
}
}
};
export const OperationDisplay: coreClient.CompositeMapper = {
type: {
name: "Composite",
className: "OperationDisplay",
@ -179,386 +312,13 @@ export const OperationDisplay: msRest.CompositeMapper = {
}
};
export const OperationResult: msRest.CompositeMapper = {
serializedName: "OperationResult",
type: {
name: "Composite",
className: "OperationResult",
modelProperties: {
name: {
serializedName: "name",
type: {
name: "String"
}
},
display: {
serializedName: "display",
type: {
name: "Composite",
className: "OperationDisplay"
}
},
isDataAction: {
serializedName: "isDataAction",
type: {
name: "Boolean"
}
}
}
}
};
export const ErrorResponseBody: msRest.CompositeMapper = {
serializedName: "ErrorResponseBody",
type: {
name: "Composite",
className: "ErrorResponseBody",
modelProperties: {
code: {
readOnly: true,
serializedName: "code",
type: {
name: "String"
}
},
message: {
readOnly: true,
serializedName: "message",
type: {
name: "String"
}
},
target: {
readOnly: true,
serializedName: "target",
type: {
name: "String"
}
},
details: {
readOnly: true,
serializedName: "details",
type: {
name: "Sequence",
element: {
type: {
name: "Composite",
className: "ErrorResponseBody"
}
}
}
}
}
}
};
export const ResourceProviderDefaultErrorResponse: msRest.CompositeMapper = {
serializedName: "ResourceProviderDefaultErrorResponse",
type: {
name: "Composite",
className: "ResourceProviderDefaultErrorResponse",
modelProperties: {
error: {
readOnly: true,
serializedName: "error",
type: {
name: "Composite",
className: "ErrorResponseBody"
}
}
}
}
};
export const OfferDetail: msRest.CompositeMapper = {
serializedName: "OfferDetail",
type: {
name: "Composite",
className: "OfferDetail",
modelProperties: {
publisherId: {
required: true,
serializedName: "publisherId",
constraints: {
MaxLength: 50
},
type: {
name: "String"
}
},
id: {
required: true,
serializedName: "id",
constraints: {
MaxLength: 50
},
type: {
name: "String"
}
},
planId: {
required: true,
serializedName: "planId",
constraints: {
MaxLength: 50
},
type: {
name: "String"
}
},
planName: {
required: true,
serializedName: "planName",
constraints: {
MaxLength: 50
},
type: {
name: "String"
}
},
termUnit: {
required: true,
serializedName: "termUnit",
constraints: {
MaxLength: 25
},
type: {
name: "String"
}
},
status: {
serializedName: "status",
type: {
name: "String"
}
}
}
}
};
export const UserDetail: msRest.CompositeMapper = {
serializedName: "UserDetail",
type: {
name: "Composite",
className: "UserDetail",
modelProperties: {
firstName: {
serializedName: "firstName",
constraints: {
MaxLength: 50
},
type: {
name: "String"
}
},
lastName: {
serializedName: "lastName",
constraints: {
MaxLength: 50
},
type: {
name: "String"
}
},
emailAddress: {
required: true,
serializedName: "emailAddress",
constraints: {
Pattern: /^\S+@\S+\.\S+$/
},
type: {
name: "String"
}
}
}
}
};
export const OrganizationResource: msRest.CompositeMapper = {
serializedName: "OrganizationResource",
type: {
name: "Composite",
className: "OrganizationResource",
modelProperties: {
id: {
readOnly: true,
serializedName: "id",
type: {
name: "String"
}
},
name: {
readOnly: true,
serializedName: "name",
type: {
name: "String"
}
},
type: {
readOnly: true,
serializedName: "type",
type: {
name: "String"
}
},
systemData: {
readOnly: true,
serializedName: "systemData",
type: {
name: "Composite",
className: "SystemData"
}
},
createdTime: {
readOnly: true,
serializedName: "properties.createdTime",
type: {
name: "DateTime"
}
},
provisioningState: {
readOnly: true,
serializedName: "properties.provisioningState",
type: {
name: "String"
}
},
organizationId: {
readOnly: true,
serializedName: "properties.organizationId",
type: {
name: "String"
}
},
ssoUrl: {
readOnly: true,
serializedName: "properties.ssoUrl",
type: {
name: "String"
}
},
offerDetail: {
required: true,
serializedName: "properties.offerDetail",
type: {
name: "Composite",
className: "OfferDetail"
}
},
userDetail: {
required: true,
serializedName: "properties.userDetail",
type: {
name: "Composite",
className: "UserDetail"
}
},
tags: {
serializedName: "tags",
type: {
name: "Dictionary",
value: {
type: {
name: "String"
}
}
}
},
location: {
serializedName: "location",
type: {
name: "String"
}
}
}
}
};
export const OrganizationResourceUpdate: msRest.CompositeMapper = {
serializedName: "OrganizationResourceUpdate",
type: {
name: "Composite",
className: "OrganizationResourceUpdate",
modelProperties: {
tags: {
serializedName: "tags",
type: {
name: "Dictionary",
value: {
type: {
name: "String"
}
}
}
}
}
}
};
export const ConfluentAgreementResourceListResponse: msRest.CompositeMapper = {
serializedName: "ConfluentAgreementResourceListResponse",
type: {
name: "Composite",
className: "ConfluentAgreementResourceListResponse",
modelProperties: {
value: {
serializedName: "",
type: {
name: "Sequence",
element: {
type: {
name: "Composite",
className: "ConfluentAgreementResource"
}
}
}
},
nextLink: {
serializedName: "nextLink",
type: {
name: "String"
}
}
}
}
};
export const OperationListResult: msRest.CompositeMapper = {
serializedName: "OperationListResult",
type: {
name: "Composite",
className: "OperationListResult",
modelProperties: {
value: {
serializedName: "",
type: {
name: "Sequence",
element: {
type: {
name: "Composite",
className: "OperationResult"
}
}
}
},
nextLink: {
serializedName: "nextLink",
type: {
name: "String"
}
}
}
}
};
export const OrganizationResourceListResult: msRest.CompositeMapper = {
serializedName: "OrganizationResourceListResult",
export const OrganizationResourceListResult: coreClient.CompositeMapper = {
type: {
name: "Composite",
className: "OrganizationResourceListResult",
modelProperties: {
value: {
serializedName: "",
serializedName: "value",
type: {
name: "Sequence",
element: {
@ -578,3 +338,214 @@ export const OrganizationResourceListResult: msRest.CompositeMapper = {
}
}
};
export const OrganizationResource: coreClient.CompositeMapper = {
type: {
name: "Composite",
className: "OrganizationResource",
modelProperties: {
id: {
serializedName: "id",
readOnly: true,
type: {
name: "String"
}
},
name: {
serializedName: "name",
readOnly: true,
type: {
name: "String"
}
},
type: {
serializedName: "type",
readOnly: true,
type: {
name: "String"
}
},
systemData: {
serializedName: "systemData",
type: {
name: "Composite",
className: "SystemData"
}
},
tags: {
serializedName: "tags",
type: {
name: "Dictionary",
value: { type: { name: "String" } }
}
},
location: {
serializedName: "location",
type: {
name: "String"
}
},
createdTime: {
serializedName: "properties.createdTime",
readOnly: true,
type: {
name: "DateTime"
}
},
provisioningState: {
serializedName: "properties.provisioningState",
readOnly: true,
type: {
name: "String"
}
},
organizationId: {
serializedName: "properties.organizationId",
readOnly: true,
type: {
name: "String"
}
},
ssoUrl: {
serializedName: "properties.ssoUrl",
readOnly: true,
type: {
name: "String"
}
},
offerDetail: {
serializedName: "properties.offerDetail",
type: {
name: "Composite",
className: "OfferDetail"
}
},
userDetail: {
serializedName: "properties.userDetail",
type: {
name: "Composite",
className: "UserDetail"
}
}
}
}
};
export const OfferDetail: coreClient.CompositeMapper = {
type: {
name: "Composite",
className: "OfferDetail",
modelProperties: {
publisherId: {
constraints: {
MaxLength: 50
},
serializedName: "publisherId",
required: true,
type: {
name: "String"
}
},
id: {
constraints: {
MaxLength: 50
},
serializedName: "id",
required: true,
type: {
name: "String"
}
},
planId: {
constraints: {
MaxLength: 50
},
serializedName: "planId",
required: true,
type: {
name: "String"
}
},
planName: {
constraints: {
MaxLength: 50
},
serializedName: "planName",
required: true,
type: {
name: "String"
}
},
termUnit: {
constraints: {
MaxLength: 25
},
serializedName: "termUnit",
required: true,
type: {
name: "String"
}
},
status: {
serializedName: "status",
readOnly: true,
type: {
name: "String"
}
}
}
}
};
export const UserDetail: coreClient.CompositeMapper = {
type: {
name: "Composite",
className: "UserDetail",
modelProperties: {
firstName: {
constraints: {
MaxLength: 50
},
serializedName: "firstName",
type: {
name: "String"
}
},
lastName: {
constraints: {
MaxLength: 50
},
serializedName: "lastName",
type: {
name: "String"
}
},
emailAddress: {
constraints: {
Pattern: new RegExp("^\\S+@\\S+\\.\\S+$")
},
serializedName: "emailAddress",
required: true,
type: {
name: "String"
}
}
}
}
};
export const OrganizationResourceUpdate: coreClient.CompositeMapper = {
type: {
name: "Composite",
className: "OrganizationResourceUpdate",
modelProperties: {
tags: {
serializedName: "tags",
type: {
name: "Dictionary",
value: { type: { name: "String" } }
}
}
}
}
};

Просмотреть файл

@ -1,19 +0,0 @@
/*
* 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 {
BaseResource,
ConfluentAgreementResource,
ConfluentAgreementResourceListResponse,
ErrorResponseBody,
OfferDetail,
OrganizationResource,
ResourceProviderDefaultErrorResponse,
SystemData,
UserDetail
} from "../models/mappers";

Просмотреть файл

@ -1,20 +0,0 @@
/*
* 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 {
BaseResource,
ConfluentAgreementResource,
ErrorResponseBody,
OfferDetail,
OrganizationResource,
OrganizationResourceListResult,
OrganizationResourceUpdate,
ResourceProviderDefaultErrorResponse,
SystemData,
UserDetail
} from "../models/mappers";

Просмотреть файл

@ -3,72 +3,129 @@
* 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 {
ConfluentAgreementResource as ConfluentAgreementResourceMapper,
OrganizationResource as OrganizationResourceMapper,
OrganizationResourceUpdate as OrganizationResourceUpdateMapper
} from "../models/mappers";
export const acceptLanguage: msRest.OperationParameter = {
parameterPath: "acceptLanguage",
export const accept: OperationParameter = {
parameterPath: "accept",
mapper: {
serializedName: "accept-language",
defaultValue: "en-US",
type: {
name: "String"
}
}
};
export const apiVersion: msRest.OperationQueryParameter = {
parameterPath: "apiVersion",
mapper: {
required: true,
defaultValue: "application/json",
isConstant: true,
serializedName: "api-version",
defaultValue: "2021-03-01-preview",
serializedName: "Accept",
type: {
name: "String"
}
}
};
export const nextPageLink: msRest.OperationURLParameter = {
parameterPath: "nextPageLink",
export const $host: OperationURLParameter = {
parameterPath: "$host",
mapper: {
serializedName: "$host",
required: true,
serializedName: "nextLink",
type: {
name: "String"
}
},
skipEncoding: true
};
export const organizationName: msRest.OperationURLParameter = {
parameterPath: "organizationName",
export const apiVersion: OperationQueryParameter = {
parameterPath: "apiVersion",
mapper: {
required: true,
serializedName: "organizationName",
defaultValue: "2021-09-01-preview",
isConstant: true,
serializedName: "api-version",
type: {
name: "String"
}
}
};
export const resourceGroupName: msRest.OperationURLParameter = {
parameterPath: "resourceGroupName",
mapper: {
required: true,
serializedName: "resourceGroupName",
type: {
name: "String"
}
}
};
export const subscriptionId: msRest.OperationURLParameter = {
export const subscriptionId: OperationURLParameter = {
parameterPath: "subscriptionId",
mapper: {
required: true,
serializedName: "subscriptionId",
required: true,
type: {
name: "String"
}
}
};
export const contentType: OperationParameter = {
parameterPath: ["options", "contentType"],
mapper: {
defaultValue: "application/json",
isConstant: true,
serializedName: "Content-Type",
type: {
name: "String"
}
}
};
export const body: OperationParameter = {
parameterPath: ["options", "body"],
mapper: ConfluentAgreementResourceMapper
};
export const nextLink: OperationURLParameter = {
parameterPath: "nextLink",
mapper: {
serializedName: "nextLink",
required: true,
type: {
name: "String"
}
},
skipEncoding: true
};
export const resourceGroupName: OperationURLParameter = {
parameterPath: "resourceGroupName",
mapper: {
serializedName: "resourceGroupName",
required: true,
type: {
name: "String"
}
}
};
export const organizationName: OperationURLParameter = {
parameterPath: "organizationName",
mapper: {
serializedName: "organizationName",
required: true,
type: {
name: "String"
}
}
};
export const body1: OperationParameter = {
parameterPath: ["options", "body"],
mapper: OrganizationResourceMapper
};
export const body2: OperationParameter = {
parameterPath: ["options", "body"],
mapper: OrganizationResourceUpdateMapper
};
export const body3: OperationParameter = {
parameterPath: "body",
mapper: OrganizationResourceMapper
};

Просмотреть файл

@ -3,8 +3,7 @@
* 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 "./marketplaceAgreements";

Просмотреть файл

@ -3,150 +3,122 @@
* 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/marketplaceAgreementsMappers";
import { PagedAsyncIterableIterator } from "@azure/core-paging";
import { MarketplaceAgreements } from "../operationsInterfaces";
import * as coreClient from "@azure/core-client";
import * as Mappers from "../models/mappers";
import * as Parameters from "../models/parameters";
import { ConfluentManagementClientContext } from "../confluentManagementClientContext";
import { ConfluentManagementClient } from "../confluentManagementClient";
import {
ConfluentAgreementResource,
MarketplaceAgreementsListNextOptionalParams,
MarketplaceAgreementsListOptionalParams,
MarketplaceAgreementsListResponse,
MarketplaceAgreementsCreateOptionalParams,
MarketplaceAgreementsCreateResponse,
MarketplaceAgreementsListNextResponse
} from "../models";
/** Class representing a MarketplaceAgreements. */
export class MarketplaceAgreements {
private readonly client: ConfluentManagementClientContext;
/// <reference lib="esnext.asynciterable" />
/** Class containing MarketplaceAgreements operations. */
export class MarketplaceAgreementsImpl implements MarketplaceAgreements {
private readonly client: ConfluentManagementClient;
/**
* Create a MarketplaceAgreements.
* @param {ConfluentManagementClientContext} client Reference to the service client.
* Initialize a new instance of the class MarketplaceAgreements class.
* @param client Reference to the service client
*/
constructor(client: ConfluentManagementClientContext) {
constructor(client: ConfluentManagementClient) {
this.client = client;
}
/**
* @summary List Confluent marketplace agreements in the subscription.
* @param [options] The optional parameters
* @returns Promise<Models.MarketplaceAgreementsListResponse>
* List Confluent marketplace agreements in the subscription.
* @param options The options parameters.
*/
list(options?: msRest.RequestOptionsBase): Promise<Models.MarketplaceAgreementsListResponse>;
/**
* @param callback The callback
*/
list(callback: msRest.ServiceCallback<Models.ConfluentAgreementResourceListResponse>): void;
/**
* @param options The optional parameters
* @param callback The callback
*/
list(
options: msRest.RequestOptionsBase,
callback: msRest.ServiceCallback<Models.ConfluentAgreementResourceListResponse>
): void;
list(
options?:
| msRest.RequestOptionsBase
| msRest.ServiceCallback<Models.ConfluentAgreementResourceListResponse>,
callback?: msRest.ServiceCallback<Models.ConfluentAgreementResourceListResponse>
): Promise<Models.MarketplaceAgreementsListResponse> {
return this.client.sendOperationRequest(
{
options
public list(
options?: MarketplaceAgreementsListOptionalParams
): PagedAsyncIterableIterator<ConfluentAgreementResource> {
const iter = this.listPagingAll(options);
return {
next() {
return iter.next();
},
listOperationSpec,
callback
) as Promise<Models.MarketplaceAgreementsListResponse>;
[Symbol.asyncIterator]() {
return this;
},
byPage: () => {
return this.listPagingPage(options);
}
};
}
private async *listPagingPage(
options?: MarketplaceAgreementsListOptionalParams
): AsyncIterableIterator<ConfluentAgreementResource[]> {
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?: MarketplaceAgreementsListOptionalParams
): AsyncIterableIterator<ConfluentAgreementResource> {
for await (const page of this.listPagingPage(options)) {
yield* page;
}
}
/**
* @summary Create Confluent Marketplace agreement in the subscription.
* @param [options] The optional parameters
* @returns Promise<Models.MarketplaceAgreementsCreateResponse>
* List Confluent marketplace agreements in the subscription.
* @param options The options parameters.
*/
create(
options?: Models.MarketplaceAgreementsCreateOptionalParams
): Promise<Models.MarketplaceAgreementsCreateResponse>;
/**
* @param callback The callback
*/
create(callback: msRest.ServiceCallback<Models.ConfluentAgreementResource>): void;
/**
* @param options The optional parameters
* @param callback The callback
*/
create(
options: Models.MarketplaceAgreementsCreateOptionalParams,
callback: msRest.ServiceCallback<Models.ConfluentAgreementResource>
): void;
create(
options?:
| Models.MarketplaceAgreementsCreateOptionalParams
| msRest.ServiceCallback<Models.ConfluentAgreementResource>,
callback?: msRest.ServiceCallback<Models.ConfluentAgreementResource>
): Promise<Models.MarketplaceAgreementsCreateResponse> {
return this.client.sendOperationRequest(
{
options
},
createOperationSpec,
callback
) as Promise<Models.MarketplaceAgreementsCreateResponse>;
private _list(
options?: MarketplaceAgreementsListOptionalParams
): Promise<MarketplaceAgreementsListResponse> {
return this.client.sendOperationRequest({ options }, listOperationSpec);
}
/**
* @summary List Confluent marketplace agreements in the subscription.
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @param [options] The optional parameters
* @returns Promise<Models.MarketplaceAgreementsListNextResponse>
* Create Confluent Marketplace agreement in the subscription.
* @param options The options parameters.
*/
listNext(
nextPageLink: string,
options?: msRest.RequestOptionsBase
): Promise<Models.MarketplaceAgreementsListNextResponse>;
create(
options?: MarketplaceAgreementsCreateOptionalParams
): Promise<MarketplaceAgreementsCreateResponse> {
return this.client.sendOperationRequest({ options }, createOperationSpec);
}
/**
* @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.ConfluentAgreementResourceListResponse>
): 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.ConfluentAgreementResourceListResponse>
): void;
listNext(
nextPageLink: string,
options?:
| msRest.RequestOptionsBase
| msRest.ServiceCallback<Models.ConfluentAgreementResourceListResponse>,
callback?: msRest.ServiceCallback<Models.ConfluentAgreementResourceListResponse>
): Promise<Models.MarketplaceAgreementsListNextResponse> {
private _listNext(
nextLink: string,
options?: MarketplaceAgreementsListNextOptionalParams
): Promise<MarketplaceAgreementsListNextResponse> {
return this.client.sendOperationRequest(
{
nextPageLink,
options
},
listNextOperationSpec,
callback
) as Promise<Models.MarketplaceAgreementsListNextResponse>;
{ nextLink, options },
listNextOperationSpec
);
}
}
// Operation Specifications
const serializer = new msRest.Serializer(Mappers);
const listOperationSpec: msRest.OperationSpec = {
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
const listOperationSpec: coreClient.OperationSpec = {
path:
"/subscriptions/{subscriptionId}/providers/Microsoft.Confluent/agreements",
httpMethod: "GET",
path: "subscriptions/{subscriptionId}/providers/Microsoft.Confluent/agreements",
urlParameters: [Parameters.subscriptionId],
queryParameters: [Parameters.apiVersion],
headerParameters: [Parameters.acceptLanguage],
responses: {
200: {
bodyMapper: Mappers.ConfluentAgreementResourceListResponse
@ -155,19 +127,15 @@ const listOperationSpec: msRest.OperationSpec = {
bodyMapper: Mappers.ResourceProviderDefaultErrorResponse
}
},
queryParameters: [Parameters.apiVersion],
urlParameters: [Parameters.$host, Parameters.subscriptionId],
headerParameters: [Parameters.accept],
serializer
};
const createOperationSpec: msRest.OperationSpec = {
const createOperationSpec: coreClient.OperationSpec = {
path:
"/subscriptions/{subscriptionId}/providers/Microsoft.Confluent/agreements/default",
httpMethod: "PUT",
path: "subscriptions/{subscriptionId}/providers/Microsoft.Confluent/agreements/default",
urlParameters: [Parameters.subscriptionId],
queryParameters: [Parameters.apiVersion],
headerParameters: [Parameters.acceptLanguage],
requestBody: {
parameterPath: ["options", "body"],
mapper: Mappers.ConfluentAgreementResource
},
responses: {
200: {
bodyMapper: Mappers.ConfluentAgreementResource
@ -176,16 +144,16 @@ const createOperationSpec: msRest.OperationSpec = {
bodyMapper: Mappers.ResourceProviderDefaultErrorResponse
}
},
requestBody: Parameters.body,
queryParameters: [Parameters.apiVersion],
urlParameters: [Parameters.$host, Parameters.subscriptionId],
headerParameters: [Parameters.accept, Parameters.contentType],
mediaType: "json",
serializer
};
const listNextOperationSpec: msRest.OperationSpec = {
httpMethod: "GET",
baseUrl: "https://management.azure.com",
const listNextOperationSpec: coreClient.OperationSpec = {
path: "{nextLink}",
urlParameters: [Parameters.nextPageLink],
queryParameters: [Parameters.apiVersion],
headerParameters: [Parameters.acceptLanguage],
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.ConfluentAgreementResourceListResponse
@ -194,5 +162,12 @@ const listNextOperationSpec: msRest.OperationSpec = {
bodyMapper: Mappers.ResourceProviderDefaultErrorResponse
}
},
queryParameters: [Parameters.apiVersion],
urlParameters: [
Parameters.$host,
Parameters.subscriptionId,
Parameters.nextLink
],
headerParameters: [Parameters.accept],
serializer
};

Просмотреть файл

@ -3,276 +3,412 @@
* 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 msRestAzure from "@azure/ms-rest-azure-js";
import * as Models from "../models";
import * as Mappers from "../models/organizationMappers";
import { PagedAsyncIterableIterator } from "@azure/core-paging";
import { Organization } from "../operationsInterfaces";
import * as coreClient from "@azure/core-client";
import * as Mappers from "../models/mappers";
import * as Parameters from "../models/parameters";
import { ConfluentManagementClientContext } from "../confluentManagementClientContext";
import { ConfluentManagementClient } from "../confluentManagementClient";
import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
import { LroImpl } from "../lroImpl";
import {
OrganizationResource,
OrganizationListBySubscriptionNextOptionalParams,
OrganizationListBySubscriptionOptionalParams,
OrganizationListByResourceGroupNextOptionalParams,
OrganizationListByResourceGroupOptionalParams,
OrganizationListBySubscriptionResponse,
OrganizationListByResourceGroupResponse,
OrganizationGetOptionalParams,
OrganizationGetResponse,
OrganizationCreateOptionalParams,
OrganizationCreateResponse,
OrganizationUpdateOptionalParams,
OrganizationUpdateResponse,
OrganizationDeleteOptionalParams,
OrganizationListBySubscriptionNextResponse,
OrganizationListByResourceGroupNextResponse
} from "../models";
/** Class representing a Organization. */
export class Organization {
private readonly client: ConfluentManagementClientContext;
/// <reference lib="esnext.asynciterable" />
/** Class containing Organization operations. */
export class OrganizationImpl implements Organization {
private readonly client: ConfluentManagementClient;
/**
* Create a Organization.
* @param {ConfluentManagementClientContext} client Reference to the service client.
* Initialize a new instance of the class Organization class.
* @param client Reference to the service client
*/
constructor(client: ConfluentManagementClientContext) {
constructor(client: ConfluentManagementClient) {
this.client = client;
}
/**
* @summary List all organizations under the specified subscription.
* @param [options] The optional parameters
* @returns Promise<Models.OrganizationListBySubscriptionResponse>
* List all organizations under the specified subscription.
* @param options The options parameters.
*/
listBySubscription(options?: msRest.RequestOptionsBase): Promise<Models.OrganizationListBySubscriptionResponse>;
/**
* @param callback The callback
*/
listBySubscription(callback: msRest.ServiceCallback<Models.OrganizationResourceListResult>): void;
/**
* @param options The optional parameters
* @param callback The callback
*/
listBySubscription(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.OrganizationResourceListResult>): void;
listBySubscription(options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.OrganizationResourceListResult>, callback?: msRest.ServiceCallback<Models.OrganizationResourceListResult>): Promise<Models.OrganizationListBySubscriptionResponse> {
return this.client.sendOperationRequest(
{
options
public listBySubscription(
options?: OrganizationListBySubscriptionOptionalParams
): PagedAsyncIterableIterator<OrganizationResource> {
const iter = this.listBySubscriptionPagingAll(options);
return {
next() {
return iter.next();
},
listBySubscriptionOperationSpec,
callback) as Promise<Models.OrganizationListBySubscriptionResponse>;
[Symbol.asyncIterator]() {
return this;
},
byPage: () => {
return this.listBySubscriptionPagingPage(options);
}
};
}
private async *listBySubscriptionPagingPage(
options?: OrganizationListBySubscriptionOptionalParams
): AsyncIterableIterator<OrganizationResource[]> {
let result = await this._listBySubscription(options);
yield result.value || [];
let continuationToken = result.nextLink;
while (continuationToken) {
result = await this._listBySubscriptionNext(continuationToken, options);
continuationToken = result.nextLink;
yield result.value || [];
}
}
private async *listBySubscriptionPagingAll(
options?: OrganizationListBySubscriptionOptionalParams
): AsyncIterableIterator<OrganizationResource> {
for await (const page of this.listBySubscriptionPagingPage(options)) {
yield* page;
}
}
/**
* @summary List all Organizations under the specified resource group.
* List all Organizations under the specified resource group.
* @param resourceGroupName Resource group name
* @param [options] The optional parameters
* @returns Promise<Models.OrganizationListByResourceGroupResponse>
* @param options The options parameters.
*/
listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise<Models.OrganizationListByResourceGroupResponse>;
/**
* @param resourceGroupName Resource group name
* @param callback The callback
*/
listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback<Models.OrganizationResourceListResult>): void;
/**
* @param resourceGroupName Resource group name
* @param options The optional parameters
* @param callback The callback
*/
listByResourceGroup(resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.OrganizationResourceListResult>): void;
listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.OrganizationResourceListResult>, callback?: msRest.ServiceCallback<Models.OrganizationResourceListResult>): Promise<Models.OrganizationListByResourceGroupResponse> {
return this.client.sendOperationRequest(
{
public listByResourceGroup(
resourceGroupName: string,
options?: OrganizationListByResourceGroupOptionalParams
): PagedAsyncIterableIterator<OrganizationResource> {
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?: OrganizationListByResourceGroupOptionalParams
): AsyncIterableIterator<OrganizationResource[]> {
let result = await this._listByResourceGroup(resourceGroupName, options);
yield result.value || [];
let continuationToken = result.nextLink;
while (continuationToken) {
result = await this._listByResourceGroupNext(
resourceGroupName,
continuationToken,
options
},
listByResourceGroupOperationSpec,
callback) as Promise<Models.OrganizationListByResourceGroupResponse>;
);
continuationToken = result.nextLink;
yield result.value || [];
}
}
private async *listByResourceGroupPagingAll(
resourceGroupName: string,
options?: OrganizationListByResourceGroupOptionalParams
): AsyncIterableIterator<OrganizationResource> {
for await (const page of this.listByResourceGroupPagingPage(
resourceGroupName,
options
)) {
yield* page;
}
}
/**
* @summary Get the properties of a specific Organization resource.
* @param resourceGroupName Resource group name
* @param organizationName Organization resource name
* @param [options] The optional parameters
* @returns Promise<Models.OrganizationGetResponse>
* List all organizations under the specified subscription.
* @param options The options parameters.
*/
get(resourceGroupName: string, organizationName: string, options?: msRest.RequestOptionsBase): Promise<Models.OrganizationGetResponse>;
/**
* @param resourceGroupName Resource group name
* @param organizationName Organization resource name
* @param callback The callback
*/
get(resourceGroupName: string, organizationName: string, callback: msRest.ServiceCallback<Models.OrganizationResource>): void;
/**
* @param resourceGroupName Resource group name
* @param organizationName Organization resource name
* @param options The optional parameters
* @param callback The callback
*/
get(resourceGroupName: string, organizationName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.OrganizationResource>): void;
get(resourceGroupName: string, organizationName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.OrganizationResource>, callback?: msRest.ServiceCallback<Models.OrganizationResource>): Promise<Models.OrganizationGetResponse> {
private _listBySubscription(
options?: OrganizationListBySubscriptionOptionalParams
): Promise<OrganizationListBySubscriptionResponse> {
return this.client.sendOperationRequest(
{
resourceGroupName,
organizationName,
options
},
getOperationSpec,
callback) as Promise<Models.OrganizationGetResponse>;
{ options },
listBySubscriptionOperationSpec
);
}
/**
* @summary Create Organization resource
* List all Organizations under the specified resource group.
* @param resourceGroupName Resource group name
* @param organizationName Organization resource name
* @param [options] The optional parameters
* @returns Promise<Models.OrganizationCreateResponse>
* @param options The options parameters.
*/
create(resourceGroupName: string, organizationName: string, options?: Models.OrganizationCreateOptionalParams): Promise<Models.OrganizationCreateResponse> {
return this.beginCreate(resourceGroupName,organizationName,options)
.then(lroPoller => lroPoller.pollUntilFinished()) as Promise<Models.OrganizationCreateResponse>;
}
/**
* @summary Update Organization resource
* @param resourceGroupName Resource group name
* @param organizationName Organization resource name
* @param [options] The optional parameters
* @returns Promise<Models.OrganizationUpdateResponse>
*/
update(resourceGroupName: string, organizationName: string, options?: Models.OrganizationUpdateOptionalParams): Promise<Models.OrganizationUpdateResponse>;
/**
* @param resourceGroupName Resource group name
* @param organizationName Organization resource name
* @param callback The callback
*/
update(resourceGroupName: string, organizationName: string, callback: msRest.ServiceCallback<Models.OrganizationResource>): void;
/**
* @param resourceGroupName Resource group name
* @param organizationName Organization resource name
* @param options The optional parameters
* @param callback The callback
*/
update(resourceGroupName: string, organizationName: string, options: Models.OrganizationUpdateOptionalParams, callback: msRest.ServiceCallback<Models.OrganizationResource>): void;
update(resourceGroupName: string, organizationName: string, options?: Models.OrganizationUpdateOptionalParams | msRest.ServiceCallback<Models.OrganizationResource>, callback?: msRest.ServiceCallback<Models.OrganizationResource>): Promise<Models.OrganizationUpdateResponse> {
private _listByResourceGroup(
resourceGroupName: string,
options?: OrganizationListByResourceGroupOptionalParams
): Promise<OrganizationListByResourceGroupResponse> {
return this.client.sendOperationRequest(
{
resourceGroupName,
organizationName,
options
},
updateOperationSpec,
callback) as Promise<Models.OrganizationUpdateResponse>;
{ resourceGroupName, options },
listByResourceGroupOperationSpec
);
}
/**
* @summary Delete Organization resource
* Get the properties of a specific Organization resource.
* @param resourceGroupName Resource group name
* @param organizationName Organization resource name
* @param [options] The optional parameters
* @returns Promise<msRest.RestResponse>
* @param options The options parameters.
*/
deleteMethod(resourceGroupName: string, organizationName: string, options?: msRest.RequestOptionsBase): Promise<msRest.RestResponse> {
return this.beginDeleteMethod(resourceGroupName,organizationName,options)
.then(lroPoller => lroPoller.pollUntilFinished());
}
/**
* @summary Create Organization resource
* @param resourceGroupName Resource group name
* @param organizationName Organization resource name
* @param [options] The optional parameters
* @returns Promise<msRestAzure.LROPoller>
*/
beginCreate(resourceGroupName: string, organizationName: string, options?: Models.OrganizationBeginCreateOptionalParams): Promise<msRestAzure.LROPoller> {
return this.client.sendLRORequest(
{
resourceGroupName,
organizationName,
options
},
beginCreateOperationSpec,
options);
}
/**
* @summary Delete Organization resource
* @param resourceGroupName Resource group name
* @param organizationName Organization resource name
* @param [options] The optional parameters
* @returns Promise<msRestAzure.LROPoller>
*/
beginDeleteMethod(resourceGroupName: string, organizationName: string, options?: msRest.RequestOptionsBase): Promise<msRestAzure.LROPoller> {
return this.client.sendLRORequest(
{
resourceGroupName,
organizationName,
options
},
beginDeleteMethodOperationSpec,
options);
}
/**
* @summary List all organizations under the specified subscription.
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @param [options] The optional parameters
* @returns Promise<Models.OrganizationListBySubscriptionNextResponse>
*/
listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.OrganizationListBySubscriptionNextResponse>;
/**
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @param callback The callback
*/
listBySubscriptionNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.OrganizationResourceListResult>): void;
/**
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @param options The optional parameters
* @param callback The callback
*/
listBySubscriptionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.OrganizationResourceListResult>): void;
listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.OrganizationResourceListResult>, callback?: msRest.ServiceCallback<Models.OrganizationResourceListResult>): Promise<Models.OrganizationListBySubscriptionNextResponse> {
get(
resourceGroupName: string,
organizationName: string,
options?: OrganizationGetOptionalParams
): Promise<OrganizationGetResponse> {
return this.client.sendOperationRequest(
{
nextPageLink,
options
},
listBySubscriptionNextOperationSpec,
callback) as Promise<Models.OrganizationListBySubscriptionNextResponse>;
{ resourceGroupName, organizationName, options },
getOperationSpec
);
}
/**
* @summary List all Organizations under the specified resource group.
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @param [options] The optional parameters
* @returns Promise<Models.OrganizationListByResourceGroupNextResponse>
* Create Organization resource
* @param resourceGroupName Resource group name
* @param organizationName Organization resource name
* @param options The options parameters.
*/
listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.OrganizationListByResourceGroupNextResponse>;
async beginCreate(
resourceGroupName: string,
organizationName: string,
options?: OrganizationCreateOptionalParams
): Promise<
PollerLike<
PollOperationState<OrganizationCreateResponse>,
OrganizationCreateResponse
>
> {
const directSendOperation = async (
args: coreClient.OperationArguments,
spec: coreClient.OperationSpec
): Promise<OrganizationCreateResponse> => {
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, organizationName, options },
createOperationSpec
);
return new LroEngine(lro, {
resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs,
lroResourceLocationConfig: "azure-async-operation"
});
}
/**
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @param callback The callback
* Create Organization resource
* @param resourceGroupName Resource group name
* @param organizationName Organization resource name
* @param options The options parameters.
*/
listByResourceGroupNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.OrganizationResourceListResult>): void;
async beginCreateAndWait(
resourceGroupName: string,
organizationName: string,
options?: OrganizationCreateOptionalParams
): Promise<OrganizationCreateResponse> {
const poller = await this.beginCreate(
resourceGroupName,
organizationName,
options
);
return poller.pollUntilDone();
}
/**
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @param options The optional parameters
* @param callback The callback
* Update Organization resource
* @param resourceGroupName Resource group name
* @param organizationName Organization resource name
* @param options The options parameters.
*/
listByResourceGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.OrganizationResourceListResult>): void;
listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.OrganizationResourceListResult>, callback?: msRest.ServiceCallback<Models.OrganizationResourceListResult>): Promise<Models.OrganizationListByResourceGroupNextResponse> {
update(
resourceGroupName: string,
organizationName: string,
options?: OrganizationUpdateOptionalParams
): Promise<OrganizationUpdateResponse> {
return this.client.sendOperationRequest(
{
nextPageLink,
options
},
listByResourceGroupNextOperationSpec,
callback) as Promise<Models.OrganizationListByResourceGroupNextResponse>;
{ resourceGroupName, organizationName, options },
updateOperationSpec
);
}
/**
* Delete Organization resource
* @param resourceGroupName Resource group name
* @param organizationName Organization resource name
* @param options The options parameters.
*/
async beginDelete(
resourceGroupName: string,
organizationName: string,
options?: OrganizationDeleteOptionalParams
): 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, organizationName, options },
deleteOperationSpec
);
return new LroEngine(lro, {
resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs,
lroResourceLocationConfig: "location"
});
}
/**
* Delete Organization resource
* @param resourceGroupName Resource group name
* @param organizationName Organization resource name
* @param options The options parameters.
*/
async beginDeleteAndWait(
resourceGroupName: string,
organizationName: string,
options?: OrganizationDeleteOptionalParams
): Promise<void> {
const poller = await this.beginDelete(
resourceGroupName,
organizationName,
options
);
return poller.pollUntilDone();
}
/**
* ListBySubscriptionNext
* @param nextLink The nextLink from the previous successful call to the ListBySubscription method.
* @param options The options parameters.
*/
private _listBySubscriptionNext(
nextLink: string,
options?: OrganizationListBySubscriptionNextOptionalParams
): Promise<OrganizationListBySubscriptionNextResponse> {
return this.client.sendOperationRequest(
{ nextLink, options },
listBySubscriptionNextOperationSpec
);
}
/**
* ListByResourceGroupNext
* @param resourceGroupName Resource group name
* @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?: OrganizationListByResourceGroupNextOptionalParams
): Promise<OrganizationListByResourceGroupNextResponse> {
return this.client.sendOperationRequest(
{ resourceGroupName, nextLink, options },
listByResourceGroupNextOperationSpec
);
}
}
// Operation Specifications
const serializer = new msRest.Serializer(Mappers);
const listBySubscriptionOperationSpec: msRest.OperationSpec = {
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
const listBySubscriptionOperationSpec: coreClient.OperationSpec = {
path:
"/subscriptions/{subscriptionId}/providers/Microsoft.Confluent/organizations",
httpMethod: "GET",
path: "subscriptions/{subscriptionId}/providers/Microsoft.Confluent/organizations",
urlParameters: [
Parameters.subscriptionId
],
queryParameters: [
Parameters.apiVersion
],
headerParameters: [
Parameters.acceptLanguage
],
responses: {
200: {
bodyMapper: Mappers.OrganizationResourceListResult
@ -281,47 +417,36 @@ const listBySubscriptionOperationSpec: msRest.OperationSpec = {
bodyMapper: Mappers.ResourceProviderDefaultErrorResponse
}
},
queryParameters: [Parameters.apiVersion],
urlParameters: [Parameters.$host, Parameters.subscriptionId],
headerParameters: [Parameters.accept],
serializer
};
const listByResourceGroupOperationSpec: msRest.OperationSpec = {
const listByResourceGroupOperationSpec: coreClient.OperationSpec = {
path:
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations",
httpMethod: "GET",
path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations",
responses: {
200: {
bodyMapper: Mappers.OrganizationResourceListResult
},
default: {
bodyMapper: Mappers.ResourceProviderDefaultErrorResponse
}
},
queryParameters: [Parameters.apiVersion],
urlParameters: [
Parameters.$host,
Parameters.subscriptionId,
Parameters.resourceGroupName
],
queryParameters: [
Parameters.apiVersion
],
headerParameters: [
Parameters.acceptLanguage
],
responses: {
200: {
bodyMapper: Mappers.OrganizationResourceListResult
},
default: {
bodyMapper: Mappers.ResourceProviderDefaultErrorResponse
}
},
headerParameters: [Parameters.accept],
serializer
};
const getOperationSpec: msRest.OperationSpec = {
const getOperationSpec: coreClient.OperationSpec = {
path:
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}",
httpMethod: "GET",
path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}",
urlParameters: [
Parameters.subscriptionId,
Parameters.resourceGroupName,
Parameters.organizationName
],
queryParameters: [
Parameters.apiVersion
],
headerParameters: [
Parameters.acceptLanguage
],
responses: {
200: {
bodyMapper: Mappers.OrganizationResource
@ -330,62 +455,20 @@ const getOperationSpec: msRest.OperationSpec = {
bodyMapper: Mappers.ResourceProviderDefaultErrorResponse
}
},
serializer
};
const updateOperationSpec: msRest.OperationSpec = {
httpMethod: "PATCH",
path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}",
queryParameters: [Parameters.apiVersion],
urlParameters: [
Parameters.$host,
Parameters.subscriptionId,
Parameters.resourceGroupName,
Parameters.organizationName
],
queryParameters: [
Parameters.apiVersion
],
headerParameters: [
Parameters.acceptLanguage
],
requestBody: {
parameterPath: [
"options",
"body"
],
mapper: Mappers.OrganizationResourceUpdate
},
responses: {
200: {
bodyMapper: Mappers.OrganizationResource
},
default: {
bodyMapper: Mappers.ResourceProviderDefaultErrorResponse
}
},
headerParameters: [Parameters.accept],
serializer
};
const beginCreateOperationSpec: msRest.OperationSpec = {
const createOperationSpec: coreClient.OperationSpec = {
path:
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}",
httpMethod: "PUT",
path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}",
urlParameters: [
Parameters.subscriptionId,
Parameters.resourceGroupName,
Parameters.organizationName
],
queryParameters: [
Parameters.apiVersion
],
headerParameters: [
Parameters.acceptLanguage
],
requestBody: {
parameterPath: [
"options",
"body"
],
mapper: Mappers.OrganizationResource
},
responses: {
200: {
bodyMapper: Mappers.OrganizationResource
@ -393,51 +476,78 @@ const beginCreateOperationSpec: msRest.OperationSpec = {
201: {
bodyMapper: Mappers.OrganizationResource
},
202: {
bodyMapper: Mappers.OrganizationResource
},
204: {
bodyMapper: Mappers.OrganizationResource
},
default: {
bodyMapper: Mappers.ResourceProviderDefaultErrorResponse
}
},
serializer
};
const beginDeleteMethodOperationSpec: msRest.OperationSpec = {
httpMethod: "DELETE",
path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}",
requestBody: Parameters.body1,
queryParameters: [Parameters.apiVersion],
urlParameters: [
Parameters.$host,
Parameters.subscriptionId,
Parameters.resourceGroupName,
Parameters.organizationName
],
queryParameters: [
Parameters.apiVersion
],
headerParameters: [
Parameters.acceptLanguage
headerParameters: [Parameters.accept, Parameters.contentType],
mediaType: "json",
serializer
};
const updateOperationSpec: coreClient.OperationSpec = {
path:
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}",
httpMethod: "PATCH",
responses: {
200: {
bodyMapper: Mappers.OrganizationResource
},
default: {
bodyMapper: Mappers.ResourceProviderDefaultErrorResponse
}
},
requestBody: Parameters.body2,
queryParameters: [Parameters.apiVersion],
urlParameters: [
Parameters.$host,
Parameters.subscriptionId,
Parameters.resourceGroupName,
Parameters.organizationName
],
headerParameters: [Parameters.accept, Parameters.contentType],
mediaType: "json",
serializer
};
const deleteOperationSpec: coreClient.OperationSpec = {
path:
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}",
httpMethod: "DELETE",
responses: {
200: {},
201: {},
202: {},
204: {},
default: {
bodyMapper: Mappers.ResourceProviderDefaultErrorResponse
}
},
queryParameters: [Parameters.apiVersion],
urlParameters: [
Parameters.$host,
Parameters.subscriptionId,
Parameters.resourceGroupName,
Parameters.organizationName
],
headerParameters: [Parameters.accept],
serializer
};
const listBySubscriptionNextOperationSpec: msRest.OperationSpec = {
httpMethod: "GET",
baseUrl: "https://management.azure.com",
const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = {
path: "{nextLink}",
urlParameters: [
Parameters.nextPageLink
],
queryParameters: [
Parameters.apiVersion
],
headerParameters: [
Parameters.acceptLanguage
],
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.OrganizationResourceListResult
@ -446,22 +556,18 @@ const listBySubscriptionNextOperationSpec: msRest.OperationSpec = {
bodyMapper: Mappers.ResourceProviderDefaultErrorResponse
}
},
queryParameters: [Parameters.apiVersion],
urlParameters: [
Parameters.$host,
Parameters.subscriptionId,
Parameters.nextLink
],
headerParameters: [Parameters.accept],
serializer
};
const listByResourceGroupNextOperationSpec: msRest.OperationSpec = {
httpMethod: "GET",
baseUrl: "https://management.azure.com",
const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = {
path: "{nextLink}",
urlParameters: [
Parameters.nextPageLink
],
queryParameters: [
Parameters.apiVersion
],
headerParameters: [
Parameters.acceptLanguage
],
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.OrganizationResourceListResult
@ -470,5 +576,13 @@ const listByResourceGroupNextOperationSpec: msRest.OperationSpec = {
bodyMapper: Mappers.ResourceProviderDefaultErrorResponse
}
},
queryParameters: [Parameters.apiVersion],
urlParameters: [
Parameters.$host,
Parameters.subscriptionId,
Parameters.nextLink,
Parameters.resourceGroupName
],
headerParameters: [Parameters.accept],
serializer
};

Просмотреть файл

@ -3,116 +3,109 @@
* 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/organizationOperationsMappers";
import { PagedAsyncIterableIterator } from "@azure/core-paging";
import { OrganizationOperations } from "../operationsInterfaces";
import * as coreClient from "@azure/core-client";
import * as Mappers from "../models/mappers";
import * as Parameters from "../models/parameters";
import { ConfluentManagementClientContext } from "../confluentManagementClientContext";
import { ConfluentManagementClient } from "../confluentManagementClient";
import {
OperationResult,
OrganizationOperationsListNextOptionalParams,
OrganizationOperationsListOptionalParams,
OrganizationOperationsListResponse,
OrganizationOperationsListNextResponse
} from "../models";
/** Class representing a OrganizationOperations. */
export class OrganizationOperations {
private readonly client: ConfluentManagementClientContext;
/// <reference lib="esnext.asynciterable" />
/** Class containing OrganizationOperations operations. */
export class OrganizationOperationsImpl implements OrganizationOperations {
private readonly client: ConfluentManagementClient;
/**
* Create a OrganizationOperations.
* @param {ConfluentManagementClientContext} client Reference to the service client.
* Initialize a new instance of the class OrganizationOperations class.
* @param client Reference to the service client
*/
constructor(client: ConfluentManagementClientContext) {
constructor(client: ConfluentManagementClient) {
this.client = client;
}
/**
* @summary List all operations provided by Microsoft.Confluent.
* @param [options] The optional parameters
* @returns Promise<Models.OrganizationOperationsListResponse>
* List all operations provided by Microsoft.Confluent.
* @param options The options parameters.
*/
list(options?: msRest.RequestOptionsBase): Promise<Models.OrganizationOperationsListResponse>;
/**
* @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.OrganizationOperationsListResponse> {
return this.client.sendOperationRequest(
{
options
public list(
options?: OrganizationOperationsListOptionalParams
): PagedAsyncIterableIterator<OperationResult> {
const iter = this.listPagingAll(options);
return {
next() {
return iter.next();
},
listOperationSpec,
callback) as Promise<Models.OrganizationOperationsListResponse>;
[Symbol.asyncIterator]() {
return this;
},
byPage: () => {
return this.listPagingPage(options);
}
};
}
private async *listPagingPage(
options?: OrganizationOperationsListOptionalParams
): AsyncIterableIterator<OperationResult[]> {
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?: OrganizationOperationsListOptionalParams
): AsyncIterableIterator<OperationResult> {
for await (const page of this.listPagingPage(options)) {
yield* page;
}
}
/**
* @summary List all operations provided by Microsoft.Confluent.
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @param [options] The optional parameters
* @returns Promise<Models.OrganizationOperationsListNextResponse>
* List all operations provided by Microsoft.Confluent.
* @param options The options parameters.
*/
listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.OrganizationOperationsListNextResponse>;
private _list(
options?: OrganizationOperationsListOptionalParams
): Promise<OrganizationOperationsListResponse> {
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.OrganizationOperationsListNextResponse> {
private _listNext(
nextLink: string,
options?: OrganizationOperationsListNextOptionalParams
): Promise<OrganizationOperationsListNextResponse> {
return this.client.sendOperationRequest(
{
nextPageLink,
options
},
listNextOperationSpec,
callback) as Promise<Models.OrganizationOperationsListNextResponse>;
{ nextLink, options },
listNextOperationSpec
);
}
}
// Operation Specifications
const serializer = new msRest.Serializer(Mappers);
const listOperationSpec: msRest.OperationSpec = {
httpMethod: "GET",
path: "providers/Microsoft.Confluent/operations",
queryParameters: [
Parameters.apiVersion
],
headerParameters: [
Parameters.acceptLanguage
],
responses: {
200: {
bodyMapper: Mappers.OperationListResult
},
default: {
bodyMapper: Mappers.ResourceProviderDefaultErrorResponse
}
},
serializer
};
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
const listNextOperationSpec: msRest.OperationSpec = {
const listOperationSpec: coreClient.OperationSpec = {
path: "/providers/Microsoft.Confluent/operations",
httpMethod: "GET",
baseUrl: "https://management.azure.com",
path: "{nextLink}",
urlParameters: [
Parameters.nextPageLink
],
queryParameters: [
Parameters.apiVersion
],
headerParameters: [
Parameters.acceptLanguage
],
responses: {
200: {
bodyMapper: Mappers.OperationListResult
@ -121,5 +114,24 @@ const listNextOperationSpec: msRest.OperationSpec = {
bodyMapper: Mappers.ResourceProviderDefaultErrorResponse
}
},
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.ResourceProviderDefaultErrorResponse
}
},
queryParameters: [Parameters.apiVersion],
urlParameters: [Parameters.$host, Parameters.nextLink],
headerParameters: [Parameters.accept],
serializer
};

Просмотреть файл

@ -3,108 +3,58 @@
* 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/validationsMappers";
import { Validations } from "../operationsInterfaces";
import * as coreClient from "@azure/core-client";
import * as Mappers from "../models/mappers";
import * as Parameters from "../models/parameters";
import { ConfluentManagementClientContext } from "../confluentManagementClientContext";
import { ConfluentManagementClient } from "../confluentManagementClient";
import {
OrganizationResource,
ValidationsValidateOrganizationOptionalParams,
ValidationsValidateOrganizationResponse
} from "../models";
/** Class representing a Validations. */
export class Validations {
private readonly client: ConfluentManagementClientContext;
/** Class containing Validations operations. */
export class ValidationsImpl implements Validations {
private readonly client: ConfluentManagementClient;
/**
* Create a Validations.
* @param {ConfluentManagementClientContext} client Reference to the service client.
* Initialize a new instance of the class Validations class.
* @param client Reference to the service client
*/
constructor(client: ConfluentManagementClientContext) {
constructor(client: ConfluentManagementClient) {
this.client = client;
}
/**
* @summary Organization Validate proxy resource
* Organization Validate proxy resource
* @param resourceGroupName Resource group name
* @param organizationName Organization resource name
* @param body Organization resource model
* @param [options] The optional parameters
* @returns Promise<Models.ValidationsValidateOrganizationResponse>
* @param options The options parameters.
*/
validateOrganization(
resourceGroupName: string,
organizationName: string,
body: Models.OrganizationResource,
options?: msRest.RequestOptionsBase
): Promise<Models.ValidationsValidateOrganizationResponse>;
/**
* @param resourceGroupName Resource group name
* @param organizationName Organization resource name
* @param body Organization resource model
* @param callback The callback
*/
validateOrganization(
resourceGroupName: string,
organizationName: string,
body: Models.OrganizationResource,
callback: msRest.ServiceCallback<Models.OrganizationResource>
): void;
/**
* @param resourceGroupName Resource group name
* @param organizationName Organization resource name
* @param body Organization resource model
* @param options The optional parameters
* @param callback The callback
*/
validateOrganization(
resourceGroupName: string,
organizationName: string,
body: Models.OrganizationResource,
options: msRest.RequestOptionsBase,
callback: msRest.ServiceCallback<Models.OrganizationResource>
): void;
validateOrganization(
resourceGroupName: string,
organizationName: string,
body: Models.OrganizationResource,
options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.OrganizationResource>,
callback?: msRest.ServiceCallback<Models.OrganizationResource>
): Promise<Models.ValidationsValidateOrganizationResponse> {
body: OrganizationResource,
options?: ValidationsValidateOrganizationOptionalParams
): Promise<ValidationsValidateOrganizationResponse> {
return this.client.sendOperationRequest(
{
resourceGroupName,
organizationName,
body,
options
},
validateOrganizationOperationSpec,
callback
) as Promise<Models.ValidationsValidateOrganizationResponse>;
{ resourceGroupName, organizationName, body, options },
validateOrganizationOperationSpec
);
}
}
// Operation Specifications
const serializer = new msRest.Serializer(Mappers);
const validateOrganizationOperationSpec: msRest.OperationSpec = {
httpMethod: "POST",
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
const validateOrganizationOperationSpec: coreClient.OperationSpec = {
path:
"subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/validations/{organizationName}/orgvalidate",
urlParameters: [
Parameters.subscriptionId,
Parameters.resourceGroupName,
Parameters.organizationName
],
queryParameters: [Parameters.apiVersion],
headerParameters: [Parameters.acceptLanguage],
requestBody: {
parameterPath: "body",
mapper: {
...Mappers.OrganizationResource,
required: true
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/validations/{organizationName}/orgvalidate",
httpMethod: "POST",
responses: {
200: {
bodyMapper: Mappers.OrganizationResource
@ -113,5 +63,15 @@ const validateOrganizationOperationSpec: msRest.OperationSpec = {
bodyMapper: Mappers.ResourceProviderDefaultErrorResponse
}
},
requestBody: Parameters.body3,
queryParameters: [Parameters.apiVersion],
urlParameters: [
Parameters.$host,
Parameters.subscriptionId,
Parameters.resourceGroupName,
Parameters.organizationName
],
headerParameters: [Parameters.accept, Parameters.contentType],
mediaType: "json",
serializer
};

Просмотреть файл

@ -6,10 +6,7 @@
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
export {
ErrorResponseBody,
OperationDisplay,
OperationListResult,
OperationResult,
ResourceProviderDefaultErrorResponse
} from "../models/mappers";
export * from "./marketplaceAgreements";
export * from "./organizationOperations";
export * from "./organization";
export * from "./validations";

Просмотреть файл

@ -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 { PagedAsyncIterableIterator } from "@azure/core-paging";
import {
ConfluentAgreementResource,
MarketplaceAgreementsListOptionalParams,
MarketplaceAgreementsCreateOptionalParams,
MarketplaceAgreementsCreateResponse
} from "../models";
/// <reference lib="esnext.asynciterable" />
/** Interface representing a MarketplaceAgreements. */
export interface MarketplaceAgreements {
/**
* List Confluent marketplace agreements in the subscription.
* @param options The options parameters.
*/
list(
options?: MarketplaceAgreementsListOptionalParams
): PagedAsyncIterableIterator<ConfluentAgreementResource>;
/**
* Create Confluent Marketplace agreement in the subscription.
* @param options The options parameters.
*/
create(
options?: MarketplaceAgreementsCreateOptionalParams
): Promise<MarketplaceAgreementsCreateResponse>;
}

Просмотреть файл

@ -0,0 +1,114 @@
/*
* 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 { PagedAsyncIterableIterator } from "@azure/core-paging";
import { PollerLike, PollOperationState } from "@azure/core-lro";
import {
OrganizationResource,
OrganizationListBySubscriptionOptionalParams,
OrganizationListByResourceGroupOptionalParams,
OrganizationGetOptionalParams,
OrganizationGetResponse,
OrganizationCreateOptionalParams,
OrganizationCreateResponse,
OrganizationUpdateOptionalParams,
OrganizationUpdateResponse,
OrganizationDeleteOptionalParams
} from "../models";
/// <reference lib="esnext.asynciterable" />
/** Interface representing a Organization. */
export interface Organization {
/**
* List all organizations under the specified subscription.
* @param options The options parameters.
*/
listBySubscription(
options?: OrganizationListBySubscriptionOptionalParams
): PagedAsyncIterableIterator<OrganizationResource>;
/**
* List all Organizations under the specified resource group.
* @param resourceGroupName Resource group name
* @param options The options parameters.
*/
listByResourceGroup(
resourceGroupName: string,
options?: OrganizationListByResourceGroupOptionalParams
): PagedAsyncIterableIterator<OrganizationResource>;
/**
* Get the properties of a specific Organization resource.
* @param resourceGroupName Resource group name
* @param organizationName Organization resource name
* @param options The options parameters.
*/
get(
resourceGroupName: string,
organizationName: string,
options?: OrganizationGetOptionalParams
): Promise<OrganizationGetResponse>;
/**
* Create Organization resource
* @param resourceGroupName Resource group name
* @param organizationName Organization resource name
* @param options The options parameters.
*/
beginCreate(
resourceGroupName: string,
organizationName: string,
options?: OrganizationCreateOptionalParams
): Promise<
PollerLike<
PollOperationState<OrganizationCreateResponse>,
OrganizationCreateResponse
>
>;
/**
* Create Organization resource
* @param resourceGroupName Resource group name
* @param organizationName Organization resource name
* @param options The options parameters.
*/
beginCreateAndWait(
resourceGroupName: string,
organizationName: string,
options?: OrganizationCreateOptionalParams
): Promise<OrganizationCreateResponse>;
/**
* Update Organization resource
* @param resourceGroupName Resource group name
* @param organizationName Organization resource name
* @param options The options parameters.
*/
update(
resourceGroupName: string,
organizationName: string,
options?: OrganizationUpdateOptionalParams
): Promise<OrganizationUpdateResponse>;
/**
* Delete Organization resource
* @param resourceGroupName Resource group name
* @param organizationName Organization resource name
* @param options The options parameters.
*/
beginDelete(
resourceGroupName: string,
organizationName: string,
options?: OrganizationDeleteOptionalParams
): Promise<PollerLike<PollOperationState<void>, void>>;
/**
* Delete Organization resource
* @param resourceGroupName Resource group name
* @param organizationName Organization resource name
* @param options The options parameters.
*/
beginDeleteAndWait(
resourceGroupName: string,
organizationName: string,
options?: OrganizationDeleteOptionalParams
): Promise<void>;
}

Просмотреть файл

@ -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 { PagedAsyncIterableIterator } from "@azure/core-paging";
import {
OperationResult,
OrganizationOperationsListOptionalParams
} from "../models";
/// <reference lib="esnext.asynciterable" />
/** Interface representing a OrganizationOperations. */
export interface OrganizationOperations {
/**
* List all operations provided by Microsoft.Confluent.
* @param options The options parameters.
*/
list(
options?: OrganizationOperationsListOptionalParams
): PagedAsyncIterableIterator<OperationResult>;
}

Просмотреть файл

@ -0,0 +1,30 @@
/*
* 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 {
OrganizationResource,
ValidationsValidateOrganizationOptionalParams,
ValidationsValidateOrganizationResponse
} from "../models";
/** Interface representing a Validations. */
export interface Validations {
/**
* Organization Validate proxy resource
* @param resourceGroupName Resource group name
* @param organizationName Organization resource name
* @param body Organization resource model
* @param options The options parameters.
*/
validateOrganization(
resourceGroupName: string,
organizationName: string,
body: OrganizationResource,
options?: ValidationsValidateOrganizationOptionalParams
): Promise<ValidationsValidateOrganizationResponse>;
}

Просмотреть файл

@ -0,0 +1,48 @@
/*
* 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 {
env,
record,
RecorderEnvironmentSetup,
Recorder
} from "@azure-tools/test-recorder";
import * as assert from "assert";
const recorderEnvSetup: RecorderEnvironmentSetup = {
replaceableVariables: {
AZURE_CLIENT_ID: "azure_client_id",
AZURE_CLIENT_SECRET: "azure_client_secret",
AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888",
SUBSCRIPTION_ID: "azure_subscription_id"
},
customizationsOnRecordings: [
(recording: any): any =>
recording.replace(
/"access_token":"[^"]*"/g,
`"access_token":"access_token"`
)
],
queryParametersToSkip: []
};
describe("My test", () => {
let recorder: Recorder;
beforeEach(async function() {
recorder = record(this, recorderEnvSetup);
});
afterEach(async function() {
await recorder.stop();
});
it("sample test", async function() {
console.log("Hi, I'm a test!");
});
});

Просмотреть файл

@ -3,7 +3,7 @@
"module": "es6",
"moduleResolution": "node",
"strict": true,
"target": "es5",
"target": "es6",
"sourceMap": true,
"declarationMap": true,
"esModuleInterop": true,
@ -11,9 +11,9 @@
"forceConsistentCasingInFileNames": true,
"lib": ["es6", "dom"],
"declaration": true,
"outDir": "./esm",
"outDir": "./dist-esm",
"importHelpers": true
},
"include": ["./src/**/*.ts"],
"include": ["./src/**/*.ts", "./test/**/*.ts"],
"exclude": ["node_modules"]
}

29
sdk/confluent/ci.yml Normal file
Просмотреть файл

@ -0,0 +1,29 @@
# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file.
trigger:
branches:
include:
- main
- release/*
- hotfix/*
paths:
include:
- sdk/confluent/
pr:
branches:
include:
- main
- release/*
- hotfix/*
paths:
include:
- sdk/confluent/
extends:
template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml
parameters:
ServiceDirectory: confluent
Artifacts:
- name: azure-arm-confluent
safeName: azurearmconfluent