diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 5dd9e21f2f51..858384c0063d 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -15641,10 +15641,11 @@ packages: dev: false file:projects/arm-iotoperations.tgz: - resolution: {integrity: sha512-cSjFFCKmI/3TAVPk7BHWbSTCBg6JOVJ3jvJURbPxmeiIaab+SIvBHRH2d5N/sT1ktQirW+wr1aF410IqvfDEKw==, tarball: file:projects/arm-iotoperations.tgz} + resolution: {integrity: sha512-dRoCq/z9ERDMiuF/CFDyt2o0V4odSPEKkmbUZwporNfL6Pjy+3xk7mwDGmWbJnLDGWOt1l+7b0nGuYkzFn1ERA==, tarball: file:projects/arm-iotoperations.tgz} name: '@rush-temp/arm-iotoperations' version: 0.0.0 dependencies: + '@microsoft/api-extractor': 7.48.0(@types/node@18.19.67) '@types/node': 18.19.67 '@vitest/browser': 2.1.8(@types/node@18.19.67)(playwright@1.49.0)(typescript@5.6.3)(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) diff --git a/sdk/iotoperations/arm-iotoperations/CHANGELOG.md b/sdk/iotoperations/arm-iotoperations/CHANGELOG.md index dadd02f8d59d..639604710494 100644 --- a/sdk/iotoperations/arm-iotoperations/CHANGELOG.md +++ b/sdk/iotoperations/arm-iotoperations/CHANGELOG.md @@ -1,17 +1,7 @@ # Release History - -## 1.0.0-beta.2 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - -## 1.0.0-beta.1 (2024-10-23) + +## 1.0.0 (2024-12-11) ### Features Added -Initial release of the Azure IotOperations package +The package of @azure/arm-iotoperations is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/js/mgmt/quickstart). diff --git a/sdk/iotoperations/arm-iotoperations/README.md b/sdk/iotoperations/arm-iotoperations/README.md index f6f7d2d2bbde..11e1f568455f 100644 --- a/sdk/iotoperations/arm-iotoperations/README.md +++ b/sdk/iotoperations/arm-iotoperations/README.md @@ -4,8 +4,11 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f Microsoft.IoTOperations Resource Provider management API. -[Package (NPM)](https://www.npmjs.com/package/@azure/arm-iotoperations) | -[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-iotoperations?view=azure-node-preview) | +Key links: + +- [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/iotoperations/arm-iotoperations) +- [Package (NPM)](https://www.npmjs.com/package/@azure/arm-iotoperations) +- [API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-iotoperations?view=azure-node-preview) ## Getting started @@ -42,7 +45,6 @@ npm install @azure/identity ``` You will also need to **register a new AAD application and grant access to Azure IoTOperations** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions). -Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`. For more information about how to create an Azure AD Application check out [this guide](https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal). diff --git a/sdk/iotoperations/arm-iotoperations/assets.json b/sdk/iotoperations/arm-iotoperations/assets.json deleted file mode 100644 index 349320db627a..000000000000 --- a/sdk/iotoperations/arm-iotoperations/assets.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "AssetsRepo": "Azure/azure-sdk-assets", - "AssetsRepoPrefixPath": "js", - "TagPrefix": "js/iotoperations/arm-iotoperations", - "Tag": "js/iotoperations/arm-iotoperations_f94fba0d51" -} diff --git a/sdk/iotoperations/arm-iotoperations/eslint.config.mjs b/sdk/iotoperations/arm-iotoperations/eslint.config.mjs index a9fcfbef11ff..113bdc3eaf5f 100644 --- a/sdk/iotoperations/arm-iotoperations/eslint.config.mjs +++ b/sdk/iotoperations/arm-iotoperations/eslint.config.mjs @@ -1,6 +1,7 @@ import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; -export default azsdkEslint.config([ +export default [ + ...azsdkEslint.configs.recommended, { rules: { "@azure/azure-sdk/ts-modules-only-named": "warn", @@ -10,7 +11,7 @@ export default azsdkEslint.config([ "@azure/azure-sdk/ts-package-json-module": "off", "@azure/azure-sdk/ts-package-json-files-required": "off", "@azure/azure-sdk/ts-package-json-main-is-cjs": "off", - "tsdoc/syntax": "warn", - }, - }, -]); + "tsdoc/syntax": "warn" + } + } +]; diff --git a/sdk/iotoperations/arm-iotoperations/package.json b/sdk/iotoperations/arm-iotoperations/package.json index 857793303ee4..7deef43f0c07 100644 --- a/sdk/iotoperations/arm-iotoperations/package.json +++ b/sdk/iotoperations/arm-iotoperations/package.json @@ -1,6 +1,6 @@ { "name": "@azure/arm-iotoperations", - "version": "1.0.0-beta.2", + "version": "1.0.0", "description": "A generated SDK for IoTOperationsClient.", "engines": { "node": ">=18.0.0" @@ -46,6 +46,7 @@ "bugs": { "url": "https://github.com/Azure/azure-sdk-for-js/issues" }, + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/iotoperations/arm-iotoperations/README.md", "prettier": "@azure/eslint-plugin-azure-sdk/prettier.json", "//metadata": { "constantPaths": [ @@ -67,6 +68,7 @@ }, "devDependencies": { "dotenv": "^16.0.0", + "@microsoft/api-extractor": "^7.40.3", "@types/node": "^18.0.0", "eslint": "^9.9.0", "typescript": "~5.6.2", @@ -84,33 +86,26 @@ "clean": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", "extract-api": "dev-tool run vendored rimraf review && dev-tool run vendored mkdirp ./review && dev-tool run extract-api", "pack": "npm pack 2>&1", - "lint": "echo skipped", - "lint:fix": "echo skipped", + "lint": "eslint package.json api-extractor.json src test", + "lint:fix": "eslint package.json api-extractor.json src test --fix --fix-type [problem,suggestion]", "unit-test": "npm run unit-test:node && npm run unit-test:browser", "unit-test:browser": "npm run build:test && dev-tool run test:vitest --browser", "unit-test:node": "dev-tool run test:vitest", "integration-test": "npm run integration-test:node && npm run integration-test:browser", "integration-test:browser": "echo skipped", "integration-test:node": "echo skipped", - "build:samples": "dev-tool run typecheck --paths samples-dev/*.ts && dev-tool samples publish -f", - "check-format": "dev-tool run vendored prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" \"samples-dev/*.ts\"", - "execute:samples": "dev-tool samples run samples-dev", - "format": "dev-tool run vendored prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" \"samples-dev/*.ts\"", + "build:samples": "echo skipped", + "check-format": "dev-tool run vendored prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" ", + "execute:samples": "echo skipped", + "format": "dev-tool run vendored prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" ", "generate:client": "echo skipped", "test:browser": "npm run clean && npm run build:test && npm run unit-test:browser && npm run integration-test:browser", "minify": "dev-tool run vendored uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", "build:test": "npm run clean && dev-tool run build-package && dev-tool run build-test", "build": "npm run clean && dev-tool run build-package && dev-tool run vendored mkdirp ./review && dev-tool run extract-api", "test:node": "npm run clean && dev-tool run build-package && npm run unit-test:node && npm run integration-test:node", - "test": "npm run clean && dev-tool run build-package && npm run unit-test:node && dev-tool run bundle && npm run unit-test:browser && npm run integration-test" - }, - "//sampleConfiguration": { - "productName": "@azure/arm-iotoperations", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-iotoperations?view=azure-node-preview" + "test": "npm run clean && dev-tool run build-package && npm run unit-test:node && dev-tool run bundle && npm run unit-test:browser && npm run integration-test", + "update-snippets": "echo skipped" }, "exports": { "./package.json": "./package.json", diff --git a/sdk/iotoperations/arm-iotoperations/review/arm-iotoperations-models.api.md b/sdk/iotoperations/arm-iotoperations/review/arm-iotoperations-models.api.md index 774ed9d000a3..c1270b98a564 100644 --- a/sdk/iotoperations/arm-iotoperations/review/arm-iotoperations-models.api.md +++ b/sdk/iotoperations/arm-iotoperations/review/arm-iotoperations-models.api.md @@ -4,9 +4,6 @@ ```ts -// @public -export type AccessTokenMethod = string; - // @public export type ActionType = string; @@ -17,9 +14,6 @@ export interface AdvancedSettings { internalCerts?: CertManagerCertOptions; } -// @public -export type AnonymousMethod = string; - // @public export interface AuthorizationConfig { cache?: OperationalMode; @@ -222,7 +216,7 @@ export type CloudEventAttributeType = string; export type CreatedByType = string; // @public -export type DataExplorerAuthMethod = ManagedIdentityMethod; +export type DataExplorerAuthMethod = string; // @public export interface DataflowBuiltInTransformationDataset { @@ -491,7 +485,7 @@ export interface DataflowSourceOperationSettings { } // @public -export type DataLakeStorageAuthMethod = ManagedIdentityMethod | AccessTokenMethod; +export type DataLakeStorageAuthMethod = string; // @public export interface DiagnosticsLogs { @@ -508,6 +502,26 @@ export interface DiskBackedMessageBuffer { // @public export type EndpointType = string; +// @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 ExtendedLocation { name: string; @@ -518,7 +532,7 @@ export interface ExtendedLocation { export type ExtendedLocationType = string; // @public -export type FabricOneLakeAuthMethod = ManagedIdentityMethod; +export type FabricOneLakeAuthMethod = string; // @public export type FilterType = string; @@ -556,23 +570,13 @@ export interface InstanceResource extends TrackedResource { } // @public -export type KafkaAuthMethod = ManagedIdentityMethod | SaslMethod | X509CertificateMethod | AnonymousMethod; - -// @public -export enum KnownAccessTokenMethod { - AccessToken = "AccessToken" -} +export type KafkaAuthMethod = string; // @public export enum KnownActionType { Internal = "Internal" } -// @public -export enum KnownAnonymousMethod { - Anonymous = "Anonymous" -} - // @public export enum KnownBrokerAuthenticationMethod { Custom = "Custom", @@ -621,6 +625,12 @@ export enum KnownCreatedByType { User = "User" } +// @public +export enum KnownDataExplorerAuthMethod { + SystemAssignedManagedIdentity = "SystemAssignedManagedIdentity", + UserAssignedManagedIdentity = "UserAssignedManagedIdentity" +} + // @public export enum KnownDataflowEndpointAuthenticationSaslType { Plain = "Plain", @@ -666,6 +676,13 @@ export enum KnownDataflowMappingType { Rename = "Rename" } +// @public +export enum KnownDataLakeStorageAuthMethod { + AccessToken = "AccessToken", + SystemAssignedManagedIdentity = "SystemAssignedManagedIdentity", + UserAssignedManagedIdentity = "UserAssignedManagedIdentity" +} + // @public export enum KnownEndpointType { DataExplorer = "DataExplorer", @@ -681,25 +698,43 @@ export enum KnownExtendedLocationType { CustomLocation = "CustomLocation" } +// @public +export enum KnownFabricOneLakeAuthMethod { + SystemAssignedManagedIdentity = "SystemAssignedManagedIdentity", + UserAssignedManagedIdentity = "UserAssignedManagedIdentity" +} + // @public export enum KnownFilterType { Filter = "Filter" } // @public -export enum KnownManagedIdentityMethod { +export enum KnownKafkaAuthMethod { + Anonymous = "Anonymous", + Sasl = "Sasl", SystemAssignedManagedIdentity = "SystemAssignedManagedIdentity", - UserAssignedManagedIdentity = "UserAssignedManagedIdentity" + UserAssignedManagedIdentity = "UserAssignedManagedIdentity", + X509Certificate = "X509Certificate" } // @public export enum KnownManagedServiceIdentityType { + "SystemAssigned,UserAssigned" = "SystemAssigned,UserAssigned", None = "None", SystemAssigned = "SystemAssigned", - SystemAssignedUserAssigned = "SystemAssigned,UserAssigned", UserAssigned = "UserAssigned" } +// @public +export enum KnownMqttAuthMethod { + Anonymous = "Anonymous", + ServiceAccountToken = "ServiceAccountToken", + SystemAssignedManagedIdentity = "SystemAssignedManagedIdentity", + UserAssignedManagedIdentity = "UserAssignedManagedIdentity", + X509Certificate = "X509Certificate" +} + // @public export enum KnownMqttRetainType { Keep = "Keep", @@ -729,9 +764,9 @@ export enum KnownOperatorValues { // @public export enum KnownOrigin { - System = "system", - User = "user", - UserSystem = "user,system" + "user,system" = "user,system", + system = "system", + user = "user" } // @public @@ -762,16 +797,6 @@ export enum KnownProvisioningState { Updating = "Updating" } -// @public -export enum KnownSaslMethod { - Sasl = "Sasl" -} - -// @public -export enum KnownServiceAccountTokenMethod { - ServiceAccountToken = "ServiceAccountToken" -} - // @public export enum KnownServiceType { ClusterIp = "ClusterIp", @@ -818,8 +843,8 @@ export enum KnownTransformationSerializationFormat { } // @public -export enum KnownX509CertificateMethod { - X509Certificate = "X509Certificate" +export enum KnownVersions { + "2024-11-01" = "2024-11-01" } // @public @@ -847,9 +872,6 @@ export interface LocalKubernetesReference { name: string; } -// @public -export type ManagedIdentityMethod = string; - // @public export interface ManagedServiceIdentity { readonly principalId?: string; @@ -867,7 +889,7 @@ export interface Metrics { } // @public -export type MqttAuthMethod = ManagedIdentityMethod | ServiceAccountTokenMethod | X509CertificateMethod | AnonymousMethod; +export type MqttAuthMethod = string; // @public export type MqttRetainType = string; @@ -941,9 +963,6 @@ export interface SanForCert { ip: string[]; } -// @public -export type SaslMethod = string; - // @public export interface SchemaRegistryRef { resourceId: string; @@ -962,9 +981,6 @@ export interface SelfTracing { mode?: OperationalMode; } -// @public -export type ServiceAccountTokenMethod = string; - // @public export type ServiceType = string; @@ -1073,9 +1089,6 @@ export interface VolumeClaimSpecSelectorMatchExpressions { values?: string[]; } -// @public -export type X509CertificateMethod = string; - // @public export interface X509ManualCertificate { secretRef: string; diff --git a/sdk/iotoperations/arm-iotoperations/review/arm-iotoperations.api.md b/sdk/iotoperations/arm-iotoperations/review/arm-iotoperations.api.md index 13123ea6579d..269b9c2a2b26 100644 --- a/sdk/iotoperations/arm-iotoperations/review/arm-iotoperations.api.md +++ b/sdk/iotoperations/arm-iotoperations/review/arm-iotoperations.api.md @@ -13,9 +13,6 @@ import { Pipeline } from '@azure/core-rest-pipeline'; import { PollerLike } from '@azure/core-lro'; import { TokenCredential } from '@azure/core-auth'; -// @public -export type AccessTokenMethod = string; - // @public export type ActionType = string; @@ -26,9 +23,6 @@ export interface AdvancedSettings { internalCerts?: CertManagerCertOptions; } -// @public -export type AnonymousMethod = string; - // @public export interface AuthorizationConfig { cache?: OperationalMode; @@ -340,7 +334,7 @@ export type ContinuablePage = TPage & { export type CreatedByType = string; // @public -export type DataExplorerAuthMethod = ManagedIdentityMethod; +export type DataExplorerAuthMethod = string; // @public export interface DataflowBuiltInTransformationDataset { @@ -687,7 +681,7 @@ export interface DataflowSourceOperationSettings { } // @public -export type DataLakeStorageAuthMethod = ManagedIdentityMethod | AccessTokenMethod; +export type DataLakeStorageAuthMethod = string; // @public export interface DiagnosticsLogs { @@ -704,6 +698,26 @@ export interface DiskBackedMessageBuffer { // @public export type EndpointType = string; +// @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 ExtendedLocation { name: string; @@ -714,7 +728,7 @@ export interface ExtendedLocation { export type ExtendedLocationType = string; // @public -export type FabricOneLakeAuthMethod = ManagedIdentityMethod; +export type FabricOneLakeAuthMethod = string; // @public export type FilterType = string; @@ -808,23 +822,13 @@ export interface IoTOperationsClientOptionalParams extends ClientOptions { } // @public -export type KafkaAuthMethod = ManagedIdentityMethod | SaslMethod | X509CertificateMethod | AnonymousMethod; - -// @public -export enum KnownAccessTokenMethod { - AccessToken = "AccessToken" -} +export type KafkaAuthMethod = string; // @public export enum KnownActionType { Internal = "Internal" } -// @public -export enum KnownAnonymousMethod { - Anonymous = "Anonymous" -} - // @public export enum KnownBrokerAuthenticationMethod { Custom = "Custom", @@ -873,6 +877,12 @@ export enum KnownCreatedByType { User = "User" } +// @public +export enum KnownDataExplorerAuthMethod { + SystemAssignedManagedIdentity = "SystemAssignedManagedIdentity", + UserAssignedManagedIdentity = "UserAssignedManagedIdentity" +} + // @public export enum KnownDataflowEndpointAuthenticationSaslType { Plain = "Plain", @@ -918,6 +928,13 @@ export enum KnownDataflowMappingType { Rename = "Rename" } +// @public +export enum KnownDataLakeStorageAuthMethod { + AccessToken = "AccessToken", + SystemAssignedManagedIdentity = "SystemAssignedManagedIdentity", + UserAssignedManagedIdentity = "UserAssignedManagedIdentity" +} + // @public export enum KnownEndpointType { DataExplorer = "DataExplorer", @@ -933,25 +950,43 @@ export enum KnownExtendedLocationType { CustomLocation = "CustomLocation" } +// @public +export enum KnownFabricOneLakeAuthMethod { + SystemAssignedManagedIdentity = "SystemAssignedManagedIdentity", + UserAssignedManagedIdentity = "UserAssignedManagedIdentity" +} + // @public export enum KnownFilterType { Filter = "Filter" } // @public -export enum KnownManagedIdentityMethod { +export enum KnownKafkaAuthMethod { + Anonymous = "Anonymous", + Sasl = "Sasl", SystemAssignedManagedIdentity = "SystemAssignedManagedIdentity", - UserAssignedManagedIdentity = "UserAssignedManagedIdentity" + UserAssignedManagedIdentity = "UserAssignedManagedIdentity", + X509Certificate = "X509Certificate" } // @public export enum KnownManagedServiceIdentityType { + "SystemAssigned,UserAssigned" = "SystemAssigned,UserAssigned", None = "None", SystemAssigned = "SystemAssigned", - SystemAssignedUserAssigned = "SystemAssigned,UserAssigned", UserAssigned = "UserAssigned" } +// @public +export enum KnownMqttAuthMethod { + Anonymous = "Anonymous", + ServiceAccountToken = "ServiceAccountToken", + SystemAssignedManagedIdentity = "SystemAssignedManagedIdentity", + UserAssignedManagedIdentity = "UserAssignedManagedIdentity", + X509Certificate = "X509Certificate" +} + // @public export enum KnownMqttRetainType { Keep = "Keep", @@ -981,9 +1016,9 @@ export enum KnownOperatorValues { // @public export enum KnownOrigin { - System = "system", - User = "user", - UserSystem = "user,system" + "user,system" = "user,system", + system = "system", + user = "user" } // @public @@ -1014,16 +1049,6 @@ export enum KnownProvisioningState { Updating = "Updating" } -// @public -export enum KnownSaslMethod { - Sasl = "Sasl" -} - -// @public -export enum KnownServiceAccountTokenMethod { - ServiceAccountToken = "ServiceAccountToken" -} - // @public export enum KnownServiceType { ClusterIp = "ClusterIp", @@ -1070,8 +1095,8 @@ export enum KnownTransformationSerializationFormat { } // @public -export enum KnownX509CertificateMethod { - X509Certificate = "X509Certificate" +export enum KnownVersions { + "2024-11-01" = "2024-11-01" } // @public @@ -1099,9 +1124,6 @@ export interface LocalKubernetesReference { name: string; } -// @public -export type ManagedIdentityMethod = string; - // @public export interface ManagedServiceIdentity { readonly principalId?: string; @@ -1119,7 +1141,7 @@ export interface Metrics { } // @public -export type MqttAuthMethod = ManagedIdentityMethod | ServiceAccountTokenMethod | X509CertificateMethod | AnonymousMethod; +export type MqttAuthMethod = string; // @public export type MqttRetainType = string; @@ -1224,9 +1246,6 @@ export interface SanForCert { ip: string[]; } -// @public -export type SaslMethod = string; - // @public export interface SchemaRegistryRef { resourceId: string; @@ -1245,9 +1264,6 @@ export interface SelfTracing { mode?: OperationalMode; } -// @public -export type ServiceAccountTokenMethod = string; - // @public export type ServiceType = string; @@ -1356,9 +1372,6 @@ export interface VolumeClaimSpecSelectorMatchExpressions { values?: string[]; } -// @public -export type X509CertificateMethod = string; - // @public export interface X509ManualCertificate { secretRef: string; diff --git a/sdk/iotoperations/arm-iotoperations/samples-dev/brokerAuthenticationCreateOrUpdateSample.ts b/sdk/iotoperations/arm-iotoperations/samples-dev/brokerAuthenticationCreateOrUpdateSample.ts deleted file mode 100644 index 50b1ca0d1457..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples-dev/brokerAuthenticationCreateOrUpdateSample.ts +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsClient } from "@azure/arm-iotoperations"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to create a BrokerAuthenticationResource - * - * @summary create a BrokerAuthenticationResource - * x-ms-original-file: 2024-09-15-preview/BrokerAuthentication_CreateOrUpdate_Complex.json - */ -async function brokerAuthenticationCreateOrUpdateComplex() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.brokerAuthentication.createOrUpdate( - "rgiotoperations", - "resource-name123", - "resource-name123", - "resource-name123", - { - properties: { - authenticationMethods: [ - { - method: "ServiceAccountToken", - serviceAccountTokenSettings: { audiences: ["aio-internal"] }, - }, - { - method: "X509", - x509Settings: { - trustedClientCaCert: "my-ca", - authorizationAttributes: { - root: { - subject: "CN = Contoso Root CA Cert, OU = Engineering, C = US", - attributes: { organization: "contoso" }, - }, - intermediate: { - subject: "CN = Contoso Intermediate CA", - attributes: { city: "seattle", foo: "bar" }, - }, - "smart-fan": { - subject: "CN = smart-fan", - attributes: { building: "17" }, - }, - }, - }, - }, - ], - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to create a BrokerAuthenticationResource - * - * @summary create a BrokerAuthenticationResource - * x-ms-original-file: 2024-09-15-preview/BrokerAuthentication_CreateOrUpdate_MaximumSet_Gen.json - */ -async function brokerAuthenticationCreateOrUpdate() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.brokerAuthentication.createOrUpdate( - "rgiotoperations", - "resource-name123", - "resource-name123", - "resource-name123", - { - properties: { - authenticationMethods: [ - { - method: "Custom", - customSettings: { - auth: { x509: { secretRef: "secret-name" } }, - caCertConfigMap: "pdecudefqyolvncbus", - endpoint: "https://www.example.com", - headers: { key8518: "bwityjy" }, - }, - serviceAccountTokenSettings: { audiences: ["jqyhyqatuydg"] }, - x509Settings: { - authorizationAttributes: { - key3384: { - attributes: { key186: "ucpajramsz" }, - subject: "jpgwctfeixitptfgfnqhua", - }, - }, - trustedClientCaCert: "vlctsqddl", - }, - }, - ], - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -async function main() { - brokerAuthenticationCreateOrUpdateComplex(); - brokerAuthenticationCreateOrUpdate(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples-dev/brokerAuthenticationDeleteSample.ts b/sdk/iotoperations/arm-iotoperations/samples-dev/brokerAuthenticationDeleteSample.ts deleted file mode 100644 index 117723b9e865..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples-dev/brokerAuthenticationDeleteSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsClient } from "@azure/arm-iotoperations"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to delete a BrokerAuthenticationResource - * - * @summary delete a BrokerAuthenticationResource - * x-ms-original-file: 2024-09-15-preview/BrokerAuthentication_Delete_MaximumSet_Gen.json - */ -async function brokerAuthenticationDelete() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - await client.brokerAuthentication.delete( - "rgiotoperations", - "resource-name123", - "resource-name123", - "resource-name123", - ); -} - -async function main() { - brokerAuthenticationDelete(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples-dev/brokerAuthenticationGetSample.ts b/sdk/iotoperations/arm-iotoperations/samples-dev/brokerAuthenticationGetSample.ts deleted file mode 100644 index 975a99cd11bc..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples-dev/brokerAuthenticationGetSample.ts +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsClient } from "@azure/arm-iotoperations"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to get a BrokerAuthenticationResource - * - * @summary get a BrokerAuthenticationResource - * x-ms-original-file: 2024-09-15-preview/BrokerAuthentication_Get_MaximumSet_Gen.json - */ -async function brokerAuthenticationGet() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.brokerAuthentication.get( - "rgiotoperations", - "resource-name123", - "resource-name123", - "resource-name123", - ); - console.log(result); -} - -async function main() { - brokerAuthenticationGet(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples-dev/brokerAuthenticationListByResourceGroupSample.ts b/sdk/iotoperations/arm-iotoperations/samples-dev/brokerAuthenticationListByResourceGroupSample.ts deleted file mode 100644 index 2776b2a9c5b0..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples-dev/brokerAuthenticationListByResourceGroupSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsClient } from "@azure/arm-iotoperations"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to list BrokerAuthenticationResource resources by BrokerResource - * - * @summary list BrokerAuthenticationResource resources by BrokerResource - * x-ms-original-file: 2024-09-15-preview/BrokerAuthentication_ListByResourceGroup_MaximumSet_Gen.json - */ -async function brokerAuthenticationListByResourceGroup() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.brokerAuthentication.listByResourceGroup( - "rgiotoperations", - "resource-name123", - "resource-name123", - )) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main() { - brokerAuthenticationListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples-dev/brokerAuthorizationCreateOrUpdateSample.ts b/sdk/iotoperations/arm-iotoperations/samples-dev/brokerAuthorizationCreateOrUpdateSample.ts deleted file mode 100644 index c3f606c80a57..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples-dev/brokerAuthorizationCreateOrUpdateSample.ts +++ /dev/null @@ -1,177 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsClient } from "@azure/arm-iotoperations"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to create a BrokerAuthorizationResource - * - * @summary create a BrokerAuthorizationResource - * x-ms-original-file: 2024-09-15-preview/BrokerAuthorization_CreateOrUpdate_Complex.json - */ -async function brokerAuthorizationCreateOrUpdateComplex() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.brokerAuthorization.createOrUpdate( - "rgiotoperations", - "resource-name123", - "resource-name123", - "resource-name123", - { - properties: { - authorizationPolicies: { - cache: "Enabled", - rules: [ - { - principals: { - usernames: ["temperature-sensor", "humidity-sensor"], - attributes: [{ building: "17", organization: "contoso" }], - }, - brokerResources: [ - { - method: "Connect", - clientIds: ["{principal.attributes.building}*"], - }, - { - method: "Publish", - topics: [ - "sensors/{principal.attributes.building}/{principal.clientId}/telemetry/*", - ], - }, - { - method: "Subscribe", - topics: ["commands/{principal.attributes.organization}"], - }, - ], - stateStoreResources: [ - { - method: "Read", - keyType: "Pattern", - keys: [ - "myreadkey", - "myotherkey?", - "mynumerickeysuffix[0-9]", - "clients:{principal.clientId}:*", - ], - }, - { - method: "ReadWrite", - keyType: "Binary", - keys: ["MTE2IDEwMSAxMTUgMTE2"], - }, - ], - }, - ], - }, - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to create a BrokerAuthorizationResource - * - * @summary create a BrokerAuthorizationResource - * x-ms-original-file: 2024-09-15-preview/BrokerAuthorization_CreateOrUpdate_MaximumSet_Gen.json - */ -async function brokerAuthorizationCreateOrUpdate() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.brokerAuthorization.createOrUpdate( - "rgiotoperations", - "resource-name123", - "resource-name123", - "resource-name123", - { - properties: { - authorizationPolicies: { - cache: "Enabled", - rules: [ - { - brokerResources: [{ method: "Connect", clientIds: ["nlc"], topics: ["wvuca"] }], - principals: { - attributes: [{ key5526: "nydhzdhbldygqcn" }], - clientIds: ["smopeaeddsygz"], - usernames: ["iozngyqndrteikszkbasinzdjtm"], - }, - stateStoreResources: [ - { - keyType: "Pattern", - keys: ["tkounsqtwvzyaklxjqoerpu"], - method: "Read", - }, - ], - }, - ], - }, - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to create a BrokerAuthorizationResource - * - * @summary create a BrokerAuthorizationResource - * x-ms-original-file: 2024-09-15-preview/BrokerAuthorization_CreateOrUpdate_Simple.json - */ -async function brokerAuthorizationCreateOrUpdateSimple() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.brokerAuthorization.createOrUpdate( - "rgiotoperations", - "resource-name123", - "resource-name123", - "resource-name123", - { - properties: { - authorizationPolicies: { - cache: "Enabled", - rules: [ - { - principals: { - clientIds: ["my-client-id"], - attributes: [{ floor: "floor1", site: "site1" }], - }, - brokerResources: [ - { method: "Connect" }, - { - method: "Subscribe", - topics: ["topic", "topic/with/wildcard/#"], - }, - ], - stateStoreResources: [{ method: "ReadWrite", keyType: "Pattern", keys: ["*"] }], - }, - ], - }, - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -async function main() { - brokerAuthorizationCreateOrUpdateComplex(); - brokerAuthorizationCreateOrUpdate(); - brokerAuthorizationCreateOrUpdateSimple(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples-dev/brokerAuthorizationDeleteSample.ts b/sdk/iotoperations/arm-iotoperations/samples-dev/brokerAuthorizationDeleteSample.ts deleted file mode 100644 index 4310d24ba61d..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples-dev/brokerAuthorizationDeleteSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsClient } from "@azure/arm-iotoperations"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to delete a BrokerAuthorizationResource - * - * @summary delete a BrokerAuthorizationResource - * x-ms-original-file: 2024-09-15-preview/BrokerAuthorization_Delete_MaximumSet_Gen.json - */ -async function brokerAuthorizationDelete() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - await client.brokerAuthorization.delete( - "rgiotoperations", - "resource-name123", - "resource-name123", - "resource-name123", - ); -} - -async function main() { - brokerAuthorizationDelete(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples-dev/brokerAuthorizationGetSample.ts b/sdk/iotoperations/arm-iotoperations/samples-dev/brokerAuthorizationGetSample.ts deleted file mode 100644 index 20773696e6e4..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples-dev/brokerAuthorizationGetSample.ts +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsClient } from "@azure/arm-iotoperations"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to get a BrokerAuthorizationResource - * - * @summary get a BrokerAuthorizationResource - * x-ms-original-file: 2024-09-15-preview/BrokerAuthorization_Get_MaximumSet_Gen.json - */ -async function brokerAuthorizationGet() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.brokerAuthorization.get( - "rgiotoperations", - "resource-name123", - "resource-name123", - "resource-name123", - ); - console.log(result); -} - -async function main() { - brokerAuthorizationGet(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples-dev/brokerAuthorizationListByResourceGroupSample.ts b/sdk/iotoperations/arm-iotoperations/samples-dev/brokerAuthorizationListByResourceGroupSample.ts deleted file mode 100644 index f698bfef8c61..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples-dev/brokerAuthorizationListByResourceGroupSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsClient } from "@azure/arm-iotoperations"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to list BrokerAuthorizationResource resources by BrokerResource - * - * @summary list BrokerAuthorizationResource resources by BrokerResource - * x-ms-original-file: 2024-09-15-preview/BrokerAuthorization_ListByResourceGroup_MaximumSet_Gen.json - */ -async function brokerAuthorizationListByResourceGroup() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.brokerAuthorization.listByResourceGroup( - "rgiotoperations", - "resource-name123", - "resource-name123", - )) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main() { - brokerAuthorizationListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples-dev/brokerCreateOrUpdateSample.ts b/sdk/iotoperations/arm-iotoperations/samples-dev/brokerCreateOrUpdateSample.ts deleted file mode 100644 index 435779553db8..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples-dev/brokerCreateOrUpdateSample.ts +++ /dev/null @@ -1,232 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsClient } from "@azure/arm-iotoperations"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to create a BrokerResource - * - * @summary create a BrokerResource - * x-ms-original-file: 2024-09-15-preview/Broker_CreateOrUpdate_Complex.json - */ -async function brokerCreateOrUpdateComplex() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.broker.createOrUpdate( - "rgiotoperations", - "resource-name123", - "resource-name123", - { - properties: { - cardinality: { - backendChain: { partitions: 2, redundancyFactor: 2, workers: 2 }, - frontend: { replicas: 2, workers: 2 }, - }, - diskBackedMessageBuffer: { maxSize: "50M" }, - generateResourceLimits: { cpu: "Enabled" }, - memoryProfile: "Medium", - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to create a BrokerResource - * - * @summary create a BrokerResource - * x-ms-original-file: 2024-09-15-preview/Broker_CreateOrUpdate_MaximumSet_Gen.json - */ -async function brokerCreateOrUpdate() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.broker.createOrUpdate( - "rgiotoperations", - "resource-name123", - "resource-name123", - { - properties: { - advanced: { - clients: { - maxSessionExpirySeconds: 3859, - maxMessageExpirySeconds: 3263, - maxPacketSizeBytes: 3029, - subscriberQueueLimit: { length: 6, strategy: "None" }, - maxReceiveMaximum: 2365, - maxKeepAliveSeconds: 3744, - }, - encryptInternalTraffic: "Enabled", - internalCerts: { - duration: "bchrc", - renewBefore: "xkafmpgjfifkwwrhkswtopdnne", - privateKey: { algorithm: "Ec256", rotationPolicy: "Always" }, - }, - }, - cardinality: { - backendChain: { partitions: 11, redundancyFactor: 5, workers: 15 }, - frontend: { replicas: 2, workers: 6 }, - }, - diagnostics: { - logs: { level: "rnmwokumdmebpmfxxxzvvjfdywotav" }, - metrics: { prometheusPort: 7581 }, - selfCheck: { - mode: "Enabled", - intervalSeconds: 158, - timeoutSeconds: 14, - }, - traces: { - mode: "Enabled", - cacheSizeMegabytes: 28, - selfTracing: { mode: "Enabled", intervalSeconds: 22 }, - spanChannelCapacity: 1000, - }, - }, - diskBackedMessageBuffer: { - maxSize: "500M", - ephemeralVolumeClaimSpec: { - volumeName: "c", - volumeMode: "rxvpksjuuugqnqzeiprocknbn", - storageClassName: "sseyhrjptkhrqvpdpjmornkqvon", - accessModes: ["nuluhigrbb"], - dataSource: { - apiGroup: "npqapyksvvpkohujx", - kind: "wazgyb", - name: "cwhsgxxcxsyppoefm", - }, - dataSourceRef: { - apiGroup: "mnfnykznjjsoqpfsgdqioupt", - kind: "odynqzekfzsnawrctaxg", - name: "envszivbbmixbyddzg", - namespace: "etcfzvxqd", - }, - resources: { - limits: { key2719: "hmphcrgctu" }, - requests: { key2909: "txocprnyrsgvhfrg" }, - }, - selector: { - matchExpressions: [ - { - key: "e", - operator: "In", - values: ["slmpajlywqvuyknipgztsonqyybt"], - }, - ], - matchLabels: { key6673: "wlngfalznwxnurzpgxomcxhbqefpr" }, - }, - }, - persistentVolumeClaimSpec: { - volumeName: "c", - volumeMode: "rxvpksjuuugqnqzeiprocknbn", - storageClassName: "sseyhrjptkhrqvpdpjmornkqvon", - accessModes: ["nuluhigrbb"], - dataSource: { - apiGroup: "npqapyksvvpkohujx", - kind: "wazgyb", - name: "cwhsgxxcxsyppoefm", - }, - dataSourceRef: { - apiGroup: "mnfnykznjjsoqpfsgdqioupt", - kind: "odynqzekfzsnawrctaxg", - name: "envszivbbmixbyddzg", - namespace: "etcfzvxqd", - }, - resources: { - limits: { key2719: "hmphcrgctu" }, - requests: { key2909: "txocprnyrsgvhfrg" }, - }, - selector: { - matchExpressions: [ - { - key: "e", - operator: "In", - values: ["slmpajlywqvuyknipgztsonqyybt"], - }, - ], - matchLabels: { key6673: "wlngfalznwxnurzpgxomcxhbqefpr" }, - }, - }, - }, - generateResourceLimits: { cpu: "Enabled" }, - memoryProfile: "Tiny", - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to create a BrokerResource - * - * @summary create a BrokerResource - * x-ms-original-file: 2024-09-15-preview/Broker_CreateOrUpdate_Minimal.json - */ -async function brokerCreateOrUpdateMinimal() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.broker.createOrUpdate( - "rgiotoperations", - "resource-name123", - "resource-name123", - { - properties: { memoryProfile: "Tiny" }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to create a BrokerResource - * - * @summary create a BrokerResource - * x-ms-original-file: 2024-09-15-preview/Broker_CreateOrUpdate_Simple.json - */ -async function brokerCreateOrUpdateSimple() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.broker.createOrUpdate( - "rgiotoperations", - "resource-name123", - "resource-name123", - { - properties: { - cardinality: { - backendChain: { partitions: 2, redundancyFactor: 2, workers: 2 }, - frontend: { replicas: 2, workers: 2 }, - }, - generateResourceLimits: { cpu: "Enabled" }, - memoryProfile: "Low", - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -async function main() { - brokerCreateOrUpdateComplex(); - brokerCreateOrUpdate(); - brokerCreateOrUpdateMinimal(); - brokerCreateOrUpdateSimple(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples-dev/brokerDeleteSample.ts b/sdk/iotoperations/arm-iotoperations/samples-dev/brokerDeleteSample.ts deleted file mode 100644 index 576bbc65212b..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples-dev/brokerDeleteSample.ts +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsClient } from "@azure/arm-iotoperations"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to delete a BrokerResource - * - * @summary delete a BrokerResource - * x-ms-original-file: 2024-09-15-preview/Broker_Delete_MaximumSet_Gen.json - */ -async function brokerDelete() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - await client.broker.delete("rgiotoperations", "resource-name123", "resource-name123"); -} - -async function main() { - brokerDelete(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples-dev/brokerGetSample.ts b/sdk/iotoperations/arm-iotoperations/samples-dev/brokerGetSample.ts deleted file mode 100644 index a3682ef5b0f6..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples-dev/brokerGetSample.ts +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsClient } from "@azure/arm-iotoperations"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to get a BrokerResource - * - * @summary get a BrokerResource - * x-ms-original-file: 2024-09-15-preview/Broker_Get_MaximumSet_Gen.json - */ -async function brokerGet() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.broker.get("rgiotoperations", "resource-name123", "resource-name123"); - console.log(result); -} - -async function main() { - brokerGet(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples-dev/brokerListByResourceGroupSample.ts b/sdk/iotoperations/arm-iotoperations/samples-dev/brokerListByResourceGroupSample.ts deleted file mode 100644 index 76016e3abf23..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples-dev/brokerListByResourceGroupSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsClient } from "@azure/arm-iotoperations"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to list BrokerResource resources by InstanceResource - * - * @summary list BrokerResource resources by InstanceResource - * x-ms-original-file: 2024-09-15-preview/Broker_ListByResourceGroup_MaximumSet_Gen.json - */ -async function brokerListByResourceGroup() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.broker.listByResourceGroup("rgiotoperations", "resource-name123")) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main() { - brokerListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples-dev/brokerListenerCreateOrUpdateSample.ts b/sdk/iotoperations/arm-iotoperations/samples-dev/brokerListenerCreateOrUpdateSample.ts deleted file mode 100644 index 59fc9e87cffc..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples-dev/brokerListenerCreateOrUpdateSample.ts +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsClient } from "@azure/arm-iotoperations"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to create a BrokerListenerResource - * - * @summary create a BrokerListenerResource - * x-ms-original-file: 2024-09-15-preview/BrokerListener_CreateOrUpdate_Complex.json - */ -async function brokerListenerCreateOrUpdateComplex() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.brokerListener.createOrUpdate( - "rgiotoperations", - "resource-name123", - "resource-name123", - "resource-name123", - { - properties: { - serviceType: "LoadBalancer", - ports: [ - { - port: 8080, - authenticationRef: "example-authentication", - protocol: "WebSockets", - }, - { - port: 8443, - authenticationRef: "example-authentication", - protocol: "WebSockets", - tls: { - mode: "Automatic", - certManagerCertificateSpec: { - issuerRef: { - group: "jtmuladdkpasfpoyvewekmiy", - name: "example-issuer", - kind: "Issuer", - }, - }, - }, - }, - { port: 1883, authenticationRef: "example-authentication" }, - { - port: 8883, - authenticationRef: "example-authentication", - tls: { mode: "Manual", manual: { secretRef: "example-secret" } }, - }, - ], - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to create a BrokerListenerResource - * - * @summary create a BrokerListenerResource - * x-ms-original-file: 2024-09-15-preview/BrokerListener_CreateOrUpdate_MaximumSet_Gen.json - */ -async function brokerListenerCreateOrUpdate() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.brokerListener.createOrUpdate( - "rgiotoperations", - "resource-name123", - "resource-name123", - "resource-name123", - { - properties: { - serviceName: "tpfiszlapdpxktx", - ports: [ - { - authenticationRef: "tjvdroaqqy", - authorizationRef: "inxhvxnwswyrvt", - nodePort: 7281, - port: 1268, - protocol: "Mqtt", - tls: { - mode: "Automatic", - certManagerCertificateSpec: { - duration: "qmpeffoksron", - secretName: "oagi", - renewBefore: "hutno", - issuerRef: { - group: "jtmuladdkpasfpoyvewekmiy", - kind: "Issuer", - name: "ocwoqpgucvjrsuudtjhb", - }, - privateKey: { algorithm: "Ec256", rotationPolicy: "Always" }, - san: { - dns: ["xhvmhrrhgfsapocjeebqtnzarlj"], - ip: ["zbgugfzcgsmegevzktsnibyuyp"], - }, - }, - manual: { secretRef: "secret-name" }, - }, - }, - ], - serviceType: "ClusterIp", - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to create a BrokerListenerResource - * - * @summary create a BrokerListenerResource - * x-ms-original-file: 2024-09-15-preview/BrokerListener_CreateOrUpdate_Simple.json - */ -async function brokerListenerCreateOrUpdateSimple() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.brokerListener.createOrUpdate( - "rgiotoperations", - "resource-name123", - "resource-name123", - "resource-name123", - { - properties: { ports: [{ port: 1883 }] }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -async function main() { - brokerListenerCreateOrUpdateComplex(); - brokerListenerCreateOrUpdate(); - brokerListenerCreateOrUpdateSimple(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples-dev/brokerListenerDeleteSample.ts b/sdk/iotoperations/arm-iotoperations/samples-dev/brokerListenerDeleteSample.ts deleted file mode 100644 index dac6e0497872..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples-dev/brokerListenerDeleteSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsClient } from "@azure/arm-iotoperations"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to delete a BrokerListenerResource - * - * @summary delete a BrokerListenerResource - * x-ms-original-file: 2024-09-15-preview/BrokerListener_Delete_MaximumSet_Gen.json - */ -async function brokerListenerDelete() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - await client.brokerListener.delete( - "rgiotoperations", - "resource-name123", - "resource-name123", - "resource-name123", - ); -} - -async function main() { - brokerListenerDelete(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples-dev/brokerListenerGetSample.ts b/sdk/iotoperations/arm-iotoperations/samples-dev/brokerListenerGetSample.ts deleted file mode 100644 index 913d755c3ea7..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples-dev/brokerListenerGetSample.ts +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsClient } from "@azure/arm-iotoperations"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to get a BrokerListenerResource - * - * @summary get a BrokerListenerResource - * x-ms-original-file: 2024-09-15-preview/BrokerListener_Get_MaximumSet_Gen.json - */ -async function brokerListenerGet() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.brokerListener.get( - "rgiotoperations", - "resource-name123", - "resource-name123", - "resource-name123", - ); - console.log(result); -} - -async function main() { - brokerListenerGet(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples-dev/brokerListenerListByResourceGroupSample.ts b/sdk/iotoperations/arm-iotoperations/samples-dev/brokerListenerListByResourceGroupSample.ts deleted file mode 100644 index 83062ca82430..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples-dev/brokerListenerListByResourceGroupSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsClient } from "@azure/arm-iotoperations"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to list BrokerListenerResource resources by BrokerResource - * - * @summary list BrokerListenerResource resources by BrokerResource - * x-ms-original-file: 2024-09-15-preview/BrokerListener_ListByResourceGroup_MaximumSet_Gen.json - */ -async function brokerListenerListByResourceGroup() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.brokerListener.listByResourceGroup( - "rgiotoperations", - "resource-name123", - "resource-name123", - )) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main() { - brokerListenerListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowCreateOrUpdateSample.ts b/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowCreateOrUpdateSample.ts deleted file mode 100644 index e77b2eef4111..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowCreateOrUpdateSample.ts +++ /dev/null @@ -1,400 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsClient } from "@azure/arm-iotoperations"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to create a DataflowResource - * - * @summary create a DataflowResource - * x-ms-original-file: 2024-09-15-preview/Dataflow_CreateOrUpdate_ComplexContextualization.json - */ -async function dataflowCreateOrUpdateComplexContextualization() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.dataflow.createOrUpdate( - "rgiotoperations", - "resource-name123", - "resource-name123", - "aio-to-adx-contexualized", - { - properties: { - mode: "Enabled", - operations: [ - { - operationType: "Source", - name: "source1", - sourceSettings: { - endpointRef: "aio-builtin-broker-endpoint", - dataSources: ["azure-iot-operations/data/thermostat"], - }, - }, - { - operationType: "BuiltInTransformation", - name: "transformation1", - builtInTransformationSettings: { - map: [ - { inputs: ["*"], output: "*" }, - { inputs: ["$context(quality).*"], output: "enriched.*" }, - ], - datasets: [ - { - key: "quality", - inputs: ["$source.country", "$context.country"], - expression: "$1 == $2", - }, - ], - }, - }, - { - operationType: "Destination", - name: "destination1", - destinationSettings: { - endpointRef: "adx-endpoint", - dataDestination: "mytable", - }, - }, - ], - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to create a DataflowResource - * - * @summary create a DataflowResource - * x-ms-original-file: 2024-09-15-preview/Dataflow_CreateOrUpdate_ComplexEventHub.json - */ -async function dataflowCreateOrUpdateComplexEventHub() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.dataflow.createOrUpdate( - "rgiotoperations", - "resource-name123", - "resource-name123", - "aio-to-event-hub-transformed", - { - properties: { - mode: "Enabled", - operations: [ - { - operationType: "Source", - name: "source1", - sourceSettings: { - endpointRef: "aio-builtin-broker-endpoint", - dataSources: ["azure-iot-operations/data/thermostat"], - }, - }, - { - operationType: "BuiltInTransformation", - builtInTransformationSettings: { - filter: [ - { - inputs: ["temperature.Value", '"Tag 10".Value'], - expression: "$1 > 9000 && $2 >= 8000", - }, - ], - map: [ - { inputs: ["*"], output: "*" }, - { - inputs: ["temperature.Value", '"Tag 10".Value'], - expression: "($1+$2)/2", - output: "AvgTemp.Value", - }, - { - inputs: [], - expression: "true", - output: "dataflow-processed", - }, - { - inputs: ["temperature.SourceTimestamp"], - expression: "", - output: "", - }, - { inputs: ['"Tag 10"'], expression: "", output: "pressure" }, - { - inputs: ["temperature.Value"], - expression: "cToF($1)", - output: "temperatureF.Value", - }, - { - inputs: ['"Tag 10".Value'], - expression: "scale ($1,0,10,0,100)", - output: '"Scale Tag 10".Value', - }, - ], - }, - }, - { - operationType: "Destination", - name: "destination1", - destinationSettings: { - endpointRef: "event-hub-endpoint", - dataDestination: "myuniqueeventhub", - }, - }, - ], - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to create a DataflowResource - * - * @summary create a DataflowResource - * x-ms-original-file: 2024-09-15-preview/Dataflow_CreateOrUpdate_FilterToTopic.json - */ -async function dataflowCreateOrUpdateFilterToTopic() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.dataflow.createOrUpdate( - "rgiotoperations", - "resource-name123", - "resource-name123", - "mqtt-filter-to-topic", - { - properties: { - mode: "Enabled", - operations: [ - { - operationType: "Source", - name: "source1", - sourceSettings: { - endpointRef: "aio-builtin-broker-endpoint", - dataSources: ["azure-iot-operations/data/thermostat"], - }, - }, - { - operationType: "BuiltInTransformation", - name: "transformation1", - builtInTransformationSettings: { - filter: [ - { - type: "Filter", - description: "filter-datapoint", - inputs: ["temperature.Value", '"Tag 10".Value'], - expression: "$1 > 9000 && $2 >= 8000", - }, - ], - map: [{ type: "PassThrough", inputs: ["*"], output: "*" }], - }, - }, - { - operationType: "Destination", - name: "destination1", - destinationSettings: { - endpointRef: "aio-builtin-broker-endpoint", - dataDestination: "data/filtered/thermostat", - }, - }, - ], - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to create a DataflowResource - * - * @summary create a DataflowResource - * x-ms-original-file: 2024-09-15-preview/Dataflow_CreateOrUpdate_MaximumSet_Gen.json - */ -async function dataflowCreateOrUpdate() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.dataflow.createOrUpdate( - "rgiotoperations", - "resource-name123", - "resource-name123", - "resource-name123", - { - properties: { - mode: "Enabled", - operations: [ - { - operationType: "Source", - name: "knnafvkwoeakm", - sourceSettings: { - endpointRef: "iixotodhvhkkfcfyrkoveslqig", - assetRef: "zayyykwmckaocywdkohmu", - serializationFormat: "Json", - schemaRef: "pknmdzqll", - dataSources: ["chkkpymxhp"], - }, - builtInTransformationSettings: { - serializationFormat: "Delta", - schemaRef: "mcdc", - datasets: [ - { - key: "qsfqcgxaxnhfumrsdsokwyv", - description: "Lorem ipsum odor amet, consectetuer adipiscing elit.", - schemaRef: "n", - inputs: ["mosffpsslifkq"], - expression: "aatbwomvflemsxialv", - }, - ], - filter: [ - { - type: "Filter", - description: "Lorem ipsum odor amet, consectetuer adipiscing elit.", - inputs: ["sxmjkbntgb"], - expression: "n", - }, - ], - map: [ - { - type: "NewProperties", - description: "Lorem ipsum odor amet, consectetuer adipiscing elit.", - inputs: ["xsbxuk"], - expression: "txoiltogsarwkzalsphvlmt", - output: "nvgtmkfl", - }, - ], - }, - destinationSettings: { - endpointRef: "kybkchnzimerguekuvqlqiqdvvrt", - dataDestination: "cbrh", - }, - }, - ], - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to create a DataflowResource - * - * @summary create a DataflowResource - * x-ms-original-file: 2024-09-15-preview/Dataflow_CreateOrUpdate_SimpleEventGrid.json - */ -async function dataflowCreateOrUpdateSimpleEventGrid() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.dataflow.createOrUpdate( - "rgiotoperations", - "resource-name123", - "resource-name123", - "aio-to-event-grid", - { - properties: { - mode: "Enabled", - operations: [ - { - operationType: "Source", - name: "source1", - sourceSettings: { - endpointRef: "aio-builtin-broker-endpoint", - dataSources: ["thermostats/+/telemetry/temperature/#"], - }, - }, - { - operationType: "Destination", - name: "destination1", - destinationSettings: { - endpointRef: "event-grid-endpoint", - dataDestination: "factory/telemetry", - }, - }, - ], - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to create a DataflowResource - * - * @summary create a DataflowResource - * x-ms-original-file: 2024-09-15-preview/Dataflow_CreateOrUpdate_SimpleFabric.json - */ -async function dataflowCreateOrUpdateSimpleFabric() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.dataflow.createOrUpdate( - "rgiotoperations", - "resource-name123", - "resource-name123", - "aio-to-fabric", - { - properties: { - mode: "Enabled", - operations: [ - { - operationType: "Source", - name: "source1", - sourceSettings: { - endpointRef: "aio-builtin-broker-endpoint", - dataSources: ["azure-iot-operations/data/thermostat"], - }, - }, - { - operationType: "BuiltInTransformation", - builtInTransformationSettings: { - serializationFormat: "Parquet", - schemaRef: "aio-sr://exampleNamespace/exmapleParquetSchema:1.0.0", - }, - }, - { - operationType: "Destination", - name: "destination1", - destinationSettings: { - endpointRef: "fabric-endpoint", - dataDestination: "telemetryTable", - }, - }, - ], - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -async function main() { - dataflowCreateOrUpdateComplexContextualization(); - dataflowCreateOrUpdateComplexEventHub(); - dataflowCreateOrUpdateFilterToTopic(); - dataflowCreateOrUpdate(); - dataflowCreateOrUpdateSimpleEventGrid(); - dataflowCreateOrUpdateSimpleFabric(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowDeleteSample.ts b/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowDeleteSample.ts deleted file mode 100644 index b7a7f2cc4f21..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowDeleteSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsClient } from "@azure/arm-iotoperations"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to delete a DataflowResource - * - * @summary delete a DataflowResource - * x-ms-original-file: 2024-09-15-preview/Dataflow_Delete_MaximumSet_Gen.json - */ -async function dataflowDelete() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - await client.dataflow.delete( - "rgiotoperations", - "resource-name123", - "resource-name123", - "resource-name123", - ); -} - -async function main() { - dataflowDelete(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowEndpointCreateOrUpdateSample.ts b/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowEndpointCreateOrUpdateSample.ts deleted file mode 100644 index 496c8c729fbc..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowEndpointCreateOrUpdateSample.ts +++ /dev/null @@ -1,496 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsClient } from "@azure/arm-iotoperations"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to create a DataflowEndpointResource - * - * @summary create a DataflowEndpointResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_CreateOrUpdate_ADLSv2.json - */ -async function dataflowEndpointCreateOrUpdateADLSv2() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.dataflowEndpoint.createOrUpdate( - "rgiotoperations", - "resource-name123", - "adlsv2-endpoint", - { - properties: { - endpointType: "DataLakeStorage", - dataLakeStorageSettings: { - host: "example.blob.core.windows.net", - authentication: { - method: "AccessToken", - accessTokenSettings: { secretRef: "my-secret" }, - }, - }, - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to create a DataflowEndpointResource - * - * @summary create a DataflowEndpointResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_CreateOrUpdate_ADX.json - */ -async function dataflowEndpointCreateOrUpdateAdx() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.dataflowEndpoint.createOrUpdate( - "rgiotoperations", - "resource-name123", - "adx-endpoint", - { - properties: { - endpointType: "DataExplorer", - dataExplorerSettings: { - host: "example.westeurope.kusto.windows.net", - authentication: { - method: "SystemAssignedManagedIdentity", - systemAssignedManagedIdentitySettings: {}, - }, - database: "example-database", - batching: { latencySeconds: 9312, maxMessages: 9028 }, - }, - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to create a DataflowEndpointResource - * - * @summary create a DataflowEndpointResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_CreateOrUpdate_AIO.json - */ -async function dataflowEndpointCreateOrUpdateAio() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.dataflowEndpoint.createOrUpdate( - "rgiotoperations", - "resource-name123", - "aio-builtin-broker-endpoint", - { - properties: { - endpointType: "Mqtt", - mqttSettings: { - host: "aio-broker:18883", - authentication: { - method: "Kubernetes", - serviceAccountTokenSettings: { audience: "aio-internal" }, - }, - tls: { - mode: "Enabled", - trustedCaCertificateConfigMapRef: "aio-ca-trust-bundle-test-only", - }, - }, - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to create a DataflowEndpointResource - * - * @summary create a DataflowEndpointResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_CreateOrUpdate_EventGrid.json - */ -async function dataflowEndpointCreateOrUpdateEventGrid() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.dataflowEndpoint.createOrUpdate( - "rgiotoperations", - "resource-name123", - "event-grid-endpoint", - { - properties: { - endpointType: "Mqtt", - mqttSettings: { - host: "example.westeurope-1.ts.eventgrid.azure.net:8883", - authentication: { - method: "SystemAssignedManagedIdentity", - systemAssignedManagedIdentitySettings: {}, - }, - tls: { mode: "Enabled" }, - }, - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to create a DataflowEndpointResource - * - * @summary create a DataflowEndpointResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_CreateOrUpdate_EventHub.json - */ -async function dataflowEndpointCreateOrUpdateEventHub() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.dataflowEndpoint.createOrUpdate( - "rgiotoperations", - "resource-name123", - "event-hub-endpoint", - { - properties: { - endpointType: "Kafka", - kafkaSettings: { - host: "example.servicebus.windows.net:9093", - authentication: { - method: "SystemAssignedManagedIdentity", - systemAssignedManagedIdentitySettings: {}, - }, - tls: { mode: "Enabled" }, - consumerGroupId: "aiodataflows", - }, - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to create a DataflowEndpointResource - * - * @summary create a DataflowEndpointResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_CreateOrUpdate_Fabric.json - */ -async function dataflowEndpointCreateOrUpdateFabric() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.dataflowEndpoint.createOrUpdate( - "rgiotoperations", - "resource-name123", - "fabric-endpoint", - { - properties: { - endpointType: "FabricOneLake", - fabricOneLakeSettings: { - host: "onelake.dfs.fabric.microsoft.com", - authentication: { - method: "SystemAssignedManagedIdentity", - systemAssignedManagedIdentitySettings: {}, - }, - names: { - workspaceName: "example-workspace", - lakehouseName: "example-lakehouse", - }, - oneLakePathType: "Tables", - }, - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to create a DataflowEndpointResource - * - * @summary create a DataflowEndpointResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_CreateOrUpdate_Kafka.json - */ -async function dataflowEndpointCreateOrUpdateKafka() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.dataflowEndpoint.createOrUpdate( - "rgiotoperations", - "resource-name123", - "generic-kafka-endpoint", - { - properties: { - endpointType: "Kafka", - kafkaSettings: { - host: "example.kafka.local:9093", - authentication: { - method: "Sasl", - saslSettings: { saslType: "Plain", secretRef: "my-secret" }, - }, - tls: { - mode: "Enabled", - trustedCaCertificateConfigMapRef: "ca-certificates", - }, - consumerGroupId: "dataflows", - compression: "Gzip", - batching: { - mode: "Enabled", - latencyMs: 5, - maxBytes: 1000000, - maxMessages: 100000, - }, - partitionStrategy: "Default", - kafkaAcks: "All", - copyMqttProperties: "Enabled", - cloudEventAttributes: "Propagate", - }, - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to create a DataflowEndpointResource - * - * @summary create a DataflowEndpointResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_CreateOrUpdate_LocalStorage.json - */ -async function dataflowEndpointCreateOrUpdateLocalStorage() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.dataflowEndpoint.createOrUpdate( - "rgiotoperations", - "resource-name123", - "local-storage-endpoint", - { - properties: { - endpointType: "LocalStorage", - localStorageSettings: { persistentVolumeClaimRef: "example-pvc" }, - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to create a DataflowEndpointResource - * - * @summary create a DataflowEndpointResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_CreateOrUpdate_MaximumSet_Gen.json - */ -async function dataflowEndpointCreateOrUpdate() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.dataflowEndpoint.createOrUpdate( - "rgiotoperations", - "resource-name123", - "resource-name123", - { - properties: { - endpointType: "DataExplorer", - dataExplorerSettings: { - authentication: { - method: "SystemAssignedManagedIdentity", - systemAssignedManagedIdentitySettings: { - audience: "psxomrfbhoflycm", - }, - userAssignedManagedIdentitySettings: { - clientId: "fb90f267-8872-431a-a76a-a1cec5d3c4d2", - scope: "zop", - tenantId: "ed060aa2-71ff-4d3f-99c4-a9138356fdec", - }, - }, - database: "yqcdpjsifm", - host: "..kusto.windows.net", - batching: { latencySeconds: 9312, maxMessages: 9028 }, - }, - dataLakeStorageSettings: { - authentication: { - method: "SystemAssignedManagedIdentity", - accessTokenSettings: { secretRef: "sevriyphcvnlrnfudqzejecwa" }, - systemAssignedManagedIdentitySettings: { - audience: "psxomrfbhoflycm", - }, - userAssignedManagedIdentitySettings: { - clientId: "fb90f267-8872-431a-a76a-a1cec5d3c4d2", - scope: "zop", - tenantId: "ed060aa2-71ff-4d3f-99c4-a9138356fdec", - }, - }, - host: ".blob.core.windows.net", - batching: { latencySeconds: 9312, maxMessages: 9028 }, - }, - fabricOneLakeSettings: { - authentication: { - method: "SystemAssignedManagedIdentity", - systemAssignedManagedIdentitySettings: { - audience: "psxomrfbhoflycm", - }, - userAssignedManagedIdentitySettings: { - clientId: "fb90f267-8872-431a-a76a-a1cec5d3c4d2", - scope: "zop", - tenantId: "ed060aa2-71ff-4d3f-99c4-a9138356fdec", - }, - }, - names: { lakehouseName: "wpeathi", workspaceName: "nwgmitkbljztgms" }, - oneLakePathType: "Files", - host: "https://.fabric.microsoft.com", - batching: { latencySeconds: 9312, maxMessages: 9028 }, - }, - kafkaSettings: { - authentication: { - method: "SystemAssignedManagedIdentity", - systemAssignedManagedIdentitySettings: { - audience: "psxomrfbhoflycm", - }, - userAssignedManagedIdentitySettings: { - clientId: "fb90f267-8872-431a-a76a-a1cec5d3c4d2", - scope: "zop", - tenantId: "ed060aa2-71ff-4d3f-99c4-a9138356fdec", - }, - saslSettings: { - saslType: "Plain", - secretRef: "visyxoztqnylvbyokhtmpdkwes", - }, - x509CertificateSettings: { secretRef: "afwizrystfslkfqd" }, - }, - consumerGroupId: "ukkzcjiyenhxokat", - host: "pwcqfiqclcgneolpewnyavoulbip", - batching: { - mode: "Enabled", - latencyMs: 3679, - maxBytes: 8887, - maxMessages: 2174, - }, - copyMqttProperties: "Enabled", - compression: "None", - kafkaAcks: "Zero", - partitionStrategy: "Default", - tls: { - mode: "Enabled", - trustedCaCertificateConfigMapRef: "tectjjvukvelsreihwadh", - }, - }, - localStorageSettings: { persistentVolumeClaimRef: "jjwqwvd" }, - mqttSettings: { - authentication: { - method: "SystemAssignedManagedIdentity", - systemAssignedManagedIdentitySettings: { - audience: "psxomrfbhoflycm", - }, - userAssignedManagedIdentitySettings: { - clientId: "fb90f267-8872-431a-a76a-a1cec5d3c4d2", - scope: "zop", - tenantId: "ed060aa2-71ff-4d3f-99c4-a9138356fdec", - }, - serviceAccountTokenSettings: { audience: "ejbklrbxgjaqleoycgpje" }, - x509CertificateSettings: { secretRef: "afwizrystfslkfqd" }, - }, - clientIdPrefix: "kkljsdxdirfhwxtkavldekeqhv", - host: "nyhnxqnbspstctl", - protocol: "Mqtt", - keepAliveSeconds: 0, - retain: "Keep", - maxInflightMessages: 0, - qos: 1, - sessionExpirySeconds: 0, - tls: { - mode: "Enabled", - trustedCaCertificateConfigMapRef: "tectjjvukvelsreihwadh", - }, - }, - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to create a DataflowEndpointResource - * - * @summary create a DataflowEndpointResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_CreateOrUpdate_MQTT.json - */ -async function dataflowEndpointCreateOrUpdateMqtt() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.dataflowEndpoint.createOrUpdate( - "rgiotoperations", - "resource-name123", - "generic-mqtt-broker-endpoint", - { - properties: { - endpointType: "Mqtt", - mqttSettings: { - host: "example.broker.local:1883", - authentication: { - method: "X509Certificate", - x509CertificateSettings: { secretRef: "example-secret" }, - }, - tls: { mode: "Disabled" }, - clientIdPrefix: "factory-gateway", - retain: "Keep", - sessionExpirySeconds: 3600, - qos: 1, - protocol: "WebSockets", - maxInflightMessages: 100, - keepAliveSeconds: 60, - }, - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -async function main() { - dataflowEndpointCreateOrUpdateADLSv2(); - dataflowEndpointCreateOrUpdateAdx(); - dataflowEndpointCreateOrUpdateAio(); - dataflowEndpointCreateOrUpdateEventGrid(); - dataflowEndpointCreateOrUpdateEventHub(); - dataflowEndpointCreateOrUpdateFabric(); - dataflowEndpointCreateOrUpdateKafka(); - dataflowEndpointCreateOrUpdateLocalStorage(); - dataflowEndpointCreateOrUpdate(); - dataflowEndpointCreateOrUpdateMqtt(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowEndpointDeleteSample.ts b/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowEndpointDeleteSample.ts deleted file mode 100644 index 1af8a4bbd0a7..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowEndpointDeleteSample.ts +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsClient } from "@azure/arm-iotoperations"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to delete a DataflowEndpointResource - * - * @summary delete a DataflowEndpointResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_Delete_MaximumSet_Gen.json - */ -async function dataflowEndpointDelete() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - await client.dataflowEndpoint.delete("rgiotoperations", "resource-name123", "resource-name123"); -} - -async function main() { - dataflowEndpointDelete(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowEndpointGetSample.ts b/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowEndpointGetSample.ts deleted file mode 100644 index 4c190c182817..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowEndpointGetSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsClient } from "@azure/arm-iotoperations"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to get a DataflowEndpointResource - * - * @summary get a DataflowEndpointResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_Get_MaximumSet_Gen.json - */ -async function dataflowEndpointGet() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.dataflowEndpoint.get( - "rgiotoperations", - "resource-name123", - "resource-name123", - ); - console.log(result); -} - -async function main() { - dataflowEndpointGet(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowEndpointListByResourceGroupSample.ts b/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowEndpointListByResourceGroupSample.ts deleted file mode 100644 index 6fc39edc7eae..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowEndpointListByResourceGroupSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsClient } from "@azure/arm-iotoperations"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to list DataflowEndpointResource resources by InstanceResource - * - * @summary list DataflowEndpointResource resources by InstanceResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_ListByResourceGroup_MaximumSet_Gen.json - */ -async function dataflowEndpointListByResourceGroup() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.dataflowEndpoint.listByResourceGroup( - "rgiotoperations", - "resource-name123", - )) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main() { - dataflowEndpointListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowGetSample.ts b/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowGetSample.ts deleted file mode 100644 index 638dd886833a..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowGetSample.ts +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsClient } from "@azure/arm-iotoperations"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to get a DataflowResource - * - * @summary get a DataflowResource - * x-ms-original-file: 2024-09-15-preview/Dataflow_Get_MaximumSet_Gen.json - */ -async function dataflowGet() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.dataflow.get( - "rgiotoperations", - "resource-name123", - "resource-name123", - "resource-name123", - ); - console.log(result); -} - -async function main() { - dataflowGet(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowListByResourceGroupSample.ts b/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowListByResourceGroupSample.ts deleted file mode 100644 index 3de53e08bbfb..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowListByResourceGroupSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsClient } from "@azure/arm-iotoperations"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to list DataflowResource resources by DataflowProfileResource - * - * @summary list DataflowResource resources by DataflowProfileResource - * x-ms-original-file: 2024-09-15-preview/Dataflow_ListByProfileResource_MaximumSet_Gen.json - */ -async function dataflowListByProfileResource() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.dataflow.listByResourceGroup( - "rgiotoperations", - "resource-name123", - "resource-name123", - )) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main() { - dataflowListByProfileResource(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowProfileCreateOrUpdateSample.ts b/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowProfileCreateOrUpdateSample.ts deleted file mode 100644 index b751287bfa0a..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowProfileCreateOrUpdateSample.ts +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsClient } from "@azure/arm-iotoperations"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to create a DataflowProfileResource - * - * @summary create a DataflowProfileResource - * x-ms-original-file: 2024-09-15-preview/DataflowProfile_CreateOrUpdate_MaximumSet_Gen.json - */ -async function dataflowProfileCreateOrUpdate() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.dataflowProfile.createOrUpdate( - "rgiotoperations", - "resource-name123", - "resource-name123", - { - properties: { - diagnostics: { - logs: { level: "rnmwokumdmebpmfxxxzvvjfdywotav" }, - metrics: { prometheusPort: 7581 }, - }, - instanceCount: 14, - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to create a DataflowProfileResource - * - * @summary create a DataflowProfileResource - * x-ms-original-file: 2024-09-15-preview/DataflowProfile_CreateOrUpdate_Minimal.json - */ -async function dataflowProfileCreateOrUpdateMinimal() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.dataflowProfile.createOrUpdate( - "rgiotoperations", - "resource-name123", - "aio-dataflowprofile", - { - properties: { instanceCount: 1 }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to create a DataflowProfileResource - * - * @summary create a DataflowProfileResource - * x-ms-original-file: 2024-09-15-preview/DataflowProfile_CreateOrUpdate_Multi.json - */ -async function dataflowProfileCreateOrUpdateMulti() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.dataflowProfile.createOrUpdate( - "rgiotoperations", - "resource-name123", - "aio-dataflowprofile", - { - properties: { instanceCount: 3 }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -async function main() { - dataflowProfileCreateOrUpdate(); - dataflowProfileCreateOrUpdateMinimal(); - dataflowProfileCreateOrUpdateMulti(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowProfileDeleteSample.ts b/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowProfileDeleteSample.ts deleted file mode 100644 index 027b0ae0c30c..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowProfileDeleteSample.ts +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsClient } from "@azure/arm-iotoperations"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to delete a DataflowProfileResource - * - * @summary delete a DataflowProfileResource - * x-ms-original-file: 2024-09-15-preview/DataflowProfile_Delete_MaximumSet_Gen.json - */ -async function dataflowProfileDelete() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - await client.dataflowProfile.delete("rgiotoperations", "resource-name123", "resource-name123"); -} - -async function main() { - dataflowProfileDelete(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowProfileGetSample.ts b/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowProfileGetSample.ts deleted file mode 100644 index 3f1c0cd20e95..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowProfileGetSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsClient } from "@azure/arm-iotoperations"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to get a DataflowProfileResource - * - * @summary get a DataflowProfileResource - * x-ms-original-file: 2024-09-15-preview/DataflowProfile_Get_MaximumSet_Gen.json - */ -async function dataflowProfileGet() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.dataflowProfile.get( - "rgiotoperations", - "resource-name123", - "resource-name123", - ); - console.log(result); -} - -async function main() { - dataflowProfileGet(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowProfileListByResourceGroupSample.ts b/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowProfileListByResourceGroupSample.ts deleted file mode 100644 index e1c996594bf5..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowProfileListByResourceGroupSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsClient } from "@azure/arm-iotoperations"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to list DataflowProfileResource resources by InstanceResource - * - * @summary list DataflowProfileResource resources by InstanceResource - * x-ms-original-file: 2024-09-15-preview/DataflowProfile_ListByResourceGroup_MaximumSet_Gen.json - */ -async function dataflowProfileListByResourceGroup() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.dataflowProfile.listByResourceGroup( - "rgiotoperations", - "resource-name123", - )) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main() { - dataflowProfileListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples-dev/instanceCreateOrUpdateSample.ts b/sdk/iotoperations/arm-iotoperations/samples-dev/instanceCreateOrUpdateSample.ts deleted file mode 100644 index ebb765f8b109..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples-dev/instanceCreateOrUpdateSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsClient } from "@azure/arm-iotoperations"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to create a InstanceResource - * - * @summary create a InstanceResource - * x-ms-original-file: 2024-09-15-preview/Instance_CreateOrUpdate_MaximumSet_Gen.json - */ -async function instanceCreateOrUpdate() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.instance.createOrUpdate("rgiotoperations", "aio-instance", { - properties: { - schemaRegistryRef: { - resourceId: - "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.DeviceRegistry/schemaRegistries/resource-name123", - }, - description: "kpqtgocs", - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - identity: { type: "None", userAssignedIdentities: {} }, - tags: {}, - location: "xvewadyhycrjpu", - }); - console.log(result); -} - -async function main() { - instanceCreateOrUpdate(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples-dev/instanceDeleteSample.ts b/sdk/iotoperations/arm-iotoperations/samples-dev/instanceDeleteSample.ts deleted file mode 100644 index 685dbe899f1a..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples-dev/instanceDeleteSample.ts +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsClient } from "@azure/arm-iotoperations"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to delete a InstanceResource - * - * @summary delete a InstanceResource - * x-ms-original-file: 2024-09-15-preview/Instance_Delete_MaximumSet_Gen.json - */ -async function instanceDelete() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - await client.instance.delete("rgiotoperations", "aio-instance"); -} - -async function main() { - instanceDelete(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples-dev/instanceGetSample.ts b/sdk/iotoperations/arm-iotoperations/samples-dev/instanceGetSample.ts deleted file mode 100644 index 76be3cc0966c..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples-dev/instanceGetSample.ts +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsClient } from "@azure/arm-iotoperations"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to get a InstanceResource - * - * @summary get a InstanceResource - * x-ms-original-file: 2024-09-15-preview/Instance_Get_MaximumSet_Gen.json - */ -async function instanceGet() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.instance.get("rgiotoperations", "aio-instance"); - console.log(result); -} - -async function main() { - instanceGet(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples-dev/instanceListByResourceGroupSample.ts b/sdk/iotoperations/arm-iotoperations/samples-dev/instanceListByResourceGroupSample.ts deleted file mode 100644 index 8382d0ff308e..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples-dev/instanceListByResourceGroupSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsClient } from "@azure/arm-iotoperations"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to list InstanceResource resources by resource group - * - * @summary list InstanceResource resources by resource group - * x-ms-original-file: 2024-09-15-preview/Instance_ListByResourceGroup_MaximumSet_Gen.json - */ -async function instanceListByResourceGroup() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.instance.listByResourceGroup("rgiotoperations")) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main() { - instanceListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples-dev/instanceListBySubscriptionSample.ts b/sdk/iotoperations/arm-iotoperations/samples-dev/instanceListBySubscriptionSample.ts deleted file mode 100644 index 5c5fc9a85986..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples-dev/instanceListBySubscriptionSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsClient } from "@azure/arm-iotoperations"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to list InstanceResource resources by subscription ID - * - * @summary list InstanceResource resources by subscription ID - * x-ms-original-file: 2024-09-15-preview/Instance_ListBySubscription_MaximumSet_Gen.json - */ -async function instanceListBySubscription() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.instance.listBySubscription()) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main() { - instanceListBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples-dev/instanceUpdateSample.ts b/sdk/iotoperations/arm-iotoperations/samples-dev/instanceUpdateSample.ts deleted file mode 100644 index f7b726f2b59c..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples-dev/instanceUpdateSample.ts +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsClient } from "@azure/arm-iotoperations"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to update a InstanceResource - * - * @summary update a InstanceResource - * x-ms-original-file: 2024-09-15-preview/Instance_Update_MaximumSet_Gen.json - */ -async function instanceUpdate() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.instance.update("rgiotoperations", "aio-instance", { - tags: {}, - identity: { type: "None", userAssignedIdentities: {} }, - }); - console.log(result); -} - -async function main() { - instanceUpdate(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples-dev/operationsListSample.ts b/sdk/iotoperations/arm-iotoperations/samples-dev/operationsListSample.ts deleted file mode 100644 index 9b918368ddd9..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples-dev/operationsListSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsClient } from "@azure/arm-iotoperations"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to list the operations for the provider - * - * @summary list the operations for the provider - * x-ms-original-file: 2024-09-15-preview/Operations_List_MaximumSet_Gen.json - */ -async function operationsList() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-00000000000"; - const client = new IoTOperationsClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.operations.list()) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main() { - operationsList(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/README.md b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/README.md deleted file mode 100644 index 48f5f544886f..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/README.md +++ /dev/null @@ -1,118 +0,0 @@ -# @azure/arm-iotoperations client library samples for JavaScript (Beta) - -These sample programs show how to use the JavaScript client libraries for @azure/arm-iotoperations in some common scenarios. - -| **File Name** | **Description** | -| ------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [brokerAuthenticationCreateOrUpdateSample.js][brokerauthenticationcreateorupdatesample] | create a BrokerAuthenticationResource x-ms-original-file: 2024-09-15-preview/BrokerAuthentication_CreateOrUpdate_Complex.json | -| [brokerAuthenticationDeleteSample.js][brokerauthenticationdeletesample] | delete a BrokerAuthenticationResource x-ms-original-file: 2024-09-15-preview/BrokerAuthentication_Delete_MaximumSet_Gen.json | -| [brokerAuthenticationGetSample.js][brokerauthenticationgetsample] | get a BrokerAuthenticationResource x-ms-original-file: 2024-09-15-preview/BrokerAuthentication_Get_MaximumSet_Gen.json | -| [brokerAuthenticationListByResourceGroupSample.js][brokerauthenticationlistbyresourcegroupsample] | list BrokerAuthenticationResource resources by BrokerResource x-ms-original-file: 2024-09-15-preview/BrokerAuthentication_ListByResourceGroup_MaximumSet_Gen.json | -| [brokerAuthorizationCreateOrUpdateSample.js][brokerauthorizationcreateorupdatesample] | create a BrokerAuthorizationResource x-ms-original-file: 2024-09-15-preview/BrokerAuthorization_CreateOrUpdate_Complex.json | -| [brokerAuthorizationDeleteSample.js][brokerauthorizationdeletesample] | delete a BrokerAuthorizationResource x-ms-original-file: 2024-09-15-preview/BrokerAuthorization_Delete_MaximumSet_Gen.json | -| [brokerAuthorizationGetSample.js][brokerauthorizationgetsample] | get a BrokerAuthorizationResource x-ms-original-file: 2024-09-15-preview/BrokerAuthorization_Get_MaximumSet_Gen.json | -| [brokerAuthorizationListByResourceGroupSample.js][brokerauthorizationlistbyresourcegroupsample] | list BrokerAuthorizationResource resources by BrokerResource x-ms-original-file: 2024-09-15-preview/BrokerAuthorization_ListByResourceGroup_MaximumSet_Gen.json | -| [brokerCreateOrUpdateSample.js][brokercreateorupdatesample] | create a BrokerResource x-ms-original-file: 2024-09-15-preview/Broker_CreateOrUpdate_Complex.json | -| [brokerDeleteSample.js][brokerdeletesample] | delete a BrokerResource x-ms-original-file: 2024-09-15-preview/Broker_Delete_MaximumSet_Gen.json | -| [brokerGetSample.js][brokergetsample] | get a BrokerResource x-ms-original-file: 2024-09-15-preview/Broker_Get_MaximumSet_Gen.json | -| [brokerListByResourceGroupSample.js][brokerlistbyresourcegroupsample] | list BrokerResource resources by InstanceResource x-ms-original-file: 2024-09-15-preview/Broker_ListByResourceGroup_MaximumSet_Gen.json | -| [brokerListenerCreateOrUpdateSample.js][brokerlistenercreateorupdatesample] | create a BrokerListenerResource x-ms-original-file: 2024-09-15-preview/BrokerListener_CreateOrUpdate_Complex.json | -| [brokerListenerDeleteSample.js][brokerlistenerdeletesample] | delete a BrokerListenerResource x-ms-original-file: 2024-09-15-preview/BrokerListener_Delete_MaximumSet_Gen.json | -| [brokerListenerGetSample.js][brokerlistenergetsample] | get a BrokerListenerResource x-ms-original-file: 2024-09-15-preview/BrokerListener_Get_MaximumSet_Gen.json | -| [brokerListenerListByResourceGroupSample.js][brokerlistenerlistbyresourcegroupsample] | list BrokerListenerResource resources by BrokerResource x-ms-original-file: 2024-09-15-preview/BrokerListener_ListByResourceGroup_MaximumSet_Gen.json | -| [dataflowCreateOrUpdateSample.js][dataflowcreateorupdatesample] | create a DataflowResource x-ms-original-file: 2024-09-15-preview/Dataflow_CreateOrUpdate_ComplexContextualization.json | -| [dataflowDeleteSample.js][dataflowdeletesample] | delete a DataflowResource x-ms-original-file: 2024-09-15-preview/Dataflow_Delete_MaximumSet_Gen.json | -| [dataflowEndpointCreateOrUpdateSample.js][dataflowendpointcreateorupdatesample] | create a DataflowEndpointResource x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_CreateOrUpdate_ADLSv2.json | -| [dataflowEndpointDeleteSample.js][dataflowendpointdeletesample] | delete a DataflowEndpointResource x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_Delete_MaximumSet_Gen.json | -| [dataflowEndpointGetSample.js][dataflowendpointgetsample] | get a DataflowEndpointResource x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_Get_MaximumSet_Gen.json | -| [dataflowEndpointListByResourceGroupSample.js][dataflowendpointlistbyresourcegroupsample] | list DataflowEndpointResource resources by InstanceResource x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_ListByResourceGroup_MaximumSet_Gen.json | -| [dataflowGetSample.js][dataflowgetsample] | get a DataflowResource x-ms-original-file: 2024-09-15-preview/Dataflow_Get_MaximumSet_Gen.json | -| [dataflowListByResourceGroupSample.js][dataflowlistbyresourcegroupsample] | list DataflowResource resources by DataflowProfileResource x-ms-original-file: 2024-09-15-preview/Dataflow_ListByProfileResource_MaximumSet_Gen.json | -| [dataflowProfileCreateOrUpdateSample.js][dataflowprofilecreateorupdatesample] | create a DataflowProfileResource x-ms-original-file: 2024-09-15-preview/DataflowProfile_CreateOrUpdate_MaximumSet_Gen.json | -| [dataflowProfileDeleteSample.js][dataflowprofiledeletesample] | delete a DataflowProfileResource x-ms-original-file: 2024-09-15-preview/DataflowProfile_Delete_MaximumSet_Gen.json | -| [dataflowProfileGetSample.js][dataflowprofilegetsample] | get a DataflowProfileResource x-ms-original-file: 2024-09-15-preview/DataflowProfile_Get_MaximumSet_Gen.json | -| [dataflowProfileListByResourceGroupSample.js][dataflowprofilelistbyresourcegroupsample] | list DataflowProfileResource resources by InstanceResource x-ms-original-file: 2024-09-15-preview/DataflowProfile_ListByResourceGroup_MaximumSet_Gen.json | -| [instanceCreateOrUpdateSample.js][instancecreateorupdatesample] | create a InstanceResource x-ms-original-file: 2024-09-15-preview/Instance_CreateOrUpdate_MaximumSet_Gen.json | -| [instanceDeleteSample.js][instancedeletesample] | delete a InstanceResource x-ms-original-file: 2024-09-15-preview/Instance_Delete_MaximumSet_Gen.json | -| [instanceGetSample.js][instancegetsample] | get a InstanceResource x-ms-original-file: 2024-09-15-preview/Instance_Get_MaximumSet_Gen.json | -| [instanceListByResourceGroupSample.js][instancelistbyresourcegroupsample] | list InstanceResource resources by resource group x-ms-original-file: 2024-09-15-preview/Instance_ListByResourceGroup_MaximumSet_Gen.json | -| [instanceListBySubscriptionSample.js][instancelistbysubscriptionsample] | list InstanceResource resources by subscription ID x-ms-original-file: 2024-09-15-preview/Instance_ListBySubscription_MaximumSet_Gen.json | -| [instanceUpdateSample.js][instanceupdatesample] | update a InstanceResource x-ms-original-file: 2024-09-15-preview/Instance_Update_MaximumSet_Gen.json | -| [operationsListSample.js][operationslistsample] | list the operations for the provider x-ms-original-file: 2024-09-15-preview/Operations_List_MaximumSet_Gen.json | - -## Prerequisites - -The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule). - -You need [an Azure subscription][freesub] to run these sample programs. - -Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. - -Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. - -## Setup - -To run the samples using the published version of the package: - -1. Install the dependencies using `npm`: - -```bash -npm install -``` - -2. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. - -3. Run whichever samples you like (note that some samples may require additional setup, see the table above): - -```bash -node brokerAuthenticationCreateOrUpdateSample.js -``` - -Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): - -```bash -npx dev-tool run vendored cross-env node brokerAuthenticationCreateOrUpdateSample.js -``` - -## Next Steps - -Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. - -[brokerauthenticationcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerAuthenticationCreateOrUpdateSample.js -[brokerauthenticationdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerAuthenticationDeleteSample.js -[brokerauthenticationgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerAuthenticationGetSample.js -[brokerauthenticationlistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerAuthenticationListByResourceGroupSample.js -[brokerauthorizationcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerAuthorizationCreateOrUpdateSample.js -[brokerauthorizationdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerAuthorizationDeleteSample.js -[brokerauthorizationgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerAuthorizationGetSample.js -[brokerauthorizationlistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerAuthorizationListByResourceGroupSample.js -[brokercreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerCreateOrUpdateSample.js -[brokerdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerDeleteSample.js -[brokergetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerGetSample.js -[brokerlistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerListByResourceGroupSample.js -[brokerlistenercreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerListenerCreateOrUpdateSample.js -[brokerlistenerdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerListenerDeleteSample.js -[brokerlistenergetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerListenerGetSample.js -[brokerlistenerlistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerListenerListByResourceGroupSample.js -[dataflowcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowCreateOrUpdateSample.js -[dataflowdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowDeleteSample.js -[dataflowendpointcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowEndpointCreateOrUpdateSample.js -[dataflowendpointdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowEndpointDeleteSample.js -[dataflowendpointgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowEndpointGetSample.js -[dataflowendpointlistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowEndpointListByResourceGroupSample.js -[dataflowgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowGetSample.js -[dataflowlistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowListByResourceGroupSample.js -[dataflowprofilecreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowProfileCreateOrUpdateSample.js -[dataflowprofiledeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowProfileDeleteSample.js -[dataflowprofilegetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowProfileGetSample.js -[dataflowprofilelistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowProfileListByResourceGroupSample.js -[instancecreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/instanceCreateOrUpdateSample.js -[instancedeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/instanceDeleteSample.js -[instancegetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/instanceGetSample.js -[instancelistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/instanceListByResourceGroupSample.js -[instancelistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/instanceListBySubscriptionSample.js -[instanceupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/instanceUpdateSample.js -[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/operationsListSample.js -[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-iotoperations?view=azure-node-preview -[freesub]: https://azure.microsoft.com/free/ -[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/iotoperations/arm-iotoperations/README.md diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerAuthenticationCreateOrUpdateSample.js b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerAuthenticationCreateOrUpdateSample.js deleted file mode 100644 index cc535b26acfc..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerAuthenticationCreateOrUpdateSample.js +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { IoTOperationsClient } = require("@azure/arm-iotoperations"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to create a BrokerAuthenticationResource - * - * @summary create a BrokerAuthenticationResource - * x-ms-original-file: 2024-09-15-preview/BrokerAuthentication_CreateOrUpdate_Complex.json - */ -async function brokerAuthenticationCreateOrUpdateComplex() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.brokerAuthentication.createOrUpdate( - "rgiotoperations", - "resource-name123", - "resource-name123", - "resource-name123", - { - properties: { - authenticationMethods: [ - { - method: "ServiceAccountToken", - serviceAccountTokenSettings: { audiences: ["aio-internal"] }, - }, - { - method: "X509", - x509Settings: { - trustedClientCaCert: "my-ca", - authorizationAttributes: { - root: { - subject: "CN = Contoso Root CA Cert, OU = Engineering, C = US", - attributes: { organization: "contoso" }, - }, - intermediate: { - subject: "CN = Contoso Intermediate CA", - attributes: { city: "seattle", foo: "bar" }, - }, - "smart-fan": { - subject: "CN = smart-fan", - attributes: { building: "17" }, - }, - }, - }, - }, - ], - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to create a BrokerAuthenticationResource - * - * @summary create a BrokerAuthenticationResource - * x-ms-original-file: 2024-09-15-preview/BrokerAuthentication_CreateOrUpdate_MaximumSet_Gen.json - */ -async function brokerAuthenticationCreateOrUpdate() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.brokerAuthentication.createOrUpdate( - "rgiotoperations", - "resource-name123", - "resource-name123", - "resource-name123", - { - properties: { - authenticationMethods: [ - { - method: "Custom", - customSettings: { - auth: { x509: { secretRef: "secret-name" } }, - caCertConfigMap: "pdecudefqyolvncbus", - endpoint: "https://www.example.com", - headers: { key8518: "bwityjy" }, - }, - serviceAccountTokenSettings: { audiences: ["jqyhyqatuydg"] }, - x509Settings: { - authorizationAttributes: { - key3384: { - attributes: { key186: "ucpajramsz" }, - subject: "jpgwctfeixitptfgfnqhua", - }, - }, - trustedClientCaCert: "vlctsqddl", - }, - }, - ], - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -async function main() { - brokerAuthenticationCreateOrUpdateComplex(); - brokerAuthenticationCreateOrUpdate(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerAuthenticationDeleteSample.js b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerAuthenticationDeleteSample.js deleted file mode 100644 index 23cd35ad0e48..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerAuthenticationDeleteSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { IoTOperationsClient } = require("@azure/arm-iotoperations"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to delete a BrokerAuthenticationResource - * - * @summary delete a BrokerAuthenticationResource - * x-ms-original-file: 2024-09-15-preview/BrokerAuthentication_Delete_MaximumSet_Gen.json - */ -async function brokerAuthenticationDelete() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - await client.brokerAuthentication.delete( - "rgiotoperations", - "resource-name123", - "resource-name123", - "resource-name123", - ); -} - -async function main() { - brokerAuthenticationDelete(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerAuthenticationGetSample.js b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerAuthenticationGetSample.js deleted file mode 100644 index 94ab8de1a832..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerAuthenticationGetSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { IoTOperationsClient } = require("@azure/arm-iotoperations"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to get a BrokerAuthenticationResource - * - * @summary get a BrokerAuthenticationResource - * x-ms-original-file: 2024-09-15-preview/BrokerAuthentication_Get_MaximumSet_Gen.json - */ -async function brokerAuthenticationGet() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.brokerAuthentication.get( - "rgiotoperations", - "resource-name123", - "resource-name123", - "resource-name123", - ); - console.log(result); -} - -async function main() { - brokerAuthenticationGet(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerAuthenticationListByResourceGroupSample.js b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerAuthenticationListByResourceGroupSample.js deleted file mode 100644 index 6c55c8e605a0..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerAuthenticationListByResourceGroupSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { IoTOperationsClient } = require("@azure/arm-iotoperations"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to list BrokerAuthenticationResource resources by BrokerResource - * - * @summary list BrokerAuthenticationResource resources by BrokerResource - * x-ms-original-file: 2024-09-15-preview/BrokerAuthentication_ListByResourceGroup_MaximumSet_Gen.json - */ -async function brokerAuthenticationListByResourceGroup() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.brokerAuthentication.listByResourceGroup( - "rgiotoperations", - "resource-name123", - "resource-name123", - )) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main() { - brokerAuthenticationListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerAuthorizationCreateOrUpdateSample.js b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerAuthorizationCreateOrUpdateSample.js deleted file mode 100644 index 34ad11ce7bd5..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerAuthorizationCreateOrUpdateSample.js +++ /dev/null @@ -1,177 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { IoTOperationsClient } = require("@azure/arm-iotoperations"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to create a BrokerAuthorizationResource - * - * @summary create a BrokerAuthorizationResource - * x-ms-original-file: 2024-09-15-preview/BrokerAuthorization_CreateOrUpdate_Complex.json - */ -async function brokerAuthorizationCreateOrUpdateComplex() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.brokerAuthorization.createOrUpdate( - "rgiotoperations", - "resource-name123", - "resource-name123", - "resource-name123", - { - properties: { - authorizationPolicies: { - cache: "Enabled", - rules: [ - { - principals: { - usernames: ["temperature-sensor", "humidity-sensor"], - attributes: [{ building: "17", organization: "contoso" }], - }, - brokerResources: [ - { - method: "Connect", - clientIds: ["{principal.attributes.building}*"], - }, - { - method: "Publish", - topics: [ - "sensors/{principal.attributes.building}/{principal.clientId}/telemetry/*", - ], - }, - { - method: "Subscribe", - topics: ["commands/{principal.attributes.organization}"], - }, - ], - stateStoreResources: [ - { - method: "Read", - keyType: "Pattern", - keys: [ - "myreadkey", - "myotherkey?", - "mynumerickeysuffix[0-9]", - "clients:{principal.clientId}:*", - ], - }, - { - method: "ReadWrite", - keyType: "Binary", - keys: ["MTE2IDEwMSAxMTUgMTE2"], - }, - ], - }, - ], - }, - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to create a BrokerAuthorizationResource - * - * @summary create a BrokerAuthorizationResource - * x-ms-original-file: 2024-09-15-preview/BrokerAuthorization_CreateOrUpdate_MaximumSet_Gen.json - */ -async function brokerAuthorizationCreateOrUpdate() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.brokerAuthorization.createOrUpdate( - "rgiotoperations", - "resource-name123", - "resource-name123", - "resource-name123", - { - properties: { - authorizationPolicies: { - cache: "Enabled", - rules: [ - { - brokerResources: [{ method: "Connect", clientIds: ["nlc"], topics: ["wvuca"] }], - principals: { - attributes: [{ key5526: "nydhzdhbldygqcn" }], - clientIds: ["smopeaeddsygz"], - usernames: ["iozngyqndrteikszkbasinzdjtm"], - }, - stateStoreResources: [ - { - keyType: "Pattern", - keys: ["tkounsqtwvzyaklxjqoerpu"], - method: "Read", - }, - ], - }, - ], - }, - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to create a BrokerAuthorizationResource - * - * @summary create a BrokerAuthorizationResource - * x-ms-original-file: 2024-09-15-preview/BrokerAuthorization_CreateOrUpdate_Simple.json - */ -async function brokerAuthorizationCreateOrUpdateSimple() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.brokerAuthorization.createOrUpdate( - "rgiotoperations", - "resource-name123", - "resource-name123", - "resource-name123", - { - properties: { - authorizationPolicies: { - cache: "Enabled", - rules: [ - { - principals: { - clientIds: ["my-client-id"], - attributes: [{ floor: "floor1", site: "site1" }], - }, - brokerResources: [ - { method: "Connect" }, - { - method: "Subscribe", - topics: ["topic", "topic/with/wildcard/#"], - }, - ], - stateStoreResources: [{ method: "ReadWrite", keyType: "Pattern", keys: ["*"] }], - }, - ], - }, - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -async function main() { - brokerAuthorizationCreateOrUpdateComplex(); - brokerAuthorizationCreateOrUpdate(); - brokerAuthorizationCreateOrUpdateSimple(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerAuthorizationDeleteSample.js b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerAuthorizationDeleteSample.js deleted file mode 100644 index 8b7a3027a5a6..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerAuthorizationDeleteSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { IoTOperationsClient } = require("@azure/arm-iotoperations"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to delete a BrokerAuthorizationResource - * - * @summary delete a BrokerAuthorizationResource - * x-ms-original-file: 2024-09-15-preview/BrokerAuthorization_Delete_MaximumSet_Gen.json - */ -async function brokerAuthorizationDelete() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - await client.brokerAuthorization.delete( - "rgiotoperations", - "resource-name123", - "resource-name123", - "resource-name123", - ); -} - -async function main() { - brokerAuthorizationDelete(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerAuthorizationGetSample.js b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerAuthorizationGetSample.js deleted file mode 100644 index e9b1f55328fc..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerAuthorizationGetSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { IoTOperationsClient } = require("@azure/arm-iotoperations"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to get a BrokerAuthorizationResource - * - * @summary get a BrokerAuthorizationResource - * x-ms-original-file: 2024-09-15-preview/BrokerAuthorization_Get_MaximumSet_Gen.json - */ -async function brokerAuthorizationGet() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.brokerAuthorization.get( - "rgiotoperations", - "resource-name123", - "resource-name123", - "resource-name123", - ); - console.log(result); -} - -async function main() { - brokerAuthorizationGet(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerAuthorizationListByResourceGroupSample.js b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerAuthorizationListByResourceGroupSample.js deleted file mode 100644 index 54ff1c26ba2e..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerAuthorizationListByResourceGroupSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { IoTOperationsClient } = require("@azure/arm-iotoperations"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to list BrokerAuthorizationResource resources by BrokerResource - * - * @summary list BrokerAuthorizationResource resources by BrokerResource - * x-ms-original-file: 2024-09-15-preview/BrokerAuthorization_ListByResourceGroup_MaximumSet_Gen.json - */ -async function brokerAuthorizationListByResourceGroup() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.brokerAuthorization.listByResourceGroup( - "rgiotoperations", - "resource-name123", - "resource-name123", - )) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main() { - brokerAuthorizationListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerCreateOrUpdateSample.js b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerCreateOrUpdateSample.js deleted file mode 100644 index a18f18a38eba..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerCreateOrUpdateSample.js +++ /dev/null @@ -1,232 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { IoTOperationsClient } = require("@azure/arm-iotoperations"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to create a BrokerResource - * - * @summary create a BrokerResource - * x-ms-original-file: 2024-09-15-preview/Broker_CreateOrUpdate_Complex.json - */ -async function brokerCreateOrUpdateComplex() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.broker.createOrUpdate( - "rgiotoperations", - "resource-name123", - "resource-name123", - { - properties: { - cardinality: { - backendChain: { partitions: 2, redundancyFactor: 2, workers: 2 }, - frontend: { replicas: 2, workers: 2 }, - }, - diskBackedMessageBuffer: { maxSize: "50M" }, - generateResourceLimits: { cpu: "Enabled" }, - memoryProfile: "Medium", - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to create a BrokerResource - * - * @summary create a BrokerResource - * x-ms-original-file: 2024-09-15-preview/Broker_CreateOrUpdate_MaximumSet_Gen.json - */ -async function brokerCreateOrUpdate() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.broker.createOrUpdate( - "rgiotoperations", - "resource-name123", - "resource-name123", - { - properties: { - advanced: { - clients: { - maxSessionExpirySeconds: 3859, - maxMessageExpirySeconds: 3263, - maxPacketSizeBytes: 3029, - subscriberQueueLimit: { length: 6, strategy: "None" }, - maxReceiveMaximum: 2365, - maxKeepAliveSeconds: 3744, - }, - encryptInternalTraffic: "Enabled", - internalCerts: { - duration: "bchrc", - renewBefore: "xkafmpgjfifkwwrhkswtopdnne", - privateKey: { algorithm: "Ec256", rotationPolicy: "Always" }, - }, - }, - cardinality: { - backendChain: { partitions: 11, redundancyFactor: 5, workers: 15 }, - frontend: { replicas: 2, workers: 6 }, - }, - diagnostics: { - logs: { level: "rnmwokumdmebpmfxxxzvvjfdywotav" }, - metrics: { prometheusPort: 7581 }, - selfCheck: { - mode: "Enabled", - intervalSeconds: 158, - timeoutSeconds: 14, - }, - traces: { - mode: "Enabled", - cacheSizeMegabytes: 28, - selfTracing: { mode: "Enabled", intervalSeconds: 22 }, - spanChannelCapacity: 1000, - }, - }, - diskBackedMessageBuffer: { - maxSize: "500M", - ephemeralVolumeClaimSpec: { - volumeName: "c", - volumeMode: "rxvpksjuuugqnqzeiprocknbn", - storageClassName: "sseyhrjptkhrqvpdpjmornkqvon", - accessModes: ["nuluhigrbb"], - dataSource: { - apiGroup: "npqapyksvvpkohujx", - kind: "wazgyb", - name: "cwhsgxxcxsyppoefm", - }, - dataSourceRef: { - apiGroup: "mnfnykznjjsoqpfsgdqioupt", - kind: "odynqzekfzsnawrctaxg", - name: "envszivbbmixbyddzg", - namespace: "etcfzvxqd", - }, - resources: { - limits: { key2719: "hmphcrgctu" }, - requests: { key2909: "txocprnyrsgvhfrg" }, - }, - selector: { - matchExpressions: [ - { - key: "e", - operator: "In", - values: ["slmpajlywqvuyknipgztsonqyybt"], - }, - ], - matchLabels: { key6673: "wlngfalznwxnurzpgxomcxhbqefpr" }, - }, - }, - persistentVolumeClaimSpec: { - volumeName: "c", - volumeMode: "rxvpksjuuugqnqzeiprocknbn", - storageClassName: "sseyhrjptkhrqvpdpjmornkqvon", - accessModes: ["nuluhigrbb"], - dataSource: { - apiGroup: "npqapyksvvpkohujx", - kind: "wazgyb", - name: "cwhsgxxcxsyppoefm", - }, - dataSourceRef: { - apiGroup: "mnfnykznjjsoqpfsgdqioupt", - kind: "odynqzekfzsnawrctaxg", - name: "envszivbbmixbyddzg", - namespace: "etcfzvxqd", - }, - resources: { - limits: { key2719: "hmphcrgctu" }, - requests: { key2909: "txocprnyrsgvhfrg" }, - }, - selector: { - matchExpressions: [ - { - key: "e", - operator: "In", - values: ["slmpajlywqvuyknipgztsonqyybt"], - }, - ], - matchLabels: { key6673: "wlngfalznwxnurzpgxomcxhbqefpr" }, - }, - }, - }, - generateResourceLimits: { cpu: "Enabled" }, - memoryProfile: "Tiny", - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to create a BrokerResource - * - * @summary create a BrokerResource - * x-ms-original-file: 2024-09-15-preview/Broker_CreateOrUpdate_Minimal.json - */ -async function brokerCreateOrUpdateMinimal() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.broker.createOrUpdate( - "rgiotoperations", - "resource-name123", - "resource-name123", - { - properties: { memoryProfile: "Tiny" }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to create a BrokerResource - * - * @summary create a BrokerResource - * x-ms-original-file: 2024-09-15-preview/Broker_CreateOrUpdate_Simple.json - */ -async function brokerCreateOrUpdateSimple() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.broker.createOrUpdate( - "rgiotoperations", - "resource-name123", - "resource-name123", - { - properties: { - cardinality: { - backendChain: { partitions: 2, redundancyFactor: 2, workers: 2 }, - frontend: { replicas: 2, workers: 2 }, - }, - generateResourceLimits: { cpu: "Enabled" }, - memoryProfile: "Low", - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -async function main() { - brokerCreateOrUpdateComplex(); - brokerCreateOrUpdate(); - brokerCreateOrUpdateMinimal(); - brokerCreateOrUpdateSimple(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerDeleteSample.js b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerDeleteSample.js deleted file mode 100644 index be890262e422..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerDeleteSample.js +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { IoTOperationsClient } = require("@azure/arm-iotoperations"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to delete a BrokerResource - * - * @summary delete a BrokerResource - * x-ms-original-file: 2024-09-15-preview/Broker_Delete_MaximumSet_Gen.json - */ -async function brokerDelete() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - await client.broker.delete("rgiotoperations", "resource-name123", "resource-name123"); -} - -async function main() { - brokerDelete(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerGetSample.js b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerGetSample.js deleted file mode 100644 index 36b0b1cf69f7..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerGetSample.js +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { IoTOperationsClient } = require("@azure/arm-iotoperations"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to get a BrokerResource - * - * @summary get a BrokerResource - * x-ms-original-file: 2024-09-15-preview/Broker_Get_MaximumSet_Gen.json - */ -async function brokerGet() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.broker.get("rgiotoperations", "resource-name123", "resource-name123"); - console.log(result); -} - -async function main() { - brokerGet(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerListByResourceGroupSample.js b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerListByResourceGroupSample.js deleted file mode 100644 index 39e8dcb6b09c..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerListByResourceGroupSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { IoTOperationsClient } = require("@azure/arm-iotoperations"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to list BrokerResource resources by InstanceResource - * - * @summary list BrokerResource resources by InstanceResource - * x-ms-original-file: 2024-09-15-preview/Broker_ListByResourceGroup_MaximumSet_Gen.json - */ -async function brokerListByResourceGroup() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.broker.listByResourceGroup("rgiotoperations", "resource-name123")) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main() { - brokerListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerListenerCreateOrUpdateSample.js b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerListenerCreateOrUpdateSample.js deleted file mode 100644 index 4a954e4d345a..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerListenerCreateOrUpdateSample.js +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { IoTOperationsClient } = require("@azure/arm-iotoperations"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to create a BrokerListenerResource - * - * @summary create a BrokerListenerResource - * x-ms-original-file: 2024-09-15-preview/BrokerListener_CreateOrUpdate_Complex.json - */ -async function brokerListenerCreateOrUpdateComplex() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.brokerListener.createOrUpdate( - "rgiotoperations", - "resource-name123", - "resource-name123", - "resource-name123", - { - properties: { - serviceType: "LoadBalancer", - ports: [ - { - port: 8080, - authenticationRef: "example-authentication", - protocol: "WebSockets", - }, - { - port: 8443, - authenticationRef: "example-authentication", - protocol: "WebSockets", - tls: { - mode: "Automatic", - certManagerCertificateSpec: { - issuerRef: { - group: "jtmuladdkpasfpoyvewekmiy", - name: "example-issuer", - kind: "Issuer", - }, - }, - }, - }, - { port: 1883, authenticationRef: "example-authentication" }, - { - port: 8883, - authenticationRef: "example-authentication", - tls: { mode: "Manual", manual: { secretRef: "example-secret" } }, - }, - ], - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to create a BrokerListenerResource - * - * @summary create a BrokerListenerResource - * x-ms-original-file: 2024-09-15-preview/BrokerListener_CreateOrUpdate_MaximumSet_Gen.json - */ -async function brokerListenerCreateOrUpdate() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.brokerListener.createOrUpdate( - "rgiotoperations", - "resource-name123", - "resource-name123", - "resource-name123", - { - properties: { - serviceName: "tpfiszlapdpxktx", - ports: [ - { - authenticationRef: "tjvdroaqqy", - authorizationRef: "inxhvxnwswyrvt", - nodePort: 7281, - port: 1268, - protocol: "Mqtt", - tls: { - mode: "Automatic", - certManagerCertificateSpec: { - duration: "qmpeffoksron", - secretName: "oagi", - renewBefore: "hutno", - issuerRef: { - group: "jtmuladdkpasfpoyvewekmiy", - kind: "Issuer", - name: "ocwoqpgucvjrsuudtjhb", - }, - privateKey: { algorithm: "Ec256", rotationPolicy: "Always" }, - san: { - dns: ["xhvmhrrhgfsapocjeebqtnzarlj"], - ip: ["zbgugfzcgsmegevzktsnibyuyp"], - }, - }, - manual: { secretRef: "secret-name" }, - }, - }, - ], - serviceType: "ClusterIp", - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to create a BrokerListenerResource - * - * @summary create a BrokerListenerResource - * x-ms-original-file: 2024-09-15-preview/BrokerListener_CreateOrUpdate_Simple.json - */ -async function brokerListenerCreateOrUpdateSimple() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.brokerListener.createOrUpdate( - "rgiotoperations", - "resource-name123", - "resource-name123", - "resource-name123", - { - properties: { ports: [{ port: 1883 }] }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -async function main() { - brokerListenerCreateOrUpdateComplex(); - brokerListenerCreateOrUpdate(); - brokerListenerCreateOrUpdateSimple(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerListenerDeleteSample.js b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerListenerDeleteSample.js deleted file mode 100644 index f0a555f6fd12..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerListenerDeleteSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { IoTOperationsClient } = require("@azure/arm-iotoperations"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to delete a BrokerListenerResource - * - * @summary delete a BrokerListenerResource - * x-ms-original-file: 2024-09-15-preview/BrokerListener_Delete_MaximumSet_Gen.json - */ -async function brokerListenerDelete() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - await client.brokerListener.delete( - "rgiotoperations", - "resource-name123", - "resource-name123", - "resource-name123", - ); -} - -async function main() { - brokerListenerDelete(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerListenerGetSample.js b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerListenerGetSample.js deleted file mode 100644 index ec8470394016..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerListenerGetSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { IoTOperationsClient } = require("@azure/arm-iotoperations"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to get a BrokerListenerResource - * - * @summary get a BrokerListenerResource - * x-ms-original-file: 2024-09-15-preview/BrokerListener_Get_MaximumSet_Gen.json - */ -async function brokerListenerGet() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.brokerListener.get( - "rgiotoperations", - "resource-name123", - "resource-name123", - "resource-name123", - ); - console.log(result); -} - -async function main() { - brokerListenerGet(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerListenerListByResourceGroupSample.js b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerListenerListByResourceGroupSample.js deleted file mode 100644 index 7c47d69afcac..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerListenerListByResourceGroupSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { IoTOperationsClient } = require("@azure/arm-iotoperations"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to list BrokerListenerResource resources by BrokerResource - * - * @summary list BrokerListenerResource resources by BrokerResource - * x-ms-original-file: 2024-09-15-preview/BrokerListener_ListByResourceGroup_MaximumSet_Gen.json - */ -async function brokerListenerListByResourceGroup() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.brokerListener.listByResourceGroup( - "rgiotoperations", - "resource-name123", - "resource-name123", - )) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main() { - brokerListenerListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowCreateOrUpdateSample.js b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowCreateOrUpdateSample.js deleted file mode 100644 index ff45541bb6e0..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowCreateOrUpdateSample.js +++ /dev/null @@ -1,400 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { IoTOperationsClient } = require("@azure/arm-iotoperations"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to create a DataflowResource - * - * @summary create a DataflowResource - * x-ms-original-file: 2024-09-15-preview/Dataflow_CreateOrUpdate_ComplexContextualization.json - */ -async function dataflowCreateOrUpdateComplexContextualization() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.dataflow.createOrUpdate( - "rgiotoperations", - "resource-name123", - "resource-name123", - "aio-to-adx-contexualized", - { - properties: { - mode: "Enabled", - operations: [ - { - operationType: "Source", - name: "source1", - sourceSettings: { - endpointRef: "aio-builtin-broker-endpoint", - dataSources: ["azure-iot-operations/data/thermostat"], - }, - }, - { - operationType: "BuiltInTransformation", - name: "transformation1", - builtInTransformationSettings: { - map: [ - { inputs: ["*"], output: "*" }, - { inputs: ["$context(quality).*"], output: "enriched.*" }, - ], - datasets: [ - { - key: "quality", - inputs: ["$source.country", "$context.country"], - expression: "$1 == $2", - }, - ], - }, - }, - { - operationType: "Destination", - name: "destination1", - destinationSettings: { - endpointRef: "adx-endpoint", - dataDestination: "mytable", - }, - }, - ], - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to create a DataflowResource - * - * @summary create a DataflowResource - * x-ms-original-file: 2024-09-15-preview/Dataflow_CreateOrUpdate_ComplexEventHub.json - */ -async function dataflowCreateOrUpdateComplexEventHub() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.dataflow.createOrUpdate( - "rgiotoperations", - "resource-name123", - "resource-name123", - "aio-to-event-hub-transformed", - { - properties: { - mode: "Enabled", - operations: [ - { - operationType: "Source", - name: "source1", - sourceSettings: { - endpointRef: "aio-builtin-broker-endpoint", - dataSources: ["azure-iot-operations/data/thermostat"], - }, - }, - { - operationType: "BuiltInTransformation", - builtInTransformationSettings: { - filter: [ - { - inputs: ["temperature.Value", '"Tag 10".Value'], - expression: "$1 > 9000 && $2 >= 8000", - }, - ], - map: [ - { inputs: ["*"], output: "*" }, - { - inputs: ["temperature.Value", '"Tag 10".Value'], - expression: "($1+$2)/2", - output: "AvgTemp.Value", - }, - { - inputs: [], - expression: "true", - output: "dataflow-processed", - }, - { - inputs: ["temperature.SourceTimestamp"], - expression: "", - output: "", - }, - { inputs: ['"Tag 10"'], expression: "", output: "pressure" }, - { - inputs: ["temperature.Value"], - expression: "cToF($1)", - output: "temperatureF.Value", - }, - { - inputs: ['"Tag 10".Value'], - expression: "scale ($1,0,10,0,100)", - output: '"Scale Tag 10".Value', - }, - ], - }, - }, - { - operationType: "Destination", - name: "destination1", - destinationSettings: { - endpointRef: "event-hub-endpoint", - dataDestination: "myuniqueeventhub", - }, - }, - ], - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to create a DataflowResource - * - * @summary create a DataflowResource - * x-ms-original-file: 2024-09-15-preview/Dataflow_CreateOrUpdate_FilterToTopic.json - */ -async function dataflowCreateOrUpdateFilterToTopic() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.dataflow.createOrUpdate( - "rgiotoperations", - "resource-name123", - "resource-name123", - "mqtt-filter-to-topic", - { - properties: { - mode: "Enabled", - operations: [ - { - operationType: "Source", - name: "source1", - sourceSettings: { - endpointRef: "aio-builtin-broker-endpoint", - dataSources: ["azure-iot-operations/data/thermostat"], - }, - }, - { - operationType: "BuiltInTransformation", - name: "transformation1", - builtInTransformationSettings: { - filter: [ - { - type: "Filter", - description: "filter-datapoint", - inputs: ["temperature.Value", '"Tag 10".Value'], - expression: "$1 > 9000 && $2 >= 8000", - }, - ], - map: [{ type: "PassThrough", inputs: ["*"], output: "*" }], - }, - }, - { - operationType: "Destination", - name: "destination1", - destinationSettings: { - endpointRef: "aio-builtin-broker-endpoint", - dataDestination: "data/filtered/thermostat", - }, - }, - ], - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to create a DataflowResource - * - * @summary create a DataflowResource - * x-ms-original-file: 2024-09-15-preview/Dataflow_CreateOrUpdate_MaximumSet_Gen.json - */ -async function dataflowCreateOrUpdate() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.dataflow.createOrUpdate( - "rgiotoperations", - "resource-name123", - "resource-name123", - "resource-name123", - { - properties: { - mode: "Enabled", - operations: [ - { - operationType: "Source", - name: "knnafvkwoeakm", - sourceSettings: { - endpointRef: "iixotodhvhkkfcfyrkoveslqig", - assetRef: "zayyykwmckaocywdkohmu", - serializationFormat: "Json", - schemaRef: "pknmdzqll", - dataSources: ["chkkpymxhp"], - }, - builtInTransformationSettings: { - serializationFormat: "Delta", - schemaRef: "mcdc", - datasets: [ - { - key: "qsfqcgxaxnhfumrsdsokwyv", - description: "Lorem ipsum odor amet, consectetuer adipiscing elit.", - schemaRef: "n", - inputs: ["mosffpsslifkq"], - expression: "aatbwomvflemsxialv", - }, - ], - filter: [ - { - type: "Filter", - description: "Lorem ipsum odor amet, consectetuer adipiscing elit.", - inputs: ["sxmjkbntgb"], - expression: "n", - }, - ], - map: [ - { - type: "NewProperties", - description: "Lorem ipsum odor amet, consectetuer adipiscing elit.", - inputs: ["xsbxuk"], - expression: "txoiltogsarwkzalsphvlmt", - output: "nvgtmkfl", - }, - ], - }, - destinationSettings: { - endpointRef: "kybkchnzimerguekuvqlqiqdvvrt", - dataDestination: "cbrh", - }, - }, - ], - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to create a DataflowResource - * - * @summary create a DataflowResource - * x-ms-original-file: 2024-09-15-preview/Dataflow_CreateOrUpdate_SimpleEventGrid.json - */ -async function dataflowCreateOrUpdateSimpleEventGrid() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.dataflow.createOrUpdate( - "rgiotoperations", - "resource-name123", - "resource-name123", - "aio-to-event-grid", - { - properties: { - mode: "Enabled", - operations: [ - { - operationType: "Source", - name: "source1", - sourceSettings: { - endpointRef: "aio-builtin-broker-endpoint", - dataSources: ["thermostats/+/telemetry/temperature/#"], - }, - }, - { - operationType: "Destination", - name: "destination1", - destinationSettings: { - endpointRef: "event-grid-endpoint", - dataDestination: "factory/telemetry", - }, - }, - ], - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to create a DataflowResource - * - * @summary create a DataflowResource - * x-ms-original-file: 2024-09-15-preview/Dataflow_CreateOrUpdate_SimpleFabric.json - */ -async function dataflowCreateOrUpdateSimpleFabric() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.dataflow.createOrUpdate( - "rgiotoperations", - "resource-name123", - "resource-name123", - "aio-to-fabric", - { - properties: { - mode: "Enabled", - operations: [ - { - operationType: "Source", - name: "source1", - sourceSettings: { - endpointRef: "aio-builtin-broker-endpoint", - dataSources: ["azure-iot-operations/data/thermostat"], - }, - }, - { - operationType: "BuiltInTransformation", - builtInTransformationSettings: { - serializationFormat: "Parquet", - schemaRef: "aio-sr://exampleNamespace/exmapleParquetSchema:1.0.0", - }, - }, - { - operationType: "Destination", - name: "destination1", - destinationSettings: { - endpointRef: "fabric-endpoint", - dataDestination: "telemetryTable", - }, - }, - ], - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -async function main() { - dataflowCreateOrUpdateComplexContextualization(); - dataflowCreateOrUpdateComplexEventHub(); - dataflowCreateOrUpdateFilterToTopic(); - dataflowCreateOrUpdate(); - dataflowCreateOrUpdateSimpleEventGrid(); - dataflowCreateOrUpdateSimpleFabric(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowDeleteSample.js b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowDeleteSample.js deleted file mode 100644 index e9663d02fb77..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowDeleteSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { IoTOperationsClient } = require("@azure/arm-iotoperations"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to delete a DataflowResource - * - * @summary delete a DataflowResource - * x-ms-original-file: 2024-09-15-preview/Dataflow_Delete_MaximumSet_Gen.json - */ -async function dataflowDelete() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - await client.dataflow.delete( - "rgiotoperations", - "resource-name123", - "resource-name123", - "resource-name123", - ); -} - -async function main() { - dataflowDelete(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowEndpointCreateOrUpdateSample.js b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowEndpointCreateOrUpdateSample.js deleted file mode 100644 index c10e481b1229..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowEndpointCreateOrUpdateSample.js +++ /dev/null @@ -1,496 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { IoTOperationsClient } = require("@azure/arm-iotoperations"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to create a DataflowEndpointResource - * - * @summary create a DataflowEndpointResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_CreateOrUpdate_ADLSv2.json - */ -async function dataflowEndpointCreateOrUpdateADLSv2() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.dataflowEndpoint.createOrUpdate( - "rgiotoperations", - "resource-name123", - "adlsv2-endpoint", - { - properties: { - endpointType: "DataLakeStorage", - dataLakeStorageSettings: { - host: "example.blob.core.windows.net", - authentication: { - method: "AccessToken", - accessTokenSettings: { secretRef: "my-secret" }, - }, - }, - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to create a DataflowEndpointResource - * - * @summary create a DataflowEndpointResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_CreateOrUpdate_ADX.json - */ -async function dataflowEndpointCreateOrUpdateAdx() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.dataflowEndpoint.createOrUpdate( - "rgiotoperations", - "resource-name123", - "adx-endpoint", - { - properties: { - endpointType: "DataExplorer", - dataExplorerSettings: { - host: "example.westeurope.kusto.windows.net", - authentication: { - method: "SystemAssignedManagedIdentity", - systemAssignedManagedIdentitySettings: {}, - }, - database: "example-database", - batching: { latencySeconds: 9312, maxMessages: 9028 }, - }, - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to create a DataflowEndpointResource - * - * @summary create a DataflowEndpointResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_CreateOrUpdate_AIO.json - */ -async function dataflowEndpointCreateOrUpdateAio() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.dataflowEndpoint.createOrUpdate( - "rgiotoperations", - "resource-name123", - "aio-builtin-broker-endpoint", - { - properties: { - endpointType: "Mqtt", - mqttSettings: { - host: "aio-broker:18883", - authentication: { - method: "Kubernetes", - serviceAccountTokenSettings: { audience: "aio-internal" }, - }, - tls: { - mode: "Enabled", - trustedCaCertificateConfigMapRef: "aio-ca-trust-bundle-test-only", - }, - }, - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to create a DataflowEndpointResource - * - * @summary create a DataflowEndpointResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_CreateOrUpdate_EventGrid.json - */ -async function dataflowEndpointCreateOrUpdateEventGrid() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.dataflowEndpoint.createOrUpdate( - "rgiotoperations", - "resource-name123", - "event-grid-endpoint", - { - properties: { - endpointType: "Mqtt", - mqttSettings: { - host: "example.westeurope-1.ts.eventgrid.azure.net:8883", - authentication: { - method: "SystemAssignedManagedIdentity", - systemAssignedManagedIdentitySettings: {}, - }, - tls: { mode: "Enabled" }, - }, - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to create a DataflowEndpointResource - * - * @summary create a DataflowEndpointResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_CreateOrUpdate_EventHub.json - */ -async function dataflowEndpointCreateOrUpdateEventHub() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.dataflowEndpoint.createOrUpdate( - "rgiotoperations", - "resource-name123", - "event-hub-endpoint", - { - properties: { - endpointType: "Kafka", - kafkaSettings: { - host: "example.servicebus.windows.net:9093", - authentication: { - method: "SystemAssignedManagedIdentity", - systemAssignedManagedIdentitySettings: {}, - }, - tls: { mode: "Enabled" }, - consumerGroupId: "aiodataflows", - }, - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to create a DataflowEndpointResource - * - * @summary create a DataflowEndpointResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_CreateOrUpdate_Fabric.json - */ -async function dataflowEndpointCreateOrUpdateFabric() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.dataflowEndpoint.createOrUpdate( - "rgiotoperations", - "resource-name123", - "fabric-endpoint", - { - properties: { - endpointType: "FabricOneLake", - fabricOneLakeSettings: { - host: "onelake.dfs.fabric.microsoft.com", - authentication: { - method: "SystemAssignedManagedIdentity", - systemAssignedManagedIdentitySettings: {}, - }, - names: { - workspaceName: "example-workspace", - lakehouseName: "example-lakehouse", - }, - oneLakePathType: "Tables", - }, - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to create a DataflowEndpointResource - * - * @summary create a DataflowEndpointResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_CreateOrUpdate_Kafka.json - */ -async function dataflowEndpointCreateOrUpdateKafka() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.dataflowEndpoint.createOrUpdate( - "rgiotoperations", - "resource-name123", - "generic-kafka-endpoint", - { - properties: { - endpointType: "Kafka", - kafkaSettings: { - host: "example.kafka.local:9093", - authentication: { - method: "Sasl", - saslSettings: { saslType: "Plain", secretRef: "my-secret" }, - }, - tls: { - mode: "Enabled", - trustedCaCertificateConfigMapRef: "ca-certificates", - }, - consumerGroupId: "dataflows", - compression: "Gzip", - batching: { - mode: "Enabled", - latencyMs: 5, - maxBytes: 1000000, - maxMessages: 100000, - }, - partitionStrategy: "Default", - kafkaAcks: "All", - copyMqttProperties: "Enabled", - cloudEventAttributes: "Propagate", - }, - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to create a DataflowEndpointResource - * - * @summary create a DataflowEndpointResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_CreateOrUpdate_LocalStorage.json - */ -async function dataflowEndpointCreateOrUpdateLocalStorage() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.dataflowEndpoint.createOrUpdate( - "rgiotoperations", - "resource-name123", - "local-storage-endpoint", - { - properties: { - endpointType: "LocalStorage", - localStorageSettings: { persistentVolumeClaimRef: "example-pvc" }, - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to create a DataflowEndpointResource - * - * @summary create a DataflowEndpointResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_CreateOrUpdate_MaximumSet_Gen.json - */ -async function dataflowEndpointCreateOrUpdate() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.dataflowEndpoint.createOrUpdate( - "rgiotoperations", - "resource-name123", - "resource-name123", - { - properties: { - endpointType: "DataExplorer", - dataExplorerSettings: { - authentication: { - method: "SystemAssignedManagedIdentity", - systemAssignedManagedIdentitySettings: { - audience: "psxomrfbhoflycm", - }, - userAssignedManagedIdentitySettings: { - clientId: "fb90f267-8872-431a-a76a-a1cec5d3c4d2", - scope: "zop", - tenantId: "ed060aa2-71ff-4d3f-99c4-a9138356fdec", - }, - }, - database: "yqcdpjsifm", - host: "..kusto.windows.net", - batching: { latencySeconds: 9312, maxMessages: 9028 }, - }, - dataLakeStorageSettings: { - authentication: { - method: "SystemAssignedManagedIdentity", - accessTokenSettings: { secretRef: "sevriyphcvnlrnfudqzejecwa" }, - systemAssignedManagedIdentitySettings: { - audience: "psxomrfbhoflycm", - }, - userAssignedManagedIdentitySettings: { - clientId: "fb90f267-8872-431a-a76a-a1cec5d3c4d2", - scope: "zop", - tenantId: "ed060aa2-71ff-4d3f-99c4-a9138356fdec", - }, - }, - host: ".blob.core.windows.net", - batching: { latencySeconds: 9312, maxMessages: 9028 }, - }, - fabricOneLakeSettings: { - authentication: { - method: "SystemAssignedManagedIdentity", - systemAssignedManagedIdentitySettings: { - audience: "psxomrfbhoflycm", - }, - userAssignedManagedIdentitySettings: { - clientId: "fb90f267-8872-431a-a76a-a1cec5d3c4d2", - scope: "zop", - tenantId: "ed060aa2-71ff-4d3f-99c4-a9138356fdec", - }, - }, - names: { lakehouseName: "wpeathi", workspaceName: "nwgmitkbljztgms" }, - oneLakePathType: "Files", - host: "https://.fabric.microsoft.com", - batching: { latencySeconds: 9312, maxMessages: 9028 }, - }, - kafkaSettings: { - authentication: { - method: "SystemAssignedManagedIdentity", - systemAssignedManagedIdentitySettings: { - audience: "psxomrfbhoflycm", - }, - userAssignedManagedIdentitySettings: { - clientId: "fb90f267-8872-431a-a76a-a1cec5d3c4d2", - scope: "zop", - tenantId: "ed060aa2-71ff-4d3f-99c4-a9138356fdec", - }, - saslSettings: { - saslType: "Plain", - secretRef: "visyxoztqnylvbyokhtmpdkwes", - }, - x509CertificateSettings: { secretRef: "afwizrystfslkfqd" }, - }, - consumerGroupId: "ukkzcjiyenhxokat", - host: "pwcqfiqclcgneolpewnyavoulbip", - batching: { - mode: "Enabled", - latencyMs: 3679, - maxBytes: 8887, - maxMessages: 2174, - }, - copyMqttProperties: "Enabled", - compression: "None", - kafkaAcks: "Zero", - partitionStrategy: "Default", - tls: { - mode: "Enabled", - trustedCaCertificateConfigMapRef: "tectjjvukvelsreihwadh", - }, - }, - localStorageSettings: { persistentVolumeClaimRef: "jjwqwvd" }, - mqttSettings: { - authentication: { - method: "SystemAssignedManagedIdentity", - systemAssignedManagedIdentitySettings: { - audience: "psxomrfbhoflycm", - }, - userAssignedManagedIdentitySettings: { - clientId: "fb90f267-8872-431a-a76a-a1cec5d3c4d2", - scope: "zop", - tenantId: "ed060aa2-71ff-4d3f-99c4-a9138356fdec", - }, - serviceAccountTokenSettings: { audience: "ejbklrbxgjaqleoycgpje" }, - x509CertificateSettings: { secretRef: "afwizrystfslkfqd" }, - }, - clientIdPrefix: "kkljsdxdirfhwxtkavldekeqhv", - host: "nyhnxqnbspstctl", - protocol: "Mqtt", - keepAliveSeconds: 0, - retain: "Keep", - maxInflightMessages: 0, - qos: 1, - sessionExpirySeconds: 0, - tls: { - mode: "Enabled", - trustedCaCertificateConfigMapRef: "tectjjvukvelsreihwadh", - }, - }, - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to create a DataflowEndpointResource - * - * @summary create a DataflowEndpointResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_CreateOrUpdate_MQTT.json - */ -async function dataflowEndpointCreateOrUpdateMqtt() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.dataflowEndpoint.createOrUpdate( - "rgiotoperations", - "resource-name123", - "generic-mqtt-broker-endpoint", - { - properties: { - endpointType: "Mqtt", - mqttSettings: { - host: "example.broker.local:1883", - authentication: { - method: "X509Certificate", - x509CertificateSettings: { secretRef: "example-secret" }, - }, - tls: { mode: "Disabled" }, - clientIdPrefix: "factory-gateway", - retain: "Keep", - sessionExpirySeconds: 3600, - qos: 1, - protocol: "WebSockets", - maxInflightMessages: 100, - keepAliveSeconds: 60, - }, - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -async function main() { - dataflowEndpointCreateOrUpdateADLSv2(); - dataflowEndpointCreateOrUpdateAdx(); - dataflowEndpointCreateOrUpdateAio(); - dataflowEndpointCreateOrUpdateEventGrid(); - dataflowEndpointCreateOrUpdateEventHub(); - dataflowEndpointCreateOrUpdateFabric(); - dataflowEndpointCreateOrUpdateKafka(); - dataflowEndpointCreateOrUpdateLocalStorage(); - dataflowEndpointCreateOrUpdate(); - dataflowEndpointCreateOrUpdateMqtt(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowEndpointDeleteSample.js b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowEndpointDeleteSample.js deleted file mode 100644 index 944134ca91a5..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowEndpointDeleteSample.js +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { IoTOperationsClient } = require("@azure/arm-iotoperations"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to delete a DataflowEndpointResource - * - * @summary delete a DataflowEndpointResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_Delete_MaximumSet_Gen.json - */ -async function dataflowEndpointDelete() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - await client.dataflowEndpoint.delete("rgiotoperations", "resource-name123", "resource-name123"); -} - -async function main() { - dataflowEndpointDelete(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowEndpointGetSample.js b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowEndpointGetSample.js deleted file mode 100644 index 924a49147874..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowEndpointGetSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { IoTOperationsClient } = require("@azure/arm-iotoperations"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to get a DataflowEndpointResource - * - * @summary get a DataflowEndpointResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_Get_MaximumSet_Gen.json - */ -async function dataflowEndpointGet() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.dataflowEndpoint.get( - "rgiotoperations", - "resource-name123", - "resource-name123", - ); - console.log(result); -} - -async function main() { - dataflowEndpointGet(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowEndpointListByResourceGroupSample.js b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowEndpointListByResourceGroupSample.js deleted file mode 100644 index 6b9bf7b529dd..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowEndpointListByResourceGroupSample.js +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { IoTOperationsClient } = require("@azure/arm-iotoperations"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to list DataflowEndpointResource resources by InstanceResource - * - * @summary list DataflowEndpointResource resources by InstanceResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_ListByResourceGroup_MaximumSet_Gen.json - */ -async function dataflowEndpointListByResourceGroup() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.dataflowEndpoint.listByResourceGroup( - "rgiotoperations", - "resource-name123", - )) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main() { - dataflowEndpointListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowGetSample.js b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowGetSample.js deleted file mode 100644 index d500c418a469..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowGetSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { IoTOperationsClient } = require("@azure/arm-iotoperations"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to get a DataflowResource - * - * @summary get a DataflowResource - * x-ms-original-file: 2024-09-15-preview/Dataflow_Get_MaximumSet_Gen.json - */ -async function dataflowGet() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.dataflow.get( - "rgiotoperations", - "resource-name123", - "resource-name123", - "resource-name123", - ); - console.log(result); -} - -async function main() { - dataflowGet(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowListByResourceGroupSample.js b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowListByResourceGroupSample.js deleted file mode 100644 index 9bda1a8f3ad8..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowListByResourceGroupSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { IoTOperationsClient } = require("@azure/arm-iotoperations"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to list DataflowResource resources by DataflowProfileResource - * - * @summary list DataflowResource resources by DataflowProfileResource - * x-ms-original-file: 2024-09-15-preview/Dataflow_ListByProfileResource_MaximumSet_Gen.json - */ -async function dataflowListByProfileResource() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.dataflow.listByResourceGroup( - "rgiotoperations", - "resource-name123", - "resource-name123", - )) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main() { - dataflowListByProfileResource(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowProfileCreateOrUpdateSample.js b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowProfileCreateOrUpdateSample.js deleted file mode 100644 index 26223d4884c9..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowProfileCreateOrUpdateSample.js +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { IoTOperationsClient } = require("@azure/arm-iotoperations"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to create a DataflowProfileResource - * - * @summary create a DataflowProfileResource - * x-ms-original-file: 2024-09-15-preview/DataflowProfile_CreateOrUpdate_MaximumSet_Gen.json - */ -async function dataflowProfileCreateOrUpdate() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.dataflowProfile.createOrUpdate( - "rgiotoperations", - "resource-name123", - "resource-name123", - { - properties: { - diagnostics: { - logs: { level: "rnmwokumdmebpmfxxxzvvjfdywotav" }, - metrics: { prometheusPort: 7581 }, - }, - instanceCount: 14, - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to create a DataflowProfileResource - * - * @summary create a DataflowProfileResource - * x-ms-original-file: 2024-09-15-preview/DataflowProfile_CreateOrUpdate_Minimal.json - */ -async function dataflowProfileCreateOrUpdateMinimal() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.dataflowProfile.createOrUpdate( - "rgiotoperations", - "resource-name123", - "aio-dataflowprofile", - { - properties: { instanceCount: 1 }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to create a DataflowProfileResource - * - * @summary create a DataflowProfileResource - * x-ms-original-file: 2024-09-15-preview/DataflowProfile_CreateOrUpdate_Multi.json - */ -async function dataflowProfileCreateOrUpdateMulti() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.dataflowProfile.createOrUpdate( - "rgiotoperations", - "resource-name123", - "aio-dataflowprofile", - { - properties: { instanceCount: 3 }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -async function main() { - dataflowProfileCreateOrUpdate(); - dataflowProfileCreateOrUpdateMinimal(); - dataflowProfileCreateOrUpdateMulti(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowProfileDeleteSample.js b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowProfileDeleteSample.js deleted file mode 100644 index f047f97ca2c8..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowProfileDeleteSample.js +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { IoTOperationsClient } = require("@azure/arm-iotoperations"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to delete a DataflowProfileResource - * - * @summary delete a DataflowProfileResource - * x-ms-original-file: 2024-09-15-preview/DataflowProfile_Delete_MaximumSet_Gen.json - */ -async function dataflowProfileDelete() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - await client.dataflowProfile.delete("rgiotoperations", "resource-name123", "resource-name123"); -} - -async function main() { - dataflowProfileDelete(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowProfileGetSample.js b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowProfileGetSample.js deleted file mode 100644 index 07a39324ba26..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowProfileGetSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { IoTOperationsClient } = require("@azure/arm-iotoperations"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to get a DataflowProfileResource - * - * @summary get a DataflowProfileResource - * x-ms-original-file: 2024-09-15-preview/DataflowProfile_Get_MaximumSet_Gen.json - */ -async function dataflowProfileGet() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.dataflowProfile.get( - "rgiotoperations", - "resource-name123", - "resource-name123", - ); - console.log(result); -} - -async function main() { - dataflowProfileGet(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowProfileListByResourceGroupSample.js b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowProfileListByResourceGroupSample.js deleted file mode 100644 index 1090f69da6ac..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowProfileListByResourceGroupSample.js +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { IoTOperationsClient } = require("@azure/arm-iotoperations"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to list DataflowProfileResource resources by InstanceResource - * - * @summary list DataflowProfileResource resources by InstanceResource - * x-ms-original-file: 2024-09-15-preview/DataflowProfile_ListByResourceGroup_MaximumSet_Gen.json - */ -async function dataflowProfileListByResourceGroup() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.dataflowProfile.listByResourceGroup( - "rgiotoperations", - "resource-name123", - )) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main() { - dataflowProfileListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/instanceCreateOrUpdateSample.js b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/instanceCreateOrUpdateSample.js deleted file mode 100644 index b3207b17c463..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/instanceCreateOrUpdateSample.js +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { IoTOperationsClient } = require("@azure/arm-iotoperations"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to create a InstanceResource - * - * @summary create a InstanceResource - * x-ms-original-file: 2024-09-15-preview/Instance_CreateOrUpdate_MaximumSet_Gen.json - */ -async function instanceCreateOrUpdate() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.instance.createOrUpdate("rgiotoperations", "aio-instance", { - properties: { - schemaRegistryRef: { - resourceId: - "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.DeviceRegistry/schemaRegistries/resource-name123", - }, - description: "kpqtgocs", - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - identity: { type: "None", userAssignedIdentities: {} }, - tags: {}, - location: "xvewadyhycrjpu", - }); - console.log(result); -} - -async function main() { - instanceCreateOrUpdate(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/instanceDeleteSample.js b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/instanceDeleteSample.js deleted file mode 100644 index e7046a167f39..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/instanceDeleteSample.js +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { IoTOperationsClient } = require("@azure/arm-iotoperations"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to delete a InstanceResource - * - * @summary delete a InstanceResource - * x-ms-original-file: 2024-09-15-preview/Instance_Delete_MaximumSet_Gen.json - */ -async function instanceDelete() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - await client.instance.delete("rgiotoperations", "aio-instance"); -} - -async function main() { - instanceDelete(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/instanceGetSample.js b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/instanceGetSample.js deleted file mode 100644 index 3ccd7824916f..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/instanceGetSample.js +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { IoTOperationsClient } = require("@azure/arm-iotoperations"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to get a InstanceResource - * - * @summary get a InstanceResource - * x-ms-original-file: 2024-09-15-preview/Instance_Get_MaximumSet_Gen.json - */ -async function instanceGet() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.instance.get("rgiotoperations", "aio-instance"); - console.log(result); -} - -async function main() { - instanceGet(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/instanceListByResourceGroupSample.js b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/instanceListByResourceGroupSample.js deleted file mode 100644 index 469640261009..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/instanceListByResourceGroupSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { IoTOperationsClient } = require("@azure/arm-iotoperations"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to list InstanceResource resources by resource group - * - * @summary list InstanceResource resources by resource group - * x-ms-original-file: 2024-09-15-preview/Instance_ListByResourceGroup_MaximumSet_Gen.json - */ -async function instanceListByResourceGroup() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.instance.listByResourceGroup("rgiotoperations")) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main() { - instanceListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/instanceListBySubscriptionSample.js b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/instanceListBySubscriptionSample.js deleted file mode 100644 index 788535f4044c..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/instanceListBySubscriptionSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { IoTOperationsClient } = require("@azure/arm-iotoperations"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to list InstanceResource resources by subscription ID - * - * @summary list InstanceResource resources by subscription ID - * x-ms-original-file: 2024-09-15-preview/Instance_ListBySubscription_MaximumSet_Gen.json - */ -async function instanceListBySubscription() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.instance.listBySubscription()) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main() { - instanceListBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/instanceUpdateSample.js b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/instanceUpdateSample.js deleted file mode 100644 index a82761fa5fa1..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/instanceUpdateSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { IoTOperationsClient } = require("@azure/arm-iotoperations"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to update a InstanceResource - * - * @summary update a InstanceResource - * x-ms-original-file: 2024-09-15-preview/Instance_Update_MaximumSet_Gen.json - */ -async function instanceUpdate() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.instance.update("rgiotoperations", "aio-instance", { - tags: {}, - identity: { type: "None", userAssignedIdentities: {} }, - }); - console.log(result); -} - -async function main() { - instanceUpdate(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/operationsListSample.js b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/operationsListSample.js deleted file mode 100644 index ce4e28a85081..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/operationsListSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { IoTOperationsClient } = require("@azure/arm-iotoperations"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to list the operations for the provider - * - * @summary list the operations for the provider - * x-ms-original-file: 2024-09-15-preview/Operations_List_MaximumSet_Gen.json - */ -async function operationsList() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-00000000000"; - const client = new IoTOperationsClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.operations.list()) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main() { - operationsList(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/package.json b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/package.json deleted file mode 100644 index 037022f76378..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/package.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "@azure-samples/arm-iotoperations-js-beta", - "private": true, - "version": "1.0.0", - "description": "@azure/arm-iotoperations client library samples for JavaScript (Beta)", - "engines": { - "node": ">=18.0.0" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/Azure/azure-sdk-for-js.git", - "directory": "sdk/iotoperations/arm-iotoperations" - }, - "keywords": [ - "node", - "azure", - "cloud", - "typescript", - "browser", - "isomorphic" - ], - "author": "Microsoft Corporation", - "license": "MIT", - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/iotoperations/arm-iotoperations", - "dependencies": { - "@azure/arm-iotoperations": "next", - "dotenv": "latest", - "@azure/identity": "^4.2.1" - } -} diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/sample.env b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/sample.env deleted file mode 100644 index 508439fc7d62..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/sample.env +++ /dev/null @@ -1 +0,0 @@ -# Feel free to add your own environment variables. \ No newline at end of file diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/README.md b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/README.md deleted file mode 100644 index 3aa91d477fd5..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/README.md +++ /dev/null @@ -1,131 +0,0 @@ -# @azure/arm-iotoperations client library samples for TypeScript (Beta) - -These sample programs show how to use the TypeScript client libraries for @azure/arm-iotoperations in some common scenarios. - -| **File Name** | **Description** | -| ------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [brokerAuthenticationCreateOrUpdateSample.ts][brokerauthenticationcreateorupdatesample] | create a BrokerAuthenticationResource x-ms-original-file: 2024-09-15-preview/BrokerAuthentication_CreateOrUpdate_Complex.json | -| [brokerAuthenticationDeleteSample.ts][brokerauthenticationdeletesample] | delete a BrokerAuthenticationResource x-ms-original-file: 2024-09-15-preview/BrokerAuthentication_Delete_MaximumSet_Gen.json | -| [brokerAuthenticationGetSample.ts][brokerauthenticationgetsample] | get a BrokerAuthenticationResource x-ms-original-file: 2024-09-15-preview/BrokerAuthentication_Get_MaximumSet_Gen.json | -| [brokerAuthenticationListByResourceGroupSample.ts][brokerauthenticationlistbyresourcegroupsample] | list BrokerAuthenticationResource resources by BrokerResource x-ms-original-file: 2024-09-15-preview/BrokerAuthentication_ListByResourceGroup_MaximumSet_Gen.json | -| [brokerAuthorizationCreateOrUpdateSample.ts][brokerauthorizationcreateorupdatesample] | create a BrokerAuthorizationResource x-ms-original-file: 2024-09-15-preview/BrokerAuthorization_CreateOrUpdate_Complex.json | -| [brokerAuthorizationDeleteSample.ts][brokerauthorizationdeletesample] | delete a BrokerAuthorizationResource x-ms-original-file: 2024-09-15-preview/BrokerAuthorization_Delete_MaximumSet_Gen.json | -| [brokerAuthorizationGetSample.ts][brokerauthorizationgetsample] | get a BrokerAuthorizationResource x-ms-original-file: 2024-09-15-preview/BrokerAuthorization_Get_MaximumSet_Gen.json | -| [brokerAuthorizationListByResourceGroupSample.ts][brokerauthorizationlistbyresourcegroupsample] | list BrokerAuthorizationResource resources by BrokerResource x-ms-original-file: 2024-09-15-preview/BrokerAuthorization_ListByResourceGroup_MaximumSet_Gen.json | -| [brokerCreateOrUpdateSample.ts][brokercreateorupdatesample] | create a BrokerResource x-ms-original-file: 2024-09-15-preview/Broker_CreateOrUpdate_Complex.json | -| [brokerDeleteSample.ts][brokerdeletesample] | delete a BrokerResource x-ms-original-file: 2024-09-15-preview/Broker_Delete_MaximumSet_Gen.json | -| [brokerGetSample.ts][brokergetsample] | get a BrokerResource x-ms-original-file: 2024-09-15-preview/Broker_Get_MaximumSet_Gen.json | -| [brokerListByResourceGroupSample.ts][brokerlistbyresourcegroupsample] | list BrokerResource resources by InstanceResource x-ms-original-file: 2024-09-15-preview/Broker_ListByResourceGroup_MaximumSet_Gen.json | -| [brokerListenerCreateOrUpdateSample.ts][brokerlistenercreateorupdatesample] | create a BrokerListenerResource x-ms-original-file: 2024-09-15-preview/BrokerListener_CreateOrUpdate_Complex.json | -| [brokerListenerDeleteSample.ts][brokerlistenerdeletesample] | delete a BrokerListenerResource x-ms-original-file: 2024-09-15-preview/BrokerListener_Delete_MaximumSet_Gen.json | -| [brokerListenerGetSample.ts][brokerlistenergetsample] | get a BrokerListenerResource x-ms-original-file: 2024-09-15-preview/BrokerListener_Get_MaximumSet_Gen.json | -| [brokerListenerListByResourceGroupSample.ts][brokerlistenerlistbyresourcegroupsample] | list BrokerListenerResource resources by BrokerResource x-ms-original-file: 2024-09-15-preview/BrokerListener_ListByResourceGroup_MaximumSet_Gen.json | -| [dataflowCreateOrUpdateSample.ts][dataflowcreateorupdatesample] | create a DataflowResource x-ms-original-file: 2024-09-15-preview/Dataflow_CreateOrUpdate_ComplexContextualization.json | -| [dataflowDeleteSample.ts][dataflowdeletesample] | delete a DataflowResource x-ms-original-file: 2024-09-15-preview/Dataflow_Delete_MaximumSet_Gen.json | -| [dataflowEndpointCreateOrUpdateSample.ts][dataflowendpointcreateorupdatesample] | create a DataflowEndpointResource x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_CreateOrUpdate_ADLSv2.json | -| [dataflowEndpointDeleteSample.ts][dataflowendpointdeletesample] | delete a DataflowEndpointResource x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_Delete_MaximumSet_Gen.json | -| [dataflowEndpointGetSample.ts][dataflowendpointgetsample] | get a DataflowEndpointResource x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_Get_MaximumSet_Gen.json | -| [dataflowEndpointListByResourceGroupSample.ts][dataflowendpointlistbyresourcegroupsample] | list DataflowEndpointResource resources by InstanceResource x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_ListByResourceGroup_MaximumSet_Gen.json | -| [dataflowGetSample.ts][dataflowgetsample] | get a DataflowResource x-ms-original-file: 2024-09-15-preview/Dataflow_Get_MaximumSet_Gen.json | -| [dataflowListByResourceGroupSample.ts][dataflowlistbyresourcegroupsample] | list DataflowResource resources by DataflowProfileResource x-ms-original-file: 2024-09-15-preview/Dataflow_ListByProfileResource_MaximumSet_Gen.json | -| [dataflowProfileCreateOrUpdateSample.ts][dataflowprofilecreateorupdatesample] | create a DataflowProfileResource x-ms-original-file: 2024-09-15-preview/DataflowProfile_CreateOrUpdate_MaximumSet_Gen.json | -| [dataflowProfileDeleteSample.ts][dataflowprofiledeletesample] | delete a DataflowProfileResource x-ms-original-file: 2024-09-15-preview/DataflowProfile_Delete_MaximumSet_Gen.json | -| [dataflowProfileGetSample.ts][dataflowprofilegetsample] | get a DataflowProfileResource x-ms-original-file: 2024-09-15-preview/DataflowProfile_Get_MaximumSet_Gen.json | -| [dataflowProfileListByResourceGroupSample.ts][dataflowprofilelistbyresourcegroupsample] | list DataflowProfileResource resources by InstanceResource x-ms-original-file: 2024-09-15-preview/DataflowProfile_ListByResourceGroup_MaximumSet_Gen.json | -| [instanceCreateOrUpdateSample.ts][instancecreateorupdatesample] | create a InstanceResource x-ms-original-file: 2024-09-15-preview/Instance_CreateOrUpdate_MaximumSet_Gen.json | -| [instanceDeleteSample.ts][instancedeletesample] | delete a InstanceResource x-ms-original-file: 2024-09-15-preview/Instance_Delete_MaximumSet_Gen.json | -| [instanceGetSample.ts][instancegetsample] | get a InstanceResource x-ms-original-file: 2024-09-15-preview/Instance_Get_MaximumSet_Gen.json | -| [instanceListByResourceGroupSample.ts][instancelistbyresourcegroupsample] | list InstanceResource resources by resource group x-ms-original-file: 2024-09-15-preview/Instance_ListByResourceGroup_MaximumSet_Gen.json | -| [instanceListBySubscriptionSample.ts][instancelistbysubscriptionsample] | list InstanceResource resources by subscription ID x-ms-original-file: 2024-09-15-preview/Instance_ListBySubscription_MaximumSet_Gen.json | -| [instanceUpdateSample.ts][instanceupdatesample] | update a InstanceResource x-ms-original-file: 2024-09-15-preview/Instance_Update_MaximumSet_Gen.json | -| [operationsListSample.ts][operationslistsample] | list the operations for the provider x-ms-original-file: 2024-09-15-preview/Operations_List_MaximumSet_Gen.json | - -## Prerequisites - -The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule). - -Before running the samples in Node, they must be compiled to JavaScript using the TypeScript compiler. For more information on TypeScript, see the [TypeScript documentation][typescript]. Install the TypeScript compiler using: - -```bash -npm install -g typescript -``` - -You need [an Azure subscription][freesub] to run these sample programs. - -Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. - -Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. - -## Setup - -To run the samples using the published version of the package: - -1. Install the dependencies using `npm`: - -```bash -npm install -``` - -2. Compile the samples: - -```bash -npm run build -``` - -3. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. - -4. Run whichever samples you like (note that some samples may require additional setup, see the table above): - -```bash -node dist/brokerAuthenticationCreateOrUpdateSample.js -``` - -Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): - -```bash -npx dev-tool run vendored cross-env node dist/brokerAuthenticationCreateOrUpdateSample.js -``` - -## Next Steps - -Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. - -[brokerauthenticationcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerAuthenticationCreateOrUpdateSample.ts -[brokerauthenticationdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerAuthenticationDeleteSample.ts -[brokerauthenticationgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerAuthenticationGetSample.ts -[brokerauthenticationlistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerAuthenticationListByResourceGroupSample.ts -[brokerauthorizationcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerAuthorizationCreateOrUpdateSample.ts -[brokerauthorizationdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerAuthorizationDeleteSample.ts -[brokerauthorizationgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerAuthorizationGetSample.ts -[brokerauthorizationlistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerAuthorizationListByResourceGroupSample.ts -[brokercreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerCreateOrUpdateSample.ts -[brokerdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerDeleteSample.ts -[brokergetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerGetSample.ts -[brokerlistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerListByResourceGroupSample.ts -[brokerlistenercreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerListenerCreateOrUpdateSample.ts -[brokerlistenerdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerListenerDeleteSample.ts -[brokerlistenergetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerListenerGetSample.ts -[brokerlistenerlistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerListenerListByResourceGroupSample.ts -[dataflowcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowCreateOrUpdateSample.ts -[dataflowdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowDeleteSample.ts -[dataflowendpointcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowEndpointCreateOrUpdateSample.ts -[dataflowendpointdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowEndpointDeleteSample.ts -[dataflowendpointgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowEndpointGetSample.ts -[dataflowendpointlistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowEndpointListByResourceGroupSample.ts -[dataflowgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowGetSample.ts -[dataflowlistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowListByResourceGroupSample.ts -[dataflowprofilecreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowProfileCreateOrUpdateSample.ts -[dataflowprofiledeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowProfileDeleteSample.ts -[dataflowprofilegetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowProfileGetSample.ts -[dataflowprofilelistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowProfileListByResourceGroupSample.ts -[instancecreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/instanceCreateOrUpdateSample.ts -[instancedeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/instanceDeleteSample.ts -[instancegetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/instanceGetSample.ts -[instancelistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/instanceListByResourceGroupSample.ts -[instancelistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/instanceListBySubscriptionSample.ts -[instanceupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/instanceUpdateSample.ts -[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/operationsListSample.ts -[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-iotoperations?view=azure-node-preview -[freesub]: https://azure.microsoft.com/free/ -[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/iotoperations/arm-iotoperations/README.md -[typescript]: https://www.typescriptlang.org/docs/home.html diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/package.json b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/package.json deleted file mode 100644 index 63e512764eca..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "@azure-samples/arm-iotoperations-ts-beta", - "private": true, - "version": "1.0.0", - "description": "@azure/arm-iotoperations client library samples for TypeScript (Beta)", - "engines": { - "node": ">=18.0.0" - }, - "scripts": { - "build": "tsc", - "prebuild": "rimraf dist/" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/Azure/azure-sdk-for-js.git", - "directory": "sdk/iotoperations/arm-iotoperations" - }, - "keywords": [ - "node", - "azure", - "cloud", - "typescript", - "browser", - "isomorphic" - ], - "author": "Microsoft Corporation", - "license": "MIT", - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/iotoperations/arm-iotoperations", - "dependencies": { - "@azure/arm-iotoperations": "next", - "dotenv": "latest", - "@azure/identity": "^4.2.1" - }, - "devDependencies": { - "@types/node": "^18.0.0", - "typescript": "~5.6.2", - "rimraf": "latest" - } -} diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/sample.env b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/sample.env deleted file mode 100644 index 508439fc7d62..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/sample.env +++ /dev/null @@ -1 +0,0 @@ -# Feel free to add your own environment variables. \ No newline at end of file diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerAuthenticationCreateOrUpdateSample.ts b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerAuthenticationCreateOrUpdateSample.ts deleted file mode 100644 index 260dcb130f63..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerAuthenticationCreateOrUpdateSample.ts +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsClient } from "@azure/arm-iotoperations"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to create a BrokerAuthenticationResource - * - * @summary create a BrokerAuthenticationResource - * x-ms-original-file: 2024-09-15-preview/BrokerAuthentication_CreateOrUpdate_Complex.json - */ -async function brokerAuthenticationCreateOrUpdateComplex() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.brokerAuthentication.createOrUpdate( - "rgiotoperations", - "resource-name123", - "resource-name123", - "resource-name123", - { - properties: { - authenticationMethods: [ - { - method: "ServiceAccountToken", - serviceAccountTokenSettings: { audiences: ["aio-internal"] }, - }, - { - method: "X509", - x509Settings: { - trustedClientCaCert: "my-ca", - authorizationAttributes: { - root: { - subject: - "CN = Contoso Root CA Cert, OU = Engineering, C = US", - attributes: { organization: "contoso" }, - }, - intermediate: { - subject: "CN = Contoso Intermediate CA", - attributes: { city: "seattle", foo: "bar" }, - }, - "smart-fan": { - subject: "CN = smart-fan", - attributes: { building: "17" }, - }, - }, - }, - }, - ], - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to create a BrokerAuthenticationResource - * - * @summary create a BrokerAuthenticationResource - * x-ms-original-file: 2024-09-15-preview/BrokerAuthentication_CreateOrUpdate_MaximumSet_Gen.json - */ -async function brokerAuthenticationCreateOrUpdate() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.brokerAuthentication.createOrUpdate( - "rgiotoperations", - "resource-name123", - "resource-name123", - "resource-name123", - { - properties: { - authenticationMethods: [ - { - method: "Custom", - customSettings: { - auth: { x509: { secretRef: "secret-name" } }, - caCertConfigMap: "pdecudefqyolvncbus", - endpoint: "https://www.example.com", - headers: { key8518: "bwityjy" }, - }, - serviceAccountTokenSettings: { audiences: ["jqyhyqatuydg"] }, - x509Settings: { - authorizationAttributes: { - key3384: { - attributes: { key186: "ucpajramsz" }, - subject: "jpgwctfeixitptfgfnqhua", - }, - }, - trustedClientCaCert: "vlctsqddl", - }, - }, - ], - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -async function main() { - brokerAuthenticationCreateOrUpdateComplex(); - brokerAuthenticationCreateOrUpdate(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerAuthenticationDeleteSample.ts b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerAuthenticationDeleteSample.ts deleted file mode 100644 index 117723b9e865..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerAuthenticationDeleteSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsClient } from "@azure/arm-iotoperations"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to delete a BrokerAuthenticationResource - * - * @summary delete a BrokerAuthenticationResource - * x-ms-original-file: 2024-09-15-preview/BrokerAuthentication_Delete_MaximumSet_Gen.json - */ -async function brokerAuthenticationDelete() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - await client.brokerAuthentication.delete( - "rgiotoperations", - "resource-name123", - "resource-name123", - "resource-name123", - ); -} - -async function main() { - brokerAuthenticationDelete(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerAuthenticationGetSample.ts b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerAuthenticationGetSample.ts deleted file mode 100644 index 975a99cd11bc..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerAuthenticationGetSample.ts +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsClient } from "@azure/arm-iotoperations"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to get a BrokerAuthenticationResource - * - * @summary get a BrokerAuthenticationResource - * x-ms-original-file: 2024-09-15-preview/BrokerAuthentication_Get_MaximumSet_Gen.json - */ -async function brokerAuthenticationGet() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.brokerAuthentication.get( - "rgiotoperations", - "resource-name123", - "resource-name123", - "resource-name123", - ); - console.log(result); -} - -async function main() { - brokerAuthenticationGet(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerAuthenticationListByResourceGroupSample.ts b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerAuthenticationListByResourceGroupSample.ts deleted file mode 100644 index 2776b2a9c5b0..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerAuthenticationListByResourceGroupSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsClient } from "@azure/arm-iotoperations"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to list BrokerAuthenticationResource resources by BrokerResource - * - * @summary list BrokerAuthenticationResource resources by BrokerResource - * x-ms-original-file: 2024-09-15-preview/BrokerAuthentication_ListByResourceGroup_MaximumSet_Gen.json - */ -async function brokerAuthenticationListByResourceGroup() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.brokerAuthentication.listByResourceGroup( - "rgiotoperations", - "resource-name123", - "resource-name123", - )) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main() { - brokerAuthenticationListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerAuthorizationCreateOrUpdateSample.ts b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerAuthorizationCreateOrUpdateSample.ts deleted file mode 100644 index a0360b83eb83..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerAuthorizationCreateOrUpdateSample.ts +++ /dev/null @@ -1,181 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsClient } from "@azure/arm-iotoperations"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to create a BrokerAuthorizationResource - * - * @summary create a BrokerAuthorizationResource - * x-ms-original-file: 2024-09-15-preview/BrokerAuthorization_CreateOrUpdate_Complex.json - */ -async function brokerAuthorizationCreateOrUpdateComplex() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.brokerAuthorization.createOrUpdate( - "rgiotoperations", - "resource-name123", - "resource-name123", - "resource-name123", - { - properties: { - authorizationPolicies: { - cache: "Enabled", - rules: [ - { - principals: { - usernames: ["temperature-sensor", "humidity-sensor"], - attributes: [{ building: "17", organization: "contoso" }], - }, - brokerResources: [ - { - method: "Connect", - clientIds: ["{principal.attributes.building}*"], - }, - { - method: "Publish", - topics: [ - "sensors/{principal.attributes.building}/{principal.clientId}/telemetry/*", - ], - }, - { - method: "Subscribe", - topics: ["commands/{principal.attributes.organization}"], - }, - ], - stateStoreResources: [ - { - method: "Read", - keyType: "Pattern", - keys: [ - "myreadkey", - "myotherkey?", - "mynumerickeysuffix[0-9]", - "clients:{principal.clientId}:*", - ], - }, - { - method: "ReadWrite", - keyType: "Binary", - keys: ["MTE2IDEwMSAxMTUgMTE2"], - }, - ], - }, - ], - }, - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to create a BrokerAuthorizationResource - * - * @summary create a BrokerAuthorizationResource - * x-ms-original-file: 2024-09-15-preview/BrokerAuthorization_CreateOrUpdate_MaximumSet_Gen.json - */ -async function brokerAuthorizationCreateOrUpdate() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.brokerAuthorization.createOrUpdate( - "rgiotoperations", - "resource-name123", - "resource-name123", - "resource-name123", - { - properties: { - authorizationPolicies: { - cache: "Enabled", - rules: [ - { - brokerResources: [ - { method: "Connect", clientIds: ["nlc"], topics: ["wvuca"] }, - ], - principals: { - attributes: [{ key5526: "nydhzdhbldygqcn" }], - clientIds: ["smopeaeddsygz"], - usernames: ["iozngyqndrteikszkbasinzdjtm"], - }, - stateStoreResources: [ - { - keyType: "Pattern", - keys: ["tkounsqtwvzyaklxjqoerpu"], - method: "Read", - }, - ], - }, - ], - }, - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to create a BrokerAuthorizationResource - * - * @summary create a BrokerAuthorizationResource - * x-ms-original-file: 2024-09-15-preview/BrokerAuthorization_CreateOrUpdate_Simple.json - */ -async function brokerAuthorizationCreateOrUpdateSimple() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.brokerAuthorization.createOrUpdate( - "rgiotoperations", - "resource-name123", - "resource-name123", - "resource-name123", - { - properties: { - authorizationPolicies: { - cache: "Enabled", - rules: [ - { - principals: { - clientIds: ["my-client-id"], - attributes: [{ floor: "floor1", site: "site1" }], - }, - brokerResources: [ - { method: "Connect" }, - { - method: "Subscribe", - topics: ["topic", "topic/with/wildcard/#"], - }, - ], - stateStoreResources: [ - { method: "ReadWrite", keyType: "Pattern", keys: ["*"] }, - ], - }, - ], - }, - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -async function main() { - brokerAuthorizationCreateOrUpdateComplex(); - brokerAuthorizationCreateOrUpdate(); - brokerAuthorizationCreateOrUpdateSimple(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerAuthorizationDeleteSample.ts b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerAuthorizationDeleteSample.ts deleted file mode 100644 index 4310d24ba61d..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerAuthorizationDeleteSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsClient } from "@azure/arm-iotoperations"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to delete a BrokerAuthorizationResource - * - * @summary delete a BrokerAuthorizationResource - * x-ms-original-file: 2024-09-15-preview/BrokerAuthorization_Delete_MaximumSet_Gen.json - */ -async function brokerAuthorizationDelete() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - await client.brokerAuthorization.delete( - "rgiotoperations", - "resource-name123", - "resource-name123", - "resource-name123", - ); -} - -async function main() { - brokerAuthorizationDelete(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerAuthorizationGetSample.ts b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerAuthorizationGetSample.ts deleted file mode 100644 index 20773696e6e4..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerAuthorizationGetSample.ts +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsClient } from "@azure/arm-iotoperations"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to get a BrokerAuthorizationResource - * - * @summary get a BrokerAuthorizationResource - * x-ms-original-file: 2024-09-15-preview/BrokerAuthorization_Get_MaximumSet_Gen.json - */ -async function brokerAuthorizationGet() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.brokerAuthorization.get( - "rgiotoperations", - "resource-name123", - "resource-name123", - "resource-name123", - ); - console.log(result); -} - -async function main() { - brokerAuthorizationGet(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerAuthorizationListByResourceGroupSample.ts b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerAuthorizationListByResourceGroupSample.ts deleted file mode 100644 index f698bfef8c61..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerAuthorizationListByResourceGroupSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsClient } from "@azure/arm-iotoperations"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to list BrokerAuthorizationResource resources by BrokerResource - * - * @summary list BrokerAuthorizationResource resources by BrokerResource - * x-ms-original-file: 2024-09-15-preview/BrokerAuthorization_ListByResourceGroup_MaximumSet_Gen.json - */ -async function brokerAuthorizationListByResourceGroup() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.brokerAuthorization.listByResourceGroup( - "rgiotoperations", - "resource-name123", - "resource-name123", - )) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main() { - brokerAuthorizationListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerCreateOrUpdateSample.ts b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerCreateOrUpdateSample.ts deleted file mode 100644 index 435779553db8..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerCreateOrUpdateSample.ts +++ /dev/null @@ -1,232 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsClient } from "@azure/arm-iotoperations"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to create a BrokerResource - * - * @summary create a BrokerResource - * x-ms-original-file: 2024-09-15-preview/Broker_CreateOrUpdate_Complex.json - */ -async function brokerCreateOrUpdateComplex() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.broker.createOrUpdate( - "rgiotoperations", - "resource-name123", - "resource-name123", - { - properties: { - cardinality: { - backendChain: { partitions: 2, redundancyFactor: 2, workers: 2 }, - frontend: { replicas: 2, workers: 2 }, - }, - diskBackedMessageBuffer: { maxSize: "50M" }, - generateResourceLimits: { cpu: "Enabled" }, - memoryProfile: "Medium", - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to create a BrokerResource - * - * @summary create a BrokerResource - * x-ms-original-file: 2024-09-15-preview/Broker_CreateOrUpdate_MaximumSet_Gen.json - */ -async function brokerCreateOrUpdate() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.broker.createOrUpdate( - "rgiotoperations", - "resource-name123", - "resource-name123", - { - properties: { - advanced: { - clients: { - maxSessionExpirySeconds: 3859, - maxMessageExpirySeconds: 3263, - maxPacketSizeBytes: 3029, - subscriberQueueLimit: { length: 6, strategy: "None" }, - maxReceiveMaximum: 2365, - maxKeepAliveSeconds: 3744, - }, - encryptInternalTraffic: "Enabled", - internalCerts: { - duration: "bchrc", - renewBefore: "xkafmpgjfifkwwrhkswtopdnne", - privateKey: { algorithm: "Ec256", rotationPolicy: "Always" }, - }, - }, - cardinality: { - backendChain: { partitions: 11, redundancyFactor: 5, workers: 15 }, - frontend: { replicas: 2, workers: 6 }, - }, - diagnostics: { - logs: { level: "rnmwokumdmebpmfxxxzvvjfdywotav" }, - metrics: { prometheusPort: 7581 }, - selfCheck: { - mode: "Enabled", - intervalSeconds: 158, - timeoutSeconds: 14, - }, - traces: { - mode: "Enabled", - cacheSizeMegabytes: 28, - selfTracing: { mode: "Enabled", intervalSeconds: 22 }, - spanChannelCapacity: 1000, - }, - }, - diskBackedMessageBuffer: { - maxSize: "500M", - ephemeralVolumeClaimSpec: { - volumeName: "c", - volumeMode: "rxvpksjuuugqnqzeiprocknbn", - storageClassName: "sseyhrjptkhrqvpdpjmornkqvon", - accessModes: ["nuluhigrbb"], - dataSource: { - apiGroup: "npqapyksvvpkohujx", - kind: "wazgyb", - name: "cwhsgxxcxsyppoefm", - }, - dataSourceRef: { - apiGroup: "mnfnykznjjsoqpfsgdqioupt", - kind: "odynqzekfzsnawrctaxg", - name: "envszivbbmixbyddzg", - namespace: "etcfzvxqd", - }, - resources: { - limits: { key2719: "hmphcrgctu" }, - requests: { key2909: "txocprnyrsgvhfrg" }, - }, - selector: { - matchExpressions: [ - { - key: "e", - operator: "In", - values: ["slmpajlywqvuyknipgztsonqyybt"], - }, - ], - matchLabels: { key6673: "wlngfalznwxnurzpgxomcxhbqefpr" }, - }, - }, - persistentVolumeClaimSpec: { - volumeName: "c", - volumeMode: "rxvpksjuuugqnqzeiprocknbn", - storageClassName: "sseyhrjptkhrqvpdpjmornkqvon", - accessModes: ["nuluhigrbb"], - dataSource: { - apiGroup: "npqapyksvvpkohujx", - kind: "wazgyb", - name: "cwhsgxxcxsyppoefm", - }, - dataSourceRef: { - apiGroup: "mnfnykznjjsoqpfsgdqioupt", - kind: "odynqzekfzsnawrctaxg", - name: "envszivbbmixbyddzg", - namespace: "etcfzvxqd", - }, - resources: { - limits: { key2719: "hmphcrgctu" }, - requests: { key2909: "txocprnyrsgvhfrg" }, - }, - selector: { - matchExpressions: [ - { - key: "e", - operator: "In", - values: ["slmpajlywqvuyknipgztsonqyybt"], - }, - ], - matchLabels: { key6673: "wlngfalznwxnurzpgxomcxhbqefpr" }, - }, - }, - }, - generateResourceLimits: { cpu: "Enabled" }, - memoryProfile: "Tiny", - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to create a BrokerResource - * - * @summary create a BrokerResource - * x-ms-original-file: 2024-09-15-preview/Broker_CreateOrUpdate_Minimal.json - */ -async function brokerCreateOrUpdateMinimal() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.broker.createOrUpdate( - "rgiotoperations", - "resource-name123", - "resource-name123", - { - properties: { memoryProfile: "Tiny" }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to create a BrokerResource - * - * @summary create a BrokerResource - * x-ms-original-file: 2024-09-15-preview/Broker_CreateOrUpdate_Simple.json - */ -async function brokerCreateOrUpdateSimple() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.broker.createOrUpdate( - "rgiotoperations", - "resource-name123", - "resource-name123", - { - properties: { - cardinality: { - backendChain: { partitions: 2, redundancyFactor: 2, workers: 2 }, - frontend: { replicas: 2, workers: 2 }, - }, - generateResourceLimits: { cpu: "Enabled" }, - memoryProfile: "Low", - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -async function main() { - brokerCreateOrUpdateComplex(); - brokerCreateOrUpdate(); - brokerCreateOrUpdateMinimal(); - brokerCreateOrUpdateSimple(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerDeleteSample.ts b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerDeleteSample.ts deleted file mode 100644 index ab6211b0f602..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerDeleteSample.ts +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsClient } from "@azure/arm-iotoperations"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to delete a BrokerResource - * - * @summary delete a BrokerResource - * x-ms-original-file: 2024-09-15-preview/Broker_Delete_MaximumSet_Gen.json - */ -async function brokerDelete() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - await client.broker.delete( - "rgiotoperations", - "resource-name123", - "resource-name123", - ); -} - -async function main() { - brokerDelete(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerGetSample.ts b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerGetSample.ts deleted file mode 100644 index b62bd9a38914..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerGetSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsClient } from "@azure/arm-iotoperations"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to get a BrokerResource - * - * @summary get a BrokerResource - * x-ms-original-file: 2024-09-15-preview/Broker_Get_MaximumSet_Gen.json - */ -async function brokerGet() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.broker.get( - "rgiotoperations", - "resource-name123", - "resource-name123", - ); - console.log(result); -} - -async function main() { - brokerGet(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerListByResourceGroupSample.ts b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerListByResourceGroupSample.ts deleted file mode 100644 index 0602c6633628..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerListByResourceGroupSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsClient } from "@azure/arm-iotoperations"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to list BrokerResource resources by InstanceResource - * - * @summary list BrokerResource resources by InstanceResource - * x-ms-original-file: 2024-09-15-preview/Broker_ListByResourceGroup_MaximumSet_Gen.json - */ -async function brokerListByResourceGroup() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.broker.listByResourceGroup( - "rgiotoperations", - "resource-name123", - )) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main() { - brokerListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerListenerCreateOrUpdateSample.ts b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerListenerCreateOrUpdateSample.ts deleted file mode 100644 index 59fc9e87cffc..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerListenerCreateOrUpdateSample.ts +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsClient } from "@azure/arm-iotoperations"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to create a BrokerListenerResource - * - * @summary create a BrokerListenerResource - * x-ms-original-file: 2024-09-15-preview/BrokerListener_CreateOrUpdate_Complex.json - */ -async function brokerListenerCreateOrUpdateComplex() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.brokerListener.createOrUpdate( - "rgiotoperations", - "resource-name123", - "resource-name123", - "resource-name123", - { - properties: { - serviceType: "LoadBalancer", - ports: [ - { - port: 8080, - authenticationRef: "example-authentication", - protocol: "WebSockets", - }, - { - port: 8443, - authenticationRef: "example-authentication", - protocol: "WebSockets", - tls: { - mode: "Automatic", - certManagerCertificateSpec: { - issuerRef: { - group: "jtmuladdkpasfpoyvewekmiy", - name: "example-issuer", - kind: "Issuer", - }, - }, - }, - }, - { port: 1883, authenticationRef: "example-authentication" }, - { - port: 8883, - authenticationRef: "example-authentication", - tls: { mode: "Manual", manual: { secretRef: "example-secret" } }, - }, - ], - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to create a BrokerListenerResource - * - * @summary create a BrokerListenerResource - * x-ms-original-file: 2024-09-15-preview/BrokerListener_CreateOrUpdate_MaximumSet_Gen.json - */ -async function brokerListenerCreateOrUpdate() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.brokerListener.createOrUpdate( - "rgiotoperations", - "resource-name123", - "resource-name123", - "resource-name123", - { - properties: { - serviceName: "tpfiszlapdpxktx", - ports: [ - { - authenticationRef: "tjvdroaqqy", - authorizationRef: "inxhvxnwswyrvt", - nodePort: 7281, - port: 1268, - protocol: "Mqtt", - tls: { - mode: "Automatic", - certManagerCertificateSpec: { - duration: "qmpeffoksron", - secretName: "oagi", - renewBefore: "hutno", - issuerRef: { - group: "jtmuladdkpasfpoyvewekmiy", - kind: "Issuer", - name: "ocwoqpgucvjrsuudtjhb", - }, - privateKey: { algorithm: "Ec256", rotationPolicy: "Always" }, - san: { - dns: ["xhvmhrrhgfsapocjeebqtnzarlj"], - ip: ["zbgugfzcgsmegevzktsnibyuyp"], - }, - }, - manual: { secretRef: "secret-name" }, - }, - }, - ], - serviceType: "ClusterIp", - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to create a BrokerListenerResource - * - * @summary create a BrokerListenerResource - * x-ms-original-file: 2024-09-15-preview/BrokerListener_CreateOrUpdate_Simple.json - */ -async function brokerListenerCreateOrUpdateSimple() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.brokerListener.createOrUpdate( - "rgiotoperations", - "resource-name123", - "resource-name123", - "resource-name123", - { - properties: { ports: [{ port: 1883 }] }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -async function main() { - brokerListenerCreateOrUpdateComplex(); - brokerListenerCreateOrUpdate(); - brokerListenerCreateOrUpdateSimple(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerListenerDeleteSample.ts b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerListenerDeleteSample.ts deleted file mode 100644 index dac6e0497872..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerListenerDeleteSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsClient } from "@azure/arm-iotoperations"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to delete a BrokerListenerResource - * - * @summary delete a BrokerListenerResource - * x-ms-original-file: 2024-09-15-preview/BrokerListener_Delete_MaximumSet_Gen.json - */ -async function brokerListenerDelete() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - await client.brokerListener.delete( - "rgiotoperations", - "resource-name123", - "resource-name123", - "resource-name123", - ); -} - -async function main() { - brokerListenerDelete(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerListenerGetSample.ts b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerListenerGetSample.ts deleted file mode 100644 index 913d755c3ea7..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerListenerGetSample.ts +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsClient } from "@azure/arm-iotoperations"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to get a BrokerListenerResource - * - * @summary get a BrokerListenerResource - * x-ms-original-file: 2024-09-15-preview/BrokerListener_Get_MaximumSet_Gen.json - */ -async function brokerListenerGet() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.brokerListener.get( - "rgiotoperations", - "resource-name123", - "resource-name123", - "resource-name123", - ); - console.log(result); -} - -async function main() { - brokerListenerGet(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerListenerListByResourceGroupSample.ts b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerListenerListByResourceGroupSample.ts deleted file mode 100644 index 83062ca82430..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerListenerListByResourceGroupSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsClient } from "@azure/arm-iotoperations"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to list BrokerListenerResource resources by BrokerResource - * - * @summary list BrokerListenerResource resources by BrokerResource - * x-ms-original-file: 2024-09-15-preview/BrokerListener_ListByResourceGroup_MaximumSet_Gen.json - */ -async function brokerListenerListByResourceGroup() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.brokerListener.listByResourceGroup( - "rgiotoperations", - "resource-name123", - "resource-name123", - )) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main() { - brokerListenerListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowCreateOrUpdateSample.ts b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowCreateOrUpdateSample.ts deleted file mode 100644 index ba9c5a2e2c5f..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowCreateOrUpdateSample.ts +++ /dev/null @@ -1,403 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsClient } from "@azure/arm-iotoperations"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to create a DataflowResource - * - * @summary create a DataflowResource - * x-ms-original-file: 2024-09-15-preview/Dataflow_CreateOrUpdate_ComplexContextualization.json - */ -async function dataflowCreateOrUpdateComplexContextualization() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.dataflow.createOrUpdate( - "rgiotoperations", - "resource-name123", - "resource-name123", - "aio-to-adx-contexualized", - { - properties: { - mode: "Enabled", - operations: [ - { - operationType: "Source", - name: "source1", - sourceSettings: { - endpointRef: "aio-builtin-broker-endpoint", - dataSources: ["azure-iot-operations/data/thermostat"], - }, - }, - { - operationType: "BuiltInTransformation", - name: "transformation1", - builtInTransformationSettings: { - map: [ - { inputs: ["*"], output: "*" }, - { inputs: ["$context(quality).*"], output: "enriched.*" }, - ], - datasets: [ - { - key: "quality", - inputs: ["$source.country", "$context.country"], - expression: "$1 == $2", - }, - ], - }, - }, - { - operationType: "Destination", - name: "destination1", - destinationSettings: { - endpointRef: "adx-endpoint", - dataDestination: "mytable", - }, - }, - ], - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to create a DataflowResource - * - * @summary create a DataflowResource - * x-ms-original-file: 2024-09-15-preview/Dataflow_CreateOrUpdate_ComplexEventHub.json - */ -async function dataflowCreateOrUpdateComplexEventHub() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.dataflow.createOrUpdate( - "rgiotoperations", - "resource-name123", - "resource-name123", - "aio-to-event-hub-transformed", - { - properties: { - mode: "Enabled", - operations: [ - { - operationType: "Source", - name: "source1", - sourceSettings: { - endpointRef: "aio-builtin-broker-endpoint", - dataSources: ["azure-iot-operations/data/thermostat"], - }, - }, - { - operationType: "BuiltInTransformation", - builtInTransformationSettings: { - filter: [ - { - inputs: ["temperature.Value", '"Tag 10".Value'], - expression: "$1 > 9000 && $2 >= 8000", - }, - ], - map: [ - { inputs: ["*"], output: "*" }, - { - inputs: ["temperature.Value", '"Tag 10".Value'], - expression: "($1+$2)/2", - output: "AvgTemp.Value", - }, - { - inputs: [], - expression: "true", - output: "dataflow-processed", - }, - { - inputs: ["temperature.SourceTimestamp"], - expression: "", - output: "", - }, - { inputs: ['"Tag 10"'], expression: "", output: "pressure" }, - { - inputs: ["temperature.Value"], - expression: "cToF($1)", - output: "temperatureF.Value", - }, - { - inputs: ['"Tag 10".Value'], - expression: "scale ($1,0,10,0,100)", - output: '"Scale Tag 10".Value', - }, - ], - }, - }, - { - operationType: "Destination", - name: "destination1", - destinationSettings: { - endpointRef: "event-hub-endpoint", - dataDestination: "myuniqueeventhub", - }, - }, - ], - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to create a DataflowResource - * - * @summary create a DataflowResource - * x-ms-original-file: 2024-09-15-preview/Dataflow_CreateOrUpdate_FilterToTopic.json - */ -async function dataflowCreateOrUpdateFilterToTopic() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.dataflow.createOrUpdate( - "rgiotoperations", - "resource-name123", - "resource-name123", - "mqtt-filter-to-topic", - { - properties: { - mode: "Enabled", - operations: [ - { - operationType: "Source", - name: "source1", - sourceSettings: { - endpointRef: "aio-builtin-broker-endpoint", - dataSources: ["azure-iot-operations/data/thermostat"], - }, - }, - { - operationType: "BuiltInTransformation", - name: "transformation1", - builtInTransformationSettings: { - filter: [ - { - type: "Filter", - description: "filter-datapoint", - inputs: ["temperature.Value", '"Tag 10".Value'], - expression: "$1 > 9000 && $2 >= 8000", - }, - ], - map: [{ type: "PassThrough", inputs: ["*"], output: "*" }], - }, - }, - { - operationType: "Destination", - name: "destination1", - destinationSettings: { - endpointRef: "aio-builtin-broker-endpoint", - dataDestination: "data/filtered/thermostat", - }, - }, - ], - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to create a DataflowResource - * - * @summary create a DataflowResource - * x-ms-original-file: 2024-09-15-preview/Dataflow_CreateOrUpdate_MaximumSet_Gen.json - */ -async function dataflowCreateOrUpdate() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.dataflow.createOrUpdate( - "rgiotoperations", - "resource-name123", - "resource-name123", - "resource-name123", - { - properties: { - mode: "Enabled", - operations: [ - { - operationType: "Source", - name: "knnafvkwoeakm", - sourceSettings: { - endpointRef: "iixotodhvhkkfcfyrkoveslqig", - assetRef: "zayyykwmckaocywdkohmu", - serializationFormat: "Json", - schemaRef: "pknmdzqll", - dataSources: ["chkkpymxhp"], - }, - builtInTransformationSettings: { - serializationFormat: "Delta", - schemaRef: "mcdc", - datasets: [ - { - key: "qsfqcgxaxnhfumrsdsokwyv", - description: - "Lorem ipsum odor amet, consectetuer adipiscing elit.", - schemaRef: "n", - inputs: ["mosffpsslifkq"], - expression: "aatbwomvflemsxialv", - }, - ], - filter: [ - { - type: "Filter", - description: - "Lorem ipsum odor amet, consectetuer adipiscing elit.", - inputs: ["sxmjkbntgb"], - expression: "n", - }, - ], - map: [ - { - type: "NewProperties", - description: - "Lorem ipsum odor amet, consectetuer adipiscing elit.", - inputs: ["xsbxuk"], - expression: "txoiltogsarwkzalsphvlmt", - output: "nvgtmkfl", - }, - ], - }, - destinationSettings: { - endpointRef: "kybkchnzimerguekuvqlqiqdvvrt", - dataDestination: "cbrh", - }, - }, - ], - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to create a DataflowResource - * - * @summary create a DataflowResource - * x-ms-original-file: 2024-09-15-preview/Dataflow_CreateOrUpdate_SimpleEventGrid.json - */ -async function dataflowCreateOrUpdateSimpleEventGrid() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.dataflow.createOrUpdate( - "rgiotoperations", - "resource-name123", - "resource-name123", - "aio-to-event-grid", - { - properties: { - mode: "Enabled", - operations: [ - { - operationType: "Source", - name: "source1", - sourceSettings: { - endpointRef: "aio-builtin-broker-endpoint", - dataSources: ["thermostats/+/telemetry/temperature/#"], - }, - }, - { - operationType: "Destination", - name: "destination1", - destinationSettings: { - endpointRef: "event-grid-endpoint", - dataDestination: "factory/telemetry", - }, - }, - ], - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to create a DataflowResource - * - * @summary create a DataflowResource - * x-ms-original-file: 2024-09-15-preview/Dataflow_CreateOrUpdate_SimpleFabric.json - */ -async function dataflowCreateOrUpdateSimpleFabric() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.dataflow.createOrUpdate( - "rgiotoperations", - "resource-name123", - "resource-name123", - "aio-to-fabric", - { - properties: { - mode: "Enabled", - operations: [ - { - operationType: "Source", - name: "source1", - sourceSettings: { - endpointRef: "aio-builtin-broker-endpoint", - dataSources: ["azure-iot-operations/data/thermostat"], - }, - }, - { - operationType: "BuiltInTransformation", - builtInTransformationSettings: { - serializationFormat: "Parquet", - schemaRef: "aio-sr://exampleNamespace/exmapleParquetSchema:1.0.0", - }, - }, - { - operationType: "Destination", - name: "destination1", - destinationSettings: { - endpointRef: "fabric-endpoint", - dataDestination: "telemetryTable", - }, - }, - ], - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -async function main() { - dataflowCreateOrUpdateComplexContextualization(); - dataflowCreateOrUpdateComplexEventHub(); - dataflowCreateOrUpdateFilterToTopic(); - dataflowCreateOrUpdate(); - dataflowCreateOrUpdateSimpleEventGrid(); - dataflowCreateOrUpdateSimpleFabric(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowDeleteSample.ts b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowDeleteSample.ts deleted file mode 100644 index b7a7f2cc4f21..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowDeleteSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsClient } from "@azure/arm-iotoperations"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to delete a DataflowResource - * - * @summary delete a DataflowResource - * x-ms-original-file: 2024-09-15-preview/Dataflow_Delete_MaximumSet_Gen.json - */ -async function dataflowDelete() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - await client.dataflow.delete( - "rgiotoperations", - "resource-name123", - "resource-name123", - "resource-name123", - ); -} - -async function main() { - dataflowDelete(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowEndpointCreateOrUpdateSample.ts b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowEndpointCreateOrUpdateSample.ts deleted file mode 100644 index 496c8c729fbc..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowEndpointCreateOrUpdateSample.ts +++ /dev/null @@ -1,496 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsClient } from "@azure/arm-iotoperations"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to create a DataflowEndpointResource - * - * @summary create a DataflowEndpointResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_CreateOrUpdate_ADLSv2.json - */ -async function dataflowEndpointCreateOrUpdateADLSv2() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.dataflowEndpoint.createOrUpdate( - "rgiotoperations", - "resource-name123", - "adlsv2-endpoint", - { - properties: { - endpointType: "DataLakeStorage", - dataLakeStorageSettings: { - host: "example.blob.core.windows.net", - authentication: { - method: "AccessToken", - accessTokenSettings: { secretRef: "my-secret" }, - }, - }, - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to create a DataflowEndpointResource - * - * @summary create a DataflowEndpointResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_CreateOrUpdate_ADX.json - */ -async function dataflowEndpointCreateOrUpdateAdx() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.dataflowEndpoint.createOrUpdate( - "rgiotoperations", - "resource-name123", - "adx-endpoint", - { - properties: { - endpointType: "DataExplorer", - dataExplorerSettings: { - host: "example.westeurope.kusto.windows.net", - authentication: { - method: "SystemAssignedManagedIdentity", - systemAssignedManagedIdentitySettings: {}, - }, - database: "example-database", - batching: { latencySeconds: 9312, maxMessages: 9028 }, - }, - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to create a DataflowEndpointResource - * - * @summary create a DataflowEndpointResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_CreateOrUpdate_AIO.json - */ -async function dataflowEndpointCreateOrUpdateAio() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.dataflowEndpoint.createOrUpdate( - "rgiotoperations", - "resource-name123", - "aio-builtin-broker-endpoint", - { - properties: { - endpointType: "Mqtt", - mqttSettings: { - host: "aio-broker:18883", - authentication: { - method: "Kubernetes", - serviceAccountTokenSettings: { audience: "aio-internal" }, - }, - tls: { - mode: "Enabled", - trustedCaCertificateConfigMapRef: "aio-ca-trust-bundle-test-only", - }, - }, - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to create a DataflowEndpointResource - * - * @summary create a DataflowEndpointResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_CreateOrUpdate_EventGrid.json - */ -async function dataflowEndpointCreateOrUpdateEventGrid() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.dataflowEndpoint.createOrUpdate( - "rgiotoperations", - "resource-name123", - "event-grid-endpoint", - { - properties: { - endpointType: "Mqtt", - mqttSettings: { - host: "example.westeurope-1.ts.eventgrid.azure.net:8883", - authentication: { - method: "SystemAssignedManagedIdentity", - systemAssignedManagedIdentitySettings: {}, - }, - tls: { mode: "Enabled" }, - }, - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to create a DataflowEndpointResource - * - * @summary create a DataflowEndpointResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_CreateOrUpdate_EventHub.json - */ -async function dataflowEndpointCreateOrUpdateEventHub() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.dataflowEndpoint.createOrUpdate( - "rgiotoperations", - "resource-name123", - "event-hub-endpoint", - { - properties: { - endpointType: "Kafka", - kafkaSettings: { - host: "example.servicebus.windows.net:9093", - authentication: { - method: "SystemAssignedManagedIdentity", - systemAssignedManagedIdentitySettings: {}, - }, - tls: { mode: "Enabled" }, - consumerGroupId: "aiodataflows", - }, - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to create a DataflowEndpointResource - * - * @summary create a DataflowEndpointResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_CreateOrUpdate_Fabric.json - */ -async function dataflowEndpointCreateOrUpdateFabric() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.dataflowEndpoint.createOrUpdate( - "rgiotoperations", - "resource-name123", - "fabric-endpoint", - { - properties: { - endpointType: "FabricOneLake", - fabricOneLakeSettings: { - host: "onelake.dfs.fabric.microsoft.com", - authentication: { - method: "SystemAssignedManagedIdentity", - systemAssignedManagedIdentitySettings: {}, - }, - names: { - workspaceName: "example-workspace", - lakehouseName: "example-lakehouse", - }, - oneLakePathType: "Tables", - }, - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to create a DataflowEndpointResource - * - * @summary create a DataflowEndpointResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_CreateOrUpdate_Kafka.json - */ -async function dataflowEndpointCreateOrUpdateKafka() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.dataflowEndpoint.createOrUpdate( - "rgiotoperations", - "resource-name123", - "generic-kafka-endpoint", - { - properties: { - endpointType: "Kafka", - kafkaSettings: { - host: "example.kafka.local:9093", - authentication: { - method: "Sasl", - saslSettings: { saslType: "Plain", secretRef: "my-secret" }, - }, - tls: { - mode: "Enabled", - trustedCaCertificateConfigMapRef: "ca-certificates", - }, - consumerGroupId: "dataflows", - compression: "Gzip", - batching: { - mode: "Enabled", - latencyMs: 5, - maxBytes: 1000000, - maxMessages: 100000, - }, - partitionStrategy: "Default", - kafkaAcks: "All", - copyMqttProperties: "Enabled", - cloudEventAttributes: "Propagate", - }, - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to create a DataflowEndpointResource - * - * @summary create a DataflowEndpointResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_CreateOrUpdate_LocalStorage.json - */ -async function dataflowEndpointCreateOrUpdateLocalStorage() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.dataflowEndpoint.createOrUpdate( - "rgiotoperations", - "resource-name123", - "local-storage-endpoint", - { - properties: { - endpointType: "LocalStorage", - localStorageSettings: { persistentVolumeClaimRef: "example-pvc" }, - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to create a DataflowEndpointResource - * - * @summary create a DataflowEndpointResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_CreateOrUpdate_MaximumSet_Gen.json - */ -async function dataflowEndpointCreateOrUpdate() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.dataflowEndpoint.createOrUpdate( - "rgiotoperations", - "resource-name123", - "resource-name123", - { - properties: { - endpointType: "DataExplorer", - dataExplorerSettings: { - authentication: { - method: "SystemAssignedManagedIdentity", - systemAssignedManagedIdentitySettings: { - audience: "psxomrfbhoflycm", - }, - userAssignedManagedIdentitySettings: { - clientId: "fb90f267-8872-431a-a76a-a1cec5d3c4d2", - scope: "zop", - tenantId: "ed060aa2-71ff-4d3f-99c4-a9138356fdec", - }, - }, - database: "yqcdpjsifm", - host: "..kusto.windows.net", - batching: { latencySeconds: 9312, maxMessages: 9028 }, - }, - dataLakeStorageSettings: { - authentication: { - method: "SystemAssignedManagedIdentity", - accessTokenSettings: { secretRef: "sevriyphcvnlrnfudqzejecwa" }, - systemAssignedManagedIdentitySettings: { - audience: "psxomrfbhoflycm", - }, - userAssignedManagedIdentitySettings: { - clientId: "fb90f267-8872-431a-a76a-a1cec5d3c4d2", - scope: "zop", - tenantId: "ed060aa2-71ff-4d3f-99c4-a9138356fdec", - }, - }, - host: ".blob.core.windows.net", - batching: { latencySeconds: 9312, maxMessages: 9028 }, - }, - fabricOneLakeSettings: { - authentication: { - method: "SystemAssignedManagedIdentity", - systemAssignedManagedIdentitySettings: { - audience: "psxomrfbhoflycm", - }, - userAssignedManagedIdentitySettings: { - clientId: "fb90f267-8872-431a-a76a-a1cec5d3c4d2", - scope: "zop", - tenantId: "ed060aa2-71ff-4d3f-99c4-a9138356fdec", - }, - }, - names: { lakehouseName: "wpeathi", workspaceName: "nwgmitkbljztgms" }, - oneLakePathType: "Files", - host: "https://.fabric.microsoft.com", - batching: { latencySeconds: 9312, maxMessages: 9028 }, - }, - kafkaSettings: { - authentication: { - method: "SystemAssignedManagedIdentity", - systemAssignedManagedIdentitySettings: { - audience: "psxomrfbhoflycm", - }, - userAssignedManagedIdentitySettings: { - clientId: "fb90f267-8872-431a-a76a-a1cec5d3c4d2", - scope: "zop", - tenantId: "ed060aa2-71ff-4d3f-99c4-a9138356fdec", - }, - saslSettings: { - saslType: "Plain", - secretRef: "visyxoztqnylvbyokhtmpdkwes", - }, - x509CertificateSettings: { secretRef: "afwizrystfslkfqd" }, - }, - consumerGroupId: "ukkzcjiyenhxokat", - host: "pwcqfiqclcgneolpewnyavoulbip", - batching: { - mode: "Enabled", - latencyMs: 3679, - maxBytes: 8887, - maxMessages: 2174, - }, - copyMqttProperties: "Enabled", - compression: "None", - kafkaAcks: "Zero", - partitionStrategy: "Default", - tls: { - mode: "Enabled", - trustedCaCertificateConfigMapRef: "tectjjvukvelsreihwadh", - }, - }, - localStorageSettings: { persistentVolumeClaimRef: "jjwqwvd" }, - mqttSettings: { - authentication: { - method: "SystemAssignedManagedIdentity", - systemAssignedManagedIdentitySettings: { - audience: "psxomrfbhoflycm", - }, - userAssignedManagedIdentitySettings: { - clientId: "fb90f267-8872-431a-a76a-a1cec5d3c4d2", - scope: "zop", - tenantId: "ed060aa2-71ff-4d3f-99c4-a9138356fdec", - }, - serviceAccountTokenSettings: { audience: "ejbklrbxgjaqleoycgpje" }, - x509CertificateSettings: { secretRef: "afwizrystfslkfqd" }, - }, - clientIdPrefix: "kkljsdxdirfhwxtkavldekeqhv", - host: "nyhnxqnbspstctl", - protocol: "Mqtt", - keepAliveSeconds: 0, - retain: "Keep", - maxInflightMessages: 0, - qos: 1, - sessionExpirySeconds: 0, - tls: { - mode: "Enabled", - trustedCaCertificateConfigMapRef: "tectjjvukvelsreihwadh", - }, - }, - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to create a DataflowEndpointResource - * - * @summary create a DataflowEndpointResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_CreateOrUpdate_MQTT.json - */ -async function dataflowEndpointCreateOrUpdateMqtt() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.dataflowEndpoint.createOrUpdate( - "rgiotoperations", - "resource-name123", - "generic-mqtt-broker-endpoint", - { - properties: { - endpointType: "Mqtt", - mqttSettings: { - host: "example.broker.local:1883", - authentication: { - method: "X509Certificate", - x509CertificateSettings: { secretRef: "example-secret" }, - }, - tls: { mode: "Disabled" }, - clientIdPrefix: "factory-gateway", - retain: "Keep", - sessionExpirySeconds: 3600, - qos: 1, - protocol: "WebSockets", - maxInflightMessages: 100, - keepAliveSeconds: 60, - }, - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -async function main() { - dataflowEndpointCreateOrUpdateADLSv2(); - dataflowEndpointCreateOrUpdateAdx(); - dataflowEndpointCreateOrUpdateAio(); - dataflowEndpointCreateOrUpdateEventGrid(); - dataflowEndpointCreateOrUpdateEventHub(); - dataflowEndpointCreateOrUpdateFabric(); - dataflowEndpointCreateOrUpdateKafka(); - dataflowEndpointCreateOrUpdateLocalStorage(); - dataflowEndpointCreateOrUpdate(); - dataflowEndpointCreateOrUpdateMqtt(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowEndpointDeleteSample.ts b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowEndpointDeleteSample.ts deleted file mode 100644 index 3db84ba8a3b1..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowEndpointDeleteSample.ts +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsClient } from "@azure/arm-iotoperations"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to delete a DataflowEndpointResource - * - * @summary delete a DataflowEndpointResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_Delete_MaximumSet_Gen.json - */ -async function dataflowEndpointDelete() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - await client.dataflowEndpoint.delete( - "rgiotoperations", - "resource-name123", - "resource-name123", - ); -} - -async function main() { - dataflowEndpointDelete(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowEndpointGetSample.ts b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowEndpointGetSample.ts deleted file mode 100644 index 4c190c182817..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowEndpointGetSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsClient } from "@azure/arm-iotoperations"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to get a DataflowEndpointResource - * - * @summary get a DataflowEndpointResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_Get_MaximumSet_Gen.json - */ -async function dataflowEndpointGet() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.dataflowEndpoint.get( - "rgiotoperations", - "resource-name123", - "resource-name123", - ); - console.log(result); -} - -async function main() { - dataflowEndpointGet(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowEndpointListByResourceGroupSample.ts b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowEndpointListByResourceGroupSample.ts deleted file mode 100644 index 6fc39edc7eae..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowEndpointListByResourceGroupSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsClient } from "@azure/arm-iotoperations"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to list DataflowEndpointResource resources by InstanceResource - * - * @summary list DataflowEndpointResource resources by InstanceResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_ListByResourceGroup_MaximumSet_Gen.json - */ -async function dataflowEndpointListByResourceGroup() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.dataflowEndpoint.listByResourceGroup( - "rgiotoperations", - "resource-name123", - )) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main() { - dataflowEndpointListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowGetSample.ts b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowGetSample.ts deleted file mode 100644 index 638dd886833a..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowGetSample.ts +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsClient } from "@azure/arm-iotoperations"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to get a DataflowResource - * - * @summary get a DataflowResource - * x-ms-original-file: 2024-09-15-preview/Dataflow_Get_MaximumSet_Gen.json - */ -async function dataflowGet() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.dataflow.get( - "rgiotoperations", - "resource-name123", - "resource-name123", - "resource-name123", - ); - console.log(result); -} - -async function main() { - dataflowGet(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowListByResourceGroupSample.ts b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowListByResourceGroupSample.ts deleted file mode 100644 index 3de53e08bbfb..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowListByResourceGroupSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsClient } from "@azure/arm-iotoperations"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to list DataflowResource resources by DataflowProfileResource - * - * @summary list DataflowResource resources by DataflowProfileResource - * x-ms-original-file: 2024-09-15-preview/Dataflow_ListByProfileResource_MaximumSet_Gen.json - */ -async function dataflowListByProfileResource() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.dataflow.listByResourceGroup( - "rgiotoperations", - "resource-name123", - "resource-name123", - )) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main() { - dataflowListByProfileResource(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowProfileCreateOrUpdateSample.ts b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowProfileCreateOrUpdateSample.ts deleted file mode 100644 index b751287bfa0a..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowProfileCreateOrUpdateSample.ts +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsClient } from "@azure/arm-iotoperations"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to create a DataflowProfileResource - * - * @summary create a DataflowProfileResource - * x-ms-original-file: 2024-09-15-preview/DataflowProfile_CreateOrUpdate_MaximumSet_Gen.json - */ -async function dataflowProfileCreateOrUpdate() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.dataflowProfile.createOrUpdate( - "rgiotoperations", - "resource-name123", - "resource-name123", - { - properties: { - diagnostics: { - logs: { level: "rnmwokumdmebpmfxxxzvvjfdywotav" }, - metrics: { prometheusPort: 7581 }, - }, - instanceCount: 14, - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to create a DataflowProfileResource - * - * @summary create a DataflowProfileResource - * x-ms-original-file: 2024-09-15-preview/DataflowProfile_CreateOrUpdate_Minimal.json - */ -async function dataflowProfileCreateOrUpdateMinimal() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.dataflowProfile.createOrUpdate( - "rgiotoperations", - "resource-name123", - "aio-dataflowprofile", - { - properties: { instanceCount: 1 }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to create a DataflowProfileResource - * - * @summary create a DataflowProfileResource - * x-ms-original-file: 2024-09-15-preview/DataflowProfile_CreateOrUpdate_Multi.json - */ -async function dataflowProfileCreateOrUpdateMulti() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.dataflowProfile.createOrUpdate( - "rgiotoperations", - "resource-name123", - "aio-dataflowprofile", - { - properties: { instanceCount: 3 }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - }, - ); - console.log(result); -} - -async function main() { - dataflowProfileCreateOrUpdate(); - dataflowProfileCreateOrUpdateMinimal(); - dataflowProfileCreateOrUpdateMulti(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowProfileDeleteSample.ts b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowProfileDeleteSample.ts deleted file mode 100644 index 5c1d2a2ee2f2..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowProfileDeleteSample.ts +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsClient } from "@azure/arm-iotoperations"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to delete a DataflowProfileResource - * - * @summary delete a DataflowProfileResource - * x-ms-original-file: 2024-09-15-preview/DataflowProfile_Delete_MaximumSet_Gen.json - */ -async function dataflowProfileDelete() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - await client.dataflowProfile.delete( - "rgiotoperations", - "resource-name123", - "resource-name123", - ); -} - -async function main() { - dataflowProfileDelete(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowProfileGetSample.ts b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowProfileGetSample.ts deleted file mode 100644 index 3f1c0cd20e95..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowProfileGetSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsClient } from "@azure/arm-iotoperations"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to get a DataflowProfileResource - * - * @summary get a DataflowProfileResource - * x-ms-original-file: 2024-09-15-preview/DataflowProfile_Get_MaximumSet_Gen.json - */ -async function dataflowProfileGet() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.dataflowProfile.get( - "rgiotoperations", - "resource-name123", - "resource-name123", - ); - console.log(result); -} - -async function main() { - dataflowProfileGet(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowProfileListByResourceGroupSample.ts b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowProfileListByResourceGroupSample.ts deleted file mode 100644 index e1c996594bf5..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowProfileListByResourceGroupSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsClient } from "@azure/arm-iotoperations"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to list DataflowProfileResource resources by InstanceResource - * - * @summary list DataflowProfileResource resources by InstanceResource - * x-ms-original-file: 2024-09-15-preview/DataflowProfile_ListByResourceGroup_MaximumSet_Gen.json - */ -async function dataflowProfileListByResourceGroup() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.dataflowProfile.listByResourceGroup( - "rgiotoperations", - "resource-name123", - )) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main() { - dataflowProfileListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/instanceCreateOrUpdateSample.ts b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/instanceCreateOrUpdateSample.ts deleted file mode 100644 index 81d732fd63dd..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/instanceCreateOrUpdateSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsClient } from "@azure/arm-iotoperations"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to create a InstanceResource - * - * @summary create a InstanceResource - * x-ms-original-file: 2024-09-15-preview/Instance_CreateOrUpdate_MaximumSet_Gen.json - */ -async function instanceCreateOrUpdate() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.instance.createOrUpdate( - "rgiotoperations", - "aio-instance", - { - properties: { - schemaRegistryRef: { - resourceId: - "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.DeviceRegistry/schemaRegistries/resource-name123", - }, - description: "kpqtgocs", - }, - extendedLocation: { - name: "qmbrfwcpwwhggszhrdjv", - type: "CustomLocation", - }, - identity: { type: "None", userAssignedIdentities: {} }, - tags: {}, - location: "xvewadyhycrjpu", - }, - ); - console.log(result); -} - -async function main() { - instanceCreateOrUpdate(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/instanceDeleteSample.ts b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/instanceDeleteSample.ts deleted file mode 100644 index 685dbe899f1a..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/instanceDeleteSample.ts +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsClient } from "@azure/arm-iotoperations"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to delete a InstanceResource - * - * @summary delete a InstanceResource - * x-ms-original-file: 2024-09-15-preview/Instance_Delete_MaximumSet_Gen.json - */ -async function instanceDelete() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - await client.instance.delete("rgiotoperations", "aio-instance"); -} - -async function main() { - instanceDelete(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/instanceGetSample.ts b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/instanceGetSample.ts deleted file mode 100644 index 76be3cc0966c..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/instanceGetSample.ts +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsClient } from "@azure/arm-iotoperations"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to get a InstanceResource - * - * @summary get a InstanceResource - * x-ms-original-file: 2024-09-15-preview/Instance_Get_MaximumSet_Gen.json - */ -async function instanceGet() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.instance.get("rgiotoperations", "aio-instance"); - console.log(result); -} - -async function main() { - instanceGet(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/instanceListByResourceGroupSample.ts b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/instanceListByResourceGroupSample.ts deleted file mode 100644 index 497ccc06003f..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/instanceListByResourceGroupSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsClient } from "@azure/arm-iotoperations"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to list InstanceResource resources by resource group - * - * @summary list InstanceResource resources by resource group - * x-ms-original-file: 2024-09-15-preview/Instance_ListByResourceGroup_MaximumSet_Gen.json - */ -async function instanceListByResourceGroup() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.instance.listByResourceGroup( - "rgiotoperations", - )) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main() { - instanceListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/instanceListBySubscriptionSample.ts b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/instanceListBySubscriptionSample.ts deleted file mode 100644 index 5c5fc9a85986..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/instanceListBySubscriptionSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsClient } from "@azure/arm-iotoperations"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to list InstanceResource resources by subscription ID - * - * @summary list InstanceResource resources by subscription ID - * x-ms-original-file: 2024-09-15-preview/Instance_ListBySubscription_MaximumSet_Gen.json - */ -async function instanceListBySubscription() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.instance.listBySubscription()) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main() { - instanceListBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/instanceUpdateSample.ts b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/instanceUpdateSample.ts deleted file mode 100644 index 518836b3f8e1..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/instanceUpdateSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsClient } from "@azure/arm-iotoperations"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to update a InstanceResource - * - * @summary update a InstanceResource - * x-ms-original-file: 2024-09-15-preview/Instance_Update_MaximumSet_Gen.json - */ -async function instanceUpdate() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const result = await client.instance.update( - "rgiotoperations", - "aio-instance", - { tags: {}, identity: { type: "None", userAssignedIdentities: {} } }, - ); - console.log(result); -} - -async function main() { - instanceUpdate(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/operationsListSample.ts b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/operationsListSample.ts deleted file mode 100644 index 9b918368ddd9..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/operationsListSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsClient } from "@azure/arm-iotoperations"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to list the operations for the provider - * - * @summary list the operations for the provider - * x-ms-original-file: 2024-09-15-preview/Operations_List_MaximumSet_Gen.json - */ -async function operationsList() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-00000000000"; - const client = new IoTOperationsClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.operations.list()) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main() { - operationsList(); -} - -main().catch(console.error); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/tsconfig.json b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/tsconfig.json deleted file mode 100644 index 984eed535aa8..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/tsconfig.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "compilerOptions": { - "target": "ES2020", - "module": "commonjs", - "moduleResolution": "node", - "resolveJsonModule": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "strict": true, - "alwaysStrict": true, - "outDir": "dist", - "rootDir": "src" - }, - "include": [ - "src/**/*.ts" - ] -} diff --git a/sdk/iotoperations/arm-iotoperations/src/api/broker/index.ts b/sdk/iotoperations/arm-iotoperations/src/api/broker/index.ts index 5697f1ca3a56..552ff397b5e6 100644 --- a/sdk/iotoperations/arm-iotoperations/src/api/broker/index.ts +++ b/sdk/iotoperations/arm-iotoperations/src/api/broker/index.ts @@ -15,11 +15,11 @@ import { _BrokerResourceListResult, _brokerResourceListResultDeserializer, } from "../../models/models.js"; -import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; import { PagedAsyncIterableIterator, buildPagedAsyncIterator, } from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; import { StreamableMethod, PathUncheckedResponse, @@ -122,21 +122,26 @@ export function brokerCreateOrUpdate( resource: BrokerResource, options: BrokerCreateOrUpdateOptionalParams = { requestOptions: {} }, ): PollerLike, BrokerResource> { - return getLongRunningPoller(context, _brokerCreateOrUpdateDeserialize, ["200", "201"], { - updateIntervalInMs: options?.updateIntervalInMs, - abortSignal: options?.abortSignal, - getInitialResponse: () => - _brokerCreateOrUpdateSend( - context, - subscriptionId, - resourceGroupName, - instanceName, - brokerName, - resource, - options, - ), - resourceLocationConfig: "azure-async-operation", - }) as PollerLike, BrokerResource>; + return getLongRunningPoller( + context, + _brokerCreateOrUpdateDeserialize, + ["200", "201"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _brokerCreateOrUpdateSend( + context, + subscriptionId, + resourceGroupName, + instanceName, + brokerName, + resource, + options, + ), + resourceLocationConfig: "azure-async-operation", + }, + ) as PollerLike, BrokerResource>; } export function _brokerDeleteSend( @@ -158,7 +163,9 @@ export function _brokerDeleteSend( .delete({ ...operationOptionsToRequestParameters(options) }); } -export async function _brokerDeleteDeserialize(result: PathUncheckedResponse): Promise { +export async function _brokerDeleteDeserialize( + result: PathUncheckedResponse, +): Promise { const expectedStatuses = ["202", "204", "200"]; if (!expectedStatuses.includes(result.status)) { throw createRestError(result); @@ -176,20 +183,25 @@ export function brokerDelete( brokerName: string, options: BrokerDeleteOptionalParams = { requestOptions: {} }, ): PollerLike, void> { - return getLongRunningPoller(context, _brokerDeleteDeserialize, ["202", "204", "200"], { - updateIntervalInMs: options?.updateIntervalInMs, - abortSignal: options?.abortSignal, - getInitialResponse: () => - _brokerDeleteSend( - context, - subscriptionId, - resourceGroupName, - instanceName, - brokerName, - options, - ), - resourceLocationConfig: "location", - }) as PollerLike, void>; + return getLongRunningPoller( + context, + _brokerDeleteDeserialize, + ["202", "204", "200"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _brokerDeleteSend( + context, + subscriptionId, + resourceGroupName, + instanceName, + brokerName, + options, + ), + resourceLocationConfig: "location", + }, + ) as PollerLike, void>; } export function _brokerListByResourceGroupSend( diff --git a/sdk/iotoperations/arm-iotoperations/src/api/brokerAuthentication/index.ts b/sdk/iotoperations/arm-iotoperations/src/api/brokerAuthentication/index.ts index 636bd17411cb..841eeabbd363 100644 --- a/sdk/iotoperations/arm-iotoperations/src/api/brokerAuthentication/index.ts +++ b/sdk/iotoperations/arm-iotoperations/src/api/brokerAuthentication/index.ts @@ -15,11 +15,11 @@ import { _BrokerAuthenticationResourceListResult, _brokerAuthenticationResourceListResultDeserializer, } from "../../models/models.js"; -import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; import { PagedAsyncIterableIterator, buildPagedAsyncIterator, } from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; import { StreamableMethod, PathUncheckedResponse, @@ -132,7 +132,10 @@ export function brokerAuthenticationCreateOrUpdate( options: BrokerAuthenticationCreateOrUpdateOptionalParams = { requestOptions: {}, }, -): PollerLike, BrokerAuthenticationResource> { +): PollerLike< + OperationState, + BrokerAuthenticationResource +> { return getLongRunningPoller( context, _brokerAuthenticationCreateOrUpdateDeserialize, @@ -153,7 +156,10 @@ export function brokerAuthenticationCreateOrUpdate( ), resourceLocationConfig: "azure-async-operation", }, - ) as PollerLike, BrokerAuthenticationResource>; + ) as PollerLike< + OperationState, + BrokerAuthenticationResource + >; } export function _brokerAuthenticationDeleteSend( diff --git a/sdk/iotoperations/arm-iotoperations/src/api/brokerAuthorization/index.ts b/sdk/iotoperations/arm-iotoperations/src/api/brokerAuthorization/index.ts index 1f501bb37059..4c1e4f41e108 100644 --- a/sdk/iotoperations/arm-iotoperations/src/api/brokerAuthorization/index.ts +++ b/sdk/iotoperations/arm-iotoperations/src/api/brokerAuthorization/index.ts @@ -15,11 +15,11 @@ import { _BrokerAuthorizationResourceListResult, _brokerAuthorizationResourceListResultDeserializer, } from "../../models/models.js"; -import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; import { PagedAsyncIterableIterator, buildPagedAsyncIterator, } from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; import { StreamableMethod, PathUncheckedResponse, @@ -132,7 +132,10 @@ export function brokerAuthorizationCreateOrUpdate( options: BrokerAuthorizationCreateOrUpdateOptionalParams = { requestOptions: {}, }, -): PollerLike, BrokerAuthorizationResource> { +): PollerLike< + OperationState, + BrokerAuthorizationResource +> { return getLongRunningPoller( context, _brokerAuthorizationCreateOrUpdateDeserialize, @@ -153,7 +156,10 @@ export function brokerAuthorizationCreateOrUpdate( ), resourceLocationConfig: "azure-async-operation", }, - ) as PollerLike, BrokerAuthorizationResource>; + ) as PollerLike< + OperationState, + BrokerAuthorizationResource + >; } export function _brokerAuthorizationDeleteSend( diff --git a/sdk/iotoperations/arm-iotoperations/src/api/brokerListener/index.ts b/sdk/iotoperations/arm-iotoperations/src/api/brokerListener/index.ts index 204480f1b6b1..17faa8f7b805 100644 --- a/sdk/iotoperations/arm-iotoperations/src/api/brokerListener/index.ts +++ b/sdk/iotoperations/arm-iotoperations/src/api/brokerListener/index.ts @@ -15,11 +15,11 @@ import { _BrokerListenerResourceListResult, _brokerListenerResourceListResultDeserializer, } from "../../models/models.js"; -import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; import { PagedAsyncIterableIterator, buildPagedAsyncIterator, } from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; import { StreamableMethod, PathUncheckedResponse, @@ -129,22 +129,30 @@ export function brokerListenerCreateOrUpdate( resource: BrokerListenerResource, options: BrokerListenerCreateOrUpdateOptionalParams = { requestOptions: {} }, ): PollerLike, BrokerListenerResource> { - return getLongRunningPoller(context, _brokerListenerCreateOrUpdateDeserialize, ["200", "201"], { - updateIntervalInMs: options?.updateIntervalInMs, - abortSignal: options?.abortSignal, - getInitialResponse: () => - _brokerListenerCreateOrUpdateSend( - context, - subscriptionId, - resourceGroupName, - instanceName, - brokerName, - listenerName, - resource, - options, - ), - resourceLocationConfig: "azure-async-operation", - }) as PollerLike, BrokerListenerResource>; + return getLongRunningPoller( + context, + _brokerListenerCreateOrUpdateDeserialize, + ["200", "201"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _brokerListenerCreateOrUpdateSend( + context, + subscriptionId, + resourceGroupName, + instanceName, + brokerName, + listenerName, + resource, + options, + ), + resourceLocationConfig: "azure-async-operation", + }, + ) as PollerLike< + OperationState, + BrokerListenerResource + >; } export function _brokerListenerDeleteSend( @@ -189,21 +197,26 @@ export function brokerListenerDelete( listenerName: string, options: BrokerListenerDeleteOptionalParams = { requestOptions: {} }, ): PollerLike, void> { - return getLongRunningPoller(context, _brokerListenerDeleteDeserialize, ["202", "204", "200"], { - updateIntervalInMs: options?.updateIntervalInMs, - abortSignal: options?.abortSignal, - getInitialResponse: () => - _brokerListenerDeleteSend( - context, - subscriptionId, - resourceGroupName, - instanceName, - brokerName, - listenerName, - options, - ), - resourceLocationConfig: "location", - }) as PollerLike, void>; + return getLongRunningPoller( + context, + _brokerListenerDeleteDeserialize, + ["202", "204", "200"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _brokerListenerDeleteSend( + context, + subscriptionId, + resourceGroupName, + instanceName, + brokerName, + listenerName, + options, + ), + resourceLocationConfig: "location", + }, + ) as PollerLike, void>; } export function _brokerListenerListByResourceGroupSend( diff --git a/sdk/iotoperations/arm-iotoperations/src/api/dataflow/index.ts b/sdk/iotoperations/arm-iotoperations/src/api/dataflow/index.ts index d0edba7d3f33..a69ac41dcd04 100644 --- a/sdk/iotoperations/arm-iotoperations/src/api/dataflow/index.ts +++ b/sdk/iotoperations/arm-iotoperations/src/api/dataflow/index.ts @@ -15,11 +15,11 @@ import { _DataflowResourceListResult, _dataflowResourceListResultDeserializer, } from "../../models/models.js"; -import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; import { PagedAsyncIterableIterator, buildPagedAsyncIterator, } from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; import { StreamableMethod, PathUncheckedResponse, @@ -129,22 +129,27 @@ export function dataflowCreateOrUpdate( resource: DataflowResource, options: DataflowCreateOrUpdateOptionalParams = { requestOptions: {} }, ): PollerLike, DataflowResource> { - return getLongRunningPoller(context, _dataflowCreateOrUpdateDeserialize, ["200", "201"], { - updateIntervalInMs: options?.updateIntervalInMs, - abortSignal: options?.abortSignal, - getInitialResponse: () => - _dataflowCreateOrUpdateSend( - context, - subscriptionId, - resourceGroupName, - instanceName, - dataflowProfileName, - dataflowName, - resource, - options, - ), - resourceLocationConfig: "azure-async-operation", - }) as PollerLike, DataflowResource>; + return getLongRunningPoller( + context, + _dataflowCreateOrUpdateDeserialize, + ["200", "201"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _dataflowCreateOrUpdateSend( + context, + subscriptionId, + resourceGroupName, + instanceName, + dataflowProfileName, + dataflowName, + resource, + options, + ), + resourceLocationConfig: "azure-async-operation", + }, + ) as PollerLike, DataflowResource>; } export function _dataflowDeleteSend( @@ -168,7 +173,9 @@ export function _dataflowDeleteSend( .delete({ ...operationOptionsToRequestParameters(options) }); } -export async function _dataflowDeleteDeserialize(result: PathUncheckedResponse): Promise { +export async function _dataflowDeleteDeserialize( + result: PathUncheckedResponse, +): Promise { const expectedStatuses = ["202", "204", "200"]; if (!expectedStatuses.includes(result.status)) { throw createRestError(result); @@ -187,21 +194,26 @@ export function dataflowDelete( dataflowName: string, options: DataflowDeleteOptionalParams = { requestOptions: {} }, ): PollerLike, void> { - return getLongRunningPoller(context, _dataflowDeleteDeserialize, ["202", "204", "200"], { - updateIntervalInMs: options?.updateIntervalInMs, - abortSignal: options?.abortSignal, - getInitialResponse: () => - _dataflowDeleteSend( - context, - subscriptionId, - resourceGroupName, - instanceName, - dataflowProfileName, - dataflowName, - options, - ), - resourceLocationConfig: "location", - }) as PollerLike, void>; + return getLongRunningPoller( + context, + _dataflowDeleteDeserialize, + ["202", "204", "200"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _dataflowDeleteSend( + context, + subscriptionId, + resourceGroupName, + instanceName, + dataflowProfileName, + dataflowName, + options, + ), + resourceLocationConfig: "location", + }, + ) as PollerLike, void>; } export function _dataflowListByResourceGroupSend( diff --git a/sdk/iotoperations/arm-iotoperations/src/api/dataflowEndpoint/index.ts b/sdk/iotoperations/arm-iotoperations/src/api/dataflowEndpoint/index.ts index c25a3791af67..47602a3cb586 100644 --- a/sdk/iotoperations/arm-iotoperations/src/api/dataflowEndpoint/index.ts +++ b/sdk/iotoperations/arm-iotoperations/src/api/dataflowEndpoint/index.ts @@ -15,11 +15,11 @@ import { _DataflowEndpointResourceListResult, _dataflowEndpointResourceListResultDeserializer, } from "../../models/models.js"; -import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; import { PagedAsyncIterableIterator, buildPagedAsyncIterator, } from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; import { StreamableMethod, PathUncheckedResponse, @@ -125,22 +125,33 @@ export function dataflowEndpointCreateOrUpdate( options: DataflowEndpointCreateOrUpdateOptionalParams = { requestOptions: {}, }, -): PollerLike, DataflowEndpointResource> { - return getLongRunningPoller(context, _dataflowEndpointCreateOrUpdateDeserialize, ["200", "201"], { - updateIntervalInMs: options?.updateIntervalInMs, - abortSignal: options?.abortSignal, - getInitialResponse: () => - _dataflowEndpointCreateOrUpdateSend( - context, - subscriptionId, - resourceGroupName, - instanceName, - dataflowEndpointName, - resource, - options, - ), - resourceLocationConfig: "azure-async-operation", - }) as PollerLike, DataflowEndpointResource>; +): PollerLike< + OperationState, + DataflowEndpointResource +> { + return getLongRunningPoller( + context, + _dataflowEndpointCreateOrUpdateDeserialize, + ["200", "201"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _dataflowEndpointCreateOrUpdateSend( + context, + subscriptionId, + resourceGroupName, + instanceName, + dataflowEndpointName, + resource, + options, + ), + resourceLocationConfig: "azure-async-operation", + }, + ) as PollerLike< + OperationState, + DataflowEndpointResource + >; } export function _dataflowEndpointDeleteSend( @@ -182,20 +193,25 @@ export function dataflowEndpointDelete( dataflowEndpointName: string, options: DataflowEndpointDeleteOptionalParams = { requestOptions: {} }, ): PollerLike, void> { - return getLongRunningPoller(context, _dataflowEndpointDeleteDeserialize, ["202", "204", "200"], { - updateIntervalInMs: options?.updateIntervalInMs, - abortSignal: options?.abortSignal, - getInitialResponse: () => - _dataflowEndpointDeleteSend( - context, - subscriptionId, - resourceGroupName, - instanceName, - dataflowEndpointName, - options, - ), - resourceLocationConfig: "location", - }) as PollerLike, void>; + return getLongRunningPoller( + context, + _dataflowEndpointDeleteDeserialize, + ["202", "204", "200"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _dataflowEndpointDeleteSend( + context, + subscriptionId, + resourceGroupName, + instanceName, + dataflowEndpointName, + options, + ), + resourceLocationConfig: "location", + }, + ) as PollerLike, void>; } export function _dataflowEndpointListByResourceGroupSend( diff --git a/sdk/iotoperations/arm-iotoperations/src/api/dataflowProfile/index.ts b/sdk/iotoperations/arm-iotoperations/src/api/dataflowProfile/index.ts index 9660c8089ede..0cfddc51f6e9 100644 --- a/sdk/iotoperations/arm-iotoperations/src/api/dataflowProfile/index.ts +++ b/sdk/iotoperations/arm-iotoperations/src/api/dataflowProfile/index.ts @@ -15,11 +15,11 @@ import { _DataflowProfileResourceListResult, _dataflowProfileResourceListResultDeserializer, } from "../../models/models.js"; -import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; import { PagedAsyncIterableIterator, buildPagedAsyncIterator, } from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; import { StreamableMethod, PathUncheckedResponse, @@ -121,22 +121,33 @@ export function dataflowProfileCreateOrUpdate( dataflowProfileName: string, resource: DataflowProfileResource, options: DataflowProfileCreateOrUpdateOptionalParams = { requestOptions: {} }, -): PollerLike, DataflowProfileResource> { - return getLongRunningPoller(context, _dataflowProfileCreateOrUpdateDeserialize, ["200", "201"], { - updateIntervalInMs: options?.updateIntervalInMs, - abortSignal: options?.abortSignal, - getInitialResponse: () => - _dataflowProfileCreateOrUpdateSend( - context, - subscriptionId, - resourceGroupName, - instanceName, - dataflowProfileName, - resource, - options, - ), - resourceLocationConfig: "azure-async-operation", - }) as PollerLike, DataflowProfileResource>; +): PollerLike< + OperationState, + DataflowProfileResource +> { + return getLongRunningPoller( + context, + _dataflowProfileCreateOrUpdateDeserialize, + ["200", "201"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _dataflowProfileCreateOrUpdateSend( + context, + subscriptionId, + resourceGroupName, + instanceName, + dataflowProfileName, + resource, + options, + ), + resourceLocationConfig: "azure-async-operation", + }, + ) as PollerLike< + OperationState, + DataflowProfileResource + >; } export function _dataflowProfileDeleteSend( @@ -178,20 +189,25 @@ export function dataflowProfileDelete( dataflowProfileName: string, options: DataflowProfileDeleteOptionalParams = { requestOptions: {} }, ): PollerLike, void> { - return getLongRunningPoller(context, _dataflowProfileDeleteDeserialize, ["202", "204", "200"], { - updateIntervalInMs: options?.updateIntervalInMs, - abortSignal: options?.abortSignal, - getInitialResponse: () => - _dataflowProfileDeleteSend( - context, - subscriptionId, - resourceGroupName, - instanceName, - dataflowProfileName, - options, - ), - resourceLocationConfig: "location", - }) as PollerLike, void>; + return getLongRunningPoller( + context, + _dataflowProfileDeleteDeserialize, + ["202", "204", "200"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _dataflowProfileDeleteSend( + context, + subscriptionId, + resourceGroupName, + instanceName, + dataflowProfileName, + options, + ), + resourceLocationConfig: "location", + }, + ) as PollerLike, void>; } export function _dataflowProfileListByResourceGroupSend( diff --git a/sdk/iotoperations/arm-iotoperations/src/api/instance/index.ts b/sdk/iotoperations/arm-iotoperations/src/api/instance/index.ts index 777521d3c37a..6f0ffb073db2 100644 --- a/sdk/iotoperations/arm-iotoperations/src/api/instance/index.ts +++ b/sdk/iotoperations/arm-iotoperations/src/api/instance/index.ts @@ -19,11 +19,11 @@ import { _InstanceResourceListResult, _instanceResourceListResultDeserializer, } from "../../models/models.js"; -import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; import { PagedAsyncIterableIterator, buildPagedAsyncIterator, } from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; import { StreamableMethod, PathUncheckedResponse, @@ -119,20 +119,25 @@ export function instanceCreateOrUpdate( resource: InstanceResource, options: InstanceCreateOrUpdateOptionalParams = { requestOptions: {} }, ): PollerLike, InstanceResource> { - return getLongRunningPoller(context, _instanceCreateOrUpdateDeserialize, ["200", "201"], { - updateIntervalInMs: options?.updateIntervalInMs, - abortSignal: options?.abortSignal, - getInitialResponse: () => - _instanceCreateOrUpdateSend( - context, - subscriptionId, - resourceGroupName, - instanceName, - resource, - options, - ), - resourceLocationConfig: "azure-async-operation", - }) as PollerLike, InstanceResource>; + return getLongRunningPoller( + context, + _instanceCreateOrUpdateDeserialize, + ["200", "201"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _instanceCreateOrUpdateSend( + context, + subscriptionId, + resourceGroupName, + instanceName, + resource, + options, + ), + resourceLocationConfig: "azure-async-operation", + }, + ) as PollerLike, InstanceResource>; } export function _instanceUpdateSend( @@ -204,7 +209,9 @@ export function _instanceDeleteSend( .delete({ ...operationOptionsToRequestParameters(options) }); } -export async function _instanceDeleteDeserialize(result: PathUncheckedResponse): Promise { +export async function _instanceDeleteDeserialize( + result: PathUncheckedResponse, +): Promise { const expectedStatuses = ["202", "204", "200"]; if (!expectedStatuses.includes(result.status)) { throw createRestError(result); @@ -221,13 +228,24 @@ export function instanceDelete( instanceName: string, options: InstanceDeleteOptionalParams = { requestOptions: {} }, ): PollerLike, void> { - return getLongRunningPoller(context, _instanceDeleteDeserialize, ["202", "204", "200"], { - updateIntervalInMs: options?.updateIntervalInMs, - abortSignal: options?.abortSignal, - getInitialResponse: () => - _instanceDeleteSend(context, subscriptionId, resourceGroupName, instanceName, options), - resourceLocationConfig: "location", - }) as PollerLike, void>; + return getLongRunningPoller( + context, + _instanceDeleteDeserialize, + ["202", "204", "200"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _instanceDeleteSend( + context, + subscriptionId, + resourceGroupName, + instanceName, + options, + ), + resourceLocationConfig: "location", + }, + ) as PollerLike, void>; } export function _instanceListByResourceGroupSend( @@ -265,7 +283,13 @@ export function instanceListByResourceGroup( ): PagedAsyncIterableIterator { return buildPagedAsyncIterator( context, - () => _instanceListByResourceGroupSend(context, subscriptionId, resourceGroupName, options), + () => + _instanceListByResourceGroupSend( + context, + subscriptionId, + resourceGroupName, + options, + ), _instanceListByResourceGroupDeserialize, ["200"], { itemName: "value", nextLinkName: "nextLink" }, diff --git a/sdk/iotoperations/arm-iotoperations/src/api/ioTOperationsContext.ts b/sdk/iotoperations/arm-iotoperations/src/api/ioTOperationsContext.ts index 7481927f7280..083716c77626 100644 --- a/sdk/iotoperations/arm-iotoperations/src/api/ioTOperationsContext.ts +++ b/sdk/iotoperations/arm-iotoperations/src/api/ioTOperationsContext.ts @@ -2,6 +2,7 @@ // Licensed under the MIT License. import { logger } from "../logger.js"; +import { KnownVersions } from "../models/models.js"; import { Client, ClientOptions, getClient } from "@azure-rest/core-client"; import { TokenCredential } from "@azure/core-auth"; @@ -11,6 +12,7 @@ export interface IoTOperationsContext extends Client {} /** Optional parameters for the client. */ export interface IoTOperationsClientOptionalParams extends ClientOptions { /** The API version to use for this operation. */ + /** Known values of {@link KnownVersions} that the service accepts. */ apiVersion?: string; } @@ -19,10 +21,10 @@ export function createIoTOperations( credential: TokenCredential, options: IoTOperationsClientOptionalParams = {}, ): IoTOperationsContext { - const endpointUrl = options.endpoint ?? options.baseUrl ?? `https://management.azure.com`; - + const endpointUrl = + options.endpoint ?? options.baseUrl ?? `https://management.azure.com`; const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix; - const userAgentInfo = `azsdk-js-arm-iotoperations/1.0.0-beta.2`; + const userAgentInfo = `azsdk-js-arm-iotoperations/1.0.0-beta.1`; const userAgentPrefix = prefixFromOptions ? `${prefixFromOptions} azsdk-js-api ${userAgentInfo}` : `azsdk-js-api ${userAgentInfo}`; @@ -36,7 +38,7 @@ export function createIoTOperations( }; const clientContext = getClient(endpointUrl, credential, updatedOptions); clientContext.pipeline.removePolicy({ name: "ApiVersionPolicy" }); - const apiVersion = options.apiVersion ?? "2024-09-15-preview"; + const apiVersion = options.apiVersion ?? "2024-11-01"; clientContext.pipeline.addPolicy({ name: "ClientApiVersionPolicy", sendRequest: (req, next) => { diff --git a/sdk/iotoperations/arm-iotoperations/src/api/operations/index.ts b/sdk/iotoperations/arm-iotoperations/src/api/operations/index.ts index 62b622776b8b..208d724f5fea 100644 --- a/sdk/iotoperations/arm-iotoperations/src/api/operations/index.ts +++ b/sdk/iotoperations/arm-iotoperations/src/api/operations/index.ts @@ -1,7 +1,10 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { IoTOperationsContext as Client, OperationsListOptionalParams } from "../index.js"; +import { + IoTOperationsContext as Client, + OperationsListOptionalParams, +} from "../index.js"; import { _OperationListResult, _operationListResultDeserializer, diff --git a/sdk/iotoperations/arm-iotoperations/src/api/options.ts b/sdk/iotoperations/arm-iotoperations/src/api/options.ts index e4fb02798e93..9bf064932f9f 100644 --- a/sdk/iotoperations/arm-iotoperations/src/api/options.ts +++ b/sdk/iotoperations/arm-iotoperations/src/api/options.ts @@ -25,10 +25,12 @@ export interface InstanceDeleteOptionalParams extends OperationOptions { } /** Optional parameters. */ -export interface InstanceListByResourceGroupOptionalParams extends OperationOptions {} +export interface InstanceListByResourceGroupOptionalParams + extends OperationOptions {} /** Optional parameters. */ -export interface InstanceListBySubscriptionOptionalParams extends OperationOptions {} +export interface InstanceListBySubscriptionOptionalParams + extends OperationOptions {} /** Optional parameters. */ export interface BrokerGetOptionalParams extends OperationOptions {} @@ -46,13 +48,15 @@ export interface BrokerDeleteOptionalParams extends OperationOptions { } /** Optional parameters. */ -export interface BrokerListByResourceGroupOptionalParams extends OperationOptions {} +export interface BrokerListByResourceGroupOptionalParams + extends OperationOptions {} /** Optional parameters. */ export interface BrokerListenerGetOptionalParams extends OperationOptions {} /** Optional parameters. */ -export interface BrokerListenerCreateOrUpdateOptionalParams extends OperationOptions { +export interface BrokerListenerCreateOrUpdateOptionalParams + extends OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; } @@ -64,49 +68,59 @@ export interface BrokerListenerDeleteOptionalParams extends OperationOptions { } /** Optional parameters. */ -export interface BrokerListenerListByResourceGroupOptionalParams extends OperationOptions {} +export interface BrokerListenerListByResourceGroupOptionalParams + extends OperationOptions {} /** Optional parameters. */ -export interface BrokerAuthenticationGetOptionalParams extends OperationOptions {} +export interface BrokerAuthenticationGetOptionalParams + extends OperationOptions {} /** Optional parameters. */ -export interface BrokerAuthenticationCreateOrUpdateOptionalParams extends OperationOptions { +export interface BrokerAuthenticationCreateOrUpdateOptionalParams + extends OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; } /** Optional parameters. */ -export interface BrokerAuthenticationDeleteOptionalParams extends OperationOptions { +export interface BrokerAuthenticationDeleteOptionalParams + extends OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; } /** Optional parameters. */ -export interface BrokerAuthenticationListByResourceGroupOptionalParams extends OperationOptions {} +export interface BrokerAuthenticationListByResourceGroupOptionalParams + extends OperationOptions {} /** Optional parameters. */ -export interface BrokerAuthorizationGetOptionalParams extends OperationOptions {} +export interface BrokerAuthorizationGetOptionalParams + extends OperationOptions {} /** Optional parameters. */ -export interface BrokerAuthorizationCreateOrUpdateOptionalParams extends OperationOptions { +export interface BrokerAuthorizationCreateOrUpdateOptionalParams + extends OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; } /** Optional parameters. */ -export interface BrokerAuthorizationDeleteOptionalParams extends OperationOptions { +export interface BrokerAuthorizationDeleteOptionalParams + extends OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; } /** Optional parameters. */ -export interface BrokerAuthorizationListByResourceGroupOptionalParams extends OperationOptions {} +export interface BrokerAuthorizationListByResourceGroupOptionalParams + extends OperationOptions {} /** Optional parameters. */ export interface DataflowProfileGetOptionalParams extends OperationOptions {} /** Optional parameters. */ -export interface DataflowProfileCreateOrUpdateOptionalParams extends OperationOptions { +export interface DataflowProfileCreateOrUpdateOptionalParams + extends OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; } @@ -118,7 +132,8 @@ export interface DataflowProfileDeleteOptionalParams extends OperationOptions { } /** Optional parameters. */ -export interface DataflowProfileListByResourceGroupOptionalParams extends OperationOptions {} +export interface DataflowProfileListByResourceGroupOptionalParams + extends OperationOptions {} /** Optional parameters. */ export interface DataflowGetOptionalParams extends OperationOptions {} @@ -136,13 +151,15 @@ export interface DataflowDeleteOptionalParams extends OperationOptions { } /** Optional parameters. */ -export interface DataflowListByResourceGroupOptionalParams extends OperationOptions {} +export interface DataflowListByResourceGroupOptionalParams + extends OperationOptions {} /** Optional parameters. */ export interface DataflowEndpointGetOptionalParams extends OperationOptions {} /** Optional parameters. */ -export interface DataflowEndpointCreateOrUpdateOptionalParams extends OperationOptions { +export interface DataflowEndpointCreateOrUpdateOptionalParams + extends OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; } @@ -154,4 +171,5 @@ export interface DataflowEndpointDeleteOptionalParams extends OperationOptions { } /** Optional parameters. */ -export interface DataflowEndpointListByResourceGroupOptionalParams extends OperationOptions {} +export interface DataflowEndpointListByResourceGroupOptionalParams + extends OperationOptions {} diff --git a/sdk/iotoperations/arm-iotoperations/src/classic/broker/index.ts b/sdk/iotoperations/arm-iotoperations/src/classic/broker/index.ts index 22960939f743..c1dd4e63f025 100644 --- a/sdk/iotoperations/arm-iotoperations/src/classic/broker/index.ts +++ b/sdk/iotoperations/arm-iotoperations/src/classic/broker/index.ts @@ -50,14 +50,25 @@ export interface BrokerOperations { ) => PagedAsyncIterableIterator; } -export function getBroker(context: IoTOperationsContext, subscriptionId: string) { +export function getBroker( + context: IoTOperationsContext, + subscriptionId: string, +) { return { get: ( resourceGroupName: string, instanceName: string, brokerName: string, options?: BrokerGetOptionalParams, - ) => brokerGet(context, subscriptionId, resourceGroupName, instanceName, brokerName, options), + ) => + brokerGet( + context, + subscriptionId, + resourceGroupName, + instanceName, + brokerName, + options, + ), createOrUpdate: ( resourceGroupName: string, instanceName: string, @@ -80,13 +91,26 @@ export function getBroker(context: IoTOperationsContext, subscriptionId: string) brokerName: string, options?: BrokerDeleteOptionalParams, ) => - brokerDelete(context, subscriptionId, resourceGroupName, instanceName, brokerName, options), + brokerDelete( + context, + subscriptionId, + resourceGroupName, + instanceName, + brokerName, + options, + ), listByResourceGroup: ( resourceGroupName: string, instanceName: string, options?: BrokerListByResourceGroupOptionalParams, ) => - brokerListByResourceGroup(context, subscriptionId, resourceGroupName, instanceName, options), + brokerListByResourceGroup( + context, + subscriptionId, + resourceGroupName, + instanceName, + options, + ), }; } diff --git a/sdk/iotoperations/arm-iotoperations/src/classic/brokerAuthentication/index.ts b/sdk/iotoperations/arm-iotoperations/src/classic/brokerAuthentication/index.ts index 012b9e785092..3935a6e0ee5a 100644 --- a/sdk/iotoperations/arm-iotoperations/src/classic/brokerAuthentication/index.ts +++ b/sdk/iotoperations/arm-iotoperations/src/classic/brokerAuthentication/index.ts @@ -36,7 +36,10 @@ export interface BrokerAuthenticationOperations { authenticationName: string, resource: BrokerAuthenticationResource, options?: BrokerAuthenticationCreateOrUpdateOptionalParams, - ) => PollerLike, BrokerAuthenticationResource>; + ) => PollerLike< + OperationState, + BrokerAuthenticationResource + >; /** Delete a BrokerAuthenticationResource */ delete: ( resourceGroupName: string, @@ -54,7 +57,10 @@ export interface BrokerAuthenticationOperations { ) => PagedAsyncIterableIterator; } -export function getBrokerAuthentication(context: IoTOperationsContext, subscriptionId: string) { +export function getBrokerAuthentication( + context: IoTOperationsContext, + subscriptionId: string, +) { return { get: ( resourceGroupName: string, diff --git a/sdk/iotoperations/arm-iotoperations/src/classic/brokerAuthorization/index.ts b/sdk/iotoperations/arm-iotoperations/src/classic/brokerAuthorization/index.ts index c9019ad25d9d..bd313e6145dd 100644 --- a/sdk/iotoperations/arm-iotoperations/src/classic/brokerAuthorization/index.ts +++ b/sdk/iotoperations/arm-iotoperations/src/classic/brokerAuthorization/index.ts @@ -36,7 +36,10 @@ export interface BrokerAuthorizationOperations { authorizationName: string, resource: BrokerAuthorizationResource, options?: BrokerAuthorizationCreateOrUpdateOptionalParams, - ) => PollerLike, BrokerAuthorizationResource>; + ) => PollerLike< + OperationState, + BrokerAuthorizationResource + >; /** Delete a BrokerAuthorizationResource */ delete: ( resourceGroupName: string, @@ -54,7 +57,10 @@ export interface BrokerAuthorizationOperations { ) => PagedAsyncIterableIterator; } -export function getBrokerAuthorization(context: IoTOperationsContext, subscriptionId: string) { +export function getBrokerAuthorization( + context: IoTOperationsContext, + subscriptionId: string, +) { return { get: ( resourceGroupName: string, diff --git a/sdk/iotoperations/arm-iotoperations/src/classic/brokerListener/index.ts b/sdk/iotoperations/arm-iotoperations/src/classic/brokerListener/index.ts index 434e5686682e..e0ceb6d11501 100644 --- a/sdk/iotoperations/arm-iotoperations/src/classic/brokerListener/index.ts +++ b/sdk/iotoperations/arm-iotoperations/src/classic/brokerListener/index.ts @@ -36,7 +36,10 @@ export interface BrokerListenerOperations { listenerName: string, resource: BrokerListenerResource, options?: BrokerListenerCreateOrUpdateOptionalParams, - ) => PollerLike, BrokerListenerResource>; + ) => PollerLike< + OperationState, + BrokerListenerResource + >; /** Delete a BrokerListenerResource */ delete: ( resourceGroupName: string, @@ -54,7 +57,10 @@ export interface BrokerListenerOperations { ) => PagedAsyncIterableIterator; } -export function getBrokerListener(context: IoTOperationsContext, subscriptionId: string) { +export function getBrokerListener( + context: IoTOperationsContext, + subscriptionId: string, +) { return { get: ( resourceGroupName: string, diff --git a/sdk/iotoperations/arm-iotoperations/src/classic/dataflow/index.ts b/sdk/iotoperations/arm-iotoperations/src/classic/dataflow/index.ts index ee96b8637375..a1cfcc085742 100644 --- a/sdk/iotoperations/arm-iotoperations/src/classic/dataflow/index.ts +++ b/sdk/iotoperations/arm-iotoperations/src/classic/dataflow/index.ts @@ -54,7 +54,10 @@ export interface DataflowOperations { ) => PagedAsyncIterableIterator; } -export function getDataflow(context: IoTOperationsContext, subscriptionId: string) { +export function getDataflow( + context: IoTOperationsContext, + subscriptionId: string, +) { return { get: ( resourceGroupName: string, diff --git a/sdk/iotoperations/arm-iotoperations/src/classic/dataflowEndpoint/index.ts b/sdk/iotoperations/arm-iotoperations/src/classic/dataflowEndpoint/index.ts index 8acb2a0dd8c0..dd8273a604a8 100644 --- a/sdk/iotoperations/arm-iotoperations/src/classic/dataflowEndpoint/index.ts +++ b/sdk/iotoperations/arm-iotoperations/src/classic/dataflowEndpoint/index.ts @@ -34,7 +34,10 @@ export interface DataflowEndpointOperations { dataflowEndpointName: string, resource: DataflowEndpointResource, options?: DataflowEndpointCreateOrUpdateOptionalParams, - ) => PollerLike, DataflowEndpointResource>; + ) => PollerLike< + OperationState, + DataflowEndpointResource + >; /** Delete a DataflowEndpointResource */ delete: ( resourceGroupName: string, @@ -50,7 +53,10 @@ export interface DataflowEndpointOperations { ) => PagedAsyncIterableIterator; } -export function getDataflowEndpoint(context: IoTOperationsContext, subscriptionId: string) { +export function getDataflowEndpoint( + context: IoTOperationsContext, + subscriptionId: string, +) { return { get: ( resourceGroupName: string, diff --git a/sdk/iotoperations/arm-iotoperations/src/classic/dataflowProfile/index.ts b/sdk/iotoperations/arm-iotoperations/src/classic/dataflowProfile/index.ts index 6ec2a1760f6f..0123bfdc1238 100644 --- a/sdk/iotoperations/arm-iotoperations/src/classic/dataflowProfile/index.ts +++ b/sdk/iotoperations/arm-iotoperations/src/classic/dataflowProfile/index.ts @@ -34,7 +34,10 @@ export interface DataflowProfileOperations { dataflowProfileName: string, resource: DataflowProfileResource, options?: DataflowProfileCreateOrUpdateOptionalParams, - ) => PollerLike, DataflowProfileResource>; + ) => PollerLike< + OperationState, + DataflowProfileResource + >; /** Delete a DataflowProfileResource */ delete: ( resourceGroupName: string, @@ -50,7 +53,10 @@ export interface DataflowProfileOperations { ) => PagedAsyncIterableIterator; } -export function getDataflowProfile(context: IoTOperationsContext, subscriptionId: string) { +export function getDataflowProfile( + context: IoTOperationsContext, + subscriptionId: string, +) { return { get: ( resourceGroupName: string, diff --git a/sdk/iotoperations/arm-iotoperations/src/classic/instance/index.ts b/sdk/iotoperations/arm-iotoperations/src/classic/instance/index.ts index 0b5944a16ff0..0c91fab50f8b 100644 --- a/sdk/iotoperations/arm-iotoperations/src/classic/instance/index.ts +++ b/sdk/iotoperations/arm-iotoperations/src/classic/instance/index.ts @@ -61,10 +61,23 @@ export interface InstanceOperations { ) => PagedAsyncIterableIterator; } -export function getInstance(context: IoTOperationsContext, subscriptionId: string) { +export function getInstance( + context: IoTOperationsContext, + subscriptionId: string, +) { return { - get: (resourceGroupName: string, instanceName: string, options?: InstanceGetOptionalParams) => - instanceGet(context, subscriptionId, resourceGroupName, instanceName, options), + get: ( + resourceGroupName: string, + instanceName: string, + options?: InstanceGetOptionalParams, + ) => + instanceGet( + context, + subscriptionId, + resourceGroupName, + instanceName, + options, + ), createOrUpdate: ( resourceGroupName: string, instanceName: string, @@ -85,16 +98,36 @@ export function getInstance(context: IoTOperationsContext, subscriptionId: strin properties: InstancePatchModel, options?: InstanceUpdateOptionalParams, ) => - instanceUpdate(context, subscriptionId, resourceGroupName, instanceName, properties, options), + instanceUpdate( + context, + subscriptionId, + resourceGroupName, + instanceName, + properties, + options, + ), delete: ( resourceGroupName: string, instanceName: string, options?: InstanceDeleteOptionalParams, - ) => instanceDelete(context, subscriptionId, resourceGroupName, instanceName, options), + ) => + instanceDelete( + context, + subscriptionId, + resourceGroupName, + instanceName, + options, + ), listByResourceGroup: ( resourceGroupName: string, options?: InstanceListByResourceGroupOptionalParams, - ) => instanceListByResourceGroup(context, subscriptionId, resourceGroupName, options), + ) => + instanceListByResourceGroup( + context, + subscriptionId, + resourceGroupName, + options, + ), listBySubscription: (options?: InstanceListBySubscriptionOptionalParams) => instanceListBySubscription(context, subscriptionId, options), }; diff --git a/sdk/iotoperations/arm-iotoperations/src/classic/operations/index.ts b/sdk/iotoperations/arm-iotoperations/src/classic/operations/index.ts index a5bcde30056e..f6118ea4d46c 100644 --- a/sdk/iotoperations/arm-iotoperations/src/classic/operations/index.ts +++ b/sdk/iotoperations/arm-iotoperations/src/classic/operations/index.ts @@ -10,16 +10,21 @@ import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.j /** Interface representing a Operations operations. */ export interface OperationsOperations { /** List the operations for the provider */ - list: (options?: OperationsListOptionalParams) => PagedAsyncIterableIterator; + list: ( + options?: OperationsListOptionalParams, + ) => PagedAsyncIterableIterator; } export function getOperations(context: IoTOperationsContext) { return { - list: (options?: OperationsListOptionalParams) => operationsList(context, options), + list: (options?: OperationsListOptionalParams) => + operationsList(context, options), }; } -export function getOperationsOperations(context: IoTOperationsContext): OperationsOperations { +export function getOperationsOperations( + context: IoTOperationsContext, +): OperationsOperations { return { ...getOperations(context), }; diff --git a/sdk/iotoperations/arm-iotoperations/src/helpers/serializerHelpers.ts b/sdk/iotoperations/arm-iotoperations/src/helpers/serializerHelpers.ts index 7518a16c2ee9..4baaac77c8be 100644 --- a/sdk/iotoperations/arm-iotoperations/src/helpers/serializerHelpers.ts +++ b/sdk/iotoperations/arm-iotoperations/src/helpers/serializerHelpers.ts @@ -1,9 +1,10 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -export function serializeRecord( - item: Record, -): Record; +export function serializeRecord< + T extends string | number | boolean | Date | null, + R, +>(item: Record): Record; export function serializeRecord( item: Record, serializer: (item: T) => R, @@ -32,5 +33,8 @@ export function serializeRecord( } function isSupportedRecordType(t: any) { - return ["number", "string", "boolean", "null"].includes(typeof t) || t instanceof Date; + return ( + ["number", "string", "boolean", "null"].includes(typeof t) || + t instanceof Date + ); } diff --git a/sdk/iotoperations/arm-iotoperations/src/index.ts b/sdk/iotoperations/arm-iotoperations/src/index.ts index 59e129c7c0c7..355506976c18 100644 --- a/sdk/iotoperations/arm-iotoperations/src/index.ts +++ b/sdk/iotoperations/arm-iotoperations/src/index.ts @@ -16,33 +16,27 @@ export { EndpointType, DataflowEndpointDataExplorer, DataflowEndpointDataExplorerAuthentication, + KnownDataExplorerAuthMethod, DataExplorerAuthMethod, - KnownManagedIdentityMethod, - ManagedIdentityMethod, DataflowEndpointAuthenticationSystemAssignedManagedIdentity, DataflowEndpointAuthenticationUserAssignedManagedIdentity, BatchingConfiguration, DataflowEndpointDataLakeStorage, DataflowEndpointDataLakeStorageAuthentication, + KnownDataLakeStorageAuthMethod, DataLakeStorageAuthMethod, - KnownAccessTokenMethod, - AccessTokenMethod, DataflowEndpointAuthenticationAccessToken, DataflowEndpointFabricOneLake, DataflowEndpointFabricOneLakeAuthentication, + KnownFabricOneLakeAuthMethod, FabricOneLakeAuthMethod, DataflowEndpointFabricOneLakeNames, KnownDataflowEndpointFabricPathType, DataflowEndpointFabricPathType, DataflowEndpointKafka, DataflowEndpointKafkaAuthentication, + KnownKafkaAuthMethod, KafkaAuthMethod, - KnownSaslMethod, - SaslMethod, - KnownX509CertificateMethod, - X509CertificateMethod, - KnownAnonymousMethod, - AnonymousMethod, DataflowEndpointAuthenticationSasl, KnownDataflowEndpointAuthenticationSaslType, DataflowEndpointAuthenticationSaslType, @@ -62,16 +56,15 @@ export { DataflowEndpointLocalStorage, DataflowEndpointMqtt, DataflowEndpointMqttAuthentication, + KnownMqttAuthMethod, MqttAuthMethod, - KnownServiceAccountTokenMethod, - ServiceAccountTokenMethod, DataflowEndpointAuthenticationServiceAccountToken, KnownBrokerProtocolType, BrokerProtocolType, KnownMqttRetainType, MqttRetainType, - ProvisioningState, KnownProvisioningState, + ProvisioningState, ExtendedLocation, KnownExtendedLocationType, ExtendedLocationType, @@ -80,6 +73,9 @@ export { SystemData, KnownCreatedByType, CreatedByType, + ErrorResponse, + ErrorDetail, + ErrorAdditionalInfo, DataflowResource, DataflowProperties, DataflowOperation, @@ -188,6 +184,7 @@ export { Origin, KnownActionType, ActionType, + KnownVersions, } from "./models/index.js"; export { IoTOperationsClientOptionalParams, diff --git a/sdk/iotoperations/arm-iotoperations/src/ioTOperationsClient.ts b/sdk/iotoperations/arm-iotoperations/src/ioTOperationsClient.ts index 9b381c8dd3cb..91867f5b306f 100644 --- a/sdk/iotoperations/arm-iotoperations/src/ioTOperationsClient.ts +++ b/sdk/iotoperations/arm-iotoperations/src/ioTOperationsClient.ts @@ -1,9 +1,18 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { getOperationsOperations, OperationsOperations } from "./classic/operations/index.js"; -import { getInstanceOperations, InstanceOperations } from "./classic/instance/index.js"; -import { getBrokerOperations, BrokerOperations } from "./classic/broker/index.js"; +import { + getOperationsOperations, + OperationsOperations, +} from "./classic/operations/index.js"; +import { + getInstanceOperations, + InstanceOperations, +} from "./classic/instance/index.js"; +import { + getBrokerOperations, + BrokerOperations, +} from "./classic/broker/index.js"; import { getBrokerListenerOperations, BrokerListenerOperations, @@ -20,7 +29,10 @@ import { getDataflowProfileOperations, DataflowProfileOperations, } from "./classic/dataflowProfile/index.js"; -import { getDataflowOperations, DataflowOperations } from "./classic/dataflow/index.js"; +import { + getDataflowOperations, + DataflowOperations, +} from "./classic/dataflow/index.js"; import { getDataflowEndpointOperations, DataflowEndpointOperations, @@ -49,7 +61,7 @@ export class IoTOperationsClient { const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix; const userAgentPrefix = prefixFromOptions ? `${prefixFromOptions} azsdk-js-client` - : "azsdk-js-client"; + : `azsdk-js-client`; this._client = createIoTOperations(credential, { ...options, userAgentOptions: { userAgentPrefix }, @@ -58,12 +70,27 @@ export class IoTOperationsClient { this.operations = getOperationsOperations(this._client); this.instance = getInstanceOperations(this._client, subscriptionId); this.broker = getBrokerOperations(this._client, subscriptionId); - this.brokerListener = getBrokerListenerOperations(this._client, subscriptionId); - this.brokerAuthentication = getBrokerAuthenticationOperations(this._client, subscriptionId); - this.brokerAuthorization = getBrokerAuthorizationOperations(this._client, subscriptionId); - this.dataflowProfile = getDataflowProfileOperations(this._client, subscriptionId); + this.brokerListener = getBrokerListenerOperations( + this._client, + subscriptionId, + ); + this.brokerAuthentication = getBrokerAuthenticationOperations( + this._client, + subscriptionId, + ); + this.brokerAuthorization = getBrokerAuthorizationOperations( + this._client, + subscriptionId, + ); + this.dataflowProfile = getDataflowProfileOperations( + this._client, + subscriptionId, + ); this.dataflow = getDataflowOperations(this._client, subscriptionId); - this.dataflowEndpoint = getDataflowEndpointOperations(this._client, subscriptionId); + this.dataflowEndpoint = getDataflowEndpointOperations( + this._client, + subscriptionId, + ); } /** The operation groups for Operations */ diff --git a/sdk/iotoperations/arm-iotoperations/src/models/index.ts b/sdk/iotoperations/arm-iotoperations/src/models/index.ts index bb7545d4fcff..465dc0db31e5 100644 --- a/sdk/iotoperations/arm-iotoperations/src/models/index.ts +++ b/sdk/iotoperations/arm-iotoperations/src/models/index.ts @@ -8,33 +8,27 @@ export { EndpointType, DataflowEndpointDataExplorer, DataflowEndpointDataExplorerAuthentication, + KnownDataExplorerAuthMethod, DataExplorerAuthMethod, - KnownManagedIdentityMethod, - ManagedIdentityMethod, DataflowEndpointAuthenticationSystemAssignedManagedIdentity, DataflowEndpointAuthenticationUserAssignedManagedIdentity, BatchingConfiguration, DataflowEndpointDataLakeStorage, DataflowEndpointDataLakeStorageAuthentication, + KnownDataLakeStorageAuthMethod, DataLakeStorageAuthMethod, - KnownAccessTokenMethod, - AccessTokenMethod, DataflowEndpointAuthenticationAccessToken, DataflowEndpointFabricOneLake, DataflowEndpointFabricOneLakeAuthentication, + KnownFabricOneLakeAuthMethod, FabricOneLakeAuthMethod, DataflowEndpointFabricOneLakeNames, KnownDataflowEndpointFabricPathType, DataflowEndpointFabricPathType, DataflowEndpointKafka, DataflowEndpointKafkaAuthentication, + KnownKafkaAuthMethod, KafkaAuthMethod, - KnownSaslMethod, - SaslMethod, - KnownX509CertificateMethod, - X509CertificateMethod, - KnownAnonymousMethod, - AnonymousMethod, DataflowEndpointAuthenticationSasl, KnownDataflowEndpointAuthenticationSaslType, DataflowEndpointAuthenticationSaslType, @@ -54,16 +48,15 @@ export { DataflowEndpointLocalStorage, DataflowEndpointMqtt, DataflowEndpointMqttAuthentication, + KnownMqttAuthMethod, MqttAuthMethod, - KnownServiceAccountTokenMethod, - ServiceAccountTokenMethod, DataflowEndpointAuthenticationServiceAccountToken, KnownBrokerProtocolType, BrokerProtocolType, KnownMqttRetainType, MqttRetainType, - ProvisioningState, KnownProvisioningState, + ProvisioningState, ExtendedLocation, KnownExtendedLocationType, ExtendedLocationType, @@ -72,6 +65,9 @@ export { SystemData, KnownCreatedByType, CreatedByType, + ErrorResponse, + ErrorDetail, + ErrorAdditionalInfo, DataflowResource, DataflowProperties, DataflowOperation, @@ -180,4 +176,5 @@ export { Origin, KnownActionType, ActionType, + KnownVersions, } from "./models.js"; diff --git a/sdk/iotoperations/arm-iotoperations/src/models/models.ts b/sdk/iotoperations/arm-iotoperations/src/models/models.ts index 8a3c26dc54f5..468258f007c1 100644 --- a/sdk/iotoperations/arm-iotoperations/src/models/models.ts +++ b/sdk/iotoperations/arm-iotoperations/src/models/models.ts @@ -9,7 +9,9 @@ export interface DataflowEndpointResource extends ProxyResource { extendedLocation: ExtendedLocation; } -export function dataflowEndpointResourceSerializer(item: DataflowEndpointResource): any { +export function dataflowEndpointResourceSerializer( + item: DataflowEndpointResource, +): any { return { properties: !item["properties"] ? item["properties"] @@ -18,7 +20,9 @@ export function dataflowEndpointResourceSerializer(item: DataflowEndpointResourc }; } -export function dataflowEndpointResourceDeserializer(item: any): DataflowEndpointResource { +export function dataflowEndpointResourceDeserializer( + item: any, +): DataflowEndpointResource { return { id: item["id"], name: item["name"], @@ -53,7 +57,9 @@ export interface DataflowEndpointProperties { readonly provisioningState?: ProvisioningState; } -export function dataflowEndpointPropertiesSerializer(item: DataflowEndpointProperties): any { +export function dataflowEndpointPropertiesSerializer( + item: DataflowEndpointProperties, +): any { return { endpointType: item["endpointType"], dataExplorerSettings: !item["dataExplorerSettings"] @@ -61,7 +67,9 @@ export function dataflowEndpointPropertiesSerializer(item: DataflowEndpointPrope : dataflowEndpointDataExplorerSerializer(item["dataExplorerSettings"]), dataLakeStorageSettings: !item["dataLakeStorageSettings"] ? item["dataLakeStorageSettings"] - : dataflowEndpointDataLakeStorageSerializer(item["dataLakeStorageSettings"]), + : dataflowEndpointDataLakeStorageSerializer( + item["dataLakeStorageSettings"], + ), fabricOneLakeSettings: !item["fabricOneLakeSettings"] ? item["fabricOneLakeSettings"] : dataflowEndpointFabricOneLakeSerializer(item["fabricOneLakeSettings"]), @@ -77,7 +85,9 @@ export function dataflowEndpointPropertiesSerializer(item: DataflowEndpointPrope }; } -export function dataflowEndpointPropertiesDeserializer(item: any): DataflowEndpointProperties { +export function dataflowEndpointPropertiesDeserializer( + item: any, +): DataflowEndpointProperties { return { endpointType: item["endpointType"], dataExplorerSettings: !item["dataExplorerSettings"] @@ -85,10 +95,14 @@ export function dataflowEndpointPropertiesDeserializer(item: any): DataflowEndpo : dataflowEndpointDataExplorerDeserializer(item["dataExplorerSettings"]), dataLakeStorageSettings: !item["dataLakeStorageSettings"] ? item["dataLakeStorageSettings"] - : dataflowEndpointDataLakeStorageDeserializer(item["dataLakeStorageSettings"]), + : dataflowEndpointDataLakeStorageDeserializer( + item["dataLakeStorageSettings"], + ), fabricOneLakeSettings: !item["fabricOneLakeSettings"] ? item["fabricOneLakeSettings"] - : dataflowEndpointFabricOneLakeDeserializer(item["fabricOneLakeSettings"]), + : dataflowEndpointFabricOneLakeDeserializer( + item["fabricOneLakeSettings"], + ), kafkaSettings: !item["kafkaSettings"] ? item["kafkaSettings"] : dataflowEndpointKafkaDeserializer(item["kafkaSettings"]), @@ -98,9 +112,7 @@ export function dataflowEndpointPropertiesDeserializer(item: any): DataflowEndpo mqttSettings: !item["mqttSettings"] ? item["mqttSettings"] : dataflowEndpointMqttDeserializer(item["mqttSettings"]), - provisioningState: !item["provisioningState"] - ? item["provisioningState"] - : provisioningStateDeserializer(item["provisioningState"]), + provisioningState: item["provisioningState"], }; } @@ -146,9 +158,13 @@ export interface DataflowEndpointDataExplorer { batching?: BatchingConfiguration; } -export function dataflowEndpointDataExplorerSerializer(item: DataflowEndpointDataExplorer): any { +export function dataflowEndpointDataExplorerSerializer( + item: DataflowEndpointDataExplorer, +): any { return { - authentication: dataflowEndpointDataExplorerAuthenticationSerializer(item["authentication"]), + authentication: dataflowEndpointDataExplorerAuthenticationSerializer( + item["authentication"], + ), database: item["database"], host: item["host"], batching: !item["batching"] @@ -157,9 +173,13 @@ export function dataflowEndpointDataExplorerSerializer(item: DataflowEndpointDat }; } -export function dataflowEndpointDataExplorerDeserializer(item: any): DataflowEndpointDataExplorer { +export function dataflowEndpointDataExplorerDeserializer( + item: any, +): DataflowEndpointDataExplorer { return { - authentication: dataflowEndpointDataExplorerAuthenticationDeserializer(item["authentication"]), + authentication: dataflowEndpointDataExplorerAuthenticationDeserializer( + item["authentication"], + ), database: item["database"], host: item["host"], batching: !item["batching"] @@ -182,13 +202,17 @@ export function dataflowEndpointDataExplorerAuthenticationSerializer( item: DataflowEndpointDataExplorerAuthentication, ): any { return { - method: dataExplorerAuthMethodSerializer(item["method"]), - systemAssignedManagedIdentitySettings: !item["systemAssignedManagedIdentitySettings"] + method: item["method"], + systemAssignedManagedIdentitySettings: !item[ + "systemAssignedManagedIdentitySettings" + ] ? item["systemAssignedManagedIdentitySettings"] : dataflowEndpointAuthenticationSystemAssignedManagedIdentitySerializer( item["systemAssignedManagedIdentitySettings"], ), - userAssignedManagedIdentitySettings: !item["userAssignedManagedIdentitySettings"] + userAssignedManagedIdentitySettings: !item[ + "userAssignedManagedIdentitySettings" + ] ? item["userAssignedManagedIdentitySettings"] : dataflowEndpointAuthenticationUserAssignedManagedIdentitySerializer( item["userAssignedManagedIdentitySettings"], @@ -200,13 +224,17 @@ export function dataflowEndpointDataExplorerAuthenticationDeserializer( item: any, ): DataflowEndpointDataExplorerAuthentication { return { - method: dataExplorerAuthMethodDeserializer(item["method"]), - systemAssignedManagedIdentitySettings: !item["systemAssignedManagedIdentitySettings"] + method: item["method"], + systemAssignedManagedIdentitySettings: !item[ + "systemAssignedManagedIdentitySettings" + ] ? item["systemAssignedManagedIdentitySettings"] : dataflowEndpointAuthenticationSystemAssignedManagedIdentityDeserializer( item["systemAssignedManagedIdentitySettings"], ), - userAssignedManagedIdentitySettings: !item["userAssignedManagedIdentitySettings"] + userAssignedManagedIdentitySettings: !item[ + "userAssignedManagedIdentitySettings" + ] ? item["userAssignedManagedIdentitySettings"] : dataflowEndpointAuthenticationUserAssignedManagedIdentityDeserializer( item["userAssignedManagedIdentitySettings"], @@ -214,19 +242,8 @@ export function dataflowEndpointDataExplorerAuthenticationDeserializer( }; } -/** Alias for DataExplorerAuthMethod */ -export type DataExplorerAuthMethod = ManagedIdentityMethod; - -export function dataExplorerAuthMethodSerializer(item: DataExplorerAuthMethod): any { - return item; -} - -export function dataExplorerAuthMethodDeserializer(item: any): DataExplorerAuthMethod { - return item; -} - -/** Managed Identity Method */ -export enum KnownManagedIdentityMethod { +/** DataflowEndpoint Data Explorer Authentication Method properties */ +export enum KnownDataExplorerAuthMethod { /** SystemAssignedManagedIdentity type */ SystemAssignedManagedIdentity = "SystemAssignedManagedIdentity", /** UserAssignedManagedIdentity type */ @@ -234,14 +251,14 @@ export enum KnownManagedIdentityMethod { } /** - * Managed Identity Method \ - * {@link KnownManagedIdentityMethod} can be used interchangeably with ManagedIdentityMethod, + * DataflowEndpoint Data Explorer Authentication Method properties \ + * {@link KnownDataExplorerAuthMethod} can be used interchangeably with DataExplorerAuthMethod, * this enum contains the known values that the service supports. * ### Known values supported by the service * **SystemAssignedManagedIdentity**: SystemAssignedManagedIdentity type \ * **UserAssignedManagedIdentity**: UserAssignedManagedIdentity type */ -export type ManagedIdentityMethod = string; +export type DataExplorerAuthMethod = string; /** DataflowEndpoint Authentication SystemAssignedManagedIdentity properties */ export interface DataflowEndpointAuthenticationSystemAssignedManagedIdentity { @@ -301,14 +318,18 @@ export interface BatchingConfiguration { maxMessages?: number; } -export function batchingConfigurationSerializer(item: BatchingConfiguration): any { +export function batchingConfigurationSerializer( + item: BatchingConfiguration, +): any { return { latencySeconds: item["latencySeconds"], maxMessages: item["maxMessages"], }; } -export function batchingConfigurationDeserializer(item: any): BatchingConfiguration { +export function batchingConfigurationDeserializer( + item: any, +): BatchingConfiguration { return { latencySeconds: item["latencySeconds"], maxMessages: item["maxMessages"], @@ -329,7 +350,9 @@ export function dataflowEndpointDataLakeStorageSerializer( item: DataflowEndpointDataLakeStorage, ): any { return { - authentication: dataflowEndpointDataLakeStorageAuthenticationSerializer(item["authentication"]), + authentication: dataflowEndpointDataLakeStorageAuthenticationSerializer( + item["authentication"], + ), host: item["host"], batching: !item["batching"] ? item["batching"] @@ -367,16 +390,22 @@ export function dataflowEndpointDataLakeStorageAuthenticationSerializer( item: DataflowEndpointDataLakeStorageAuthentication, ): any { return { - method: dataLakeStorageAuthMethodSerializer(item["method"]), + method: item["method"], accessTokenSettings: !item["accessTokenSettings"] ? item["accessTokenSettings"] - : dataflowEndpointAuthenticationAccessTokenSerializer(item["accessTokenSettings"]), - systemAssignedManagedIdentitySettings: !item["systemAssignedManagedIdentitySettings"] + : dataflowEndpointAuthenticationAccessTokenSerializer( + item["accessTokenSettings"], + ), + systemAssignedManagedIdentitySettings: !item[ + "systemAssignedManagedIdentitySettings" + ] ? item["systemAssignedManagedIdentitySettings"] : dataflowEndpointAuthenticationSystemAssignedManagedIdentitySerializer( item["systemAssignedManagedIdentitySettings"], ), - userAssignedManagedIdentitySettings: !item["userAssignedManagedIdentitySettings"] + userAssignedManagedIdentitySettings: !item[ + "userAssignedManagedIdentitySettings" + ] ? item["userAssignedManagedIdentitySettings"] : dataflowEndpointAuthenticationUserAssignedManagedIdentitySerializer( item["userAssignedManagedIdentitySettings"], @@ -388,16 +417,22 @@ export function dataflowEndpointDataLakeStorageAuthenticationDeserializer( item: any, ): DataflowEndpointDataLakeStorageAuthentication { return { - method: dataLakeStorageAuthMethodDeserializer(item["method"]), + method: item["method"], accessTokenSettings: !item["accessTokenSettings"] ? item["accessTokenSettings"] - : dataflowEndpointAuthenticationAccessTokenDeserializer(item["accessTokenSettings"]), - systemAssignedManagedIdentitySettings: !item["systemAssignedManagedIdentitySettings"] + : dataflowEndpointAuthenticationAccessTokenDeserializer( + item["accessTokenSettings"], + ), + systemAssignedManagedIdentitySettings: !item[ + "systemAssignedManagedIdentitySettings" + ] ? item["systemAssignedManagedIdentitySettings"] : dataflowEndpointAuthenticationSystemAssignedManagedIdentityDeserializer( item["systemAssignedManagedIdentitySettings"], ), - userAssignedManagedIdentitySettings: !item["userAssignedManagedIdentitySettings"] + userAssignedManagedIdentitySettings: !item[ + "userAssignedManagedIdentitySettings" + ] ? item["userAssignedManagedIdentitySettings"] : dataflowEndpointAuthenticationUserAssignedManagedIdentityDeserializer( item["userAssignedManagedIdentitySettings"], @@ -405,31 +440,26 @@ export function dataflowEndpointDataLakeStorageAuthenticationDeserializer( }; } -/** Alias for DataLakeStorageAuthMethod */ -export type DataLakeStorageAuthMethod = ManagedIdentityMethod | AccessTokenMethod; - -export function dataLakeStorageAuthMethodSerializer(item: DataLakeStorageAuthMethod): any { - return item; -} - -export function dataLakeStorageAuthMethodDeserializer(item: any): DataLakeStorageAuthMethod { - return item; -} - -/** Access Token Method */ -export enum KnownAccessTokenMethod { +/** DataflowEndpoint Data Lake Storage Authentication Method properties */ +export enum KnownDataLakeStorageAuthMethod { + /** SystemAssignedManagedIdentity type */ + SystemAssignedManagedIdentity = "SystemAssignedManagedIdentity", + /** UserAssignedManagedIdentity type */ + UserAssignedManagedIdentity = "UserAssignedManagedIdentity", /** AccessToken Option */ AccessToken = "AccessToken", } /** - * Access Token Method \ - * {@link KnownAccessTokenMethod} can be used interchangeably with AccessTokenMethod, + * DataflowEndpoint Data Lake Storage Authentication Method properties \ + * {@link KnownDataLakeStorageAuthMethod} can be used interchangeably with DataLakeStorageAuthMethod, * this enum contains the known values that the service supports. * ### Known values supported by the service + * **SystemAssignedManagedIdentity**: SystemAssignedManagedIdentity type \ + * **UserAssignedManagedIdentity**: UserAssignedManagedIdentity type \ * **AccessToken**: AccessToken Option */ -export type AccessTokenMethod = string; +export type DataLakeStorageAuthMethod = string; /** DataflowEndpoint Authentication Access Token properties */ export interface DataflowEndpointAuthenticationAccessToken { @@ -465,9 +495,13 @@ export interface DataflowEndpointFabricOneLake { batching?: BatchingConfiguration; } -export function dataflowEndpointFabricOneLakeSerializer(item: DataflowEndpointFabricOneLake): any { +export function dataflowEndpointFabricOneLakeSerializer( + item: DataflowEndpointFabricOneLake, +): any { return { - authentication: dataflowEndpointFabricOneLakeAuthenticationSerializer(item["authentication"]), + authentication: dataflowEndpointFabricOneLakeAuthenticationSerializer( + item["authentication"], + ), names: dataflowEndpointFabricOneLakeNamesSerializer(item["names"]), oneLakePathType: item["oneLakePathType"], host: item["host"], @@ -481,7 +515,9 @@ export function dataflowEndpointFabricOneLakeDeserializer( item: any, ): DataflowEndpointFabricOneLake { return { - authentication: dataflowEndpointFabricOneLakeAuthenticationDeserializer(item["authentication"]), + authentication: dataflowEndpointFabricOneLakeAuthenticationDeserializer( + item["authentication"], + ), names: dataflowEndpointFabricOneLakeNamesDeserializer(item["names"]), oneLakePathType: item["oneLakePathType"], host: item["host"], @@ -505,13 +541,17 @@ export function dataflowEndpointFabricOneLakeAuthenticationSerializer( item: DataflowEndpointFabricOneLakeAuthentication, ): any { return { - method: fabricOneLakeAuthMethodSerializer(item["method"]), - systemAssignedManagedIdentitySettings: !item["systemAssignedManagedIdentitySettings"] + method: item["method"], + systemAssignedManagedIdentitySettings: !item[ + "systemAssignedManagedIdentitySettings" + ] ? item["systemAssignedManagedIdentitySettings"] : dataflowEndpointAuthenticationSystemAssignedManagedIdentitySerializer( item["systemAssignedManagedIdentitySettings"], ), - userAssignedManagedIdentitySettings: !item["userAssignedManagedIdentitySettings"] + userAssignedManagedIdentitySettings: !item[ + "userAssignedManagedIdentitySettings" + ] ? item["userAssignedManagedIdentitySettings"] : dataflowEndpointAuthenticationUserAssignedManagedIdentitySerializer( item["userAssignedManagedIdentitySettings"], @@ -523,13 +563,17 @@ export function dataflowEndpointFabricOneLakeAuthenticationDeserializer( item: any, ): DataflowEndpointFabricOneLakeAuthentication { return { - method: fabricOneLakeAuthMethodDeserializer(item["method"]), - systemAssignedManagedIdentitySettings: !item["systemAssignedManagedIdentitySettings"] + method: item["method"], + systemAssignedManagedIdentitySettings: !item[ + "systemAssignedManagedIdentitySettings" + ] ? item["systemAssignedManagedIdentitySettings"] : dataflowEndpointAuthenticationSystemAssignedManagedIdentityDeserializer( item["systemAssignedManagedIdentitySettings"], ), - userAssignedManagedIdentitySettings: !item["userAssignedManagedIdentitySettings"] + userAssignedManagedIdentitySettings: !item[ + "userAssignedManagedIdentitySettings" + ] ? item["userAssignedManagedIdentitySettings"] : dataflowEndpointAuthenticationUserAssignedManagedIdentityDeserializer( item["userAssignedManagedIdentitySettings"], @@ -537,16 +581,23 @@ export function dataflowEndpointFabricOneLakeAuthenticationDeserializer( }; } -/** Alias for FabricOneLakeAuthMethod */ -export type FabricOneLakeAuthMethod = ManagedIdentityMethod; - -export function fabricOneLakeAuthMethodSerializer(item: FabricOneLakeAuthMethod): any { - return item; +/** DataflowEndpoint Fabric One Lake Authentication Method properties */ +export enum KnownFabricOneLakeAuthMethod { + /** SystemAssignedManagedIdentity type */ + SystemAssignedManagedIdentity = "SystemAssignedManagedIdentity", + /** UserAssignedManagedIdentity type */ + UserAssignedManagedIdentity = "UserAssignedManagedIdentity", } -export function fabricOneLakeAuthMethodDeserializer(item: any): FabricOneLakeAuthMethod { - return item; -} +/** + * DataflowEndpoint Fabric One Lake Authentication Method properties \ + * {@link KnownFabricOneLakeAuthMethod} can be used interchangeably with FabricOneLakeAuthMethod, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **SystemAssignedManagedIdentity**: SystemAssignedManagedIdentity type \ + * **UserAssignedManagedIdentity**: UserAssignedManagedIdentity type + */ +export type FabricOneLakeAuthMethod = string; /** Microsoft Fabric endpoint Names properties */ export interface DataflowEndpointFabricOneLakeNames { @@ -616,9 +667,13 @@ export interface DataflowEndpointKafka { cloudEventAttributes?: CloudEventAttributeType; } -export function dataflowEndpointKafkaSerializer(item: DataflowEndpointKafka): any { +export function dataflowEndpointKafkaSerializer( + item: DataflowEndpointKafka, +): any { return { - authentication: dataflowEndpointKafkaAuthenticationSerializer(item["authentication"]), + authentication: dataflowEndpointKafkaAuthenticationSerializer( + item["authentication"], + ), consumerGroupId: item["consumerGroupId"], host: item["host"], batching: !item["batching"] @@ -633,9 +688,13 @@ export function dataflowEndpointKafkaSerializer(item: DataflowEndpointKafka): an }; } -export function dataflowEndpointKafkaDeserializer(item: any): DataflowEndpointKafka { +export function dataflowEndpointKafkaDeserializer( + item: any, +): DataflowEndpointKafka { return { - authentication: dataflowEndpointKafkaAuthenticationDeserializer(item["authentication"]), + authentication: dataflowEndpointKafkaAuthenticationDeserializer( + item["authentication"], + ), consumerGroupId: item["consumerGroupId"], host: item["host"], batching: !item["batching"] @@ -668,13 +727,17 @@ export function dataflowEndpointKafkaAuthenticationSerializer( item: DataflowEndpointKafkaAuthentication, ): any { return { - method: kafkaAuthMethodSerializer(item["method"]), - systemAssignedManagedIdentitySettings: !item["systemAssignedManagedIdentitySettings"] + method: item["method"], + systemAssignedManagedIdentitySettings: !item[ + "systemAssignedManagedIdentitySettings" + ] ? item["systemAssignedManagedIdentitySettings"] : dataflowEndpointAuthenticationSystemAssignedManagedIdentitySerializer( item["systemAssignedManagedIdentitySettings"], ), - userAssignedManagedIdentitySettings: !item["userAssignedManagedIdentitySettings"] + userAssignedManagedIdentitySettings: !item[ + "userAssignedManagedIdentitySettings" + ] ? item["userAssignedManagedIdentitySettings"] : dataflowEndpointAuthenticationUserAssignedManagedIdentitySerializer( item["userAssignedManagedIdentitySettings"], @@ -684,7 +747,9 @@ export function dataflowEndpointKafkaAuthenticationSerializer( : dataflowEndpointAuthenticationSaslSerializer(item["saslSettings"]), x509CertificateSettings: !item["x509CertificateSettings"] ? item["x509CertificateSettings"] - : dataflowEndpointAuthenticationX509Serializer(item["x509CertificateSettings"]), + : dataflowEndpointAuthenticationX509Serializer( + item["x509CertificateSettings"], + ), }; } @@ -692,13 +757,17 @@ export function dataflowEndpointKafkaAuthenticationDeserializer( item: any, ): DataflowEndpointKafkaAuthentication { return { - method: kafkaAuthMethodDeserializer(item["method"]), - systemAssignedManagedIdentitySettings: !item["systemAssignedManagedIdentitySettings"] + method: item["method"], + systemAssignedManagedIdentitySettings: !item[ + "systemAssignedManagedIdentitySettings" + ] ? item["systemAssignedManagedIdentitySettings"] : dataflowEndpointAuthenticationSystemAssignedManagedIdentityDeserializer( item["systemAssignedManagedIdentitySettings"], ), - userAssignedManagedIdentitySettings: !item["userAssignedManagedIdentitySettings"] + userAssignedManagedIdentitySettings: !item[ + "userAssignedManagedIdentitySettings" + ] ? item["userAssignedManagedIdentitySettings"] : dataflowEndpointAuthenticationUserAssignedManagedIdentityDeserializer( item["userAssignedManagedIdentitySettings"], @@ -708,69 +777,38 @@ export function dataflowEndpointKafkaAuthenticationDeserializer( : dataflowEndpointAuthenticationSaslDeserializer(item["saslSettings"]), x509CertificateSettings: !item["x509CertificateSettings"] ? item["x509CertificateSettings"] - : dataflowEndpointAuthenticationX509Deserializer(item["x509CertificateSettings"]), + : dataflowEndpointAuthenticationX509Deserializer( + item["x509CertificateSettings"], + ), }; } -/** Alias for KafkaAuthMethod */ -export type KafkaAuthMethod = - | ManagedIdentityMethod - | SaslMethod - | X509CertificateMethod - | AnonymousMethod; - -export function kafkaAuthMethodSerializer(item: KafkaAuthMethod): any { - return item; -} - -export function kafkaAuthMethodDeserializer(item: any): KafkaAuthMethod { - return item; -} - -/** Sasl Method */ -export enum KnownSaslMethod { +/** DataflowEndpoint Kafka Authentication Method properties */ +export enum KnownKafkaAuthMethod { + /** SystemAssignedManagedIdentity type */ + SystemAssignedManagedIdentity = "SystemAssignedManagedIdentity", + /** UserAssignedManagedIdentity type */ + UserAssignedManagedIdentity = "UserAssignedManagedIdentity", /** Sasl Option */ Sasl = "Sasl", -} - -/** - * Sasl Method \ - * {@link KnownSaslMethod} can be used interchangeably with SaslMethod, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Sasl**: Sasl Option - */ -export type SaslMethod = string; - -/** x509 Certificate Method */ -export enum KnownX509CertificateMethod { /** x509Certificate Option */ X509Certificate = "X509Certificate", -} - -/** - * x509 Certificate Method \ - * {@link Knownx509CertificateMethod} can be used interchangeably with x509CertificateMethod, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **X509Certificate**: x509Certificate Option - */ -export type X509CertificateMethod = string; - -/** x509 Certificate Method */ -export enum KnownAnonymousMethod { /** Anonymous Option */ Anonymous = "Anonymous", } /** - * x509 Certificate Method \ - * {@link KnownAnonymousMethod} can be used interchangeably with AnonymousMethod, + * DataflowEndpoint Kafka Authentication Method properties \ + * {@link KnownKafkaAuthMethod} can be used interchangeably with KafkaAuthMethod, * this enum contains the known values that the service supports. * ### Known values supported by the service + * **SystemAssignedManagedIdentity**: SystemAssignedManagedIdentity type \ + * **UserAssignedManagedIdentity**: UserAssignedManagedIdentity type \ + * **Sasl**: Sasl Option \ + * **X509Certificate**: x509Certificate Option \ * **Anonymous**: Anonymous Option */ -export type AnonymousMethod = string; +export type KafkaAuthMethod = string; /** DataflowEndpoint Authentication Sasl properties */ export interface DataflowEndpointAuthenticationSasl { @@ -848,7 +886,9 @@ export interface DataflowEndpointKafkaBatching { maxMessages?: number; } -export function dataflowEndpointKafkaBatchingSerializer(item: DataflowEndpointKafkaBatching): any { +export function dataflowEndpointKafkaBatchingSerializer( + item: DataflowEndpointKafkaBatching, +): any { return { mode: item["mode"], latencyMs: item["latencyMs"], @@ -1001,11 +1041,15 @@ export interface DataflowEndpointLocalStorage { persistentVolumeClaimRef: string; } -export function dataflowEndpointLocalStorageSerializer(item: DataflowEndpointLocalStorage): any { +export function dataflowEndpointLocalStorageSerializer( + item: DataflowEndpointLocalStorage, +): any { return { persistentVolumeClaimRef: item["persistentVolumeClaimRef"] }; } -export function dataflowEndpointLocalStorageDeserializer(item: any): DataflowEndpointLocalStorage { +export function dataflowEndpointLocalStorageDeserializer( + item: any, +): DataflowEndpointLocalStorage { return { persistentVolumeClaimRef: item["persistentVolumeClaimRef"], }; @@ -1037,9 +1081,13 @@ export interface DataflowEndpointMqtt { cloudEventAttributes?: CloudEventAttributeType; } -export function dataflowEndpointMqttSerializer(item: DataflowEndpointMqtt): any { +export function dataflowEndpointMqttSerializer( + item: DataflowEndpointMqtt, +): any { return { - authentication: dataflowEndpointMqttAuthenticationSerializer(item["authentication"]), + authentication: dataflowEndpointMqttAuthenticationSerializer( + item["authentication"], + ), clientIdPrefix: item["clientIdPrefix"], host: item["host"], protocol: item["protocol"], @@ -1053,9 +1101,13 @@ export function dataflowEndpointMqttSerializer(item: DataflowEndpointMqtt): any }; } -export function dataflowEndpointMqttDeserializer(item: any): DataflowEndpointMqtt { +export function dataflowEndpointMqttDeserializer( + item: any, +): DataflowEndpointMqtt { return { - authentication: dataflowEndpointMqttAuthenticationDeserializer(item["authentication"]), + authentication: dataflowEndpointMqttAuthenticationDeserializer( + item["authentication"], + ), clientIdPrefix: item["clientIdPrefix"], host: item["host"], protocol: item["protocol"], @@ -1087,13 +1139,17 @@ export function dataflowEndpointMqttAuthenticationSerializer( item: DataflowEndpointMqttAuthentication, ): any { return { - method: mqttAuthMethodSerializer(item["method"]), - systemAssignedManagedIdentitySettings: !item["systemAssignedManagedIdentitySettings"] + method: item["method"], + systemAssignedManagedIdentitySettings: !item[ + "systemAssignedManagedIdentitySettings" + ] ? item["systemAssignedManagedIdentitySettings"] : dataflowEndpointAuthenticationSystemAssignedManagedIdentitySerializer( item["systemAssignedManagedIdentitySettings"], ), - userAssignedManagedIdentitySettings: !item["userAssignedManagedIdentitySettings"] + userAssignedManagedIdentitySettings: !item[ + "userAssignedManagedIdentitySettings" + ] ? item["userAssignedManagedIdentitySettings"] : dataflowEndpointAuthenticationUserAssignedManagedIdentitySerializer( item["userAssignedManagedIdentitySettings"], @@ -1105,7 +1161,9 @@ export function dataflowEndpointMqttAuthenticationSerializer( ), x509CertificateSettings: !item["x509CertificateSettings"] ? item["x509CertificateSettings"] - : dataflowEndpointAuthenticationX509Serializer(item["x509CertificateSettings"]), + : dataflowEndpointAuthenticationX509Serializer( + item["x509CertificateSettings"], + ), }; } @@ -1113,13 +1171,17 @@ export function dataflowEndpointMqttAuthenticationDeserializer( item: any, ): DataflowEndpointMqttAuthentication { return { - method: mqttAuthMethodDeserializer(item["method"]), - systemAssignedManagedIdentitySettings: !item["systemAssignedManagedIdentitySettings"] + method: item["method"], + systemAssignedManagedIdentitySettings: !item[ + "systemAssignedManagedIdentitySettings" + ] ? item["systemAssignedManagedIdentitySettings"] : dataflowEndpointAuthenticationSystemAssignedManagedIdentityDeserializer( item["systemAssignedManagedIdentitySettings"], ), - userAssignedManagedIdentitySettings: !item["userAssignedManagedIdentitySettings"] + userAssignedManagedIdentitySettings: !item[ + "userAssignedManagedIdentitySettings" + ] ? item["userAssignedManagedIdentitySettings"] : dataflowEndpointAuthenticationUserAssignedManagedIdentityDeserializer( item["userAssignedManagedIdentitySettings"], @@ -1131,39 +1193,38 @@ export function dataflowEndpointMqttAuthenticationDeserializer( ), x509CertificateSettings: !item["x509CertificateSettings"] ? item["x509CertificateSettings"] - : dataflowEndpointAuthenticationX509Deserializer(item["x509CertificateSettings"]), + : dataflowEndpointAuthenticationX509Deserializer( + item["x509CertificateSettings"], + ), }; } -/** Alias for MqttAuthMethod */ -export type MqttAuthMethod = - | ManagedIdentityMethod - | ServiceAccountTokenMethod - | X509CertificateMethod - | AnonymousMethod; - -export function mqttAuthMethodSerializer(item: MqttAuthMethod): any { - return item; -} - -export function mqttAuthMethodDeserializer(item: any): MqttAuthMethod { - return item; -} - -/** Service Account Token Method */ -export enum KnownServiceAccountTokenMethod { +/** DataflowEndpoint Mqtt Authentication Method properties */ +export enum KnownMqttAuthMethod { + /** SystemAssignedManagedIdentity type */ + SystemAssignedManagedIdentity = "SystemAssignedManagedIdentity", + /** UserAssignedManagedIdentity type */ + UserAssignedManagedIdentity = "UserAssignedManagedIdentity", /** ServiceAccountToken Option */ ServiceAccountToken = "ServiceAccountToken", + /** x509Certificate Option */ + X509Certificate = "X509Certificate", + /** Anonymous Option */ + Anonymous = "Anonymous", } /** - * Service Account Token Method \ - * {@link KnownServiceAccountTokenMethod} can be used interchangeably with ServiceAccountTokenMethod, + * DataflowEndpoint Mqtt Authentication Method properties \ + * {@link KnownMqttAuthMethod} can be used interchangeably with MqttAuthMethod, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **ServiceAccountToken**: ServiceAccountToken Option + * **SystemAssignedManagedIdentity**: SystemAssignedManagedIdentity type \ + * **UserAssignedManagedIdentity**: UserAssignedManagedIdentity type \ + * **ServiceAccountToken**: ServiceAccountToken Option \ + * **X509Certificate**: x509Certificate Option \ + * **Anonymous**: Anonymous Option */ -export type ServiceAccountTokenMethod = string; +export type MqttAuthMethod = string; /** Service Account Token for BrokerAuthentication */ export interface DataflowEndpointAuthenticationServiceAccountToken { @@ -1220,7 +1281,8 @@ export enum KnownMqttRetainType { * **Never**: Never retain messages. */ export type MqttRetainType = string; -/** The provisioning state of a resource type. */ + +/** The enum defining status of resource. */ export enum KnownProvisioningState { /** Resource has been created. */ Succeeded = "Succeeded", @@ -1228,39 +1290,31 @@ export enum KnownProvisioningState { Failed = "Failed", /** Resource creation was canceled. */ Canceled = "Canceled", - /** Resource creation was provisioning. */ + /** Resource is getting provisioned. */ Provisioning = "Provisioning", - /** Resource creation was updating. */ + /** Resource is Updating. */ Updating = "Updating", - /** Resource creation was deleting. */ + /** Resource is Deleting. */ Deleting = "Deleting", - /** Resource creation was accepted. */ + /** Resource has been Accepted. */ Accepted = "Accepted", } /** - * The provisioning state of a resource type. \ - * {@link KnownProvisioningState} can be used interchangeably with ResourceProvisioningState, + * The enum defining status of resource. \ + * {@link KnownProvisioningState} can be used interchangeably with ProvisioningState, * this enum contains the known values that the service supports. * ### Known values supported by the service * **Succeeded**: Resource has been created. \ * **Failed**: Resource creation failed. \ - * **Canceled**: Resource creation canceled. \ - * **Provisioning**: Resource creation provisioning. \ - * **Updating**: Resource creation updating. \ - * **Deleting**: Resource creation deleting. \ - * **Accepted**: Resource creation was accepted. + * **Canceled**: Resource creation was canceled. \ + * **Provisioning**: Resource is getting provisioned. \ + * **Updating**: Resource is Updating. \ + * **Deleting**: Resource is Deleting. \ + * **Accepted**: Resource has been Accepted. */ export type ProvisioningState = string; -export function provisioningStateSerializer(item: ProvisioningState): any { - return item; -} - -export function provisioningStateDeserializer(item: any): ProvisioningState { - return item; -} - /** Extended location is an extension of Azure locations. They provide a way to use their Azure ARC enabled Kubernetes clusters as target locations for deploying Azure services instances. */ export interface ExtendedLocation { /** The name of the extended location. */ @@ -1360,7 +1414,9 @@ export function systemDataDeserializer(item: any): SystemData { return { createdBy: item["createdBy"], createdByType: item["createdByType"], - createdAt: !item["createdAt"] ? item["createdAt"] : new Date(item["createdAt"]), + createdAt: !item["createdAt"] + ? item["createdAt"] + : new Date(item["createdAt"]), lastModifiedBy: item["lastModifiedBy"], lastModifiedByType: item["lastModifiedByType"], lastModifiedAt: !item["lastModifiedAt"] @@ -1393,6 +1449,92 @@ export enum KnownCreatedByType { */ export type CreatedByType = string; +/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. */ +export interface ErrorResponse { + /** The error object. */ + error?: ErrorDetail; +} + +export function errorResponseDeserializer(item: any): ErrorResponse { + return { + error: !item["error"] + ? item["error"] + : errorDetailDeserializer(item["error"]), + }; +} + +/** The error detail. */ +export interface ErrorDetail { + /** The error code. */ + readonly code?: string; + /** The error message. */ + readonly message?: string; + /** The error target. */ + readonly target?: string; + /** The error details. */ + readonly details?: ErrorDetail[]; + /** The error additional info. */ + readonly additionalInfo?: ErrorAdditionalInfo[]; +} + +export function errorDetailDeserializer(item: any): ErrorDetail { + return { + code: item["code"], + message: item["message"], + target: item["target"], + details: !item["details"] + ? item["details"] + : errorDetailArrayDeserializer(item["details"]), + additionalInfo: !item["additionalInfo"] + ? item["additionalInfo"] + : errorAdditionalInfoArrayDeserializer(item["additionalInfo"]), + }; +} + +export function errorDetailArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return errorDetailDeserializer(item); + }); +} + +export function errorAdditionalInfoArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return errorAdditionalInfoDeserializer(item); + }); +} + +/** The resource management error additional info. */ +export interface ErrorAdditionalInfo { + /** The additional info type. */ + readonly type?: string; + /** The additional info. */ + readonly info?: Record; +} + +export function errorAdditionalInfoDeserializer( + item: any, +): ErrorAdditionalInfo { + return { + type: item["type"], + info: !item["info"] + ? item["info"] + : _errorAdditionalInfoInfoDeserializer(item["info"]), + }; +} + +/** model interface _ErrorAdditionalInfoInfo */ +export interface _ErrorAdditionalInfoInfo {} + +export function _errorAdditionalInfoInfoDeserializer( + item: any, +): _ErrorAdditionalInfoInfo { + return item; +} + /** The response of a DataflowEndpointResource list operation. */ export interface _DataflowEndpointResourceListResult { /** The DataflowEndpointResource items on this page */ @@ -1479,12 +1621,26 @@ export function dataflowPropertiesDeserializer(item: any): DataflowProperties { return { mode: item["mode"], operations: dataflowOperationArrayDeserializer(item["operations"]), - provisioningState: !item["provisioningState"] - ? item["provisioningState"] - : provisioningStateDeserializer(item["provisioningState"]), + provisioningState: item["provisioningState"], }; } +export function dataflowOperationArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return dataflowOperationSerializer(item); + }); +} + +export function dataflowOperationArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return dataflowOperationDeserializer(item); + }); +} + /** Dataflow Operation properties. NOTE - One only method is allowed to be used for one entry. */ export interface DataflowOperation { /** Type of operation. */ @@ -1508,10 +1664,14 @@ export function dataflowOperationSerializer(item: DataflowOperation): any { : dataflowSourceOperationSettingsSerializer(item["sourceSettings"]), builtInTransformationSettings: !item["builtInTransformationSettings"] ? item["builtInTransformationSettings"] - : dataflowBuiltInTransformationSettingsSerializer(item["builtInTransformationSettings"]), + : dataflowBuiltInTransformationSettingsSerializer( + item["builtInTransformationSettings"], + ), destinationSettings: !item["destinationSettings"] ? item["destinationSettings"] - : dataflowDestinationOperationSettingsSerializer(item["destinationSettings"]), + : dataflowDestinationOperationSettingsSerializer( + item["destinationSettings"], + ), }; } @@ -1524,10 +1684,14 @@ export function dataflowOperationDeserializer(item: any): DataflowOperation { : dataflowSourceOperationSettingsDeserializer(item["sourceSettings"]), builtInTransformationSettings: !item["builtInTransformationSettings"] ? item["builtInTransformationSettings"] - : dataflowBuiltInTransformationSettingsDeserializer(item["builtInTransformationSettings"]), + : dataflowBuiltInTransformationSettingsDeserializer( + item["builtInTransformationSettings"], + ), destinationSettings: !item["destinationSettings"] ? item["destinationSettings"] - : dataflowDestinationOperationSettingsDeserializer(item["destinationSettings"]), + : dataflowDestinationOperationSettingsDeserializer( + item["destinationSettings"], + ), }; } @@ -1635,7 +1799,9 @@ export function dataflowBuiltInTransformationSettingsSerializer( filter: !item["filter"] ? item["filter"] : dataflowBuiltInTransformationFilterArraySerializer(item["filter"]), - map: !item["map"] ? item["map"] : dataflowBuiltInTransformationMapArraySerializer(item["map"]), + map: !item["map"] + ? item["map"] + : dataflowBuiltInTransformationMapArraySerializer(item["map"]), }; } @@ -1678,6 +1844,22 @@ export enum KnownTransformationSerializationFormat { */ export type TransformationSerializationFormat = string; +export function dataflowBuiltInTransformationDatasetArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return dataflowBuiltInTransformationDatasetSerializer(item); + }); +} + +export function dataflowBuiltInTransformationDatasetArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return dataflowBuiltInTransformationDatasetDeserializer(item); + }); +} + /** Dataflow BuiltIn Transformation dataset properties */ export interface DataflowBuiltInTransformationDataset { /** The key of the dataset. */ @@ -1720,19 +1902,19 @@ export function dataflowBuiltInTransformationDatasetDeserializer( }; } -export function dataflowBuiltInTransformationDatasetArraySerializer( - result: Array, +export function dataflowBuiltInTransformationFilterArraySerializer( + result: Array, ): any[] { return result.map((item) => { - return dataflowBuiltInTransformationDatasetSerializer(item); + return dataflowBuiltInTransformationFilterSerializer(item); }); } -export function dataflowBuiltInTransformationDatasetArrayDeserializer( - result: Array, +export function dataflowBuiltInTransformationFilterArrayDeserializer( + result: Array, ): any[] { return result.map((item) => { - return dataflowBuiltInTransformationDatasetDeserializer(item); + return dataflowBuiltInTransformationFilterDeserializer(item); }); } @@ -1789,19 +1971,19 @@ export enum KnownFilterType { */ export type FilterType = string; -export function dataflowBuiltInTransformationFilterArraySerializer( - result: Array, +export function dataflowBuiltInTransformationMapArraySerializer( + result: Array, ): any[] { return result.map((item) => { - return dataflowBuiltInTransformationFilterSerializer(item); + return dataflowBuiltInTransformationMapSerializer(item); }); } -export function dataflowBuiltInTransformationFilterArrayDeserializer( - result: Array, +export function dataflowBuiltInTransformationMapArrayDeserializer( + result: Array, ): any[] { return result.map((item) => { - return dataflowBuiltInTransformationFilterDeserializer(item); + return dataflowBuiltInTransformationMapDeserializer(item); }); } @@ -1874,22 +2056,6 @@ export enum KnownDataflowMappingType { */ export type DataflowMappingType = string; -export function dataflowBuiltInTransformationMapArraySerializer( - result: Array, -): any[] { - return result.map((item) => { - return dataflowBuiltInTransformationMapSerializer(item); - }); -} - -export function dataflowBuiltInTransformationMapArrayDeserializer( - result: Array, -): any[] { - return result.map((item) => { - return dataflowBuiltInTransformationMapDeserializer(item); - }); -} - /** Dataflow Destination Operation properties */ export interface DataflowDestinationOperationSettings { /** Reference to the Endpoint CR. Can be of Broker, Kafka, Fabric, ADLS, ADX type. */ @@ -1916,18 +2082,6 @@ export function dataflowDestinationOperationSettingsDeserializer( }; } -export function dataflowOperationArraySerializer(result: Array): any[] { - return result.map((item) => { - return dataflowOperationSerializer(item); - }); -} - -export function dataflowOperationArrayDeserializer(result: Array): any[] { - return result.map((item) => { - return dataflowOperationDeserializer(item); - }); -} - /** The response of a DataflowResource list operation. */ export interface _DataflowResourceListResult { /** The DataflowResource items on this page */ @@ -1936,20 +2090,26 @@ export interface _DataflowResourceListResult { nextLink?: string; } -export function _dataflowResourceListResultDeserializer(item: any): _DataflowResourceListResult { +export function _dataflowResourceListResultDeserializer( + item: any, +): _DataflowResourceListResult { return { value: dataflowResourceArrayDeserializer(item["value"]), nextLink: item["nextLink"], }; } -export function dataflowResourceArraySerializer(result: Array): any[] { +export function dataflowResourceArraySerializer( + result: Array, +): any[] { return result.map((item) => { return dataflowResourceSerializer(item); }); } -export function dataflowResourceArrayDeserializer(result: Array): any[] { +export function dataflowResourceArrayDeserializer( + result: Array, +): any[] { return result.map((item) => { return dataflowResourceDeserializer(item); }); @@ -1963,7 +2123,9 @@ export interface DataflowProfileResource extends ProxyResource { extendedLocation: ExtendedLocation; } -export function dataflowProfileResourceSerializer(item: DataflowProfileResource): any { +export function dataflowProfileResourceSerializer( + item: DataflowProfileResource, +): any { return { properties: !item["properties"] ? item["properties"] @@ -1972,7 +2134,9 @@ export function dataflowProfileResourceSerializer(item: DataflowProfileResource) }; } -export function dataflowProfileResourceDeserializer(item: any): DataflowProfileResource { +export function dataflowProfileResourceDeserializer( + item: any, +): DataflowProfileResource { return { id: item["id"], name: item["name"], @@ -1997,7 +2161,9 @@ export interface DataflowProfileProperties { readonly provisioningState?: ProvisioningState; } -export function dataflowProfilePropertiesSerializer(item: DataflowProfileProperties): any { +export function dataflowProfilePropertiesSerializer( + item: DataflowProfileProperties, +): any { return { diagnostics: !item["diagnostics"] ? item["diagnostics"] @@ -2006,15 +2172,15 @@ export function dataflowProfilePropertiesSerializer(item: DataflowProfilePropert }; } -export function dataflowProfilePropertiesDeserializer(item: any): DataflowProfileProperties { +export function dataflowProfilePropertiesDeserializer( + item: any, +): DataflowProfileProperties { return { diagnostics: !item["diagnostics"] ? item["diagnostics"] : profileDiagnosticsDeserializer(item["diagnostics"]), instanceCount: item["instanceCount"], - provisioningState: !item["provisioningState"] - ? item["provisioningState"] - : provisioningStateDeserializer(item["provisioningState"]), + provisioningState: item["provisioningState"], }; } @@ -2028,15 +2194,23 @@ export interface ProfileDiagnostics { export function profileDiagnosticsSerializer(item: ProfileDiagnostics): any { return { - logs: !item["logs"] ? item["logs"] : diagnosticsLogsSerializer(item["logs"]), - metrics: !item["metrics"] ? item["metrics"] : metricsSerializer(item["metrics"]), + logs: !item["logs"] + ? item["logs"] + : diagnosticsLogsSerializer(item["logs"]), + metrics: !item["metrics"] + ? item["metrics"] + : metricsSerializer(item["metrics"]), }; } export function profileDiagnosticsDeserializer(item: any): ProfileDiagnostics { return { - logs: !item["logs"] ? item["logs"] : diagnosticsLogsDeserializer(item["logs"]), - metrics: !item["metrics"] ? item["metrics"] : metricsDeserializer(item["metrics"]), + logs: !item["logs"] + ? item["logs"] + : diagnosticsLogsDeserializer(item["logs"]), + metrics: !item["metrics"] + ? item["metrics"] + : metricsDeserializer(item["metrics"]), }; } @@ -2113,7 +2287,9 @@ export interface BrokerAuthorizationResource extends ProxyResource { extendedLocation: ExtendedLocation; } -export function brokerAuthorizationResourceSerializer(item: BrokerAuthorizationResource): any { +export function brokerAuthorizationResourceSerializer( + item: BrokerAuthorizationResource, +): any { return { properties: !item["properties"] ? item["properties"] @@ -2122,7 +2298,9 @@ export function brokerAuthorizationResourceSerializer(item: BrokerAuthorizationR }; } -export function brokerAuthorizationResourceDeserializer(item: any): BrokerAuthorizationResource { +export function brokerAuthorizationResourceDeserializer( + item: any, +): BrokerAuthorizationResource { return { id: item["id"], name: item["name"], @@ -2145,9 +2323,13 @@ export interface BrokerAuthorizationProperties { readonly provisioningState?: ProvisioningState; } -export function brokerAuthorizationPropertiesSerializer(item: BrokerAuthorizationProperties): any { +export function brokerAuthorizationPropertiesSerializer( + item: BrokerAuthorizationProperties, +): any { return { - authorizationPolicies: authorizationConfigSerializer(item["authorizationPolicies"]), + authorizationPolicies: authorizationConfigSerializer( + item["authorizationPolicies"], + ), }; } @@ -2155,10 +2337,10 @@ export function brokerAuthorizationPropertiesDeserializer( item: any, ): BrokerAuthorizationProperties { return { - authorizationPolicies: authorizationConfigDeserializer(item["authorizationPolicies"]), - provisioningState: !item["provisioningState"] - ? item["provisioningState"] - : provisioningStateDeserializer(item["provisioningState"]), + authorizationPolicies: authorizationConfigDeserializer( + item["authorizationPolicies"], + ), + provisioningState: item["provisioningState"], }; } @@ -2173,17 +2355,39 @@ export interface AuthorizationConfig { export function authorizationConfigSerializer(item: AuthorizationConfig): any { return { cache: item["cache"], - rules: !item["rules"] ? item["rules"] : authorizationRuleArraySerializer(item["rules"]), + rules: !item["rules"] + ? item["rules"] + : authorizationRuleArraySerializer(item["rules"]), }; } -export function authorizationConfigDeserializer(item: any): AuthorizationConfig { +export function authorizationConfigDeserializer( + item: any, +): AuthorizationConfig { return { cache: item["cache"], - rules: !item["rules"] ? item["rules"] : authorizationRuleArrayDeserializer(item["rules"]), + rules: !item["rules"] + ? item["rules"] + : authorizationRuleArrayDeserializer(item["rules"]), }; } +export function authorizationRuleArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return authorizationRuleSerializer(item); + }); +} + +export function authorizationRuleArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return authorizationRuleDeserializer(item); + }); +} + /** AuthorizationConfig Rule Properties */ export interface AuthorizationRule { /** Give access to Broker methods and topics. */ @@ -2204,14 +2408,32 @@ export function authorizationRuleSerializer(item: AuthorizationRule): any { }; } -export function authorizationRuleDeserializer(item: any): AuthorizationRule { - return { - brokerResources: brokerResourceRuleArrayDeserializer(item["brokerResources"]), - principals: principalDefinitionDeserializer(item["principals"]), - stateStoreResources: !item["stateStoreResources"] - ? item["stateStoreResources"] - : stateStoreResourceRuleArrayDeserializer(item["stateStoreResources"]), - }; +export function authorizationRuleDeserializer(item: any): AuthorizationRule { + return { + brokerResources: brokerResourceRuleArrayDeserializer( + item["brokerResources"], + ), + principals: principalDefinitionDeserializer(item["principals"]), + stateStoreResources: !item["stateStoreResources"] + ? item["stateStoreResources"] + : stateStoreResourceRuleArrayDeserializer(item["stateStoreResources"]), + }; +} + +export function brokerResourceRuleArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return brokerResourceRuleSerializer(item); + }); +} + +export function brokerResourceRuleArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return brokerResourceRuleDeserializer(item); + }); } /** Broker Resource Rule properties. This defines the objects that represent the actions or topics, such as - method.Connect, method.Publish, etc. */ @@ -2277,18 +2499,6 @@ export enum KnownBrokerResourceDefinitionMethods { */ export type BrokerResourceDefinitionMethods = string; -export function brokerResourceRuleArraySerializer(result: Array): any[] { - return result.map((item) => { - return brokerResourceRuleSerializer(item); - }); -} - -export function brokerResourceRuleArrayDeserializer(result: Array): any[] { - return result.map((item) => { - return brokerResourceRuleDeserializer(item); - }); -} - /** PrincipalDefinition properties of Rule */ export interface PrincipalDefinition { /** A list of key-value pairs that match the attributes of the clients. The attributes are case-sensitive and must match the attributes provided by the clients during authentication. */ @@ -2319,7 +2529,9 @@ export function principalDefinitionSerializer(item: PrincipalDefinition): any { }; } -export function principalDefinitionDeserializer(item: any): PrincipalDefinition { +export function principalDefinitionDeserializer( + item: any, +): PrincipalDefinition { return { attributes: !item["attributes"] ? item["attributes"] @@ -2339,6 +2551,22 @@ export function principalDefinitionDeserializer(item: any): PrincipalDefinition }; } +export function stateStoreResourceRuleArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return stateStoreResourceRuleSerializer(item); + }); +} + +export function stateStoreResourceRuleArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return stateStoreResourceRuleDeserializer(item); + }); +} + /** State Store Resource Rule properties. */ export interface StateStoreResourceRule { /** Allowed keyTypes pattern, string, binary. The key type used for matching, for example pattern tries to match the key to a glob-style pattern and string checks key is equal to value provided in keys. */ @@ -2349,7 +2577,9 @@ export interface StateStoreResourceRule { method: StateStoreResourceDefinitionMethods; } -export function stateStoreResourceRuleSerializer(item: StateStoreResourceRule): any { +export function stateStoreResourceRuleSerializer( + item: StateStoreResourceRule, +): any { return { keyType: item["keyType"], keys: item["keys"].map((p: any) => { @@ -2359,7 +2589,9 @@ export function stateStoreResourceRuleSerializer(item: StateStoreResourceRule): }; } -export function stateStoreResourceRuleDeserializer(item: any): StateStoreResourceRule { +export function stateStoreResourceRuleDeserializer( + item: any, +): StateStoreResourceRule { return { keyType: item["keyType"], keys: item["keys"].map((p: any) => { @@ -2411,34 +2643,6 @@ export enum KnownStateStoreResourceDefinitionMethods { */ export type StateStoreResourceDefinitionMethods = string; -export function stateStoreResourceRuleArraySerializer( - result: Array, -): any[] { - return result.map((item) => { - return stateStoreResourceRuleSerializer(item); - }); -} - -export function stateStoreResourceRuleArrayDeserializer( - result: Array, -): any[] { - return result.map((item) => { - return stateStoreResourceRuleDeserializer(item); - }); -} - -export function authorizationRuleArraySerializer(result: Array): any[] { - return result.map((item) => { - return authorizationRuleSerializer(item); - }); -} - -export function authorizationRuleArrayDeserializer(result: Array): any[] { - return result.map((item) => { - return authorizationRuleDeserializer(item); - }); -} - /** The response of a BrokerAuthorizationResource list operation. */ export interface _BrokerAuthorizationResourceListResult { /** The BrokerAuthorizationResource items on this page */ @@ -2480,7 +2684,9 @@ export interface BrokerAuthenticationResource extends ProxyResource { extendedLocation: ExtendedLocation; } -export function brokerAuthenticationResourceSerializer(item: BrokerAuthenticationResource): any { +export function brokerAuthenticationResourceSerializer( + item: BrokerAuthenticationResource, +): any { return { properties: !item["properties"] ? item["properties"] @@ -2489,7 +2695,9 @@ export function brokerAuthenticationResourceSerializer(item: BrokerAuthenticatio }; } -export function brokerAuthenticationResourceDeserializer(item: any): BrokerAuthenticationResource { +export function brokerAuthenticationResourceDeserializer( + item: any, +): BrokerAuthenticationResource { return { id: item["id"], name: item["name"], @@ -2516,7 +2724,9 @@ export function brokerAuthenticationPropertiesSerializer( item: BrokerAuthenticationProperties, ): any { return { - authenticationMethods: brokerAuthenticatorMethodsArraySerializer(item["authenticationMethods"]), + authenticationMethods: brokerAuthenticatorMethodsArraySerializer( + item["authenticationMethods"], + ), }; } @@ -2527,12 +2737,26 @@ export function brokerAuthenticationPropertiesDeserializer( authenticationMethods: brokerAuthenticatorMethodsArrayDeserializer( item["authenticationMethods"], ), - provisioningState: !item["provisioningState"] - ? item["provisioningState"] - : provisioningStateDeserializer(item["provisioningState"]), + provisioningState: item["provisioningState"], }; } +export function brokerAuthenticatorMethodsArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return brokerAuthenticatorMethodsSerializer(item); + }); +} + +export function brokerAuthenticatorMethodsArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return brokerAuthenticatorMethodsDeserializer(item); + }); +} + /** Set of broker authentication policies. Only one method is supported for each entry. */ export interface BrokerAuthenticatorMethods { /** Custom authentication configuration. */ @@ -2545,7 +2769,9 @@ export interface BrokerAuthenticatorMethods { x509Settings?: BrokerAuthenticatorMethodX509; } -export function brokerAuthenticatorMethodsSerializer(item: BrokerAuthenticatorMethods): any { +export function brokerAuthenticatorMethodsSerializer( + item: BrokerAuthenticatorMethods, +): any { return { method: item["method"], customSettings: !item["customSettings"] @@ -2553,14 +2779,18 @@ export function brokerAuthenticatorMethodsSerializer(item: BrokerAuthenticatorMe : brokerAuthenticatorMethodCustomSerializer(item["customSettings"]), serviceAccountTokenSettings: !item["serviceAccountTokenSettings"] ? item["serviceAccountTokenSettings"] - : brokerAuthenticatorMethodSatSerializer(item["serviceAccountTokenSettings"]), + : brokerAuthenticatorMethodSatSerializer( + item["serviceAccountTokenSettings"], + ), x509Settings: !item["x509Settings"] ? item["x509Settings"] : brokerAuthenticatorMethodX509Serializer(item["x509Settings"]), }; } -export function brokerAuthenticatorMethodsDeserializer(item: any): BrokerAuthenticatorMethods { +export function brokerAuthenticatorMethodsDeserializer( + item: any, +): BrokerAuthenticatorMethods { return { method: item["method"], customSettings: !item["customSettings"] @@ -2568,7 +2798,9 @@ export function brokerAuthenticatorMethodsDeserializer(item: any): BrokerAuthent : brokerAuthenticatorMethodCustomDeserializer(item["customSettings"]), serviceAccountTokenSettings: !item["serviceAccountTokenSettings"] ? item["serviceAccountTokenSettings"] - : brokerAuthenticatorMethodSatDeserializer(item["serviceAccountTokenSettings"]), + : brokerAuthenticatorMethodSatDeserializer( + item["serviceAccountTokenSettings"], + ), x509Settings: !item["x509Settings"] ? item["x509Settings"] : brokerAuthenticatorMethodX509Deserializer(item["x509Settings"]), @@ -2612,7 +2844,9 @@ export function brokerAuthenticatorMethodCustomSerializer( item: BrokerAuthenticatorMethodCustom, ): any { return { - auth: !item["auth"] ? item["auth"] : brokerAuthenticatorCustomAuthSerializer(item["auth"]), + auth: !item["auth"] + ? item["auth"] + : brokerAuthenticatorCustomAuthSerializer(item["auth"]), caCertConfigMap: item["caCertConfigMap"], endpoint: item["endpoint"], headers: item["headers"], @@ -2623,7 +2857,9 @@ export function brokerAuthenticatorMethodCustomDeserializer( item: any, ): BrokerAuthenticatorMethodCustom { return { - auth: !item["auth"] ? item["auth"] : brokerAuthenticatorCustomAuthDeserializer(item["auth"]), + auth: !item["auth"] + ? item["auth"] + : brokerAuthenticatorCustomAuthDeserializer(item["auth"]), caCertConfigMap: item["caCertConfigMap"], endpoint: item["endpoint"], headers: item["headers"], @@ -2636,7 +2872,9 @@ export interface BrokerAuthenticatorCustomAuth { x509: X509ManualCertificate; } -export function brokerAuthenticatorCustomAuthSerializer(item: BrokerAuthenticatorCustomAuth): any { +export function brokerAuthenticatorCustomAuthSerializer( + item: BrokerAuthenticatorCustomAuth, +): any { return { x509: x509ManualCertificateSerializer(item["x509"]) }; } @@ -2654,11 +2892,15 @@ export interface X509ManualCertificate { secretRef: string; } -export function x509ManualCertificateSerializer(item: X509ManualCertificate): any { +export function x509ManualCertificateSerializer( + item: X509ManualCertificate, +): any { return { secretRef: item["secretRef"] }; } -export function x509ManualCertificateDeserializer(item: any): X509ManualCertificate { +export function x509ManualCertificateDeserializer( + item: any, +): X509ManualCertificate { return { secretRef: item["secretRef"], }; @@ -2670,7 +2912,9 @@ export interface BrokerAuthenticatorMethodSat { audiences: string[]; } -export function brokerAuthenticatorMethodSatSerializer(item: BrokerAuthenticatorMethodSat): any { +export function brokerAuthenticatorMethodSatSerializer( + item: BrokerAuthenticatorMethodSat, +): any { return { audiences: item["audiences"].map((p: any) => { return p; @@ -2678,7 +2922,9 @@ export function brokerAuthenticatorMethodSatSerializer(item: BrokerAuthenticator }; } -export function brokerAuthenticatorMethodSatDeserializer(item: any): BrokerAuthenticatorMethodSat { +export function brokerAuthenticatorMethodSatDeserializer( + item: any, +): BrokerAuthenticatorMethodSat { return { audiences: item["audiences"].map((p: any) => { return p; @@ -2689,16 +2935,23 @@ export function brokerAuthenticatorMethodSatDeserializer(item: any): BrokerAuthe /** X509 for BrokerAuthentication. */ export interface BrokerAuthenticatorMethodX509 { /** X509 authorization attributes properties. */ - authorizationAttributes?: Record; + authorizationAttributes?: Record< + string, + BrokerAuthenticatorMethodX509Attributes + >; /** Name of the trusted client ca cert resource. */ trustedClientCaCert?: string; } -export function brokerAuthenticatorMethodX509Serializer(item: BrokerAuthenticatorMethodX509): any { +export function brokerAuthenticatorMethodX509Serializer( + item: BrokerAuthenticatorMethodX509, +): any { return { authorizationAttributes: !item["authorizationAttributes"] ? item["authorizationAttributes"] - : brokerAuthenticatorMethodX509AttributesRecordSerializer(item["authorizationAttributes"]), + : brokerAuthenticatorMethodX509AttributesRecordSerializer( + item["authorizationAttributes"], + ), trustedClientCaCert: item["trustedClientCaCert"], }; } @@ -2709,34 +2962,13 @@ export function brokerAuthenticatorMethodX509Deserializer( return { authorizationAttributes: !item["authorizationAttributes"] ? item["authorizationAttributes"] - : brokerAuthenticatorMethodX509AttributesRecordDeserializer(item["authorizationAttributes"]), + : brokerAuthenticatorMethodX509AttributesRecordDeserializer( + item["authorizationAttributes"], + ), trustedClientCaCert: item["trustedClientCaCert"], }; } -/** BrokerAuthenticatorMethodX509Attributes properties. */ -export interface BrokerAuthenticatorMethodX509Attributes { - /** Attributes object. */ - attributes: Record; - /** Subject of the X509 attribute. */ - subject: string; -} - -export function brokerAuthenticatorMethodX509AttributesSerializer( - item: BrokerAuthenticatorMethodX509Attributes, -): any { - return { attributes: item["attributes"], subject: item["subject"] }; -} - -export function brokerAuthenticatorMethodX509AttributesDeserializer( - item: any, -): BrokerAuthenticatorMethodX509Attributes { - return { - attributes: item["attributes"], - subject: item["subject"], - }; -} - export function brokerAuthenticatorMethodX509AttributesRecordSerializer( item: Record, ): Record { @@ -2761,20 +2993,27 @@ export function brokerAuthenticatorMethodX509AttributesRecordDeserializer( return result; } -export function brokerAuthenticatorMethodsArraySerializer( - result: Array, -): any[] { - return result.map((item) => { - return brokerAuthenticatorMethodsSerializer(item); - }); +/** BrokerAuthenticatorMethodX509Attributes properties. */ +export interface BrokerAuthenticatorMethodX509Attributes { + /** Attributes object. */ + attributes: Record; + /** Subject of the X509 attribute. */ + subject: string; } -export function brokerAuthenticatorMethodsArrayDeserializer( - result: Array, -): any[] { - return result.map((item) => { - return brokerAuthenticatorMethodsDeserializer(item); - }); +export function brokerAuthenticatorMethodX509AttributesSerializer( + item: BrokerAuthenticatorMethodX509Attributes, +): any { + return { attributes: item["attributes"], subject: item["subject"] }; +} + +export function brokerAuthenticatorMethodX509AttributesDeserializer( + item: any, +): BrokerAuthenticatorMethodX509Attributes { + return { + attributes: item["attributes"], + subject: item["subject"], + }; } /** The response of a BrokerAuthenticationResource list operation. */ @@ -2818,7 +3057,9 @@ export interface BrokerListenerResource extends ProxyResource { extendedLocation: ExtendedLocation; } -export function brokerListenerResourceSerializer(item: BrokerListenerResource): any { +export function brokerListenerResourceSerializer( + item: BrokerListenerResource, +): any { return { properties: !item["properties"] ? item["properties"] @@ -2827,7 +3068,9 @@ export function brokerListenerResourceSerializer(item: BrokerListenerResource): }; } -export function brokerListenerResourceDeserializer(item: any): BrokerListenerResource { +export function brokerListenerResourceDeserializer( + item: any, +): BrokerListenerResource { return { id: item["id"], name: item["name"], @@ -2854,7 +3097,9 @@ export interface BrokerListenerProperties { readonly provisioningState?: ProvisioningState; } -export function brokerListenerPropertiesSerializer(item: BrokerListenerProperties): any { +export function brokerListenerPropertiesSerializer( + item: BrokerListenerProperties, +): any { return { serviceName: item["serviceName"], ports: listenerPortArraySerializer(item["ports"]), @@ -2862,17 +3107,33 @@ export function brokerListenerPropertiesSerializer(item: BrokerListenerPropertie }; } -export function brokerListenerPropertiesDeserializer(item: any): BrokerListenerProperties { +export function brokerListenerPropertiesDeserializer( + item: any, +): BrokerListenerProperties { return { serviceName: item["serviceName"], ports: listenerPortArrayDeserializer(item["ports"]), serviceType: item["serviceType"], - provisioningState: !item["provisioningState"] - ? item["provisioningState"] - : provisioningStateDeserializer(item["provisioningState"]), + provisioningState: item["provisioningState"], }; } +export function listenerPortArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return listenerPortSerializer(item); + }); +} + +export function listenerPortArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return listenerPortDeserializer(item); + }); +} + /** Defines a TCP port on which a `BrokerListener` listens. */ export interface ListenerPort { /** Reference to client authentication settings. Omit to disable authentication. */ @@ -2926,8 +3187,12 @@ export function tlsCertMethodSerializer(item: TlsCertMethod): any { mode: item["mode"], certManagerCertificateSpec: !item["certManagerCertificateSpec"] ? item["certManagerCertificateSpec"] - : certManagerCertificateSpecSerializer(item["certManagerCertificateSpec"]), - manual: !item["manual"] ? item["manual"] : x509ManualCertificateSerializer(item["manual"]), + : certManagerCertificateSpecSerializer( + item["certManagerCertificateSpec"], + ), + manual: !item["manual"] + ? item["manual"] + : x509ManualCertificateSerializer(item["manual"]), }; } @@ -2936,8 +3201,12 @@ export function tlsCertMethodDeserializer(item: any): TlsCertMethod { mode: item["mode"], certManagerCertificateSpec: !item["certManagerCertificateSpec"] ? item["certManagerCertificateSpec"] - : certManagerCertificateSpecDeserializer(item["certManagerCertificateSpec"]), - manual: !item["manual"] ? item["manual"] : x509ManualCertificateDeserializer(item["manual"]), + : certManagerCertificateSpecDeserializer( + item["certManagerCertificateSpec"], + ), + manual: !item["manual"] + ? item["manual"] + : x509ManualCertificateDeserializer(item["manual"]), }; } @@ -2975,7 +3244,9 @@ export interface CertManagerCertificateSpec { san?: SanForCert; } -export function certManagerCertificateSpecSerializer(item: CertManagerCertificateSpec): any { +export function certManagerCertificateSpecSerializer( + item: CertManagerCertificateSpec, +): any { return { duration: item["duration"], secretName: item["secretName"], @@ -2988,7 +3259,9 @@ export function certManagerCertificateSpecSerializer(item: CertManagerCertificat }; } -export function certManagerCertificateSpecDeserializer(item: any): CertManagerCertificateSpec { +export function certManagerCertificateSpecDeserializer( + item: any, +): CertManagerCertificateSpec { return { duration: item["duration"], secretName: item["secretName"], @@ -3011,11 +3284,15 @@ export interface CertManagerIssuerRef { name: string; } -export function certManagerIssuerRefSerializer(item: CertManagerIssuerRef): any { +export function certManagerIssuerRefSerializer( + item: CertManagerIssuerRef, +): any { return { group: item["group"], kind: item["kind"], name: item["name"] }; } -export function certManagerIssuerRefDeserializer(item: any): CertManagerIssuerRef { +export function certManagerIssuerRefDeserializer( + item: any, +): CertManagerIssuerRef { return { group: item["group"], kind: item["kind"], @@ -3049,14 +3326,18 @@ export interface CertManagerPrivateKey { rotationPolicy: PrivateKeyRotationPolicy; } -export function certManagerPrivateKeySerializer(item: CertManagerPrivateKey): any { +export function certManagerPrivateKeySerializer( + item: CertManagerPrivateKey, +): any { return { algorithm: item["algorithm"], rotationPolicy: item["rotationPolicy"], }; } -export function certManagerPrivateKeyDeserializer(item: any): CertManagerPrivateKey { +export function certManagerPrivateKeyDeserializer( + item: any, +): CertManagerPrivateKey { return { algorithm: item["algorithm"], rotationPolicy: item["rotationPolicy"], @@ -3144,18 +3425,6 @@ export function sanForCertDeserializer(item: any): SanForCert { }; } -export function listenerPortArraySerializer(result: Array): any[] { - return result.map((item) => { - return listenerPortSerializer(item); - }); -} - -export function listenerPortArrayDeserializer(result: Array): any[] { - return result.map((item) => { - return listenerPortDeserializer(item); - }); -} - /** Kubernetes Service Types supported by Listener */ export enum KnownServiceType { /** Cluster IP Service. */ @@ -3262,7 +3531,9 @@ export interface BrokerProperties { export function brokerPropertiesSerializer(item: BrokerProperties): any { return { - advanced: !item["advanced"] ? item["advanced"] : advancedSettingsSerializer(item["advanced"]), + advanced: !item["advanced"] + ? item["advanced"] + : advancedSettingsSerializer(item["advanced"]), cardinality: !item["cardinality"] ? item["cardinality"] : cardinalitySerializer(item["cardinality"]), @@ -3281,7 +3552,9 @@ export function brokerPropertiesSerializer(item: BrokerProperties): any { export function brokerPropertiesDeserializer(item: any): BrokerProperties { return { - advanced: !item["advanced"] ? item["advanced"] : advancedSettingsDeserializer(item["advanced"]), + advanced: !item["advanced"] + ? item["advanced"] + : advancedSettingsDeserializer(item["advanced"]), cardinality: !item["cardinality"] ? item["cardinality"] : cardinalityDeserializer(item["cardinality"]), @@ -3295,9 +3568,7 @@ export function brokerPropertiesDeserializer(item: any): BrokerProperties { ? item["generateResourceLimits"] : generateResourceLimitsDeserializer(item["generateResourceLimits"]), memoryProfile: item["memoryProfile"], - provisioningState: !item["provisioningState"] - ? item["provisioningState"] - : provisioningStateDeserializer(item["provisioningState"]), + provisioningState: item["provisioningState"], }; } @@ -3313,7 +3584,9 @@ export interface AdvancedSettings { export function advancedSettingsSerializer(item: AdvancedSettings): any { return { - clients: !item["clients"] ? item["clients"] : clientConfigSerializer(item["clients"]), + clients: !item["clients"] + ? item["clients"] + : clientConfigSerializer(item["clients"]), encryptInternalTraffic: item["encryptInternalTraffic"], internalCerts: !item["internalCerts"] ? item["internalCerts"] @@ -3323,7 +3596,9 @@ export function advancedSettingsSerializer(item: AdvancedSettings): any { export function advancedSettingsDeserializer(item: any): AdvancedSettings { return { - clients: !item["clients"] ? item["clients"] : clientConfigDeserializer(item["clients"]), + clients: !item["clients"] + ? item["clients"] + : clientConfigDeserializer(item["clients"]), encryptInternalTraffic: item["encryptInternalTraffic"], internalCerts: !item["internalCerts"] ? item["internalCerts"] @@ -3381,11 +3656,15 @@ export interface SubscriberQueueLimit { strategy?: SubscriberMessageDropStrategy; } -export function subscriberQueueLimitSerializer(item: SubscriberQueueLimit): any { +export function subscriberQueueLimitSerializer( + item: SubscriberQueueLimit, +): any { return { length: item["length"], strategy: item["strategy"] }; } -export function subscriberQueueLimitDeserializer(item: any): SubscriberQueueLimit { +export function subscriberQueueLimitDeserializer( + item: any, +): SubscriberQueueLimit { return { length: item["length"], strategy: item["strategy"], @@ -3420,7 +3699,9 @@ export interface CertManagerCertOptions { privateKey: CertManagerPrivateKey; } -export function certManagerCertOptionsSerializer(item: CertManagerCertOptions): any { +export function certManagerCertOptionsSerializer( + item: CertManagerCertOptions, +): any { return { duration: item["duration"], renewBefore: item["renewBefore"], @@ -3428,7 +3709,9 @@ export function certManagerCertOptionsSerializer(item: CertManagerCertOptions): }; } -export function certManagerCertOptionsDeserializer(item: any): CertManagerCertOptions { +export function certManagerCertOptionsDeserializer( + item: any, +): CertManagerCertOptions { return { duration: item["duration"], renewBefore: item["renewBefore"], @@ -3517,19 +3800,33 @@ export interface BrokerDiagnostics { export function brokerDiagnosticsSerializer(item: BrokerDiagnostics): any { return { - logs: !item["logs"] ? item["logs"] : diagnosticsLogsSerializer(item["logs"]), - metrics: !item["metrics"] ? item["metrics"] : metricsSerializer(item["metrics"]), - selfCheck: !item["selfCheck"] ? item["selfCheck"] : selfCheckSerializer(item["selfCheck"]), + logs: !item["logs"] + ? item["logs"] + : diagnosticsLogsSerializer(item["logs"]), + metrics: !item["metrics"] + ? item["metrics"] + : metricsSerializer(item["metrics"]), + selfCheck: !item["selfCheck"] + ? item["selfCheck"] + : selfCheckSerializer(item["selfCheck"]), traces: !item["traces"] ? item["traces"] : tracesSerializer(item["traces"]), }; } export function brokerDiagnosticsDeserializer(item: any): BrokerDiagnostics { return { - logs: !item["logs"] ? item["logs"] : diagnosticsLogsDeserializer(item["logs"]), - metrics: !item["metrics"] ? item["metrics"] : metricsDeserializer(item["metrics"]), - selfCheck: !item["selfCheck"] ? item["selfCheck"] : selfCheckDeserializer(item["selfCheck"]), - traces: !item["traces"] ? item["traces"] : tracesDeserializer(item["traces"]), + logs: !item["logs"] + ? item["logs"] + : diagnosticsLogsDeserializer(item["logs"]), + metrics: !item["metrics"] + ? item["metrics"] + : metricsDeserializer(item["metrics"]), + selfCheck: !item["selfCheck"] + ? item["selfCheck"] + : selfCheckDeserializer(item["selfCheck"]), + traces: !item["traces"] + ? item["traces"] + : tracesDeserializer(item["traces"]), }; } @@ -3622,7 +3919,9 @@ export interface DiskBackedMessageBuffer { persistentVolumeClaimSpec?: VolumeClaimSpec; } -export function diskBackedMessageBufferSerializer(item: DiskBackedMessageBuffer): any { +export function diskBackedMessageBufferSerializer( + item: DiskBackedMessageBuffer, +): any { return { maxSize: item["maxSize"], ephemeralVolumeClaimSpec: !item["ephemeralVolumeClaimSpec"] @@ -3634,7 +3933,9 @@ export function diskBackedMessageBufferSerializer(item: DiskBackedMessageBuffer) }; } -export function diskBackedMessageBufferDeserializer(item: any): DiskBackedMessageBuffer { +export function diskBackedMessageBufferDeserializer( + item: any, +): DiskBackedMessageBuffer { return { maxSize: item["maxSize"], ephemeralVolumeClaimSpec: !item["ephemeralVolumeClaimSpec"] @@ -3726,11 +4027,15 @@ export interface LocalKubernetesReference { name: string; } -export function localKubernetesReferenceSerializer(item: LocalKubernetesReference): any { +export function localKubernetesReferenceSerializer( + item: LocalKubernetesReference, +): any { return { apiGroup: item["apiGroup"], kind: item["kind"], name: item["name"] }; } -export function localKubernetesReferenceDeserializer(item: any): LocalKubernetesReference { +export function localKubernetesReferenceDeserializer( + item: any, +): LocalKubernetesReference { return { apiGroup: item["apiGroup"], kind: item["kind"], @@ -3759,7 +4064,9 @@ export function kubernetesReferenceSerializer(item: KubernetesReference): any { }; } -export function kubernetesReferenceDeserializer(item: any): KubernetesReference { +export function kubernetesReferenceDeserializer( + item: any, +): KubernetesReference { return { apiGroup: item["apiGroup"], kind: item["kind"], @@ -3799,24 +4106,48 @@ export interface VolumeClaimSpecSelector { matchLabels?: Record; } -export function volumeClaimSpecSelectorSerializer(item: VolumeClaimSpecSelector): any { +export function volumeClaimSpecSelectorSerializer( + item: VolumeClaimSpecSelector, +): any { return { matchExpressions: !item["matchExpressions"] ? item["matchExpressions"] - : volumeClaimSpecSelectorMatchExpressionsArraySerializer(item["matchExpressions"]), + : volumeClaimSpecSelectorMatchExpressionsArraySerializer( + item["matchExpressions"], + ), matchLabels: item["matchLabels"], }; } -export function volumeClaimSpecSelectorDeserializer(item: any): VolumeClaimSpecSelector { +export function volumeClaimSpecSelectorDeserializer( + item: any, +): VolumeClaimSpecSelector { return { matchExpressions: !item["matchExpressions"] ? item["matchExpressions"] - : volumeClaimSpecSelectorMatchExpressionsArrayDeserializer(item["matchExpressions"]), + : volumeClaimSpecSelectorMatchExpressionsArrayDeserializer( + item["matchExpressions"], + ), matchLabels: item["matchLabels"], }; } +export function volumeClaimSpecSelectorMatchExpressionsArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return volumeClaimSpecSelectorMatchExpressionsSerializer(item); + }); +} + +export function volumeClaimSpecSelectorMatchExpressionsArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return volumeClaimSpecSelectorMatchExpressionsDeserializer(item); + }); +} + /** VolumeClaimSpecSelectorMatchExpressions properties */ export interface VolumeClaimSpecSelectorMatchExpressions { /** key is the label key that the selector applies to. */ @@ -3879,33 +4210,21 @@ export enum KnownOperatorValues { */ export type OperatorValues = string; -export function volumeClaimSpecSelectorMatchExpressionsArraySerializer( - result: Array, -): any[] { - return result.map((item) => { - return volumeClaimSpecSelectorMatchExpressionsSerializer(item); - }); -} - -export function volumeClaimSpecSelectorMatchExpressionsArrayDeserializer( - result: Array, -): any[] { - return result.map((item) => { - return volumeClaimSpecSelectorMatchExpressionsDeserializer(item); - }); -} - /** GenerateResourceLimits properties */ export interface GenerateResourceLimits { /** The toggle to enable/disable cpu resource limits. */ cpu?: OperationalMode; } -export function generateResourceLimitsSerializer(item: GenerateResourceLimits): any { +export function generateResourceLimitsSerializer( + item: GenerateResourceLimits, +): any { return { cpu: item["cpu"] }; } -export function generateResourceLimitsDeserializer(item: any): GenerateResourceLimits { +export function generateResourceLimitsDeserializer( + item: any, +): GenerateResourceLimits { return { cpu: item["cpu"], }; @@ -3943,20 +4262,26 @@ export interface _BrokerResourceListResult { nextLink?: string; } -export function _brokerResourceListResultDeserializer(item: any): _BrokerResourceListResult { +export function _brokerResourceListResultDeserializer( + item: any, +): _BrokerResourceListResult { return { value: brokerResourceArrayDeserializer(item["value"]), nextLink: item["nextLink"], }; } -export function brokerResourceArraySerializer(result: Array): any[] { +export function brokerResourceArraySerializer( + result: Array, +): any[] { return result.map((item) => { return brokerResourceSerializer(item); }); } -export function brokerResourceArrayDeserializer(result: Array): any[] { +export function brokerResourceArrayDeserializer( + result: Array, +): any[] { return result.map((item) => { return brokerResourceDeserializer(item); }); @@ -4028,9 +4353,7 @@ export function instancePropertiesSerializer(item: InstanceProperties): any { export function instancePropertiesDeserializer(item: any): InstanceProperties { return { description: item["description"], - provisioningState: !item["provisioningState"] - ? item["provisioningState"] - : provisioningStateDeserializer(item["provisioningState"]), + provisioningState: item["provisioningState"], version: item["version"], schemaRegistryRef: schemaRegistryRefDeserializer(item["schemaRegistryRef"]), }; @@ -4064,14 +4387,18 @@ export interface ManagedServiceIdentity { userAssignedIdentities?: Record; } -export function managedServiceIdentitySerializer(item: ManagedServiceIdentity): any { +export function managedServiceIdentitySerializer( + item: ManagedServiceIdentity, +): any { return { type: item["type"], userAssignedIdentities: item["userAssignedIdentities"], }; } -export function managedServiceIdentityDeserializer(item: any): ManagedServiceIdentity { +export function managedServiceIdentityDeserializer( + item: any, +): ManagedServiceIdentity { return { principalId: item["principalId"], tenantId: item["tenantId"], @@ -4089,7 +4416,7 @@ export enum KnownManagedServiceIdentityType { /** User assigned managed identity. */ UserAssigned = "UserAssigned", /** System and user assigned managed identity. */ - SystemAssignedUserAssigned = "SystemAssigned,UserAssigned", + "SystemAssigned,UserAssigned" = "SystemAssigned,UserAssigned", } /** @@ -4112,11 +4439,15 @@ export interface UserAssignedIdentity { readonly clientId?: string; } -export function userAssignedIdentitySerializer(item: UserAssignedIdentity): any { +export function userAssignedIdentitySerializer( + item: UserAssignedIdentity, +): any { return item; } -export function userAssignedIdentityDeserializer(item: any): UserAssignedIdentity { +export function userAssignedIdentityDeserializer( + item: any, +): UserAssignedIdentity { return { principalId: item["principalId"], clientId: item["clientId"], @@ -4173,20 +4504,26 @@ export interface _InstanceResourceListResult { nextLink?: string; } -export function _instanceResourceListResultDeserializer(item: any): _InstanceResourceListResult { +export function _instanceResourceListResultDeserializer( + item: any, +): _InstanceResourceListResult { return { value: instanceResourceArrayDeserializer(item["value"]), nextLink: item["nextLink"], }; } -export function instanceResourceArraySerializer(result: Array): any[] { +export function instanceResourceArraySerializer( + result: Array, +): any[] { return result.map((item) => { return instanceResourceSerializer(item); }); } -export function instanceResourceArrayDeserializer(result: Array): any[] { +export function instanceResourceArrayDeserializer( + result: Array, +): any[] { return result.map((item) => { return instanceResourceDeserializer(item); }); @@ -4200,13 +4537,21 @@ export interface _OperationListResult { nextLink?: string; } -export function _operationListResultDeserializer(item: any): _OperationListResult { +export function _operationListResultDeserializer( + item: any, +): _OperationListResult { return { value: operationArrayDeserializer(item["value"]), nextLink: item["nextLink"], }; } +export function operationArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return operationDeserializer(item); + }); +} + /** Details of a REST API operation, returned from the Resource Provider Operations API */ export interface Operation { /** The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action" */ @@ -4225,7 +4570,9 @@ export function operationDeserializer(item: any): Operation { return { name: item["name"], isDataAction: item["isDataAction"], - display: !item["display"] ? item["display"] : operationDisplayDeserializer(item["display"]), + display: !item["display"] + ? item["display"] + : operationDisplayDeserializer(item["display"]), origin: item["origin"], actionType: item["actionType"], }; @@ -4254,12 +4601,12 @@ export function operationDisplayDeserializer(item: any): OperationDisplay { /** The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system" */ export enum KnownOrigin { - /** user */ - User = "user", - /** system */ - System = "system", - /** user,system */ - UserSystem = "user,system", + /** Indicates the operation is initiated by a user. */ + user = "user", + /** Indicates the operation is initiated by a system. */ + system = "system", + /** Indicates the operation is initiated by a user or system. */ + "user,system" = "user,system", } /** @@ -4288,8 +4635,8 @@ export enum KnownActionType { */ export type ActionType = string; -export function operationArrayDeserializer(result: Array): any[] { - return result.map((item) => { - return operationDeserializer(item); - }); +/** Api versions */ +export enum KnownVersions { + /** 2024-11-01 version */ + "2024-11-01" = "2024-11-01", } diff --git a/sdk/iotoperations/arm-iotoperations/src/restorePollerHelpers.ts b/sdk/iotoperations/arm-iotoperations/src/restorePollerHelpers.ts index 7f9aacca2234..7226dbbafe95 100644 --- a/sdk/iotoperations/arm-iotoperations/src/restorePollerHelpers.ts +++ b/sdk/iotoperations/arm-iotoperations/src/restorePollerHelpers.ts @@ -6,7 +6,10 @@ import { _instanceCreateOrUpdateDeserialize, _instanceDeleteDeserialize, } from "./api/instance/index.js"; -import { _brokerCreateOrUpdateDeserialize, _brokerDeleteDeserialize } from "./api/broker/index.js"; +import { + _brokerCreateOrUpdateDeserialize, + _brokerDeleteDeserialize, +} from "./api/broker/index.js"; import { _brokerListenerCreateOrUpdateDeserialize, _brokerListenerDeleteDeserialize, @@ -32,7 +35,10 @@ import { _dataflowEndpointDeleteDeserialize, } from "./api/dataflowEndpoint/index.js"; import { getLongRunningPoller } from "./static-helpers/pollingHelpers.js"; -import { OperationOptions, PathUncheckedResponse } from "@azure-rest/core-client"; +import { + OperationOptions, + PathUncheckedResponse, +} from "@azure-rest/core-client"; import { AbortSignalLike } from "@azure/abort-controller"; import { PollerLike, @@ -63,7 +69,9 @@ export interface RestorePollerOptions< export function restorePoller( client: IoTOperationsClient, serializedState: string, - sourceOperation: (...args: any[]) => PollerLike, TResult>, + sourceOperation: ( + ...args: any[] + ) => PollerLike, TResult>, options?: RestorePollerOptions, ): PollerLike, TResult> { const pollerConfig = deserializeState(serializedState).config; @@ -212,17 +220,24 @@ function getDeserializationHelper( // track if we have found a match to return the values found. let found = true; - for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) { - if (candidateParts[i]?.startsWith("{") && candidateParts[i]?.indexOf("}") !== -1) { + for ( + let i = candidateParts.length - 1, j = pathParts.length - 1; + i >= 1 && j >= 1; + i--, j-- + ) { + if ( + candidateParts[i]?.startsWith("{") && + candidateParts[i]?.indexOf("}") !== -1 + ) { const start = candidateParts[i]!.indexOf("}") + 1, end = candidateParts[i]?.length; // If the current part of the candidate is a "template" part // Try to use the suffix of pattern to match the path // {guid} ==> $ // {guid}:export ==> :export$ - const isMatched = new RegExp(`${candidateParts[i]?.slice(start, end)}`).test( - pathParts[j] || "", - ); + const isMatched = new RegExp( + `${candidateParts[i]?.slice(start, end)}`, + ).test(pathParts[j] || ""); if (!isMatched) { found = false; diff --git a/sdk/iotoperations/arm-iotoperations/src/static-helpers/pagingHelpers.ts b/sdk/iotoperations/arm-iotoperations/src/static-helpers/pagingHelpers.ts index ce33af5f4178..97a81e74e301 100644 --- a/sdk/iotoperations/arm-iotoperations/src/static-helpers/pagingHelpers.ts +++ b/sdk/iotoperations/arm-iotoperations/src/static-helpers/pagingHelpers.ts @@ -1,7 +1,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { Client, createRestError, PathUncheckedResponse } from "@azure-rest/core-client"; +import { + Client, + createRestError, + PathUncheckedResponse, +} from "@azure-rest/core-client"; import { RestError } from "@azure/core-rest-pipeline"; /** @@ -39,11 +43,17 @@ export interface PagedAsyncIterableIterator< /** * The connection to the async iterator, part of the iteration protocol */ - [Symbol.asyncIterator](): PagedAsyncIterableIterator; + [Symbol.asyncIterator](): PagedAsyncIterableIterator< + TElement, + TPage, + TPageSettings + >; /** * Return an AsyncIterableIterator that works a page at a time */ - byPage: (settings?: TPageSettings) => AsyncIterableIterator>; + byPage: ( + settings?: TPageSettings, + ) => AsyncIterableIterator>; } /** @@ -61,11 +71,15 @@ export interface PagedResult< /** * A method that returns a page of results. */ - getPage: (pageLink?: string) => Promise<{ page: TPage; nextPageLink?: string } | undefined>; + getPage: ( + pageLink?: string, + ) => Promise<{ page: TPage; nextPageLink?: string } | undefined>; /** * a function to implement the `byPage` method on the paged async iterator. */ - byPage?: (settings?: TPageSettings) => AsyncIterableIterator>; + byPage?: ( + settings?: TPageSettings, + ) => AsyncIterableIterator>; /** * A function to extract elements from a page. @@ -138,7 +152,9 @@ function getPagedAsyncIterator< >( pagedResult: PagedResult, ): PagedAsyncIterableIterator { - const iter = getItemAsyncIterator(pagedResult); + const iter = getItemAsyncIterator( + pagedResult, + ); return { next() { return iter.next(); @@ -157,7 +173,11 @@ function getPagedAsyncIterator< }; } -async function* getItemAsyncIterator( +async function* getItemAsyncIterator< + TElement, + TPage, + TPageSettings extends PageSettings, +>( pagedResult: PagedResult, ): AsyncIterableIterator { const pages = getPageAsyncIterator(pagedResult); @@ -166,14 +186,20 @@ async function* getItemAsyncIterator( +async function* getPageAsyncIterator< + TElement, + TPage, + TPageSettings extends PageSettings, +>( pagedResult: PagedResult, options: { pageLink?: string; } = {}, ): AsyncIterableIterator> { const { pageLink } = options; - let response = await pagedResult.getPage(pageLink ?? pagedResult.firstPageLink); + let response = await pagedResult.getPage( + pageLink ?? pagedResult.firstPageLink, + ); if (!response) { return; } @@ -201,7 +227,11 @@ function getNextLink(body: unknown, nextLinkName?: string): string | undefined { const nextLink = (body as Record)[nextLinkName]; - if (typeof nextLink !== "string" && typeof nextLink !== "undefined" && nextLink !== null) { + if ( + typeof nextLink !== "string" && + typeof nextLink !== "undefined" && + nextLink !== null + ) { throw new RestError( `Body Property ${nextLinkName} should be a string or undefined or null but got ${typeof nextLink}`, ); @@ -231,7 +261,10 @@ function getElements(body: unknown, itemName: string): T[] { /** * Checks if a request failed */ -function checkPagingRequest(response: PathUncheckedResponse, expectedStatuses: string[]): void { +function checkPagingRequest( + response: PathUncheckedResponse, + expectedStatuses: string[], +): void { if (!expectedStatuses.includes(response.status)) { throw createRestError( `Pagination failed with unexpected statusCode ${response.status}`, diff --git a/sdk/iotoperations/arm-iotoperations/src/static-helpers/pollingHelpers.ts b/sdk/iotoperations/arm-iotoperations/src/static-helpers/pollingHelpers.ts index f01c41bab69d..2edbf783be53 100644 --- a/sdk/iotoperations/arm-iotoperations/src/static-helpers/pollingHelpers.ts +++ b/sdk/iotoperations/arm-iotoperations/src/static-helpers/pollingHelpers.ts @@ -10,7 +10,11 @@ import { OperationResponse, } from "@azure/core-lro"; -import { Client, PathUncheckedResponse, createRestError } from "@azure-rest/core-client"; +import { + Client, + PathUncheckedResponse, + createRestError, +} from "@azure-rest/core-client"; import { AbortSignalLike } from "@azure/abort-controller"; export interface GetLongRunningPollerOptions { @@ -38,7 +42,10 @@ export interface GetLongRunningPollerOptions { */ getInitialResponse?: () => PromiseLike; } -export function getLongRunningPoller( +export function getLongRunningPoller< + TResponse extends PathUncheckedResponse, + TResult = void, +>( client: Client, processResponseBody: (result: TResponse) => Promise, expectedStatuses: string[], @@ -46,14 +53,18 @@ export function getLongRunningPoller, TResult> { const { restoreFrom, getInitialResponse } = options; if (!restoreFrom && !getInitialResponse) { - throw new Error("Either restoreFrom or getInitialResponse must be specified"); + throw new Error( + "Either restoreFrom or getInitialResponse must be specified", + ); } let initialResponse: TResponse | undefined = undefined; const pollAbortController = new AbortController(); const poller: RunningOperation = { sendInitialRequest: async () => { if (!getInitialResponse) { - throw new Error("getInitialResponse is required when initializing a new poller"); + throw new Error( + "getInitialResponse is required when initializing a new poller", + ); } initialResponse = await getInitialResponse(); return getLroResponse(initialResponse, expectedStatuses); diff --git a/sdk/iotoperations/arm-iotoperations/test/public/iotoperations_operations_test.spec.ts b/sdk/iotoperations/arm-iotoperations/test/public/iotoperations_operations_test.spec.ts deleted file mode 100644 index fff3b233249f..000000000000 --- a/sdk/iotoperations/arm-iotoperations/test/public/iotoperations_operations_test.spec.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { env, Recorder, isPlaybackMode } from "@azure-tools/test-recorder"; -import { createTestCredential } from "@azure-tools/test-credential"; -import { assert, beforeEach, afterEach, it, describe } from "vitest"; -import { createRecorder } from "./utils/recordedClient.js"; -import { IoTOperationsClient } from "../../src/ioTOperationsClient.js"; - -export const testPollingOptions = { - updateIntervalInMs: isPlaybackMode() ? 0 : undefined, -}; - -describe("IoTOperations test", () => { - let recorder: Recorder; - let subscriptionId: string; - let client: IoTOperationsClient; - - beforeEach(async (context) => { - process.env.SystemRoot = process.env.SystemRoot || "C:\\Windows"; - recorder = await createRecorder(context); - subscriptionId = env.SUBSCRIPTION_ID || ""; - // This is an example of how the environment variables are used - const credential = createTestCredential(); - client = new IoTOperationsClient( - credential, - subscriptionId, - recorder.configureClientOptions({}), - ); - }); - - afterEach(async function () { - await recorder.stop(); - }); - it("operations list test", async function () { - const resArray = new Array(); - for await (let item of client.operations.list()) { - resArray.push(item); - } - assert.notEqual(resArray.length, 0); - }); -}); diff --git a/sdk/iotoperations/arm-iotoperations/test/public/sampleTest.spec.ts b/sdk/iotoperations/arm-iotoperations/test/public/sampleTest.spec.ts new file mode 100644 index 000000000000..d4919ac91ac5 --- /dev/null +++ b/sdk/iotoperations/arm-iotoperations/test/public/sampleTest.spec.ts @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { createRecorder } from "./utils/recordedClient.js"; +import { assert, beforeEach, afterEach, it, describe } from "vitest"; + +describe("My test", () => { + // let recorder: Recorder; + + beforeEach(async function () { + // recorder = await createRecorder(this); + }); + + afterEach(async function () { + // await recorder.stop(); + }); + + it("sample test", async function () { + assert.equal(1, 1); + }); +}); diff --git a/sdk/iotoperations/arm-iotoperations/test/public/utils/recordedClient.ts b/sdk/iotoperations/arm-iotoperations/test/public/utils/recordedClient.ts index 527ccc9dee86..6e425fdcfdf9 100644 --- a/sdk/iotoperations/arm-iotoperations/test/public/utils/recordedClient.ts +++ b/sdk/iotoperations/arm-iotoperations/test/public/utils/recordedClient.ts @@ -1,7 +1,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { Recorder, RecorderStartOptions, VitestTestContext } from "@azure-tools/test-recorder"; +import { + Recorder, + RecorderStartOptions, + VitestTestContext, +} from "@azure-tools/test-recorder"; const replaceableVariables: Record = { SUBSCRIPTION_ID: "azure_subscription_id", @@ -9,10 +13,6 @@ const replaceableVariables: Record = { const recorderEnvSetup: RecorderStartOptions = { envSetupForPlayback: replaceableVariables, - removeCentralSanitizers: [ - "AZSDK3493", // .name in the body is not a secret and is listed below in the beforeEach section - "AZSDK3430", // .id in the body is not a secret and is listed below in the beforeEach section - ], }; /** @@ -20,7 +20,9 @@ const recorderEnvSetup: RecorderStartOptions = { * Should be called first in the test suite to make sure environment variables are * read before they are being used. */ -export async function createRecorder(context: VitestTestContext): Promise { +export async function createRecorder( + context: VitestTestContext, +): Promise { const recorder = new Recorder(context); await recorder.start(recorderEnvSetup); return recorder; diff --git a/sdk/iotoperations/arm-iotoperations/tsconfig.browser.config.json b/sdk/iotoperations/arm-iotoperations/tsconfig.browser.config.json index 1b37aebc5457..091177fcb991 100644 --- a/sdk/iotoperations/arm-iotoperations/tsconfig.browser.config.json +++ b/sdk/iotoperations/arm-iotoperations/tsconfig.browser.config.json @@ -1,7 +1,7 @@ { "extends": "./.tshy/build.json", - "include": ["./src/**/*.ts", "./src/**/*.mts", "./test/**/*.spec.ts"], - "exclude": ["./test/**/node/**/*.ts"], + "include": ["src/**/*.ts", "src/**/*.mts", "test/**/*.spec.ts"], + "exclude": ["test/**/node/**/*.ts"], "compilerOptions": { "outDir": "./dist-test/browser", "rootDir": ".", diff --git a/sdk/iotoperations/arm-iotoperations/tsconfig.json b/sdk/iotoperations/arm-iotoperations/tsconfig.json index c03adb8e0d2e..72266609583d 100644 --- a/sdk/iotoperations/arm-iotoperations/tsconfig.json +++ b/sdk/iotoperations/arm-iotoperations/tsconfig.json @@ -4,17 +4,13 @@ "module": "NodeNext", "moduleResolution": "NodeNext", "rootDir": ".", - "skipLibCheck": true, - "paths": { - "@azure/arm-iotoperations": ["./src/index"] - } + "skipLibCheck": true }, "include": [ "src/**/*.ts", "src/**/*.mts", "src/**/*.cts", "test/**/*.ts", - "test/**/*.ts", - "samples-dev/**/*.ts" + "test/**/*.ts" ] } diff --git a/sdk/iotoperations/arm-iotoperations/tsp-location.yaml b/sdk/iotoperations/arm-iotoperations/tsp-location.yaml index 50c98774c2bc..3c743b94698b 100644 --- a/sdk/iotoperations/arm-iotoperations/tsp-location.yaml +++ b/sdk/iotoperations/arm-iotoperations/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/iotoperations/IoTOperations.Management -commit: 7881f98bf6f1d2e4943f0eb25e6b053c73380aa0 +commit: a6f80f9c7d2d393d3f5a0301ae454735ee4ad96a repo: ../azure-rest-api-specs additionalDirectories: diff --git a/sdk/iotoperations/ci.mgmt.yml b/sdk/iotoperations/ci.mgmt.yml index e43c6d83f983..2ef2d9198f4f 100644 --- a/sdk/iotoperations/ci.mgmt.yml +++ b/sdk/iotoperations/ci.mgmt.yml @@ -13,7 +13,6 @@ trigger: include: - sdk/iotoperations/arm-iotoperations - sdk/iotoperations/ci.mgmt.yml - pr: branches: include: @@ -27,7 +26,6 @@ pr: include: - sdk/iotoperations/arm-iotoperations - sdk/iotoperations/ci.mgmt.yml - extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: