From d83ccc9ba3909cc86f96cf56d133c59e4ed7205a Mon Sep 17 00:00:00 2001 From: kazrael2119 <98569699+kazrael2119@users.noreply.github.com> Date: Wed, 13 Mar 2024 14:14:04 +0800 Subject: [PATCH] [mgmt] confluent release --- sdk/confluent/arm-confluent/CHANGELOG.md | 83 +- sdk/confluent/arm-confluent/LICENSE | 2 +- sdk/confluent/arm-confluent/_meta.json | 8 +- sdk/confluent/arm-confluent/assets.json | 2 +- sdk/confluent/arm-confluent/package.json | 9 +- .../arm-confluent/review/arm-confluent.api.md | 317 +++ .../accessCreateRoleBindingSample.ts | 53 + .../accessDeleteRoleBindingSample.ts | 45 + .../samples-dev/accessInviteUserSample.ts | 10 +- .../samples-dev/accessListClustersSample.ts | 8 +- .../accessListEnvironmentsSample.ts | 8 +- .../accessListInvitationsSample.ts | 10 +- .../accessListRoleBindingNameListSample.ts | 55 + .../accessListRoleBindingsSample.ts | 8 +- .../accessListServiceAccountsSample.ts | 8 +- .../samples-dev/accessListUsersSample.ts | 8 +- .../marketplaceAgreementsCreateSample.ts | 2 +- .../marketplaceAgreementsListSample.ts | 2 +- .../organizationCreateApiKeySample.ts | 55 + .../samples-dev/organizationCreateSample.ts | 12 +- .../organizationDeleteClusterApiKeySample.ts | 45 + .../samples-dev/organizationDeleteSample.ts | 4 +- .../organizationGetClusterApiKeySample.ts | 45 + .../organizationGetClusterByIdSample.ts | 47 + .../organizationGetEnvironmentByIdSample.ts | 45 + .../samples-dev/organizationGetSample.ts | 4 +- ...ationGetSchemaRegistryClusterByIdSample.ts | 47 + .../organizationListByResourceGroupSample.ts | 4 +- .../organizationListBySubscriptionSample.ts | 2 +- .../organizationListClustersSample.ts | 54 + .../organizationListEnvironmentsSample.ts | 52 + .../organizationListRegionsSample.ts | 54 + ...izationListSchemaRegistryClustersSample.ts | 48 + .../organizationOperationsListSample.ts | 2 +- .../samples-dev/organizationUpdateSample.ts | 8 +- .../validationsValidateOrganizationSample.ts | 12 +- ...validationsValidateOrganizationV2Sample.ts | 12 +- .../samples/v3/javascript/README.md | 70 +- .../accessCreateRoleBindingSample.js | 42 + .../accessDeleteRoleBindingSample.js | 41 + .../v3/javascript/accessInviteUserSample.js | 2 +- .../v3/javascript/accessListClustersSample.js | 2 +- .../accessListEnvironmentsSample.js | 2 +- .../javascript/accessListInvitationsSample.js | 2 +- .../accessListRoleBindingNameListSample.js | 47 + .../accessListRoleBindingsSample.js | 2 +- .../accessListServiceAccountsSample.js | 2 +- .../v3/javascript/accessListUsersSample.js | 2 +- .../marketplaceAgreementsCreateSample.js | 2 +- .../marketplaceAgreementsListSample.js | 2 +- .../organizationCreateApiKeySample.js | 48 + .../v3/javascript/organizationCreateSample.js | 4 +- .../organizationDeleteClusterApiKeySample.js | 41 + .../v3/javascript/organizationDeleteSample.js | 2 +- .../organizationGetClusterApiKeySample.js | 41 + .../organizationGetClusterByIdSample.js | 43 + .../organizationGetEnvironmentByIdSample.js | 41 + .../v3/javascript/organizationGetSample.js | 2 +- ...ationGetSchemaRegistryClusterByIdSample.js | 43 + .../organizationListByResourceGroupSample.js | 2 +- .../organizationListBySubscriptionSample.js | 2 +- .../organizationListClustersSample.js | 47 + .../organizationListEnvironmentsSample.js | 45 + .../organizationListRegionsSample.js | 43 + ...izationListSchemaRegistryClustersSample.js | 44 + .../organizationOperationsListSample.js | 2 +- .../v3/javascript/organizationUpdateSample.js | 2 +- .../validationsValidateOrganizationSample.js | 4 +- ...validationsValidateOrganizationV2Sample.js | 4 +- .../samples/v3/typescript/README.md | 70 +- .../src/accessCreateRoleBindingSample.ts | 53 + .../src/accessDeleteRoleBindingSample.ts | 45 + .../typescript/src/accessInviteUserSample.ts | 10 +- .../src/accessListClustersSample.ts | 8 +- .../src/accessListEnvironmentsSample.ts | 8 +- .../src/accessListInvitationsSample.ts | 10 +- .../accessListRoleBindingNameListSample.ts | 55 + .../src/accessListRoleBindingsSample.ts | 8 +- .../src/accessListServiceAccountsSample.ts | 8 +- .../typescript/src/accessListUsersSample.ts | 8 +- .../src/marketplaceAgreementsCreateSample.ts | 2 +- .../src/marketplaceAgreementsListSample.ts | 2 +- .../src/organizationCreateApiKeySample.ts | 55 + .../src/organizationCreateSample.ts | 12 +- .../organizationDeleteClusterApiKeySample.ts | 45 + .../src/organizationDeleteSample.ts | 4 +- .../src/organizationGetClusterApiKeySample.ts | 45 + .../src/organizationGetClusterByIdSample.ts | 47 + .../organizationGetEnvironmentByIdSample.ts | 45 + .../typescript/src/organizationGetSample.ts | 4 +- ...ationGetSchemaRegistryClusterByIdSample.ts | 47 + .../organizationListByResourceGroupSample.ts | 4 +- .../organizationListBySubscriptionSample.ts | 2 +- .../src/organizationListClustersSample.ts | 54 + .../src/organizationListEnvironmentsSample.ts | 52 + .../src/organizationListRegionsSample.ts | 54 + ...izationListSchemaRegistryClustersSample.ts | 48 + .../src/organizationOperationsListSample.ts | 2 +- .../src/organizationUpdateSample.ts | 8 +- .../validationsValidateOrganizationSample.ts | 12 +- ...validationsValidateOrganizationV2Sample.ts | 12 +- .../src/confluentManagementClient.ts | 41 +- sdk/confluent/arm-confluent/src/lroImpl.ts | 6 +- .../arm-confluent/src/models/index.ts | 474 +++- .../arm-confluent/src/models/mappers.ts | 1992 ++++++++++++----- .../arm-confluent/src/models/parameters.ts | 161 +- .../arm-confluent/src/operations/access.ts | 279 ++- .../src/operations/marketplaceAgreements.ts | 50 +- .../src/operations/organization.ts | 1201 ++++++++-- .../src/operations/organizationOperations.ts | 32 +- .../src/operations/validations.ts | 44 +- .../src/operationsInterfaces/access.ts | 69 +- .../marketplaceAgreements.ts | 6 +- .../src/operationsInterfaces/organization.ts | 190 +- .../organizationOperations.ts | 4 +- .../src/operationsInterfaces/validations.ts | 10 +- .../arm-confluent/src/pagingHelper.ts | 2 +- 117 files changed, 6052 insertions(+), 1216 deletions(-) create mode 100644 sdk/confluent/arm-confluent/samples-dev/accessCreateRoleBindingSample.ts create mode 100644 sdk/confluent/arm-confluent/samples-dev/accessDeleteRoleBindingSample.ts create mode 100644 sdk/confluent/arm-confluent/samples-dev/accessListRoleBindingNameListSample.ts create mode 100644 sdk/confluent/arm-confluent/samples-dev/organizationCreateApiKeySample.ts create mode 100644 sdk/confluent/arm-confluent/samples-dev/organizationDeleteClusterApiKeySample.ts create mode 100644 sdk/confluent/arm-confluent/samples-dev/organizationGetClusterApiKeySample.ts create mode 100644 sdk/confluent/arm-confluent/samples-dev/organizationGetClusterByIdSample.ts create mode 100644 sdk/confluent/arm-confluent/samples-dev/organizationGetEnvironmentByIdSample.ts create mode 100644 sdk/confluent/arm-confluent/samples-dev/organizationGetSchemaRegistryClusterByIdSample.ts create mode 100644 sdk/confluent/arm-confluent/samples-dev/organizationListClustersSample.ts create mode 100644 sdk/confluent/arm-confluent/samples-dev/organizationListEnvironmentsSample.ts create mode 100644 sdk/confluent/arm-confluent/samples-dev/organizationListRegionsSample.ts create mode 100644 sdk/confluent/arm-confluent/samples-dev/organizationListSchemaRegistryClustersSample.ts create mode 100644 sdk/confluent/arm-confluent/samples/v3/javascript/accessCreateRoleBindingSample.js create mode 100644 sdk/confluent/arm-confluent/samples/v3/javascript/accessDeleteRoleBindingSample.js create mode 100644 sdk/confluent/arm-confluent/samples/v3/javascript/accessListRoleBindingNameListSample.js create mode 100644 sdk/confluent/arm-confluent/samples/v3/javascript/organizationCreateApiKeySample.js create mode 100644 sdk/confluent/arm-confluent/samples/v3/javascript/organizationDeleteClusterApiKeySample.js create mode 100644 sdk/confluent/arm-confluent/samples/v3/javascript/organizationGetClusterApiKeySample.js create mode 100644 sdk/confluent/arm-confluent/samples/v3/javascript/organizationGetClusterByIdSample.js create mode 100644 sdk/confluent/arm-confluent/samples/v3/javascript/organizationGetEnvironmentByIdSample.js create mode 100644 sdk/confluent/arm-confluent/samples/v3/javascript/organizationGetSchemaRegistryClusterByIdSample.js create mode 100644 sdk/confluent/arm-confluent/samples/v3/javascript/organizationListClustersSample.js create mode 100644 sdk/confluent/arm-confluent/samples/v3/javascript/organizationListEnvironmentsSample.js create mode 100644 sdk/confluent/arm-confluent/samples/v3/javascript/organizationListRegionsSample.js create mode 100644 sdk/confluent/arm-confluent/samples/v3/javascript/organizationListSchemaRegistryClustersSample.js create mode 100644 sdk/confluent/arm-confluent/samples/v3/typescript/src/accessCreateRoleBindingSample.ts create mode 100644 sdk/confluent/arm-confluent/samples/v3/typescript/src/accessDeleteRoleBindingSample.ts create mode 100644 sdk/confluent/arm-confluent/samples/v3/typescript/src/accessListRoleBindingNameListSample.ts create mode 100644 sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationCreateApiKeySample.ts create mode 100644 sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationDeleteClusterApiKeySample.ts create mode 100644 sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationGetClusterApiKeySample.ts create mode 100644 sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationGetClusterByIdSample.ts create mode 100644 sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationGetEnvironmentByIdSample.ts create mode 100644 sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationGetSchemaRegistryClusterByIdSample.ts create mode 100644 sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationListClustersSample.ts create mode 100644 sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationListEnvironmentsSample.ts create mode 100644 sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationListRegionsSample.ts create mode 100644 sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationListSchemaRegistryClustersSample.ts diff --git a/sdk/confluent/arm-confluent/CHANGELOG.md b/sdk/confluent/arm-confluent/CHANGELOG.md index 08a59c41ade1..e7f14741f419 100644 --- a/sdk/confluent/arm-confluent/CHANGELOG.md +++ b/sdk/confluent/arm-confluent/CHANGELOG.md @@ -1,15 +1,78 @@ # Release History + +## 3.1.0 (2024-03-13) + +**Features** -## 3.0.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - + - Added operation Access.createRoleBinding + - Added operation Access.deleteRoleBinding + - Added operation Access.listRoleBindingNameList + - Added operation Organization.createAPIKey + - Added operation Organization.deleteClusterAPIKey + - Added operation Organization.getClusterAPIKey + - Added operation Organization.getClusterById + - Added operation Organization.getEnvironmentById + - Added operation Organization.getSchemaRegistryClusterById + - Added operation Organization.listClusters + - Added operation Organization.listEnvironments + - Added operation Organization.listRegions + - Added operation Organization.listSchemaRegistryClusters + - Added Interface AccessCreateRoleBindingOptionalParams + - Added Interface AccessCreateRoleBindingRequestModel + - Added Interface AccessDeleteRoleBindingOptionalParams + - Added Interface AccessListRoleBindingNameListOptionalParams + - Added Interface AccessRoleBindingNameListSuccessResponse + - Added Interface APIKeyOwnerEntity + - Added Interface APIKeyRecord + - Added Interface APIKeyResourceEntity + - Added Interface APIKeySpecEntity + - Added Interface CreateAPIKeyModel + - Added Interface GetEnvironmentsResponse + - Added Interface ListClustersSuccessResponse + - Added Interface ListRegionsSuccessResponse + - Added Interface ListSchemaRegistryClustersResponse + - Added Interface OrganizationCreateAPIKeyOptionalParams + - Added Interface OrganizationDeleteClusterAPIKeyOptionalParams + - Added Interface OrganizationGetClusterAPIKeyOptionalParams + - Added Interface OrganizationGetClusterByIdOptionalParams + - Added Interface OrganizationGetEnvironmentByIdOptionalParams + - Added Interface OrganizationGetSchemaRegistryClusterByIdOptionalParams + - Added Interface OrganizationListClustersNextOptionalParams + - Added Interface OrganizationListClustersOptionalParams + - Added Interface OrganizationListEnvironmentsNextOptionalParams + - Added Interface OrganizationListEnvironmentsOptionalParams + - Added Interface OrganizationListRegionsOptionalParams + - Added Interface OrganizationListSchemaRegistryClustersNextOptionalParams + - Added Interface OrganizationListSchemaRegistryClustersOptionalParams + - Added Interface RegionRecord + - Added Interface RegionSpecEntity + - Added Interface SCClusterByokEntity + - Added Interface SCClusterNetworkEnvironmentEntity + - Added Interface SCClusterRecord + - Added Interface SCClusterSpecEntity + - Added Interface SCConfluentListMetadata + - Added Interface SCEnvironmentRecord + - Added Interface SchemaRegistryClusterEnvironmentRegionEntity + - Added Interface SchemaRegistryClusterRecord + - Added Interface SchemaRegistryClusterSpecEntity + - Added Interface SchemaRegistryClusterStatusEntity + - Added Interface SCMetadataEntity + - Added Type Alias AccessCreateRoleBindingResponse + - Added Type Alias AccessListRoleBindingNameListResponse + - Added Type Alias OrganizationCreateAPIKeyResponse + - Added Type Alias OrganizationGetClusterAPIKeyResponse + - Added Type Alias OrganizationGetClusterByIdResponse + - Added Type Alias OrganizationGetEnvironmentByIdResponse + - Added Type Alias OrganizationGetSchemaRegistryClusterByIdResponse + - Added Type Alias OrganizationListClustersNextResponse + - Added Type Alias OrganizationListClustersResponse + - Added Type Alias OrganizationListEnvironmentsNextResponse + - Added Type Alias OrganizationListEnvironmentsResponse + - Added Type Alias OrganizationListRegionsResponse + - Added Type Alias OrganizationListSchemaRegistryClustersNextResponse + - Added Type Alias OrganizationListSchemaRegistryClustersResponse + + ## 3.0.0 (2023-11-07) The package of @azure/arm-confluent is using our next generation design principles since version 3.0.0, which contains breaking changes. diff --git a/sdk/confluent/arm-confluent/LICENSE b/sdk/confluent/arm-confluent/LICENSE index 3a1d9b6f24f7..7d5934740965 100644 --- a/sdk/confluent/arm-confluent/LICENSE +++ b/sdk/confluent/arm-confluent/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2023 Microsoft +Copyright (c) 2024 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/_meta.json b/sdk/confluent/arm-confluent/_meta.json index 416b5ba51ffb..00c51770a19f 100644 --- a/sdk/confluent/arm-confluent/_meta.json +++ b/sdk/confluent/arm-confluent/_meta.json @@ -1,8 +1,8 @@ { - "commit": "b13bd252f5a0ae3e870dcd5fb4dc5c1389a7a734", + "commit": "3004d02873a4b583ba6a3966a370f1ba19b5da1d", "readme": "specification/confluent/resource-manager/readme.md", - "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=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\confluent\\resource-manager\\readme.md --use=@autorest/typescript@6.0.12 --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=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\confluent\\resource-manager\\readme.md --use=@autorest/typescript@6.0.17 --generate-sample=true", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.7.2", - "use": "@autorest/typescript@6.0.12" + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.4", + "use": "@autorest/typescript@6.0.17" } \ No newline at end of file diff --git a/sdk/confluent/arm-confluent/assets.json b/sdk/confluent/arm-confluent/assets.json index ceafd70f98a4..032536a6af62 100644 --- a/sdk/confluent/arm-confluent/assets.json +++ b/sdk/confluent/arm-confluent/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "js", "TagPrefix": "js/confluent/arm-confluent", - "Tag": "js/confluent/arm-confluent_d726dea7d2" + "Tag": "js/confluent/arm-confluent_4fa200895a" } diff --git a/sdk/confluent/arm-confluent/package.json b/sdk/confluent/arm-confluent/package.json index d3134cf13f86..cc9bdd79fbb3 100644 --- a/sdk/confluent/arm-confluent/package.json +++ b/sdk/confluent/arm-confluent/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for ConfluentManagementClient.", - "version": "3.0.1", + "version": "3.1.0", "engines": { "node": ">=18.0.0" }, @@ -12,8 +12,8 @@ "@azure/abort-controller": "^1.0.0", "@azure/core-paging": "^1.2.0", "@azure/core-client": "^1.7.0", - "@azure/core-auth": "^1.3.0", - "@azure/core-rest-pipeline": "^1.12.0", + "@azure/core-auth": "^1.6.0", + "@azure/core-rest-pipeline": "^1.14.0", "tslib": "^2.2.0" }, "keywords": [ @@ -78,7 +78,6 @@ "pack": "npm pack 2>&1", "extract-api": "api-extractor run --local", "lint": "echo skipped", - "audit": "echo skipped", "clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", "build:node": "echo skipped", "build:browser": "echo skipped", @@ -116,4 +115,4 @@ "disableDocsMs": true, "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-confluent?view=azure-node-preview" } -} +} \ 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 c4b91738bab6..8b836c04a139 100644 --- a/sdk/confluent/arm-confluent/review/arm-confluent.api.md +++ b/sdk/confluent/arm-confluent/review/arm-confluent.api.md @@ -12,15 +12,36 @@ import { SimplePollerLike } from '@azure/core-lro'; // @public export interface Access { + createRoleBinding(resourceGroupName: string, organizationName: string, body: AccessCreateRoleBindingRequestModel, options?: AccessCreateRoleBindingOptionalParams): Promise; + deleteRoleBinding(resourceGroupName: string, organizationName: string, roleBindingId: string, options?: AccessDeleteRoleBindingOptionalParams): Promise; 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; + listRoleBindingNameList(resourceGroupName: string, organizationName: string, body: ListAccessRequestModel, options?: AccessListRoleBindingNameListOptionalParams): 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 AccessCreateRoleBindingOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface AccessCreateRoleBindingRequestModel { + crnPattern?: string; + principal?: string; + roleName?: string; +} + +// @public +export type AccessCreateRoleBindingResponse = RoleBindingRecord; + +// @public +export interface AccessDeleteRoleBindingOptionalParams extends coreClient.OperationOptions { +} + // @public export interface AccessInvitedUserDetails { authType?: string; @@ -84,6 +105,13 @@ export interface AccessListInvitationsSuccessResponse { metadata?: ConfluentListMetadata; } +// @public +export interface AccessListRoleBindingNameListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AccessListRoleBindingNameListResponse = AccessRoleBindingNameListSuccessResponse; + // @public export interface AccessListRoleBindingsOptionalParams extends coreClient.OperationOptions { } @@ -126,6 +154,47 @@ export interface AccessListUsersSuccessResponse { metadata?: ConfluentListMetadata; } +// @public +export interface AccessRoleBindingNameListSuccessResponse { + data?: string[]; + kind?: string; + metadata?: ConfluentListMetadata; +} + +// @public +export interface APIKeyOwnerEntity { + id?: string; + kind?: string; + related?: string; + resourceName?: string; +} + +// @public +export interface APIKeyRecord { + id?: string; + kind?: string; + metadata?: SCMetadataEntity; + spec?: APIKeySpecEntity; +} + +// @public +export interface APIKeyResourceEntity { + environment?: string; + id?: string; + kind?: string; + related?: string; + resourceName?: string; +} + +// @public +export interface APIKeySpecEntity { + description?: string; + name?: string; + owner?: APIKeyOwnerEntity; + resource?: APIKeyResourceEntity; + secret?: string; +} + // @public export interface ClusterByokEntity { id?: string; @@ -246,6 +315,12 @@ export interface ConfluentManagementClientOptionalParams extends coreClient.Serv endpoint?: string; } +// @public +export interface CreateAPIKeyModel { + description?: string; + name?: string; +} + // @public export type CreatedByType = string; @@ -268,6 +343,12 @@ export interface ErrorResponseBody { // @public export function getContinuationToken(page: unknown): string | undefined; +// @public +export interface GetEnvironmentsResponse { + nextLink?: string; + value?: SCEnvironmentRecord[]; +} + // @public export interface InvitationRecord { acceptedAt?: string; @@ -327,6 +408,23 @@ export interface ListAccessRequestModel { }; } +// @public +export interface ListClustersSuccessResponse { + nextLink?: string; + value?: SCClusterRecord[]; +} + +// @public +export interface ListRegionsSuccessResponse { + data?: RegionRecord[]; +} + +// @public +export interface ListSchemaRegistryClustersResponse { + nextLink?: string; + value?: SchemaRegistryClusterRecord[]; +} + // @public export interface MarketplaceAgreements { create(options?: MarketplaceAgreementsCreateOptionalParams): Promise; @@ -404,12 +502,29 @@ export interface Organization { beginCreateAndWait(resourceGroupName: string, organizationName: string, options?: OrganizationCreateOptionalParams): Promise; beginDelete(resourceGroupName: string, organizationName: string, options?: OrganizationDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, organizationName: string, options?: OrganizationDeleteOptionalParams): Promise; + createAPIKey(resourceGroupName: string, organizationName: string, environmentId: string, clusterId: string, body: CreateAPIKeyModel, options?: OrganizationCreateAPIKeyOptionalParams): Promise; + deleteClusterAPIKey(resourceGroupName: string, organizationName: string, apiKeyId: string, options?: OrganizationDeleteClusterAPIKeyOptionalParams): Promise; get(resourceGroupName: string, organizationName: string, options?: OrganizationGetOptionalParams): Promise; + getClusterAPIKey(resourceGroupName: string, organizationName: string, apiKeyId: string, options?: OrganizationGetClusterAPIKeyOptionalParams): Promise; + getClusterById(resourceGroupName: string, organizationName: string, environmentId: string, clusterId: string, options?: OrganizationGetClusterByIdOptionalParams): Promise; + getEnvironmentById(resourceGroupName: string, organizationName: string, environmentId: string, options?: OrganizationGetEnvironmentByIdOptionalParams): Promise; + getSchemaRegistryClusterById(resourceGroupName: string, organizationName: string, environmentId: string, clusterId: string, options?: OrganizationGetSchemaRegistryClusterByIdOptionalParams): Promise; listByResourceGroup(resourceGroupName: string, options?: OrganizationListByResourceGroupOptionalParams): PagedAsyncIterableIterator; listBySubscription(options?: OrganizationListBySubscriptionOptionalParams): PagedAsyncIterableIterator; + listClusters(resourceGroupName: string, organizationName: string, environmentId: string, options?: OrganizationListClustersOptionalParams): PagedAsyncIterableIterator; + listEnvironments(resourceGroupName: string, organizationName: string, options?: OrganizationListEnvironmentsOptionalParams): PagedAsyncIterableIterator; + listRegions(resourceGroupName: string, organizationName: string, body: ListAccessRequestModel, options?: OrganizationListRegionsOptionalParams): Promise; + listSchemaRegistryClusters(resourceGroupName: string, organizationName: string, environmentId: string, options?: OrganizationListSchemaRegistryClustersOptionalParams): PagedAsyncIterableIterator; update(resourceGroupName: string, organizationName: string, options?: OrganizationUpdateOptionalParams): Promise; } +// @public +export interface OrganizationCreateAPIKeyOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type OrganizationCreateAPIKeyResponse = APIKeyRecord; + // @public export interface OrganizationCreateOptionalParams extends coreClient.OperationOptions { body?: OrganizationResource; @@ -420,12 +535,37 @@ export interface OrganizationCreateOptionalParams extends coreClient.OperationOp // @public export type OrganizationCreateResponse = OrganizationResource; +// @public +export interface OrganizationDeleteClusterAPIKeyOptionalParams extends coreClient.OperationOptions { +} + // @public export interface OrganizationDeleteOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; updateIntervalInMs?: number; } +// @public +export interface OrganizationGetClusterAPIKeyOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type OrganizationGetClusterAPIKeyResponse = APIKeyRecord; + +// @public +export interface OrganizationGetClusterByIdOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type OrganizationGetClusterByIdResponse = SCClusterRecord; + +// @public +export interface OrganizationGetEnvironmentByIdOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type OrganizationGetEnvironmentByIdResponse = SCEnvironmentRecord; + // @public export interface OrganizationGetOptionalParams extends coreClient.OperationOptions { } @@ -433,6 +573,13 @@ export interface OrganizationGetOptionalParams extends coreClient.OperationOptio // @public export type OrganizationGetResponse = OrganizationResource; +// @public +export interface OrganizationGetSchemaRegistryClusterByIdOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type OrganizationGetSchemaRegistryClusterByIdResponse = SchemaRegistryClusterRecord; + // @public export interface OrganizationListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { } @@ -461,6 +608,61 @@ export interface OrganizationListBySubscriptionOptionalParams extends coreClient // @public export type OrganizationListBySubscriptionResponse = OrganizationResourceListResult; +// @public +export interface OrganizationListClustersNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type OrganizationListClustersNextResponse = ListClustersSuccessResponse; + +// @public +export interface OrganizationListClustersOptionalParams extends coreClient.OperationOptions { + pageSize?: number; + pageToken?: string; +} + +// @public +export type OrganizationListClustersResponse = ListClustersSuccessResponse; + +// @public +export interface OrganizationListEnvironmentsNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type OrganizationListEnvironmentsNextResponse = GetEnvironmentsResponse; + +// @public +export interface OrganizationListEnvironmentsOptionalParams extends coreClient.OperationOptions { + pageSize?: number; + pageToken?: string; +} + +// @public +export type OrganizationListEnvironmentsResponse = GetEnvironmentsResponse; + +// @public +export interface OrganizationListRegionsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type OrganizationListRegionsResponse = ListRegionsSuccessResponse; + +// @public +export interface OrganizationListSchemaRegistryClustersNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type OrganizationListSchemaRegistryClustersNextResponse = ListSchemaRegistryClustersResponse; + +// @public +export interface OrganizationListSchemaRegistryClustersOptionalParams extends coreClient.OperationOptions { + pageSize?: number; + pageToken?: string; +} + +// @public +export type OrganizationListSchemaRegistryClustersResponse = ListSchemaRegistryClustersResponse; + // @public export interface OrganizationOperations { list(options?: OrganizationOperationsListOptionalParams): PagedAsyncIterableIterator; @@ -523,6 +725,23 @@ export type OrganizationUpdateResponse = OrganizationResource; // @public export type ProvisionState = string; +// @public +export interface RegionRecord { + id?: string; + kind?: string; + metadata?: SCMetadataEntity; + spec?: RegionSpecEntity; +} + +// @public +export interface RegionSpecEntity { + cloud?: string; + name?: string; + // (undocumented) + packages?: string[]; + regionName?: string; +} + // @public export interface ResourceProviderDefaultErrorResponse { readonly error?: ErrorResponseBody; @@ -541,6 +760,104 @@ export interface RoleBindingRecord { // @public export type SaaSOfferStatus = string; +// @public +export interface SCClusterByokEntity { + id?: string; + related?: string; + resourceName?: string; +} + +// @public +export interface SCClusterNetworkEnvironmentEntity { + environment?: string; + id?: string; + related?: string; + resourceName?: string; +} + +// @public +export interface SCClusterRecord { + id?: string; + kind?: string; + metadata?: SCMetadataEntity; + name?: string; + spec?: SCClusterSpecEntity; + status?: ClusterStatusEntity; +} + +// @public +export interface SCClusterSpecEntity { + apiEndpoint?: string; + availability?: string; + byok?: SCClusterByokEntity; + cloud?: string; + config?: ClusterConfigEntity; + environment?: SCClusterNetworkEnvironmentEntity; + httpEndpoint?: string; + kafkaBootstrapEndpoint?: string; + name?: string; + network?: SCClusterNetworkEnvironmentEntity; + region?: string; + zone?: string; +} + +// @public +export interface SCConfluentListMetadata { + first?: string; + last?: string; + next?: string; + prev?: string; + totalSize?: number; +} + +// @public +export interface SCEnvironmentRecord { + id?: string; + kind?: string; + metadata?: SCMetadataEntity; + name?: string; +} + +// @public +export interface SchemaRegistryClusterEnvironmentRegionEntity { + id?: string; + related?: string; + resourceName?: string; +} + +// @public +export interface SchemaRegistryClusterRecord { + id?: string; + kind?: string; + metadata?: SCMetadataEntity; + spec?: SchemaRegistryClusterSpecEntity; + status?: SchemaRegistryClusterStatusEntity; +} + +// @public +export interface SchemaRegistryClusterSpecEntity { + cloud?: string; + environment?: SchemaRegistryClusterEnvironmentRegionEntity; + httpEndpoint?: string; + name?: string; + package?: string; + region?: SchemaRegistryClusterEnvironmentRegionEntity; +} + +// @public +export interface SchemaRegistryClusterStatusEntity { + phase?: string; +} + +// @public +export interface SCMetadataEntity { + createdTimestamp?: string; + deletedTimestamp?: string; + resourceName?: string; + self?: string; + updatedTimestamp?: string; +} + // @public export interface ServiceAccountRecord { description?: string; diff --git a/sdk/confluent/arm-confluent/samples-dev/accessCreateRoleBindingSample.ts b/sdk/confluent/arm-confluent/samples-dev/accessCreateRoleBindingSample.ts new file mode 100644 index 000000000000..197475b1f20c --- /dev/null +++ b/sdk/confluent/arm-confluent/samples-dev/accessCreateRoleBindingSample.ts @@ -0,0 +1,53 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + AccessCreateRoleBindingRequestModel, + ConfluentManagementClient, +} from "@azure/arm-confluent"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Organization role bindings + * + * @summary Organization role bindings + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_CreateRoleBinding.json + */ +async function accessCreateRoleBinding() { + const subscriptionId = + process.env["CONFLUENT_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONFLUENT_RESOURCE_GROUP"] || "myResourceGroup"; + const organizationName = "myOrganization"; + const body: AccessCreateRoleBindingRequestModel = { + crnPattern: + "crn://confluent.cloud/organization=1111aaaa-11aa-11aa-11aa-111111aaaaaa/environment=env-aaa1111/cloud-cluster=lkc-1111aaa", + principal: "User:u-111aaa", + roleName: "CloudClusterAdmin", + }; + const credential = new DefaultAzureCredential(); + const client = new ConfluentManagementClient(credential, subscriptionId); + const result = await client.access.createRoleBinding( + resourceGroupName, + organizationName, + body, + ); + console.log(result); +} + +async function main() { + accessCreateRoleBinding(); +} + +main().catch(console.error); diff --git a/sdk/confluent/arm-confluent/samples-dev/accessDeleteRoleBindingSample.ts b/sdk/confluent/arm-confluent/samples-dev/accessDeleteRoleBindingSample.ts new file mode 100644 index 000000000000..da5970a6c279 --- /dev/null +++ b/sdk/confluent/arm-confluent/samples-dev/accessDeleteRoleBindingSample.ts @@ -0,0 +1,45 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ConfluentManagementClient } from "@azure/arm-confluent"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Organization role bindings + * + * @summary Organization role bindings + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_DeleteRoleBinding.json + */ +async function accessDeleteRoleBinding() { + const subscriptionId = + process.env["CONFLUENT_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONFLUENT_RESOURCE_GROUP"] || "myResourceGroup"; + const organizationName = "myOrganization"; + const roleBindingId = "dlz-f3a90de"; + const credential = new DefaultAzureCredential(); + const client = new ConfluentManagementClient(credential, subscriptionId); + const result = await client.access.deleteRoleBinding( + resourceGroupName, + organizationName, + roleBindingId, + ); + console.log(result); +} + +async function main() { + accessDeleteRoleBinding(); +} + +main().catch(console.error); diff --git a/sdk/confluent/arm-confluent/samples-dev/accessInviteUserSample.ts b/sdk/confluent/arm-confluent/samples-dev/accessInviteUserSample.ts index 5634690a3ae1..c917ce28a1f1 100644 --- a/sdk/confluent/arm-confluent/samples-dev/accessInviteUserSample.ts +++ b/sdk/confluent/arm-confluent/samples-dev/accessInviteUserSample.ts @@ -10,7 +10,7 @@ // Licensed under the MIT License. import { AccessInviteUserAccountModel, - ConfluentManagementClient + ConfluentManagementClient, } from "@azure/arm-confluent"; import { DefaultAzureCredential } from "@azure/identity"; import * as dotenv from "dotenv"; @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Invite user to the organization * * @summary Invite user to the organization - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Access_InviteUser.json + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_InviteUser.json */ async function accessInviteUser() { const subscriptionId = @@ -33,15 +33,15 @@ async function accessInviteUser() { const body: AccessInviteUserAccountModel = { invitedUserDetails: { authType: "AUTH_TYPE_SSO", - invitedEmail: "user2@onmicrosoft.com" - } + invitedEmail: "user2@onmicrosoft.com", + }, }; const credential = new DefaultAzureCredential(); const client = new ConfluentManagementClient(credential, subscriptionId); const result = await client.access.inviteUser( resourceGroupName, organizationName, - body + body, ); console.log(result); } diff --git a/sdk/confluent/arm-confluent/samples-dev/accessListClustersSample.ts b/sdk/confluent/arm-confluent/samples-dev/accessListClustersSample.ts index 900e9a46d0e6..1b24afebc699 100644 --- a/sdk/confluent/arm-confluent/samples-dev/accessListClustersSample.ts +++ b/sdk/confluent/arm-confluent/samples-dev/accessListClustersSample.ts @@ -10,7 +10,7 @@ // Licensed under the MIT License. import { ListAccessRequestModel, - ConfluentManagementClient + ConfluentManagementClient, } from "@azure/arm-confluent"; import { DefaultAzureCredential } from "@azure/identity"; import * as dotenv from "dotenv"; @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Cluster details * * @summary Cluster details - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Access_ClusterList.json + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_ClusterList.json */ async function accessClusterList() { const subscriptionId = @@ -31,14 +31,14 @@ async function accessClusterList() { process.env["CONFLUENT_RESOURCE_GROUP"] || "myResourceGroup"; const organizationName = "myOrganization"; const body: ListAccessRequestModel = { - searchFilters: { pageSize: "10", pageToken: "asc4fts4ft" } + searchFilters: { pageSize: "10", pageToken: "asc4fts4ft" }, }; const credential = new DefaultAzureCredential(); const client = new ConfluentManagementClient(credential, subscriptionId); const result = await client.access.listClusters( resourceGroupName, organizationName, - body + body, ); console.log(result); } diff --git a/sdk/confluent/arm-confluent/samples-dev/accessListEnvironmentsSample.ts b/sdk/confluent/arm-confluent/samples-dev/accessListEnvironmentsSample.ts index 8b2a89bd89a3..897b1c50cf67 100644 --- a/sdk/confluent/arm-confluent/samples-dev/accessListEnvironmentsSample.ts +++ b/sdk/confluent/arm-confluent/samples-dev/accessListEnvironmentsSample.ts @@ -10,7 +10,7 @@ // Licensed under the MIT License. import { ListAccessRequestModel, - ConfluentManagementClient + ConfluentManagementClient, } from "@azure/arm-confluent"; import { DefaultAzureCredential } from "@azure/identity"; import * as dotenv from "dotenv"; @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Environment list of an organization * * @summary Environment list of an organization - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Access_EnvironmentList.json + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_EnvironmentList.json */ async function accessEnvironmentList() { const subscriptionId = @@ -31,14 +31,14 @@ async function accessEnvironmentList() { process.env["CONFLUENT_RESOURCE_GROUP"] || "myResourceGroup"; const organizationName = "myOrganization"; const body: ListAccessRequestModel = { - searchFilters: { pageSize: "10", pageToken: "asc4fts4ft" } + searchFilters: { pageSize: "10", pageToken: "asc4fts4ft" }, }; const credential = new DefaultAzureCredential(); const client = new ConfluentManagementClient(credential, subscriptionId); const result = await client.access.listEnvironments( resourceGroupName, organizationName, - body + body, ); console.log(result); } diff --git a/sdk/confluent/arm-confluent/samples-dev/accessListInvitationsSample.ts b/sdk/confluent/arm-confluent/samples-dev/accessListInvitationsSample.ts index b3a8ad0b4364..348bbc4315b7 100644 --- a/sdk/confluent/arm-confluent/samples-dev/accessListInvitationsSample.ts +++ b/sdk/confluent/arm-confluent/samples-dev/accessListInvitationsSample.ts @@ -10,7 +10,7 @@ // Licensed under the MIT License. import { ListAccessRequestModel, - ConfluentManagementClient + ConfluentManagementClient, } from "@azure/arm-confluent"; import { DefaultAzureCredential } from "@azure/identity"; import * as dotenv from "dotenv"; @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Organization accounts invitation details * * @summary Organization accounts invitation details - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Access_InvitationsList.json + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_InvitationsList.json */ async function accessInvitationsList() { const subscriptionId = @@ -34,15 +34,15 @@ async function accessInvitationsList() { searchFilters: { pageSize: "10", pageToken: "asc4fts4ft", - status: "INVITE_STATUS_SENT" - } + status: "INVITE_STATUS_SENT", + }, }; const credential = new DefaultAzureCredential(); const client = new ConfluentManagementClient(credential, subscriptionId); const result = await client.access.listInvitations( resourceGroupName, organizationName, - body + body, ); console.log(result); } diff --git a/sdk/confluent/arm-confluent/samples-dev/accessListRoleBindingNameListSample.ts b/sdk/confluent/arm-confluent/samples-dev/accessListRoleBindingNameListSample.ts new file mode 100644 index 000000000000..5a5f945a2ca3 --- /dev/null +++ b/sdk/confluent/arm-confluent/samples-dev/accessListRoleBindingNameListSample.ts @@ -0,0 +1,55 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + ListAccessRequestModel, + ConfluentManagementClient, +} from "@azure/arm-confluent"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Organization role bindings + * + * @summary Organization role bindings + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_RoleBindingNameList.json + */ +async function accessRoleBindingNameList() { + const subscriptionId = + process.env["CONFLUENT_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONFLUENT_RESOURCE_GROUP"] || "myResourceGroup"; + const organizationName = "myOrganization"; + const body: ListAccessRequestModel = { + searchFilters: { + crnPattern: + "crn://confluent.cloud/organization=1aa7de07-298e-479c-8f2f-16ac91fd8e76", + namespace: + "public,dataplane,networking,identity,datagovernance,connect,streamcatalog,pipelines,ksql", + }, + }; + const credential = new DefaultAzureCredential(); + const client = new ConfluentManagementClient(credential, subscriptionId); + const result = await client.access.listRoleBindingNameList( + resourceGroupName, + organizationName, + body, + ); + console.log(result); +} + +async function main() { + accessRoleBindingNameList(); +} + +main().catch(console.error); diff --git a/sdk/confluent/arm-confluent/samples-dev/accessListRoleBindingsSample.ts b/sdk/confluent/arm-confluent/samples-dev/accessListRoleBindingsSample.ts index 4cd5da44d1a5..ca28e87e9a1f 100644 --- a/sdk/confluent/arm-confluent/samples-dev/accessListRoleBindingsSample.ts +++ b/sdk/confluent/arm-confluent/samples-dev/accessListRoleBindingsSample.ts @@ -10,7 +10,7 @@ // Licensed under the MIT License. import { ListAccessRequestModel, - ConfluentManagementClient + ConfluentManagementClient, } from "@azure/arm-confluent"; import { DefaultAzureCredential } from "@azure/identity"; import * as dotenv from "dotenv"; @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Organization role bindings * * @summary Organization role bindings - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Access_RoleBindingList.json + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_RoleBindingList.json */ async function accessRoleBindingList() { const subscriptionId = @@ -31,14 +31,14 @@ async function accessRoleBindingList() { process.env["CONFLUENT_RESOURCE_GROUP"] || "myResourceGroup"; const organizationName = "myOrganization"; const body: ListAccessRequestModel = { - searchFilters: { pageSize: "10", pageToken: "asc4fts4ft" } + searchFilters: { pageSize: "10", pageToken: "asc4fts4ft" }, }; const credential = new DefaultAzureCredential(); const client = new ConfluentManagementClient(credential, subscriptionId); const result = await client.access.listRoleBindings( resourceGroupName, organizationName, - body + body, ); console.log(result); } diff --git a/sdk/confluent/arm-confluent/samples-dev/accessListServiceAccountsSample.ts b/sdk/confluent/arm-confluent/samples-dev/accessListServiceAccountsSample.ts index 4b5ffb8ea3d6..29d86e806bb4 100644 --- a/sdk/confluent/arm-confluent/samples-dev/accessListServiceAccountsSample.ts +++ b/sdk/confluent/arm-confluent/samples-dev/accessListServiceAccountsSample.ts @@ -10,7 +10,7 @@ // Licensed under the MIT License. import { ListAccessRequestModel, - ConfluentManagementClient + ConfluentManagementClient, } from "@azure/arm-confluent"; import { DefaultAzureCredential } from "@azure/identity"; import * as dotenv from "dotenv"; @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Organization service accounts details * * @summary Organization service accounts details - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Access_ServiceAccountsList.json + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_ServiceAccountsList.json */ async function accessServiceAccountsList() { const subscriptionId = @@ -31,14 +31,14 @@ async function accessServiceAccountsList() { process.env["CONFLUENT_RESOURCE_GROUP"] || "myResourceGroup"; const organizationName = "myOrganization"; const body: ListAccessRequestModel = { - searchFilters: { pageSize: "10", pageToken: "asc4fts4ft" } + searchFilters: { pageSize: "10", pageToken: "asc4fts4ft" }, }; const credential = new DefaultAzureCredential(); const client = new ConfluentManagementClient(credential, subscriptionId); const result = await client.access.listServiceAccounts( resourceGroupName, organizationName, - body + body, ); console.log(result); } diff --git a/sdk/confluent/arm-confluent/samples-dev/accessListUsersSample.ts b/sdk/confluent/arm-confluent/samples-dev/accessListUsersSample.ts index cf037a2c1b51..43d6badc7966 100644 --- a/sdk/confluent/arm-confluent/samples-dev/accessListUsersSample.ts +++ b/sdk/confluent/arm-confluent/samples-dev/accessListUsersSample.ts @@ -10,7 +10,7 @@ // Licensed under the MIT License. import { ListAccessRequestModel, - ConfluentManagementClient + ConfluentManagementClient, } from "@azure/arm-confluent"; import { DefaultAzureCredential } from "@azure/identity"; import * as dotenv from "dotenv"; @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Organization users details * * @summary Organization users details - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Access_UsersList.json + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_UsersList.json */ async function accessUsersList() { const subscriptionId = @@ -31,14 +31,14 @@ async function accessUsersList() { process.env["CONFLUENT_RESOURCE_GROUP"] || "myResourceGroup"; const organizationName = "myOrganization"; const body: ListAccessRequestModel = { - searchFilters: { pageSize: "10", pageToken: "asc4fts4ft" } + searchFilters: { pageSize: "10", pageToken: "asc4fts4ft" }, }; const credential = new DefaultAzureCredential(); const client = new ConfluentManagementClient(credential, subscriptionId); const result = await client.access.listUsers( resourceGroupName, organizationName, - body + body, ); console.log(result); } diff --git a/sdk/confluent/arm-confluent/samples-dev/marketplaceAgreementsCreateSample.ts b/sdk/confluent/arm-confluent/samples-dev/marketplaceAgreementsCreateSample.ts index 134427e70114..abc5964bfb3f 100644 --- a/sdk/confluent/arm-confluent/samples-dev/marketplaceAgreementsCreateSample.ts +++ b/sdk/confluent/arm-confluent/samples-dev/marketplaceAgreementsCreateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Create Confluent Marketplace agreement in the subscription. * * @summary Create Confluent Marketplace agreement in the subscription. - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/MarketplaceAgreements_Create.json + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/MarketplaceAgreements_Create.json */ async function marketplaceAgreementsCreate() { const subscriptionId = diff --git a/sdk/confluent/arm-confluent/samples-dev/marketplaceAgreementsListSample.ts b/sdk/confluent/arm-confluent/samples-dev/marketplaceAgreementsListSample.ts index 0e601dd4df6a..fadf5d5fc293 100644 --- a/sdk/confluent/arm-confluent/samples-dev/marketplaceAgreementsListSample.ts +++ b/sdk/confluent/arm-confluent/samples-dev/marketplaceAgreementsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List Confluent marketplace agreements in the subscription. * * @summary List Confluent marketplace agreements in the subscription. - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/MarketplaceAgreements_List.json + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/MarketplaceAgreements_List.json */ async function marketplaceAgreementsList() { const subscriptionId = diff --git a/sdk/confluent/arm-confluent/samples-dev/organizationCreateApiKeySample.ts b/sdk/confluent/arm-confluent/samples-dev/organizationCreateApiKeySample.ts new file mode 100644 index 000000000000..23904416bdf3 --- /dev/null +++ b/sdk/confluent/arm-confluent/samples-dev/organizationCreateApiKeySample.ts @@ -0,0 +1,55 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + CreateAPIKeyModel, + ConfluentManagementClient, +} from "@azure/arm-confluent"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Creates API key for a schema registry Cluster ID or Kafka Cluster ID under a environment + * + * @summary Creates API key for a schema registry Cluster ID or Kafka Cluster ID under a environment + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_CreateClusterAPIKey.json + */ +async function organizationCreateApiKey() { + const subscriptionId = + process.env["CONFLUENT_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONFLUENT_RESOURCE_GROUP"] || "myResourceGroup"; + const organizationName = "myOrganization"; + const environmentId = "env-12132"; + const clusterId = "clusterId-123"; + const body: CreateAPIKeyModel = { + name: "CI kafka access key", + description: "This API key provides kafka access to cluster x", + }; + const credential = new DefaultAzureCredential(); + const client = new ConfluentManagementClient(credential, subscriptionId); + const result = await client.organization.createAPIKey( + resourceGroupName, + organizationName, + environmentId, + clusterId, + body, + ); + console.log(result); +} + +async function main() { + organizationCreateApiKey(); +} + +main().catch(console.error); diff --git a/sdk/confluent/arm-confluent/samples-dev/organizationCreateSample.ts b/sdk/confluent/arm-confluent/samples-dev/organizationCreateSample.ts index 08fbb77de91f..5c9487ffed2b 100644 --- a/sdk/confluent/arm-confluent/samples-dev/organizationCreateSample.ts +++ b/sdk/confluent/arm-confluent/samples-dev/organizationCreateSample.ts @@ -11,7 +11,7 @@ import { OrganizationResource, OrganizationCreateOptionalParams, - ConfluentManagementClient + ConfluentManagementClient, } from "@azure/arm-confluent"; import { DefaultAzureCredential } from "@azure/identity"; import * as dotenv from "dotenv"; @@ -22,7 +22,7 @@ dotenv.config(); * This sample demonstrates how to Create Organization resource * * @summary Create Organization resource - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Organization_Create.json + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_Create.json */ async function organizationCreate() { const subscriptionId = @@ -41,7 +41,7 @@ async function organizationCreate() { privateOfferId: "string", privateOfferIds: ["string"], publisherId: "string", - termUnit: "string" + termUnit: "string", }, tags: { environment: "Dev" }, userDetail: { @@ -49,8 +49,8 @@ async function organizationCreate() { emailAddress: "contoso@microsoft.com", firstName: "string", lastName: "string", - userPrincipalName: "contoso@microsoft.com" - } + userPrincipalName: "contoso@microsoft.com", + }, }; const options: OrganizationCreateOptionalParams = { body }; const credential = new DefaultAzureCredential(); @@ -58,7 +58,7 @@ async function organizationCreate() { const result = await client.organization.beginCreateAndWait( resourceGroupName, organizationName, - options + options, ); console.log(result); } diff --git a/sdk/confluent/arm-confluent/samples-dev/organizationDeleteClusterApiKeySample.ts b/sdk/confluent/arm-confluent/samples-dev/organizationDeleteClusterApiKeySample.ts new file mode 100644 index 000000000000..0bdd114a48cd --- /dev/null +++ b/sdk/confluent/arm-confluent/samples-dev/organizationDeleteClusterApiKeySample.ts @@ -0,0 +1,45 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ConfluentManagementClient } from "@azure/arm-confluent"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Deletes API key of a kafka or schema registry cluster + * + * @summary Deletes API key of a kafka or schema registry cluster + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_DeleteClusterAPIKey.json + */ +async function organizationDeleteClusterApiKey() { + const subscriptionId = + process.env["CONFLUENT_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONFLUENT_RESOURCE_GROUP"] || "myResourceGroup"; + const organizationName = "myOrganization"; + const apiKeyId = "ZFZ6SZZZWGYBEIFB"; + const credential = new DefaultAzureCredential(); + const client = new ConfluentManagementClient(credential, subscriptionId); + const result = await client.organization.deleteClusterAPIKey( + resourceGroupName, + organizationName, + apiKeyId, + ); + console.log(result); +} + +async function main() { + organizationDeleteClusterApiKey(); +} + +main().catch(console.error); diff --git a/sdk/confluent/arm-confluent/samples-dev/organizationDeleteSample.ts b/sdk/confluent/arm-confluent/samples-dev/organizationDeleteSample.ts index 7c4a5edbdd6b..df129918b09f 100644 --- a/sdk/confluent/arm-confluent/samples-dev/organizationDeleteSample.ts +++ b/sdk/confluent/arm-confluent/samples-dev/organizationDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Delete Organization resource * * @summary Delete Organization resource - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Organization_Delete.json + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_Delete.json */ async function confluentDelete() { const subscriptionId = @@ -31,7 +31,7 @@ async function confluentDelete() { const client = new ConfluentManagementClient(credential, subscriptionId); const result = await client.organization.beginDeleteAndWait( resourceGroupName, - organizationName + organizationName, ); console.log(result); } diff --git a/sdk/confluent/arm-confluent/samples-dev/organizationGetClusterApiKeySample.ts b/sdk/confluent/arm-confluent/samples-dev/organizationGetClusterApiKeySample.ts new file mode 100644 index 000000000000..a3ce47be0ad6 --- /dev/null +++ b/sdk/confluent/arm-confluent/samples-dev/organizationGetClusterApiKeySample.ts @@ -0,0 +1,45 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ConfluentManagementClient } from "@azure/arm-confluent"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Get API key details of a kafka or schema registry cluster + * + * @summary Get API key details of a kafka or schema registry cluster + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_GetClusterAPIKey.json + */ +async function organizationGetClusterApiKey() { + const subscriptionId = + process.env["CONFLUENT_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONFLUENT_RESOURCE_GROUP"] || "myResourceGroup"; + const organizationName = "myOrganization"; + const apiKeyId = "apiKeyId-123"; + const credential = new DefaultAzureCredential(); + const client = new ConfluentManagementClient(credential, subscriptionId); + const result = await client.organization.getClusterAPIKey( + resourceGroupName, + organizationName, + apiKeyId, + ); + console.log(result); +} + +async function main() { + organizationGetClusterApiKey(); +} + +main().catch(console.error); diff --git a/sdk/confluent/arm-confluent/samples-dev/organizationGetClusterByIdSample.ts b/sdk/confluent/arm-confluent/samples-dev/organizationGetClusterByIdSample.ts new file mode 100644 index 000000000000..0a9a7d91fc71 --- /dev/null +++ b/sdk/confluent/arm-confluent/samples-dev/organizationGetClusterByIdSample.ts @@ -0,0 +1,47 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ConfluentManagementClient } from "@azure/arm-confluent"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Get cluster by Id + * + * @summary Get cluster by Id + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_GetClusterById.json + */ +async function organizationGetClusterById() { + const subscriptionId = + process.env["CONFLUENT_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONFLUENT_RESOURCE_GROUP"] || "myResourceGroup"; + const organizationName = "myOrganization"; + const environmentId = "env-12132"; + const clusterId = "dlz-f3a90de"; + const credential = new DefaultAzureCredential(); + const client = new ConfluentManagementClient(credential, subscriptionId); + const result = await client.organization.getClusterById( + resourceGroupName, + organizationName, + environmentId, + clusterId, + ); + console.log(result); +} + +async function main() { + organizationGetClusterById(); +} + +main().catch(console.error); diff --git a/sdk/confluent/arm-confluent/samples-dev/organizationGetEnvironmentByIdSample.ts b/sdk/confluent/arm-confluent/samples-dev/organizationGetEnvironmentByIdSample.ts new file mode 100644 index 000000000000..459f2b029aed --- /dev/null +++ b/sdk/confluent/arm-confluent/samples-dev/organizationGetEnvironmentByIdSample.ts @@ -0,0 +1,45 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ConfluentManagementClient } from "@azure/arm-confluent"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Get Environment details by environment Id + * + * @summary Get Environment details by environment Id + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_GetEnvironmentById.json + */ +async function organizationGetEnvironmentById() { + const subscriptionId = + process.env["CONFLUENT_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONFLUENT_RESOURCE_GROUP"] || "myResourceGroup"; + const organizationName = "myOrganization"; + const environmentId = "dlz-f3a90de"; + const credential = new DefaultAzureCredential(); + const client = new ConfluentManagementClient(credential, subscriptionId); + const result = await client.organization.getEnvironmentById( + resourceGroupName, + organizationName, + environmentId, + ); + console.log(result); +} + +async function main() { + organizationGetEnvironmentById(); +} + +main().catch(console.error); diff --git a/sdk/confluent/arm-confluent/samples-dev/organizationGetSample.ts b/sdk/confluent/arm-confluent/samples-dev/organizationGetSample.ts index 94b488337c74..9ba4cb107618 100644 --- a/sdk/confluent/arm-confluent/samples-dev/organizationGetSample.ts +++ b/sdk/confluent/arm-confluent/samples-dev/organizationGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get the properties of a specific Organization resource. * * @summary Get the properties of a specific Organization resource. - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Organization_Get.json + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_Get.json */ async function organizationGet() { const subscriptionId = @@ -31,7 +31,7 @@ async function organizationGet() { const client = new ConfluentManagementClient(credential, subscriptionId); const result = await client.organization.get( resourceGroupName, - organizationName + organizationName, ); console.log(result); } diff --git a/sdk/confluent/arm-confluent/samples-dev/organizationGetSchemaRegistryClusterByIdSample.ts b/sdk/confluent/arm-confluent/samples-dev/organizationGetSchemaRegistryClusterByIdSample.ts new file mode 100644 index 000000000000..1bcdb5a65be4 --- /dev/null +++ b/sdk/confluent/arm-confluent/samples-dev/organizationGetSchemaRegistryClusterByIdSample.ts @@ -0,0 +1,47 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ConfluentManagementClient } from "@azure/arm-confluent"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Get schema registry cluster by Id + * + * @summary Get schema registry cluster by Id + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_GetSchemaRegistryClusterById.json + */ +async function organizationGetSchemaRegistryClusterById() { + const subscriptionId = + process.env["CONFLUENT_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONFLUENT_RESOURCE_GROUP"] || "myResourceGroup"; + const organizationName = "myOrganization"; + const environmentId = "env-stgcczjp2j3"; + const clusterId = "lsrc-stgczkq22z"; + const credential = new DefaultAzureCredential(); + const client = new ConfluentManagementClient(credential, subscriptionId); + const result = await client.organization.getSchemaRegistryClusterById( + resourceGroupName, + organizationName, + environmentId, + clusterId, + ); + console.log(result); +} + +async function main() { + organizationGetSchemaRegistryClusterById(); +} + +main().catch(console.error); diff --git a/sdk/confluent/arm-confluent/samples-dev/organizationListByResourceGroupSample.ts b/sdk/confluent/arm-confluent/samples-dev/organizationListByResourceGroupSample.ts index dd3152967243..2b6518a9d3af 100644 --- a/sdk/confluent/arm-confluent/samples-dev/organizationListByResourceGroupSample.ts +++ b/sdk/confluent/arm-confluent/samples-dev/organizationListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List all Organizations under the specified resource group. * * @summary List all Organizations under the specified resource group. - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Organization_ListByResourceGroup.json + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_ListByResourceGroup.json */ async function organizationListByResourceGroup() { const subscriptionId = @@ -30,7 +30,7 @@ async function organizationListByResourceGroup() { const client = new ConfluentManagementClient(credential, subscriptionId); const resArray = new Array(); for await (let item of client.organization.listByResourceGroup( - resourceGroupName + resourceGroupName, )) { resArray.push(item); } diff --git a/sdk/confluent/arm-confluent/samples-dev/organizationListBySubscriptionSample.ts b/sdk/confluent/arm-confluent/samples-dev/organizationListBySubscriptionSample.ts index d74e0b6fd824..3b3bcf8cdc53 100644 --- a/sdk/confluent/arm-confluent/samples-dev/organizationListBySubscriptionSample.ts +++ b/sdk/confluent/arm-confluent/samples-dev/organizationListBySubscriptionSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List all organizations under the specified subscription. * * @summary List all organizations under the specified subscription. - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Organization_ListBySubscription.json + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_ListBySubscription.json */ async function organizationListBySubscription() { const subscriptionId = diff --git a/sdk/confluent/arm-confluent/samples-dev/organizationListClustersSample.ts b/sdk/confluent/arm-confluent/samples-dev/organizationListClustersSample.ts new file mode 100644 index 000000000000..1ce1b5ff4c96 --- /dev/null +++ b/sdk/confluent/arm-confluent/samples-dev/organizationListClustersSample.ts @@ -0,0 +1,54 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + OrganizationListClustersOptionalParams, + ConfluentManagementClient, +} from "@azure/arm-confluent"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Lists of all the clusters in a environment + * + * @summary Lists of all the clusters in a environment + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_ClusterList.json + */ +async function organizationListClusters() { + const subscriptionId = + process.env["CONFLUENT_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONFLUENT_RESOURCE_GROUP"] || "myResourceGroup"; + const organizationName = "myOrganization"; + const environmentId = "env-12132"; + const pageSize = 10; + const options: OrganizationListClustersOptionalParams = { pageSize }; + const credential = new DefaultAzureCredential(); + const client = new ConfluentManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.organization.listClusters( + resourceGroupName, + organizationName, + environmentId, + options, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + organizationListClusters(); +} + +main().catch(console.error); diff --git a/sdk/confluent/arm-confluent/samples-dev/organizationListEnvironmentsSample.ts b/sdk/confluent/arm-confluent/samples-dev/organizationListEnvironmentsSample.ts new file mode 100644 index 000000000000..1c7712413e91 --- /dev/null +++ b/sdk/confluent/arm-confluent/samples-dev/organizationListEnvironmentsSample.ts @@ -0,0 +1,52 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + OrganizationListEnvironmentsOptionalParams, + ConfluentManagementClient, +} from "@azure/arm-confluent"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Lists of all the environments in a organization + * + * @summary Lists of all the environments in a organization + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_EnvironmentList.json + */ +async function organizationListEnvironments() { + const subscriptionId = + process.env["CONFLUENT_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONFLUENT_RESOURCE_GROUP"] || "myResourceGroup"; + const organizationName = "myOrganization"; + const pageSize = 10; + const options: OrganizationListEnvironmentsOptionalParams = { pageSize }; + const credential = new DefaultAzureCredential(); + const client = new ConfluentManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.organization.listEnvironments( + resourceGroupName, + organizationName, + options, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + organizationListEnvironments(); +} + +main().catch(console.error); diff --git a/sdk/confluent/arm-confluent/samples-dev/organizationListRegionsSample.ts b/sdk/confluent/arm-confluent/samples-dev/organizationListRegionsSample.ts new file mode 100644 index 000000000000..60011490dd32 --- /dev/null +++ b/sdk/confluent/arm-confluent/samples-dev/organizationListRegionsSample.ts @@ -0,0 +1,54 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + ListAccessRequestModel, + ConfluentManagementClient, +} from "@azure/arm-confluent"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to cloud provider regions available for creating Schema Registry clusters. + * + * @summary cloud provider regions available for creating Schema Registry clusters. + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_ListRegions.json + */ +async function organizationListRegions() { + const subscriptionId = + process.env["CONFLUENT_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONFLUENT_RESOURCE_GROUP"] || "myResourceGroup"; + const organizationName = "myOrganization"; + const body: ListAccessRequestModel = { + searchFilters: { + cloud: "azure", + packages: "ADVANCED,ESSENTIALS", + region: "eastus", + }, + }; + const credential = new DefaultAzureCredential(); + const client = new ConfluentManagementClient(credential, subscriptionId); + const result = await client.organization.listRegions( + resourceGroupName, + organizationName, + body, + ); + console.log(result); +} + +async function main() { + organizationListRegions(); +} + +main().catch(console.error); diff --git a/sdk/confluent/arm-confluent/samples-dev/organizationListSchemaRegistryClustersSample.ts b/sdk/confluent/arm-confluent/samples-dev/organizationListSchemaRegistryClustersSample.ts new file mode 100644 index 000000000000..41085249e5d6 --- /dev/null +++ b/sdk/confluent/arm-confluent/samples-dev/organizationListSchemaRegistryClustersSample.ts @@ -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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ConfluentManagementClient } from "@azure/arm-confluent"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Get schema registry clusters + * + * @summary Get schema registry clusters + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_ListSchemaRegistryClusters.json + */ +async function organizationListSchemaRegistryClusters() { + const subscriptionId = + process.env["CONFLUENT_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONFLUENT_RESOURCE_GROUP"] || "myResourceGroup"; + const organizationName = "myOrganization"; + const environmentId = "env-stgcczjp2j3"; + const credential = new DefaultAzureCredential(); + const client = new ConfluentManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.organization.listSchemaRegistryClusters( + resourceGroupName, + organizationName, + environmentId, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + organizationListSchemaRegistryClusters(); +} + +main().catch(console.error); diff --git a/sdk/confluent/arm-confluent/samples-dev/organizationOperationsListSample.ts b/sdk/confluent/arm-confluent/samples-dev/organizationOperationsListSample.ts index 19a195322d40..2f956546ac1d 100644 --- a/sdk/confluent/arm-confluent/samples-dev/organizationOperationsListSample.ts +++ b/sdk/confluent/arm-confluent/samples-dev/organizationOperationsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List all operations provided by Microsoft.Confluent. * * @summary List all operations provided by Microsoft.Confluent. - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/OrganizationOperations_List.json + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/OrganizationOperations_List.json */ async function organizationOperationsList() { const credential = new DefaultAzureCredential(); diff --git a/sdk/confluent/arm-confluent/samples-dev/organizationUpdateSample.ts b/sdk/confluent/arm-confluent/samples-dev/organizationUpdateSample.ts index eb9f194ed417..c9aef3ca73cb 100644 --- a/sdk/confluent/arm-confluent/samples-dev/organizationUpdateSample.ts +++ b/sdk/confluent/arm-confluent/samples-dev/organizationUpdateSample.ts @@ -11,7 +11,7 @@ import { OrganizationResourceUpdate, OrganizationUpdateOptionalParams, - ConfluentManagementClient + ConfluentManagementClient, } from "@azure/arm-confluent"; import { DefaultAzureCredential } from "@azure/identity"; import * as dotenv from "dotenv"; @@ -22,7 +22,7 @@ dotenv.config(); * This sample demonstrates how to Update Organization resource * * @summary Update Organization resource - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Organization_Update.json + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_Update.json */ async function confluentUpdate() { const subscriptionId = @@ -32,7 +32,7 @@ async function confluentUpdate() { process.env["CONFLUENT_RESOURCE_GROUP"] || "myResourceGroup"; const organizationName = "myOrganization"; const body: OrganizationResourceUpdate = { - tags: { client: "dev-client", env: "dev" } + tags: { client: "dev-client", env: "dev" }, }; const options: OrganizationUpdateOptionalParams = { body }; const credential = new DefaultAzureCredential(); @@ -40,7 +40,7 @@ async function confluentUpdate() { const result = await client.organization.update( resourceGroupName, organizationName, - options + options, ); console.log(result); } diff --git a/sdk/confluent/arm-confluent/samples-dev/validationsValidateOrganizationSample.ts b/sdk/confluent/arm-confluent/samples-dev/validationsValidateOrganizationSample.ts index 589cf820839a..a0e676cae85d 100644 --- a/sdk/confluent/arm-confluent/samples-dev/validationsValidateOrganizationSample.ts +++ b/sdk/confluent/arm-confluent/samples-dev/validationsValidateOrganizationSample.ts @@ -10,7 +10,7 @@ // Licensed under the MIT License. import { OrganizationResource, - ConfluentManagementClient + ConfluentManagementClient, } from "@azure/arm-confluent"; import { DefaultAzureCredential } from "@azure/identity"; import * as dotenv from "dotenv"; @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Organization Validate proxy resource * * @summary Organization Validate proxy resource - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Validations_ValidateOrganizations.json + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Validations_ValidateOrganizations.json */ async function validationsValidateOrganizations() { const subscriptionId = @@ -39,7 +39,7 @@ async function validationsValidateOrganizations() { privateOfferId: "string", privateOfferIds: ["string"], publisherId: "string", - termUnit: "string" + termUnit: "string", }, tags: { environment: "Dev" }, userDetail: { @@ -47,15 +47,15 @@ async function validationsValidateOrganizations() { emailAddress: "abc@microsoft.com", firstName: "string", lastName: "string", - userPrincipalName: "abc@microsoft.com" - } + userPrincipalName: "abc@microsoft.com", + }, }; const credential = new DefaultAzureCredential(); const client = new ConfluentManagementClient(credential, subscriptionId); const result = await client.validations.validateOrganization( resourceGroupName, organizationName, - body + body, ); console.log(result); } diff --git a/sdk/confluent/arm-confluent/samples-dev/validationsValidateOrganizationV2Sample.ts b/sdk/confluent/arm-confluent/samples-dev/validationsValidateOrganizationV2Sample.ts index a9d6c32e6bda..017ceb059578 100644 --- a/sdk/confluent/arm-confluent/samples-dev/validationsValidateOrganizationV2Sample.ts +++ b/sdk/confluent/arm-confluent/samples-dev/validationsValidateOrganizationV2Sample.ts @@ -10,7 +10,7 @@ // Licensed under the MIT License. import { OrganizationResource, - ConfluentManagementClient + ConfluentManagementClient, } from "@azure/arm-confluent"; import { DefaultAzureCredential } from "@azure/identity"; import * as dotenv from "dotenv"; @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Organization Validate proxy resource * * @summary Organization Validate proxy resource - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Validations_ValidateOrganizationsV2.json + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Validations_ValidateOrganizationsV2.json */ async function validationsValidateOrganizations() { const subscriptionId = @@ -39,7 +39,7 @@ async function validationsValidateOrganizations() { privateOfferId: "string", privateOfferIds: ["string"], publisherId: "string", - termUnit: "string" + termUnit: "string", }, tags: { environment: "Dev" }, userDetail: { @@ -47,15 +47,15 @@ async function validationsValidateOrganizations() { emailAddress: "abc@microsoft.com", firstName: "string", lastName: "string", - userPrincipalName: "abc@microsoft.com" - } + userPrincipalName: "abc@microsoft.com", + }, }; const credential = new DefaultAzureCredential(); const client = new ConfluentManagementClient(credential, subscriptionId); const result = await client.validations.validateOrganizationV2( resourceGroupName, organizationName, - body + body, ); console.log(result); } diff --git a/sdk/confluent/arm-confluent/samples/v3/javascript/README.md b/sdk/confluent/arm-confluent/samples/v3/javascript/README.md index 01a17713c540..ce4ccccdc2c9 100644 --- a/sdk/confluent/arm-confluent/samples/v3/javascript/README.md +++ b/sdk/confluent/arm-confluent/samples/v3/javascript/README.md @@ -2,26 +2,39 @@ These sample programs show how to use the JavaScript client libraries for in some common scenarios. -| **File Name** | **Description** | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| [accessInviteUserSample.js][accessinviteusersample] | Invite user to the organization x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Access_InviteUser.json | -| [accessListClustersSample.js][accesslistclusterssample] | Cluster details x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Access_ClusterList.json | -| [accessListEnvironmentsSample.js][accesslistenvironmentssample] | Environment list of an organization x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Access_EnvironmentList.json | -| [accessListInvitationsSample.js][accesslistinvitationssample] | Organization accounts invitation details x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Access_InvitationsList.json | -| [accessListRoleBindingsSample.js][accesslistrolebindingssample] | Organization role bindings x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Access_RoleBindingList.json | -| [accessListServiceAccountsSample.js][accesslistserviceaccountssample] | Organization service accounts details x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Access_ServiceAccountsList.json | -| [accessListUsersSample.js][accesslistuserssample] | Organization users details x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Access_UsersList.json | -| [marketplaceAgreementsCreateSample.js][marketplaceagreementscreatesample] | Create Confluent Marketplace agreement in the subscription. x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/MarketplaceAgreements_Create.json | -| [marketplaceAgreementsListSample.js][marketplaceagreementslistsample] | List Confluent marketplace agreements in the subscription. x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/MarketplaceAgreements_List.json | -| [organizationCreateSample.js][organizationcreatesample] | Create Organization resource x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Organization_Create.json | -| [organizationDeleteSample.js][organizationdeletesample] | Delete Organization resource x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Organization_Delete.json | -| [organizationGetSample.js][organizationgetsample] | Get the properties of a specific Organization resource. x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Organization_Get.json | -| [organizationListByResourceGroupSample.js][organizationlistbyresourcegroupsample] | List all Organizations under the specified resource group. x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Organization_ListByResourceGroup.json | -| [organizationListBySubscriptionSample.js][organizationlistbysubscriptionsample] | List all organizations under the specified subscription. x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Organization_ListBySubscription.json | -| [organizationOperationsListSample.js][organizationoperationslistsample] | List all operations provided by Microsoft.Confluent. x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/OrganizationOperations_List.json | -| [organizationUpdateSample.js][organizationupdatesample] | Update Organization resource x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Organization_Update.json | -| [validationsValidateOrganizationSample.js][validationsvalidateorganizationsample] | Organization Validate proxy resource x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Validations_ValidateOrganizations.json | -| [validationsValidateOrganizationV2Sample.js][validationsvalidateorganizationv2sample] | Organization Validate proxy resource x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Validations_ValidateOrganizationsV2.json | +| **File Name** | **Description** | +| --------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| [accessCreateRoleBindingSample.js][accesscreaterolebindingsample] | Organization role bindings x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_CreateRoleBinding.json | +| [accessDeleteRoleBindingSample.js][accessdeleterolebindingsample] | Organization role bindings x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_DeleteRoleBinding.json | +| [accessInviteUserSample.js][accessinviteusersample] | Invite user to the organization x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_InviteUser.json | +| [accessListClustersSample.js][accesslistclusterssample] | Cluster details x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_ClusterList.json | +| [accessListEnvironmentsSample.js][accesslistenvironmentssample] | Environment list of an organization x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_EnvironmentList.json | +| [accessListInvitationsSample.js][accesslistinvitationssample] | Organization accounts invitation details x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_InvitationsList.json | +| [accessListRoleBindingNameListSample.js][accesslistrolebindingnamelistsample] | Organization role bindings x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_RoleBindingNameList.json | +| [accessListRoleBindingsSample.js][accesslistrolebindingssample] | Organization role bindings x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_RoleBindingList.json | +| [accessListServiceAccountsSample.js][accesslistserviceaccountssample] | Organization service accounts details x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_ServiceAccountsList.json | +| [accessListUsersSample.js][accesslistuserssample] | Organization users details x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_UsersList.json | +| [marketplaceAgreementsCreateSample.js][marketplaceagreementscreatesample] | Create Confluent Marketplace agreement in the subscription. x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/MarketplaceAgreements_Create.json | +| [marketplaceAgreementsListSample.js][marketplaceagreementslistsample] | List Confluent marketplace agreements in the subscription. x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/MarketplaceAgreements_List.json | +| [organizationCreateApiKeySample.js][organizationcreateapikeysample] | Creates API key for a schema registry Cluster ID or Kafka Cluster ID under a environment x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_CreateClusterAPIKey.json | +| [organizationCreateSample.js][organizationcreatesample] | Create Organization resource x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_Create.json | +| [organizationDeleteClusterApiKeySample.js][organizationdeleteclusterapikeysample] | Deletes API key of a kafka or schema registry cluster x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_DeleteClusterAPIKey.json | +| [organizationDeleteSample.js][organizationdeletesample] | Delete Organization resource x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_Delete.json | +| [organizationGetClusterApiKeySample.js][organizationgetclusterapikeysample] | Get API key details of a kafka or schema registry cluster x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_GetClusterAPIKey.json | +| [organizationGetClusterByIdSample.js][organizationgetclusterbyidsample] | Get cluster by Id x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_GetClusterById.json | +| [organizationGetEnvironmentByIdSample.js][organizationgetenvironmentbyidsample] | Get Environment details by environment Id x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_GetEnvironmentById.json | +| [organizationGetSample.js][organizationgetsample] | Get the properties of a specific Organization resource. x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_Get.json | +| [organizationGetSchemaRegistryClusterByIdSample.js][organizationgetschemaregistryclusterbyidsample] | Get schema registry cluster by Id x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_GetSchemaRegistryClusterById.json | +| [organizationListByResourceGroupSample.js][organizationlistbyresourcegroupsample] | List all Organizations under the specified resource group. x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_ListByResourceGroup.json | +| [organizationListBySubscriptionSample.js][organizationlistbysubscriptionsample] | List all organizations under the specified subscription. x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_ListBySubscription.json | +| [organizationListClustersSample.js][organizationlistclusterssample] | Lists of all the clusters in a environment x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_ClusterList.json | +| [organizationListEnvironmentsSample.js][organizationlistenvironmentssample] | Lists of all the environments in a organization x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_EnvironmentList.json | +| [organizationListRegionsSample.js][organizationlistregionssample] | cloud provider regions available for creating Schema Registry clusters. x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_ListRegions.json | +| [organizationListSchemaRegistryClustersSample.js][organizationlistschemaregistryclusterssample] | Get schema registry clusters x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_ListSchemaRegistryClusters.json | +| [organizationOperationsListSample.js][organizationoperationslistsample] | List all operations provided by Microsoft.Confluent. x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/OrganizationOperations_List.json | +| [organizationUpdateSample.js][organizationupdatesample] | Update Organization resource x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_Update.json | +| [validationsValidateOrganizationSample.js][validationsvalidateorganizationsample] | Organization Validate proxy resource x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Validations_ValidateOrganizations.json | +| [validationsValidateOrganizationV2Sample.js][validationsvalidateorganizationv2sample] | Organization Validate proxy resource x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Validations_ValidateOrganizationsV2.json | ## Prerequisites @@ -48,33 +61,46 @@ npm install 3. Run whichever samples you like (note that some samples may require additional setup, see the table above): ```bash -node accessInviteUserSample.js +node accessCreateRoleBindingSample.js ``` Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): ```bash -npx cross-env CONFLUENT_SUBSCRIPTION_ID="" CONFLUENT_RESOURCE_GROUP="" node accessInviteUserSample.js +npx cross-env CONFLUENT_SUBSCRIPTION_ID="" CONFLUENT_RESOURCE_GROUP="" node accessCreateRoleBindingSample.js ``` ## Next Steps Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. +[accesscreaterolebindingsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/confluent/arm-confluent/samples/v3/javascript/accessCreateRoleBindingSample.js +[accessdeleterolebindingsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/confluent/arm-confluent/samples/v3/javascript/accessDeleteRoleBindingSample.js [accessinviteusersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/confluent/arm-confluent/samples/v3/javascript/accessInviteUserSample.js [accesslistclusterssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/confluent/arm-confluent/samples/v3/javascript/accessListClustersSample.js [accesslistenvironmentssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/confluent/arm-confluent/samples/v3/javascript/accessListEnvironmentsSample.js [accesslistinvitationssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/confluent/arm-confluent/samples/v3/javascript/accessListInvitationsSample.js +[accesslistrolebindingnamelistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/confluent/arm-confluent/samples/v3/javascript/accessListRoleBindingNameListSample.js [accesslistrolebindingssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/confluent/arm-confluent/samples/v3/javascript/accessListRoleBindingsSample.js [accesslistserviceaccountssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/confluent/arm-confluent/samples/v3/javascript/accessListServiceAccountsSample.js [accesslistuserssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/confluent/arm-confluent/samples/v3/javascript/accessListUsersSample.js [marketplaceagreementscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/confluent/arm-confluent/samples/v3/javascript/marketplaceAgreementsCreateSample.js [marketplaceagreementslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/confluent/arm-confluent/samples/v3/javascript/marketplaceAgreementsListSample.js +[organizationcreateapikeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/confluent/arm-confluent/samples/v3/javascript/organizationCreateApiKeySample.js [organizationcreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/confluent/arm-confluent/samples/v3/javascript/organizationCreateSample.js +[organizationdeleteclusterapikeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/confluent/arm-confluent/samples/v3/javascript/organizationDeleteClusterApiKeySample.js [organizationdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/confluent/arm-confluent/samples/v3/javascript/organizationDeleteSample.js +[organizationgetclusterapikeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/confluent/arm-confluent/samples/v3/javascript/organizationGetClusterApiKeySample.js +[organizationgetclusterbyidsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/confluent/arm-confluent/samples/v3/javascript/organizationGetClusterByIdSample.js +[organizationgetenvironmentbyidsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/confluent/arm-confluent/samples/v3/javascript/organizationGetEnvironmentByIdSample.js [organizationgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/confluent/arm-confluent/samples/v3/javascript/organizationGetSample.js +[organizationgetschemaregistryclusterbyidsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/confluent/arm-confluent/samples/v3/javascript/organizationGetSchemaRegistryClusterByIdSample.js [organizationlistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/confluent/arm-confluent/samples/v3/javascript/organizationListByResourceGroupSample.js [organizationlistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/confluent/arm-confluent/samples/v3/javascript/organizationListBySubscriptionSample.js +[organizationlistclusterssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/confluent/arm-confluent/samples/v3/javascript/organizationListClustersSample.js +[organizationlistenvironmentssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/confluent/arm-confluent/samples/v3/javascript/organizationListEnvironmentsSample.js +[organizationlistregionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/confluent/arm-confluent/samples/v3/javascript/organizationListRegionsSample.js +[organizationlistschemaregistryclusterssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/confluent/arm-confluent/samples/v3/javascript/organizationListSchemaRegistryClustersSample.js [organizationoperationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/confluent/arm-confluent/samples/v3/javascript/organizationOperationsListSample.js [organizationupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/confluent/arm-confluent/samples/v3/javascript/organizationUpdateSample.js [validationsvalidateorganizationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/confluent/arm-confluent/samples/v3/javascript/validationsValidateOrganizationSample.js diff --git a/sdk/confluent/arm-confluent/samples/v3/javascript/accessCreateRoleBindingSample.js b/sdk/confluent/arm-confluent/samples/v3/javascript/accessCreateRoleBindingSample.js new file mode 100644 index 000000000000..6865af825658 --- /dev/null +++ b/sdk/confluent/arm-confluent/samples/v3/javascript/accessCreateRoleBindingSample.js @@ -0,0 +1,42 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { ConfluentManagementClient } = require("@azure/arm-confluent"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Organization role bindings + * + * @summary Organization role bindings + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_CreateRoleBinding.json + */ +async function accessCreateRoleBinding() { + const subscriptionId = + process.env["CONFLUENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["CONFLUENT_RESOURCE_GROUP"] || "myResourceGroup"; + const organizationName = "myOrganization"; + const body = { + crnPattern: + "crn://confluent.cloud/organization=1111aaaa-11aa-11aa-11aa-111111aaaaaa/environment=env-aaa1111/cloud-cluster=lkc-1111aaa", + principal: "User:u-111aaa", + roleName: "CloudClusterAdmin", + }; + const credential = new DefaultAzureCredential(); + const client = new ConfluentManagementClient(credential, subscriptionId); + const result = await client.access.createRoleBinding(resourceGroupName, organizationName, body); + console.log(result); +} + +async function main() { + accessCreateRoleBinding(); +} + +main().catch(console.error); diff --git a/sdk/confluent/arm-confluent/samples/v3/javascript/accessDeleteRoleBindingSample.js b/sdk/confluent/arm-confluent/samples/v3/javascript/accessDeleteRoleBindingSample.js new file mode 100644 index 000000000000..d1f1c3400d06 --- /dev/null +++ b/sdk/confluent/arm-confluent/samples/v3/javascript/accessDeleteRoleBindingSample.js @@ -0,0 +1,41 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { ConfluentManagementClient } = require("@azure/arm-confluent"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Organization role bindings + * + * @summary Organization role bindings + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_DeleteRoleBinding.json + */ +async function accessDeleteRoleBinding() { + const subscriptionId = + process.env["CONFLUENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["CONFLUENT_RESOURCE_GROUP"] || "myResourceGroup"; + const organizationName = "myOrganization"; + const roleBindingId = "dlz-f3a90de"; + const credential = new DefaultAzureCredential(); + const client = new ConfluentManagementClient(credential, subscriptionId); + const result = await client.access.deleteRoleBinding( + resourceGroupName, + organizationName, + roleBindingId, + ); + console.log(result); +} + +async function main() { + accessDeleteRoleBinding(); +} + +main().catch(console.error); diff --git a/sdk/confluent/arm-confluent/samples/v3/javascript/accessInviteUserSample.js b/sdk/confluent/arm-confluent/samples/v3/javascript/accessInviteUserSample.js index 816278118d62..05f6c4010681 100644 --- a/sdk/confluent/arm-confluent/samples/v3/javascript/accessInviteUserSample.js +++ b/sdk/confluent/arm-confluent/samples/v3/javascript/accessInviteUserSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Invite user to the organization * * @summary Invite user to the organization - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Access_InviteUser.json + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_InviteUser.json */ async function accessInviteUser() { const subscriptionId = diff --git a/sdk/confluent/arm-confluent/samples/v3/javascript/accessListClustersSample.js b/sdk/confluent/arm-confluent/samples/v3/javascript/accessListClustersSample.js index 6d79b21ffcc1..2a3453d9ce8c 100644 --- a/sdk/confluent/arm-confluent/samples/v3/javascript/accessListClustersSample.js +++ b/sdk/confluent/arm-confluent/samples/v3/javascript/accessListClustersSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Cluster details * * @summary Cluster details - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Access_ClusterList.json + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_ClusterList.json */ async function accessClusterList() { const subscriptionId = diff --git a/sdk/confluent/arm-confluent/samples/v3/javascript/accessListEnvironmentsSample.js b/sdk/confluent/arm-confluent/samples/v3/javascript/accessListEnvironmentsSample.js index 2bbe9854d808..d44de546d2ae 100644 --- a/sdk/confluent/arm-confluent/samples/v3/javascript/accessListEnvironmentsSample.js +++ b/sdk/confluent/arm-confluent/samples/v3/javascript/accessListEnvironmentsSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Environment list of an organization * * @summary Environment list of an organization - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Access_EnvironmentList.json + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_EnvironmentList.json */ async function accessEnvironmentList() { const subscriptionId = diff --git a/sdk/confluent/arm-confluent/samples/v3/javascript/accessListInvitationsSample.js b/sdk/confluent/arm-confluent/samples/v3/javascript/accessListInvitationsSample.js index ae3caf2d893e..9d70512508ff 100644 --- a/sdk/confluent/arm-confluent/samples/v3/javascript/accessListInvitationsSample.js +++ b/sdk/confluent/arm-confluent/samples/v3/javascript/accessListInvitationsSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Organization accounts invitation details * * @summary Organization accounts invitation details - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Access_InvitationsList.json + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_InvitationsList.json */ async function accessInvitationsList() { const subscriptionId = diff --git a/sdk/confluent/arm-confluent/samples/v3/javascript/accessListRoleBindingNameListSample.js b/sdk/confluent/arm-confluent/samples/v3/javascript/accessListRoleBindingNameListSample.js new file mode 100644 index 000000000000..ccc904a51cde --- /dev/null +++ b/sdk/confluent/arm-confluent/samples/v3/javascript/accessListRoleBindingNameListSample.js @@ -0,0 +1,47 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { ConfluentManagementClient } = require("@azure/arm-confluent"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Organization role bindings + * + * @summary Organization role bindings + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_RoleBindingNameList.json + */ +async function accessRoleBindingNameList() { + const subscriptionId = + process.env["CONFLUENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["CONFLUENT_RESOURCE_GROUP"] || "myResourceGroup"; + const organizationName = "myOrganization"; + const body = { + searchFilters: { + crnPattern: "crn://confluent.cloud/organization=1aa7de07-298e-479c-8f2f-16ac91fd8e76", + namespace: + "public,dataplane,networking,identity,datagovernance,connect,streamcatalog,pipelines,ksql", + }, + }; + const credential = new DefaultAzureCredential(); + const client = new ConfluentManagementClient(credential, subscriptionId); + const result = await client.access.listRoleBindingNameList( + resourceGroupName, + organizationName, + body, + ); + console.log(result); +} + +async function main() { + accessRoleBindingNameList(); +} + +main().catch(console.error); diff --git a/sdk/confluent/arm-confluent/samples/v3/javascript/accessListRoleBindingsSample.js b/sdk/confluent/arm-confluent/samples/v3/javascript/accessListRoleBindingsSample.js index a6a7f221199c..0f766145dbd2 100644 --- a/sdk/confluent/arm-confluent/samples/v3/javascript/accessListRoleBindingsSample.js +++ b/sdk/confluent/arm-confluent/samples/v3/javascript/accessListRoleBindingsSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Organization role bindings * * @summary Organization role bindings - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Access_RoleBindingList.json + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_RoleBindingList.json */ async function accessRoleBindingList() { const subscriptionId = diff --git a/sdk/confluent/arm-confluent/samples/v3/javascript/accessListServiceAccountsSample.js b/sdk/confluent/arm-confluent/samples/v3/javascript/accessListServiceAccountsSample.js index a115760c015a..9e357162ed8f 100644 --- a/sdk/confluent/arm-confluent/samples/v3/javascript/accessListServiceAccountsSample.js +++ b/sdk/confluent/arm-confluent/samples/v3/javascript/accessListServiceAccountsSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Organization service accounts details * * @summary Organization service accounts details - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Access_ServiceAccountsList.json + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_ServiceAccountsList.json */ async function accessServiceAccountsList() { const subscriptionId = diff --git a/sdk/confluent/arm-confluent/samples/v3/javascript/accessListUsersSample.js b/sdk/confluent/arm-confluent/samples/v3/javascript/accessListUsersSample.js index be183d01c6db..168cfbd73167 100644 --- a/sdk/confluent/arm-confluent/samples/v3/javascript/accessListUsersSample.js +++ b/sdk/confluent/arm-confluent/samples/v3/javascript/accessListUsersSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Organization users details * * @summary Organization users details - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Access_UsersList.json + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_UsersList.json */ async function accessUsersList() { const subscriptionId = diff --git a/sdk/confluent/arm-confluent/samples/v3/javascript/marketplaceAgreementsCreateSample.js b/sdk/confluent/arm-confluent/samples/v3/javascript/marketplaceAgreementsCreateSample.js index ddad98f9befb..fe40c0fc0a32 100644 --- a/sdk/confluent/arm-confluent/samples/v3/javascript/marketplaceAgreementsCreateSample.js +++ b/sdk/confluent/arm-confluent/samples/v3/javascript/marketplaceAgreementsCreateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Create Confluent Marketplace agreement in the subscription. * * @summary Create Confluent Marketplace agreement in the subscription. - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/MarketplaceAgreements_Create.json + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/MarketplaceAgreements_Create.json */ async function marketplaceAgreementsCreate() { const subscriptionId = diff --git a/sdk/confluent/arm-confluent/samples/v3/javascript/marketplaceAgreementsListSample.js b/sdk/confluent/arm-confluent/samples/v3/javascript/marketplaceAgreementsListSample.js index f70367afd4e2..16d9f475bc72 100644 --- a/sdk/confluent/arm-confluent/samples/v3/javascript/marketplaceAgreementsListSample.js +++ b/sdk/confluent/arm-confluent/samples/v3/javascript/marketplaceAgreementsListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to List Confluent marketplace agreements in the subscription. * * @summary List Confluent marketplace agreements in the subscription. - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/MarketplaceAgreements_List.json + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/MarketplaceAgreements_List.json */ async function marketplaceAgreementsList() { const subscriptionId = diff --git a/sdk/confluent/arm-confluent/samples/v3/javascript/organizationCreateApiKeySample.js b/sdk/confluent/arm-confluent/samples/v3/javascript/organizationCreateApiKeySample.js new file mode 100644 index 000000000000..e63102d2f479 --- /dev/null +++ b/sdk/confluent/arm-confluent/samples/v3/javascript/organizationCreateApiKeySample.js @@ -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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { ConfluentManagementClient } = require("@azure/arm-confluent"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Creates API key for a schema registry Cluster ID or Kafka Cluster ID under a environment + * + * @summary Creates API key for a schema registry Cluster ID or Kafka Cluster ID under a environment + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_CreateClusterAPIKey.json + */ +async function organizationCreateApiKey() { + const subscriptionId = + process.env["CONFLUENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["CONFLUENT_RESOURCE_GROUP"] || "myResourceGroup"; + const organizationName = "myOrganization"; + const environmentId = "env-12132"; + const clusterId = "clusterId-123"; + const body = { + name: "CI kafka access key", + description: "This API key provides kafka access to cluster x", + }; + const credential = new DefaultAzureCredential(); + const client = new ConfluentManagementClient(credential, subscriptionId); + const result = await client.organization.createAPIKey( + resourceGroupName, + organizationName, + environmentId, + clusterId, + body, + ); + console.log(result); +} + +async function main() { + organizationCreateApiKey(); +} + +main().catch(console.error); diff --git a/sdk/confluent/arm-confluent/samples/v3/javascript/organizationCreateSample.js b/sdk/confluent/arm-confluent/samples/v3/javascript/organizationCreateSample.js index 72a00d2b36f1..6af0cdd2d9b6 100644 --- a/sdk/confluent/arm-confluent/samples/v3/javascript/organizationCreateSample.js +++ b/sdk/confluent/arm-confluent/samples/v3/javascript/organizationCreateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Create Organization resource * * @summary Create Organization resource - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Organization_Create.json + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_Create.json */ async function organizationCreate() { const subscriptionId = @@ -50,7 +50,7 @@ async function organizationCreate() { const result = await client.organization.beginCreateAndWait( resourceGroupName, organizationName, - options + options, ); console.log(result); } diff --git a/sdk/confluent/arm-confluent/samples/v3/javascript/organizationDeleteClusterApiKeySample.js b/sdk/confluent/arm-confluent/samples/v3/javascript/organizationDeleteClusterApiKeySample.js new file mode 100644 index 000000000000..5423d74d8b0c --- /dev/null +++ b/sdk/confluent/arm-confluent/samples/v3/javascript/organizationDeleteClusterApiKeySample.js @@ -0,0 +1,41 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { ConfluentManagementClient } = require("@azure/arm-confluent"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Deletes API key of a kafka or schema registry cluster + * + * @summary Deletes API key of a kafka or schema registry cluster + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_DeleteClusterAPIKey.json + */ +async function organizationDeleteClusterApiKey() { + const subscriptionId = + process.env["CONFLUENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["CONFLUENT_RESOURCE_GROUP"] || "myResourceGroup"; + const organizationName = "myOrganization"; + const apiKeyId = "ZFZ6SZZZWGYBEIFB"; + const credential = new DefaultAzureCredential(); + const client = new ConfluentManagementClient(credential, subscriptionId); + const result = await client.organization.deleteClusterAPIKey( + resourceGroupName, + organizationName, + apiKeyId, + ); + console.log(result); +} + +async function main() { + organizationDeleteClusterApiKey(); +} + +main().catch(console.error); diff --git a/sdk/confluent/arm-confluent/samples/v3/javascript/organizationDeleteSample.js b/sdk/confluent/arm-confluent/samples/v3/javascript/organizationDeleteSample.js index 1dac7d493432..de052be0de3c 100644 --- a/sdk/confluent/arm-confluent/samples/v3/javascript/organizationDeleteSample.js +++ b/sdk/confluent/arm-confluent/samples/v3/javascript/organizationDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Delete Organization resource * * @summary Delete Organization resource - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Organization_Delete.json + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_Delete.json */ async function confluentDelete() { const subscriptionId = diff --git a/sdk/confluent/arm-confluent/samples/v3/javascript/organizationGetClusterApiKeySample.js b/sdk/confluent/arm-confluent/samples/v3/javascript/organizationGetClusterApiKeySample.js new file mode 100644 index 000000000000..c9fea7053a95 --- /dev/null +++ b/sdk/confluent/arm-confluent/samples/v3/javascript/organizationGetClusterApiKeySample.js @@ -0,0 +1,41 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { ConfluentManagementClient } = require("@azure/arm-confluent"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Get API key details of a kafka or schema registry cluster + * + * @summary Get API key details of a kafka or schema registry cluster + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_GetClusterAPIKey.json + */ +async function organizationGetClusterApiKey() { + const subscriptionId = + process.env["CONFLUENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["CONFLUENT_RESOURCE_GROUP"] || "myResourceGroup"; + const organizationName = "myOrganization"; + const apiKeyId = "apiKeyId-123"; + const credential = new DefaultAzureCredential(); + const client = new ConfluentManagementClient(credential, subscriptionId); + const result = await client.organization.getClusterAPIKey( + resourceGroupName, + organizationName, + apiKeyId, + ); + console.log(result); +} + +async function main() { + organizationGetClusterApiKey(); +} + +main().catch(console.error); diff --git a/sdk/confluent/arm-confluent/samples/v3/javascript/organizationGetClusterByIdSample.js b/sdk/confluent/arm-confluent/samples/v3/javascript/organizationGetClusterByIdSample.js new file mode 100644 index 000000000000..85091d644473 --- /dev/null +++ b/sdk/confluent/arm-confluent/samples/v3/javascript/organizationGetClusterByIdSample.js @@ -0,0 +1,43 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { ConfluentManagementClient } = require("@azure/arm-confluent"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Get cluster by Id + * + * @summary Get cluster by Id + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_GetClusterById.json + */ +async function organizationGetClusterById() { + const subscriptionId = + process.env["CONFLUENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["CONFLUENT_RESOURCE_GROUP"] || "myResourceGroup"; + const organizationName = "myOrganization"; + const environmentId = "env-12132"; + const clusterId = "dlz-f3a90de"; + const credential = new DefaultAzureCredential(); + const client = new ConfluentManagementClient(credential, subscriptionId); + const result = await client.organization.getClusterById( + resourceGroupName, + organizationName, + environmentId, + clusterId, + ); + console.log(result); +} + +async function main() { + organizationGetClusterById(); +} + +main().catch(console.error); diff --git a/sdk/confluent/arm-confluent/samples/v3/javascript/organizationGetEnvironmentByIdSample.js b/sdk/confluent/arm-confluent/samples/v3/javascript/organizationGetEnvironmentByIdSample.js new file mode 100644 index 000000000000..1fda60b7ae62 --- /dev/null +++ b/sdk/confluent/arm-confluent/samples/v3/javascript/organizationGetEnvironmentByIdSample.js @@ -0,0 +1,41 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { ConfluentManagementClient } = require("@azure/arm-confluent"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Get Environment details by environment Id + * + * @summary Get Environment details by environment Id + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_GetEnvironmentById.json + */ +async function organizationGetEnvironmentById() { + const subscriptionId = + process.env["CONFLUENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["CONFLUENT_RESOURCE_GROUP"] || "myResourceGroup"; + const organizationName = "myOrganization"; + const environmentId = "dlz-f3a90de"; + const credential = new DefaultAzureCredential(); + const client = new ConfluentManagementClient(credential, subscriptionId); + const result = await client.organization.getEnvironmentById( + resourceGroupName, + organizationName, + environmentId, + ); + console.log(result); +} + +async function main() { + organizationGetEnvironmentById(); +} + +main().catch(console.error); diff --git a/sdk/confluent/arm-confluent/samples/v3/javascript/organizationGetSample.js b/sdk/confluent/arm-confluent/samples/v3/javascript/organizationGetSample.js index fa468ed7cf44..ba02ecff2722 100644 --- a/sdk/confluent/arm-confluent/samples/v3/javascript/organizationGetSample.js +++ b/sdk/confluent/arm-confluent/samples/v3/javascript/organizationGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Get the properties of a specific Organization resource. * * @summary Get the properties of a specific Organization resource. - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Organization_Get.json + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_Get.json */ async function organizationGet() { const subscriptionId = diff --git a/sdk/confluent/arm-confluent/samples/v3/javascript/organizationGetSchemaRegistryClusterByIdSample.js b/sdk/confluent/arm-confluent/samples/v3/javascript/organizationGetSchemaRegistryClusterByIdSample.js new file mode 100644 index 000000000000..e456cdf84f03 --- /dev/null +++ b/sdk/confluent/arm-confluent/samples/v3/javascript/organizationGetSchemaRegistryClusterByIdSample.js @@ -0,0 +1,43 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { ConfluentManagementClient } = require("@azure/arm-confluent"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Get schema registry cluster by Id + * + * @summary Get schema registry cluster by Id + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_GetSchemaRegistryClusterById.json + */ +async function organizationGetSchemaRegistryClusterById() { + const subscriptionId = + process.env["CONFLUENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["CONFLUENT_RESOURCE_GROUP"] || "myResourceGroup"; + const organizationName = "myOrganization"; + const environmentId = "env-stgcczjp2j3"; + const clusterId = "lsrc-stgczkq22z"; + const credential = new DefaultAzureCredential(); + const client = new ConfluentManagementClient(credential, subscriptionId); + const result = await client.organization.getSchemaRegistryClusterById( + resourceGroupName, + organizationName, + environmentId, + clusterId, + ); + console.log(result); +} + +async function main() { + organizationGetSchemaRegistryClusterById(); +} + +main().catch(console.error); diff --git a/sdk/confluent/arm-confluent/samples/v3/javascript/organizationListByResourceGroupSample.js b/sdk/confluent/arm-confluent/samples/v3/javascript/organizationListByResourceGroupSample.js index b768c92d6f6e..0fbc944fe690 100644 --- a/sdk/confluent/arm-confluent/samples/v3/javascript/organizationListByResourceGroupSample.js +++ b/sdk/confluent/arm-confluent/samples/v3/javascript/organizationListByResourceGroupSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to List all Organizations under the specified resource group. * * @summary List all Organizations under the specified resource group. - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Organization_ListByResourceGroup.json + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_ListByResourceGroup.json */ async function organizationListByResourceGroup() { const subscriptionId = diff --git a/sdk/confluent/arm-confluent/samples/v3/javascript/organizationListBySubscriptionSample.js b/sdk/confluent/arm-confluent/samples/v3/javascript/organizationListBySubscriptionSample.js index 927f7f80c473..a53e7b621745 100644 --- a/sdk/confluent/arm-confluent/samples/v3/javascript/organizationListBySubscriptionSample.js +++ b/sdk/confluent/arm-confluent/samples/v3/javascript/organizationListBySubscriptionSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to List all organizations under the specified subscription. * * @summary List all organizations under the specified subscription. - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Organization_ListBySubscription.json + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_ListBySubscription.json */ async function organizationListBySubscription() { const subscriptionId = diff --git a/sdk/confluent/arm-confluent/samples/v3/javascript/organizationListClustersSample.js b/sdk/confluent/arm-confluent/samples/v3/javascript/organizationListClustersSample.js new file mode 100644 index 000000000000..be0e54e01d4e --- /dev/null +++ b/sdk/confluent/arm-confluent/samples/v3/javascript/organizationListClustersSample.js @@ -0,0 +1,47 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { ConfluentManagementClient } = require("@azure/arm-confluent"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Lists of all the clusters in a environment + * + * @summary Lists of all the clusters in a environment + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_ClusterList.json + */ +async function organizationListClusters() { + const subscriptionId = + process.env["CONFLUENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["CONFLUENT_RESOURCE_GROUP"] || "myResourceGroup"; + const organizationName = "myOrganization"; + const environmentId = "env-12132"; + const pageSize = 10; + const options = { pageSize }; + const credential = new DefaultAzureCredential(); + const client = new ConfluentManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.organization.listClusters( + resourceGroupName, + organizationName, + environmentId, + options, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + organizationListClusters(); +} + +main().catch(console.error); diff --git a/sdk/confluent/arm-confluent/samples/v3/javascript/organizationListEnvironmentsSample.js b/sdk/confluent/arm-confluent/samples/v3/javascript/organizationListEnvironmentsSample.js new file mode 100644 index 000000000000..c3a28683620e --- /dev/null +++ b/sdk/confluent/arm-confluent/samples/v3/javascript/organizationListEnvironmentsSample.js @@ -0,0 +1,45 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { ConfluentManagementClient } = require("@azure/arm-confluent"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Lists of all the environments in a organization + * + * @summary Lists of all the environments in a organization + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_EnvironmentList.json + */ +async function organizationListEnvironments() { + const subscriptionId = + process.env["CONFLUENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["CONFLUENT_RESOURCE_GROUP"] || "myResourceGroup"; + const organizationName = "myOrganization"; + const pageSize = 10; + const options = { pageSize }; + const credential = new DefaultAzureCredential(); + const client = new ConfluentManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.organization.listEnvironments( + resourceGroupName, + organizationName, + options, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + organizationListEnvironments(); +} + +main().catch(console.error); diff --git a/sdk/confluent/arm-confluent/samples/v3/javascript/organizationListRegionsSample.js b/sdk/confluent/arm-confluent/samples/v3/javascript/organizationListRegionsSample.js new file mode 100644 index 000000000000..0ce92a19678c --- /dev/null +++ b/sdk/confluent/arm-confluent/samples/v3/javascript/organizationListRegionsSample.js @@ -0,0 +1,43 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { ConfluentManagementClient } = require("@azure/arm-confluent"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to cloud provider regions available for creating Schema Registry clusters. + * + * @summary cloud provider regions available for creating Schema Registry clusters. + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_ListRegions.json + */ +async function organizationListRegions() { + const subscriptionId = + process.env["CONFLUENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["CONFLUENT_RESOURCE_GROUP"] || "myResourceGroup"; + const organizationName = "myOrganization"; + const body = { + searchFilters: { + cloud: "azure", + packages: "ADVANCED,ESSENTIALS", + region: "eastus", + }, + }; + const credential = new DefaultAzureCredential(); + const client = new ConfluentManagementClient(credential, subscriptionId); + const result = await client.organization.listRegions(resourceGroupName, organizationName, body); + console.log(result); +} + +async function main() { + organizationListRegions(); +} + +main().catch(console.error); diff --git a/sdk/confluent/arm-confluent/samples/v3/javascript/organizationListSchemaRegistryClustersSample.js b/sdk/confluent/arm-confluent/samples/v3/javascript/organizationListSchemaRegistryClustersSample.js new file mode 100644 index 000000000000..8aa0e0de8fde --- /dev/null +++ b/sdk/confluent/arm-confluent/samples/v3/javascript/organizationListSchemaRegistryClustersSample.js @@ -0,0 +1,44 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { ConfluentManagementClient } = require("@azure/arm-confluent"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Get schema registry clusters + * + * @summary Get schema registry clusters + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_ListSchemaRegistryClusters.json + */ +async function organizationListSchemaRegistryClusters() { + const subscriptionId = + process.env["CONFLUENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["CONFLUENT_RESOURCE_GROUP"] || "myResourceGroup"; + const organizationName = "myOrganization"; + const environmentId = "env-stgcczjp2j3"; + const credential = new DefaultAzureCredential(); + const client = new ConfluentManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.organization.listSchemaRegistryClusters( + resourceGroupName, + organizationName, + environmentId, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + organizationListSchemaRegistryClusters(); +} + +main().catch(console.error); diff --git a/sdk/confluent/arm-confluent/samples/v3/javascript/organizationOperationsListSample.js b/sdk/confluent/arm-confluent/samples/v3/javascript/organizationOperationsListSample.js index 3e60bab13ae6..fe91fdf851de 100644 --- a/sdk/confluent/arm-confluent/samples/v3/javascript/organizationOperationsListSample.js +++ b/sdk/confluent/arm-confluent/samples/v3/javascript/organizationOperationsListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to List all operations provided by Microsoft.Confluent. * * @summary List all operations provided by Microsoft.Confluent. - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/OrganizationOperations_List.json + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/OrganizationOperations_List.json */ async function organizationOperationsList() { const credential = new DefaultAzureCredential(); diff --git a/sdk/confluent/arm-confluent/samples/v3/javascript/organizationUpdateSample.js b/sdk/confluent/arm-confluent/samples/v3/javascript/organizationUpdateSample.js index 1e773143b577..676d0890dcbc 100644 --- a/sdk/confluent/arm-confluent/samples/v3/javascript/organizationUpdateSample.js +++ b/sdk/confluent/arm-confluent/samples/v3/javascript/organizationUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Update Organization resource * * @summary Update Organization resource - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Organization_Update.json + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_Update.json */ async function confluentUpdate() { const subscriptionId = diff --git a/sdk/confluent/arm-confluent/samples/v3/javascript/validationsValidateOrganizationSample.js b/sdk/confluent/arm-confluent/samples/v3/javascript/validationsValidateOrganizationSample.js index defa945b22bf..f24fdc2182ac 100644 --- a/sdk/confluent/arm-confluent/samples/v3/javascript/validationsValidateOrganizationSample.js +++ b/sdk/confluent/arm-confluent/samples/v3/javascript/validationsValidateOrganizationSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Organization Validate proxy resource * * @summary Organization Validate proxy resource - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Validations_ValidateOrganizations.json + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Validations_ValidateOrganizations.json */ async function validationsValidateOrganizations() { const subscriptionId = @@ -48,7 +48,7 @@ async function validationsValidateOrganizations() { const result = await client.validations.validateOrganization( resourceGroupName, organizationName, - body + body, ); console.log(result); } diff --git a/sdk/confluent/arm-confluent/samples/v3/javascript/validationsValidateOrganizationV2Sample.js b/sdk/confluent/arm-confluent/samples/v3/javascript/validationsValidateOrganizationV2Sample.js index 31f47eae4587..59c1b45b09e7 100644 --- a/sdk/confluent/arm-confluent/samples/v3/javascript/validationsValidateOrganizationV2Sample.js +++ b/sdk/confluent/arm-confluent/samples/v3/javascript/validationsValidateOrganizationV2Sample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Organization Validate proxy resource * * @summary Organization Validate proxy resource - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Validations_ValidateOrganizationsV2.json + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Validations_ValidateOrganizationsV2.json */ async function validationsValidateOrganizations() { const subscriptionId = @@ -48,7 +48,7 @@ async function validationsValidateOrganizations() { const result = await client.validations.validateOrganizationV2( resourceGroupName, organizationName, - body + body, ); console.log(result); } diff --git a/sdk/confluent/arm-confluent/samples/v3/typescript/README.md b/sdk/confluent/arm-confluent/samples/v3/typescript/README.md index 7cf7358dc4f9..f6f383e85ec1 100644 --- a/sdk/confluent/arm-confluent/samples/v3/typescript/README.md +++ b/sdk/confluent/arm-confluent/samples/v3/typescript/README.md @@ -2,26 +2,39 @@ These sample programs show how to use the TypeScript client libraries for in some common scenarios. -| **File Name** | **Description** | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| [accessInviteUserSample.ts][accessinviteusersample] | Invite user to the organization x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Access_InviteUser.json | -| [accessListClustersSample.ts][accesslistclusterssample] | Cluster details x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Access_ClusterList.json | -| [accessListEnvironmentsSample.ts][accesslistenvironmentssample] | Environment list of an organization x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Access_EnvironmentList.json | -| [accessListInvitationsSample.ts][accesslistinvitationssample] | Organization accounts invitation details x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Access_InvitationsList.json | -| [accessListRoleBindingsSample.ts][accesslistrolebindingssample] | Organization role bindings x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Access_RoleBindingList.json | -| [accessListServiceAccountsSample.ts][accesslistserviceaccountssample] | Organization service accounts details x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Access_ServiceAccountsList.json | -| [accessListUsersSample.ts][accesslistuserssample] | Organization users details x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Access_UsersList.json | -| [marketplaceAgreementsCreateSample.ts][marketplaceagreementscreatesample] | Create Confluent Marketplace agreement in the subscription. x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/MarketplaceAgreements_Create.json | -| [marketplaceAgreementsListSample.ts][marketplaceagreementslistsample] | List Confluent marketplace agreements in the subscription. x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/MarketplaceAgreements_List.json | -| [organizationCreateSample.ts][organizationcreatesample] | Create Organization resource x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Organization_Create.json | -| [organizationDeleteSample.ts][organizationdeletesample] | Delete Organization resource x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Organization_Delete.json | -| [organizationGetSample.ts][organizationgetsample] | Get the properties of a specific Organization resource. x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Organization_Get.json | -| [organizationListByResourceGroupSample.ts][organizationlistbyresourcegroupsample] | List all Organizations under the specified resource group. x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Organization_ListByResourceGroup.json | -| [organizationListBySubscriptionSample.ts][organizationlistbysubscriptionsample] | List all organizations under the specified subscription. x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Organization_ListBySubscription.json | -| [organizationOperationsListSample.ts][organizationoperationslistsample] | List all operations provided by Microsoft.Confluent. x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/OrganizationOperations_List.json | -| [organizationUpdateSample.ts][organizationupdatesample] | Update Organization resource x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Organization_Update.json | -| [validationsValidateOrganizationSample.ts][validationsvalidateorganizationsample] | Organization Validate proxy resource x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Validations_ValidateOrganizations.json | -| [validationsValidateOrganizationV2Sample.ts][validationsvalidateorganizationv2sample] | Organization Validate proxy resource x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Validations_ValidateOrganizationsV2.json | +| **File Name** | **Description** | +| --------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| [accessCreateRoleBindingSample.ts][accesscreaterolebindingsample] | Organization role bindings x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_CreateRoleBinding.json | +| [accessDeleteRoleBindingSample.ts][accessdeleterolebindingsample] | Organization role bindings x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_DeleteRoleBinding.json | +| [accessInviteUserSample.ts][accessinviteusersample] | Invite user to the organization x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_InviteUser.json | +| [accessListClustersSample.ts][accesslistclusterssample] | Cluster details x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_ClusterList.json | +| [accessListEnvironmentsSample.ts][accesslistenvironmentssample] | Environment list of an organization x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_EnvironmentList.json | +| [accessListInvitationsSample.ts][accesslistinvitationssample] | Organization accounts invitation details x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_InvitationsList.json | +| [accessListRoleBindingNameListSample.ts][accesslistrolebindingnamelistsample] | Organization role bindings x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_RoleBindingNameList.json | +| [accessListRoleBindingsSample.ts][accesslistrolebindingssample] | Organization role bindings x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_RoleBindingList.json | +| [accessListServiceAccountsSample.ts][accesslistserviceaccountssample] | Organization service accounts details x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_ServiceAccountsList.json | +| [accessListUsersSample.ts][accesslistuserssample] | Organization users details x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_UsersList.json | +| [marketplaceAgreementsCreateSample.ts][marketplaceagreementscreatesample] | Create Confluent Marketplace agreement in the subscription. x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/MarketplaceAgreements_Create.json | +| [marketplaceAgreementsListSample.ts][marketplaceagreementslistsample] | List Confluent marketplace agreements in the subscription. x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/MarketplaceAgreements_List.json | +| [organizationCreateApiKeySample.ts][organizationcreateapikeysample] | Creates API key for a schema registry Cluster ID or Kafka Cluster ID under a environment x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_CreateClusterAPIKey.json | +| [organizationCreateSample.ts][organizationcreatesample] | Create Organization resource x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_Create.json | +| [organizationDeleteClusterApiKeySample.ts][organizationdeleteclusterapikeysample] | Deletes API key of a kafka or schema registry cluster x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_DeleteClusterAPIKey.json | +| [organizationDeleteSample.ts][organizationdeletesample] | Delete Organization resource x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_Delete.json | +| [organizationGetClusterApiKeySample.ts][organizationgetclusterapikeysample] | Get API key details of a kafka or schema registry cluster x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_GetClusterAPIKey.json | +| [organizationGetClusterByIdSample.ts][organizationgetclusterbyidsample] | Get cluster by Id x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_GetClusterById.json | +| [organizationGetEnvironmentByIdSample.ts][organizationgetenvironmentbyidsample] | Get Environment details by environment Id x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_GetEnvironmentById.json | +| [organizationGetSample.ts][organizationgetsample] | Get the properties of a specific Organization resource. x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_Get.json | +| [organizationGetSchemaRegistryClusterByIdSample.ts][organizationgetschemaregistryclusterbyidsample] | Get schema registry cluster by Id x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_GetSchemaRegistryClusterById.json | +| [organizationListByResourceGroupSample.ts][organizationlistbyresourcegroupsample] | List all Organizations under the specified resource group. x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_ListByResourceGroup.json | +| [organizationListBySubscriptionSample.ts][organizationlistbysubscriptionsample] | List all organizations under the specified subscription. x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_ListBySubscription.json | +| [organizationListClustersSample.ts][organizationlistclusterssample] | Lists of all the clusters in a environment x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_ClusterList.json | +| [organizationListEnvironmentsSample.ts][organizationlistenvironmentssample] | Lists of all the environments in a organization x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_EnvironmentList.json | +| [organizationListRegionsSample.ts][organizationlistregionssample] | cloud provider regions available for creating Schema Registry clusters. x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_ListRegions.json | +| [organizationListSchemaRegistryClustersSample.ts][organizationlistschemaregistryclusterssample] | Get schema registry clusters x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_ListSchemaRegistryClusters.json | +| [organizationOperationsListSample.ts][organizationoperationslistsample] | List all operations provided by Microsoft.Confluent. x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/OrganizationOperations_List.json | +| [organizationUpdateSample.ts][organizationupdatesample] | Update Organization resource x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_Update.json | +| [validationsValidateOrganizationSample.ts][validationsvalidateorganizationsample] | Organization Validate proxy resource x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Validations_ValidateOrganizations.json | +| [validationsValidateOrganizationV2Sample.ts][validationsvalidateorganizationv2sample] | Organization Validate proxy resource x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Validations_ValidateOrganizationsV2.json | ## Prerequisites @@ -60,33 +73,46 @@ npm run build 4. Run whichever samples you like (note that some samples may require additional setup, see the table above): ```bash -node dist/accessInviteUserSample.js +node dist/accessCreateRoleBindingSample.js ``` Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): ```bash -npx cross-env CONFLUENT_SUBSCRIPTION_ID="" CONFLUENT_RESOURCE_GROUP="" node dist/accessInviteUserSample.js +npx cross-env CONFLUENT_SUBSCRIPTION_ID="" CONFLUENT_RESOURCE_GROUP="" node dist/accessCreateRoleBindingSample.js ``` ## Next Steps Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. +[accesscreaterolebindingsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/confluent/arm-confluent/samples/v3/typescript/src/accessCreateRoleBindingSample.ts +[accessdeleterolebindingsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/confluent/arm-confluent/samples/v3/typescript/src/accessDeleteRoleBindingSample.ts [accessinviteusersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/confluent/arm-confluent/samples/v3/typescript/src/accessInviteUserSample.ts [accesslistclusterssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/confluent/arm-confluent/samples/v3/typescript/src/accessListClustersSample.ts [accesslistenvironmentssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/confluent/arm-confluent/samples/v3/typescript/src/accessListEnvironmentsSample.ts [accesslistinvitationssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/confluent/arm-confluent/samples/v3/typescript/src/accessListInvitationsSample.ts +[accesslistrolebindingnamelistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/confluent/arm-confluent/samples/v3/typescript/src/accessListRoleBindingNameListSample.ts [accesslistrolebindingssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/confluent/arm-confluent/samples/v3/typescript/src/accessListRoleBindingsSample.ts [accesslistserviceaccountssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/confluent/arm-confluent/samples/v3/typescript/src/accessListServiceAccountsSample.ts [accesslistuserssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/confluent/arm-confluent/samples/v3/typescript/src/accessListUsersSample.ts [marketplaceagreementscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/confluent/arm-confluent/samples/v3/typescript/src/marketplaceAgreementsCreateSample.ts [marketplaceagreementslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/confluent/arm-confluent/samples/v3/typescript/src/marketplaceAgreementsListSample.ts +[organizationcreateapikeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationCreateApiKeySample.ts [organizationcreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationCreateSample.ts +[organizationdeleteclusterapikeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationDeleteClusterApiKeySample.ts [organizationdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationDeleteSample.ts +[organizationgetclusterapikeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationGetClusterApiKeySample.ts +[organizationgetclusterbyidsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationGetClusterByIdSample.ts +[organizationgetenvironmentbyidsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationGetEnvironmentByIdSample.ts [organizationgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationGetSample.ts +[organizationgetschemaregistryclusterbyidsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationGetSchemaRegistryClusterByIdSample.ts [organizationlistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationListByResourceGroupSample.ts [organizationlistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationListBySubscriptionSample.ts +[organizationlistclusterssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationListClustersSample.ts +[organizationlistenvironmentssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationListEnvironmentsSample.ts +[organizationlistregionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationListRegionsSample.ts +[organizationlistschemaregistryclusterssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationListSchemaRegistryClustersSample.ts [organizationoperationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationOperationsListSample.ts [organizationupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationUpdateSample.ts [validationsvalidateorganizationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/confluent/arm-confluent/samples/v3/typescript/src/validationsValidateOrganizationSample.ts diff --git a/sdk/confluent/arm-confluent/samples/v3/typescript/src/accessCreateRoleBindingSample.ts b/sdk/confluent/arm-confluent/samples/v3/typescript/src/accessCreateRoleBindingSample.ts new file mode 100644 index 000000000000..197475b1f20c --- /dev/null +++ b/sdk/confluent/arm-confluent/samples/v3/typescript/src/accessCreateRoleBindingSample.ts @@ -0,0 +1,53 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + AccessCreateRoleBindingRequestModel, + ConfluentManagementClient, +} from "@azure/arm-confluent"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Organization role bindings + * + * @summary Organization role bindings + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_CreateRoleBinding.json + */ +async function accessCreateRoleBinding() { + const subscriptionId = + process.env["CONFLUENT_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONFLUENT_RESOURCE_GROUP"] || "myResourceGroup"; + const organizationName = "myOrganization"; + const body: AccessCreateRoleBindingRequestModel = { + crnPattern: + "crn://confluent.cloud/organization=1111aaaa-11aa-11aa-11aa-111111aaaaaa/environment=env-aaa1111/cloud-cluster=lkc-1111aaa", + principal: "User:u-111aaa", + roleName: "CloudClusterAdmin", + }; + const credential = new DefaultAzureCredential(); + const client = new ConfluentManagementClient(credential, subscriptionId); + const result = await client.access.createRoleBinding( + resourceGroupName, + organizationName, + body, + ); + console.log(result); +} + +async function main() { + accessCreateRoleBinding(); +} + +main().catch(console.error); diff --git a/sdk/confluent/arm-confluent/samples/v3/typescript/src/accessDeleteRoleBindingSample.ts b/sdk/confluent/arm-confluent/samples/v3/typescript/src/accessDeleteRoleBindingSample.ts new file mode 100644 index 000000000000..da5970a6c279 --- /dev/null +++ b/sdk/confluent/arm-confluent/samples/v3/typescript/src/accessDeleteRoleBindingSample.ts @@ -0,0 +1,45 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ConfluentManagementClient } from "@azure/arm-confluent"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Organization role bindings + * + * @summary Organization role bindings + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_DeleteRoleBinding.json + */ +async function accessDeleteRoleBinding() { + const subscriptionId = + process.env["CONFLUENT_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONFLUENT_RESOURCE_GROUP"] || "myResourceGroup"; + const organizationName = "myOrganization"; + const roleBindingId = "dlz-f3a90de"; + const credential = new DefaultAzureCredential(); + const client = new ConfluentManagementClient(credential, subscriptionId); + const result = await client.access.deleteRoleBinding( + resourceGroupName, + organizationName, + roleBindingId, + ); + console.log(result); +} + +async function main() { + accessDeleteRoleBinding(); +} + +main().catch(console.error); diff --git a/sdk/confluent/arm-confluent/samples/v3/typescript/src/accessInviteUserSample.ts b/sdk/confluent/arm-confluent/samples/v3/typescript/src/accessInviteUserSample.ts index 5634690a3ae1..c917ce28a1f1 100644 --- a/sdk/confluent/arm-confluent/samples/v3/typescript/src/accessInviteUserSample.ts +++ b/sdk/confluent/arm-confluent/samples/v3/typescript/src/accessInviteUserSample.ts @@ -10,7 +10,7 @@ // Licensed under the MIT License. import { AccessInviteUserAccountModel, - ConfluentManagementClient + ConfluentManagementClient, } from "@azure/arm-confluent"; import { DefaultAzureCredential } from "@azure/identity"; import * as dotenv from "dotenv"; @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Invite user to the organization * * @summary Invite user to the organization - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Access_InviteUser.json + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_InviteUser.json */ async function accessInviteUser() { const subscriptionId = @@ -33,15 +33,15 @@ async function accessInviteUser() { const body: AccessInviteUserAccountModel = { invitedUserDetails: { authType: "AUTH_TYPE_SSO", - invitedEmail: "user2@onmicrosoft.com" - } + invitedEmail: "user2@onmicrosoft.com", + }, }; const credential = new DefaultAzureCredential(); const client = new ConfluentManagementClient(credential, subscriptionId); const result = await client.access.inviteUser( resourceGroupName, organizationName, - body + body, ); console.log(result); } diff --git a/sdk/confluent/arm-confluent/samples/v3/typescript/src/accessListClustersSample.ts b/sdk/confluent/arm-confluent/samples/v3/typescript/src/accessListClustersSample.ts index 900e9a46d0e6..1b24afebc699 100644 --- a/sdk/confluent/arm-confluent/samples/v3/typescript/src/accessListClustersSample.ts +++ b/sdk/confluent/arm-confluent/samples/v3/typescript/src/accessListClustersSample.ts @@ -10,7 +10,7 @@ // Licensed under the MIT License. import { ListAccessRequestModel, - ConfluentManagementClient + ConfluentManagementClient, } from "@azure/arm-confluent"; import { DefaultAzureCredential } from "@azure/identity"; import * as dotenv from "dotenv"; @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Cluster details * * @summary Cluster details - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Access_ClusterList.json + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_ClusterList.json */ async function accessClusterList() { const subscriptionId = @@ -31,14 +31,14 @@ async function accessClusterList() { process.env["CONFLUENT_RESOURCE_GROUP"] || "myResourceGroup"; const organizationName = "myOrganization"; const body: ListAccessRequestModel = { - searchFilters: { pageSize: "10", pageToken: "asc4fts4ft" } + searchFilters: { pageSize: "10", pageToken: "asc4fts4ft" }, }; const credential = new DefaultAzureCredential(); const client = new ConfluentManagementClient(credential, subscriptionId); const result = await client.access.listClusters( resourceGroupName, organizationName, - body + body, ); console.log(result); } diff --git a/sdk/confluent/arm-confluent/samples/v3/typescript/src/accessListEnvironmentsSample.ts b/sdk/confluent/arm-confluent/samples/v3/typescript/src/accessListEnvironmentsSample.ts index 8b2a89bd89a3..897b1c50cf67 100644 --- a/sdk/confluent/arm-confluent/samples/v3/typescript/src/accessListEnvironmentsSample.ts +++ b/sdk/confluent/arm-confluent/samples/v3/typescript/src/accessListEnvironmentsSample.ts @@ -10,7 +10,7 @@ // Licensed under the MIT License. import { ListAccessRequestModel, - ConfluentManagementClient + ConfluentManagementClient, } from "@azure/arm-confluent"; import { DefaultAzureCredential } from "@azure/identity"; import * as dotenv from "dotenv"; @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Environment list of an organization * * @summary Environment list of an organization - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Access_EnvironmentList.json + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_EnvironmentList.json */ async function accessEnvironmentList() { const subscriptionId = @@ -31,14 +31,14 @@ async function accessEnvironmentList() { process.env["CONFLUENT_RESOURCE_GROUP"] || "myResourceGroup"; const organizationName = "myOrganization"; const body: ListAccessRequestModel = { - searchFilters: { pageSize: "10", pageToken: "asc4fts4ft" } + searchFilters: { pageSize: "10", pageToken: "asc4fts4ft" }, }; const credential = new DefaultAzureCredential(); const client = new ConfluentManagementClient(credential, subscriptionId); const result = await client.access.listEnvironments( resourceGroupName, organizationName, - body + body, ); console.log(result); } diff --git a/sdk/confluent/arm-confluent/samples/v3/typescript/src/accessListInvitationsSample.ts b/sdk/confluent/arm-confluent/samples/v3/typescript/src/accessListInvitationsSample.ts index b3a8ad0b4364..348bbc4315b7 100644 --- a/sdk/confluent/arm-confluent/samples/v3/typescript/src/accessListInvitationsSample.ts +++ b/sdk/confluent/arm-confluent/samples/v3/typescript/src/accessListInvitationsSample.ts @@ -10,7 +10,7 @@ // Licensed under the MIT License. import { ListAccessRequestModel, - ConfluentManagementClient + ConfluentManagementClient, } from "@azure/arm-confluent"; import { DefaultAzureCredential } from "@azure/identity"; import * as dotenv from "dotenv"; @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Organization accounts invitation details * * @summary Organization accounts invitation details - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Access_InvitationsList.json + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_InvitationsList.json */ async function accessInvitationsList() { const subscriptionId = @@ -34,15 +34,15 @@ async function accessInvitationsList() { searchFilters: { pageSize: "10", pageToken: "asc4fts4ft", - status: "INVITE_STATUS_SENT" - } + status: "INVITE_STATUS_SENT", + }, }; const credential = new DefaultAzureCredential(); const client = new ConfluentManagementClient(credential, subscriptionId); const result = await client.access.listInvitations( resourceGroupName, organizationName, - body + body, ); console.log(result); } diff --git a/sdk/confluent/arm-confluent/samples/v3/typescript/src/accessListRoleBindingNameListSample.ts b/sdk/confluent/arm-confluent/samples/v3/typescript/src/accessListRoleBindingNameListSample.ts new file mode 100644 index 000000000000..5a5f945a2ca3 --- /dev/null +++ b/sdk/confluent/arm-confluent/samples/v3/typescript/src/accessListRoleBindingNameListSample.ts @@ -0,0 +1,55 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + ListAccessRequestModel, + ConfluentManagementClient, +} from "@azure/arm-confluent"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Organization role bindings + * + * @summary Organization role bindings + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_RoleBindingNameList.json + */ +async function accessRoleBindingNameList() { + const subscriptionId = + process.env["CONFLUENT_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONFLUENT_RESOURCE_GROUP"] || "myResourceGroup"; + const organizationName = "myOrganization"; + const body: ListAccessRequestModel = { + searchFilters: { + crnPattern: + "crn://confluent.cloud/organization=1aa7de07-298e-479c-8f2f-16ac91fd8e76", + namespace: + "public,dataplane,networking,identity,datagovernance,connect,streamcatalog,pipelines,ksql", + }, + }; + const credential = new DefaultAzureCredential(); + const client = new ConfluentManagementClient(credential, subscriptionId); + const result = await client.access.listRoleBindingNameList( + resourceGroupName, + organizationName, + body, + ); + console.log(result); +} + +async function main() { + accessRoleBindingNameList(); +} + +main().catch(console.error); diff --git a/sdk/confluent/arm-confluent/samples/v3/typescript/src/accessListRoleBindingsSample.ts b/sdk/confluent/arm-confluent/samples/v3/typescript/src/accessListRoleBindingsSample.ts index 4cd5da44d1a5..ca28e87e9a1f 100644 --- a/sdk/confluent/arm-confluent/samples/v3/typescript/src/accessListRoleBindingsSample.ts +++ b/sdk/confluent/arm-confluent/samples/v3/typescript/src/accessListRoleBindingsSample.ts @@ -10,7 +10,7 @@ // Licensed under the MIT License. import { ListAccessRequestModel, - ConfluentManagementClient + ConfluentManagementClient, } from "@azure/arm-confluent"; import { DefaultAzureCredential } from "@azure/identity"; import * as dotenv from "dotenv"; @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Organization role bindings * * @summary Organization role bindings - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Access_RoleBindingList.json + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_RoleBindingList.json */ async function accessRoleBindingList() { const subscriptionId = @@ -31,14 +31,14 @@ async function accessRoleBindingList() { process.env["CONFLUENT_RESOURCE_GROUP"] || "myResourceGroup"; const organizationName = "myOrganization"; const body: ListAccessRequestModel = { - searchFilters: { pageSize: "10", pageToken: "asc4fts4ft" } + searchFilters: { pageSize: "10", pageToken: "asc4fts4ft" }, }; const credential = new DefaultAzureCredential(); const client = new ConfluentManagementClient(credential, subscriptionId); const result = await client.access.listRoleBindings( resourceGroupName, organizationName, - body + body, ); console.log(result); } diff --git a/sdk/confluent/arm-confluent/samples/v3/typescript/src/accessListServiceAccountsSample.ts b/sdk/confluent/arm-confluent/samples/v3/typescript/src/accessListServiceAccountsSample.ts index 4b5ffb8ea3d6..29d86e806bb4 100644 --- a/sdk/confluent/arm-confluent/samples/v3/typescript/src/accessListServiceAccountsSample.ts +++ b/sdk/confluent/arm-confluent/samples/v3/typescript/src/accessListServiceAccountsSample.ts @@ -10,7 +10,7 @@ // Licensed under the MIT License. import { ListAccessRequestModel, - ConfluentManagementClient + ConfluentManagementClient, } from "@azure/arm-confluent"; import { DefaultAzureCredential } from "@azure/identity"; import * as dotenv from "dotenv"; @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Organization service accounts details * * @summary Organization service accounts details - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Access_ServiceAccountsList.json + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_ServiceAccountsList.json */ async function accessServiceAccountsList() { const subscriptionId = @@ -31,14 +31,14 @@ async function accessServiceAccountsList() { process.env["CONFLUENT_RESOURCE_GROUP"] || "myResourceGroup"; const organizationName = "myOrganization"; const body: ListAccessRequestModel = { - searchFilters: { pageSize: "10", pageToken: "asc4fts4ft" } + searchFilters: { pageSize: "10", pageToken: "asc4fts4ft" }, }; const credential = new DefaultAzureCredential(); const client = new ConfluentManagementClient(credential, subscriptionId); const result = await client.access.listServiceAccounts( resourceGroupName, organizationName, - body + body, ); console.log(result); } diff --git a/sdk/confluent/arm-confluent/samples/v3/typescript/src/accessListUsersSample.ts b/sdk/confluent/arm-confluent/samples/v3/typescript/src/accessListUsersSample.ts index cf037a2c1b51..43d6badc7966 100644 --- a/sdk/confluent/arm-confluent/samples/v3/typescript/src/accessListUsersSample.ts +++ b/sdk/confluent/arm-confluent/samples/v3/typescript/src/accessListUsersSample.ts @@ -10,7 +10,7 @@ // Licensed under the MIT License. import { ListAccessRequestModel, - ConfluentManagementClient + ConfluentManagementClient, } from "@azure/arm-confluent"; import { DefaultAzureCredential } from "@azure/identity"; import * as dotenv from "dotenv"; @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Organization users details * * @summary Organization users details - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Access_UsersList.json + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_UsersList.json */ async function accessUsersList() { const subscriptionId = @@ -31,14 +31,14 @@ async function accessUsersList() { process.env["CONFLUENT_RESOURCE_GROUP"] || "myResourceGroup"; const organizationName = "myOrganization"; const body: ListAccessRequestModel = { - searchFilters: { pageSize: "10", pageToken: "asc4fts4ft" } + searchFilters: { pageSize: "10", pageToken: "asc4fts4ft" }, }; const credential = new DefaultAzureCredential(); const client = new ConfluentManagementClient(credential, subscriptionId); const result = await client.access.listUsers( resourceGroupName, organizationName, - body + body, ); console.log(result); } diff --git a/sdk/confluent/arm-confluent/samples/v3/typescript/src/marketplaceAgreementsCreateSample.ts b/sdk/confluent/arm-confluent/samples/v3/typescript/src/marketplaceAgreementsCreateSample.ts index 134427e70114..abc5964bfb3f 100644 --- a/sdk/confluent/arm-confluent/samples/v3/typescript/src/marketplaceAgreementsCreateSample.ts +++ b/sdk/confluent/arm-confluent/samples/v3/typescript/src/marketplaceAgreementsCreateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Create Confluent Marketplace agreement in the subscription. * * @summary Create Confluent Marketplace agreement in the subscription. - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/MarketplaceAgreements_Create.json + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/MarketplaceAgreements_Create.json */ async function marketplaceAgreementsCreate() { const subscriptionId = diff --git a/sdk/confluent/arm-confluent/samples/v3/typescript/src/marketplaceAgreementsListSample.ts b/sdk/confluent/arm-confluent/samples/v3/typescript/src/marketplaceAgreementsListSample.ts index 0e601dd4df6a..fadf5d5fc293 100644 --- a/sdk/confluent/arm-confluent/samples/v3/typescript/src/marketplaceAgreementsListSample.ts +++ b/sdk/confluent/arm-confluent/samples/v3/typescript/src/marketplaceAgreementsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List Confluent marketplace agreements in the subscription. * * @summary List Confluent marketplace agreements in the subscription. - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/MarketplaceAgreements_List.json + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/MarketplaceAgreements_List.json */ async function marketplaceAgreementsList() { const subscriptionId = diff --git a/sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationCreateApiKeySample.ts b/sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationCreateApiKeySample.ts new file mode 100644 index 000000000000..23904416bdf3 --- /dev/null +++ b/sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationCreateApiKeySample.ts @@ -0,0 +1,55 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + CreateAPIKeyModel, + ConfluentManagementClient, +} from "@azure/arm-confluent"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Creates API key for a schema registry Cluster ID or Kafka Cluster ID under a environment + * + * @summary Creates API key for a schema registry Cluster ID or Kafka Cluster ID under a environment + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_CreateClusterAPIKey.json + */ +async function organizationCreateApiKey() { + const subscriptionId = + process.env["CONFLUENT_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONFLUENT_RESOURCE_GROUP"] || "myResourceGroup"; + const organizationName = "myOrganization"; + const environmentId = "env-12132"; + const clusterId = "clusterId-123"; + const body: CreateAPIKeyModel = { + name: "CI kafka access key", + description: "This API key provides kafka access to cluster x", + }; + const credential = new DefaultAzureCredential(); + const client = new ConfluentManagementClient(credential, subscriptionId); + const result = await client.organization.createAPIKey( + resourceGroupName, + organizationName, + environmentId, + clusterId, + body, + ); + console.log(result); +} + +async function main() { + organizationCreateApiKey(); +} + +main().catch(console.error); diff --git a/sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationCreateSample.ts b/sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationCreateSample.ts index 08fbb77de91f..5c9487ffed2b 100644 --- a/sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationCreateSample.ts +++ b/sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationCreateSample.ts @@ -11,7 +11,7 @@ import { OrganizationResource, OrganizationCreateOptionalParams, - ConfluentManagementClient + ConfluentManagementClient, } from "@azure/arm-confluent"; import { DefaultAzureCredential } from "@azure/identity"; import * as dotenv from "dotenv"; @@ -22,7 +22,7 @@ dotenv.config(); * This sample demonstrates how to Create Organization resource * * @summary Create Organization resource - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Organization_Create.json + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_Create.json */ async function organizationCreate() { const subscriptionId = @@ -41,7 +41,7 @@ async function organizationCreate() { privateOfferId: "string", privateOfferIds: ["string"], publisherId: "string", - termUnit: "string" + termUnit: "string", }, tags: { environment: "Dev" }, userDetail: { @@ -49,8 +49,8 @@ async function organizationCreate() { emailAddress: "contoso@microsoft.com", firstName: "string", lastName: "string", - userPrincipalName: "contoso@microsoft.com" - } + userPrincipalName: "contoso@microsoft.com", + }, }; const options: OrganizationCreateOptionalParams = { body }; const credential = new DefaultAzureCredential(); @@ -58,7 +58,7 @@ async function organizationCreate() { const result = await client.organization.beginCreateAndWait( resourceGroupName, organizationName, - options + options, ); console.log(result); } diff --git a/sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationDeleteClusterApiKeySample.ts b/sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationDeleteClusterApiKeySample.ts new file mode 100644 index 000000000000..0bdd114a48cd --- /dev/null +++ b/sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationDeleteClusterApiKeySample.ts @@ -0,0 +1,45 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ConfluentManagementClient } from "@azure/arm-confluent"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Deletes API key of a kafka or schema registry cluster + * + * @summary Deletes API key of a kafka or schema registry cluster + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_DeleteClusterAPIKey.json + */ +async function organizationDeleteClusterApiKey() { + const subscriptionId = + process.env["CONFLUENT_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONFLUENT_RESOURCE_GROUP"] || "myResourceGroup"; + const organizationName = "myOrganization"; + const apiKeyId = "ZFZ6SZZZWGYBEIFB"; + const credential = new DefaultAzureCredential(); + const client = new ConfluentManagementClient(credential, subscriptionId); + const result = await client.organization.deleteClusterAPIKey( + resourceGroupName, + organizationName, + apiKeyId, + ); + console.log(result); +} + +async function main() { + organizationDeleteClusterApiKey(); +} + +main().catch(console.error); diff --git a/sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationDeleteSample.ts b/sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationDeleteSample.ts index 7c4a5edbdd6b..df129918b09f 100644 --- a/sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationDeleteSample.ts +++ b/sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Delete Organization resource * * @summary Delete Organization resource - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Organization_Delete.json + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_Delete.json */ async function confluentDelete() { const subscriptionId = @@ -31,7 +31,7 @@ async function confluentDelete() { const client = new ConfluentManagementClient(credential, subscriptionId); const result = await client.organization.beginDeleteAndWait( resourceGroupName, - organizationName + organizationName, ); console.log(result); } diff --git a/sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationGetClusterApiKeySample.ts b/sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationGetClusterApiKeySample.ts new file mode 100644 index 000000000000..a3ce47be0ad6 --- /dev/null +++ b/sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationGetClusterApiKeySample.ts @@ -0,0 +1,45 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ConfluentManagementClient } from "@azure/arm-confluent"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Get API key details of a kafka or schema registry cluster + * + * @summary Get API key details of a kafka or schema registry cluster + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_GetClusterAPIKey.json + */ +async function organizationGetClusterApiKey() { + const subscriptionId = + process.env["CONFLUENT_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONFLUENT_RESOURCE_GROUP"] || "myResourceGroup"; + const organizationName = "myOrganization"; + const apiKeyId = "apiKeyId-123"; + const credential = new DefaultAzureCredential(); + const client = new ConfluentManagementClient(credential, subscriptionId); + const result = await client.organization.getClusterAPIKey( + resourceGroupName, + organizationName, + apiKeyId, + ); + console.log(result); +} + +async function main() { + organizationGetClusterApiKey(); +} + +main().catch(console.error); diff --git a/sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationGetClusterByIdSample.ts b/sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationGetClusterByIdSample.ts new file mode 100644 index 000000000000..0a9a7d91fc71 --- /dev/null +++ b/sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationGetClusterByIdSample.ts @@ -0,0 +1,47 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ConfluentManagementClient } from "@azure/arm-confluent"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Get cluster by Id + * + * @summary Get cluster by Id + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_GetClusterById.json + */ +async function organizationGetClusterById() { + const subscriptionId = + process.env["CONFLUENT_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONFLUENT_RESOURCE_GROUP"] || "myResourceGroup"; + const organizationName = "myOrganization"; + const environmentId = "env-12132"; + const clusterId = "dlz-f3a90de"; + const credential = new DefaultAzureCredential(); + const client = new ConfluentManagementClient(credential, subscriptionId); + const result = await client.organization.getClusterById( + resourceGroupName, + organizationName, + environmentId, + clusterId, + ); + console.log(result); +} + +async function main() { + organizationGetClusterById(); +} + +main().catch(console.error); diff --git a/sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationGetEnvironmentByIdSample.ts b/sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationGetEnvironmentByIdSample.ts new file mode 100644 index 000000000000..459f2b029aed --- /dev/null +++ b/sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationGetEnvironmentByIdSample.ts @@ -0,0 +1,45 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ConfluentManagementClient } from "@azure/arm-confluent"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Get Environment details by environment Id + * + * @summary Get Environment details by environment Id + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_GetEnvironmentById.json + */ +async function organizationGetEnvironmentById() { + const subscriptionId = + process.env["CONFLUENT_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONFLUENT_RESOURCE_GROUP"] || "myResourceGroup"; + const organizationName = "myOrganization"; + const environmentId = "dlz-f3a90de"; + const credential = new DefaultAzureCredential(); + const client = new ConfluentManagementClient(credential, subscriptionId); + const result = await client.organization.getEnvironmentById( + resourceGroupName, + organizationName, + environmentId, + ); + console.log(result); +} + +async function main() { + organizationGetEnvironmentById(); +} + +main().catch(console.error); diff --git a/sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationGetSample.ts b/sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationGetSample.ts index 94b488337c74..9ba4cb107618 100644 --- a/sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationGetSample.ts +++ b/sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get the properties of a specific Organization resource. * * @summary Get the properties of a specific Organization resource. - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Organization_Get.json + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_Get.json */ async function organizationGet() { const subscriptionId = @@ -31,7 +31,7 @@ async function organizationGet() { const client = new ConfluentManagementClient(credential, subscriptionId); const result = await client.organization.get( resourceGroupName, - organizationName + organizationName, ); console.log(result); } diff --git a/sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationGetSchemaRegistryClusterByIdSample.ts b/sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationGetSchemaRegistryClusterByIdSample.ts new file mode 100644 index 000000000000..1bcdb5a65be4 --- /dev/null +++ b/sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationGetSchemaRegistryClusterByIdSample.ts @@ -0,0 +1,47 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ConfluentManagementClient } from "@azure/arm-confluent"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Get schema registry cluster by Id + * + * @summary Get schema registry cluster by Id + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_GetSchemaRegistryClusterById.json + */ +async function organizationGetSchemaRegistryClusterById() { + const subscriptionId = + process.env["CONFLUENT_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONFLUENT_RESOURCE_GROUP"] || "myResourceGroup"; + const organizationName = "myOrganization"; + const environmentId = "env-stgcczjp2j3"; + const clusterId = "lsrc-stgczkq22z"; + const credential = new DefaultAzureCredential(); + const client = new ConfluentManagementClient(credential, subscriptionId); + const result = await client.organization.getSchemaRegistryClusterById( + resourceGroupName, + organizationName, + environmentId, + clusterId, + ); + console.log(result); +} + +async function main() { + organizationGetSchemaRegistryClusterById(); +} + +main().catch(console.error); diff --git a/sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationListByResourceGroupSample.ts b/sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationListByResourceGroupSample.ts index dd3152967243..2b6518a9d3af 100644 --- a/sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationListByResourceGroupSample.ts +++ b/sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List all Organizations under the specified resource group. * * @summary List all Organizations under the specified resource group. - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Organization_ListByResourceGroup.json + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_ListByResourceGroup.json */ async function organizationListByResourceGroup() { const subscriptionId = @@ -30,7 +30,7 @@ async function organizationListByResourceGroup() { const client = new ConfluentManagementClient(credential, subscriptionId); const resArray = new Array(); for await (let item of client.organization.listByResourceGroup( - resourceGroupName + resourceGroupName, )) { resArray.push(item); } diff --git a/sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationListBySubscriptionSample.ts b/sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationListBySubscriptionSample.ts index d74e0b6fd824..3b3bcf8cdc53 100644 --- a/sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationListBySubscriptionSample.ts +++ b/sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationListBySubscriptionSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List all organizations under the specified subscription. * * @summary List all organizations under the specified subscription. - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Organization_ListBySubscription.json + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_ListBySubscription.json */ async function organizationListBySubscription() { const subscriptionId = diff --git a/sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationListClustersSample.ts b/sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationListClustersSample.ts new file mode 100644 index 000000000000..1ce1b5ff4c96 --- /dev/null +++ b/sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationListClustersSample.ts @@ -0,0 +1,54 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + OrganizationListClustersOptionalParams, + ConfluentManagementClient, +} from "@azure/arm-confluent"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Lists of all the clusters in a environment + * + * @summary Lists of all the clusters in a environment + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_ClusterList.json + */ +async function organizationListClusters() { + const subscriptionId = + process.env["CONFLUENT_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONFLUENT_RESOURCE_GROUP"] || "myResourceGroup"; + const organizationName = "myOrganization"; + const environmentId = "env-12132"; + const pageSize = 10; + const options: OrganizationListClustersOptionalParams = { pageSize }; + const credential = new DefaultAzureCredential(); + const client = new ConfluentManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.organization.listClusters( + resourceGroupName, + organizationName, + environmentId, + options, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + organizationListClusters(); +} + +main().catch(console.error); diff --git a/sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationListEnvironmentsSample.ts b/sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationListEnvironmentsSample.ts new file mode 100644 index 000000000000..1c7712413e91 --- /dev/null +++ b/sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationListEnvironmentsSample.ts @@ -0,0 +1,52 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + OrganizationListEnvironmentsOptionalParams, + ConfluentManagementClient, +} from "@azure/arm-confluent"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Lists of all the environments in a organization + * + * @summary Lists of all the environments in a organization + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_EnvironmentList.json + */ +async function organizationListEnvironments() { + const subscriptionId = + process.env["CONFLUENT_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONFLUENT_RESOURCE_GROUP"] || "myResourceGroup"; + const organizationName = "myOrganization"; + const pageSize = 10; + const options: OrganizationListEnvironmentsOptionalParams = { pageSize }; + const credential = new DefaultAzureCredential(); + const client = new ConfluentManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.organization.listEnvironments( + resourceGroupName, + organizationName, + options, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + organizationListEnvironments(); +} + +main().catch(console.error); diff --git a/sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationListRegionsSample.ts b/sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationListRegionsSample.ts new file mode 100644 index 000000000000..60011490dd32 --- /dev/null +++ b/sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationListRegionsSample.ts @@ -0,0 +1,54 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + ListAccessRequestModel, + ConfluentManagementClient, +} from "@azure/arm-confluent"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to cloud provider regions available for creating Schema Registry clusters. + * + * @summary cloud provider regions available for creating Schema Registry clusters. + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_ListRegions.json + */ +async function organizationListRegions() { + const subscriptionId = + process.env["CONFLUENT_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONFLUENT_RESOURCE_GROUP"] || "myResourceGroup"; + const organizationName = "myOrganization"; + const body: ListAccessRequestModel = { + searchFilters: { + cloud: "azure", + packages: "ADVANCED,ESSENTIALS", + region: "eastus", + }, + }; + const credential = new DefaultAzureCredential(); + const client = new ConfluentManagementClient(credential, subscriptionId); + const result = await client.organization.listRegions( + resourceGroupName, + organizationName, + body, + ); + console.log(result); +} + +async function main() { + organizationListRegions(); +} + +main().catch(console.error); diff --git a/sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationListSchemaRegistryClustersSample.ts b/sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationListSchemaRegistryClustersSample.ts new file mode 100644 index 000000000000..41085249e5d6 --- /dev/null +++ b/sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationListSchemaRegistryClustersSample.ts @@ -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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ConfluentManagementClient } from "@azure/arm-confluent"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Get schema registry clusters + * + * @summary Get schema registry clusters + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_ListSchemaRegistryClusters.json + */ +async function organizationListSchemaRegistryClusters() { + const subscriptionId = + process.env["CONFLUENT_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONFLUENT_RESOURCE_GROUP"] || "myResourceGroup"; + const organizationName = "myOrganization"; + const environmentId = "env-stgcczjp2j3"; + const credential = new DefaultAzureCredential(); + const client = new ConfluentManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.organization.listSchemaRegistryClusters( + resourceGroupName, + organizationName, + environmentId, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + organizationListSchemaRegistryClusters(); +} + +main().catch(console.error); diff --git a/sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationOperationsListSample.ts b/sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationOperationsListSample.ts index 19a195322d40..2f956546ac1d 100644 --- a/sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationOperationsListSample.ts +++ b/sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationOperationsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List all operations provided by Microsoft.Confluent. * * @summary List all operations provided by Microsoft.Confluent. - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/OrganizationOperations_List.json + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/OrganizationOperations_List.json */ async function organizationOperationsList() { const credential = new DefaultAzureCredential(); diff --git a/sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationUpdateSample.ts b/sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationUpdateSample.ts index eb9f194ed417..c9aef3ca73cb 100644 --- a/sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationUpdateSample.ts +++ b/sdk/confluent/arm-confluent/samples/v3/typescript/src/organizationUpdateSample.ts @@ -11,7 +11,7 @@ import { OrganizationResourceUpdate, OrganizationUpdateOptionalParams, - ConfluentManagementClient + ConfluentManagementClient, } from "@azure/arm-confluent"; import { DefaultAzureCredential } from "@azure/identity"; import * as dotenv from "dotenv"; @@ -22,7 +22,7 @@ dotenv.config(); * This sample demonstrates how to Update Organization resource * * @summary Update Organization resource - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Organization_Update.json + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_Update.json */ async function confluentUpdate() { const subscriptionId = @@ -32,7 +32,7 @@ async function confluentUpdate() { process.env["CONFLUENT_RESOURCE_GROUP"] || "myResourceGroup"; const organizationName = "myOrganization"; const body: OrganizationResourceUpdate = { - tags: { client: "dev-client", env: "dev" } + tags: { client: "dev-client", env: "dev" }, }; const options: OrganizationUpdateOptionalParams = { body }; const credential = new DefaultAzureCredential(); @@ -40,7 +40,7 @@ async function confluentUpdate() { const result = await client.organization.update( resourceGroupName, organizationName, - options + options, ); console.log(result); } diff --git a/sdk/confluent/arm-confluent/samples/v3/typescript/src/validationsValidateOrganizationSample.ts b/sdk/confluent/arm-confluent/samples/v3/typescript/src/validationsValidateOrganizationSample.ts index 589cf820839a..a0e676cae85d 100644 --- a/sdk/confluent/arm-confluent/samples/v3/typescript/src/validationsValidateOrganizationSample.ts +++ b/sdk/confluent/arm-confluent/samples/v3/typescript/src/validationsValidateOrganizationSample.ts @@ -10,7 +10,7 @@ // Licensed under the MIT License. import { OrganizationResource, - ConfluentManagementClient + ConfluentManagementClient, } from "@azure/arm-confluent"; import { DefaultAzureCredential } from "@azure/identity"; import * as dotenv from "dotenv"; @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Organization Validate proxy resource * * @summary Organization Validate proxy resource - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Validations_ValidateOrganizations.json + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Validations_ValidateOrganizations.json */ async function validationsValidateOrganizations() { const subscriptionId = @@ -39,7 +39,7 @@ async function validationsValidateOrganizations() { privateOfferId: "string", privateOfferIds: ["string"], publisherId: "string", - termUnit: "string" + termUnit: "string", }, tags: { environment: "Dev" }, userDetail: { @@ -47,15 +47,15 @@ async function validationsValidateOrganizations() { emailAddress: "abc@microsoft.com", firstName: "string", lastName: "string", - userPrincipalName: "abc@microsoft.com" - } + userPrincipalName: "abc@microsoft.com", + }, }; const credential = new DefaultAzureCredential(); const client = new ConfluentManagementClient(credential, subscriptionId); const result = await client.validations.validateOrganization( resourceGroupName, organizationName, - body + body, ); console.log(result); } diff --git a/sdk/confluent/arm-confluent/samples/v3/typescript/src/validationsValidateOrganizationV2Sample.ts b/sdk/confluent/arm-confluent/samples/v3/typescript/src/validationsValidateOrganizationV2Sample.ts index a9d6c32e6bda..017ceb059578 100644 --- a/sdk/confluent/arm-confluent/samples/v3/typescript/src/validationsValidateOrganizationV2Sample.ts +++ b/sdk/confluent/arm-confluent/samples/v3/typescript/src/validationsValidateOrganizationV2Sample.ts @@ -10,7 +10,7 @@ // Licensed under the MIT License. import { OrganizationResource, - ConfluentManagementClient + ConfluentManagementClient, } from "@azure/arm-confluent"; import { DefaultAzureCredential } from "@azure/identity"; import * as dotenv from "dotenv"; @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Organization Validate proxy resource * * @summary Organization Validate proxy resource - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Validations_ValidateOrganizationsV2.json + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Validations_ValidateOrganizationsV2.json */ async function validationsValidateOrganizations() { const subscriptionId = @@ -39,7 +39,7 @@ async function validationsValidateOrganizations() { privateOfferId: "string", privateOfferIds: ["string"], publisherId: "string", - termUnit: "string" + termUnit: "string", }, tags: { environment: "Dev" }, userDetail: { @@ -47,15 +47,15 @@ async function validationsValidateOrganizations() { emailAddress: "abc@microsoft.com", firstName: "string", lastName: "string", - userPrincipalName: "abc@microsoft.com" - } + userPrincipalName: "abc@microsoft.com", + }, }; const credential = new DefaultAzureCredential(); const client = new ConfluentManagementClient(credential, subscriptionId); const result = await client.validations.validateOrganizationV2( resourceGroupName, organizationName, - body + body, ); console.log(result); } diff --git a/sdk/confluent/arm-confluent/src/confluentManagementClient.ts b/sdk/confluent/arm-confluent/src/confluentManagementClient.ts index 32ac598b7030..09d848fa33ef 100644 --- a/sdk/confluent/arm-confluent/src/confluentManagementClient.ts +++ b/sdk/confluent/arm-confluent/src/confluentManagementClient.ts @@ -11,7 +11,7 @@ import * as coreRestPipeline from "@azure/core-rest-pipeline"; import { PipelineRequest, PipelineResponse, - SendRequest + SendRequest, } from "@azure/core-rest-pipeline"; import * as coreAuth from "@azure/core-auth"; import { @@ -19,14 +19,14 @@ import { OrganizationOperationsImpl, OrganizationImpl, ValidationsImpl, - AccessImpl + AccessImpl, } from "./operations"; import { MarketplaceAgreements, OrganizationOperations, Organization, Validations, - Access + Access, } from "./operationsInterfaces"; import { ConfluentManagementClientOptionalParams } from "./models"; @@ -38,22 +38,22 @@ export class ConfluentManagementClient extends coreClient.ServiceClient { /** * Initializes a new instance of the ConfluentManagementClient class. * @param credentials Subscription credentials which uniquely identify client subscription. - * @param subscriptionId The ID of the target subscription. The value must be an UUID. + * @param subscriptionId Microsoft Azure subscription id * @param options The parameter options */ constructor( credentials: coreAuth.TokenCredential, subscriptionId: string, - options?: ConfluentManagementClientOptionalParams + options?: ConfluentManagementClientOptionalParams, ); constructor( credentials: coreAuth.TokenCredential, - options?: ConfluentManagementClientOptionalParams + options?: ConfluentManagementClientOptionalParams, ); constructor( credentials: coreAuth.TokenCredential, subscriptionIdOrOptions?: ConfluentManagementClientOptionalParams | string, - options?: ConfluentManagementClientOptionalParams + options?: ConfluentManagementClientOptionalParams, ) { if (credentials === undefined) { throw new Error("'credentials' cannot be null"); @@ -73,10 +73,10 @@ export class ConfluentManagementClient extends coreClient.ServiceClient { } const defaults: ConfluentManagementClientOptionalParams = { requestContentType: "application/json; charset=utf-8", - credential: credentials + credential: credentials, }; - const packageDetails = `azsdk-js-arm-confluent/3.0.1`; + const packageDetails = `azsdk-js-arm-confluent/3.1.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -86,20 +86,21 @@ export class ConfluentManagementClient extends coreClient.ServiceClient { ...defaults, ...options, userAgentOptions: { - userAgentPrefix + userAgentPrefix, }, endpoint: - options.endpoint ?? options.baseUri ?? "https://management.azure.com" + options.endpoint ?? options.baseUri ?? "https://management.azure.com", }; super(optionsWithDefaults); let bearerTokenAuthenticationPolicyFound: boolean = false; if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) { - const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies(); + const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = + options.pipeline.getOrderedPolicies(); bearerTokenAuthenticationPolicyFound = pipelinePolicies.some( (pipelinePolicy) => pipelinePolicy.name === - coreRestPipeline.bearerTokenAuthenticationPolicyName + coreRestPipeline.bearerTokenAuthenticationPolicyName, ); } if ( @@ -109,7 +110,7 @@ export class ConfluentManagementClient extends coreClient.ServiceClient { !bearerTokenAuthenticationPolicyFound ) { this.pipeline.removePolicy({ - name: coreRestPipeline.bearerTokenAuthenticationPolicyName + name: coreRestPipeline.bearerTokenAuthenticationPolicyName, }); this.pipeline.addPolicy( coreRestPipeline.bearerTokenAuthenticationPolicy({ @@ -119,9 +120,9 @@ export class ConfluentManagementClient extends coreClient.ServiceClient { `${optionsWithDefaults.endpoint}/.default`, challengeCallbacks: { authorizeRequestOnChallenge: - coreClient.authorizeRequestOnClaimChallenge - } - }) + coreClient.authorizeRequestOnClaimChallenge, + }, + }), ); } // Parameter assignments @@ -129,7 +130,7 @@ export class ConfluentManagementClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2023-08-22"; + this.apiVersion = options.apiVersion || "2024-02-13"; this.marketplaceAgreements = new MarketplaceAgreementsImpl(this); this.organizationOperations = new OrganizationOperationsImpl(this); this.organization = new OrganizationImpl(this); @@ -147,7 +148,7 @@ export class ConfluentManagementClient extends coreClient.ServiceClient { name: "CustomApiVersionPolicy", async sendRequest( request: PipelineRequest, - next: SendRequest + next: SendRequest, ): Promise { const param = request.url.split("?"); if (param.length > 1) { @@ -161,7 +162,7 @@ export class ConfluentManagementClient extends coreClient.ServiceClient { request.url = param[0] + "?" + newParams.join("&"); } return next(request); - } + }, }; this.pipeline.addPolicy(apiVersionPolicy); } diff --git a/sdk/confluent/arm-confluent/src/lroImpl.ts b/sdk/confluent/arm-confluent/src/lroImpl.ts index dd803cd5e28c..b27f5ac7209b 100644 --- a/sdk/confluent/arm-confluent/src/lroImpl.ts +++ b/sdk/confluent/arm-confluent/src/lroImpl.ts @@ -28,15 +28,15 @@ export function createLroSpec(inputs: { sendInitialRequest: () => sendOperationFn(args, spec), sendPollRequest: ( path: string, - options?: { abortSignal?: AbortSignalLike } + options?: { abortSignal?: AbortSignalLike }, ) => { const { requestBody, ...restSpec } = spec; return sendOperationFn(args, { ...restSpec, httpMethod: "GET", path, - abortSignal: options?.abortSignal + abortSignal: options?.abortSignal, }); - } + }, }; } diff --git a/sdk/confluent/arm-confluent/src/models/index.ts b/sdk/confluent/arm-confluent/src/models/index.ts index fd7750cf9700..0e669c7d40af 100644 --- a/sdk/confluent/arm-confluent/src/models/index.ts +++ b/sdk/confluent/arm-confluent/src/models/index.ts @@ -385,17 +385,17 @@ export interface AccessInvitedUserDetails { authType?: string; } -/** List environments success response */ +/** Details of the environments returned on successful response */ export interface AccessListEnvironmentsSuccessResponse { /** Type of response */ kind?: string; - /** Metadata of the list */ + /** Metadata of the environment list */ metadata?: ConfluentListMetadata; - /** Data of the environments list */ + /** Environment list data */ data?: EnvironmentRecord[]; } -/** Record of the environment */ +/** Details about environment name, metadata and environment id of an environment */ export interface EnvironmentRecord { /** Type of environment */ kind?: string; @@ -407,25 +407,25 @@ export interface EnvironmentRecord { displayName?: string; } -/** List cluster success response */ +/** Details of the clusters returned on successful response */ export interface AccessListClusterSuccessResponse { /** Type of response */ kind?: string; /** Metadata of the list */ metadata?: ConfluentListMetadata; - /** Data of the environments list */ + /** List of clusters */ data?: ClusterRecord[]; } -/** Record of the environment */ +/** Details of cluster record */ export interface ClusterRecord { - /** Type of environment */ + /** Type of cluster */ kind?: string; - /** Id of the environment */ + /** Id of the cluster */ id?: string; /** Metadata of the record */ metadata?: MetadataEntity; - /** Display name of the user */ + /** Display name of the cluster */ displayName?: string; /** Specification of the cluster */ spec?: ClusterSpecEntity; @@ -509,21 +509,21 @@ export interface ClusterStatusEntity { cku?: number; } -/** List cluster success response */ +/** Details of the role bindings returned on successful response */ export interface AccessListRoleBindingsSuccessResponse { /** Type of response */ kind?: string; /** Metadata of the list */ metadata?: ConfluentListMetadata; - /** Data of the environments list */ + /** List of role binding */ data?: RoleBindingRecord[]; } -/** Record of the environment */ +/** Details on principal, role name and crn pattern of a role binding */ export interface RoleBindingRecord { /** The type of the resource. */ kind?: string; - /** Id of the role */ + /** Id of the role binding */ id?: string; /** Metadata of the record */ metadata?: MetadataEntity; @@ -535,6 +535,291 @@ export interface RoleBindingRecord { crnPattern?: string; } +/** Create role binding request model */ +export interface AccessCreateRoleBindingRequestModel { + /** 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; +} + +/** Details of the role binding names returned on successful response */ +export interface AccessRoleBindingNameListSuccessResponse { + /** Type of response */ + kind?: string; + /** Metadata of the list */ + metadata?: ConfluentListMetadata; + /** List of role binding names */ + data?: string[]; +} + +/** Result of GET request to list Confluent operations. */ +export interface GetEnvironmentsResponse { + /** List of environments in a confluent organization */ + value?: SCEnvironmentRecord[]; + /** URL to get the next set of environment records if there are any. */ + nextLink?: string; +} + +/** Details about environment name, metadata and environment id of an environment */ +export interface SCEnvironmentRecord { + /** Type of environment */ + kind?: string; + /** Id of the environment */ + id?: string; + /** Display name of the environment */ + name?: string; + /** Metadata of the record */ + metadata?: SCMetadataEntity; +} + +/** Metadata of the data record */ +export interface SCMetadataEntity { + /** Self lookup url */ + self?: string; + /** Resource name of the record */ + resourceName?: string; + /** Created Date Time */ + createdTimestamp?: string; + /** Updated Date time */ + updatedTimestamp?: string; + /** Deleted Date time */ + deletedTimestamp?: string; +} + +/** Result of GET request to list clusters in the environment of a confluent organization */ +export interface ListClustersSuccessResponse { + /** List of clusters in an environment of a confluent organization */ + value?: SCClusterRecord[]; + /** URL to get the next set of cluster records if there are any. */ + nextLink?: string; +} + +/** Details of cluster record */ +export interface SCClusterRecord { + /** Type of cluster */ + kind?: string; + /** Id of the cluster */ + id?: string; + /** Display name of the cluster */ + name?: string; + /** Metadata of the record */ + metadata?: SCMetadataEntity; + /** Specification of the cluster */ + spec?: SCClusterSpecEntity; + /** Specification of the cluster status */ + status?: ClusterStatusEntity; +} + +/** Spec of the cluster record */ +export interface SCClusterSpecEntity { + /** The name of the cluster */ + name?: 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 configuration */ + config?: ClusterConfigEntity; + /** Specification of the cluster environment */ + environment?: SCClusterNetworkEnvironmentEntity; + /** Specification of the cluster network */ + network?: SCClusterNetworkEnvironmentEntity; + /** Specification of the cluster byok */ + byok?: SCClusterByokEntity; +} + +/** The environment or the network to which cluster belongs */ +export interface SCClusterNetworkEnvironmentEntity { + /** 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 SCClusterByokEntity { + /** 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; +} + +/** Result of GET request to list schema registry clusters in the environment of a confluent organization */ +export interface ListSchemaRegistryClustersResponse { + /** List of schema registry clusters in an environment of a confluent organization */ + value?: SchemaRegistryClusterRecord[]; + /** URL to get the next set of schema registry cluster records if there are any. */ + nextLink?: string; +} + +/** Details of schema registry cluster record */ +export interface SchemaRegistryClusterRecord { + /** Kind of the cluster */ + kind?: string; + /** Id of the cluster */ + id?: string; + /** Metadata of the record */ + metadata?: SCMetadataEntity; + /** Specification of the schema registry cluster */ + spec?: SchemaRegistryClusterSpecEntity; + /** Specification of the cluster status */ + status?: SchemaRegistryClusterStatusEntity; +} + +/** Details of schema registry cluster spec */ +export interface SchemaRegistryClusterSpecEntity { + /** Name of the schema registry cluster */ + name?: string; + /** Http endpoint of the cluster */ + httpEndpoint?: string; + /** Type of the cluster package Advanced, essentials */ + package?: string; + /** Region details of the schema registry cluster */ + region?: SchemaRegistryClusterEnvironmentRegionEntity; + /** Environment details of the schema registry cluster */ + environment?: SchemaRegistryClusterEnvironmentRegionEntity; + /** The cloud service provider */ + cloud?: string; +} + +/** The environment associated with this object */ +export interface SchemaRegistryClusterEnvironmentRegionEntity { + /** 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 schema registry cluster record */ +export interface SchemaRegistryClusterStatusEntity { + /** The lifecycle phase of the cluster */ + phase?: string; +} + +/** Result of POST request to list regions supported by confluent */ +export interface ListRegionsSuccessResponse { + /** List of regions supported by confluent */ + data?: RegionRecord[]; +} + +/** Details of region record */ +export interface RegionRecord { + /** Kind of the cluster */ + kind?: string; + /** Id of the cluster */ + id?: string; + /** Metadata of the record */ + metadata?: SCMetadataEntity; + /** Specification of the region */ + spec?: RegionSpecEntity; +} + +/** Region spec details */ +export interface RegionSpecEntity { + /** Display Name of the region */ + name?: string; + /** Cloud provider name */ + cloud?: string; + /** Region name */ + regionName?: string; + packages?: string[]; +} + +/** Create API Key model */ +export interface CreateAPIKeyModel { + /** Name of the API Key */ + name?: string; + /** Description of the API Key */ + description?: string; +} + +/** Details API key */ +export interface APIKeyRecord { + /** Type of api key */ + kind?: string; + /** Id of the api key */ + id?: string; + /** Metadata of the record */ + metadata?: SCMetadataEntity; + /** Specification of the API Key */ + spec?: APIKeySpecEntity; +} + +/** Spec of the API Key record */ +export interface APIKeySpecEntity { + /** The description of the API Key */ + description?: string; + /** The name of the API Key */ + name?: string; + /** API Key Secret */ + secret?: string; + /** Specification of the cluster */ + resource?: APIKeyResourceEntity; + /** Specification of the cluster */ + owner?: APIKeyOwnerEntity; +} + +/** API Key Resource details which can be kafka cluster or schema registry cluster */ +export interface APIKeyResourceEntity { + /** Id of the resource */ + id?: string; + /** The environment of the api key */ + environment?: string; + /** API URL for accessing or modifying the api key resource object */ + related?: string; + /** CRN reference to the referred resource */ + resourceName?: string; + /** Type of the owner which can be service or user account */ + kind?: string; +} + +/** API Key Owner details which can be a user or service account */ +export interface APIKeyOwnerEntity { + /** API Key owner id */ + id?: string; + /** API URL for accessing or modifying the referred object */ + related?: string; + /** CRN reference to the referred resource */ + resourceName?: string; + /** Type of the owner service or user account */ + kind?: string; +} + +/** Metadata of the list */ +export interface SCConfluentListMetadata { + /** 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; +} + /** Known values of {@link CreatedByType} that the service accepts. */ export enum KnownCreatedByType { /** User */ @@ -544,7 +829,7 @@ export enum KnownCreatedByType { /** ManagedIdentity */ ManagedIdentity = "ManagedIdentity", /** Key */ - Key = "Key" + Key = "Key", } /** @@ -578,7 +863,7 @@ export enum KnownProvisionState { /** Deleted */ Deleted = "Deleted", /** NotSpecified */ - NotSpecified = "NotSpecified" + NotSpecified = "NotSpecified", } /** @@ -619,7 +904,7 @@ export enum KnownSaaSOfferStatus { /** Unsubscribed */ Unsubscribed = "Unsubscribed", /** Updating */ - Updating = "Updating" + Updating = "Updating", } /** @@ -645,7 +930,8 @@ export interface MarketplaceAgreementsListOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the list operation. */ -export type MarketplaceAgreementsListResponse = ConfluentAgreementResourceListResponse; +export type MarketplaceAgreementsListResponse = + ConfluentAgreementResourceListResponse; /** Optional parameters. */ export interface MarketplaceAgreementsCreateOptionalParams @@ -662,7 +948,8 @@ export interface MarketplaceAgreementsListNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listNext operation. */ -export type MarketplaceAgreementsListNextResponse = ConfluentAgreementResourceListResponse; +export type MarketplaceAgreementsListNextResponse = + ConfluentAgreementResourceListResponse; /** Optional parameters. */ export interface OrganizationOperationsListOptionalParams @@ -683,14 +970,16 @@ export interface OrganizationListBySubscriptionOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listBySubscription operation. */ -export type OrganizationListBySubscriptionResponse = OrganizationResourceListResult; +export type OrganizationListBySubscriptionResponse = + OrganizationResourceListResult; /** Optional parameters. */ export interface OrganizationListByResourceGroupOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listByResourceGroup operation. */ -export type OrganizationListByResourceGroupResponse = OrganizationResourceListResult; +export type OrganizationListByResourceGroupResponse = + OrganizationResourceListResult; /** Optional parameters. */ export interface OrganizationGetOptionalParams @@ -732,19 +1021,127 @@ export interface OrganizationDeleteOptionalParams resumeFrom?: string; } +/** Optional parameters. */ +export interface OrganizationListEnvironmentsOptionalParams + extends coreClient.OperationOptions { + /** Pagination size */ + pageSize?: number; + /** An opaque pagination token to fetch the next set of records */ + pageToken?: string; +} + +/** Contains response data for the listEnvironments operation. */ +export type OrganizationListEnvironmentsResponse = GetEnvironmentsResponse; + +/** Optional parameters. */ +export interface OrganizationGetEnvironmentByIdOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getEnvironmentById operation. */ +export type OrganizationGetEnvironmentByIdResponse = SCEnvironmentRecord; + +/** Optional parameters. */ +export interface OrganizationListClustersOptionalParams + extends coreClient.OperationOptions { + /** Pagination size */ + pageSize?: number; + /** An opaque pagination token to fetch the next set of records */ + pageToken?: string; +} + +/** Contains response data for the listClusters operation. */ +export type OrganizationListClustersResponse = ListClustersSuccessResponse; + +/** Optional parameters. */ +export interface OrganizationListSchemaRegistryClustersOptionalParams + extends coreClient.OperationOptions { + /** Pagination size */ + pageSize?: number; + /** An opaque pagination token to fetch the next set of records */ + pageToken?: string; +} + +/** Contains response data for the listSchemaRegistryClusters operation. */ +export type OrganizationListSchemaRegistryClustersResponse = + ListSchemaRegistryClustersResponse; + +/** Optional parameters. */ +export interface OrganizationListRegionsOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listRegions operation. */ +export type OrganizationListRegionsResponse = ListRegionsSuccessResponse; + +/** Optional parameters. */ +export interface OrganizationCreateAPIKeyOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the createAPIKey operation. */ +export type OrganizationCreateAPIKeyResponse = APIKeyRecord; + +/** Optional parameters. */ +export interface OrganizationDeleteClusterAPIKeyOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface OrganizationGetClusterAPIKeyOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getClusterAPIKey operation. */ +export type OrganizationGetClusterAPIKeyResponse = APIKeyRecord; + +/** Optional parameters. */ +export interface OrganizationGetSchemaRegistryClusterByIdOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getSchemaRegistryClusterById operation. */ +export type OrganizationGetSchemaRegistryClusterByIdResponse = + SchemaRegistryClusterRecord; + +/** Optional parameters. */ +export interface OrganizationGetClusterByIdOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getClusterById operation. */ +export type OrganizationGetClusterByIdResponse = SCClusterRecord; + /** Optional parameters. */ export interface OrganizationListBySubscriptionNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listBySubscriptionNext operation. */ -export type OrganizationListBySubscriptionNextResponse = OrganizationResourceListResult; +export type OrganizationListBySubscriptionNextResponse = + OrganizationResourceListResult; /** Optional parameters. */ export interface OrganizationListByResourceGroupNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listByResourceGroupNext operation. */ -export type OrganizationListByResourceGroupNextResponse = OrganizationResourceListResult; +export type OrganizationListByResourceGroupNextResponse = + OrganizationResourceListResult; + +/** Optional parameters. */ +export interface OrganizationListEnvironmentsNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listEnvironmentsNext operation. */ +export type OrganizationListEnvironmentsNextResponse = GetEnvironmentsResponse; + +/** Optional parameters. */ +export interface OrganizationListClustersNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listClustersNext operation. */ +export type OrganizationListClustersNextResponse = ListClustersSuccessResponse; + +/** Optional parameters. */ +export interface OrganizationListSchemaRegistryClustersNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listSchemaRegistryClustersNext operation. */ +export type OrganizationListSchemaRegistryClustersNextResponse = + ListSchemaRegistryClustersResponse; /** Optional parameters. */ export interface ValidationsValidateOrganizationOptionalParams @@ -772,14 +1169,16 @@ export interface AccessListServiceAccountsOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listServiceAccounts operation. */ -export type AccessListServiceAccountsResponse = AccessListServiceAccountsSuccessResponse; +export type AccessListServiceAccountsResponse = + AccessListServiceAccountsSuccessResponse; /** Optional parameters. */ export interface AccessListInvitationsOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listInvitations operation. */ -export type AccessListInvitationsResponse = AccessListInvitationsSuccessResponse; +export type AccessListInvitationsResponse = + AccessListInvitationsSuccessResponse; /** Optional parameters. */ export interface AccessInviteUserOptionalParams @@ -793,7 +1192,8 @@ export interface AccessListEnvironmentsOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listEnvironments operation. */ -export type AccessListEnvironmentsResponse = AccessListEnvironmentsSuccessResponse; +export type AccessListEnvironmentsResponse = + AccessListEnvironmentsSuccessResponse; /** Optional parameters. */ export interface AccessListClustersOptionalParams @@ -807,7 +1207,27 @@ export interface AccessListRoleBindingsOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listRoleBindings operation. */ -export type AccessListRoleBindingsResponse = AccessListRoleBindingsSuccessResponse; +export type AccessListRoleBindingsResponse = + AccessListRoleBindingsSuccessResponse; + +/** Optional parameters. */ +export interface AccessCreateRoleBindingOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the createRoleBinding operation. */ +export type AccessCreateRoleBindingResponse = RoleBindingRecord; + +/** Optional parameters. */ +export interface AccessDeleteRoleBindingOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface AccessListRoleBindingNameListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listRoleBindingNameList operation. */ +export type AccessListRoleBindingNameListResponse = + AccessRoleBindingNameListSuccessResponse; /** Optional parameters. */ export interface ConfluentManagementClientOptionalParams diff --git a/sdk/confluent/arm-confluent/src/models/mappers.ts b/sdk/confluent/arm-confluent/src/models/mappers.ts index 4991f3974b05..b2a950b00d89 100644 --- a/sdk/confluent/arm-confluent/src/models/mappers.ts +++ b/sdk/confluent/arm-confluent/src/models/mappers.ts @@ -8,32 +8,33 @@ import * as coreClient from "@azure/core-client"; -export const ConfluentAgreementResourceListResponse: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ConfluentAgreementResourceListResponse", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ConfluentAgreementResource" - } - } - } +export const ConfluentAgreementResourceListResponse: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "ConfluentAgreementResourceListResponse", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ConfluentAgreementResource", + }, + }, + }, + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String", + }, + }, }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String" - } - } - } - } -}; + }, + }; export const ConfluentAgreementResource: coreClient.CompositeMapper = { type: { @@ -44,80 +45,80 @@ export const ConfluentAgreementResource: coreClient.CompositeMapper = { serializedName: "id", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, name: { serializedName: "name", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, type: { serializedName: "type", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, systemData: { serializedName: "systemData", type: { name: "Composite", - className: "SystemData" - } + className: "SystemData", + }, }, publisher: { serializedName: "properties.publisher", type: { - name: "String" - } + name: "String", + }, }, product: { serializedName: "properties.product", type: { - name: "String" - } + name: "String", + }, }, plan: { serializedName: "properties.plan", type: { - name: "String" - } + name: "String", + }, }, licenseTextLink: { serializedName: "properties.licenseTextLink", type: { - name: "String" - } + name: "String", + }, }, privacyPolicyLink: { serializedName: "properties.privacyPolicyLink", type: { - name: "String" - } + name: "String", + }, }, retrieveDatetime: { serializedName: "properties.retrieveDatetime", type: { - name: "DateTime" - } + name: "DateTime", + }, }, signature: { serializedName: "properties.signature", type: { - name: "String" - } + name: "String", + }, }, accepted: { serializedName: "properties.accepted", type: { - name: "Boolean" - } - } - } - } + name: "Boolean", + }, + }, + }, + }, }; export const SystemData: coreClient.CompositeMapper = { @@ -128,58 +129,59 @@ export const SystemData: coreClient.CompositeMapper = { createdBy: { serializedName: "createdBy", type: { - name: "String" - } + name: "String", + }, }, createdByType: { serializedName: "createdByType", type: { - name: "String" - } + name: "String", + }, }, createdAt: { serializedName: "createdAt", type: { - name: "DateTime" - } + name: "DateTime", + }, }, lastModifiedBy: { serializedName: "lastModifiedBy", type: { - name: "String" - } + name: "String", + }, }, lastModifiedByType: { serializedName: "lastModifiedByType", type: { - name: "String" - } + name: "String", + }, }, lastModifiedAt: { serializedName: "lastModifiedAt", type: { - name: "DateTime" - } - } - } - } + name: "DateTime", + }, + }, + }, + }, }; -export const ResourceProviderDefaultErrorResponse: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ResourceProviderDefaultErrorResponse", - modelProperties: { - error: { - serializedName: "error", - type: { - name: "Composite", - className: "ErrorResponseBody" - } - } - } - } -}; +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: { @@ -190,22 +192,22 @@ export const ErrorResponseBody: coreClient.CompositeMapper = { serializedName: "code", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, message: { serializedName: "message", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, target: { serializedName: "target", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, details: { serializedName: "details", @@ -215,13 +217,13 @@ export const ErrorResponseBody: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "ErrorResponseBody" - } - } - } - } - } - } + className: "ErrorResponseBody", + }, + }, + }, + }, + }, + }, }; export const OperationListResult: coreClient.CompositeMapper = { @@ -236,19 +238,19 @@ export const OperationListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "OperationResult" - } - } - } + className: "OperationResult", + }, + }, + }, }, nextLink: { serializedName: "nextLink", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const OperationResult: coreClient.CompositeMapper = { @@ -259,24 +261,24 @@ export const OperationResult: coreClient.CompositeMapper = { name: { serializedName: "name", type: { - name: "String" - } + name: "String", + }, }, display: { serializedName: "display", type: { name: "Composite", - className: "OperationDisplay" - } + className: "OperationDisplay", + }, }, isDataAction: { serializedName: "isDataAction", type: { - name: "Boolean" - } - } - } - } + name: "Boolean", + }, + }, + }, + }, }; export const OperationDisplay: coreClient.CompositeMapper = { @@ -287,29 +289,29 @@ export const OperationDisplay: coreClient.CompositeMapper = { provider: { serializedName: "provider", type: { - name: "String" - } + name: "String", + }, }, resource: { serializedName: "resource", type: { - name: "String" - } + name: "String", + }, }, operation: { serializedName: "operation", type: { - name: "String" - } + name: "String", + }, }, description: { serializedName: "description", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const OrganizationResourceListResult: coreClient.CompositeMapper = { @@ -324,19 +326,19 @@ export const OrganizationResourceListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "OrganizationResource" - } - } - } + className: "OrganizationResource", + }, + }, + }, }, nextLink: { serializedName: "nextLink", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const OrganizationResource: coreClient.CompositeMapper = { @@ -348,94 +350,94 @@ export const OrganizationResource: coreClient.CompositeMapper = { serializedName: "id", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, name: { serializedName: "name", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, type: { serializedName: "type", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, systemData: { serializedName: "systemData", type: { name: "Composite", - className: "SystemData" - } + className: "SystemData", + }, }, tags: { serializedName: "tags", type: { name: "Dictionary", - value: { type: { name: "String" } } - } + value: { type: { name: "String" } }, + }, }, location: { serializedName: "location", type: { - name: "String" - } + name: "String", + }, }, createdTime: { serializedName: "properties.createdTime", readOnly: true, type: { - name: "DateTime" - } + name: "DateTime", + }, }, provisioningState: { serializedName: "properties.provisioningState", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, organizationId: { serializedName: "properties.organizationId", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, ssoUrl: { serializedName: "properties.ssoUrl", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, offerDetail: { serializedName: "properties.offerDetail", type: { name: "Composite", - className: "OfferDetail" - } + className: "OfferDetail", + }, }, userDetail: { serializedName: "properties.userDetail", type: { name: "Composite", - className: "UserDetail" - } + className: "UserDetail", + }, }, linkOrganization: { serializedName: "properties.linkOrganization", type: { name: "Composite", - className: "LinkOrganization" - } - } - } - } + className: "LinkOrganization", + }, + }, + }, + }, }; export const OfferDetail: coreClient.CompositeMapper = { @@ -445,71 +447,71 @@ export const OfferDetail: coreClient.CompositeMapper = { modelProperties: { publisherId: { constraints: { - MaxLength: 50 + MaxLength: 50, }, serializedName: "publisherId", required: true, type: { - name: "String" - } + name: "String", + }, }, id: { constraints: { - MaxLength: 50 + MaxLength: 50, }, serializedName: "id", required: true, type: { - name: "String" - } + name: "String", + }, }, planId: { constraints: { - MaxLength: 200 + MaxLength: 200, }, serializedName: "planId", required: true, type: { - name: "String" - } + name: "String", + }, }, planName: { constraints: { - MaxLength: 200 + MaxLength: 200, }, serializedName: "planName", required: true, type: { - name: "String" - } + name: "String", + }, }, termUnit: { constraints: { - MaxLength: 25 + MaxLength: 25, }, serializedName: "termUnit", required: true, type: { - name: "String" - } + name: "String", + }, }, termId: { constraints: { - MaxLength: 50 + MaxLength: 50, }, serializedName: "termId", type: { - name: "String" - } + name: "String", + }, }, privateOfferId: { constraints: { - MaxLength: 255 + MaxLength: 255, }, serializedName: "privateOfferId", type: { - name: "String" - } + name: "String", + }, }, privateOfferIds: { serializedName: "privateOfferIds", @@ -517,19 +519,19 @@ export const OfferDetail: coreClient.CompositeMapper = { name: "Sequence", element: { type: { - name: "String" - } - } - } + name: "String", + }, + }, + }, }, status: { serializedName: "status", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const UserDetail: coreClient.CompositeMapper = { @@ -539,46 +541,46 @@ export const UserDetail: coreClient.CompositeMapper = { modelProperties: { firstName: { constraints: { - MaxLength: 50 + MaxLength: 50, }, serializedName: "firstName", type: { - name: "String" - } + name: "String", + }, }, lastName: { constraints: { - MaxLength: 50 + MaxLength: 50, }, serializedName: "lastName", type: { - name: "String" - } + name: "String", + }, }, emailAddress: { constraints: { - Pattern: new RegExp("^\\S+@\\S+\\.\\S+$") + Pattern: new RegExp("^\\S+@\\S+\\.\\S+$"), }, serializedName: "emailAddress", required: true, type: { - name: "String" - } + name: "String", + }, }, userPrincipalName: { serializedName: "userPrincipalName", type: { - name: "String" - } + name: "String", + }, }, aadEmail: { serializedName: "aadEmail", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const LinkOrganization: coreClient.CompositeMapper = { @@ -590,11 +592,11 @@ export const LinkOrganization: coreClient.CompositeMapper = { serializedName: "token", required: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const OrganizationResourceUpdate: coreClient.CompositeMapper = { @@ -606,11 +608,11 @@ export const OrganizationResourceUpdate: coreClient.CompositeMapper = { serializedName: "tags", type: { name: "Dictionary", - value: { type: { name: "String" } } - } - } - } - } + value: { type: { name: "String" } }, + }, + }, + }, + }, }; export const ValidationResponse: coreClient.CompositeMapper = { @@ -622,11 +624,11 @@ export const ValidationResponse: coreClient.CompositeMapper = { serializedName: "info", type: { name: "Dictionary", - value: { type: { name: "String" } } - } - } - } - } + value: { type: { name: "String" } }, + }, + }, + }, + }, }; export const ListAccessRequestModel: coreClient.CompositeMapper = { @@ -638,11 +640,11 @@ export const ListAccessRequestModel: coreClient.CompositeMapper = { serializedName: "searchFilters", type: { name: "Dictionary", - value: { type: { name: "String" } } - } - } - } - } + value: { type: { name: "String" } }, + }, + }, + }, + }, }; export const AccessListUsersSuccessResponse: coreClient.CompositeMapper = { @@ -653,15 +655,15 @@ export const AccessListUsersSuccessResponse: coreClient.CompositeMapper = { kind: { serializedName: "kind", type: { - name: "String" - } + name: "String", + }, }, metadata: { serializedName: "metadata", type: { name: "Composite", - className: "ConfluentListMetadata" - } + className: "ConfluentListMetadata", + }, }, data: { serializedName: "data", @@ -670,13 +672,13 @@ export const AccessListUsersSuccessResponse: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "UserRecord" - } - } - } - } - } - } + className: "UserRecord", + }, + }, + }, + }, + }, + }, }; export const ConfluentListMetadata: coreClient.CompositeMapper = { @@ -687,35 +689,35 @@ export const ConfluentListMetadata: coreClient.CompositeMapper = { first: { serializedName: "first", type: { - name: "String" - } + name: "String", + }, }, last: { serializedName: "last", type: { - name: "String" - } + name: "String", + }, }, prev: { serializedName: "prev", type: { - name: "String" - } + name: "String", + }, }, next: { serializedName: "next", type: { - name: "String" - } + name: "String", + }, }, totalSize: { serializedName: "total_size", type: { - name: "Number" - } - } - } - } + name: "Number", + }, + }, + }, + }, }; export const UserRecord: coreClient.CompositeMapper = { @@ -726,42 +728,42 @@ export const UserRecord: coreClient.CompositeMapper = { kind: { serializedName: "kind", type: { - name: "String" - } + name: "String", + }, }, id: { serializedName: "id", type: { - name: "String" - } + name: "String", + }, }, metadata: { serializedName: "metadata", type: { name: "Composite", - className: "MetadataEntity" - } + className: "MetadataEntity", + }, }, email: { serializedName: "email", type: { - name: "String" - } + name: "String", + }, }, fullName: { serializedName: "full_name", type: { - name: "String" - } + name: "String", + }, }, authType: { serializedName: "auth_type", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const MetadataEntity: coreClient.CompositeMapper = { @@ -772,70 +774,71 @@ export const MetadataEntity: coreClient.CompositeMapper = { self: { serializedName: "self", type: { - name: "String" - } + name: "String", + }, }, resourceName: { serializedName: "resource_name", type: { - name: "String" - } + name: "String", + }, }, createdAt: { serializedName: "created_at", type: { - name: "String" - } + name: "String", + }, }, updatedAt: { serializedName: "updated_at", type: { - name: "String" - } + name: "String", + }, }, deletedAt: { serializedName: "deleted_at", type: { - name: "String" - } - } - } - } + 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" - } +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", + }, + }, + }, + }, }, - data: { - serializedName: "data", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ServiceAccountRecord" - } - } - } - } - } - } -}; + }, + }; export const ServiceAccountRecord: coreClient.CompositeMapper = { type: { @@ -845,71 +848,72 @@ export const ServiceAccountRecord: coreClient.CompositeMapper = { kind: { serializedName: "kind", type: { - name: "String" - } + name: "String", + }, }, id: { serializedName: "id", type: { - name: "String" - } + name: "String", + }, }, metadata: { serializedName: "metadata", type: { name: "Composite", - className: "MetadataEntity" - } + className: "MetadataEntity", + }, }, displayName: { serializedName: "display_name", type: { - name: "String" - } + name: "String", + }, }, description: { serializedName: "description", type: { - name: "String" - } - } - } - } + 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" - } +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", + }, + }, + }, + }, }, - data: { - serializedName: "data", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "InvitationRecord" - } - } - } - } - } - } -}; + }, + }; export const InvitationRecord: coreClient.CompositeMapper = { type: { @@ -919,54 +923,54 @@ export const InvitationRecord: coreClient.CompositeMapper = { kind: { serializedName: "kind", type: { - name: "String" - } + name: "String", + }, }, id: { serializedName: "id", type: { - name: "String" - } + name: "String", + }, }, metadata: { serializedName: "metadata", type: { name: "Composite", - className: "MetadataEntity" - } + className: "MetadataEntity", + }, }, email: { serializedName: "email", type: { - name: "String" - } + name: "String", + }, }, authType: { serializedName: "auth_type", type: { - name: "String" - } + name: "String", + }, }, status: { serializedName: "status", type: { - name: "String" - } + name: "String", + }, }, acceptedAt: { serializedName: "accepted_at", type: { - name: "String" - } + name: "String", + }, }, expiresAt: { serializedName: "expires_at", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const AccessInviteUserAccountModel: coreClient.CompositeMapper = { @@ -977,30 +981,30 @@ export const AccessInviteUserAccountModel: coreClient.CompositeMapper = { organizationId: { serializedName: "organizationId", type: { - name: "String" - } + name: "String", + }, }, email: { serializedName: "email", type: { - name: "String" - } + name: "String", + }, }, upn: { serializedName: "upn", type: { - name: "String" - } + name: "String", + }, }, invitedUserDetails: { serializedName: "invitedUserDetails", type: { name: "Composite", - className: "AccessInvitedUserDetails" - } - } - } - } + className: "AccessInvitedUserDetails", + }, + }, + }, + }, }; export const AccessInvitedUserDetails: coreClient.CompositeMapper = { @@ -1011,52 +1015,53 @@ export const AccessInvitedUserDetails: coreClient.CompositeMapper = { invitedEmail: { serializedName: "invitedEmail", type: { - name: "String" - } + name: "String", + }, }, authType: { serializedName: "auth_type", type: { - name: "String" - } - } - } - } + 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" - } +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", + }, + }, + }, + }, }, - data: { - serializedName: "data", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EnvironmentRecord" - } - } - } - } - } - } -}; + }, + }; export const EnvironmentRecord: coreClient.CompositeMapper = { type: { @@ -1066,30 +1071,30 @@ export const EnvironmentRecord: coreClient.CompositeMapper = { kind: { serializedName: "kind", type: { - name: "String" - } + name: "String", + }, }, id: { serializedName: "id", type: { - name: "String" - } + name: "String", + }, }, metadata: { serializedName: "metadata", type: { name: "Composite", - className: "MetadataEntity" - } + className: "MetadataEntity", + }, }, displayName: { serializedName: "display_name", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const AccessListClusterSuccessResponse: coreClient.CompositeMapper = { @@ -1100,15 +1105,15 @@ export const AccessListClusterSuccessResponse: coreClient.CompositeMapper = { kind: { serializedName: "kind", type: { - name: "String" - } + name: "String", + }, }, metadata: { serializedName: "metadata", type: { name: "Composite", - className: "ConfluentListMetadata" - } + className: "ConfluentListMetadata", + }, }, data: { serializedName: "data", @@ -1117,13 +1122,13 @@ export const AccessListClusterSuccessResponse: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "ClusterRecord" - } - } - } - } - } - } + className: "ClusterRecord", + }, + }, + }, + }, + }, + }, }; export const ClusterRecord: coreClient.CompositeMapper = { @@ -1134,44 +1139,44 @@ export const ClusterRecord: coreClient.CompositeMapper = { kind: { serializedName: "kind", type: { - name: "String" - } + name: "String", + }, }, id: { serializedName: "id", type: { - name: "String" - } + name: "String", + }, }, metadata: { serializedName: "metadata", type: { name: "Composite", - className: "MetadataEntity" - } + className: "MetadataEntity", + }, }, displayName: { serializedName: "display_name", type: { - name: "String" - } + name: "String", + }, }, spec: { serializedName: "spec", type: { name: "Composite", - className: "ClusterSpecEntity" - } + className: "ClusterSpecEntity", + }, }, status: { serializedName: "status", type: { name: "Composite", - className: "ClusterStatusEntity" - } - } - } - } + className: "ClusterStatusEntity", + }, + }, + }, + }, }; export const ClusterSpecEntity: coreClient.CompositeMapper = { @@ -1182,81 +1187,81 @@ export const ClusterSpecEntity: coreClient.CompositeMapper = { displayName: { serializedName: "display_name", type: { - name: "String" - } + name: "String", + }, }, availability: { serializedName: "availability", type: { - name: "String" - } + name: "String", + }, }, cloud: { serializedName: "cloud", type: { - name: "String" - } + name: "String", + }, }, zone: { serializedName: "zone", type: { - name: "String" - } + name: "String", + }, }, region: { serializedName: "region", type: { - name: "String" - } + name: "String", + }, }, kafkaBootstrapEndpoint: { serializedName: "kafka_bootstrap_endpoint", type: { - name: "String" - } + name: "String", + }, }, httpEndpoint: { serializedName: "http_endpoint", type: { - name: "String" - } + name: "String", + }, }, apiEndpoint: { serializedName: "api_endpoint", type: { - name: "String" - } + name: "String", + }, }, config: { serializedName: "config", type: { name: "Composite", - className: "ClusterConfigEntity" - } + className: "ClusterConfigEntity", + }, }, environment: { serializedName: "environment", type: { name: "Composite", - className: "ClusterEnvironmentEntity" - } + className: "ClusterEnvironmentEntity", + }, }, network: { serializedName: "network", type: { name: "Composite", - className: "ClusterNetworkEntity" - } + className: "ClusterNetworkEntity", + }, }, byok: { serializedName: "byok", type: { name: "Composite", - className: "ClusterByokEntity" - } - } - } - } + className: "ClusterByokEntity", + }, + }, + }, + }, }; export const ClusterConfigEntity: coreClient.CompositeMapper = { @@ -1267,11 +1272,11 @@ export const ClusterConfigEntity: coreClient.CompositeMapper = { kind: { serializedName: "kind", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const ClusterEnvironmentEntity: coreClient.CompositeMapper = { @@ -1282,29 +1287,29 @@ export const ClusterEnvironmentEntity: coreClient.CompositeMapper = { id: { serializedName: "id", type: { - name: "String" - } + name: "String", + }, }, environment: { serializedName: "environment", type: { - name: "String" - } + name: "String", + }, }, related: { serializedName: "related", type: { - name: "String" - } + name: "String", + }, }, resourceName: { serializedName: "resource_name", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const ClusterNetworkEntity: coreClient.CompositeMapper = { @@ -1315,29 +1320,29 @@ export const ClusterNetworkEntity: coreClient.CompositeMapper = { id: { serializedName: "id", type: { - name: "String" - } + name: "String", + }, }, environment: { serializedName: "environment", type: { - name: "String" - } + name: "String", + }, }, related: { serializedName: "related", type: { - name: "String" - } + name: "String", + }, }, resourceName: { serializedName: "resource_name", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const ClusterByokEntity: coreClient.CompositeMapper = { @@ -1348,23 +1353,23 @@ export const ClusterByokEntity: coreClient.CompositeMapper = { id: { serializedName: "id", type: { - name: "String" - } + name: "String", + }, }, related: { serializedName: "related", type: { - name: "String" - } + name: "String", + }, }, resourceName: { serializedName: "resource_name", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const ClusterStatusEntity: coreClient.CompositeMapper = { @@ -1375,95 +1380,938 @@ export const ClusterStatusEntity: coreClient.CompositeMapper = { phase: { serializedName: "phase", type: { - name: "String" - } + name: "String", + }, }, cku: { serializedName: "cku", type: { - name: "Number" - } - } - } - } + name: "Number", + }, + }, + }, + }, }; -export const AccessListRoleBindingsSuccessResponse: coreClient.CompositeMapper = { +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: "AccessListRoleBindingsSuccessResponse", + className: "RoleBindingRecord", modelProperties: { kind: { serializedName: "kind", type: { - name: "String" - } + name: "String", + }, + }, + id: { + serializedName: "id", + type: { + name: "String", + }, }, metadata: { serializedName: "metadata", type: { name: "Composite", - className: "ConfluentListMetadata" - } + className: "MetadataEntity", + }, }, - data: { - serializedName: "data", + principal: { + serializedName: "principal", + type: { + name: "String", + }, + }, + roleName: { + serializedName: "role_name", + type: { + name: "String", + }, + }, + crnPattern: { + serializedName: "crn_pattern", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const AccessCreateRoleBindingRequestModel: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AccessCreateRoleBindingRequestModel", + modelProperties: { + principal: { + serializedName: "principal", + type: { + name: "String", + }, + }, + roleName: { + serializedName: "role_name", + type: { + name: "String", + }, + }, + crnPattern: { + serializedName: "crn_pattern", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const AccessRoleBindingNameListSuccessResponse: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "AccessRoleBindingNameListSuccessResponse", + modelProperties: { + kind: { + serializedName: "kind", + type: { + name: "String", + }, + }, + metadata: { + serializedName: "metadata", + type: { + name: "Composite", + className: "ConfluentListMetadata", + }, + }, + data: { + serializedName: "data", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + }, + }, + }; + +export const GetEnvironmentsResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GetEnvironmentsResponse", + modelProperties: { + value: { + serializedName: "value", type: { name: "Sequence", element: { type: { name: "Composite", - className: "RoleBindingRecord" - } - } - } - } - } - } + className: "SCEnvironmentRecord", + }, + }, + }, + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String", + }, + }, + }, + }, }; -export const RoleBindingRecord: coreClient.CompositeMapper = { +export const SCEnvironmentRecord: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RoleBindingRecord", + className: "SCEnvironmentRecord", modelProperties: { kind: { serializedName: "kind", type: { - name: "String" - } + name: "String", + }, }, id: { serializedName: "id", type: { - name: "String" - } + name: "String", + }, + }, + name: { + serializedName: "name", + type: { + name: "String", + }, }, metadata: { - serializedName: "metadata", + serializedName: "properties.metadata", type: { name: "Composite", - className: "MetadataEntity" - } + className: "SCMetadataEntity", + }, }, - principal: { - serializedName: "principal", + }, + }, +}; + +export const SCMetadataEntity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SCMetadataEntity", + modelProperties: { + self: { + serializedName: "self", type: { - name: "String" - } + name: "String", + }, }, - roleName: { - serializedName: "role_name", + resourceName: { + serializedName: "resourceName", type: { - name: "String" - } + name: "String", + }, }, - crnPattern: { - serializedName: "crn_pattern", + createdTimestamp: { + serializedName: "createdTimestamp", + type: { + name: "String", + }, + }, + updatedTimestamp: { + serializedName: "updatedTimestamp", + type: { + name: "String", + }, + }, + deletedTimestamp: { + serializedName: "deletedTimestamp", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const ListClustersSuccessResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ListClustersSuccessResponse", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SCClusterRecord", + }, + }, + }, + }, + nextLink: { + serializedName: "nextLink", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, +}; + +export const SCClusterRecord: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SCClusterRecord", + modelProperties: { + kind: { + serializedName: "kind", + type: { + name: "String", + }, + }, + id: { + serializedName: "id", + type: { + name: "String", + }, + }, + name: { + serializedName: "name", + type: { + name: "String", + }, + }, + metadata: { + serializedName: "properties.metadata", + type: { + name: "Composite", + className: "SCMetadataEntity", + }, + }, + spec: { + serializedName: "properties.spec", + type: { + name: "Composite", + className: "SCClusterSpecEntity", + }, + }, + status: { + serializedName: "properties.status", + type: { + name: "Composite", + className: "ClusterStatusEntity", + }, + }, + }, + }, +}; + +export const SCClusterSpecEntity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SCClusterSpecEntity", + modelProperties: { + name: { + serializedName: "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: "kafkaBootstrapEndpoint", + type: { + name: "String", + }, + }, + httpEndpoint: { + serializedName: "httpEndpoint", + type: { + name: "String", + }, + }, + apiEndpoint: { + serializedName: "apiEndpoint", + type: { + name: "String", + }, + }, + config: { + serializedName: "config", + type: { + name: "Composite", + className: "ClusterConfigEntity", + }, + }, + environment: { + serializedName: "environment", + type: { + name: "Composite", + className: "SCClusterNetworkEnvironmentEntity", + }, + }, + network: { + serializedName: "network", + type: { + name: "Composite", + className: "SCClusterNetworkEnvironmentEntity", + }, + }, + byok: { + serializedName: "byok", + type: { + name: "Composite", + className: "SCClusterByokEntity", + }, + }, + }, + }, +}; + +export const SCClusterNetworkEnvironmentEntity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SCClusterNetworkEnvironmentEntity", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String", + }, + }, + environment: { + serializedName: "environment", + type: { + name: "String", + }, + }, + related: { + serializedName: "related", + type: { + name: "String", + }, + }, + resourceName: { + serializedName: "resourceName", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const SCClusterByokEntity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SCClusterByokEntity", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String", + }, + }, + related: { + serializedName: "related", + type: { + name: "String", + }, + }, + resourceName: { + serializedName: "resourceName", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const ListSchemaRegistryClustersResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ListSchemaRegistryClustersResponse", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SchemaRegistryClusterRecord", + }, + }, + }, + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const SchemaRegistryClusterRecord: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SchemaRegistryClusterRecord", + modelProperties: { + kind: { + serializedName: "kind", + type: { + name: "String", + }, + }, + id: { + serializedName: "id", + type: { + name: "String", + }, + }, + metadata: { + serializedName: "properties.metadata", + type: { + name: "Composite", + className: "SCMetadataEntity", + }, + }, + spec: { + serializedName: "properties.spec", + type: { + name: "Composite", + className: "SchemaRegistryClusterSpecEntity", + }, + }, + status: { + serializedName: "properties.status", + type: { + name: "Composite", + className: "SchemaRegistryClusterStatusEntity", + }, + }, + }, + }, +}; + +export const SchemaRegistryClusterSpecEntity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SchemaRegistryClusterSpecEntity", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String", + }, + }, + httpEndpoint: { + serializedName: "httpEndpoint", + type: { + name: "String", + }, + }, + package: { + serializedName: "package", + type: { + name: "String", + }, + }, + region: { + serializedName: "region", + type: { + name: "Composite", + className: "SchemaRegistryClusterEnvironmentRegionEntity", + }, + }, + environment: { + serializedName: "environment", + type: { + name: "Composite", + className: "SchemaRegistryClusterEnvironmentRegionEntity", + }, + }, + cloud: { + serializedName: "cloud", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const SchemaRegistryClusterEnvironmentRegionEntity: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "SchemaRegistryClusterEnvironmentRegionEntity", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String", + }, + }, + related: { + serializedName: "related", + type: { + name: "String", + }, + }, + resourceName: { + serializedName: "resourceName", + type: { + name: "String", + }, + }, + }, + }, + }; + +export const SchemaRegistryClusterStatusEntity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SchemaRegistryClusterStatusEntity", + modelProperties: { + phase: { + serializedName: "phase", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const ListRegionsSuccessResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ListRegionsSuccessResponse", + modelProperties: { + data: { + serializedName: "data", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RegionRecord", + }, + }, + }, + }, + }, + }, +}; + +export const RegionRecord: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RegionRecord", + modelProperties: { + kind: { + serializedName: "kind", + type: { + name: "String", + }, + }, + id: { + serializedName: "id", + type: { + name: "String", + }, + }, + metadata: { + serializedName: "properties.metadata", + type: { + name: "Composite", + className: "SCMetadataEntity", + }, + }, + spec: { + serializedName: "properties.spec", + type: { + name: "Composite", + className: "RegionSpecEntity", + }, + }, + }, + }, +}; + +export const RegionSpecEntity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RegionSpecEntity", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String", + }, + }, + cloud: { + serializedName: "cloud", + type: { + name: "String", + }, + }, + regionName: { + serializedName: "regionName", + type: { + name: "String", + }, + }, + packages: { + serializedName: "packages", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + }, + }, +}; + +export const CreateAPIKeyModel: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CreateAPIKeyModel", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String", + }, + }, + description: { + serializedName: "description", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const APIKeyRecord: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "APIKeyRecord", + modelProperties: { + kind: { + serializedName: "kind", + type: { + name: "String", + }, + }, + id: { + serializedName: "id", + type: { + name: "String", + }, + }, + metadata: { + serializedName: "properties.metadata", + type: { + name: "Composite", + className: "SCMetadataEntity", + }, + }, + spec: { + serializedName: "properties.spec", + type: { + name: "Composite", + className: "APIKeySpecEntity", + }, + }, + }, + }, +}; + +export const APIKeySpecEntity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "APIKeySpecEntity", + modelProperties: { + description: { + serializedName: "description", + type: { + name: "String", + }, + }, + name: { + serializedName: "name", + type: { + name: "String", + }, + }, + secret: { + serializedName: "secret", + type: { + name: "String", + }, + }, + resource: { + serializedName: "resource", + type: { + name: "Composite", + className: "APIKeyResourceEntity", + }, + }, + owner: { + serializedName: "owner", + type: { + name: "Composite", + className: "APIKeyOwnerEntity", + }, + }, + }, + }, +}; + +export const APIKeyResourceEntity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "APIKeyResourceEntity", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String", + }, + }, + environment: { + serializedName: "environment", + type: { + name: "String", + }, + }, + related: { + serializedName: "related", + type: { + name: "String", + }, + }, + resourceName: { + serializedName: "resourceName", + type: { + name: "String", + }, + }, + kind: { + serializedName: "kind", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const APIKeyOwnerEntity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "APIKeyOwnerEntity", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String", + }, + }, + related: { + serializedName: "related", + type: { + name: "String", + }, + }, + resourceName: { + serializedName: "resourceName", + type: { + name: "String", + }, + }, + kind: { + serializedName: "kind", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const SCConfluentListMetadata: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SCConfluentListMetadata", + 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: "totalSize", + type: { + name: "Number", + }, + }, + }, + }, }; diff --git a/sdk/confluent/arm-confluent/src/models/parameters.ts b/sdk/confluent/arm-confluent/src/models/parameters.ts index 38231f6ffded..9593b186b4b5 100644 --- a/sdk/confluent/arm-confluent/src/models/parameters.ts +++ b/sdk/confluent/arm-confluent/src/models/parameters.ts @@ -9,14 +9,16 @@ import { OperationParameter, OperationURLParameter, - OperationQueryParameter + OperationQueryParameter, } from "@azure/core-client"; import { ConfluentAgreementResource as ConfluentAgreementResourceMapper, OrganizationResource as OrganizationResourceMapper, OrganizationResourceUpdate as OrganizationResourceUpdateMapper, ListAccessRequestModel as ListAccessRequestModelMapper, - AccessInviteUserAccountModel as AccessInviteUserAccountModelMapper + CreateAPIKeyModel as CreateAPIKeyModelMapper, + AccessInviteUserAccountModel as AccessInviteUserAccountModelMapper, + AccessCreateRoleBindingRequestModel as AccessCreateRoleBindingRequestModelMapper, } from "../models/mappers"; export const accept: OperationParameter = { @@ -26,9 +28,9 @@ export const accept: OperationParameter = { isConstant: true, serializedName: "Accept", type: { - name: "String" - } - } + name: "String", + }, + }, }; export const $host: OperationURLParameter = { @@ -37,22 +39,22 @@ export const $host: OperationURLParameter = { serializedName: "$host", required: true, type: { - name: "String" - } + name: "String", + }, }, - skipEncoding: true + skipEncoding: true, }; export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2023-08-22", + defaultValue: "2024-02-13", isConstant: true, serializedName: "api-version", type: { - name: "String" - } - } + name: "String", + }, + }, }; export const subscriptionId: OperationURLParameter = { @@ -61,9 +63,9 @@ export const subscriptionId: OperationURLParameter = { serializedName: "subscriptionId", required: true, type: { - name: "Uuid" - } - } + name: "String", + }, + }, }; export const contentType: OperationParameter = { @@ -73,14 +75,14 @@ export const contentType: OperationParameter = { isConstant: true, serializedName: "Content-Type", type: { - name: "String" - } - } + name: "String", + }, + }, }; export const body: OperationParameter = { parameterPath: ["options", "body"], - mapper: ConfluentAgreementResourceMapper + mapper: ConfluentAgreementResourceMapper, }; export const nextLink: OperationURLParameter = { @@ -89,25 +91,21 @@ export const nextLink: OperationURLParameter = { serializedName: "nextLink", required: true, type: { - name: "String" - } + name: "String", + }, }, - skipEncoding: true + skipEncoding: true, }; export const resourceGroupName: OperationURLParameter = { parameterPath: "resourceGroupName", mapper: { - constraints: { - MaxLength: 90, - MinLength: 1 - }, serializedName: "resourceGroupName", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; export const organizationName: OperationURLParameter = { @@ -116,32 +114,121 @@ export const organizationName: OperationURLParameter = { serializedName: "organizationName", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; export const body1: OperationParameter = { parameterPath: ["options", "body"], - mapper: OrganizationResourceMapper + mapper: OrganizationResourceMapper, }; export const body2: OperationParameter = { parameterPath: ["options", "body"], - mapper: OrganizationResourceUpdateMapper + mapper: OrganizationResourceUpdateMapper, +}; + +export const resourceGroupName1: OperationURLParameter = { + parameterPath: "resourceGroupName", + mapper: { + constraints: { + MaxLength: 90, + MinLength: 1, + }, + serializedName: "resourceGroupName", + required: true, + type: { + name: "String", + }, + }, +}; + +export const pageSize: OperationQueryParameter = { + parameterPath: ["options", "pageSize"], + mapper: { + serializedName: "pageSize", + type: { + name: "Number", + }, + }, +}; + +export const pageToken: OperationQueryParameter = { + parameterPath: ["options", "pageToken"], + mapper: { + serializedName: "pageToken", + type: { + name: "String", + }, + }, +}; + +export const environmentId: OperationURLParameter = { + parameterPath: "environmentId", + mapper: { + serializedName: "environmentId", + required: true, + type: { + name: "String", + }, + }, }; export const body3: OperationParameter = { parameterPath: "body", - mapper: OrganizationResourceMapper + mapper: ListAccessRequestModelMapper, }; export const body4: OperationParameter = { parameterPath: "body", - mapper: ListAccessRequestModelMapper + mapper: CreateAPIKeyModelMapper, +}; + +export const clusterId: OperationURLParameter = { + parameterPath: "clusterId", + mapper: { + serializedName: "clusterId", + required: true, + type: { + name: "String", + }, + }, +}; + +export const apiKeyId: OperationURLParameter = { + parameterPath: "apiKeyId", + mapper: { + serializedName: "apiKeyId", + required: true, + type: { + name: "String", + }, + }, }; export const body5: OperationParameter = { parameterPath: "body", - mapper: AccessInviteUserAccountModelMapper + mapper: OrganizationResourceMapper, +}; + +export const body6: OperationParameter = { + parameterPath: "body", + mapper: AccessInviteUserAccountModelMapper, +}; + +export const body7: OperationParameter = { + parameterPath: "body", + mapper: AccessCreateRoleBindingRequestModelMapper, +}; + +export const roleBindingId: OperationURLParameter = { + parameterPath: "roleBindingId", + mapper: { + serializedName: "roleBindingId", + required: true, + type: { + name: "String", + }, + }, }; diff --git a/sdk/confluent/arm-confluent/src/operations/access.ts b/sdk/confluent/arm-confluent/src/operations/access.ts index b2b4e6febdd9..05d2d0ea6e6c 100644 --- a/sdk/confluent/arm-confluent/src/operations/access.ts +++ b/sdk/confluent/arm-confluent/src/operations/access.ts @@ -27,7 +27,13 @@ import { AccessListClustersOptionalParams, AccessListClustersResponse, AccessListRoleBindingsOptionalParams, - AccessListRoleBindingsResponse + AccessListRoleBindingsResponse, + AccessCreateRoleBindingRequestModel, + AccessCreateRoleBindingOptionalParams, + AccessCreateRoleBindingResponse, + AccessDeleteRoleBindingOptionalParams, + AccessListRoleBindingNameListOptionalParams, + AccessListRoleBindingNameListResponse, } from "../models"; /** Class containing Access operations. */ @@ -44,7 +50,7 @@ export class AccessImpl implements Access { /** * Organization users details - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name * @param organizationName Organization resource name * @param body List Access Request Model * @param options The options parameters. @@ -53,17 +59,17 @@ export class AccessImpl implements Access { resourceGroupName: string, organizationName: string, body: ListAccessRequestModel, - options?: AccessListUsersOptionalParams + options?: AccessListUsersOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, organizationName, body, options }, - listUsersOperationSpec + listUsersOperationSpec, ); } /** * Organization service accounts details - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name * @param organizationName Organization resource name * @param body List Access Request Model * @param options The options parameters. @@ -72,17 +78,17 @@ export class AccessImpl implements Access { resourceGroupName: string, organizationName: string, body: ListAccessRequestModel, - options?: AccessListServiceAccountsOptionalParams + options?: AccessListServiceAccountsOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, organizationName, body, options }, - listServiceAccountsOperationSpec + listServiceAccountsOperationSpec, ); } /** * Organization accounts invitation details - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name * @param organizationName Organization resource name * @param body List Access Request Model * @param options The options parameters. @@ -91,17 +97,17 @@ export class AccessImpl implements Access { resourceGroupName: string, organizationName: string, body: ListAccessRequestModel, - options?: AccessListInvitationsOptionalParams + options?: AccessListInvitationsOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, organizationName, body, options }, - listInvitationsOperationSpec + listInvitationsOperationSpec, ); } /** * Invite user to the organization - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name * @param organizationName Organization resource name * @param body Invite user account model * @param options The options parameters. @@ -110,11 +116,11 @@ export class AccessImpl implements Access { resourceGroupName: string, organizationName: string, body: AccessInviteUserAccountModel, - options?: AccessInviteUserOptionalParams + options?: AccessInviteUserOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, organizationName, body, options }, - inviteUserOperationSpec + inviteUserOperationSpec, ); } @@ -129,11 +135,11 @@ export class AccessImpl implements Access { resourceGroupName: string, organizationName: string, body: ListAccessRequestModel, - options?: AccessListEnvironmentsOptionalParams + options?: AccessListEnvironmentsOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, organizationName, body, options }, - listEnvironmentsOperationSpec + listEnvironmentsOperationSpec, ); } @@ -148,11 +154,11 @@ export class AccessImpl implements Access { resourceGroupName: string, organizationName: string, body: ListAccessRequestModel, - options?: AccessListClustersOptionalParams + options?: AccessListClustersOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, organizationName, body, options }, - listClustersOperationSpec + listClustersOperationSpec, ); } @@ -167,11 +173,68 @@ export class AccessImpl implements Access { resourceGroupName: string, organizationName: string, body: ListAccessRequestModel, - options?: AccessListRoleBindingsOptionalParams + options?: AccessListRoleBindingsOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, organizationName, body, options }, - listRoleBindingsOperationSpec + listRoleBindingsOperationSpec, + ); + } + + /** + * Organization role bindings + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name + * @param body Create role binding Request Model + * @param options The options parameters. + */ + createRoleBinding( + resourceGroupName: string, + organizationName: string, + body: AccessCreateRoleBindingRequestModel, + options?: AccessCreateRoleBindingOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, organizationName, body, options }, + createRoleBindingOperationSpec, + ); + } + + /** + * Organization role bindings + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name + * @param roleBindingId Confluent Role binding id + * @param options The options parameters. + */ + deleteRoleBinding( + resourceGroupName: string, + organizationName: string, + roleBindingId: string, + options?: AccessDeleteRoleBindingOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, organizationName, roleBindingId, options }, + deleteRoleBindingOperationSpec, + ); + } + + /** + * 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. + */ + listRoleBindingNameList( + resourceGroupName: string, + organizationName: string, + body: ListAccessRequestModel, + options?: AccessListRoleBindingNameListOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, organizationName, body, options }, + listRoleBindingNameListOperationSpec, ); } } @@ -179,170 +242,230 @@ export class AccessImpl implements Access { const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listUsersOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/access/default/listUsers", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/access/default/listUsers", httpMethod: "POST", responses: { 200: { - bodyMapper: Mappers.AccessListUsersSuccessResponse + bodyMapper: Mappers.AccessListUsersSuccessResponse, }, default: { - bodyMapper: Mappers.ResourceProviderDefaultErrorResponse - } + bodyMapper: Mappers.ResourceProviderDefaultErrorResponse, + }, }, - requestBody: Parameters.body4, + requestBody: Parameters.body3, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.organizationName + Parameters.organizationName, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", - serializer + serializer, }; const listServiceAccountsOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/access/default/listServiceAccounts", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/access/default/listServiceAccounts", httpMethod: "POST", responses: { 200: { - bodyMapper: Mappers.AccessListServiceAccountsSuccessResponse + bodyMapper: Mappers.AccessListServiceAccountsSuccessResponse, }, default: { - bodyMapper: Mappers.ResourceProviderDefaultErrorResponse - } + bodyMapper: Mappers.ResourceProviderDefaultErrorResponse, + }, }, - requestBody: Parameters.body4, + requestBody: Parameters.body3, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.organizationName + Parameters.organizationName, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", - serializer + serializer, }; const listInvitationsOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/access/default/listInvitations", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/access/default/listInvitations", httpMethod: "POST", responses: { 200: { - bodyMapper: Mappers.AccessListInvitationsSuccessResponse + bodyMapper: Mappers.AccessListInvitationsSuccessResponse, }, default: { - bodyMapper: Mappers.ResourceProviderDefaultErrorResponse - } + bodyMapper: Mappers.ResourceProviderDefaultErrorResponse, + }, }, - requestBody: Parameters.body4, + requestBody: Parameters.body3, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.organizationName + Parameters.organizationName, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", - serializer + serializer, }; const inviteUserOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/access/default/createInvitation", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/access/default/createInvitation", httpMethod: "POST", responses: { 200: { - bodyMapper: Mappers.InvitationRecord + bodyMapper: Mappers.InvitationRecord, }, default: { - bodyMapper: Mappers.ResourceProviderDefaultErrorResponse - } + bodyMapper: Mappers.ResourceProviderDefaultErrorResponse, + }, }, - requestBody: Parameters.body5, + requestBody: Parameters.body6, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.organizationName + Parameters.organizationName, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", - serializer + serializer, }; const listEnvironmentsOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/access/default/listEnvironments", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/access/default/listEnvironments", httpMethod: "POST", responses: { 200: { - bodyMapper: Mappers.AccessListEnvironmentsSuccessResponse + bodyMapper: Mappers.AccessListEnvironmentsSuccessResponse, }, default: { - bodyMapper: Mappers.ResourceProviderDefaultErrorResponse - } + bodyMapper: Mappers.ResourceProviderDefaultErrorResponse, + }, }, - requestBody: Parameters.body4, + requestBody: Parameters.body3, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.organizationName + Parameters.organizationName, + Parameters.resourceGroupName1, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", - serializer + serializer, }; const listClustersOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/access/default/listClusters", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/access/default/listClusters", httpMethod: "POST", responses: { 200: { - bodyMapper: Mappers.AccessListClusterSuccessResponse + bodyMapper: Mappers.AccessListClusterSuccessResponse, }, default: { - bodyMapper: Mappers.ResourceProviderDefaultErrorResponse - } + bodyMapper: Mappers.ResourceProviderDefaultErrorResponse, + }, }, - requestBody: Parameters.body4, + requestBody: Parameters.body3, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.organizationName + Parameters.organizationName, + Parameters.resourceGroupName1, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", - serializer + serializer, }; const listRoleBindingsOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/access/default/listRoleBindings", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/access/default/listRoleBindings", httpMethod: "POST", responses: { 200: { - bodyMapper: Mappers.AccessListRoleBindingsSuccessResponse + bodyMapper: Mappers.AccessListRoleBindingsSuccessResponse, }, default: { - bodyMapper: Mappers.ResourceProviderDefaultErrorResponse - } + bodyMapper: Mappers.ResourceProviderDefaultErrorResponse, + }, }, - requestBody: Parameters.body4, + requestBody: Parameters.body3, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.organizationName + Parameters.organizationName, + Parameters.resourceGroupName1, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; +const createRoleBindingOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/access/default/createRoleBinding", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.RoleBindingRecord, + }, + default: { + bodyMapper: Mappers.ResourceProviderDefaultErrorResponse, + }, + }, + requestBody: Parameters.body7, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.organizationName, + Parameters.resourceGroupName1, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; +const deleteRoleBindingOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/access/default/deleteRoleBinding/{roleBindingId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ResourceProviderDefaultErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.organizationName, + Parameters.resourceGroupName1, + Parameters.roleBindingId, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listRoleBindingNameListOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/access/default/listRoleBindingNameList", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.AccessRoleBindingNameListSuccessResponse, + }, + default: { + bodyMapper: Mappers.ResourceProviderDefaultErrorResponse, + }, + }, + requestBody: Parameters.body3, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.organizationName, + Parameters.resourceGroupName1, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", - serializer + serializer, }; diff --git a/sdk/confluent/arm-confluent/src/operations/marketplaceAgreements.ts b/sdk/confluent/arm-confluent/src/operations/marketplaceAgreements.ts index 46c19792efda..16a2a9f9f2f4 100644 --- a/sdk/confluent/arm-confluent/src/operations/marketplaceAgreements.ts +++ b/sdk/confluent/arm-confluent/src/operations/marketplaceAgreements.ts @@ -20,7 +20,7 @@ import { MarketplaceAgreementsListResponse, MarketplaceAgreementsCreateOptionalParams, MarketplaceAgreementsCreateResponse, - MarketplaceAgreementsListNextResponse + MarketplaceAgreementsListNextResponse, } from "../models"; /// @@ -41,7 +41,7 @@ export class MarketplaceAgreementsImpl implements MarketplaceAgreements { * @param options The options parameters. */ public list( - options?: MarketplaceAgreementsListOptionalParams + options?: MarketplaceAgreementsListOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listPagingAll(options); return { @@ -56,13 +56,13 @@ export class MarketplaceAgreementsImpl implements MarketplaceAgreements { throw new Error("maxPageSize is not supported by this operation."); } return this.listPagingPage(options, settings); - } + }, }; } private async *listPagingPage( options?: MarketplaceAgreementsListOptionalParams, - settings?: PageSettings + settings?: PageSettings, ): AsyncIterableIterator { let result: MarketplaceAgreementsListResponse; let continuationToken = settings?.continuationToken; @@ -83,7 +83,7 @@ export class MarketplaceAgreementsImpl implements MarketplaceAgreements { } private async *listPagingAll( - options?: MarketplaceAgreementsListOptionalParams + options?: MarketplaceAgreementsListOptionalParams, ): AsyncIterableIterator { for await (const page of this.listPagingPage(options)) { yield* page; @@ -95,7 +95,7 @@ export class MarketplaceAgreementsImpl implements MarketplaceAgreements { * @param options The options parameters. */ private _list( - options?: MarketplaceAgreementsListOptionalParams + options?: MarketplaceAgreementsListOptionalParams, ): Promise { return this.client.sendOperationRequest({ options }, listOperationSpec); } @@ -105,7 +105,7 @@ export class MarketplaceAgreementsImpl implements MarketplaceAgreements { * @param options The options parameters. */ create( - options?: MarketplaceAgreementsCreateOptionalParams + options?: MarketplaceAgreementsCreateOptionalParams, ): Promise { return this.client.sendOperationRequest({ options }, createOperationSpec); } @@ -117,11 +117,11 @@ export class MarketplaceAgreementsImpl implements MarketplaceAgreements { */ private _listNext( nextLink: string, - options?: MarketplaceAgreementsListNextOptionalParams + options?: MarketplaceAgreementsListNextOptionalParams, ): Promise { return this.client.sendOperationRequest( { nextLink, options }, - listNextOperationSpec + listNextOperationSpec, ); } } @@ -129,57 +129,55 @@ export class MarketplaceAgreementsImpl implements MarketplaceAgreements { const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.Confluent/agreements", + path: "/subscriptions/{subscriptionId}/providers/Microsoft.Confluent/agreements", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ConfluentAgreementResourceListResponse + bodyMapper: Mappers.ConfluentAgreementResourceListResponse, }, default: { - bodyMapper: Mappers.ResourceProviderDefaultErrorResponse - } + bodyMapper: Mappers.ResourceProviderDefaultErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.$host, Parameters.subscriptionId], headerParameters: [Parameters.accept], - serializer + serializer, }; const createOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.Confluent/agreements/default", + path: "/subscriptions/{subscriptionId}/providers/Microsoft.Confluent/agreements/default", httpMethod: "PUT", responses: { 200: { - bodyMapper: Mappers.ConfluentAgreementResource + bodyMapper: Mappers.ConfluentAgreementResource, }, default: { - bodyMapper: Mappers.ResourceProviderDefaultErrorResponse - } + bodyMapper: Mappers.ResourceProviderDefaultErrorResponse, + }, }, requestBody: Parameters.body, queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.$host, Parameters.subscriptionId], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", - serializer + serializer, }; const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ConfluentAgreementResourceListResponse + bodyMapper: Mappers.ConfluentAgreementResourceListResponse, }, default: { - bodyMapper: Mappers.ResourceProviderDefaultErrorResponse - } + bodyMapper: Mappers.ResourceProviderDefaultErrorResponse, + }, }, urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.nextLink + Parameters.nextLink, ], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/confluent/arm-confluent/src/operations/organization.ts b/sdk/confluent/arm-confluent/src/operations/organization.ts index 6b33d189256a..6516a46b7943 100644 --- a/sdk/confluent/arm-confluent/src/operations/organization.ts +++ b/sdk/confluent/arm-confluent/src/operations/organization.ts @@ -16,7 +16,7 @@ import { ConfluentManagementClient } from "../confluentManagementClient"; import { SimplePollerLike, OperationState, - createHttpPoller + createHttpPoller, } from "@azure/core-lro"; import { createLroSpec } from "../lroImpl"; import { @@ -27,6 +27,18 @@ import { OrganizationListByResourceGroupNextOptionalParams, OrganizationListByResourceGroupOptionalParams, OrganizationListByResourceGroupResponse, + SCEnvironmentRecord, + OrganizationListEnvironmentsNextOptionalParams, + OrganizationListEnvironmentsOptionalParams, + OrganizationListEnvironmentsResponse, + SCClusterRecord, + OrganizationListClustersNextOptionalParams, + OrganizationListClustersOptionalParams, + OrganizationListClustersResponse, + SchemaRegistryClusterRecord, + OrganizationListSchemaRegistryClustersNextOptionalParams, + OrganizationListSchemaRegistryClustersOptionalParams, + OrganizationListSchemaRegistryClustersResponse, OrganizationGetOptionalParams, OrganizationGetResponse, OrganizationCreateOptionalParams, @@ -34,8 +46,26 @@ import { OrganizationUpdateOptionalParams, OrganizationUpdateResponse, OrganizationDeleteOptionalParams, + OrganizationGetEnvironmentByIdOptionalParams, + OrganizationGetEnvironmentByIdResponse, + ListAccessRequestModel, + OrganizationListRegionsOptionalParams, + OrganizationListRegionsResponse, + CreateAPIKeyModel, + OrganizationCreateAPIKeyOptionalParams, + OrganizationCreateAPIKeyResponse, + OrganizationDeleteClusterAPIKeyOptionalParams, + OrganizationGetClusterAPIKeyOptionalParams, + OrganizationGetClusterAPIKeyResponse, + OrganizationGetSchemaRegistryClusterByIdOptionalParams, + OrganizationGetSchemaRegistryClusterByIdResponse, + OrganizationGetClusterByIdOptionalParams, + OrganizationGetClusterByIdResponse, OrganizationListBySubscriptionNextResponse, - OrganizationListByResourceGroupNextResponse + OrganizationListByResourceGroupNextResponse, + OrganizationListEnvironmentsNextResponse, + OrganizationListClustersNextResponse, + OrganizationListSchemaRegistryClustersNextResponse, } from "../models"; /// @@ -56,7 +86,7 @@ export class OrganizationImpl implements Organization { * @param options The options parameters. */ public listBySubscription( - options?: OrganizationListBySubscriptionOptionalParams + options?: OrganizationListBySubscriptionOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listBySubscriptionPagingAll(options); return { @@ -71,13 +101,13 @@ export class OrganizationImpl implements Organization { throw new Error("maxPageSize is not supported by this operation."); } return this.listBySubscriptionPagingPage(options, settings); - } + }, }; } private async *listBySubscriptionPagingPage( options?: OrganizationListBySubscriptionOptionalParams, - settings?: PageSettings + settings?: PageSettings, ): AsyncIterableIterator { let result: OrganizationListBySubscriptionResponse; let continuationToken = settings?.continuationToken; @@ -98,7 +128,7 @@ export class OrganizationImpl implements Organization { } private async *listBySubscriptionPagingAll( - options?: OrganizationListBySubscriptionOptionalParams + options?: OrganizationListBySubscriptionOptionalParams, ): AsyncIterableIterator { for await (const page of this.listBySubscriptionPagingPage(options)) { yield* page; @@ -107,12 +137,12 @@ export class OrganizationImpl implements Organization { /** * List all Organizations under the specified resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name * @param options The options parameters. */ public listByResourceGroup( resourceGroupName: string, - options?: OrganizationListByResourceGroupOptionalParams + options?: OrganizationListByResourceGroupOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); return { @@ -129,16 +159,16 @@ export class OrganizationImpl implements Organization { return this.listByResourceGroupPagingPage( resourceGroupName, options, - settings + settings, ); - } + }, }; } private async *listByResourceGroupPagingPage( resourceGroupName: string, options?: OrganizationListByResourceGroupOptionalParams, - settings?: PageSettings + settings?: PageSettings, ): AsyncIterableIterator { let result: OrganizationListByResourceGroupResponse; let continuationToken = settings?.continuationToken; @@ -153,7 +183,7 @@ export class OrganizationImpl implements Organization { result = await this._listByResourceGroupNext( resourceGroupName, continuationToken, - options + options, ); continuationToken = result.nextLink; let page = result.value || []; @@ -164,11 +194,281 @@ export class OrganizationImpl implements Organization { private async *listByResourceGroupPagingAll( resourceGroupName: string, - options?: OrganizationListByResourceGroupOptionalParams + options?: OrganizationListByResourceGroupOptionalParams, ): AsyncIterableIterator { for await (const page of this.listByResourceGroupPagingPage( resourceGroupName, - options + options, + )) { + yield* page; + } + } + + /** + * Lists of all the environments in a organization + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name + * @param options The options parameters. + */ + public listEnvironments( + resourceGroupName: string, + organizationName: string, + options?: OrganizationListEnvironmentsOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listEnvironmentsPagingAll( + resourceGroupName, + organizationName, + options, + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listEnvironmentsPagingPage( + resourceGroupName, + organizationName, + options, + settings, + ); + }, + }; + } + + private async *listEnvironmentsPagingPage( + resourceGroupName: string, + organizationName: string, + options?: OrganizationListEnvironmentsOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: OrganizationListEnvironmentsResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listEnvironments( + resourceGroupName, + organizationName, + options, + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listEnvironmentsNext( + resourceGroupName, + organizationName, + continuationToken, + options, + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listEnvironmentsPagingAll( + resourceGroupName: string, + organizationName: string, + options?: OrganizationListEnvironmentsOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listEnvironmentsPagingPage( + resourceGroupName, + organizationName, + options, + )) { + yield* page; + } + } + + /** + * Lists of all the clusters in a environment + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name + * @param environmentId Confluent environment id + * @param options The options parameters. + */ + public listClusters( + resourceGroupName: string, + organizationName: string, + environmentId: string, + options?: OrganizationListClustersOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listClustersPagingAll( + resourceGroupName, + organizationName, + environmentId, + options, + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listClustersPagingPage( + resourceGroupName, + organizationName, + environmentId, + options, + settings, + ); + }, + }; + } + + private async *listClustersPagingPage( + resourceGroupName: string, + organizationName: string, + environmentId: string, + options?: OrganizationListClustersOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: OrganizationListClustersResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listClusters( + resourceGroupName, + organizationName, + environmentId, + options, + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listClustersNext( + resourceGroupName, + organizationName, + environmentId, + continuationToken, + options, + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listClustersPagingAll( + resourceGroupName: string, + organizationName: string, + environmentId: string, + options?: OrganizationListClustersOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listClustersPagingPage( + resourceGroupName, + organizationName, + environmentId, + options, + )) { + yield* page; + } + } + + /** + * Get schema registry clusters + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name + * @param environmentId Confluent environment id + * @param options The options parameters. + */ + public listSchemaRegistryClusters( + resourceGroupName: string, + organizationName: string, + environmentId: string, + options?: OrganizationListSchemaRegistryClustersOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listSchemaRegistryClustersPagingAll( + resourceGroupName, + organizationName, + environmentId, + options, + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listSchemaRegistryClustersPagingPage( + resourceGroupName, + organizationName, + environmentId, + options, + settings, + ); + }, + }; + } + + private async *listSchemaRegistryClustersPagingPage( + resourceGroupName: string, + organizationName: string, + environmentId: string, + options?: OrganizationListSchemaRegistryClustersOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: OrganizationListSchemaRegistryClustersResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listSchemaRegistryClusters( + resourceGroupName, + organizationName, + environmentId, + options, + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listSchemaRegistryClustersNext( + resourceGroupName, + organizationName, + environmentId, + continuationToken, + options, + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listSchemaRegistryClustersPagingAll( + resourceGroupName: string, + organizationName: string, + environmentId: string, + options?: OrganizationListSchemaRegistryClustersOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listSchemaRegistryClustersPagingPage( + resourceGroupName, + organizationName, + environmentId, + options, )) { yield* page; } @@ -179,56 +479,56 @@ export class OrganizationImpl implements Organization { * @param options The options parameters. */ private _listBySubscription( - options?: OrganizationListBySubscriptionOptionalParams + options?: OrganizationListBySubscriptionOptionalParams, ): Promise { return this.client.sendOperationRequest( { options }, - listBySubscriptionOperationSpec + listBySubscriptionOperationSpec, ); } /** * List all Organizations under the specified resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name * @param options The options parameters. */ private _listByResourceGroup( resourceGroupName: string, - options?: OrganizationListByResourceGroupOptionalParams + options?: OrganizationListByResourceGroupOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, options }, - listByResourceGroupOperationSpec + listByResourceGroupOperationSpec, ); } /** * Get the properties of a specific Organization resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name * @param organizationName Organization resource name * @param options The options parameters. */ get( resourceGroupName: string, organizationName: string, - options?: OrganizationGetOptionalParams + options?: OrganizationGetOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, organizationName, options }, - getOperationSpec + getOperationSpec, ); } /** * Create Organization resource - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name * @param organizationName Organization resource name * @param options The options parameters. */ async beginCreate( resourceGroupName: string, organizationName: string, - options?: OrganizationCreateOptionalParams + options?: OrganizationCreateOptionalParams, ): Promise< SimplePollerLike< OperationState, @@ -237,21 +537,20 @@ export class OrganizationImpl implements Organization { > { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -260,8 +559,8 @@ export class OrganizationImpl implements Organization { ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -269,15 +568,15 @@ export class OrganizationImpl implements Organization { rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; const lro = createLroSpec({ sendOperationFn, args: { resourceGroupName, organizationName, options }, - spec: createOperationSpec + spec: createOperationSpec, }); const poller = await createHttpPoller< OrganizationCreateResponse, @@ -285,7 +584,7 @@ export class OrganizationImpl implements Organization { >(lro, { restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation", }); await poller.poll(); return poller; @@ -293,68 +592,67 @@ export class OrganizationImpl implements Organization { /** * Create Organization resource - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name * @param organizationName Organization resource name * @param options The options parameters. */ async beginCreateAndWait( resourceGroupName: string, organizationName: string, - options?: OrganizationCreateOptionalParams + options?: OrganizationCreateOptionalParams, ): Promise { const poller = await this.beginCreate( resourceGroupName, organizationName, - options + options, ); return poller.pollUntilDone(); } /** * Update Organization resource - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name * @param organizationName Organization resource name * @param options The options parameters. */ update( resourceGroupName: string, organizationName: string, - options?: OrganizationUpdateOptionalParams + options?: OrganizationUpdateOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, organizationName, options }, - updateOperationSpec + updateOperationSpec, ); } /** * Delete Organization resource - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name * @param organizationName Organization resource name * @param options The options parameters. */ async beginDelete( resourceGroupName: string, organizationName: string, - options?: OrganizationDeleteOptionalParams + options?: OrganizationDeleteOptionalParams, ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -363,8 +661,8 @@ export class OrganizationImpl implements Organization { ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -372,20 +670,20 @@ export class OrganizationImpl implements Organization { rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; const lro = createLroSpec({ sendOperationFn, args: { resourceGroupName, organizationName, options }, - spec: deleteOperationSpec + spec: deleteOperationSpec, }); const poller = await createHttpPoller>(lro, { restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location" + resourceLocationConfig: "location", }); await poller.poll(); return poller; @@ -393,138 +691,412 @@ export class OrganizationImpl implements Organization { /** * Delete Organization resource - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name * @param organizationName Organization resource name * @param options The options parameters. */ async beginDeleteAndWait( resourceGroupName: string, organizationName: string, - options?: OrganizationDeleteOptionalParams + options?: OrganizationDeleteOptionalParams, ): Promise { const poller = await this.beginDelete( resourceGroupName, organizationName, - options + options, ); return poller.pollUntilDone(); } /** - * ListBySubscriptionNext - * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. + * Lists of all the environments in a organization + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name * @param options The options parameters. */ - private _listBySubscriptionNext( - nextLink: string, - options?: OrganizationListBySubscriptionNextOptionalParams - ): Promise { + private _listEnvironments( + resourceGroupName: string, + organizationName: string, + options?: OrganizationListEnvironmentsOptionalParams, + ): Promise { return this.client.sendOperationRequest( - { nextLink, options }, - listBySubscriptionNextOperationSpec + { resourceGroupName, organizationName, options }, + listEnvironmentsOperationSpec, ); } /** - * ListByResourceGroupNext + * Get Environment details by environment Id * @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 organizationName Organization resource name + * @param environmentId Confluent environment id * @param options The options parameters. */ - private _listByResourceGroupNext( + getEnvironmentById( resourceGroupName: string, - nextLink: string, - options?: OrganizationListByResourceGroupNextOptionalParams - ): Promise { + organizationName: string, + environmentId: string, + options?: OrganizationGetEnvironmentByIdOptionalParams, + ): Promise { return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listByResourceGroupNextOperationSpec + { resourceGroupName, organizationName, environmentId, options }, + getEnvironmentByIdOperationSpec, ); } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); -const listBySubscriptionOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.Confluent/organizations", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.OrganizationResourceListResult - }, - default: { - bodyMapper: Mappers.ResourceProviderDefaultErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer -}; -const listByResourceGroupOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.OrganizationResourceListResult - }, - default: { - bodyMapper: Mappers.ResourceProviderDefaultErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName - ], - headerParameters: [Parameters.accept], - serializer -}; -const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.OrganizationResource - }, - default: { - bodyMapper: Mappers.ResourceProviderDefaultErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ + /** + * Lists of all the clusters in a environment + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name + * @param environmentId Confluent environment id + * @param options The options parameters. + */ + private _listClusters( + resourceGroupName: string, + organizationName: string, + environmentId: string, + options?: OrganizationListClustersOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, organizationName, environmentId, options }, + listClustersOperationSpec, + ); + } + + /** + * Get schema registry clusters + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name + * @param environmentId Confluent environment id + * @param options The options parameters. + */ + private _listSchemaRegistryClusters( + resourceGroupName: string, + organizationName: string, + environmentId: string, + options?: OrganizationListSchemaRegistryClustersOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, organizationName, environmentId, options }, + listSchemaRegistryClustersOperationSpec, + ); + } + + /** + * cloud provider regions available for creating Schema Registry clusters. + * @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. + */ + listRegions( + resourceGroupName: string, + organizationName: string, + body: ListAccessRequestModel, + options?: OrganizationListRegionsOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, organizationName, body, options }, + listRegionsOperationSpec, + ); + } + + /** + * Creates API key for a schema registry Cluster ID or Kafka Cluster ID under a environment + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name + * @param environmentId Confluent environment id + * @param clusterId Confluent kafka or schema registry cluster id + * @param body Request payload for get creating API Key for schema registry Cluster ID or Kafka Cluster + * ID under a environment + * @param options The options parameters. + */ + createAPIKey( + resourceGroupName: string, + organizationName: string, + environmentId: string, + clusterId: string, + body: CreateAPIKeyModel, + options?: OrganizationCreateAPIKeyOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + organizationName, + environmentId, + clusterId, + body, + options, + }, + createAPIKeyOperationSpec, + ); + } + + /** + * Deletes API key of a kafka or schema registry cluster + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name + * @param apiKeyId Confluent API Key id + * @param options The options parameters. + */ + deleteClusterAPIKey( + resourceGroupName: string, + organizationName: string, + apiKeyId: string, + options?: OrganizationDeleteClusterAPIKeyOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, organizationName, apiKeyId, options }, + deleteClusterAPIKeyOperationSpec, + ); + } + + /** + * Get API key details of a kafka or schema registry cluster + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name + * @param apiKeyId Confluent API Key id + * @param options The options parameters. + */ + getClusterAPIKey( + resourceGroupName: string, + organizationName: string, + apiKeyId: string, + options?: OrganizationGetClusterAPIKeyOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, organizationName, apiKeyId, options }, + getClusterAPIKeyOperationSpec, + ); + } + + /** + * Get schema registry cluster by Id + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name + * @param environmentId Confluent environment id + * @param clusterId Confluent kafka or schema registry cluster id + * @param options The options parameters. + */ + getSchemaRegistryClusterById( + resourceGroupName: string, + organizationName: string, + environmentId: string, + clusterId: string, + options?: OrganizationGetSchemaRegistryClusterByIdOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + organizationName, + environmentId, + clusterId, + options, + }, + getSchemaRegistryClusterByIdOperationSpec, + ); + } + + /** + * Get cluster by Id + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name + * @param environmentId Confluent environment id + * @param clusterId Confluent kafka or schema registry cluster id + * @param options The options parameters. + */ + getClusterById( + resourceGroupName: string, + organizationName: string, + environmentId: string, + clusterId: string, + options?: OrganizationGetClusterByIdOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + organizationName, + environmentId, + clusterId, + options, + }, + getClusterByIdOperationSpec, + ); + } + + /** + * 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 { + 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 { + return this.client.sendOperationRequest( + { resourceGroupName, nextLink, options }, + listByResourceGroupNextOperationSpec, + ); + } + + /** + * ListEnvironmentsNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name + * @param nextLink The nextLink from the previous successful call to the ListEnvironments method. + * @param options The options parameters. + */ + private _listEnvironmentsNext( + resourceGroupName: string, + organizationName: string, + nextLink: string, + options?: OrganizationListEnvironmentsNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, organizationName, nextLink, options }, + listEnvironmentsNextOperationSpec, + ); + } + + /** + * ListClustersNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name + * @param environmentId Confluent environment id + * @param nextLink The nextLink from the previous successful call to the ListClusters method. + * @param options The options parameters. + */ + private _listClustersNext( + resourceGroupName: string, + organizationName: string, + environmentId: string, + nextLink: string, + options?: OrganizationListClustersNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, organizationName, environmentId, nextLink, options }, + listClustersNextOperationSpec, + ); + } + + /** + * ListSchemaRegistryClustersNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name + * @param environmentId Confluent environment id + * @param nextLink The nextLink from the previous successful call to the ListSchemaRegistryClusters + * method. + * @param options The options parameters. + */ + private _listSchemaRegistryClustersNext( + resourceGroupName: string, + organizationName: string, + environmentId: string, + nextLink: string, + options?: OrganizationListSchemaRegistryClustersNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, organizationName, environmentId, nextLink, options }, + listSchemaRegistryClustersNextOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listBySubscriptionOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/providers/Microsoft.Confluent/organizations", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.OrganizationResourceListResult, + }, + default: { + bodyMapper: Mappers.ResourceProviderDefaultErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer, +}; +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.OrganizationResourceListResult, + }, + default: { + bodyMapper: Mappers.ResourceProviderDefaultErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const getOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.OrganizationResource, + }, + default: { + bodyMapper: Mappers.ResourceProviderDefaultErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.organizationName + Parameters.organizationName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const createOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}", httpMethod: "PUT", responses: { 200: { - bodyMapper: Mappers.OrganizationResource + bodyMapper: Mappers.OrganizationResource, }, 201: { - bodyMapper: Mappers.OrganizationResource + bodyMapper: Mappers.OrganizationResource, }, 202: { - bodyMapper: Mappers.OrganizationResource + bodyMapper: Mappers.OrganizationResource, }, 204: { - bodyMapper: Mappers.OrganizationResource + bodyMapper: Mappers.OrganizationResource, }, default: { - bodyMapper: Mappers.ResourceProviderDefaultErrorResponse - } + bodyMapper: Mappers.ResourceProviderDefaultErrorResponse, + }, }, requestBody: Parameters.body1, queryParameters: [Parameters.apiVersion], @@ -532,23 +1104,22 @@ const createOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.organizationName + Parameters.organizationName, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", - serializer + serializer, }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}", httpMethod: "PATCH", responses: { 200: { - bodyMapper: Mappers.OrganizationResource + bodyMapper: Mappers.OrganizationResource, }, default: { - bodyMapper: Mappers.ResourceProviderDefaultErrorResponse - } + bodyMapper: Mappers.ResourceProviderDefaultErrorResponse, + }, }, requestBody: Parameters.body2, queryParameters: [Parameters.apiVersion], @@ -556,15 +1127,14 @@ const updateOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.organizationName + Parameters.organizationName, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", - serializer + serializer, }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}", httpMethod: "DELETE", responses: { 200: {}, @@ -572,55 +1142,356 @@ const deleteOperationSpec: coreClient.OperationSpec = { 202: {}, 204: {}, default: { - bodyMapper: Mappers.ResourceProviderDefaultErrorResponse - } + bodyMapper: Mappers.ResourceProviderDefaultErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.organizationName + Parameters.organizationName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listEnvironmentsOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GetEnvironmentsResponse, + }, + default: { + bodyMapper: Mappers.ResourceProviderDefaultErrorResponse, + }, + }, + queryParameters: [ + Parameters.apiVersion, + Parameters.pageSize, + Parameters.pageToken, + ], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.organizationName, + Parameters.resourceGroupName1, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const getEnvironmentByIdOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SCEnvironmentRecord, + }, + default: { + bodyMapper: Mappers.ResourceProviderDefaultErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.organizationName, + Parameters.resourceGroupName1, + Parameters.environmentId, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listClustersOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ListClustersSuccessResponse, + }, + default: { + bodyMapper: Mappers.ResourceProviderDefaultErrorResponse, + }, + }, + queryParameters: [ + Parameters.apiVersion, + Parameters.pageSize, + Parameters.pageToken, + ], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.organizationName, + Parameters.resourceGroupName1, + Parameters.environmentId, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listSchemaRegistryClustersOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/schemaRegistryClusters", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ListSchemaRegistryClustersResponse, + }, + default: { + bodyMapper: Mappers.ResourceProviderDefaultErrorResponse, + }, + }, + queryParameters: [ + Parameters.apiVersion, + Parameters.pageSize, + Parameters.pageToken, + ], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.organizationName, + Parameters.resourceGroupName1, + Parameters.environmentId, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listRegionsOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/listRegions", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.ListRegionsSuccessResponse, + }, + default: { + bodyMapper: Mappers.ResourceProviderDefaultErrorResponse, + }, + }, + requestBody: Parameters.body3, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.organizationName, + Parameters.resourceGroupName1, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; +const createAPIKeyOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId}/createAPIKey", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.APIKeyRecord, + }, + default: { + bodyMapper: Mappers.ResourceProviderDefaultErrorResponse, + }, + }, + requestBody: Parameters.body4, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.organizationName, + Parameters.resourceGroupName1, + Parameters.environmentId, + Parameters.clusterId, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; +const deleteClusterAPIKeyOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/apiKeys/{apiKeyId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ResourceProviderDefaultErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.organizationName, + Parameters.resourceGroupName1, + Parameters.apiKeyId, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const getClusterAPIKeyOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/apiKeys/{apiKeyId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.APIKeyRecord, + }, + default: { + bodyMapper: Mappers.ResourceProviderDefaultErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.organizationName, + Parameters.resourceGroupName1, + Parameters.apiKeyId, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const getSchemaRegistryClusterByIdOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/schemaRegistryClusters/{clusterId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SchemaRegistryClusterRecord, + }, + default: { + bodyMapper: Mappers.ResourceProviderDefaultErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.organizationName, + Parameters.resourceGroupName1, + Parameters.environmentId, + Parameters.clusterId, ], headerParameters: [Parameters.accept], - serializer + serializer, +}; +const getClusterByIdOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SCClusterRecord, + }, + default: { + bodyMapper: Mappers.ResourceProviderDefaultErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.organizationName, + Parameters.resourceGroupName1, + Parameters.environmentId, + Parameters.clusterId, + ], + headerParameters: [Parameters.accept], + serializer, }; const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.OrganizationResourceListResult + bodyMapper: Mappers.OrganizationResourceListResult, }, default: { - bodyMapper: Mappers.ResourceProviderDefaultErrorResponse - } + bodyMapper: Mappers.ResourceProviderDefaultErrorResponse, + }, }, urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.nextLink + Parameters.nextLink, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.OrganizationResourceListResult + bodyMapper: Mappers.OrganizationResourceListResult, }, default: { - bodyMapper: Mappers.ResourceProviderDefaultErrorResponse - } + bodyMapper: Mappers.ResourceProviderDefaultErrorResponse, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.resourceGroupName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listEnvironmentsNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GetEnvironmentsResponse, + }, + default: { + bodyMapper: Mappers.ResourceProviderDefaultErrorResponse, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.organizationName, + Parameters.resourceGroupName1, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listClustersNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ListClustersSuccessResponse, + }, + default: { + bodyMapper: Mappers.ResourceProviderDefaultErrorResponse, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.organizationName, + Parameters.resourceGroupName1, + Parameters.environmentId, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listSchemaRegistryClustersNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ListSchemaRegistryClustersResponse, + }, + default: { + bodyMapper: Mappers.ResourceProviderDefaultErrorResponse, + }, }, urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.nextLink, - Parameters.resourceGroupName + Parameters.organizationName, + Parameters.resourceGroupName1, + Parameters.environmentId, ], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/confluent/arm-confluent/src/operations/organizationOperations.ts b/sdk/confluent/arm-confluent/src/operations/organizationOperations.ts index c08118fd9537..31d44497c459 100644 --- a/sdk/confluent/arm-confluent/src/operations/organizationOperations.ts +++ b/sdk/confluent/arm-confluent/src/operations/organizationOperations.ts @@ -18,7 +18,7 @@ import { OrganizationOperationsListNextOptionalParams, OrganizationOperationsListOptionalParams, OrganizationOperationsListResponse, - OrganizationOperationsListNextResponse + OrganizationOperationsListNextResponse, } from "../models"; /// @@ -39,7 +39,7 @@ export class OrganizationOperationsImpl implements OrganizationOperations { * @param options The options parameters. */ public list( - options?: OrganizationOperationsListOptionalParams + options?: OrganizationOperationsListOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listPagingAll(options); return { @@ -54,13 +54,13 @@ export class OrganizationOperationsImpl implements OrganizationOperations { throw new Error("maxPageSize is not supported by this operation."); } return this.listPagingPage(options, settings); - } + }, }; } private async *listPagingPage( options?: OrganizationOperationsListOptionalParams, - settings?: PageSettings + settings?: PageSettings, ): AsyncIterableIterator { let result: OrganizationOperationsListResponse; let continuationToken = settings?.continuationToken; @@ -81,7 +81,7 @@ export class OrganizationOperationsImpl implements OrganizationOperations { } private async *listPagingAll( - options?: OrganizationOperationsListOptionalParams + options?: OrganizationOperationsListOptionalParams, ): AsyncIterableIterator { for await (const page of this.listPagingPage(options)) { yield* page; @@ -93,7 +93,7 @@ export class OrganizationOperationsImpl implements OrganizationOperations { * @param options The options parameters. */ private _list( - options?: OrganizationOperationsListOptionalParams + options?: OrganizationOperationsListOptionalParams, ): Promise { return this.client.sendOperationRequest({ options }, listOperationSpec); } @@ -105,11 +105,11 @@ export class OrganizationOperationsImpl implements OrganizationOperations { */ private _listNext( nextLink: string, - options?: OrganizationOperationsListNextOptionalParams + options?: OrganizationOperationsListNextOptionalParams, ): Promise { return this.client.sendOperationRequest( { nextLink, options }, - listNextOperationSpec + listNextOperationSpec, ); } } @@ -121,29 +121,29 @@ const listOperationSpec: coreClient.OperationSpec = { httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.OperationListResult + bodyMapper: Mappers.OperationListResult, }, default: { - bodyMapper: Mappers.ResourceProviderDefaultErrorResponse - } + bodyMapper: Mappers.ResourceProviderDefaultErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.$host], headerParameters: [Parameters.accept], - serializer + serializer, }; const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.OperationListResult + bodyMapper: Mappers.OperationListResult, }, default: { - bodyMapper: Mappers.ResourceProviderDefaultErrorResponse - } + bodyMapper: Mappers.ResourceProviderDefaultErrorResponse, + }, }, urlParameters: [Parameters.$host, Parameters.nextLink], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/confluent/arm-confluent/src/operations/validations.ts b/sdk/confluent/arm-confluent/src/operations/validations.ts index 981bbeecc9eb..d8fcf37f73f1 100644 --- a/sdk/confluent/arm-confluent/src/operations/validations.ts +++ b/sdk/confluent/arm-confluent/src/operations/validations.ts @@ -16,7 +16,7 @@ import { ValidationsValidateOrganizationOptionalParams, ValidationsValidateOrganizationResponse, ValidationsValidateOrganizationV2OptionalParams, - ValidationsValidateOrganizationV2Response + ValidationsValidateOrganizationV2Response, } from "../models"; /** Class containing Validations operations. */ @@ -33,7 +33,7 @@ export class ValidationsImpl implements Validations { /** * Organization Validate proxy resource - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name * @param organizationName Organization resource name * @param body Organization resource model * @param options The options parameters. @@ -42,17 +42,17 @@ export class ValidationsImpl implements Validations { resourceGroupName: string, organizationName: string, body: OrganizationResource, - options?: ValidationsValidateOrganizationOptionalParams + options?: ValidationsValidateOrganizationOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, organizationName, body, options }, - validateOrganizationOperationSpec + validateOrganizationOperationSpec, ); } /** * Organization Validate proxy resource - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name * @param organizationName Organization resource name * @param body Organization resource model * @param options The options parameters. @@ -61,11 +61,11 @@ export class ValidationsImpl implements Validations { resourceGroupName: string, organizationName: string, body: OrganizationResource, - options?: ValidationsValidateOrganizationV2OptionalParams + options?: ValidationsValidateOrganizationV2OptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, organizationName, body, options }, - validateOrganizationV2OperationSpec + validateOrganizationV2OperationSpec, ); } } @@ -73,50 +73,48 @@ export class ValidationsImpl implements Validations { const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const validateOrganizationOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/validations/{organizationName}/orgvalidate", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/validations/{organizationName}/orgvalidate", httpMethod: "POST", responses: { 200: { - bodyMapper: Mappers.OrganizationResource + bodyMapper: Mappers.OrganizationResource, }, default: { - bodyMapper: Mappers.ResourceProviderDefaultErrorResponse - } + bodyMapper: Mappers.ResourceProviderDefaultErrorResponse, + }, }, - requestBody: Parameters.body3, + requestBody: Parameters.body5, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.organizationName + Parameters.organizationName, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", - serializer + serializer, }; const validateOrganizationV2OperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/validations/{organizationName}/orgvalidateV2", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/validations/{organizationName}/orgvalidateV2", httpMethod: "POST", responses: { 200: { - bodyMapper: Mappers.ValidationResponse + bodyMapper: Mappers.ValidationResponse, }, default: { - bodyMapper: Mappers.ResourceProviderDefaultErrorResponse - } + bodyMapper: Mappers.ResourceProviderDefaultErrorResponse, + }, }, - requestBody: Parameters.body3, + requestBody: Parameters.body5, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.organizationName + Parameters.organizationName, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", - serializer + serializer, }; diff --git a/sdk/confluent/arm-confluent/src/operationsInterfaces/access.ts b/sdk/confluent/arm-confluent/src/operationsInterfaces/access.ts index f1f8c4dd11cb..fc73c7691c87 100644 --- a/sdk/confluent/arm-confluent/src/operationsInterfaces/access.ts +++ b/sdk/confluent/arm-confluent/src/operationsInterfaces/access.ts @@ -22,14 +22,20 @@ import { AccessListClustersOptionalParams, AccessListClustersResponse, AccessListRoleBindingsOptionalParams, - AccessListRoleBindingsResponse + AccessListRoleBindingsResponse, + AccessCreateRoleBindingRequestModel, + AccessCreateRoleBindingOptionalParams, + AccessCreateRoleBindingResponse, + AccessDeleteRoleBindingOptionalParams, + AccessListRoleBindingNameListOptionalParams, + AccessListRoleBindingNameListResponse, } 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 resourceGroupName Resource group name * @param organizationName Organization resource name * @param body List Access Request Model * @param options The options parameters. @@ -38,11 +44,11 @@ export interface Access { resourceGroupName: string, organizationName: string, body: ListAccessRequestModel, - options?: AccessListUsersOptionalParams + options?: AccessListUsersOptionalParams, ): Promise; /** * Organization service accounts details - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name * @param organizationName Organization resource name * @param body List Access Request Model * @param options The options parameters. @@ -51,11 +57,11 @@ export interface Access { resourceGroupName: string, organizationName: string, body: ListAccessRequestModel, - options?: AccessListServiceAccountsOptionalParams + options?: AccessListServiceAccountsOptionalParams, ): Promise; /** * Organization accounts invitation details - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name * @param organizationName Organization resource name * @param body List Access Request Model * @param options The options parameters. @@ -64,11 +70,11 @@ export interface Access { resourceGroupName: string, organizationName: string, body: ListAccessRequestModel, - options?: AccessListInvitationsOptionalParams + options?: AccessListInvitationsOptionalParams, ): Promise; /** * Invite user to the organization - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name * @param organizationName Organization resource name * @param body Invite user account model * @param options The options parameters. @@ -77,7 +83,7 @@ export interface Access { resourceGroupName: string, organizationName: string, body: AccessInviteUserAccountModel, - options?: AccessInviteUserOptionalParams + options?: AccessInviteUserOptionalParams, ): Promise; /** * Environment list of an organization @@ -90,7 +96,7 @@ export interface Access { resourceGroupName: string, organizationName: string, body: ListAccessRequestModel, - options?: AccessListEnvironmentsOptionalParams + options?: AccessListEnvironmentsOptionalParams, ): Promise; /** * Cluster details @@ -103,7 +109,7 @@ export interface Access { resourceGroupName: string, organizationName: string, body: ListAccessRequestModel, - options?: AccessListClustersOptionalParams + options?: AccessListClustersOptionalParams, ): Promise; /** * Organization role bindings @@ -116,6 +122,45 @@ export interface Access { resourceGroupName: string, organizationName: string, body: ListAccessRequestModel, - options?: AccessListRoleBindingsOptionalParams + options?: AccessListRoleBindingsOptionalParams, ): Promise; + /** + * Organization role bindings + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name + * @param body Create role binding Request Model + * @param options The options parameters. + */ + createRoleBinding( + resourceGroupName: string, + organizationName: string, + body: AccessCreateRoleBindingRequestModel, + options?: AccessCreateRoleBindingOptionalParams, + ): Promise; + /** + * Organization role bindings + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name + * @param roleBindingId Confluent Role binding id + * @param options The options parameters. + */ + deleteRoleBinding( + resourceGroupName: string, + organizationName: string, + roleBindingId: string, + options?: AccessDeleteRoleBindingOptionalParams, + ): 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. + */ + listRoleBindingNameList( + resourceGroupName: string, + organizationName: string, + body: ListAccessRequestModel, + options?: AccessListRoleBindingNameListOptionalParams, + ): Promise; } diff --git a/sdk/confluent/arm-confluent/src/operationsInterfaces/marketplaceAgreements.ts b/sdk/confluent/arm-confluent/src/operationsInterfaces/marketplaceAgreements.ts index 8a1c45da778c..18f64ec69431 100644 --- a/sdk/confluent/arm-confluent/src/operationsInterfaces/marketplaceAgreements.ts +++ b/sdk/confluent/arm-confluent/src/operationsInterfaces/marketplaceAgreements.ts @@ -11,7 +11,7 @@ import { ConfluentAgreementResource, MarketplaceAgreementsListOptionalParams, MarketplaceAgreementsCreateOptionalParams, - MarketplaceAgreementsCreateResponse + MarketplaceAgreementsCreateResponse, } from "../models"; /// @@ -22,13 +22,13 @@ export interface MarketplaceAgreements { * @param options The options parameters. */ list( - options?: MarketplaceAgreementsListOptionalParams + options?: MarketplaceAgreementsListOptionalParams, ): PagedAsyncIterableIterator; /** * Create Confluent Marketplace agreement in the subscription. * @param options The options parameters. */ create( - options?: MarketplaceAgreementsCreateOptionalParams + options?: MarketplaceAgreementsCreateOptionalParams, ): Promise; } diff --git a/sdk/confluent/arm-confluent/src/operationsInterfaces/organization.ts b/sdk/confluent/arm-confluent/src/operationsInterfaces/organization.ts index c7dca9180a76..3ad80109bea1 100644 --- a/sdk/confluent/arm-confluent/src/operationsInterfaces/organization.ts +++ b/sdk/confluent/arm-confluent/src/operationsInterfaces/organization.ts @@ -12,13 +12,34 @@ import { OrganizationResource, OrganizationListBySubscriptionOptionalParams, OrganizationListByResourceGroupOptionalParams, + SCEnvironmentRecord, + OrganizationListEnvironmentsOptionalParams, + SCClusterRecord, + OrganizationListClustersOptionalParams, + SchemaRegistryClusterRecord, + OrganizationListSchemaRegistryClustersOptionalParams, OrganizationGetOptionalParams, OrganizationGetResponse, OrganizationCreateOptionalParams, OrganizationCreateResponse, OrganizationUpdateOptionalParams, OrganizationUpdateResponse, - OrganizationDeleteOptionalParams + OrganizationDeleteOptionalParams, + OrganizationGetEnvironmentByIdOptionalParams, + OrganizationGetEnvironmentByIdResponse, + ListAccessRequestModel, + OrganizationListRegionsOptionalParams, + OrganizationListRegionsResponse, + CreateAPIKeyModel, + OrganizationCreateAPIKeyOptionalParams, + OrganizationCreateAPIKeyResponse, + OrganizationDeleteClusterAPIKeyOptionalParams, + OrganizationGetClusterAPIKeyOptionalParams, + OrganizationGetClusterAPIKeyResponse, + OrganizationGetSchemaRegistryClusterByIdOptionalParams, + OrganizationGetSchemaRegistryClusterByIdResponse, + OrganizationGetClusterByIdOptionalParams, + OrganizationGetClusterByIdResponse, } from "../models"; /// @@ -29,38 +50,75 @@ export interface Organization { * @param options The options parameters. */ listBySubscription( - options?: OrganizationListBySubscriptionOptionalParams + options?: OrganizationListBySubscriptionOptionalParams, ): PagedAsyncIterableIterator; /** * List all Organizations under the specified resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name * @param options The options parameters. */ listByResourceGroup( resourceGroupName: string, - options?: OrganizationListByResourceGroupOptionalParams + options?: OrganizationListByResourceGroupOptionalParams, ): PagedAsyncIterableIterator; /** - * Get the properties of a specific Organization resource. + * Lists of all the environments in a organization + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name + * @param options The options parameters. + */ + listEnvironments( + resourceGroupName: string, + organizationName: string, + options?: OrganizationListEnvironmentsOptionalParams, + ): PagedAsyncIterableIterator; + /** + * Lists of all the clusters in a environment + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name + * @param environmentId Confluent environment id + * @param options The options parameters. + */ + listClusters( + resourceGroupName: string, + organizationName: string, + environmentId: string, + options?: OrganizationListClustersOptionalParams, + ): PagedAsyncIterableIterator; + /** + * Get schema registry clusters * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param organizationName Organization resource name + * @param environmentId Confluent environment id + * @param options The options parameters. + */ + listSchemaRegistryClusters( + resourceGroupName: string, + organizationName: string, + environmentId: string, + options?: OrganizationListSchemaRegistryClustersOptionalParams, + ): PagedAsyncIterableIterator; + /** + * 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 + options?: OrganizationGetOptionalParams, ): Promise; /** * Create Organization resource - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name * @param organizationName Organization resource name * @param options The options parameters. */ beginCreate( resourceGroupName: string, organizationName: string, - options?: OrganizationCreateOptionalParams + options?: OrganizationCreateOptionalParams, ): Promise< SimplePollerLike< OperationState, @@ -69,46 +127,146 @@ export interface Organization { >; /** * Create Organization resource - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name * @param organizationName Organization resource name * @param options The options parameters. */ beginCreateAndWait( resourceGroupName: string, organizationName: string, - options?: OrganizationCreateOptionalParams + options?: OrganizationCreateOptionalParams, ): Promise; /** * Update Organization resource - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name * @param organizationName Organization resource name * @param options The options parameters. */ update( resourceGroupName: string, organizationName: string, - options?: OrganizationUpdateOptionalParams + options?: OrganizationUpdateOptionalParams, ): Promise; /** * Delete Organization resource - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name * @param organizationName Organization resource name * @param options The options parameters. */ beginDelete( resourceGroupName: string, organizationName: string, - options?: OrganizationDeleteOptionalParams + options?: OrganizationDeleteOptionalParams, ): Promise, void>>; /** * Delete Organization resource - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name * @param organizationName Organization resource name * @param options The options parameters. */ beginDeleteAndWait( resourceGroupName: string, organizationName: string, - options?: OrganizationDeleteOptionalParams + options?: OrganizationDeleteOptionalParams, + ): Promise; + /** + * Get Environment details by environment Id + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name + * @param environmentId Confluent environment id + * @param options The options parameters. + */ + getEnvironmentById( + resourceGroupName: string, + organizationName: string, + environmentId: string, + options?: OrganizationGetEnvironmentByIdOptionalParams, + ): Promise; + /** + * cloud provider regions available for creating Schema Registry clusters. + * @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. + */ + listRegions( + resourceGroupName: string, + organizationName: string, + body: ListAccessRequestModel, + options?: OrganizationListRegionsOptionalParams, + ): Promise; + /** + * Creates API key for a schema registry Cluster ID or Kafka Cluster ID under a environment + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name + * @param environmentId Confluent environment id + * @param clusterId Confluent kafka or schema registry cluster id + * @param body Request payload for get creating API Key for schema registry Cluster ID or Kafka Cluster + * ID under a environment + * @param options The options parameters. + */ + createAPIKey( + resourceGroupName: string, + organizationName: string, + environmentId: string, + clusterId: string, + body: CreateAPIKeyModel, + options?: OrganizationCreateAPIKeyOptionalParams, + ): Promise; + /** + * Deletes API key of a kafka or schema registry cluster + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name + * @param apiKeyId Confluent API Key id + * @param options The options parameters. + */ + deleteClusterAPIKey( + resourceGroupName: string, + organizationName: string, + apiKeyId: string, + options?: OrganizationDeleteClusterAPIKeyOptionalParams, ): Promise; + /** + * Get API key details of a kafka or schema registry cluster + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name + * @param apiKeyId Confluent API Key id + * @param options The options parameters. + */ + getClusterAPIKey( + resourceGroupName: string, + organizationName: string, + apiKeyId: string, + options?: OrganizationGetClusterAPIKeyOptionalParams, + ): Promise; + /** + * Get schema registry cluster by Id + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name + * @param environmentId Confluent environment id + * @param clusterId Confluent kafka or schema registry cluster id + * @param options The options parameters. + */ + getSchemaRegistryClusterById( + resourceGroupName: string, + organizationName: string, + environmentId: string, + clusterId: string, + options?: OrganizationGetSchemaRegistryClusterByIdOptionalParams, + ): Promise; + /** + * Get cluster by Id + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name + * @param environmentId Confluent environment id + * @param clusterId Confluent kafka or schema registry cluster id + * @param options The options parameters. + */ + getClusterById( + resourceGroupName: string, + organizationName: string, + environmentId: string, + clusterId: string, + options?: OrganizationGetClusterByIdOptionalParams, + ): Promise; } diff --git a/sdk/confluent/arm-confluent/src/operationsInterfaces/organizationOperations.ts b/sdk/confluent/arm-confluent/src/operationsInterfaces/organizationOperations.ts index 40d4e1173bfc..0e09c8177326 100644 --- a/sdk/confluent/arm-confluent/src/operationsInterfaces/organizationOperations.ts +++ b/sdk/confluent/arm-confluent/src/operationsInterfaces/organizationOperations.ts @@ -9,7 +9,7 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { OperationResult, - OrganizationOperationsListOptionalParams + OrganizationOperationsListOptionalParams, } from "../models"; /// @@ -20,6 +20,6 @@ export interface OrganizationOperations { * @param options The options parameters. */ list( - options?: OrganizationOperationsListOptionalParams + options?: OrganizationOperationsListOptionalParams, ): PagedAsyncIterableIterator; } diff --git a/sdk/confluent/arm-confluent/src/operationsInterfaces/validations.ts b/sdk/confluent/arm-confluent/src/operationsInterfaces/validations.ts index 1ec5eb5dac91..5a6a5f548bd2 100644 --- a/sdk/confluent/arm-confluent/src/operationsInterfaces/validations.ts +++ b/sdk/confluent/arm-confluent/src/operationsInterfaces/validations.ts @@ -11,14 +11,14 @@ import { ValidationsValidateOrganizationOptionalParams, ValidationsValidateOrganizationResponse, ValidationsValidateOrganizationV2OptionalParams, - ValidationsValidateOrganizationV2Response + ValidationsValidateOrganizationV2Response, } from "../models"; /** Interface representing a Validations. */ export interface Validations { /** * Organization Validate proxy resource - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name * @param organizationName Organization resource name * @param body Organization resource model * @param options The options parameters. @@ -27,11 +27,11 @@ export interface Validations { resourceGroupName: string, organizationName: string, body: OrganizationResource, - options?: ValidationsValidateOrganizationOptionalParams + options?: ValidationsValidateOrganizationOptionalParams, ): Promise; /** * Organization Validate proxy resource - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name * @param organizationName Organization resource name * @param body Organization resource model * @param options The options parameters. @@ -40,6 +40,6 @@ export interface Validations { resourceGroupName: string, organizationName: string, body: OrganizationResource, - options?: ValidationsValidateOrganizationV2OptionalParams + options?: ValidationsValidateOrganizationV2OptionalParams, ): Promise; } diff --git a/sdk/confluent/arm-confluent/src/pagingHelper.ts b/sdk/confluent/arm-confluent/src/pagingHelper.ts index 269a2b9814b5..205cccc26592 100644 --- a/sdk/confluent/arm-confluent/src/pagingHelper.ts +++ b/sdk/confluent/arm-confluent/src/pagingHelper.ts @@ -28,7 +28,7 @@ export function getContinuationToken(page: unknown): string | undefined { export function setContinuationToken( page: unknown, - continuationToken: string | undefined + continuationToken: string | undefined, ): void { if (typeof page !== "object" || page === null || !continuationToken) { return;