diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index e29ea4a82c83..3bf9fc798210 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -3955,7 +3955,7 @@ packages: resolution: {integrity: sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==} deprecated: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797) dependencies: - ms: 2.1.1 + ms: 2.1.3 dev: false /debug@3.2.7: @@ -4207,7 +4207,7 @@ packages: dependencies: semver: 7.5.4 shelljs: 0.8.5 - typescript: 5.3.0-dev.20231002 + typescript: 5.3.0-dev.20231003 dev: false /eastasianwidth@0.2.0: @@ -5215,7 +5215,7 @@ packages: fs.realpath: 1.0.0 inflight: 1.0.6 inherits: 2.0.4 - minimatch: 3.0.4 + minimatch: 3.1.2 once: 1.4.0 path-is-absolute: 1.0.1 dev: false @@ -8937,8 +8937,8 @@ packages: hasBin: true dev: false - /typescript@5.3.0-dev.20231002: - resolution: {integrity: sha512-TQXM13rrDgID8W4Ok4KDQAqwLUjLcAXL+NKv0zJiIEQfa0bOM0yoRiSgvcjaCJ4lZT4bScrq3vHspVM2x8rkOQ==} + /typescript@5.3.0-dev.20231003: + resolution: {integrity: sha512-OyUdPjo1wNYs+PVDr9ARcEPs0aOqdxterOFzQzWK6DR4tsadKPbrOx8JgTOvSUwhkNOxBOEh7BonqV2uNsTxvA==} engines: {node: '>=14.17'} hasBin: true dev: false @@ -11374,10 +11374,11 @@ packages: dev: false file:projects/arm-confluent.tgz: - resolution: {integrity: sha512-wcFUsiVa2oqSv50GBxaQ9tyyhW82PGH1NSmA6wDbn0eHpVlnTFYJWBR1UpCC09+4z9mgkrJu45eirUzh33UBcg==, tarball: file:projects/arm-confluent.tgz} + resolution: {integrity: sha512-lm7bVaNVedSsL5VGIqGorGDsHL0zdMtl3rEbI2TiWIti/ZIrtPNaRA18bx2Fm4mSjXnrerO+/jH3oYO3B0Gryg==, tarball: file:projects/arm-confluent.tgz} name: '@rush-temp/arm-confluent' version: 0.0.0 dependencies: + '@azure/identity': 2.1.0 '@microsoft/api-extractor': 7.38.0(@types/node@14.18.63) '@rollup/plugin-commonjs': 24.1.0(rollup@2.79.1) '@rollup/plugin-json': 6.0.0(rollup@2.79.1) @@ -11387,9 +11388,10 @@ packages: '@types/node': 14.18.63 chai: 4.3.10 cross-env: 7.0.3 - mkdirp: 1.0.4 - mocha: 10.2.0 - rimraf: 3.0.2 + dotenv: 16.3.1 + mkdirp: 2.1.6 + mocha: 7.2.0 + rimraf: 5.0.5 rollup: 2.79.1 rollup-plugin-sourcemaps: 0.6.3(@types/node@14.18.63)(rollup@2.79.1) ts-node: 10.9.1(@types/node@14.18.63)(typescript@5.0.4) @@ -11399,6 +11401,7 @@ packages: transitivePeerDependencies: - '@swc/core' - '@swc/wasm' + - supports-color dev: false file:projects/arm-connectedvmware.tgz: diff --git a/sdk/confluent/arm-confluent/CHANGELOG.md b/sdk/confluent/arm-confluent/CHANGELOG.md index c9c3f43b5475..310b6dd8f889 100644 --- a/sdk/confluent/arm-confluent/CHANGELOG.md +++ b/sdk/confluent/arm-confluent/CHANGELOG.md @@ -1,21 +1,11 @@ # Release History + +## 3.0.0 (2023-10-03) -## 3.0.0-beta.4 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - -## 3.0.0-beta.3 (2022-11-18) - -The package of @azure/arm-confluent is using our next generation design principles since version 3.0.0-beta.3, which contains breaking changes. +The package of @azure/arm-confluent is using our next generation design principles since version 3.0.0, 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/azsdk/js/mgmt/quickstart ). +To learn more, please refer to our documentation [Quick Start](https://aka.ms/js-track2-quickstart). diff --git a/sdk/confluent/arm-confluent/LICENSE b/sdk/confluent/arm-confluent/LICENSE index 5d1d36e0af80..3a1d9b6f24f7 100644 --- a/sdk/confluent/arm-confluent/LICENSE +++ b/sdk/confluent/arm-confluent/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2022 Microsoft +Copyright (c) 2023 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/confluent/arm-confluent/README.md b/sdk/confluent/arm-confluent/README.md index 170dcc4ed492..b86c01393bb8 100644 --- a/sdk/confluent/arm-confluent/README.md +++ b/sdk/confluent/arm-confluent/README.md @@ -6,7 +6,7 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f [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) | +[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-confluent) | [Samples](https://github.com/Azure-Samples/azure-samples-js-management) ## Getting started diff --git a/sdk/confluent/arm-confluent/_meta.json b/sdk/confluent/arm-confluent/_meta.json index 48e10442c454..179d2e83b999 100644 --- a/sdk/confluent/arm-confluent/_meta.json +++ b/sdk/confluent/arm-confluent/_meta.json @@ -1,8 +1,8 @@ { - "commit": "20df2424a278ca19437e437a7dbf3a7857a0dd9d", + "commit": "d1446551aa1f23ace193617eb02274f693b5fd42", "readme": "specification/confluent/resource-manager/readme.md", - "autorest_command": "autorest --version=3.8.4 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\confluent\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.3.20221108.1 --generate-sample=true", + "autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/confluent/resource-manager/readme.md --use=@autorest/typescript@^6.0.4", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.4.2", - "use": "@autorest/typescript@6.0.0-rc.3.20221108.1" + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.2", + "use": "@autorest/typescript@^6.0.4" } \ No newline at end of file diff --git a/sdk/confluent/arm-confluent/package.json b/sdk/confluent/arm-confluent/package.json index 0647e9ea146e..86ebbec52ba1 100644 --- a/sdk/confluent/arm-confluent/package.json +++ b/sdk/confluent/arm-confluent/package.json @@ -3,17 +3,17 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for ConfluentManagementClient.", - "version": "3.0.0-beta.4", + "version": "3.0.0", "engines": { "node": ">=14.0.0" }, "dependencies": { - "@azure/core-lro": "^2.2.0", + "@azure/core-lro": "^2.5.4", "@azure/abort-controller": "^1.0.0", "@azure/core-paging": "^1.2.0", - "@azure/core-client": "^1.6.1", + "@azure/core-client": "^1.7.0", "@azure/core-auth": "^1.3.0", - "@azure/core-rest-pipeline": "^1.8.0", + "@azure/core-rest-pipeline": "^1.12.0", "tslib": "^2.2.0" }, "keywords": [ @@ -33,24 +33,24 @@ "@rollup/plugin-json": "^6.0.0", "@rollup/plugin-multi-entry": "^6.0.0", "@rollup/plugin-node-resolve": "^13.1.3", - "mkdirp": "^1.0.4", + "mkdirp": "^2.1.2", "rollup": "^2.66.1", "rollup-plugin-sourcemaps": "^0.6.3", "typescript": "~5.0.0", "uglify-js": "^3.4.9", - "rimraf": "^3.0.0", - "@azure/identity": "^3.3.0", + "rimraf": "^5.0.0", + "dotenv": "^16.0.0", + "@azure/identity": "^2.0.1", "@azure-tools/test-recorder": "^3.0.0", "@azure-tools/test-credential": "^1.0.0", - "mocha": "^10.0.0", + "mocha": "^7.1.1", "@types/chai": "^4.2.8", "chai": "^4.2.0", "cross-env": "^7.0.2", "@types/node": "^14.0.0", - "@azure/dev-tool": "^1.0.0", - "ts-node": "^10.0.0" + "ts-node": "^10.0.0", + "@azure/dev-tool": "^1.0.0" }, - "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" @@ -84,7 +84,7 @@ "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", + "clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", "build:node": "echo skipped", "build:browser": "echo skipped", "build:test": "echo skipped", @@ -112,12 +112,5 @@ ] }, "autoPublish": true, - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-confluent?view=azure-node-preview" - } -} + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/confluent/arm-confluent" +} \ No newline at end of file diff --git a/sdk/confluent/arm-confluent/review/arm-confluent.api.md b/sdk/confluent/arm-confluent/review/arm-confluent.api.md index 8939b7a68710..c4b91738bab6 100644 --- a/sdk/confluent/arm-confluent/review/arm-confluent.api.md +++ b/sdk/confluent/arm-confluent/review/arm-confluent.api.md @@ -6,9 +6,185 @@ import * as coreAuth from '@azure/core-auth'; import * as coreClient from '@azure/core-client'; +import { OperationState } from '@azure/core-lro'; import { PagedAsyncIterableIterator } from '@azure/core-paging'; -import { PollerLike } from '@azure/core-lro'; -import { PollOperationState } from '@azure/core-lro'; +import { SimplePollerLike } from '@azure/core-lro'; + +// @public +export interface Access { + inviteUser(resourceGroupName: string, organizationName: string, body: AccessInviteUserAccountModel, options?: AccessInviteUserOptionalParams): Promise; + listClusters(resourceGroupName: string, organizationName: string, body: ListAccessRequestModel, options?: AccessListClustersOptionalParams): Promise; + listEnvironments(resourceGroupName: string, organizationName: string, body: ListAccessRequestModel, options?: AccessListEnvironmentsOptionalParams): Promise; + listInvitations(resourceGroupName: string, organizationName: string, body: ListAccessRequestModel, options?: AccessListInvitationsOptionalParams): Promise; + listRoleBindings(resourceGroupName: string, organizationName: string, body: ListAccessRequestModel, options?: AccessListRoleBindingsOptionalParams): Promise; + listServiceAccounts(resourceGroupName: string, organizationName: string, body: ListAccessRequestModel, options?: AccessListServiceAccountsOptionalParams): Promise; + listUsers(resourceGroupName: string, organizationName: string, body: ListAccessRequestModel, options?: AccessListUsersOptionalParams): Promise; +} + +// @public +export interface AccessInvitedUserDetails { + authType?: string; + invitedEmail?: string; +} + +// @public +export interface AccessInviteUserAccountModel { + email?: string; + invitedUserDetails?: AccessInvitedUserDetails; + organizationId?: string; + upn?: string; +} + +// @public +export interface AccessInviteUserOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AccessInviteUserResponse = InvitationRecord; + +// @public +export interface AccessListClustersOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AccessListClustersResponse = AccessListClusterSuccessResponse; + +// @public +export interface AccessListClusterSuccessResponse { + data?: ClusterRecord[]; + kind?: string; + metadata?: ConfluentListMetadata; +} + +// @public +export interface AccessListEnvironmentsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AccessListEnvironmentsResponse = AccessListEnvironmentsSuccessResponse; + +// @public +export interface AccessListEnvironmentsSuccessResponse { + data?: EnvironmentRecord[]; + kind?: string; + metadata?: ConfluentListMetadata; +} + +// @public +export interface AccessListInvitationsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AccessListInvitationsResponse = AccessListInvitationsSuccessResponse; + +// @public +export interface AccessListInvitationsSuccessResponse { + data?: InvitationRecord[]; + kind?: string; + metadata?: ConfluentListMetadata; +} + +// @public +export interface AccessListRoleBindingsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AccessListRoleBindingsResponse = AccessListRoleBindingsSuccessResponse; + +// @public +export interface AccessListRoleBindingsSuccessResponse { + data?: RoleBindingRecord[]; + kind?: string; + metadata?: ConfluentListMetadata; +} + +// @public +export interface AccessListServiceAccountsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AccessListServiceAccountsResponse = AccessListServiceAccountsSuccessResponse; + +// @public +export interface AccessListServiceAccountsSuccessResponse { + data?: ServiceAccountRecord[]; + kind?: string; + metadata?: ConfluentListMetadata; +} + +// @public +export interface AccessListUsersOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AccessListUsersResponse = AccessListUsersSuccessResponse; + +// @public +export interface AccessListUsersSuccessResponse { + data?: UserRecord[]; + kind?: string; + metadata?: ConfluentListMetadata; +} + +// @public +export interface ClusterByokEntity { + id?: string; + related?: string; + resourceName?: string; +} + +// @public +export interface ClusterConfigEntity { + kind?: string; +} + +// @public +export interface ClusterEnvironmentEntity { + environment?: string; + id?: string; + related?: string; + resourceName?: string; +} + +// @public +export interface ClusterNetworkEntity { + environment?: string; + id?: string; + related?: string; + resourceName?: string; +} + +// @public +export interface ClusterRecord { + displayName?: string; + id?: string; + kind?: string; + metadata?: MetadataEntity; + spec?: ClusterSpecEntity; + status?: ClusterStatusEntity; +} + +// @public +export interface ClusterSpecEntity { + apiEndpoint?: string; + availability?: string; + byok?: ClusterByokEntity; + cloud?: string; + config?: ClusterConfigEntity; + displayName?: string; + environment?: ClusterEnvironmentEntity; + httpEndpoint?: string; + kafkaBootstrapEndpoint?: string; + network?: ClusterNetworkEntity; + region?: string; + zone?: string; +} + +// @public +export interface ClusterStatusEntity { + cku?: number; + phase?: string; +} // @public export interface ConfluentAgreementResource { @@ -32,11 +208,23 @@ export interface ConfluentAgreementResourceListResponse { value?: ConfluentAgreementResource[]; } +// @public +export interface ConfluentListMetadata { + first?: string; + last?: string; + next?: string; + prev?: string; + totalSize?: number; +} + // @public (undocumented) export class ConfluentManagementClient extends coreClient.ServiceClient { // (undocumented) $host: string; constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: ConfluentManagementClientOptionalParams); + constructor(credentials: coreAuth.TokenCredential, options?: ConfluentManagementClientOptionalParams); + // (undocumented) + access: Access; // (undocumented) apiVersion: string; // (undocumented) @@ -46,7 +234,7 @@ export class ConfluentManagementClient extends coreClient.ServiceClient { // (undocumented) organizationOperations: OrganizationOperations; // (undocumented) - subscriptionId: string; + subscriptionId?: string; // (undocumented) validations: Validations; } @@ -61,6 +249,14 @@ export interface ConfluentManagementClientOptionalParams extends coreClient.Serv // @public export type CreatedByType = string; +// @public +export interface EnvironmentRecord { + displayName?: string; + id?: string; + kind?: string; + metadata?: MetadataEntity; +} + // @public export interface ErrorResponseBody { readonly code?: string; @@ -72,6 +268,18 @@ export interface ErrorResponseBody { // @public export function getContinuationToken(page: unknown): string | undefined; +// @public +export interface InvitationRecord { + acceptedAt?: string; + authType?: string; + email?: string; + expiresAt?: string; + id?: string; + kind?: string; + metadata?: MetadataEntity; + status?: string; +} + // @public export enum KnownCreatedByType { Application = "Application", @@ -107,6 +315,18 @@ export enum KnownSaaSOfferStatus { Updating = "Updating" } +// @public +export interface LinkOrganization { + token: string; +} + +// @public +export interface ListAccessRequestModel { + searchFilters?: { + [propertyName: string]: string; + }; +} + // @public export interface MarketplaceAgreements { create(options?: MarketplaceAgreementsCreateOptionalParams): Promise; @@ -135,13 +355,25 @@ export interface MarketplaceAgreementsListOptionalParams extends coreClient.Oper // @public export type MarketplaceAgreementsListResponse = ConfluentAgreementResourceListResponse; +// @public +export interface MetadataEntity { + createdAt?: string; + deletedAt?: string; + resourceName?: string; + self?: string; + updatedAt?: string; +} + // @public export interface OfferDetail { id: string; planId: string; planName: string; + privateOfferId?: string; + privateOfferIds?: string[]; publisherId: string; - readonly status?: SaaSOfferStatus; + status?: SaaSOfferStatus; + termId?: string; termUnit: string; } @@ -168,9 +400,9 @@ export interface OperationResult { // @public export interface Organization { - beginCreate(resourceGroupName: string, organizationName: string, options?: OrganizationCreateOptionalParams): Promise, OrganizationCreateResponse>>; + beginCreate(resourceGroupName: string, organizationName: string, options?: OrganizationCreateOptionalParams): Promise, OrganizationCreateResponse>>; beginCreateAndWait(resourceGroupName: string, organizationName: string, options?: OrganizationCreateOptionalParams): Promise; - beginDelete(resourceGroupName: string, organizationName: string, options?: OrganizationDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, organizationName: string, options?: OrganizationDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, organizationName: string, options?: OrganizationDeleteOptionalParams): Promise; get(resourceGroupName: string, organizationName: string, options?: OrganizationGetOptionalParams): Promise; listByResourceGroup(resourceGroupName: string, options?: OrganizationListByResourceGroupOptionalParams): PagedAsyncIterableIterator; @@ -252,6 +484,7 @@ export type OrganizationOperationsListResponse = OperationListResult; export interface OrganizationResource { readonly createdTime?: Date; readonly id?: string; + linkOrganization?: LinkOrganization; location?: string; readonly name?: string; offerDetail: OfferDetail; @@ -295,9 +528,28 @@ export interface ResourceProviderDefaultErrorResponse { readonly error?: ErrorResponseBody; } +// @public +export interface RoleBindingRecord { + crnPattern?: string; + id?: string; + kind?: string; + metadata?: MetadataEntity; + principal?: string; + roleName?: string; +} + // @public export type SaaSOfferStatus = string; +// @public +export interface ServiceAccountRecord { + description?: string; + displayName?: string; + id?: string; + kind?: string; + metadata?: MetadataEntity; +} + // @public export interface SystemData { createdAt?: Date; @@ -310,14 +562,34 @@ export interface SystemData { // @public export interface UserDetail { + aadEmail?: string; emailAddress: string; firstName?: string; lastName?: string; + userPrincipalName?: string; +} + +// @public +export interface UserRecord { + authType?: string; + email?: string; + fullName?: string; + id?: string; + kind?: string; + metadata?: MetadataEntity; +} + +// @public +export interface ValidationResponse { + info?: { + [propertyName: string]: string; + }; } // @public export interface Validations { validateOrganization(resourceGroupName: string, organizationName: string, body: OrganizationResource, options?: ValidationsValidateOrganizationOptionalParams): Promise; + validateOrganizationV2(resourceGroupName: string, organizationName: string, body: OrganizationResource, options?: ValidationsValidateOrganizationV2OptionalParams): Promise; } // @public @@ -327,6 +599,13 @@ export interface ValidationsValidateOrganizationOptionalParams extends coreClien // @public export type ValidationsValidateOrganizationResponse = OrganizationResource; +// @public +export interface ValidationsValidateOrganizationV2OptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ValidationsValidateOrganizationV2Response = ValidationResponse; + // (No @packageDocumentation comment for this package) ``` diff --git a/sdk/confluent/arm-confluent/src/confluentManagementClient.ts b/sdk/confluent/arm-confluent/src/confluentManagementClient.ts index a765865f39ee..5bfd8f29dc02 100644 --- a/sdk/confluent/arm-confluent/src/confluentManagementClient.ts +++ b/sdk/confluent/arm-confluent/src/confluentManagementClient.ts @@ -18,37 +18,53 @@ import { MarketplaceAgreementsImpl, OrganizationOperationsImpl, OrganizationImpl, - ValidationsImpl + ValidationsImpl, + AccessImpl } from "./operations"; import { MarketplaceAgreements, OrganizationOperations, Organization, - Validations + Validations, + Access } from "./operationsInterfaces"; import { ConfluentManagementClientOptionalParams } from "./models"; export class ConfluentManagementClient extends coreClient.ServiceClient { $host: string; apiVersion: string; - subscriptionId: string; + subscriptionId?: string; /** * Initializes a new instance of the ConfluentManagementClient class. * @param credentials Subscription credentials which uniquely identify client subscription. - * @param subscriptionId Microsoft Azure subscription id + * @param subscriptionId The ID of the target subscription. The value must be an UUID. * @param options The parameter options */ constructor( credentials: coreAuth.TokenCredential, subscriptionId: string, options?: ConfluentManagementClientOptionalParams + ); + constructor( + credentials: coreAuth.TokenCredential, + options?: ConfluentManagementClientOptionalParams + ); + constructor( + credentials: coreAuth.TokenCredential, + subscriptionIdOrOptions?: ConfluentManagementClientOptionalParams | string, + options?: ConfluentManagementClientOptionalParams ) { if (credentials === undefined) { throw new Error("'credentials' cannot be null"); } - if (subscriptionId === undefined) { - throw new Error("'subscriptionId' cannot be null"); + + let subscriptionId: string | undefined; + + if (typeof subscriptionIdOrOptions === "string") { + subscriptionId = subscriptionIdOrOptions; + } else if (typeof subscriptionIdOrOptions === "object") { + options = subscriptionIdOrOptions; } // Initializing default values for options @@ -60,7 +76,7 @@ export class ConfluentManagementClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-confluent/3.0.0-beta.4`; + const packageDetails = `azsdk-js-arm-confluent/3.0.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -113,11 +129,12 @@ export class ConfluentManagementClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2021-09-01-preview"; + this.apiVersion = options.apiVersion || "2023-08-22"; this.marketplaceAgreements = new MarketplaceAgreementsImpl(this); this.organizationOperations = new OrganizationOperationsImpl(this); this.organization = new OrganizationImpl(this); this.validations = new ValidationsImpl(this); + this.access = new AccessImpl(this); this.addCustomApiVersionPolicy(options.apiVersion); } @@ -153,4 +170,5 @@ export class ConfluentManagementClient extends coreClient.ServiceClient { organizationOperations: OrganizationOperations; organization: Organization; validations: Validations; + access: Access; } diff --git a/sdk/confluent/arm-confluent/src/lroImpl.ts b/sdk/confluent/arm-confluent/src/lroImpl.ts index 518d5f053b4e..dd803cd5e28c 100644 --- a/sdk/confluent/arm-confluent/src/lroImpl.ts +++ b/sdk/confluent/arm-confluent/src/lroImpl.ts @@ -6,29 +6,37 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { AbortSignalLike } from "@azure/abort-controller"; import { LongRunningOperation, LroResponse } from "@azure/core-lro"; -export class LroImpl implements LongRunningOperation { - constructor( - private sendOperationFn: (args: any, spec: any) => Promise>, - private args: Record, - private spec: { - readonly requestBody?: unknown; - readonly path?: string; - readonly httpMethod: string; - } & Record, - public requestPath: string = spec.path!, - public requestMethod: string = spec.httpMethod - ) {} - public async sendInitialRequest(): Promise> { - return this.sendOperationFn(this.args, this.spec); - } - public async sendPollRequest(path: string): Promise> { - const { requestBody, ...restSpec } = this.spec; - return this.sendOperationFn(this.args, { - ...restSpec, - path, - httpMethod: "GET" - }); - } +export function createLroSpec(inputs: { + sendOperationFn: (args: any, spec: any) => Promise>; + args: Record; + spec: { + readonly requestBody?: unknown; + readonly path?: string; + readonly httpMethod: string; + } & Record; +}): LongRunningOperation { + const { args, spec, sendOperationFn } = inputs; + return { + requestMethod: spec.httpMethod, + requestPath: spec.path!, + sendInitialRequest: () => sendOperationFn(args, spec), + sendPollRequest: ( + path: string, + options?: { abortSignal?: AbortSignalLike } + ) => { + const { requestBody, ...restSpec } = spec; + return sendOperationFn(args, { + ...restSpec, + httpMethod: "GET", + path, + abortSignal: options?.abortSignal + }); + } + }; } diff --git a/sdk/confluent/arm-confluent/src/models/index.ts b/sdk/confluent/arm-confluent/src/models/index.ts index fa716d7629ad..fd7750cf9700 100644 --- a/sdk/confluent/arm-confluent/src/models/index.ts +++ b/sdk/confluent/arm-confluent/src/models/index.ts @@ -193,6 +193,8 @@ export interface OrganizationResource { offerDetail: OfferDetail; /** Subscriber detail */ userDetail: UserDetail; + /** Link an existing Confluent organization */ + linkOrganization?: LinkOrganization; } /** Confluent Offer detail */ @@ -207,11 +209,14 @@ export interface OfferDetail { planName: string; /** Offer Plan Term unit */ termUnit: string; - /** - * SaaS Offer Status - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly status?: SaaSOfferStatus; + /** Offer Plan Term Id */ + termId?: string; + /** Private Offer Id */ + privateOfferId?: string; + /** Array of Private Offer Ids */ + privateOfferIds?: string[]; + /** SaaS Offer Status */ + status?: SaaSOfferStatus; } /** Subscriber detail */ @@ -222,6 +227,16 @@ export interface UserDetail { lastName?: string; /** Email address */ emailAddress: string; + /** User principal name */ + userPrincipalName?: string; + /** AAD email address */ + aadEmail?: string; +} + +/** Link an existing Confluent organization */ +export interface LinkOrganization { + /** User auth token */ + token: string; } /** Organization Resource update */ @@ -230,6 +245,296 @@ export interface OrganizationResourceUpdate { tags?: { [propertyName: string]: string }; } +/** Validation response from the provider */ +export interface ValidationResponse { + /** Info from the response */ + info?: { [propertyName: string]: string }; +} + +/** List Access Request Model */ +export interface ListAccessRequestModel { + /** Search filters for the request */ + searchFilters?: { [propertyName: string]: string }; +} + +/** List users success response */ +export interface AccessListUsersSuccessResponse { + /** Type of response */ + kind?: string; + /** Metadata of the list */ + metadata?: ConfluentListMetadata; + /** Data of the users list */ + data?: UserRecord[]; +} + +/** Metadata of the list */ +export interface ConfluentListMetadata { + /** First page of the list */ + first?: string; + /** Last page of the list */ + last?: string; + /** Previous page of the list */ + prev?: string; + /** Next page of the list */ + next?: string; + /** Total size of the list */ + totalSize?: number; +} + +/** Record of the user */ +export interface UserRecord { + /** Type of account */ + kind?: string; + /** Id of the user */ + id?: string; + /** Metadata of the record */ + metadata?: MetadataEntity; + /** Email of the user */ + email?: string; + /** Name of the user */ + fullName?: string; + /** Auth type of the user */ + authType?: string; +} + +/** Metadata of the data record */ +export interface MetadataEntity { + /** Self lookup url */ + self?: string; + /** Resource name of the record */ + resourceName?: string; + /** Created Date Time */ + createdAt?: string; + /** Updated Date time */ + updatedAt?: string; + /** Deleted Date time */ + deletedAt?: string; +} + +/** List service accounts success response */ +export interface AccessListServiceAccountsSuccessResponse { + /** Type of response */ + kind?: string; + /** Metadata of the list */ + metadata?: ConfluentListMetadata; + /** Data of the service accounts list */ + data?: ServiceAccountRecord[]; +} + +/** Record of the service account */ +export interface ServiceAccountRecord { + /** Type of account */ + kind?: string; + /** Id of the service account */ + id?: string; + /** Metadata of the record */ + metadata?: MetadataEntity; + /** Name of the service account */ + displayName?: string; + /** Description of the service account */ + description?: string; +} + +/** List invitations success response */ +export interface AccessListInvitationsSuccessResponse { + /** Type of response */ + kind?: string; + /** Metadata of the list */ + metadata?: ConfluentListMetadata; + /** Data of the invitations list */ + data?: InvitationRecord[]; +} + +/** Record of the invitation */ +export interface InvitationRecord { + /** Type of account */ + kind?: string; + /** Id of the invitation */ + id?: string; + /** Metadata of the record */ + metadata?: MetadataEntity; + /** Email of the user */ + email?: string; + /** Auth type of the user */ + authType?: string; + /** Status of the invitation */ + status?: string; + /** Accepted date time of the invitation */ + acceptedAt?: string; + /** Expiration date time of the invitation */ + expiresAt?: string; +} + +/** Invite User Account model */ +export interface AccessInviteUserAccountModel { + /** Id of the organization */ + organizationId?: string; + /** Email of the logged in user */ + email?: string; + /** Upn of the logged in user */ + upn?: string; + /** Details of the user who is being invited */ + invitedUserDetails?: AccessInvitedUserDetails; +} + +/** Details of the user being invited */ +export interface AccessInvitedUserDetails { + /** UPN/Email of the user who is being invited */ + invitedEmail?: string; + /** Auth type of the user */ + authType?: string; +} + +/** List environments success response */ +export interface AccessListEnvironmentsSuccessResponse { + /** Type of response */ + kind?: string; + /** Metadata of the list */ + metadata?: ConfluentListMetadata; + /** Data of the environments list */ + data?: EnvironmentRecord[]; +} + +/** Record of the environment */ +export interface EnvironmentRecord { + /** Type of environment */ + kind?: string; + /** Id of the environment */ + id?: string; + /** Metadata of the record */ + metadata?: MetadataEntity; + /** Display name of the user */ + displayName?: string; +} + +/** List cluster success response */ +export interface AccessListClusterSuccessResponse { + /** Type of response */ + kind?: string; + /** Metadata of the list */ + metadata?: ConfluentListMetadata; + /** Data of the environments list */ + data?: ClusterRecord[]; +} + +/** Record of the environment */ +export interface ClusterRecord { + /** Type of environment */ + kind?: string; + /** Id of the environment */ + id?: string; + /** Metadata of the record */ + metadata?: MetadataEntity; + /** Display name of the user */ + displayName?: string; + /** Specification of the cluster */ + spec?: ClusterSpecEntity; + /** Specification of the cluster */ + status?: ClusterStatusEntity; +} + +/** Spec of the cluster record */ +export interface ClusterSpecEntity { + /** The name of the cluster */ + displayName?: string; + /** The availability zone configuration of the cluster */ + availability?: string; + /** The cloud service provider */ + cloud?: string; + /** type of zone availability */ + zone?: string; + /** The cloud service provider region */ + region?: string; + /** The bootstrap endpoint used by Kafka clients to connect to the cluster */ + kafkaBootstrapEndpoint?: string; + /** The cluster HTTP request URL. */ + httpEndpoint?: string; + /** The Kafka API cluster endpoint */ + apiEndpoint?: string; + /** Specification of the cluster */ + config?: ClusterConfigEntity; + /** Specification of the cluster */ + environment?: ClusterEnvironmentEntity; + /** Specification of the cluster */ + network?: ClusterNetworkEntity; + /** Specification of the cluster */ + byok?: ClusterByokEntity; +} + +/** The configuration of the Kafka cluster */ +export interface ClusterConfigEntity { + /** The lifecycle phase of the cluster */ + kind?: string; +} + +/** The environment to which cluster belongs */ +export interface ClusterEnvironmentEntity { + /** ID of the referred resource */ + id?: string; + /** Environment of the referred resource */ + environment?: string; + /** API URL for accessing or modifying the referred object */ + related?: string; + /** CRN reference to the referred resource */ + resourceName?: string; +} + +/** The network associated with this object */ +export interface ClusterNetworkEntity { + /** ID of the referred resource */ + id?: string; + /** Environment of the referred resource */ + environment?: string; + /** API URL for accessing or modifying the referred object */ + related?: string; + /** CRN reference to the referred resource */ + resourceName?: string; +} + +/** The network associated with this object */ +export interface ClusterByokEntity { + /** ID of the referred resource */ + id?: string; + /** API URL for accessing or modifying the referred object */ + related?: string; + /** CRN reference to the referred resource */ + resourceName?: string; +} + +/** Status of the cluster record */ +export interface ClusterStatusEntity { + /** The lifecycle phase of the cluster */ + phase?: string; + /** The number of Confluent Kafka Units */ + cku?: number; +} + +/** List cluster success response */ +export interface AccessListRoleBindingsSuccessResponse { + /** Type of response */ + kind?: string; + /** Metadata of the list */ + metadata?: ConfluentListMetadata; + /** Data of the environments list */ + data?: RoleBindingRecord[]; +} + +/** Record of the environment */ +export interface RoleBindingRecord { + /** The type of the resource. */ + kind?: string; + /** Id of the role */ + id?: string; + /** Metadata of the record */ + metadata?: MetadataEntity; + /** The principal User or Group to bind the role to */ + principal?: string; + /** The name of the role to bind to the principal */ + roleName?: string; + /** A CRN that specifies the scope and resource patterns necessary for the role to bind */ + crnPattern?: string; +} + /** Known values of {@link CreatedByType} that the service accepts. */ export enum KnownCreatedByType { /** User */ @@ -448,6 +753,62 @@ export interface ValidationsValidateOrganizationOptionalParams /** Contains response data for the validateOrganization operation. */ export type ValidationsValidateOrganizationResponse = OrganizationResource; +/** Optional parameters. */ +export interface ValidationsValidateOrganizationV2OptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the validateOrganizationV2 operation. */ +export type ValidationsValidateOrganizationV2Response = ValidationResponse; + +/** Optional parameters. */ +export interface AccessListUsersOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listUsers operation. */ +export type AccessListUsersResponse = AccessListUsersSuccessResponse; + +/** Optional parameters. */ +export interface AccessListServiceAccountsOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listServiceAccounts operation. */ +export type AccessListServiceAccountsResponse = AccessListServiceAccountsSuccessResponse; + +/** Optional parameters. */ +export interface AccessListInvitationsOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listInvitations operation. */ +export type AccessListInvitationsResponse = AccessListInvitationsSuccessResponse; + +/** Optional parameters. */ +export interface AccessInviteUserOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the inviteUser operation. */ +export type AccessInviteUserResponse = InvitationRecord; + +/** Optional parameters. */ +export interface AccessListEnvironmentsOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listEnvironments operation. */ +export type AccessListEnvironmentsResponse = AccessListEnvironmentsSuccessResponse; + +/** Optional parameters. */ +export interface AccessListClustersOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listClusters operation. */ +export type AccessListClustersResponse = AccessListClusterSuccessResponse; + +/** Optional parameters. */ +export interface AccessListRoleBindingsOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listRoleBindings operation. */ +export type AccessListRoleBindingsResponse = AccessListRoleBindingsSuccessResponse; + /** Optional parameters. */ export interface ConfluentManagementClientOptionalParams extends coreClient.ServiceClientOptions { diff --git a/sdk/confluent/arm-confluent/src/models/mappers.ts b/sdk/confluent/arm-confluent/src/models/mappers.ts index 7fbaf2733eb9..4991f3974b05 100644 --- a/sdk/confluent/arm-confluent/src/models/mappers.ts +++ b/sdk/confluent/arm-confluent/src/models/mappers.ts @@ -426,6 +426,13 @@ export const OrganizationResource: coreClient.CompositeMapper = { name: "Composite", className: "UserDetail" } + }, + linkOrganization: { + serializedName: "properties.linkOrganization", + type: { + name: "Composite", + className: "LinkOrganization" + } } } } @@ -458,7 +465,7 @@ export const OfferDetail: coreClient.CompositeMapper = { }, planId: { constraints: { - MaxLength: 50 + MaxLength: 200 }, serializedName: "planId", required: true, @@ -468,7 +475,7 @@ export const OfferDetail: coreClient.CompositeMapper = { }, planName: { constraints: { - MaxLength: 50 + MaxLength: 200 }, serializedName: "planName", required: true, @@ -486,9 +493,37 @@ export const OfferDetail: coreClient.CompositeMapper = { name: "String" } }, + termId: { + constraints: { + MaxLength: 50 + }, + serializedName: "termId", + type: { + name: "String" + } + }, + privateOfferId: { + constraints: { + MaxLength: 255 + }, + serializedName: "privateOfferId", + type: { + name: "String" + } + }, + privateOfferIds: { + serializedName: "privateOfferIds", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, status: { serializedName: "status", - readOnly: true, type: { name: "String" } @@ -529,6 +564,34 @@ export const UserDetail: coreClient.CompositeMapper = { type: { name: "String" } + }, + userPrincipalName: { + serializedName: "userPrincipalName", + type: { + name: "String" + } + }, + aadEmail: { + serializedName: "aadEmail", + type: { + name: "String" + } + } + } + } +}; + +export const LinkOrganization: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LinkOrganization", + modelProperties: { + token: { + serializedName: "token", + required: true, + type: { + name: "String" + } } } } @@ -549,3 +612,858 @@ export const OrganizationResourceUpdate: coreClient.CompositeMapper = { } } }; + +export const ValidationResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ValidationResponse", + modelProperties: { + info: { + serializedName: "info", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + } + } + } +}; + +export const ListAccessRequestModel: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ListAccessRequestModel", + modelProperties: { + searchFilters: { + serializedName: "searchFilters", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + } + } + } +}; + +export const AccessListUsersSuccessResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AccessListUsersSuccessResponse", + modelProperties: { + kind: { + serializedName: "kind", + type: { + name: "String" + } + }, + metadata: { + serializedName: "metadata", + type: { + name: "Composite", + className: "ConfluentListMetadata" + } + }, + data: { + serializedName: "data", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "UserRecord" + } + } + } + } + } + } +}; + +export const ConfluentListMetadata: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ConfluentListMetadata", + modelProperties: { + first: { + serializedName: "first", + type: { + name: "String" + } + }, + last: { + serializedName: "last", + type: { + name: "String" + } + }, + prev: { + serializedName: "prev", + type: { + name: "String" + } + }, + next: { + serializedName: "next", + type: { + name: "String" + } + }, + totalSize: { + serializedName: "total_size", + type: { + name: "Number" + } + } + } + } +}; + +export const UserRecord: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "UserRecord", + modelProperties: { + kind: { + serializedName: "kind", + type: { + name: "String" + } + }, + id: { + serializedName: "id", + type: { + name: "String" + } + }, + metadata: { + serializedName: "metadata", + type: { + name: "Composite", + className: "MetadataEntity" + } + }, + email: { + serializedName: "email", + type: { + name: "String" + } + }, + fullName: { + serializedName: "full_name", + type: { + name: "String" + } + }, + authType: { + serializedName: "auth_type", + type: { + name: "String" + } + } + } + } +}; + +export const MetadataEntity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MetadataEntity", + modelProperties: { + self: { + serializedName: "self", + type: { + name: "String" + } + }, + resourceName: { + serializedName: "resource_name", + type: { + name: "String" + } + }, + createdAt: { + serializedName: "created_at", + type: { + name: "String" + } + }, + updatedAt: { + serializedName: "updated_at", + type: { + name: "String" + } + }, + deletedAt: { + serializedName: "deleted_at", + type: { + name: "String" + } + } + } + } +}; + +export const AccessListServiceAccountsSuccessResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AccessListServiceAccountsSuccessResponse", + modelProperties: { + kind: { + serializedName: "kind", + type: { + name: "String" + } + }, + metadata: { + serializedName: "metadata", + type: { + name: "Composite", + className: "ConfluentListMetadata" + } + }, + data: { + serializedName: "data", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ServiceAccountRecord" + } + } + } + } + } + } +}; + +export const ServiceAccountRecord: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ServiceAccountRecord", + modelProperties: { + kind: { + serializedName: "kind", + type: { + name: "String" + } + }, + id: { + serializedName: "id", + type: { + name: "String" + } + }, + metadata: { + serializedName: "metadata", + type: { + name: "Composite", + className: "MetadataEntity" + } + }, + displayName: { + serializedName: "display_name", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + } + } + } +}; + +export const AccessListInvitationsSuccessResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AccessListInvitationsSuccessResponse", + modelProperties: { + kind: { + serializedName: "kind", + type: { + name: "String" + } + }, + metadata: { + serializedName: "metadata", + type: { + name: "Composite", + className: "ConfluentListMetadata" + } + }, + data: { + serializedName: "data", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "InvitationRecord" + } + } + } + } + } + } +}; + +export const InvitationRecord: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "InvitationRecord", + modelProperties: { + kind: { + serializedName: "kind", + type: { + name: "String" + } + }, + id: { + serializedName: "id", + type: { + name: "String" + } + }, + metadata: { + serializedName: "metadata", + type: { + name: "Composite", + className: "MetadataEntity" + } + }, + email: { + serializedName: "email", + type: { + name: "String" + } + }, + authType: { + serializedName: "auth_type", + type: { + name: "String" + } + }, + status: { + serializedName: "status", + type: { + name: "String" + } + }, + acceptedAt: { + serializedName: "accepted_at", + type: { + name: "String" + } + }, + expiresAt: { + serializedName: "expires_at", + type: { + name: "String" + } + } + } + } +}; + +export const AccessInviteUserAccountModel: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AccessInviteUserAccountModel", + modelProperties: { + organizationId: { + serializedName: "organizationId", + type: { + name: "String" + } + }, + email: { + serializedName: "email", + type: { + name: "String" + } + }, + upn: { + serializedName: "upn", + type: { + name: "String" + } + }, + invitedUserDetails: { + serializedName: "invitedUserDetails", + type: { + name: "Composite", + className: "AccessInvitedUserDetails" + } + } + } + } +}; + +export const AccessInvitedUserDetails: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AccessInvitedUserDetails", + modelProperties: { + invitedEmail: { + serializedName: "invitedEmail", + type: { + name: "String" + } + }, + authType: { + serializedName: "auth_type", + type: { + name: "String" + } + } + } + } +}; + +export const AccessListEnvironmentsSuccessResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AccessListEnvironmentsSuccessResponse", + modelProperties: { + kind: { + serializedName: "kind", + type: { + name: "String" + } + }, + metadata: { + serializedName: "metadata", + type: { + name: "Composite", + className: "ConfluentListMetadata" + } + }, + data: { + serializedName: "data", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EnvironmentRecord" + } + } + } + } + } + } +}; + +export const EnvironmentRecord: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "EnvironmentRecord", + modelProperties: { + kind: { + serializedName: "kind", + type: { + name: "String" + } + }, + id: { + serializedName: "id", + type: { + name: "String" + } + }, + metadata: { + serializedName: "metadata", + type: { + name: "Composite", + className: "MetadataEntity" + } + }, + displayName: { + serializedName: "display_name", + type: { + name: "String" + } + } + } + } +}; + +export const AccessListClusterSuccessResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AccessListClusterSuccessResponse", + modelProperties: { + kind: { + serializedName: "kind", + type: { + name: "String" + } + }, + metadata: { + serializedName: "metadata", + type: { + name: "Composite", + className: "ConfluentListMetadata" + } + }, + data: { + serializedName: "data", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ClusterRecord" + } + } + } + } + } + } +}; + +export const ClusterRecord: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClusterRecord", + modelProperties: { + kind: { + serializedName: "kind", + type: { + name: "String" + } + }, + id: { + serializedName: "id", + type: { + name: "String" + } + }, + metadata: { + serializedName: "metadata", + type: { + name: "Composite", + className: "MetadataEntity" + } + }, + displayName: { + serializedName: "display_name", + type: { + name: "String" + } + }, + spec: { + serializedName: "spec", + type: { + name: "Composite", + className: "ClusterSpecEntity" + } + }, + status: { + serializedName: "status", + type: { + name: "Composite", + className: "ClusterStatusEntity" + } + } + } + } +}; + +export const ClusterSpecEntity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClusterSpecEntity", + modelProperties: { + displayName: { + serializedName: "display_name", + type: { + name: "String" + } + }, + availability: { + serializedName: "availability", + type: { + name: "String" + } + }, + cloud: { + serializedName: "cloud", + type: { + name: "String" + } + }, + zone: { + serializedName: "zone", + type: { + name: "String" + } + }, + region: { + serializedName: "region", + type: { + name: "String" + } + }, + kafkaBootstrapEndpoint: { + serializedName: "kafka_bootstrap_endpoint", + type: { + name: "String" + } + }, + httpEndpoint: { + serializedName: "http_endpoint", + type: { + name: "String" + } + }, + apiEndpoint: { + serializedName: "api_endpoint", + type: { + name: "String" + } + }, + config: { + serializedName: "config", + type: { + name: "Composite", + className: "ClusterConfigEntity" + } + }, + environment: { + serializedName: "environment", + type: { + name: "Composite", + className: "ClusterEnvironmentEntity" + } + }, + network: { + serializedName: "network", + type: { + name: "Composite", + className: "ClusterNetworkEntity" + } + }, + byok: { + serializedName: "byok", + type: { + name: "Composite", + className: "ClusterByokEntity" + } + } + } + } +}; + +export const ClusterConfigEntity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClusterConfigEntity", + modelProperties: { + kind: { + serializedName: "kind", + type: { + name: "String" + } + } + } + } +}; + +export const ClusterEnvironmentEntity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClusterEnvironmentEntity", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + }, + environment: { + serializedName: "environment", + type: { + name: "String" + } + }, + related: { + serializedName: "related", + type: { + name: "String" + } + }, + resourceName: { + serializedName: "resource_name", + type: { + name: "String" + } + } + } + } +}; + +export const ClusterNetworkEntity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClusterNetworkEntity", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + }, + environment: { + serializedName: "environment", + type: { + name: "String" + } + }, + related: { + serializedName: "related", + type: { + name: "String" + } + }, + resourceName: { + serializedName: "resource_name", + type: { + name: "String" + } + } + } + } +}; + +export const ClusterByokEntity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClusterByokEntity", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + }, + related: { + serializedName: "related", + type: { + name: "String" + } + }, + resourceName: { + serializedName: "resource_name", + type: { + name: "String" + } + } + } + } +}; + +export const ClusterStatusEntity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClusterStatusEntity", + modelProperties: { + phase: { + serializedName: "phase", + type: { + name: "String" + } + }, + cku: { + serializedName: "cku", + type: { + name: "Number" + } + } + } + } +}; + +export const AccessListRoleBindingsSuccessResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AccessListRoleBindingsSuccessResponse", + modelProperties: { + kind: { + serializedName: "kind", + type: { + name: "String" + } + }, + metadata: { + serializedName: "metadata", + type: { + name: "Composite", + className: "ConfluentListMetadata" + } + }, + data: { + serializedName: "data", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RoleBindingRecord" + } + } + } + } + } + } +}; + +export const RoleBindingRecord: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RoleBindingRecord", + modelProperties: { + kind: { + serializedName: "kind", + type: { + name: "String" + } + }, + id: { + serializedName: "id", + type: { + name: "String" + } + }, + metadata: { + serializedName: "metadata", + type: { + name: "Composite", + className: "MetadataEntity" + } + }, + principal: { + serializedName: "principal", + type: { + name: "String" + } + }, + roleName: { + serializedName: "role_name", + type: { + name: "String" + } + }, + crnPattern: { + serializedName: "crn_pattern", + type: { + name: "String" + } + } + } + } +}; diff --git a/sdk/confluent/arm-confluent/src/models/parameters.ts b/sdk/confluent/arm-confluent/src/models/parameters.ts index c193a5fea583..38231f6ffded 100644 --- a/sdk/confluent/arm-confluent/src/models/parameters.ts +++ b/sdk/confluent/arm-confluent/src/models/parameters.ts @@ -14,7 +14,9 @@ import { import { ConfluentAgreementResource as ConfluentAgreementResourceMapper, OrganizationResource as OrganizationResourceMapper, - OrganizationResourceUpdate as OrganizationResourceUpdateMapper + OrganizationResourceUpdate as OrganizationResourceUpdateMapper, + ListAccessRequestModel as ListAccessRequestModelMapper, + AccessInviteUserAccountModel as AccessInviteUserAccountModelMapper } from "../models/mappers"; export const accept: OperationParameter = { @@ -44,7 +46,7 @@ export const $host: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2021-09-01-preview", + defaultValue: "2023-08-22", isConstant: true, serializedName: "api-version", type: { @@ -59,7 +61,7 @@ export const subscriptionId: OperationURLParameter = { serializedName: "subscriptionId", required: true, type: { - name: "String" + name: "Uuid" } } }; @@ -96,6 +98,10 @@ export const nextLink: OperationURLParameter = { export const resourceGroupName: OperationURLParameter = { parameterPath: "resourceGroupName", mapper: { + constraints: { + MaxLength: 90, + MinLength: 1 + }, serializedName: "resourceGroupName", required: true, type: { @@ -129,3 +135,13 @@ export const body3: OperationParameter = { parameterPath: "body", mapper: OrganizationResourceMapper }; + +export const body4: OperationParameter = { + parameterPath: "body", + mapper: ListAccessRequestModelMapper +}; + +export const body5: OperationParameter = { + parameterPath: "body", + mapper: AccessInviteUserAccountModelMapper +}; diff --git a/sdk/confluent/arm-confluent/src/operations/access.ts b/sdk/confluent/arm-confluent/src/operations/access.ts new file mode 100644 index 000000000000..b2b4e6febdd9 --- /dev/null +++ b/sdk/confluent/arm-confluent/src/operations/access.ts @@ -0,0 +1,348 @@ +/* + * 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 { Access } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { ConfluentManagementClient } from "../confluentManagementClient"; +import { + ListAccessRequestModel, + AccessListUsersOptionalParams, + AccessListUsersResponse, + AccessListServiceAccountsOptionalParams, + AccessListServiceAccountsResponse, + AccessListInvitationsOptionalParams, + AccessListInvitationsResponse, + AccessInviteUserAccountModel, + AccessInviteUserOptionalParams, + AccessInviteUserResponse, + AccessListEnvironmentsOptionalParams, + AccessListEnvironmentsResponse, + AccessListClustersOptionalParams, + AccessListClustersResponse, + AccessListRoleBindingsOptionalParams, + AccessListRoleBindingsResponse +} from "../models"; + +/** Class containing Access operations. */ +export class AccessImpl implements Access { + private readonly client: ConfluentManagementClient; + + /** + * Initialize a new instance of the class Access class. + * @param client Reference to the service client + */ + constructor(client: ConfluentManagementClient) { + this.client = client; + } + + /** + * Organization users details + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name + * @param body List Access Request Model + * @param options The options parameters. + */ + listUsers( + resourceGroupName: string, + organizationName: string, + body: ListAccessRequestModel, + options?: AccessListUsersOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, organizationName, body, options }, + listUsersOperationSpec + ); + } + + /** + * Organization service accounts details + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name + * @param body List Access Request Model + * @param options The options parameters. + */ + listServiceAccounts( + resourceGroupName: string, + organizationName: string, + body: ListAccessRequestModel, + options?: AccessListServiceAccountsOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, organizationName, body, options }, + listServiceAccountsOperationSpec + ); + } + + /** + * Organization accounts invitation details + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name + * @param body List Access Request Model + * @param options The options parameters. + */ + listInvitations( + resourceGroupName: string, + organizationName: string, + body: ListAccessRequestModel, + options?: AccessListInvitationsOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, organizationName, body, options }, + listInvitationsOperationSpec + ); + } + + /** + * Invite user to the organization + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name + * @param body Invite user account model + * @param options The options parameters. + */ + inviteUser( + resourceGroupName: string, + organizationName: string, + body: AccessInviteUserAccountModel, + options?: AccessInviteUserOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, organizationName, body, options }, + inviteUserOperationSpec + ); + } + + /** + * Environment list of an organization + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name + * @param body List Access Request Model + * @param options The options parameters. + */ + listEnvironments( + resourceGroupName: string, + organizationName: string, + body: ListAccessRequestModel, + options?: AccessListEnvironmentsOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, organizationName, body, options }, + listEnvironmentsOperationSpec + ); + } + + /** + * Cluster details + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name + * @param body List Access Request Model + * @param options The options parameters. + */ + listClusters( + resourceGroupName: string, + organizationName: string, + body: ListAccessRequestModel, + options?: AccessListClustersOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, organizationName, body, options }, + listClustersOperationSpec + ); + } + + /** + * Organization role bindings + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name + * @param body List Access Request Model + * @param options The options parameters. + */ + listRoleBindings( + resourceGroupName: string, + organizationName: string, + body: ListAccessRequestModel, + options?: AccessListRoleBindingsOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, organizationName, body, options }, + listRoleBindingsOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listUsersOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/access/default/listUsers", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.AccessListUsersSuccessResponse + }, + default: { + bodyMapper: Mappers.ResourceProviderDefaultErrorResponse + } + }, + requestBody: Parameters.body4, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.organizationName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listServiceAccountsOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/access/default/listServiceAccounts", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.AccessListServiceAccountsSuccessResponse + }, + default: { + bodyMapper: Mappers.ResourceProviderDefaultErrorResponse + } + }, + requestBody: Parameters.body4, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.organizationName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listInvitationsOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/access/default/listInvitations", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.AccessListInvitationsSuccessResponse + }, + default: { + bodyMapper: Mappers.ResourceProviderDefaultErrorResponse + } + }, + requestBody: Parameters.body4, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.organizationName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const inviteUserOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/access/default/createInvitation", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.InvitationRecord + }, + default: { + bodyMapper: Mappers.ResourceProviderDefaultErrorResponse + } + }, + requestBody: Parameters.body5, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.organizationName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listEnvironmentsOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/access/default/listEnvironments", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.AccessListEnvironmentsSuccessResponse + }, + default: { + bodyMapper: Mappers.ResourceProviderDefaultErrorResponse + } + }, + requestBody: Parameters.body4, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.organizationName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listClustersOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/access/default/listClusters", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.AccessListClusterSuccessResponse + }, + default: { + bodyMapper: Mappers.ResourceProviderDefaultErrorResponse + } + }, + requestBody: Parameters.body4, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.organizationName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listRoleBindingsOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/access/default/listRoleBindings", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.AccessListRoleBindingsSuccessResponse + }, + default: { + bodyMapper: Mappers.ResourceProviderDefaultErrorResponse + } + }, + requestBody: Parameters.body4, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.organizationName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; diff --git a/sdk/confluent/arm-confluent/src/operations/index.ts b/sdk/confluent/arm-confluent/src/operations/index.ts index a7ad709bf426..301a3ab1fe75 100644 --- a/sdk/confluent/arm-confluent/src/operations/index.ts +++ b/sdk/confluent/arm-confluent/src/operations/index.ts @@ -10,3 +10,4 @@ export * from "./marketplaceAgreements"; export * from "./organizationOperations"; export * from "./organization"; export * from "./validations"; +export * from "./access"; diff --git a/sdk/confluent/arm-confluent/src/operations/marketplaceAgreements.ts b/sdk/confluent/arm-confluent/src/operations/marketplaceAgreements.ts index e9a1281eb8a6..46c19792efda 100644 --- a/sdk/confluent/arm-confluent/src/operations/marketplaceAgreements.ts +++ b/sdk/confluent/arm-confluent/src/operations/marketplaceAgreements.ts @@ -175,7 +175,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ResourceProviderDefaultErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/confluent/arm-confluent/src/operations/organization.ts b/sdk/confluent/arm-confluent/src/operations/organization.ts index 4a6c5082dbfc..6b33d189256a 100644 --- a/sdk/confluent/arm-confluent/src/operations/organization.ts +++ b/sdk/confluent/arm-confluent/src/operations/organization.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { ConfluentManagementClient } from "../confluentManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { OrganizationResource, OrganizationListBySubscriptionNextOptionalParams, @@ -103,7 +107,7 @@ export class OrganizationImpl implements Organization { /** * List all Organizations under the specified resource group. - * @param resourceGroupName Resource group name + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param options The options parameters. */ public listByResourceGroup( @@ -185,7 +189,7 @@ export class OrganizationImpl implements Organization { /** * List all Organizations under the specified resource group. - * @param resourceGroupName Resource group name + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param options The options parameters. */ private _listByResourceGroup( @@ -200,7 +204,7 @@ export class OrganizationImpl implements Organization { /** * Get the properties of a specific Organization resource. - * @param resourceGroupName Resource group name + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param organizationName Organization resource name * @param options The options parameters. */ @@ -217,7 +221,7 @@ export class OrganizationImpl implements Organization { /** * Create Organization resource - * @param resourceGroupName Resource group name + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param organizationName Organization resource name * @param options The options parameters. */ @@ -226,8 +230,8 @@ export class OrganizationImpl implements Organization { organizationName: string, options?: OrganizationCreateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, OrganizationCreateResponse > > { @@ -237,7 +241,7 @@ export class OrganizationImpl implements Organization { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -270,15 +274,18 @@ export class OrganizationImpl implements Organization { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, organizationName, options }, - createOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, organizationName, options }, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + OrganizationCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -286,7 +293,7 @@ export class OrganizationImpl implements Organization { /** * Create Organization resource - * @param resourceGroupName Resource group name + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param organizationName Organization resource name * @param options The options parameters. */ @@ -305,7 +312,7 @@ export class OrganizationImpl implements Organization { /** * Update Organization resource - * @param resourceGroupName Resource group name + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param organizationName Organization resource name * @param options The options parameters. */ @@ -322,7 +329,7 @@ export class OrganizationImpl implements Organization { /** * Delete Organization resource - * @param resourceGroupName Resource group name + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param organizationName Organization resource name * @param options The options parameters. */ @@ -330,14 +337,14 @@ export class OrganizationImpl implements Organization { resourceGroupName: string, organizationName: string, options?: OrganizationDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -370,15 +377,15 @@ export class OrganizationImpl implements Organization { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, organizationName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, organizationName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "location" + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -386,7 +393,7 @@ export class OrganizationImpl implements Organization { /** * Delete Organization resource - * @param resourceGroupName Resource group name + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param organizationName Organization resource name * @param options The options parameters. */ @@ -420,7 +427,7 @@ export class OrganizationImpl implements Organization { /** * ListByResourceGroupNext - * @param resourceGroupName Resource group name + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. * @param options The options parameters. */ @@ -589,7 +596,6 @@ const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ResourceProviderDefaultErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -609,7 +615,6 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ResourceProviderDefaultErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/confluent/arm-confluent/src/operations/organizationOperations.ts b/sdk/confluent/arm-confluent/src/operations/organizationOperations.ts index bd84a6b8a418..c08118fd9537 100644 --- a/sdk/confluent/arm-confluent/src/operations/organizationOperations.ts +++ b/sdk/confluent/arm-confluent/src/operations/organizationOperations.ts @@ -143,7 +143,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ResourceProviderDefaultErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.$host, Parameters.nextLink], headerParameters: [Parameters.accept], serializer diff --git a/sdk/confluent/arm-confluent/src/operations/validations.ts b/sdk/confluent/arm-confluent/src/operations/validations.ts index 7e90c7a6bfd3..981bbeecc9eb 100644 --- a/sdk/confluent/arm-confluent/src/operations/validations.ts +++ b/sdk/confluent/arm-confluent/src/operations/validations.ts @@ -14,7 +14,9 @@ import { ConfluentManagementClient } from "../confluentManagementClient"; import { OrganizationResource, ValidationsValidateOrganizationOptionalParams, - ValidationsValidateOrganizationResponse + ValidationsValidateOrganizationResponse, + ValidationsValidateOrganizationV2OptionalParams, + ValidationsValidateOrganizationV2Response } from "../models"; /** Class containing Validations operations. */ @@ -31,7 +33,7 @@ export class ValidationsImpl implements Validations { /** * Organization Validate proxy resource - * @param resourceGroupName Resource group name + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param organizationName Organization resource name * @param body Organization resource model * @param options The options parameters. @@ -47,6 +49,25 @@ export class ValidationsImpl implements Validations { validateOrganizationOperationSpec ); } + + /** + * Organization Validate proxy resource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name + * @param body Organization resource model + * @param options The options parameters. + */ + validateOrganizationV2( + resourceGroupName: string, + organizationName: string, + body: OrganizationResource, + options?: ValidationsValidateOrganizationV2OptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, organizationName, body, options }, + validateOrganizationV2OperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); @@ -75,3 +96,27 @@ const validateOrganizationOperationSpec: coreClient.OperationSpec = { mediaType: "json", serializer }; +const validateOrganizationV2OperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/validations/{organizationName}/orgvalidateV2", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.ValidationResponse + }, + default: { + 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 +}; diff --git a/sdk/confluent/arm-confluent/src/operationsInterfaces/access.ts b/sdk/confluent/arm-confluent/src/operationsInterfaces/access.ts new file mode 100644 index 000000000000..f1f8c4dd11cb --- /dev/null +++ b/sdk/confluent/arm-confluent/src/operationsInterfaces/access.ts @@ -0,0 +1,121 @@ +/* + * 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 { + ListAccessRequestModel, + AccessListUsersOptionalParams, + AccessListUsersResponse, + AccessListServiceAccountsOptionalParams, + AccessListServiceAccountsResponse, + AccessListInvitationsOptionalParams, + AccessListInvitationsResponse, + AccessInviteUserAccountModel, + AccessInviteUserOptionalParams, + AccessInviteUserResponse, + AccessListEnvironmentsOptionalParams, + AccessListEnvironmentsResponse, + AccessListClustersOptionalParams, + AccessListClustersResponse, + AccessListRoleBindingsOptionalParams, + AccessListRoleBindingsResponse +} from "../models"; + +/** Interface representing a Access. */ +export interface Access { + /** + * Organization users details + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name + * @param body List Access Request Model + * @param options The options parameters. + */ + listUsers( + resourceGroupName: string, + organizationName: string, + body: ListAccessRequestModel, + options?: AccessListUsersOptionalParams + ): Promise; + /** + * Organization service accounts details + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name + * @param body List Access Request Model + * @param options The options parameters. + */ + listServiceAccounts( + resourceGroupName: string, + organizationName: string, + body: ListAccessRequestModel, + options?: AccessListServiceAccountsOptionalParams + ): Promise; + /** + * Organization accounts invitation details + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name + * @param body List Access Request Model + * @param options The options parameters. + */ + listInvitations( + resourceGroupName: string, + organizationName: string, + body: ListAccessRequestModel, + options?: AccessListInvitationsOptionalParams + ): Promise; + /** + * Invite user to the organization + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name + * @param body Invite user account model + * @param options The options parameters. + */ + inviteUser( + resourceGroupName: string, + organizationName: string, + body: AccessInviteUserAccountModel, + options?: AccessInviteUserOptionalParams + ): Promise; + /** + * Environment list of an organization + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name + * @param body List Access Request Model + * @param options The options parameters. + */ + listEnvironments( + resourceGroupName: string, + organizationName: string, + body: ListAccessRequestModel, + options?: AccessListEnvironmentsOptionalParams + ): Promise; + /** + * Cluster details + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name + * @param body List Access Request Model + * @param options The options parameters. + */ + listClusters( + resourceGroupName: string, + organizationName: string, + body: ListAccessRequestModel, + options?: AccessListClustersOptionalParams + ): Promise; + /** + * Organization role bindings + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name + * @param body List Access Request Model + * @param options The options parameters. + */ + listRoleBindings( + resourceGroupName: string, + organizationName: string, + body: ListAccessRequestModel, + options?: AccessListRoleBindingsOptionalParams + ): Promise; +} diff --git a/sdk/confluent/arm-confluent/src/operationsInterfaces/index.ts b/sdk/confluent/arm-confluent/src/operationsInterfaces/index.ts index a7ad709bf426..301a3ab1fe75 100644 --- a/sdk/confluent/arm-confluent/src/operationsInterfaces/index.ts +++ b/sdk/confluent/arm-confluent/src/operationsInterfaces/index.ts @@ -10,3 +10,4 @@ export * from "./marketplaceAgreements"; export * from "./organizationOperations"; export * from "./organization"; export * from "./validations"; +export * from "./access"; diff --git a/sdk/confluent/arm-confluent/src/operationsInterfaces/organization.ts b/sdk/confluent/arm-confluent/src/operationsInterfaces/organization.ts index 9c8532f7140c..c7dca9180a76 100644 --- a/sdk/confluent/arm-confluent/src/operationsInterfaces/organization.ts +++ b/sdk/confluent/arm-confluent/src/operationsInterfaces/organization.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { OrganizationResource, OrganizationListBySubscriptionOptionalParams, @@ -33,7 +33,7 @@ export interface Organization { ): PagedAsyncIterableIterator; /** * List all Organizations under the specified resource group. - * @param resourceGroupName Resource group name + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param options The options parameters. */ listByResourceGroup( @@ -42,7 +42,7 @@ export interface Organization { ): PagedAsyncIterableIterator; /** * Get the properties of a specific Organization resource. - * @param resourceGroupName Resource group name + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param organizationName Organization resource name * @param options The options parameters. */ @@ -53,7 +53,7 @@ export interface Organization { ): Promise; /** * Create Organization resource - * @param resourceGroupName Resource group name + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param organizationName Organization resource name * @param options The options parameters. */ @@ -62,14 +62,14 @@ export interface Organization { organizationName: string, options?: OrganizationCreateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, OrganizationCreateResponse > >; /** * Create Organization resource - * @param resourceGroupName Resource group name + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param organizationName Organization resource name * @param options The options parameters. */ @@ -80,7 +80,7 @@ export interface Organization { ): Promise; /** * Update Organization resource - * @param resourceGroupName Resource group name + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param organizationName Organization resource name * @param options The options parameters. */ @@ -91,7 +91,7 @@ export interface Organization { ): Promise; /** * Delete Organization resource - * @param resourceGroupName Resource group name + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param organizationName Organization resource name * @param options The options parameters. */ @@ -99,10 +99,10 @@ export interface Organization { resourceGroupName: string, organizationName: string, options?: OrganizationDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Delete Organization resource - * @param resourceGroupName Resource group name + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param organizationName Organization resource name * @param options The options parameters. */ diff --git a/sdk/confluent/arm-confluent/src/operationsInterfaces/validations.ts b/sdk/confluent/arm-confluent/src/operationsInterfaces/validations.ts index 4fca9a5c01aa..1ec5eb5dac91 100644 --- a/sdk/confluent/arm-confluent/src/operationsInterfaces/validations.ts +++ b/sdk/confluent/arm-confluent/src/operationsInterfaces/validations.ts @@ -9,14 +9,16 @@ import { OrganizationResource, ValidationsValidateOrganizationOptionalParams, - ValidationsValidateOrganizationResponse + ValidationsValidateOrganizationResponse, + ValidationsValidateOrganizationV2OptionalParams, + ValidationsValidateOrganizationV2Response } from "../models"; /** Interface representing a Validations. */ export interface Validations { /** * Organization Validate proxy resource - * @param resourceGroupName Resource group name + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param organizationName Organization resource name * @param body Organization resource model * @param options The options parameters. @@ -27,4 +29,17 @@ export interface Validations { body: OrganizationResource, options?: ValidationsValidateOrganizationOptionalParams ): Promise; + /** + * Organization Validate proxy resource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name + * @param body Organization resource model + * @param options The options parameters. + */ + validateOrganizationV2( + resourceGroupName: string, + organizationName: string, + body: OrganizationResource, + options?: ValidationsValidateOrganizationV2OptionalParams + ): Promise; } diff --git a/sdk/confluent/arm-confluent/src/pagingHelper.ts b/sdk/confluent/arm-confluent/src/pagingHelper.ts index d85fc13bce1e..269a2b9814b5 100644 --- a/sdk/confluent/arm-confluent/src/pagingHelper.ts +++ b/sdk/confluent/arm-confluent/src/pagingHelper.ts @@ -13,11 +13,11 @@ export interface PageInfo { const pageMap = new WeakMap(); /** - * Given a result page from a pageable operation, returns a - * continuation token that can be used to begin paging from + * Given the last `.value` produced by the `byPage` iterator, + * returns a continuation token that can be used to begin paging from * that point later. - * @param page A result object from calling .byPage() on a paged operation. - * @returns The continuation token that can be passed into byPage(). + * @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator. + * @returns The continuation token that can be passed into byPage() during future calls. */ export function getContinuationToken(page: unknown): string | undefined { if (typeof page !== "object" || page === null) { diff --git a/sdk/confluent/arm-confluent/tsconfig.json b/sdk/confluent/arm-confluent/tsconfig.json index dabc91bb234f..3e6ae96443f3 100644 --- a/sdk/confluent/arm-confluent/tsconfig.json +++ b/sdk/confluent/arm-confluent/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-confluent": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"