diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 78970280806a..392c809f4909 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -2743,7 +2743,7 @@ packages: version: 0.0.0 '@rush-temp/arm-confluent@file:projects/arm-confluent.tgz': - resolution: {integrity: sha512-LyR0wtT6/smPX+yMvftXoDVp4ZQd8jMyDyCP+LnhI605m/qTe5Fm3vupvUlXb/HV5wUSCO6CgXAMzKZ8CIjYVA==, tarball: file:projects/arm-confluent.tgz} + resolution: {integrity: sha512-756/jZc43qNMkncd8WLbTr7E0iESMxvwgwJIA9vz2Y75j1gy0fg7pOnv7VfYkDS+hEPKbFaDc8kr/riMtsbavg==, tarball: file:projects/arm-confluent.tgz} version: 0.0.0 '@rush-temp/arm-connectedcache@file:projects/arm-connectedcache.tgz': @@ -11386,17 +11386,17 @@ snapshots: dependencies: '@azure-tools/test-credential': 1.3.1 '@azure-tools/test-recorder': 3.5.2 - '@azure/abort-controller': 1.1.0 '@azure/core-lro': 2.7.2 '@types/chai': 4.3.20 '@types/mocha': 10.0.10 '@types/node': 18.19.68 chai: 4.5.0 dotenv: 16.4.7 - mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) + mocha: 10.8.2 + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) tslib: 2.8.1 - typescript: 5.7.2 + tsx: 4.19.2 + typescript: 5.6.3 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' diff --git a/sdk/confluent/arm-confluent/CHANGELOG.md b/sdk/confluent/arm-confluent/CHANGELOG.md index d87d26704c68..3767516c0562 100644 --- a/sdk/confluent/arm-confluent/CHANGELOG.md +++ b/sdk/confluent/arm-confluent/CHANGELOG.md @@ -1,15 +1,95 @@ # Release History - -## 3.1.1 (Unreleased) - + +## 3.2.0 (2024-12-24) + ### Features Added -### Breaking Changes - -### Bugs Fixed - -### Other Changes - + - Added operation group Cluster + - Added operation group Connector + - Added operation group Environment + - Added operation group Topics + - Added Interface AzureBlobStorageSinkConnectorServiceInfo + - Added Interface AzureBlobStorageSourceConnectorServiceInfo + - Added Interface AzureCosmosDBSinkConnectorServiceInfo + - Added Interface AzureCosmosDBSourceConnectorServiceInfo + - Added Interface AzureSynapseAnalyticsSinkConnectorServiceInfo + - Added Interface ClusterCreateOrUpdateOptionalParams + - Added Interface ClusterDeleteHeaders + - Added Interface ClusterDeleteOptionalParams + - Added Interface ConnectorCreateOrUpdateOptionalParams + - Added Interface ConnectorDeleteHeaders + - Added Interface ConnectorDeleteOptionalParams + - Added Interface ConnectorGetOptionalParams + - Added Interface ConnectorInfoBase + - Added Interface ConnectorListNextOptionalParams + - Added Interface ConnectorListOptionalParams + - Added Interface ConnectorResource + - Added Interface ConnectorServiceTypeInfoBase + - Added Interface EnvironmentCreateOrUpdateOptionalParams + - Added Interface EnvironmentDeleteHeaders + - Added Interface EnvironmentDeleteOptionalParams + - Added Interface ErrorAdditionalInfo + - Added Interface ErrorDetail + - Added Interface ErrorResponse + - Added Interface KafkaAzureBlobStorageSinkConnectorInfo + - Added Interface KafkaAzureBlobStorageSourceConnectorInfo + - Added Interface KafkaAzureCosmosDBSinkConnectorInfo + - Added Interface KafkaAzureCosmosDBSourceConnectorInfo + - Added Interface KafkaAzureSynapseAnalyticsSinkConnectorInfo + - Added Interface ListConnectorsSuccessResponse + - Added Interface ListTopicsSuccessResponse + - Added Interface PartnerInfoBase + - Added Interface ProxyResource + - Added Interface Resource + - Added Interface StreamGovernanceConfig + - Added Interface TopicMetadataEntity + - Added Interface TopicRecord + - Added Interface TopicsCreateOptionalParams + - Added Interface TopicsDeleteHeaders + - Added Interface TopicsDeleteOptionalParams + - Added Interface TopicsGetOptionalParams + - Added Interface TopicsInputConfig + - Added Interface TopicsListNextOptionalParams + - Added Interface TopicsListOptionalParams + - Added Interface TopicsRelatedLink + - Added Type Alias AuthType + - Added Type Alias ClusterCreateOrUpdateResponse + - Added Type Alias ClusterDeleteResponse + - Added Type Alias ConnectorClass + - Added Type Alias ConnectorCreateOrUpdateResponse + - Added Type Alias ConnectorDeleteResponse + - Added Type Alias ConnectorGetResponse + - Added Type Alias ConnectorListNextResponse + - Added Type Alias ConnectorListResponse + - Added Type Alias ConnectorServiceType + - Added Type Alias ConnectorServiceTypeInfoBaseUnion + - Added Type Alias ConnectorStatus + - Added Type Alias ConnectorType + - Added Type Alias DataFormatType + - Added Type Alias EnvironmentCreateOrUpdateResponse + - Added Type Alias EnvironmentDeleteResponse + - Added Type Alias Package + - Added Type Alias PartnerConnectorType + - Added Type Alias PartnerInfoBaseUnion + - Added Type Alias TopicsCreateResponse + - Added Type Alias TopicsDeleteResponse + - Added Type Alias TopicsGetResponse + - Added Type Alias TopicsListNextResponse + - Added Type Alias TopicsListResponse + - Interface SCClusterRecord has a new optional parameter type + - Interface SCClusterSpecEntity has a new optional parameter package + - Interface SCEnvironmentRecord has a new optional parameter streamGovernanceConfig + - Interface SCEnvironmentRecord has a new optional parameter type + - Added Enum KnownAuthType + - Added Enum KnownConnectorClass + - Added Enum KnownConnectorServiceType + - Added Enum KnownConnectorStatus + - Added Enum KnownConnectorType + - Added Enum KnownDataFormatType + - Added Enum KnownPackage + - Added Enum KnownPartnerConnectorType + + ## 3.1.0 (2024-03-13) ### Features Added diff --git a/sdk/confluent/arm-confluent/README.md b/sdk/confluent/arm-confluent/README.md index b8c3545ba633..792138c96780 100644 --- a/sdk/confluent/arm-confluent/README.md +++ b/sdk/confluent/arm-confluent/README.md @@ -2,9 +2,11 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure ConfluentManagement client. + + [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/confluent/arm-confluent) | [Package (NPM)](https://www.npmjs.com/package/@azure/arm-confluent) | -[API reference documentation](https://learn.microsoft.com/javascript/api/@azure/arm-confluent) | +[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-confluent) | [Samples](https://github.com/Azure-Samples/azure-samples-js-management) ## Getting started @@ -42,9 +44,8 @@ npm install @azure/identity ``` You will also need to **register a new AAD application and grant access to Azure ConfluentManagement** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions). -Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`. -For more information about how to create an Azure AD Application check out [this guide](https://learn.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal). +For more information about how to create an Azure AD Application check out [this guide](https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal). ```javascript const { ConfluentManagementClient } = require("@azure/arm-confluent"); @@ -62,8 +63,8 @@ const client = new ConfluentManagementClient(new DefaultAzureCredential(), subsc // const client = new ConfluentManagementClient(credential, subscriptionId); ``` -### JavaScript Bundle +### JavaScript Bundle To use this client library in the browser, first you need to use a bundler. For details on how to do this, please refer to our [bundling documentation](https://aka.ms/AzureSDKBundling). ## Key concepts @@ -99,7 +100,7 @@ If you'd like to contribute to this library, please read the [contributing guide ![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fconfluent%2Farm-confluent%2FREADME.png) -[azure_cli]: https://learn.microsoft.com/cli/azure +[azure_cli]: https://docs.microsoft.com/cli/azure [azure_sub]: https://azure.microsoft.com/free/ [azure_sub]: https://azure.microsoft.com/free/ [azure_portal]: https://portal.azure.com diff --git a/sdk/confluent/arm-confluent/_meta.json b/sdk/confluent/arm-confluent/_meta.json index 00c51770a19f..e0b60fd434b2 100644 --- a/sdk/confluent/arm-confluent/_meta.json +++ b/sdk/confluent/arm-confluent/_meta.json @@ -1,8 +1,8 @@ { - "commit": "3004d02873a4b583ba6a3966a370f1ba19b5da1d", + "commit": "c358686f2d1550ee48d0ffe12939a1a5a7c8efff", "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.17 --generate-sample=true", + "autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/confluent/resource-manager/readme.md --use=@autorest/typescript@^6.0.12", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.7.4", - "use": "@autorest/typescript@6.0.17" + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.16", + "use": "@autorest/typescript@^6.0.12" } \ No newline at end of file diff --git a/sdk/confluent/arm-confluent/package.json b/sdk/confluent/arm-confluent/package.json index 888b815e3ac1..ff5f40cfa46b 100644 --- a/sdk/confluent/arm-confluent/package.json +++ b/sdk/confluent/arm-confluent/package.json @@ -3,16 +3,16 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for ConfluentManagementClient.", - "version": "3.1.1", + "version": "3.2.0", "engines": { "node": ">=18.0.0" }, "dependencies": { - "@azure/abort-controller": "^1.0.0", - "@azure/core-auth": "^1.6.0", - "@azure/core-client": "^1.7.0", "@azure/core-lro": "^2.5.4", + "@azure/abort-controller": "^2.1.2", "@azure/core-paging": "^1.2.0", + "@azure/core-client": "^1.7.0", + "@azure/core-auth": "^1.6.0", "@azure/core-rest-pipeline": "^1.14.0", "tslib": "^2.2.0" }, @@ -28,18 +28,19 @@ "module": "./dist-esm/src/index.js", "types": "./types/arm-confluent.d.ts", "devDependencies": { - "@azure-tools/test-credential": "^1.0.0", - "@azure-tools/test-recorder": "^3.0.0", + "typescript": "~5.6.2", + "dotenv": "^16.0.0", "@azure/dev-tool": "^1.0.0", - "@azure/identity": "^4.0.1", - "@types/chai": "^4.2.8", + "@azure/identity": "^4.2.1", + "@azure-tools/test-recorder": "^3.0.0", + "@azure-tools/test-credential": "^1.1.0", + "mocha": "^10.0.0", "@types/mocha": "^10.0.0", - "@types/node": "^18.0.0", + "tsx": "^4.7.1", + "@types/chai": "^4.2.8", "chai": "^4.2.0", - "dotenv": "^16.0.0", - "mocha": "^11.0.2", - "ts-node": "^10.0.0", - "typescript": "~5.7.2" + "@types/node": "^18.0.0", + "ts-node": "^10.0.0" }, "repository": { "type": "git", @@ -67,28 +68,28 @@ ], "scripts": { "build": "npm run clean && tsc && dev-tool run bundle && npm run minify && dev-tool run vendored mkdirp ./review && npm run extract-api", - "build:browser": "echo skipped", + "minify": "dev-tool run vendored uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", + "prepack": "npm run build", + "pack": "npm pack 2>&1", + "extract-api": "dev-tool run extract-api", + "lint": "echo skipped", + "clean": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", "build:node": "echo skipped", - "build:samples": "echo skipped.", + "build:browser": "echo skipped", "build:test": "echo skipped", + "build:samples": "echo skipped.", "check-format": "echo skipped", - "clean": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", "execute:samples": "echo skipped", - "extract-api": "dev-tool run extract-api", "format": "echo skipped", - "integration-test": "npm run integration-test:node && npm run integration-test:browser", - "integration-test:browser": "echo skipped", - "integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'", - "lint": "echo skipped", - "minify": "dev-tool run vendored uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", - "pack": "npm pack 2>&1", - "prepack": "npm run build", "test": "npm run integration-test", - "test:browser": "echo skipped", "test:node": "echo skipped", + "test:browser": "echo skipped", "unit-test": "npm run unit-test:node && npm run unit-test:browser", - "unit-test:browser": "echo skipped", "unit-test:node": "dev-tool run vendored cross-env TEST_MODE=playback npm run integration-test:node", + "unit-test:browser": "echo skipped", + "integration-test": "npm run integration-test:node && npm run integration-test:browser", + "integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'", + "integration-test:browser": "echo skipped", "update-snippets": "echo skipped" }, "sideEffects": false, @@ -101,13 +102,5 @@ ] }, "autoPublish": true, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/confluent/arm-confluent", - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-confluent?view=azure-node-preview" - } -} + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/confluent/arm-confluent" +} \ No newline at end of file diff --git a/sdk/confluent/arm-confluent/review/arm-confluent.api.md b/sdk/confluent/arm-confluent/review/arm-confluent.api.md index 8b836c04a139..6b9a1540296b 100644 --- a/sdk/confluent/arm-confluent/review/arm-confluent.api.md +++ b/sdk/confluent/arm-confluent/review/arm-confluent.api.md @@ -195,6 +195,62 @@ export interface APIKeySpecEntity { secret?: string; } +// @public +export type AuthType = string; + +// @public +export interface AzureBlobStorageSinkConnectorServiceInfo extends ConnectorServiceTypeInfoBase { + connectorServiceType: "AzureBlobStorageSinkConnector"; + storageAccountKey?: string; + storageAccountName?: string; + storageContainerName?: string; +} + +// @public +export interface AzureBlobStorageSourceConnectorServiceInfo extends ConnectorServiceTypeInfoBase { + connectorServiceType: "AzureBlobStorageSourceConnector"; + storageAccountKey?: string; + storageAccountName?: string; + storageContainerName?: string; +} + +// @public +export interface AzureCosmosDBSinkConnectorServiceInfo extends ConnectorServiceTypeInfoBase { + connectorServiceType: "AzureCosmosDBSinkConnector"; + cosmosConnectionEndpoint?: string; + cosmosContainersTopicMapping?: string; + cosmosDatabaseName?: string; + cosmosIdStrategy?: string; + cosmosMasterKey?: string; +} + +// @public +export interface AzureCosmosDBSourceConnectorServiceInfo extends ConnectorServiceTypeInfoBase { + connectorServiceType: "AzureCosmosDBSourceConnector"; + cosmosConnectionEndpoint?: string; + cosmosContainersTopicMapping?: string; + cosmosDatabaseName?: string; + cosmosMasterKey?: string; + cosmosMessageKeyEnabled?: boolean; + cosmosMessageKeyField?: string; +} + +// @public +export interface AzureSynapseAnalyticsSinkConnectorServiceInfo extends ConnectorServiceTypeInfoBase { + connectorServiceType: "AzureSynapseAnalyticsSinkConnector"; + synapseSqlDatabaseName?: string; + synapseSqlPassword?: string; + synapseSqlServerName?: string; + synapseSqlUser?: string; +} + +// @public +export interface Cluster { + beginDelete(resourceGroupName: string, organizationName: string, environmentId: string, clusterId: string, options?: ClusterDeleteOptionalParams): Promise, ClusterDeleteResponse>>; + beginDeleteAndWait(resourceGroupName: string, organizationName: string, environmentId: string, clusterId: string, options?: ClusterDeleteOptionalParams): Promise; + createOrUpdate(resourceGroupName: string, organizationName: string, environmentId: string, clusterId: string, options?: ClusterCreateOrUpdateOptionalParams): Promise; +} + // @public export interface ClusterByokEntity { id?: string; @@ -207,6 +263,28 @@ export interface ClusterConfigEntity { kind?: string; } +// @public +export interface ClusterCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + body?: SCClusterRecord; +} + +// @public +export type ClusterCreateOrUpdateResponse = SCClusterRecord; + +// @public +export interface ClusterDeleteHeaders { + location?: string; +} + +// @public +export interface ClusterDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ClusterDeleteResponse = ClusterDeleteHeaders; + // @public export interface ClusterEnvironmentEntity { environment?: string; @@ -297,6 +375,12 @@ export class ConfluentManagementClient extends coreClient.ServiceClient { // (undocumented) apiVersion: string; // (undocumented) + cluster: Cluster; + // (undocumented) + connector: Connector; + // (undocumented) + environment: Environment; + // (undocumented) marketplaceAgreements: MarketplaceAgreements; // (undocumented) organization: Organization; @@ -305,6 +389,8 @@ export class ConfluentManagementClient extends coreClient.ServiceClient { // (undocumented) subscriptionId?: string; // (undocumented) + topics: Topics; + // (undocumented) validations: Validations; } @@ -315,6 +401,96 @@ export interface ConfluentManagementClientOptionalParams extends coreClient.Serv endpoint?: string; } +// @public +export interface Connector { + beginDelete(resourceGroupName: string, organizationName: string, environmentId: string, clusterId: string, connectorName: string, options?: ConnectorDeleteOptionalParams): Promise, ConnectorDeleteResponse>>; + beginDeleteAndWait(resourceGroupName: string, organizationName: string, environmentId: string, clusterId: string, connectorName: string, options?: ConnectorDeleteOptionalParams): Promise; + createOrUpdate(resourceGroupName: string, organizationName: string, environmentId: string, clusterId: string, connectorName: string, options?: ConnectorCreateOrUpdateOptionalParams): Promise; + get(resourceGroupName: string, organizationName: string, environmentId: string, clusterId: string, connectorName: string, options?: ConnectorGetOptionalParams): Promise; + list(resourceGroupName: string, organizationName: string, environmentId: string, clusterId: string, options?: ConnectorListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export type ConnectorClass = string; + +// @public +export interface ConnectorCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + body?: ConnectorResource; +} + +// @public +export type ConnectorCreateOrUpdateResponse = ConnectorResource; + +// @public +export interface ConnectorDeleteHeaders { + location?: string; +} + +// @public +export interface ConnectorDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ConnectorDeleteResponse = ConnectorDeleteHeaders; + +// @public +export interface ConnectorGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ConnectorGetResponse = ConnectorResource; + +// @public +export interface ConnectorInfoBase { + connectorClass?: ConnectorClass; + connectorId?: string; + connectorName?: string; + connectorState?: ConnectorStatus; + connectorType?: ConnectorType; +} + +// @public +export interface ConnectorListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ConnectorListNextResponse = ListConnectorsSuccessResponse; + +// @public +export interface ConnectorListOptionalParams extends coreClient.OperationOptions { + pageSize?: number; + pageToken?: string; +} + +// @public +export type ConnectorListResponse = ListConnectorsSuccessResponse; + +// @public +export interface ConnectorResource extends ProxyResource { + connectorBasicInfo?: ConnectorInfoBase; + connectorServiceTypeInfo?: ConnectorServiceTypeInfoBaseUnion; + partnerConnectorInfo?: PartnerInfoBaseUnion; +} + +// @public +export type ConnectorServiceType = string; + +// @public +export interface ConnectorServiceTypeInfoBase { + connectorServiceType: "AzureBlobStorageSinkConnector" | "AzureBlobStorageSourceConnector" | "AzureCosmosDBSinkConnector" | "AzureCosmosDBSourceConnector" | "AzureSynapseAnalyticsSinkConnector"; +} + +// @public (undocumented) +export type ConnectorServiceTypeInfoBaseUnion = ConnectorServiceTypeInfoBase | AzureBlobStorageSinkConnectorServiceInfo | AzureBlobStorageSourceConnectorServiceInfo | AzureCosmosDBSinkConnectorServiceInfo | AzureCosmosDBSourceConnectorServiceInfo | AzureSynapseAnalyticsSinkConnectorServiceInfo; + +// @public +export type ConnectorStatus = string; + +// @public +export type ConnectorType = string; + // @public export interface CreateAPIKeyModel { description?: string; @@ -324,6 +500,38 @@ export interface CreateAPIKeyModel { // @public export type CreatedByType = string; +// @public +export type DataFormatType = string; + +// @public +export interface Environment { + beginDelete(resourceGroupName: string, organizationName: string, environmentId: string, options?: EnvironmentDeleteOptionalParams): Promise, EnvironmentDeleteResponse>>; + beginDeleteAndWait(resourceGroupName: string, organizationName: string, environmentId: string, options?: EnvironmentDeleteOptionalParams): Promise; + createOrUpdate(resourceGroupName: string, organizationName: string, environmentId: string, options?: EnvironmentCreateOrUpdateOptionalParams): Promise; +} + +// @public +export interface EnvironmentCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + body?: SCEnvironmentRecord; +} + +// @public +export type EnvironmentCreateOrUpdateResponse = SCEnvironmentRecord; + +// @public +export interface EnvironmentDeleteHeaders { + location?: string; +} + +// @public +export interface EnvironmentDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type EnvironmentDeleteResponse = EnvironmentDeleteHeaders; + // @public export interface EnvironmentRecord { displayName?: string; @@ -332,6 +540,26 @@ export interface EnvironmentRecord { metadata?: MetadataEntity; } +// @public +export interface ErrorAdditionalInfo { + readonly info?: Record; + readonly type?: string; +} + +// @public +export interface ErrorDetail { + readonly additionalInfo?: ErrorAdditionalInfo[]; + readonly code?: string; + readonly details?: ErrorDetail[]; + readonly message?: string; + readonly target?: string; +} + +// @public +export interface ErrorResponse { + error?: ErrorDetail; +} + // @public export interface ErrorResponseBody { readonly code?: string; @@ -361,6 +589,117 @@ export interface InvitationRecord { status?: string; } +// @public +export interface KafkaAzureBlobStorageSinkConnectorInfo extends PartnerInfoBase { + apiKey?: string; + apiSecret?: string; + authType?: AuthType; + flushSize?: string; + inputFormat?: DataFormatType; + maxTasks?: string; + outputFormat?: DataFormatType; + partnerConnectorType: "KafkaAzureBlobStorageSink"; + serviceAccountId?: string; + timeInterval?: string; + topics?: string[]; + topicsDir?: string; +} + +// @public +export interface KafkaAzureBlobStorageSourceConnectorInfo extends PartnerInfoBase { + apiKey?: string; + apiSecret?: string; + authType?: AuthType; + inputFormat?: DataFormatType; + maxTasks?: string; + outputFormat?: DataFormatType; + partnerConnectorType: "KafkaAzureBlobStorageSource"; + serviceAccountId?: string; + topicRegex?: string; + topicsDir?: string; +} + +// @public +export interface KafkaAzureCosmosDBSinkConnectorInfo extends PartnerInfoBase { + apiKey?: string; + apiSecret?: string; + authType?: AuthType; + flushSize?: string; + inputFormat?: DataFormatType; + maxTasks?: string; + outputFormat?: DataFormatType; + partnerConnectorType: "KafkaAzureCosmosDBSink"; + serviceAccountId?: string; + timeInterval?: string; + topics?: string[]; + topicsDir?: string; +} + +// @public +export interface KafkaAzureCosmosDBSourceConnectorInfo extends PartnerInfoBase { + apiKey?: string; + apiSecret?: string; + authType?: AuthType; + inputFormat?: DataFormatType; + maxTasks?: string; + outputFormat?: DataFormatType; + partnerConnectorType: "KafkaAzureCosmosDBSource"; + serviceAccountId?: string; + topicRegex?: string; + topicsDir?: string; +} + +// @public +export interface KafkaAzureSynapseAnalyticsSinkConnectorInfo extends PartnerInfoBase { + apiKey?: string; + apiSecret?: string; + authType?: AuthType; + flushSize?: string; + inputFormat?: DataFormatType; + maxTasks?: string; + outputFormat?: DataFormatType; + partnerConnectorType: "KafkaAzureSynapseAnalyticsSink"; + serviceAccountId?: string; + timeInterval?: string; + topics?: string[]; + topicsDir?: string; +} + +// @public +export enum KnownAuthType { + KafkaAPIKEY = "KAFKA_API_KEY", + ServiceAccount = "SERVICE_ACCOUNT" +} + +// @public +export enum KnownConnectorClass { + Azureblobsink = "AZUREBLOBSINK", + Azureblobsource = "AZUREBLOBSOURCE" +} + +// @public +export enum KnownConnectorServiceType { + AzureBlobStorageSinkConnector = "AzureBlobStorageSinkConnector", + AzureBlobStorageSourceConnector = "AzureBlobStorageSourceConnector", + AzureCosmosDBSinkConnector = "AzureCosmosDBSinkConnector", + AzureCosmosDBSourceConnector = "AzureCosmosDBSourceConnector", + AzureSynapseAnalyticsSinkConnector = "AzureSynapseAnalyticsSinkConnector" +} + +// @public +export enum KnownConnectorStatus { + Failed = "FAILED", + Paused = "PAUSED", + Provisioning = "PROVISIONING", + Running = "RUNNING" +} + +// @public +export enum KnownConnectorType { + Sink = "SINK", + Source = "SOURCE" +} + // @public export enum KnownCreatedByType { Application = "Application", @@ -369,6 +708,30 @@ export enum KnownCreatedByType { User = "User" } +// @public +export enum KnownDataFormatType { + Avro = "AVRO", + Bytes = "BYTES", + Json = "JSON", + Protobuf = "PROTOBUF", + String = "STRING" +} + +// @public +export enum KnownPackage { + Advanced = "ADVANCED", + Essentials = "ESSENTIALS" +} + +// @public +export enum KnownPartnerConnectorType { + KafkaAzureBlobStorageSink = "KafkaAzureBlobStorageSink", + KafkaAzureBlobStorageSource = "KafkaAzureBlobStorageSource", + KafkaAzureCosmosDBSink = "KafkaAzureCosmosDBSink", + KafkaAzureCosmosDBSource = "KafkaAzureCosmosDBSource", + KafkaAzureSynapseAnalyticsSink = "KafkaAzureSynapseAnalyticsSink" +} + // @public export enum KnownProvisionState { Accepted = "Accepted", @@ -414,6 +777,12 @@ export interface ListClustersSuccessResponse { value?: SCClusterRecord[]; } +// @public +export interface ListConnectorsSuccessResponse { + nextLink?: string; + value?: ConnectorResource[]; +} + // @public export interface ListRegionsSuccessResponse { data?: RegionRecord[]; @@ -425,6 +794,12 @@ export interface ListSchemaRegistryClustersResponse { value?: SchemaRegistryClusterRecord[]; } +// @public +export interface ListTopicsSuccessResponse { + nextLink?: string; + value?: TopicRecord[]; +} + // @public export interface MarketplaceAgreements { create(options?: MarketplaceAgreementsCreateOptionalParams): Promise; @@ -722,9 +1097,27 @@ export interface OrganizationUpdateOptionalParams extends coreClient.OperationOp // @public export type OrganizationUpdateResponse = OrganizationResource; +// @public +export type Package = string; + +// @public +export type PartnerConnectorType = string; + +// @public +export interface PartnerInfoBase { + partnerConnectorType: "KafkaAzureBlobStorageSink" | "KafkaAzureBlobStorageSource" | "KafkaAzureCosmosDBSink" | "KafkaAzureCosmosDBSource" | "KafkaAzureSynapseAnalyticsSink"; +} + +// @public (undocumented) +export type PartnerInfoBaseUnion = PartnerInfoBase | KafkaAzureBlobStorageSinkConnectorInfo | KafkaAzureBlobStorageSourceConnectorInfo | KafkaAzureCosmosDBSinkConnectorInfo | KafkaAzureCosmosDBSourceConnectorInfo | KafkaAzureSynapseAnalyticsSinkConnectorInfo; + // @public export type ProvisionState = string; +// @public +export interface ProxyResource extends Resource { +} + // @public export interface RegionRecord { id?: string; @@ -742,6 +1135,14 @@ export interface RegionSpecEntity { regionName?: string; } +// @public +export interface Resource { + readonly id?: string; + readonly name?: string; + readonly systemData?: SystemData; + readonly type?: string; +} + // @public export interface ResourceProviderDefaultErrorResponse { readonly error?: ErrorResponseBody; @@ -783,6 +1184,7 @@ export interface SCClusterRecord { name?: string; spec?: SCClusterSpecEntity; status?: ClusterStatusEntity; + type?: string; } // @public @@ -797,6 +1199,7 @@ export interface SCClusterSpecEntity { kafkaBootstrapEndpoint?: string; name?: string; network?: SCClusterNetworkEnvironmentEntity; + package?: Package; region?: string; zone?: string; } @@ -816,6 +1219,8 @@ export interface SCEnvironmentRecord { kind?: string; metadata?: SCMetadataEntity; name?: string; + streamGovernanceConfig?: StreamGovernanceConfig; + type?: string; } // @public @@ -867,6 +1272,11 @@ export interface ServiceAccountRecord { metadata?: MetadataEntity; } +// @public +export interface StreamGovernanceConfig { + package?: Package; +} + // @public export interface SystemData { createdAt?: Date; @@ -877,6 +1287,93 @@ export interface SystemData { lastModifiedByType?: CreatedByType; } +// @public +export interface TopicMetadataEntity { + resourceName?: string; + self?: string; +} + +// @public +export interface TopicRecord { + configs?: TopicsRelatedLink; + readonly id?: string; + inputConfigs?: TopicsInputConfig[]; + kind?: string; + metadata?: TopicMetadataEntity; + readonly name?: string; + partitions?: TopicsRelatedLink; + partitionsCount?: string; + partitionsReassignments?: TopicsRelatedLink; + replicationFactor?: string; + topicId?: string; + readonly type?: string; +} + +// @public +export interface Topics { + beginDelete(resourceGroupName: string, organizationName: string, environmentId: string, clusterId: string, topicName: string, options?: TopicsDeleteOptionalParams): Promise, TopicsDeleteResponse>>; + beginDeleteAndWait(resourceGroupName: string, organizationName: string, environmentId: string, clusterId: string, topicName: string, options?: TopicsDeleteOptionalParams): Promise; + create(resourceGroupName: string, organizationName: string, environmentId: string, clusterId: string, topicName: string, options?: TopicsCreateOptionalParams): Promise; + get(resourceGroupName: string, organizationName: string, environmentId: string, clusterId: string, topicName: string, options?: TopicsGetOptionalParams): Promise; + list(resourceGroupName: string, organizationName: string, environmentId: string, clusterId: string, options?: TopicsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface TopicsCreateOptionalParams extends coreClient.OperationOptions { + body?: TopicRecord; +} + +// @public +export type TopicsCreateResponse = TopicRecord; + +// @public +export interface TopicsDeleteHeaders { + location?: string; +} + +// @public +export interface TopicsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type TopicsDeleteResponse = TopicsDeleteHeaders; + +// @public +export interface TopicsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type TopicsGetResponse = TopicRecord; + +// @public +export interface TopicsInputConfig { + name?: string; + value?: string; +} + +// @public +export interface TopicsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type TopicsListNextResponse = ListTopicsSuccessResponse; + +// @public +export interface TopicsListOptionalParams extends coreClient.OperationOptions { + pageSize?: number; + pageToken?: string; +} + +// @public +export type TopicsListResponse = ListTopicsSuccessResponse; + +// @public +export interface TopicsRelatedLink { + related?: string; +} + // @public export interface UserDetail { aadEmail?: string; diff --git a/sdk/confluent/arm-confluent/sample.env b/sdk/confluent/arm-confluent/sample.env index 672847a3fea0..508439fc7d62 100644 --- a/sdk/confluent/arm-confluent/sample.env +++ b/sdk/confluent/arm-confluent/sample.env @@ -1,4 +1 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file +# Feel free to add your own environment variables. \ No newline at end of file diff --git a/sdk/confluent/arm-confluent/src/confluentManagementClient.ts b/sdk/confluent/arm-confluent/src/confluentManagementClient.ts index bab61b7585e0..b0e40f85a0d9 100644 --- a/sdk/confluent/arm-confluent/src/confluentManagementClient.ts +++ b/sdk/confluent/arm-confluent/src/confluentManagementClient.ts @@ -20,6 +20,10 @@ import { OrganizationImpl, ValidationsImpl, AccessImpl, + EnvironmentImpl, + ClusterImpl, + ConnectorImpl, + TopicsImpl, } from "./operations"; import { MarketplaceAgreements, @@ -27,6 +31,10 @@ import { Organization, Validations, Access, + Environment, + Cluster, + Connector, + Topics, } from "./operationsInterfaces"; import { ConfluentManagementClientOptionalParams } from "./models"; @@ -76,7 +84,7 @@ export class ConfluentManagementClient extends coreClient.ServiceClient { credential: credentials, }; - const packageDetails = `azsdk-js-arm-confluent/3.1.1`; + const packageDetails = `azsdk-js-arm-confluent/3.2.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -130,12 +138,16 @@ export class ConfluentManagementClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2024-02-13"; + this.apiVersion = options.apiVersion || "2024-07-01"; this.marketplaceAgreements = new MarketplaceAgreementsImpl(this); this.organizationOperations = new OrganizationOperationsImpl(this); this.organization = new OrganizationImpl(this); this.validations = new ValidationsImpl(this); this.access = new AccessImpl(this); + this.environment = new EnvironmentImpl(this); + this.cluster = new ClusterImpl(this); + this.connector = new ConnectorImpl(this); + this.topics = new TopicsImpl(this); this.addCustomApiVersionPolicy(options.apiVersion); } @@ -172,4 +184,8 @@ export class ConfluentManagementClient extends coreClient.ServiceClient { organization: Organization; validations: Validations; access: Access; + environment: Environment; + cluster: Cluster; + connector: Connector; + topics: Topics; } diff --git a/sdk/confluent/arm-confluent/src/models/index.ts b/sdk/confluent/arm-confluent/src/models/index.ts index 0e669c7d40af..13aad69e7c4a 100644 --- a/sdk/confluent/arm-confluent/src/models/index.ts +++ b/sdk/confluent/arm-confluent/src/models/index.ts @@ -8,6 +8,21 @@ import * as coreClient from "@azure/core-client"; +export type ConnectorServiceTypeInfoBaseUnion = + | ConnectorServiceTypeInfoBase + | AzureBlobStorageSinkConnectorServiceInfo + | AzureBlobStorageSourceConnectorServiceInfo + | AzureCosmosDBSinkConnectorServiceInfo + | AzureCosmosDBSourceConnectorServiceInfo + | AzureSynapseAnalyticsSinkConnectorServiceInfo; +export type PartnerInfoBaseUnion = + | PartnerInfoBase + | KafkaAzureBlobStorageSinkConnectorInfo + | KafkaAzureBlobStorageSourceConnectorInfo + | KafkaAzureCosmosDBSinkConnectorInfo + | KafkaAzureCosmosDBSourceConnectorInfo + | KafkaAzureSynapseAnalyticsSinkConnectorInfo; + /** Response of a list operation. */ export interface ConfluentAgreementResourceListResponse { /** Results of a list operation. */ @@ -569,12 +584,22 @@ export interface SCEnvironmentRecord { kind?: string; /** Id of the environment */ id?: string; + /** Type of the resource */ + type?: string; /** Display name of the environment */ name?: string; + /** Stream governance configuration */ + streamGovernanceConfig?: StreamGovernanceConfig; /** Metadata of the record */ metadata?: SCMetadataEntity; } +/** Stream governance configuration */ +export interface StreamGovernanceConfig { + /** Stream governance configuration */ + package?: Package; +} + /** Metadata of the data record */ export interface SCMetadataEntity { /** Self lookup url */ @@ -589,6 +614,55 @@ export interface SCMetadataEntity { deletedTimestamp?: string; } +/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */ +export interface ErrorResponse { + /** The error object. */ + error?: ErrorDetail; +} + +/** The error detail. */ +export interface ErrorDetail { + /** + * The error code. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly code?: string; + /** + * The error message. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly message?: string; + /** + * The error target. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly target?: string; + /** + * The error details. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly details?: ErrorDetail[]; + /** + * The error additional info. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly additionalInfo?: ErrorAdditionalInfo[]; +} + +/** The resource management error additional info. */ +export interface ErrorAdditionalInfo { + /** + * The additional info type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** + * The additional info. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly info?: Record; +} + /** 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 */ @@ -603,6 +677,8 @@ export interface SCClusterRecord { kind?: string; /** Id of the cluster */ id?: string; + /** Type of the resource */ + type?: string; /** Display name of the cluster */ name?: string; /** Metadata of the record */ @@ -623,6 +699,8 @@ export interface SCClusterSpecEntity { cloud?: string; /** type of zone availability */ zone?: string; + /** Stream governance configuration */ + package?: Package; /** The cloud service provider region */ region?: string; /** The bootstrap endpoint used by Kafka clients to connect to the cluster */ @@ -806,6 +884,141 @@ export interface APIKeyOwnerEntity { kind?: string; } +/** Connector Info Base properties */ +export interface ConnectorInfoBase { + /** Connector Type */ + connectorType?: ConnectorType; + /** Connector Class */ + connectorClass?: ConnectorClass; + /** Connector Name */ + connectorName?: string; + /** Connector Id */ + connectorId?: string; + /** Connector Status */ + connectorState?: ConnectorStatus; +} + +/** The connector service type info */ +export interface ConnectorServiceTypeInfoBase { + /** Polymorphic discriminator, which specifies the different types this object can be */ + connectorServiceType: + | "AzureBlobStorageSinkConnector" + | "AzureBlobStorageSourceConnector" + | "AzureCosmosDBSinkConnector" + | "AzureCosmosDBSourceConnector" + | "AzureSynapseAnalyticsSinkConnector"; +} + +/** The partner info base */ +export interface PartnerInfoBase { + /** Polymorphic discriminator, which specifies the different types this object can be */ + partnerConnectorType: + | "KafkaAzureBlobStorageSink" + | "KafkaAzureBlobStorageSource" + | "KafkaAzureCosmosDBSink" + | "KafkaAzureCosmosDBSource" + | "KafkaAzureSynapseAnalyticsSink"; +} + +/** Common fields that are returned in the response for all Azure Resource Manager resources */ +export interface Resource { + /** + * Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * The name of the resource + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; +} + +/** Result of GET request to list connectors in the cluster of a confluent organization */ +export interface ListConnectorsSuccessResponse { + /** List of connectors in a cluster of a confluent organization */ + value?: ConnectorResource[]; + /** URL to get the next set of connectors records if there are any. */ + nextLink?: string; +} + +/** Result of GET request to list topics in the cluster of a confluent organization */ +export interface ListTopicsSuccessResponse { + /** List of topics in a cluster of a confluent organization */ + value?: TopicRecord[]; + /** URL to get the next set of topics records if there are any. */ + nextLink?: string; +} + +/** Details of topic record */ +export interface TopicRecord { + /** + * The ARM Resource Id of the Topic + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * Display name of the topic + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * The type of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** Type of topic */ + kind?: string; + /** Topic Id returned by Confluent */ + topicId?: string; + /** Metadata of the record */ + metadata?: TopicMetadataEntity; + /** Partition Specification of the topic */ + partitions?: TopicsRelatedLink; + /** Config Specification of the topic */ + configs?: TopicsRelatedLink; + /** Input Config Specification of the topic */ + inputConfigs?: TopicsInputConfig[]; + /** Partition Reassignment Specification of the topic */ + partitionsReassignments?: TopicsRelatedLink; + /** Partition count of the topic */ + partitionsCount?: string; + /** Replication factor of the topic */ + replicationFactor?: string; +} + +/** Metadata of the data record */ +export interface TopicMetadataEntity { + /** Self lookup url */ + self?: string; + /** Resource name of the record */ + resourceName?: string; +} + +/** Partition Config spec of the topic record */ +export interface TopicsRelatedLink { + /** Relationship of the topic */ + related?: string; +} + +/** Topics input config */ +export interface TopicsInputConfig { + /** Name of the topic input config */ + name?: string; + /** Value of the topic input config */ + value?: string; +} + /** Metadata of the list */ export interface SCConfluentListMetadata { /** First page of the list */ @@ -820,6 +1033,255 @@ export interface SCConfluentListMetadata { totalSize?: number; } +/** The authentication info when auth_type is azureBlobStorageSinkConnector */ +export interface AzureBlobStorageSinkConnectorServiceInfo + extends ConnectorServiceTypeInfoBase { + /** Polymorphic discriminator, which specifies the different types this object can be */ + connectorServiceType: "AzureBlobStorageSinkConnector"; + /** Azure Blob Storage Account Name */ + storageAccountName?: string; + /** Azure Blob Storage Account Key */ + storageAccountKey?: string; + /** Azure Blob Storage Account Container Name */ + storageContainerName?: string; +} + +/** The connector service type is AzureBlobStorageSourceConnector */ +export interface AzureBlobStorageSourceConnectorServiceInfo + extends ConnectorServiceTypeInfoBase { + /** Polymorphic discriminator, which specifies the different types this object can be */ + connectorServiceType: "AzureBlobStorageSourceConnector"; + /** Azure Blob Storage Account Name */ + storageAccountName?: string; + /** Azure Blob Storage Account Key */ + storageAccountKey?: string; + /** Azure Blob Storage Account Container Name */ + storageContainerName?: string; +} + +/** The authentication info when auth_type is AzureCosmosDBSinkConnector */ +export interface AzureCosmosDBSinkConnectorServiceInfo + extends ConnectorServiceTypeInfoBase { + /** Polymorphic discriminator, which specifies the different types this object can be */ + connectorServiceType: "AzureCosmosDBSinkConnector"; + /** Azure Cosmos Database Name */ + cosmosDatabaseName?: string; + /** Azure Cosmos Database Master Key */ + cosmosMasterKey?: string; + /** Azure Cosmos Database Connection Endpoint */ + cosmosConnectionEndpoint?: string; + /** Azure Cosmos Database Containers Topic Mapping */ + cosmosContainersTopicMapping?: string; + /** Azure Cosmos Database Id Strategy */ + cosmosIdStrategy?: string; +} + +/** The authentication info when auth_type is AzureCosmosDBSourceConnector */ +export interface AzureCosmosDBSourceConnectorServiceInfo + extends ConnectorServiceTypeInfoBase { + /** Polymorphic discriminator, which specifies the different types this object can be */ + connectorServiceType: "AzureCosmosDBSourceConnector"; + /** Azure Cosmos Database Name */ + cosmosDatabaseName?: string; + /** Azure Cosmos Database Master Key */ + cosmosMasterKey?: string; + /** Azure Cosmos Database Connection Endpoint */ + cosmosConnectionEndpoint?: string; + /** Azure Cosmos Database Containers Topic Mapping */ + cosmosContainersTopicMapping?: string; + /** Azure Cosmos Database Message Key Enabled */ + cosmosMessageKeyEnabled?: boolean; + /** Azure Cosmos Database Message Key Field */ + cosmosMessageKeyField?: string; +} + +/** The authentication info when auth_type is AzureSynapseAnalyticsSinkConnector */ +export interface AzureSynapseAnalyticsSinkConnectorServiceInfo + extends ConnectorServiceTypeInfoBase { + /** Polymorphic discriminator, which specifies the different types this object can be */ + connectorServiceType: "AzureSynapseAnalyticsSinkConnector"; + /** Azure Synapse Analytics SQL Server Name */ + synapseSqlServerName?: string; + /** Azure Synapse SQL login details */ + synapseSqlUser?: string; + /** Azure Synapse SQL login details */ + synapseSqlPassword?: string; + /** Azure Synapse Dedicated SQL Pool Database Name */ + synapseSqlDatabaseName?: string; +} + +/** The partner connector type is KafkaAzureBlobStorageSink */ +export interface KafkaAzureBlobStorageSinkConnectorInfo + extends PartnerInfoBase { + /** Polymorphic discriminator, which specifies the different types this object can be */ + partnerConnectorType: "KafkaAzureBlobStorageSink"; + /** Kafka Auth Type */ + authType?: AuthType; + /** Kafka Input Data Format Type */ + inputFormat?: DataFormatType; + /** Kafka Output Data Format Type */ + outputFormat?: DataFormatType; + /** Kafka API Key */ + apiKey?: string; + /** Kafka API Key Secret */ + apiSecret?: string; + /** Kafka Service Account Id */ + serviceAccountId?: string; + /** Kafka topics list */ + topics?: string[]; + /** Kafka topics directory */ + topicsDir?: string; + /** Flush size */ + flushSize?: string; + /** Maximum Tasks */ + maxTasks?: string; + /** Time Interval */ + timeInterval?: string; +} + +/** The partner connector type is KafkaAzureBlobStorageSource */ +export interface KafkaAzureBlobStorageSourceConnectorInfo + extends PartnerInfoBase { + /** Polymorphic discriminator, which specifies the different types this object can be */ + partnerConnectorType: "KafkaAzureBlobStorageSource"; + /** Kafka Auth Type */ + authType?: AuthType; + /** Kafka Input Data Format Type */ + inputFormat?: DataFormatType; + /** Kafka Output Data Format Type */ + outputFormat?: DataFormatType; + /** Kafka API Key */ + apiKey?: string; + /** Kafka API Secret */ + apiSecret?: string; + /** Kafka Service Account Id */ + serviceAccountId?: string; + /** Kafka topics Regex pattern */ + topicRegex?: string; + /** Kafka topics directory */ + topicsDir?: string; + /** Maximum Tasks */ + maxTasks?: string; +} + +/** The partner connector type is KafkaAzureCosmosDBSink */ +export interface KafkaAzureCosmosDBSinkConnectorInfo extends PartnerInfoBase { + /** Polymorphic discriminator, which specifies the different types this object can be */ + partnerConnectorType: "KafkaAzureCosmosDBSink"; + /** Kafka Auth Type */ + authType?: AuthType; + /** Kafka Input Data Format Type */ + inputFormat?: DataFormatType; + /** Kafka Output Data Format Type */ + outputFormat?: DataFormatType; + /** Kafka API Key */ + apiKey?: string; + /** Kafka API Key Secret */ + apiSecret?: string; + /** Kafka Service Account Id */ + serviceAccountId?: string; + /** Kafka topics list */ + topics?: string[]; + /** Kafka topics directory */ + topicsDir?: string; + /** Flush size */ + flushSize?: string; + /** Maximum Tasks */ + maxTasks?: string; + /** Time Interval */ + timeInterval?: string; +} + +/** The partner connector type is KafkaAzureCosmosDBSource */ +export interface KafkaAzureCosmosDBSourceConnectorInfo extends PartnerInfoBase { + /** Polymorphic discriminator, which specifies the different types this object can be */ + partnerConnectorType: "KafkaAzureCosmosDBSource"; + /** Kafka Auth Type */ + authType?: AuthType; + /** Kafka Input Data Format Type */ + inputFormat?: DataFormatType; + /** Kafka Output Data Format Type */ + outputFormat?: DataFormatType; + /** Kafka API Key */ + apiKey?: string; + /** Kafka API Secret */ + apiSecret?: string; + /** Kafka Service Account Id */ + serviceAccountId?: string; + /** Kafka topics Regex pattern */ + topicRegex?: string; + /** Kafka topics directory */ + topicsDir?: string; + /** Maximum Tasks */ + maxTasks?: string; +} + +/** The partner connector type is KafkaAzureSynapseAnalyticsSink */ +export interface KafkaAzureSynapseAnalyticsSinkConnectorInfo + extends PartnerInfoBase { + /** Polymorphic discriminator, which specifies the different types this object can be */ + partnerConnectorType: "KafkaAzureSynapseAnalyticsSink"; + /** Kafka Auth Type */ + authType?: AuthType; + /** Kafka Input Data Format Type */ + inputFormat?: DataFormatType; + /** Kafka Output Data Format Type */ + outputFormat?: DataFormatType; + /** Kafka API Key */ + apiKey?: string; + /** Kafka API Key Secret */ + apiSecret?: string; + /** Kafka Service Account Id */ + serviceAccountId?: string; + /** Kafka topics list */ + topics?: string[]; + /** Kafka topics directory */ + topicsDir?: string; + /** Flush size */ + flushSize?: string; + /** Maximum Tasks */ + maxTasks?: string; + /** Time Interval */ + timeInterval?: string; +} + +/** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ +export interface ProxyResource extends Resource {} + +/** Details of connector record */ +export interface ConnectorResource extends ProxyResource { + /** Connector Info Base */ + connectorBasicInfo?: ConnectorInfoBase; + /** Connector Service type info base properties. */ + connectorServiceTypeInfo?: ConnectorServiceTypeInfoBaseUnion; + /** The connection information consumed by applications. */ + partnerConnectorInfo?: PartnerInfoBaseUnion; +} + +/** Defines headers for Environment_delete operation. */ +export interface EnvironmentDeleteHeaders { + /** The Location header contains the URL where the status of the long running operation can be checked. */ + location?: string; +} + +/** Defines headers for Cluster_delete operation. */ +export interface ClusterDeleteHeaders { + /** The Location header contains the URL where the status of the long running operation can be checked. */ + location?: string; +} + +/** Defines headers for Connector_delete operation. */ +export interface ConnectorDeleteHeaders { + /** The Location header contains the URL where the status of the long running operation can be checked. */ + location?: string; +} + +/** Defines headers for Topics_delete operation. */ +export interface TopicsDeleteHeaders { + /** The Location header contains the URL where the status of the long running operation can be checked. */ + location?: string; +} + /** Known values of {@link CreatedByType} that the service accepts. */ export enum KnownCreatedByType { /** User */ @@ -925,6 +1387,183 @@ export enum KnownSaaSOfferStatus { */ export type SaaSOfferStatus = string; +/** Known values of {@link Package} that the service accepts. */ +export enum KnownPackage { + /** Essentials */ + Essentials = "ESSENTIALS", + /** Advanced */ + Advanced = "ADVANCED", +} + +/** + * Defines values for Package. \ + * {@link KnownPackage} can be used interchangeably with Package, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **ESSENTIALS** \ + * **ADVANCED** + */ +export type Package = string; + +/** Known values of {@link ConnectorType} that the service accepts. */ +export enum KnownConnectorType { + /** Sink */ + Sink = "SINK", + /** Source */ + Source = "SOURCE", +} + +/** + * Defines values for ConnectorType. \ + * {@link KnownConnectorType} can be used interchangeably with ConnectorType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **SINK** \ + * **SOURCE** + */ +export type ConnectorType = string; + +/** Known values of {@link ConnectorClass} that the service accepts. */ +export enum KnownConnectorClass { + /** Azureblobsource */ + Azureblobsource = "AZUREBLOBSOURCE", + /** Azureblobsink */ + Azureblobsink = "AZUREBLOBSINK", +} + +/** + * Defines values for ConnectorClass. \ + * {@link KnownConnectorClass} can be used interchangeably with ConnectorClass, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **AZUREBLOBSOURCE** \ + * **AZUREBLOBSINK** + */ +export type ConnectorClass = string; + +/** Known values of {@link ConnectorStatus} that the service accepts. */ +export enum KnownConnectorStatus { + /** Provisioning */ + Provisioning = "PROVISIONING", + /** Running */ + Running = "RUNNING", + /** Paused */ + Paused = "PAUSED", + /** Failed */ + Failed = "FAILED", +} + +/** + * Defines values for ConnectorStatus. \ + * {@link KnownConnectorStatus} can be used interchangeably with ConnectorStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **PROVISIONING** \ + * **RUNNING** \ + * **PAUSED** \ + * **FAILED** + */ +export type ConnectorStatus = string; + +/** Known values of {@link ConnectorServiceType} that the service accepts. */ +export enum KnownConnectorServiceType { + /** AzureBlobStorageSinkConnector */ + AzureBlobStorageSinkConnector = "AzureBlobStorageSinkConnector", + /** AzureBlobStorageSourceConnector */ + AzureBlobStorageSourceConnector = "AzureBlobStorageSourceConnector", + /** AzureCosmosDBSinkConnector */ + AzureCosmosDBSinkConnector = "AzureCosmosDBSinkConnector", + /** AzureCosmosDBSourceConnector */ + AzureCosmosDBSourceConnector = "AzureCosmosDBSourceConnector", + /** AzureSynapseAnalyticsSinkConnector */ + AzureSynapseAnalyticsSinkConnector = "AzureSynapseAnalyticsSinkConnector", +} + +/** + * Defines values for ConnectorServiceType. \ + * {@link KnownConnectorServiceType} can be used interchangeably with ConnectorServiceType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **AzureBlobStorageSinkConnector** \ + * **AzureBlobStorageSourceConnector** \ + * **AzureCosmosDBSinkConnector** \ + * **AzureCosmosDBSourceConnector** \ + * **AzureSynapseAnalyticsSinkConnector** + */ +export type ConnectorServiceType = string; + +/** Known values of {@link PartnerConnectorType} that the service accepts. */ +export enum KnownPartnerConnectorType { + /** KafkaAzureBlobStorageSource */ + KafkaAzureBlobStorageSource = "KafkaAzureBlobStorageSource", + /** KafkaAzureBlobStorageSink */ + KafkaAzureBlobStorageSink = "KafkaAzureBlobStorageSink", + /** KafkaAzureCosmosDBSource */ + KafkaAzureCosmosDBSource = "KafkaAzureCosmosDBSource", + /** KafkaAzureCosmosDBSink */ + KafkaAzureCosmosDBSink = "KafkaAzureCosmosDBSink", + /** KafkaAzureSynapseAnalyticsSink */ + KafkaAzureSynapseAnalyticsSink = "KafkaAzureSynapseAnalyticsSink", +} + +/** + * Defines values for PartnerConnectorType. \ + * {@link KnownPartnerConnectorType} can be used interchangeably with PartnerConnectorType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **KafkaAzureBlobStorageSource** \ + * **KafkaAzureBlobStorageSink** \ + * **KafkaAzureCosmosDBSource** \ + * **KafkaAzureCosmosDBSink** \ + * **KafkaAzureSynapseAnalyticsSink** + */ +export type PartnerConnectorType = string; + +/** Known values of {@link AuthType} that the service accepts. */ +export enum KnownAuthType { + /** ServiceAccount */ + ServiceAccount = "SERVICE_ACCOUNT", + /** KafkaAPIKEY */ + KafkaAPIKEY = "KAFKA_API_KEY", +} + +/** + * Defines values for AuthType. \ + * {@link KnownAuthType} can be used interchangeably with AuthType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **SERVICE_ACCOUNT** \ + * **KAFKA_API_KEY** + */ +export type AuthType = string; + +/** Known values of {@link DataFormatType} that the service accepts. */ +export enum KnownDataFormatType { + /** Avro */ + Avro = "AVRO", + /** Json */ + Json = "JSON", + /** String */ + String = "STRING", + /** Bytes */ + Bytes = "BYTES", + /** Protobuf */ + Protobuf = "PROTOBUF", +} + +/** + * Defines values for DataFormatType. \ + * {@link KnownDataFormatType} can be used interchangeably with DataFormatType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **AVRO** \ + * **JSON** \ + * **STRING** \ + * **BYTES** \ + * **PROTOBUF** + */ +export type DataFormatType = string; + /** Optional parameters. */ export interface MarketplaceAgreementsListOptionalParams extends coreClient.OperationOptions {} @@ -1229,6 +1868,144 @@ export interface AccessListRoleBindingNameListOptionalParams export type AccessListRoleBindingNameListResponse = AccessRoleBindingNameListSuccessResponse; +/** Optional parameters. */ +export interface EnvironmentCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Confluent Environment resource model */ + body?: SCEnvironmentRecord; +} + +/** Contains response data for the createOrUpdate operation. */ +export type EnvironmentCreateOrUpdateResponse = SCEnvironmentRecord; + +/** Optional parameters. */ +export interface EnvironmentDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the delete operation. */ +export type EnvironmentDeleteResponse = EnvironmentDeleteHeaders; + +/** Optional parameters. */ +export interface ClusterCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Confluent Cluster resource model */ + body?: SCClusterRecord; +} + +/** Contains response data for the createOrUpdate operation. */ +export type ClusterCreateOrUpdateResponse = SCClusterRecord; + +/** Optional parameters. */ +export interface ClusterDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the delete operation. */ +export type ClusterDeleteResponse = ClusterDeleteHeaders; + +/** Optional parameters. */ +export interface ConnectorGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ConnectorGetResponse = ConnectorResource; + +/** Optional parameters. */ +export interface ConnectorCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Confluent Connector resource model */ + body?: ConnectorResource; +} + +/** Contains response data for the createOrUpdate operation. */ +export type ConnectorCreateOrUpdateResponse = ConnectorResource; + +/** Optional parameters. */ +export interface ConnectorDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the delete operation. */ +export type ConnectorDeleteResponse = ConnectorDeleteHeaders; + +/** Optional parameters. */ +export interface ConnectorListOptionalParams + 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 list operation. */ +export type ConnectorListResponse = ListConnectorsSuccessResponse; + +/** Optional parameters. */ +export interface ConnectorListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type ConnectorListNextResponse = ListConnectorsSuccessResponse; + +/** Optional parameters. */ +export interface TopicsListOptionalParams 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 list operation. */ +export type TopicsListResponse = ListTopicsSuccessResponse; + +/** Optional parameters. */ +export interface TopicsGetOptionalParams extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type TopicsGetResponse = TopicRecord; + +/** Optional parameters. */ +export interface TopicsCreateOptionalParams + extends coreClient.OperationOptions { + /** Confluent Topics resource model */ + body?: TopicRecord; +} + +/** Contains response data for the create operation. */ +export type TopicsCreateResponse = TopicRecord; + +/** Optional parameters. */ +export interface TopicsDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the delete operation. */ +export type TopicsDeleteResponse = TopicsDeleteHeaders; + +/** Optional parameters. */ +export interface TopicsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type TopicsListNextResponse = ListTopicsSuccessResponse; + /** Optional parameters. */ export interface ConfluentManagementClientOptionalParams extends coreClient.ServiceClientOptions { diff --git a/sdk/confluent/arm-confluent/src/models/mappers.ts b/sdk/confluent/arm-confluent/src/models/mappers.ts index b2a950b00d89..75dfb7c4a534 100644 --- a/sdk/confluent/arm-confluent/src/models/mappers.ts +++ b/sdk/confluent/arm-confluent/src/models/mappers.ts @@ -1579,12 +1579,25 @@ export const SCEnvironmentRecord: coreClient.CompositeMapper = { name: "String", }, }, + type: { + serializedName: "type", + type: { + name: "String", + }, + }, name: { serializedName: "name", type: { name: "String", }, }, + streamGovernanceConfig: { + serializedName: "properties.streamGovernanceConfig", + type: { + name: "Composite", + className: "StreamGovernanceConfig", + }, + }, metadata: { serializedName: "properties.metadata", type: { @@ -1596,6 +1609,21 @@ export const SCEnvironmentRecord: coreClient.CompositeMapper = { }, }; +export const StreamGovernanceConfig: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "StreamGovernanceConfig", + modelProperties: { + package: { + serializedName: "package", + type: { + name: "String", + }, + }, + }, + }, +}; + export const SCMetadataEntity: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1635,6 +1663,102 @@ export const SCMetadataEntity: coreClient.CompositeMapper = { }, }; +export const ErrorResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorResponse", + modelProperties: { + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorDetail", + }, + }, + }, + }, +}; + +export const ErrorDetail: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorDetail", + modelProperties: { + code: { + serializedName: "code", + readOnly: true, + type: { + name: "String", + }, + }, + message: { + serializedName: "message", + readOnly: true, + type: { + name: "String", + }, + }, + target: { + serializedName: "target", + readOnly: true, + type: { + name: "String", + }, + }, + details: { + serializedName: "details", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorDetail", + }, + }, + }, + }, + additionalInfo: { + serializedName: "additionalInfo", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorAdditionalInfo", + }, + }, + }, + }, + }, + }, +}; + +export const ErrorAdditionalInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorAdditionalInfo", + modelProperties: { + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String", + }, + }, + info: { + serializedName: "info", + readOnly: true, + type: { + name: "Dictionary", + value: { type: { name: "any" } }, + }, + }, + }, + }, +}; + export const ListClustersSuccessResponse: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1679,6 +1803,12 @@ export const SCClusterRecord: coreClient.CompositeMapper = { name: "String", }, }, + type: { + serializedName: "type", + type: { + name: "String", + }, + }, name: { serializedName: "name", type: { @@ -1739,6 +1869,12 @@ export const SCClusterSpecEntity: coreClient.CompositeMapper = { name: "String", }, }, + package: { + serializedName: "package", + type: { + name: "String", + }, + }, region: { serializedName: "region", type: { @@ -2277,41 +2413,1080 @@ export const APIKeyOwnerEntity: coreClient.CompositeMapper = { }, }; -export const SCConfluentListMetadata: coreClient.CompositeMapper = { +export const ConnectorInfoBase: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SCConfluentListMetadata", + className: "ConnectorInfoBase", modelProperties: { - first: { - serializedName: "first", + connectorType: { + serializedName: "connectorType", type: { name: "String", }, }, - last: { - serializedName: "last", + connectorClass: { + serializedName: "connectorClass", type: { name: "String", }, }, - prev: { - serializedName: "prev", + connectorName: { + serializedName: "connectorName", type: { name: "String", }, }, - next: { - serializedName: "next", + connectorId: { + serializedName: "connectorId", type: { name: "String", }, }, - totalSize: { - serializedName: "totalSize", + connectorState: { + serializedName: "connectorState", type: { - name: "Number", + name: "String", + }, + }, + }, + }, +}; + +export const ConnectorServiceTypeInfoBase: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ConnectorServiceTypeInfoBase", + uberParent: "ConnectorServiceTypeInfoBase", + polymorphicDiscriminator: { + serializedName: "connectorServiceType", + clientName: "connectorServiceType", + }, + modelProperties: { + connectorServiceType: { + serializedName: "connectorServiceType", + required: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const PartnerInfoBase: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PartnerInfoBase", + uberParent: "PartnerInfoBase", + polymorphicDiscriminator: { + serializedName: "partnerConnectorType", + clientName: "partnerConnectorType", + }, + modelProperties: { + partnerConnectorType: { + serializedName: "partnerConnectorType", + required: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const Resource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Resource", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String", + }, + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String", + }, + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String", + }, + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData", }, }, }, }, }; + +export const ListConnectorsSuccessResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ListConnectorsSuccessResponse", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ConnectorResource", + }, + }, + }, + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const ListTopicsSuccessResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ListTopicsSuccessResponse", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TopicRecord", + }, + }, + }, + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const TopicRecord: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TopicRecord", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String", + }, + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String", + }, + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String", + }, + }, + kind: { + serializedName: "properties.kind", + type: { + name: "String", + }, + }, + topicId: { + serializedName: "properties.topicId", + type: { + name: "String", + }, + }, + metadata: { + serializedName: "properties.metadata", + type: { + name: "Composite", + className: "TopicMetadataEntity", + }, + }, + partitions: { + serializedName: "properties.partitions", + type: { + name: "Composite", + className: "TopicsRelatedLink", + }, + }, + configs: { + serializedName: "properties.configs", + type: { + name: "Composite", + className: "TopicsRelatedLink", + }, + }, + inputConfigs: { + serializedName: "properties.inputConfigs", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TopicsInputConfig", + }, + }, + }, + }, + partitionsReassignments: { + serializedName: "properties.partitionsReassignments", + type: { + name: "Composite", + className: "TopicsRelatedLink", + }, + }, + partitionsCount: { + serializedName: "properties.partitionsCount", + type: { + name: "String", + }, + }, + replicationFactor: { + serializedName: "properties.replicationFactor", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const TopicMetadataEntity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TopicMetadataEntity", + modelProperties: { + self: { + serializedName: "self", + type: { + name: "String", + }, + }, + resourceName: { + serializedName: "resourceName", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const TopicsRelatedLink: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TopicsRelatedLink", + modelProperties: { + related: { + serializedName: "related", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const TopicsInputConfig: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TopicsInputConfig", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String", + }, + }, + value: { + serializedName: "value", + 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", + }, + }, + }, + }, +}; + +export const AzureBlobStorageSinkConnectorServiceInfo: coreClient.CompositeMapper = + { + serializedName: "AzureBlobStorageSinkConnector", + type: { + name: "Composite", + className: "AzureBlobStorageSinkConnectorServiceInfo", + uberParent: "ConnectorServiceTypeInfoBase", + polymorphicDiscriminator: + ConnectorServiceTypeInfoBase.type.polymorphicDiscriminator, + modelProperties: { + ...ConnectorServiceTypeInfoBase.type.modelProperties, + storageAccountName: { + serializedName: "storageAccountName", + type: { + name: "String", + }, + }, + storageAccountKey: { + serializedName: "storageAccountKey", + type: { + name: "String", + }, + }, + storageContainerName: { + serializedName: "storageContainerName", + type: { + name: "String", + }, + }, + }, + }, + }; + +export const AzureBlobStorageSourceConnectorServiceInfo: coreClient.CompositeMapper = + { + serializedName: "AzureBlobStorageSourceConnector", + type: { + name: "Composite", + className: "AzureBlobStorageSourceConnectorServiceInfo", + uberParent: "ConnectorServiceTypeInfoBase", + polymorphicDiscriminator: + ConnectorServiceTypeInfoBase.type.polymorphicDiscriminator, + modelProperties: { + ...ConnectorServiceTypeInfoBase.type.modelProperties, + storageAccountName: { + serializedName: "storageAccountName", + type: { + name: "String", + }, + }, + storageAccountKey: { + serializedName: "storageAccountKey", + type: { + name: "String", + }, + }, + storageContainerName: { + serializedName: "storageContainerName", + type: { + name: "String", + }, + }, + }, + }, + }; + +export const AzureCosmosDBSinkConnectorServiceInfo: coreClient.CompositeMapper = + { + serializedName: "AzureCosmosDBSinkConnector", + type: { + name: "Composite", + className: "AzureCosmosDBSinkConnectorServiceInfo", + uberParent: "ConnectorServiceTypeInfoBase", + polymorphicDiscriminator: + ConnectorServiceTypeInfoBase.type.polymorphicDiscriminator, + modelProperties: { + ...ConnectorServiceTypeInfoBase.type.modelProperties, + cosmosDatabaseName: { + serializedName: "cosmosDatabaseName", + type: { + name: "String", + }, + }, + cosmosMasterKey: { + serializedName: "cosmosMasterKey", + type: { + name: "String", + }, + }, + cosmosConnectionEndpoint: { + serializedName: "cosmosConnectionEndpoint", + type: { + name: "String", + }, + }, + cosmosContainersTopicMapping: { + serializedName: "cosmosContainersTopicMapping", + type: { + name: "String", + }, + }, + cosmosIdStrategy: { + serializedName: "cosmosIdStrategy", + type: { + name: "String", + }, + }, + }, + }, + }; + +export const AzureCosmosDBSourceConnectorServiceInfo: coreClient.CompositeMapper = + { + serializedName: "AzureCosmosDBSourceConnector", + type: { + name: "Composite", + className: "AzureCosmosDBSourceConnectorServiceInfo", + uberParent: "ConnectorServiceTypeInfoBase", + polymorphicDiscriminator: + ConnectorServiceTypeInfoBase.type.polymorphicDiscriminator, + modelProperties: { + ...ConnectorServiceTypeInfoBase.type.modelProperties, + cosmosDatabaseName: { + serializedName: "cosmosDatabaseName", + type: { + name: "String", + }, + }, + cosmosMasterKey: { + serializedName: "cosmosMasterKey", + type: { + name: "String", + }, + }, + cosmosConnectionEndpoint: { + serializedName: "cosmosConnectionEndpoint", + type: { + name: "String", + }, + }, + cosmosContainersTopicMapping: { + serializedName: "cosmosContainersTopicMapping", + type: { + name: "String", + }, + }, + cosmosMessageKeyEnabled: { + serializedName: "cosmosMessageKeyEnabled", + type: { + name: "Boolean", + }, + }, + cosmosMessageKeyField: { + serializedName: "cosmosMessageKeyField", + type: { + name: "String", + }, + }, + }, + }, + }; + +export const AzureSynapseAnalyticsSinkConnectorServiceInfo: coreClient.CompositeMapper = + { + serializedName: "AzureSynapseAnalyticsSinkConnector", + type: { + name: "Composite", + className: "AzureSynapseAnalyticsSinkConnectorServiceInfo", + uberParent: "ConnectorServiceTypeInfoBase", + polymorphicDiscriminator: + ConnectorServiceTypeInfoBase.type.polymorphicDiscriminator, + modelProperties: { + ...ConnectorServiceTypeInfoBase.type.modelProperties, + synapseSqlServerName: { + serializedName: "synapseSqlServerName", + type: { + name: "String", + }, + }, + synapseSqlUser: { + serializedName: "synapseSqlUser", + type: { + name: "String", + }, + }, + synapseSqlPassword: { + serializedName: "synapseSqlPassword", + type: { + name: "String", + }, + }, + synapseSqlDatabaseName: { + serializedName: "synapseSqlDatabaseName", + type: { + name: "String", + }, + }, + }, + }, + }; + +export const KafkaAzureBlobStorageSinkConnectorInfo: coreClient.CompositeMapper = + { + serializedName: "KafkaAzureBlobStorageSink", + type: { + name: "Composite", + className: "KafkaAzureBlobStorageSinkConnectorInfo", + uberParent: "PartnerInfoBase", + polymorphicDiscriminator: PartnerInfoBase.type.polymorphicDiscriminator, + modelProperties: { + ...PartnerInfoBase.type.modelProperties, + authType: { + serializedName: "authType", + type: { + name: "String", + }, + }, + inputFormat: { + serializedName: "inputFormat", + type: { + name: "String", + }, + }, + outputFormat: { + serializedName: "outputFormat", + type: { + name: "String", + }, + }, + apiKey: { + serializedName: "apiKey", + type: { + name: "String", + }, + }, + apiSecret: { + serializedName: "apiSecret", + type: { + name: "String", + }, + }, + serviceAccountId: { + serializedName: "serviceAccountId", + type: { + name: "String", + }, + }, + topics: { + serializedName: "topics", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + topicsDir: { + serializedName: "topicsDir", + type: { + name: "String", + }, + }, + flushSize: { + serializedName: "flushSize", + type: { + name: "String", + }, + }, + maxTasks: { + serializedName: "maxTasks", + type: { + name: "String", + }, + }, + timeInterval: { + serializedName: "timeInterval", + type: { + name: "String", + }, + }, + }, + }, + }; + +export const KafkaAzureBlobStorageSourceConnectorInfo: coreClient.CompositeMapper = + { + serializedName: "KafkaAzureBlobStorageSource", + type: { + name: "Composite", + className: "KafkaAzureBlobStorageSourceConnectorInfo", + uberParent: "PartnerInfoBase", + polymorphicDiscriminator: PartnerInfoBase.type.polymorphicDiscriminator, + modelProperties: { + ...PartnerInfoBase.type.modelProperties, + authType: { + serializedName: "authType", + type: { + name: "String", + }, + }, + inputFormat: { + serializedName: "inputFormat", + type: { + name: "String", + }, + }, + outputFormat: { + serializedName: "outputFormat", + type: { + name: "String", + }, + }, + apiKey: { + serializedName: "apiKey", + type: { + name: "String", + }, + }, + apiSecret: { + serializedName: "apiSecret", + type: { + name: "String", + }, + }, + serviceAccountId: { + serializedName: "serviceAccountId", + type: { + name: "String", + }, + }, + topicRegex: { + serializedName: "topicRegex", + type: { + name: "String", + }, + }, + topicsDir: { + serializedName: "topicsDir", + type: { + name: "String", + }, + }, + maxTasks: { + serializedName: "maxTasks", + type: { + name: "String", + }, + }, + }, + }, + }; + +export const KafkaAzureCosmosDBSinkConnectorInfo: coreClient.CompositeMapper = { + serializedName: "KafkaAzureCosmosDBSink", + type: { + name: "Composite", + className: "KafkaAzureCosmosDBSinkConnectorInfo", + uberParent: "PartnerInfoBase", + polymorphicDiscriminator: PartnerInfoBase.type.polymorphicDiscriminator, + modelProperties: { + ...PartnerInfoBase.type.modelProperties, + authType: { + serializedName: "authType", + type: { + name: "String", + }, + }, + inputFormat: { + serializedName: "inputFormat", + type: { + name: "String", + }, + }, + outputFormat: { + serializedName: "outputFormat", + type: { + name: "String", + }, + }, + apiKey: { + serializedName: "apiKey", + type: { + name: "String", + }, + }, + apiSecret: { + serializedName: "apiSecret", + type: { + name: "String", + }, + }, + serviceAccountId: { + serializedName: "serviceAccountId", + type: { + name: "String", + }, + }, + topics: { + serializedName: "topics", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + topicsDir: { + serializedName: "topicsDir", + type: { + name: "String", + }, + }, + flushSize: { + serializedName: "flushSize", + type: { + name: "String", + }, + }, + maxTasks: { + serializedName: "maxTasks", + type: { + name: "String", + }, + }, + timeInterval: { + serializedName: "timeInterval", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const KafkaAzureCosmosDBSourceConnectorInfo: coreClient.CompositeMapper = + { + serializedName: "KafkaAzureCosmosDBSource", + type: { + name: "Composite", + className: "KafkaAzureCosmosDBSourceConnectorInfo", + uberParent: "PartnerInfoBase", + polymorphicDiscriminator: PartnerInfoBase.type.polymorphicDiscriminator, + modelProperties: { + ...PartnerInfoBase.type.modelProperties, + authType: { + serializedName: "authType", + type: { + name: "String", + }, + }, + inputFormat: { + serializedName: "inputFormat", + type: { + name: "String", + }, + }, + outputFormat: { + serializedName: "outputFormat", + type: { + name: "String", + }, + }, + apiKey: { + serializedName: "apiKey", + type: { + name: "String", + }, + }, + apiSecret: { + serializedName: "apiSecret", + type: { + name: "String", + }, + }, + serviceAccountId: { + serializedName: "serviceAccountId", + type: { + name: "String", + }, + }, + topicRegex: { + serializedName: "topicRegex", + type: { + name: "String", + }, + }, + topicsDir: { + serializedName: "topicsDir", + type: { + name: "String", + }, + }, + maxTasks: { + serializedName: "maxTasks", + type: { + name: "String", + }, + }, + }, + }, + }; + +export const KafkaAzureSynapseAnalyticsSinkConnectorInfo: coreClient.CompositeMapper = + { + serializedName: "KafkaAzureSynapseAnalyticsSink", + type: { + name: "Composite", + className: "KafkaAzureSynapseAnalyticsSinkConnectorInfo", + uberParent: "PartnerInfoBase", + polymorphicDiscriminator: PartnerInfoBase.type.polymorphicDiscriminator, + modelProperties: { + ...PartnerInfoBase.type.modelProperties, + authType: { + serializedName: "authType", + type: { + name: "String", + }, + }, + inputFormat: { + serializedName: "inputFormat", + type: { + name: "String", + }, + }, + outputFormat: { + serializedName: "outputFormat", + type: { + name: "String", + }, + }, + apiKey: { + serializedName: "apiKey", + type: { + name: "String", + }, + }, + apiSecret: { + serializedName: "apiSecret", + type: { + name: "String", + }, + }, + serviceAccountId: { + serializedName: "serviceAccountId", + type: { + name: "String", + }, + }, + topics: { + serializedName: "topics", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + topicsDir: { + serializedName: "topicsDir", + type: { + name: "String", + }, + }, + flushSize: { + serializedName: "flushSize", + type: { + name: "String", + }, + }, + maxTasks: { + serializedName: "maxTasks", + type: { + name: "String", + }, + }, + timeInterval: { + serializedName: "timeInterval", + type: { + name: "String", + }, + }, + }, + }, + }; + +export const ProxyResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ProxyResource", + modelProperties: { + ...Resource.type.modelProperties, + }, + }, +}; + +export const ConnectorResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ConnectorResource", + modelProperties: { + ...ProxyResource.type.modelProperties, + connectorBasicInfo: { + serializedName: "properties.connectorBasicInfo", + type: { + name: "Composite", + className: "ConnectorInfoBase", + }, + }, + connectorServiceTypeInfo: { + serializedName: "properties.connectorServiceTypeInfo", + type: { + name: "Composite", + className: "ConnectorServiceTypeInfoBase", + }, + }, + partnerConnectorInfo: { + serializedName: "properties.partnerConnectorInfo", + type: { + name: "Composite", + className: "PartnerInfoBase", + }, + }, + }, + }, +}; + +export const EnvironmentDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "EnvironmentDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const ClusterDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClusterDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const ConnectorDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ConnectorDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const TopicsDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TopicsDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + }, + }, +}; + +export let discriminators = { + ConnectorServiceTypeInfoBase: ConnectorServiceTypeInfoBase, + PartnerInfoBase: PartnerInfoBase, + "ConnectorServiceTypeInfoBase.AzureBlobStorageSinkConnector": + AzureBlobStorageSinkConnectorServiceInfo, + "ConnectorServiceTypeInfoBase.AzureBlobStorageSourceConnector": + AzureBlobStorageSourceConnectorServiceInfo, + "ConnectorServiceTypeInfoBase.AzureCosmosDBSinkConnector": + AzureCosmosDBSinkConnectorServiceInfo, + "ConnectorServiceTypeInfoBase.AzureCosmosDBSourceConnector": + AzureCosmosDBSourceConnectorServiceInfo, + "ConnectorServiceTypeInfoBase.AzureSynapseAnalyticsSinkConnector": + AzureSynapseAnalyticsSinkConnectorServiceInfo, + "PartnerInfoBase.KafkaAzureBlobStorageSink": + KafkaAzureBlobStorageSinkConnectorInfo, + "PartnerInfoBase.KafkaAzureBlobStorageSource": + KafkaAzureBlobStorageSourceConnectorInfo, + "PartnerInfoBase.KafkaAzureCosmosDBSink": KafkaAzureCosmosDBSinkConnectorInfo, + "PartnerInfoBase.KafkaAzureCosmosDBSource": + KafkaAzureCosmosDBSourceConnectorInfo, + "PartnerInfoBase.KafkaAzureSynapseAnalyticsSink": + KafkaAzureSynapseAnalyticsSinkConnectorInfo, +}; diff --git a/sdk/confluent/arm-confluent/src/models/parameters.ts b/sdk/confluent/arm-confluent/src/models/parameters.ts index 9593b186b4b5..8940fbe4936f 100644 --- a/sdk/confluent/arm-confluent/src/models/parameters.ts +++ b/sdk/confluent/arm-confluent/src/models/parameters.ts @@ -19,6 +19,10 @@ import { CreateAPIKeyModel as CreateAPIKeyModelMapper, AccessInviteUserAccountModel as AccessInviteUserAccountModelMapper, AccessCreateRoleBindingRequestModel as AccessCreateRoleBindingRequestModelMapper, + SCEnvironmentRecord as SCEnvironmentRecordMapper, + SCClusterRecord as SCClusterRecordMapper, + ConnectorResource as ConnectorResourceMapper, + TopicRecord as TopicRecordMapper, } from "../models/mappers"; export const accept: OperationParameter = { @@ -48,7 +52,7 @@ export const $host: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2024-02-13", + defaultValue: "2024-07-01", isConstant: true, serializedName: "api-version", type: { @@ -232,3 +236,45 @@ export const roleBindingId: OperationURLParameter = { }, }, }; + +export const body8: OperationParameter = { + parameterPath: ["options", "body"], + mapper: SCEnvironmentRecordMapper, +}; + +export const body9: OperationParameter = { + parameterPath: ["options", "body"], + mapper: SCClusterRecordMapper, +}; + +export const connectorName: OperationURLParameter = { + parameterPath: "connectorName", + mapper: { + serializedName: "connectorName", + required: true, + type: { + name: "String", + }, + }, +}; + +export const body10: OperationParameter = { + parameterPath: ["options", "body"], + mapper: ConnectorResourceMapper, +}; + +export const topicName: OperationURLParameter = { + parameterPath: "topicName", + mapper: { + serializedName: "topicName", + required: true, + type: { + name: "String", + }, + }, +}; + +export const body11: OperationParameter = { + parameterPath: ["options", "body"], + mapper: TopicRecordMapper, +}; diff --git a/sdk/confluent/arm-confluent/src/operations/cluster.ts b/sdk/confluent/arm-confluent/src/operations/cluster.ts new file mode 100644 index 000000000000..552c24299953 --- /dev/null +++ b/sdk/confluent/arm-confluent/src/operations/cluster.ts @@ -0,0 +1,234 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { Cluster } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { ConfluentManagementClient } from "../confluentManagementClient"; +import { + SimplePollerLike, + OperationState, + createHttpPoller, +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + ClusterCreateOrUpdateOptionalParams, + ClusterCreateOrUpdateResponse, + ClusterDeleteOptionalParams, + ClusterDeleteResponse, +} from "../models"; + +/** Class containing Cluster operations. */ +export class ClusterImpl implements Cluster { + private readonly client: ConfluentManagementClient; + + /** + * Initialize a new instance of the class Cluster class. + * @param client Reference to the service client + */ + constructor(client: ConfluentManagementClient) { + this.client = client; + } + + /** + * Create confluent 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 clusterId Confluent kafka or schema registry cluster id + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + organizationName: string, + environmentId: string, + clusterId: string, + options?: ClusterCreateOrUpdateOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + organizationName, + environmentId, + clusterId, + options, + }, + createOrUpdateOperationSpec, + ); + } + + /** + * Delete confluent 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. + */ + async beginDelete( + resourceGroupName: string, + organizationName: string, + environmentId: string, + clusterId: string, + options?: ClusterDeleteOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + ClusterDeleteResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + organizationName, + environmentId, + clusterId, + options, + }, + spec: deleteOperationSpec, + }); + const poller = await createHttpPoller< + ClusterDeleteResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", + }); + await poller.poll(); + return poller; + } + + /** + * Delete confluent 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. + */ + async beginDeleteAndWait( + resourceGroupName: string, + organizationName: string, + environmentId: string, + clusterId: string, + options?: ClusterDeleteOptionalParams, + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + organizationName, + environmentId, + clusterId, + options, + ); + return poller.pollUntilDone(); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.SCClusterRecord, + }, + 201: { + bodyMapper: Mappers.SCClusterRecord, + }, + default: { + bodyMapper: Mappers.ResourceProviderDefaultErrorResponse, + }, + }, + requestBody: Parameters.body9, + 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 deleteOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId}", + httpMethod: "DELETE", + responses: { + 200: { + headersMapper: Mappers.ClusterDeleteHeaders, + }, + 201: { + headersMapper: Mappers.ClusterDeleteHeaders, + }, + 202: { + headersMapper: Mappers.ClusterDeleteHeaders, + }, + 204: { + headersMapper: Mappers.ClusterDeleteHeaders, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.organizationName, + Parameters.resourceGroupName1, + Parameters.environmentId, + Parameters.clusterId, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/confluent/arm-confluent/src/operations/connector.ts b/sdk/confluent/arm-confluent/src/operations/connector.ts new file mode 100644 index 000000000000..8694447f213c --- /dev/null +++ b/sdk/confluent/arm-confluent/src/operations/connector.ts @@ -0,0 +1,518 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { Connector } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { ConfluentManagementClient } from "../confluentManagementClient"; +import { + SimplePollerLike, + OperationState, + createHttpPoller, +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + ConnectorResource, + ConnectorListNextOptionalParams, + ConnectorListOptionalParams, + ConnectorListResponse, + ConnectorGetOptionalParams, + ConnectorGetResponse, + ConnectorCreateOrUpdateOptionalParams, + ConnectorCreateOrUpdateResponse, + ConnectorDeleteOptionalParams, + ConnectorDeleteResponse, + ConnectorListNextResponse, +} from "../models"; + +/// +/** Class containing Connector operations. */ +export class ConnectorImpl implements Connector { + private readonly client: ConfluentManagementClient; + + /** + * Initialize a new instance of the class Connector class. + * @param client Reference to the service client + */ + constructor(client: ConfluentManagementClient) { + this.client = client; + } + + /** + * Lists all the connectors in a cluster + * @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. + */ + public list( + resourceGroupName: string, + organizationName: string, + environmentId: string, + clusterId: string, + options?: ConnectorListOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + organizationName, + environmentId, + clusterId, + 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.listPagingPage( + resourceGroupName, + organizationName, + environmentId, + clusterId, + options, + settings, + ); + }, + }; + } + + private async *listPagingPage( + resourceGroupName: string, + organizationName: string, + environmentId: string, + clusterId: string, + options?: ConnectorListOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: ConnectorListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list( + resourceGroupName, + organizationName, + environmentId, + clusterId, + options, + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + organizationName, + environmentId, + clusterId, + continuationToken, + options, + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + organizationName: string, + environmentId: string, + clusterId: string, + options?: ConnectorListOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + organizationName, + environmentId, + clusterId, + options, + )) { + yield* page; + } + } + + /** + * Get confluent connector by Name + * @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 connectorName Confluent connector name + * @param options The options parameters. + */ + get( + resourceGroupName: string, + organizationName: string, + environmentId: string, + clusterId: string, + connectorName: string, + options?: ConnectorGetOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + organizationName, + environmentId, + clusterId, + connectorName, + options, + }, + getOperationSpec, + ); + } + + /** + * Create confluent connector by Name + * @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 connectorName Confluent connector name + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + organizationName: string, + environmentId: string, + clusterId: string, + connectorName: string, + options?: ConnectorCreateOrUpdateOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + organizationName, + environmentId, + clusterId, + connectorName, + options, + }, + createOrUpdateOperationSpec, + ); + } + + /** + * Delete confluent connector by name + * @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 connectorName Confluent connector name + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + organizationName: string, + environmentId: string, + clusterId: string, + connectorName: string, + options?: ConnectorDeleteOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + ConnectorDeleteResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + organizationName, + environmentId, + clusterId, + connectorName, + options, + }, + spec: deleteOperationSpec, + }); + const poller = await createHttpPoller< + ConnectorDeleteResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", + }); + await poller.poll(); + return poller; + } + + /** + * Delete confluent connector by name + * @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 connectorName Confluent connector name + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + organizationName: string, + environmentId: string, + clusterId: string, + connectorName: string, + options?: ConnectorDeleteOptionalParams, + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + organizationName, + environmentId, + clusterId, + connectorName, + options, + ); + return poller.pollUntilDone(); + } + + /** + * Lists all the connectors in a cluster + * @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. + */ + private _list( + resourceGroupName: string, + organizationName: string, + environmentId: string, + clusterId: string, + options?: ConnectorListOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + organizationName, + environmentId, + clusterId, + options, + }, + listOperationSpec, + ); + } + + /** + * ListNext + * @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 nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + organizationName: string, + environmentId: string, + clusterId: string, + nextLink: string, + options?: ConnectorListNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + organizationName, + environmentId, + clusterId, + nextLink, + options, + }, + listNextOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId}/connectors/{connectorName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ConnectorResource, + }, + default: { + bodyMapper: Mappers.ResourceProviderDefaultErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.organizationName, + Parameters.resourceGroupName1, + Parameters.environmentId, + Parameters.clusterId, + Parameters.connectorName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId}/connectors/{connectorName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ConnectorResource, + }, + 201: { + bodyMapper: Mappers.ConnectorResource, + }, + default: { + bodyMapper: Mappers.ResourceProviderDefaultErrorResponse, + }, + }, + requestBody: Parameters.body10, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.organizationName, + Parameters.resourceGroupName1, + Parameters.environmentId, + Parameters.clusterId, + Parameters.connectorName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId}/connectors/{connectorName}", + httpMethod: "DELETE", + responses: { + 200: { + headersMapper: Mappers.ConnectorDeleteHeaders, + }, + 201: { + headersMapper: Mappers.ConnectorDeleteHeaders, + }, + 202: { + headersMapper: Mappers.ConnectorDeleteHeaders, + }, + 204: { + headersMapper: Mappers.ConnectorDeleteHeaders, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.organizationName, + Parameters.resourceGroupName1, + Parameters.environmentId, + Parameters.clusterId, + Parameters.connectorName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId}/connectors", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ListConnectorsSuccessResponse, + }, + default: { + bodyMapper: Mappers.ResourceProviderDefaultErrorResponse, + }, + }, + queryParameters: [ + Parameters.apiVersion, + Parameters.pageSize, + Parameters.pageToken, + ], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.organizationName, + Parameters.resourceGroupName1, + Parameters.environmentId, + Parameters.clusterId, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ListConnectorsSuccessResponse, + }, + default: { + bodyMapper: Mappers.ResourceProviderDefaultErrorResponse, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.organizationName, + Parameters.resourceGroupName1, + Parameters.environmentId, + Parameters.clusterId, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/confluent/arm-confluent/src/operations/environment.ts b/sdk/confluent/arm-confluent/src/operations/environment.ts new file mode 100644 index 000000000000..4048b3581b6f --- /dev/null +++ b/sdk/confluent/arm-confluent/src/operations/environment.ts @@ -0,0 +1,213 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { Environment } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { ConfluentManagementClient } from "../confluentManagementClient"; +import { + SimplePollerLike, + OperationState, + createHttpPoller, +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + EnvironmentCreateOrUpdateOptionalParams, + EnvironmentCreateOrUpdateResponse, + EnvironmentDeleteOptionalParams, + EnvironmentDeleteResponse, +} from "../models"; + +/** Class containing Environment operations. */ +export class EnvironmentImpl implements Environment { + private readonly client: ConfluentManagementClient; + + /** + * Initialize a new instance of the class Environment class. + * @param client Reference to the service client + */ + constructor(client: ConfluentManagementClient) { + this.client = client; + } + + /** + * Create confluent 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. + */ + createOrUpdate( + resourceGroupName: string, + organizationName: string, + environmentId: string, + options?: EnvironmentCreateOrUpdateOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, organizationName, environmentId, options }, + createOrUpdateOperationSpec, + ); + } + + /** + * Delete confluent environment 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 options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + organizationName: string, + environmentId: string, + options?: EnvironmentDeleteOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + EnvironmentDeleteResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, organizationName, environmentId, options }, + spec: deleteOperationSpec, + }); + const poller = await createHttpPoller< + EnvironmentDeleteResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", + }); + await poller.poll(); + return poller; + } + + /** + * Delete confluent environment 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 options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + organizationName: string, + environmentId: string, + options?: EnvironmentDeleteOptionalParams, + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + organizationName, + environmentId, + options, + ); + return poller.pollUntilDone(); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.SCEnvironmentRecord, + }, + 201: { + bodyMapper: Mappers.SCEnvironmentRecord, + }, + default: { + bodyMapper: Mappers.ResourceProviderDefaultErrorResponse, + }, + }, + requestBody: Parameters.body8, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.organizationName, + Parameters.resourceGroupName1, + Parameters.environmentId, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}", + httpMethod: "DELETE", + responses: { + 200: { + headersMapper: Mappers.EnvironmentDeleteHeaders, + }, + 201: { + headersMapper: Mappers.EnvironmentDeleteHeaders, + }, + 202: { + headersMapper: Mappers.EnvironmentDeleteHeaders, + }, + 204: { + headersMapper: Mappers.EnvironmentDeleteHeaders, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.organizationName, + Parameters.resourceGroupName1, + Parameters.environmentId, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/confluent/arm-confluent/src/operations/index.ts b/sdk/confluent/arm-confluent/src/operations/index.ts index 301a3ab1fe75..67b2acf38878 100644 --- a/sdk/confluent/arm-confluent/src/operations/index.ts +++ b/sdk/confluent/arm-confluent/src/operations/index.ts @@ -11,3 +11,7 @@ export * from "./organizationOperations"; export * from "./organization"; export * from "./validations"; export * from "./access"; +export * from "./environment"; +export * from "./cluster"; +export * from "./connector"; +export * from "./topics"; diff --git a/sdk/confluent/arm-confluent/src/operations/topics.ts b/sdk/confluent/arm-confluent/src/operations/topics.ts new file mode 100644 index 000000000000..f64a44d2fa3e --- /dev/null +++ b/sdk/confluent/arm-confluent/src/operations/topics.ts @@ -0,0 +1,515 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { Topics } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { ConfluentManagementClient } from "../confluentManagementClient"; +import { + SimplePollerLike, + OperationState, + createHttpPoller, +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + TopicRecord, + TopicsListNextOptionalParams, + TopicsListOptionalParams, + TopicsListResponse, + TopicsGetOptionalParams, + TopicsGetResponse, + TopicsCreateOptionalParams, + TopicsCreateResponse, + TopicsDeleteOptionalParams, + TopicsDeleteResponse, + TopicsListNextResponse, +} from "../models"; + +/// +/** Class containing Topics operations. */ +export class TopicsImpl implements Topics { + private readonly client: ConfluentManagementClient; + + /** + * Initialize a new instance of the class Topics class. + * @param client Reference to the service client + */ + constructor(client: ConfluentManagementClient) { + this.client = client; + } + + /** + * Lists of all the topics in a 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 clusterId Confluent kafka or schema registry cluster id + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + organizationName: string, + environmentId: string, + clusterId: string, + options?: TopicsListOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + organizationName, + environmentId, + clusterId, + 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.listPagingPage( + resourceGroupName, + organizationName, + environmentId, + clusterId, + options, + settings, + ); + }, + }; + } + + private async *listPagingPage( + resourceGroupName: string, + organizationName: string, + environmentId: string, + clusterId: string, + options?: TopicsListOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: TopicsListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list( + resourceGroupName, + organizationName, + environmentId, + clusterId, + options, + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + organizationName, + environmentId, + clusterId, + continuationToken, + options, + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + organizationName: string, + environmentId: string, + clusterId: string, + options?: TopicsListOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + organizationName, + environmentId, + clusterId, + options, + )) { + yield* page; + } + } + + /** + * Lists of all the topics in a 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 clusterId Confluent kafka or schema registry cluster id + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + organizationName: string, + environmentId: string, + clusterId: string, + options?: TopicsListOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + organizationName, + environmentId, + clusterId, + options, + }, + listOperationSpec, + ); + } + + /** + * Get confluent topic by Name + * @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 topicName Confluent kafka or schema registry topic name + * @param options The options parameters. + */ + get( + resourceGroupName: string, + organizationName: string, + environmentId: string, + clusterId: string, + topicName: string, + options?: TopicsGetOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + organizationName, + environmentId, + clusterId, + topicName, + options, + }, + getOperationSpec, + ); + } + + /** + * Create confluent topics by Name + * @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 topicName Confluent kafka or schema registry topic name + * @param options The options parameters. + */ + create( + resourceGroupName: string, + organizationName: string, + environmentId: string, + clusterId: string, + topicName: string, + options?: TopicsCreateOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + organizationName, + environmentId, + clusterId, + topicName, + options, + }, + createOperationSpec, + ); + } + + /** + * Delete confluent topic by name + * @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 topicName Confluent kafka or schema registry topic name + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + organizationName: string, + environmentId: string, + clusterId: string, + topicName: string, + options?: TopicsDeleteOptionalParams, + ): Promise< + SimplePollerLike, TopicsDeleteResponse> + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + organizationName, + environmentId, + clusterId, + topicName, + options, + }, + spec: deleteOperationSpec, + }); + const poller = await createHttpPoller< + TopicsDeleteResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", + }); + await poller.poll(); + return poller; + } + + /** + * Delete confluent topic by name + * @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 topicName Confluent kafka or schema registry topic name + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + organizationName: string, + environmentId: string, + clusterId: string, + topicName: string, + options?: TopicsDeleteOptionalParams, + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + organizationName, + environmentId, + clusterId, + topicName, + options, + ); + return poller.pollUntilDone(); + } + + /** + * ListNext + * @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 nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + organizationName: string, + environmentId: string, + clusterId: string, + nextLink: string, + options?: TopicsListNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + organizationName, + environmentId, + clusterId, + nextLink, + options, + }, + listNextOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId}/topics", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ListTopicsSuccessResponse, + }, + default: { + bodyMapper: Mappers.ResourceProviderDefaultErrorResponse, + }, + }, + queryParameters: [ + Parameters.apiVersion, + Parameters.pageSize, + Parameters.pageToken, + ], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.organizationName, + Parameters.resourceGroupName1, + Parameters.environmentId, + Parameters.clusterId, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const getOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId}/topics/{topicName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TopicRecord, + }, + default: { + bodyMapper: Mappers.ResourceProviderDefaultErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.organizationName, + Parameters.resourceGroupName1, + Parameters.environmentId, + Parameters.clusterId, + Parameters.topicName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const createOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId}/topics/{topicName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.TopicRecord, + }, + 201: { + bodyMapper: Mappers.TopicRecord, + }, + default: { + bodyMapper: Mappers.ResourceProviderDefaultErrorResponse, + }, + }, + requestBody: Parameters.body11, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.organizationName, + Parameters.resourceGroupName1, + Parameters.environmentId, + Parameters.clusterId, + Parameters.topicName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId}/topics/{topicName}", + httpMethod: "DELETE", + responses: { + 200: { + headersMapper: Mappers.TopicsDeleteHeaders, + }, + 201: { + headersMapper: Mappers.TopicsDeleteHeaders, + }, + 202: { + headersMapper: Mappers.TopicsDeleteHeaders, + }, + 204: { + headersMapper: Mappers.TopicsDeleteHeaders, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.organizationName, + Parameters.resourceGroupName1, + Parameters.environmentId, + Parameters.clusterId, + Parameters.topicName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ListTopicsSuccessResponse, + }, + default: { + bodyMapper: Mappers.ResourceProviderDefaultErrorResponse, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.organizationName, + Parameters.resourceGroupName1, + Parameters.environmentId, + Parameters.clusterId, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/confluent/arm-confluent/src/operationsInterfaces/cluster.ts b/sdk/confluent/arm-confluent/src/operationsInterfaces/cluster.ts new file mode 100644 index 000000000000..20286b4ff3eb --- /dev/null +++ b/sdk/confluent/arm-confluent/src/operationsInterfaces/cluster.ts @@ -0,0 +1,69 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + ClusterCreateOrUpdateOptionalParams, + ClusterCreateOrUpdateResponse, + ClusterDeleteOptionalParams, + ClusterDeleteResponse, +} from "../models"; + +/** Interface representing a Cluster. */ +export interface Cluster { + /** + * Create confluent 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 clusterId Confluent kafka or schema registry cluster id + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + organizationName: string, + environmentId: string, + clusterId: string, + options?: ClusterCreateOrUpdateOptionalParams, + ): Promise; + /** + * Delete confluent 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. + */ + beginDelete( + resourceGroupName: string, + organizationName: string, + environmentId: string, + clusterId: string, + options?: ClusterDeleteOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + ClusterDeleteResponse + > + >; + /** + * Delete confluent 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. + */ + beginDeleteAndWait( + resourceGroupName: string, + organizationName: string, + environmentId: string, + clusterId: string, + options?: ClusterDeleteOptionalParams, + ): Promise; +} diff --git a/sdk/confluent/arm-confluent/src/operationsInterfaces/connector.ts b/sdk/confluent/arm-confluent/src/operationsInterfaces/connector.ts new file mode 100644 index 000000000000..14a7510c2d9d --- /dev/null +++ b/sdk/confluent/arm-confluent/src/operationsInterfaces/connector.ts @@ -0,0 +1,113 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + ConnectorResource, + ConnectorListOptionalParams, + ConnectorGetOptionalParams, + ConnectorGetResponse, + ConnectorCreateOrUpdateOptionalParams, + ConnectorCreateOrUpdateResponse, + ConnectorDeleteOptionalParams, + ConnectorDeleteResponse, +} from "../models"; + +/// +/** Interface representing a Connector. */ +export interface Connector { + /** + * Lists all the connectors in a cluster + * @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. + */ + list( + resourceGroupName: string, + organizationName: string, + environmentId: string, + clusterId: string, + options?: ConnectorListOptionalParams, + ): PagedAsyncIterableIterator; + /** + * Get confluent connector by Name + * @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 connectorName Confluent connector name + * @param options The options parameters. + */ + get( + resourceGroupName: string, + organizationName: string, + environmentId: string, + clusterId: string, + connectorName: string, + options?: ConnectorGetOptionalParams, + ): Promise; + /** + * Create confluent connector by Name + * @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 connectorName Confluent connector name + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + organizationName: string, + environmentId: string, + clusterId: string, + connectorName: string, + options?: ConnectorCreateOrUpdateOptionalParams, + ): Promise; + /** + * Delete confluent connector by name + * @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 connectorName Confluent connector name + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + organizationName: string, + environmentId: string, + clusterId: string, + connectorName: string, + options?: ConnectorDeleteOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + ConnectorDeleteResponse + > + >; + /** + * Delete confluent connector by name + * @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 connectorName Confluent connector name + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + organizationName: string, + environmentId: string, + clusterId: string, + connectorName: string, + options?: ConnectorDeleteOptionalParams, + ): Promise; +} diff --git a/sdk/confluent/arm-confluent/src/operationsInterfaces/environment.ts b/sdk/confluent/arm-confluent/src/operationsInterfaces/environment.ts new file mode 100644 index 000000000000..0846b3b36cee --- /dev/null +++ b/sdk/confluent/arm-confluent/src/operationsInterfaces/environment.ts @@ -0,0 +1,63 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + EnvironmentCreateOrUpdateOptionalParams, + EnvironmentCreateOrUpdateResponse, + EnvironmentDeleteOptionalParams, + EnvironmentDeleteResponse, +} from "../models"; + +/** Interface representing a Environment. */ +export interface Environment { + /** + * Create confluent 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. + */ + createOrUpdate( + resourceGroupName: string, + organizationName: string, + environmentId: string, + options?: EnvironmentCreateOrUpdateOptionalParams, + ): Promise; + /** + * Delete confluent environment 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 options The options parameters. + */ + beginDelete( + resourceGroupName: string, + organizationName: string, + environmentId: string, + options?: EnvironmentDeleteOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + EnvironmentDeleteResponse + > + >; + /** + * Delete confluent environment 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 options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + organizationName: string, + environmentId: string, + options?: EnvironmentDeleteOptionalParams, + ): Promise; +} diff --git a/sdk/confluent/arm-confluent/src/operationsInterfaces/index.ts b/sdk/confluent/arm-confluent/src/operationsInterfaces/index.ts index 301a3ab1fe75..67b2acf38878 100644 --- a/sdk/confluent/arm-confluent/src/operationsInterfaces/index.ts +++ b/sdk/confluent/arm-confluent/src/operationsInterfaces/index.ts @@ -11,3 +11,7 @@ export * from "./organizationOperations"; export * from "./organization"; export * from "./validations"; export * from "./access"; +export * from "./environment"; +export * from "./cluster"; +export * from "./connector"; +export * from "./topics"; diff --git a/sdk/confluent/arm-confluent/src/operationsInterfaces/topics.ts b/sdk/confluent/arm-confluent/src/operationsInterfaces/topics.ts new file mode 100644 index 000000000000..1bb2bf8ed720 --- /dev/null +++ b/sdk/confluent/arm-confluent/src/operationsInterfaces/topics.ts @@ -0,0 +1,110 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + TopicRecord, + TopicsListOptionalParams, + TopicsGetOptionalParams, + TopicsGetResponse, + TopicsCreateOptionalParams, + TopicsCreateResponse, + TopicsDeleteOptionalParams, + TopicsDeleteResponse, +} from "../models"; + +/// +/** Interface representing a Topics. */ +export interface Topics { + /** + * Lists of all the topics in a 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 clusterId Confluent kafka or schema registry cluster id + * @param options The options parameters. + */ + list( + resourceGroupName: string, + organizationName: string, + environmentId: string, + clusterId: string, + options?: TopicsListOptionalParams, + ): PagedAsyncIterableIterator; + /** + * Get confluent topic by Name + * @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 topicName Confluent kafka or schema registry topic name + * @param options The options parameters. + */ + get( + resourceGroupName: string, + organizationName: string, + environmentId: string, + clusterId: string, + topicName: string, + options?: TopicsGetOptionalParams, + ): Promise; + /** + * Create confluent topics by Name + * @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 topicName Confluent kafka or schema registry topic name + * @param options The options parameters. + */ + create( + resourceGroupName: string, + organizationName: string, + environmentId: string, + clusterId: string, + topicName: string, + options?: TopicsCreateOptionalParams, + ): Promise; + /** + * Delete confluent topic by name + * @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 topicName Confluent kafka or schema registry topic name + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + organizationName: string, + environmentId: string, + clusterId: string, + topicName: string, + options?: TopicsDeleteOptionalParams, + ): Promise< + SimplePollerLike, TopicsDeleteResponse> + >; + /** + * Delete confluent topic by name + * @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 topicName Confluent kafka or schema registry topic name + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + organizationName: string, + environmentId: string, + clusterId: string, + topicName: string, + options?: TopicsDeleteOptionalParams, + ): Promise; +} diff --git a/sdk/confluent/arm-confluent/test/sampleTest.ts b/sdk/confluent/arm-confluent/test/sampleTest.ts new file mode 100644 index 000000000000..d64be981b694 --- /dev/null +++ b/sdk/confluent/arm-confluent/test/sampleTest.ts @@ -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. + */ + +import { + Recorder, + RecorderStartOptions, + env, +} from "@azure-tools/test-recorder"; +import { assert } from "chai"; +import { Context } from "mocha"; + +const replaceableVariables: Record = { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id", +}; + +const recorderOptions: RecorderStartOptions = { + envSetupForPlayback: replaceableVariables, +}; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async function (this: Context) { + recorder = new Recorder(this.currentTest); + await recorder.start(recorderOptions); + }); + + afterEach(async function () { + await recorder.stop(); + }); + + it("sample test", async function () { + console.log("Hi, I'm a test!"); + }); +}); diff --git a/sdk/confluent/arm-confluent/tsconfig.json b/sdk/confluent/arm-confluent/tsconfig.json index dabc91bb234f..b35d05ad6e9d 100644 --- a/sdk/confluent/arm-confluent/tsconfig.json +++ b/sdk/confluent/arm-confluent/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-confluent": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ - "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "src/**/*.ts", + "test/**/*.ts" ], "exclude": [ "node_modules"