diff --git a/sdk/iotoperations/arm-iotoperations/CHANGELOG.md b/sdk/iotoperations/arm-iotoperations/CHANGELOG.md deleted file mode 100644 index ec8854800245..000000000000 --- a/sdk/iotoperations/arm-iotoperations/CHANGELOG.md +++ /dev/null @@ -1,7 +0,0 @@ -# Release History - -## 1.0.0 (2024-12-13) - -### Features Added - -This is the first stable version with the package of @azure/arm-iotoperations diff --git a/sdk/iotoperations/arm-iotoperations/LICENSE b/sdk/iotoperations/arm-iotoperations/LICENSE deleted file mode 100644 index b2f52a2bad4e..000000000000 --- a/sdk/iotoperations/arm-iotoperations/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -Copyright (c) Microsoft Corporation. - -MIT License - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/sdk/iotoperations/arm-iotoperations/README.md b/sdk/iotoperations/arm-iotoperations/README.md deleted file mode 100644 index 1c194fa1f578..000000000000 --- a/sdk/iotoperations/arm-iotoperations/README.md +++ /dev/null @@ -1,115 +0,0 @@ -# Azure IoTOperations client library for JavaScript - -This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure IoTOperations client. - -Microsoft.IoTOperations Resource Provider management API. - -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://learn.microsoft.com/javascript/api/@azure/arm-iotoperations?view=azure-node-preview) -- [Samples](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/iotoperations/arm-iotoperations/samples) - -## Getting started - -### Currently supported environments - -- [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule) -- Latest versions of Safari, Chrome, Edge and Firefox. - -See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details. - -### Prerequisites - -- An [Azure subscription][azure_sub]. - -### Install the `@azure/arm-iotoperations` package - -Install the Azure IoTOperations client library for JavaScript with `npm`: - -```bash -npm install @azure/arm-iotoperations -``` - -### Create and authenticate a `IoTOperationsClient` - -To create a client object to access the Azure IoTOperations API, you will need the `endpoint` of your Azure IoTOperations resource and a `credential`. The Azure IoTOperations client can use Azure Active Directory credentials to authenticate. -You can find the endpoint for your Azure IoTOperations resource in the [Azure Portal][azure_portal]. - -You can authenticate with Azure Active Directory using a credential from the [@azure/identity][azure_identity] library or [an existing AAD Token](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token). - -To use the [DefaultAzureCredential][defaultazurecredential] provider shown below, or other credential providers provided with the Azure SDK, please install the `@azure/identity` package: - -```bash -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). - -For more information about how to create an Azure AD Application check out [this guide](https://learn.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal). - -Using Node.js and Node-like environments, you can use the `DefaultAzureCredential` class to authenticate the client. - -```ts snippet:ReadmeSampleCreateClient_Node -import { IoTOperationsClient } from "@azure/arm-iotoperations"; -import { DefaultAzureCredential } from "@azure/identity"; - -const subscriptionId = "00000000-0000-0000-0000-000000000000"; -const client = new IoTOperationsClient(new DefaultAzureCredential(), subscriptionId); -``` - -For browser environments, use the `InteractiveBrowserCredential` from the `@azure/identity` package to authenticate. - -```ts snippet:ReadmeSampleCreateClient_Browser -import { InteractiveBrowserCredential } from "@azure/identity"; -import { IoTOperationsClient } from "@azure/arm-iotoperations"; - -const subscriptionId = "00000000-0000-0000-0000-000000000000"; -const credential = new InteractiveBrowserCredential({ - tenantId: "", - clientId: "", -}); -const client = new IoTOperationsClient(credential, subscriptionId); -``` - -### JavaScript Bundle - -To use this client library in the browser, first you need to use a bundler. For details on how to do this, please refer to our [bundling documentation](https://aka.ms/AzureSDKBundling). - -## Key concepts - -### IoTOperationsClient - -`IoTOperationsClient` is the primary interface for developers using the Azure IoTOperations client library. Explore the methods on this client object to understand the different features of the Azure IoTOperations service that you can access. - -## Troubleshooting - -### Logging - -Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`: - -```ts snippet:SetLogLevel -import { setLogLevel } from "@azure/logger"; - -setLogLevel("info"); -``` - -For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/logger). - -## Next steps - -Please take a look at the [samples](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/iotoperations/arm-iotoperations/samples) directory for detailed examples on how to use this library. - -## Contributing - -If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/main/CONTRIBUTING.md) to learn more about how to build and test the code. - -## Related projects - -- [Microsoft Azure SDK for JavaScript](https://github.com/Azure/azure-sdk-for-js) - -[azure_sub]: https://azure.microsoft.com/free/ -[azure_portal]: https://portal.azure.com -[azure_identity]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity -[defaultazurecredential]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#defaultazurecredential diff --git a/sdk/iotoperations/arm-iotoperations/api-extractor.json b/sdk/iotoperations/arm-iotoperations/api-extractor.json deleted file mode 100644 index 6d5f5e3b9ce8..000000000000 --- a/sdk/iotoperations/arm-iotoperations/api-extractor.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", - "mainEntryPointFilePath": "dist/esm/index.d.ts", - "docModel": { - "enabled": true - }, - "apiReport": { - "enabled": true, - "reportFolder": "./review" - }, - "dtsRollup": { - "enabled": true, - "untrimmedFilePath": "", - "publicTrimmedFilePath": "dist/arm-iotoperations.d.ts" - }, - "messages": { - "tsdocMessageReporting": { - "default": { - "logLevel": "none" - } - }, - "extractorMessageReporting": { - "ae-missing-release-tag": { - "logLevel": "none" - }, - "ae-unresolved-link": { - "logLevel": "none" - } - } - } -} diff --git a/sdk/iotoperations/arm-iotoperations/assets.json b/sdk/iotoperations/arm-iotoperations/assets.json deleted file mode 100644 index 1c5abfac7599..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_eb2e7b6b53" -} diff --git a/sdk/iotoperations/arm-iotoperations/eslint.config.mjs b/sdk/iotoperations/arm-iotoperations/eslint.config.mjs deleted file mode 100644 index e127bbf23da3..000000000000 --- a/sdk/iotoperations/arm-iotoperations/eslint.config.mjs +++ /dev/null @@ -1,15 +0,0 @@ -import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; - -export default [ - ...azsdkEslint.configs.recommended, - { - rules: { - "@azure/azure-sdk/ts-modules-only-named": "warn", - "@azure/azure-sdk/ts-package-json-types": "warn", - "@azure/azure-sdk/ts-package-json-engine-is-present": "warn", - "@azure/azure-sdk/ts-package-json-files-required": "off", - "@azure/azure-sdk/ts-package-json-main-is-cjs": "off", - "tsdoc/syntax": "warn", - }, - }, -]; diff --git a/sdk/iotoperations/arm-iotoperations/package.json b/sdk/iotoperations/arm-iotoperations/package.json deleted file mode 100644 index c6ace52c1a11..000000000000 --- a/sdk/iotoperations/arm-iotoperations/package.json +++ /dev/null @@ -1,156 +0,0 @@ -{ - "name": "@azure/arm-iotoperations", - "version": "1.0.0", - "description": "A generated SDK for IoTOperationsClient.", - "engines": { - "node": ">=18.0.0" - }, - "sideEffects": false, - "autoPublish": false, - "tshy": { - "project": "./tsconfig.src.json", - "exports": { - "./package.json": "./package.json", - ".": "./src/index.ts", - "./models": "./src/models/index.ts" - }, - "dialects": [ - "esm", - "commonjs" - ], - "esmDialects": [ - "browser", - "react-native" - ], - "selfLink": false - }, - "type": "module", - "keywords": [ - "node", - "azure", - "cloud", - "typescript", - "browser", - "isomorphic" - ], - "author": "Microsoft Corporation", - "license": "MIT", - "files": [ - "dist/", - "README.md", - "LICENSE", - "review/", - "CHANGELOG.md" - ], - "sdk-type": "mgmt", - "repository": "github:Azure/azure-sdk-for-js", - "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": [ - { - "path": "src/api/ioTOperationsContext.ts", - "prefix": "userAgentInfo" - } - ] - }, - "dependencies": { - "@azure-rest/core-client": "^2.3.1", - "@azure/abort-controller": "^2.1.2", - "@azure/core-auth": "^1.9.0", - "@azure/core-lro": "^3.1.0", - "@azure/core-rest-pipeline": "^1.19.0", - "@azure/core-util": "^1.11.0", - "@azure/logger": "^1.1.4", - "tslib": "^2.8.1" - }, - "devDependencies": { - "@azure-tools/test-credential": "^2.0.0", - "@azure-tools/test-recorder": "^4.1.0", - "@azure-tools/test-utils-vitest": "^1.0.0", - "@azure/dev-tool": "^1.0.0", - "@azure/eslint-plugin-azure-sdk": "^3.0.0", - "@azure/identity": "^4.6.0", - "@types/node": "^18.0.0", - "@vitest/browser": "^3.0.9", - "@vitest/coverage-istanbul": "^3.0.9", - "dotenv": "^16.0.0", - "eslint": "^9.9.0", - "playwright": "^1.50.1", - "typescript": "~5.8.2", - "vitest": "^3.0.9" - }, - "scripts": { - "build": "npm run clean && dev-tool run build-package && dev-tool run extract-api", - "build:samples": "tsc -p tsconfig.samples.json && 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\"", - "clean": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", - "execute:samples": "dev-tool samples run samples-dev", - "extract-api": "dev-tool run vendored rimraf review && dev-tool run extract-api", - "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\"", - "generate:client": "echo skipped", - "lint": "echo skipped", - "lint:fix": "echo skipped", - "pack": "npm pack 2>&1", - "test": "npm run test:node && npm run test:browser", - "test:browser": "echo skipped", - "test:node": "dev-tool run test:vitest", - "test:node:esm": "dev-tool run test:vitest --esm", - "update-snippets": "dev-tool run update-snippets" - }, - "//sampleConfiguration": { - "productName": "@azure/arm-iotoperations", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://learn.microsoft.com/javascript/api/@azure/arm-iotoperations?view=azure-node-preview" - }, - "exports": { - "./package.json": "./package.json", - ".": { - "browser": { - "types": "./dist/browser/index.d.ts", - "default": "./dist/browser/index.js" - }, - "react-native": { - "types": "./dist/react-native/index.d.ts", - "default": "./dist/react-native/index.js" - }, - "import": { - "types": "./dist/esm/index.d.ts", - "default": "./dist/esm/index.js" - }, - "require": { - "types": "./dist/commonjs/index.d.ts", - "default": "./dist/commonjs/index.js" - } - }, - "./models": { - "browser": { - "types": "./dist/browser/models/index.d.ts", - "default": "./dist/browser/models/index.js" - }, - "react-native": { - "types": "./dist/react-native/models/index.d.ts", - "default": "./dist/react-native/models/index.js" - }, - "import": { - "types": "./dist/esm/models/index.d.ts", - "default": "./dist/esm/models/index.js" - }, - "require": { - "types": "./dist/commonjs/models/index.d.ts", - "default": "./dist/commonjs/models/index.js" - } - } - }, - "main": "./dist/commonjs/index.js", - "types": "./dist/commonjs/index.d.ts", - "module": "./dist/esm/index.js", - "browser": "./dist/browser/index.js", - "react-native": "./dist/react-native/index.js" -} diff --git a/sdk/iotoperations/arm-iotoperations/review/arm-iotoperations-models.api.md b/sdk/iotoperations/arm-iotoperations/review/arm-iotoperations-models.api.md deleted file mode 100644 index a29864f05669..000000000000 --- a/sdk/iotoperations/arm-iotoperations/review/arm-iotoperations-models.api.md +++ /dev/null @@ -1,1079 +0,0 @@ -## API Report File for "@azure/arm-iotoperations" - -> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). - -```ts - -// @public -export type ActionType = string; - -// @public -export interface AdvancedSettings { - clients?: ClientConfig; - encryptInternalTraffic?: OperationalMode; - internalCerts?: CertManagerCertOptions; -} - -// @public -export interface AuthorizationConfig { - cache?: OperationalMode; - rules?: AuthorizationRule[]; -} - -// @public -export interface AuthorizationRule { - brokerResources: BrokerResourceRule[]; - principals: PrincipalDefinition; - stateStoreResources?: StateStoreResourceRule[]; -} - -// @public -export interface BackendChain { - partitions: number; - redundancyFactor: number; - workers?: number; -} - -// @public -export interface BatchingConfiguration { - latencySeconds?: number; - maxMessages?: number; -} - -// @public -export type BrokerAuthenticationMethod = string; - -// @public -export interface BrokerAuthenticationProperties { - authenticationMethods: BrokerAuthenticatorMethods[]; - readonly provisioningState?: ProvisioningState; -} - -// @public -export interface BrokerAuthenticationResource extends ProxyResource { - extendedLocation: ExtendedLocation; - properties?: BrokerAuthenticationProperties; -} - -// @public -export interface BrokerAuthenticatorCustomAuth { - x509: X509ManualCertificate; -} - -// @public -export interface BrokerAuthenticatorMethodCustom { - auth?: BrokerAuthenticatorCustomAuth; - caCertConfigMap?: string; - endpoint: string; - headers?: Record; -} - -// @public -export interface BrokerAuthenticatorMethods { - customSettings?: BrokerAuthenticatorMethodCustom; - method: BrokerAuthenticationMethod; - serviceAccountTokenSettings?: BrokerAuthenticatorMethodSat; - x509Settings?: BrokerAuthenticatorMethodX509; -} - -// @public -export interface BrokerAuthenticatorMethodSat { - audiences: string[]; -} - -// @public -export interface BrokerAuthenticatorMethodX509 { - authorizationAttributes?: Record; - trustedClientCaCert?: string; -} - -// @public -export interface BrokerAuthenticatorMethodX509Attributes { - attributes: Record; - subject: string; -} - -// @public -export interface BrokerAuthorizationProperties { - authorizationPolicies: AuthorizationConfig; - readonly provisioningState?: ProvisioningState; -} - -// @public -export interface BrokerAuthorizationResource extends ProxyResource { - extendedLocation: ExtendedLocation; - properties?: BrokerAuthorizationProperties; -} - -// @public -export interface BrokerDiagnostics { - logs?: DiagnosticsLogs; - metrics?: Metrics; - selfCheck?: SelfCheck; - traces?: Traces; -} - -// @public -export interface BrokerListenerProperties { - ports: ListenerPort[]; - readonly provisioningState?: ProvisioningState; - serviceName?: string; - serviceType?: ServiceType; -} - -// @public -export interface BrokerListenerResource extends ProxyResource { - extendedLocation: ExtendedLocation; - properties?: BrokerListenerProperties; -} - -// @public -export type BrokerMemoryProfile = string; - -// @public -export interface BrokerProperties { - advanced?: AdvancedSettings; - cardinality?: Cardinality; - diagnostics?: BrokerDiagnostics; - diskBackedMessageBuffer?: DiskBackedMessageBuffer; - generateResourceLimits?: GenerateResourceLimits; - memoryProfile?: BrokerMemoryProfile; - readonly provisioningState?: ProvisioningState; -} - -// @public -export type BrokerProtocolType = string; - -// @public -export interface BrokerResource extends ProxyResource { - extendedLocation: ExtendedLocation; - properties?: BrokerProperties; -} - -// @public -export type BrokerResourceDefinitionMethods = string; - -// @public -export interface BrokerResourceRule { - clientIds?: string[]; - method: BrokerResourceDefinitionMethods; - topics?: string[]; -} - -// @public -export interface Cardinality { - backendChain: BackendChain; - frontend: Frontend; -} - -// @public -export interface CertManagerCertificateSpec { - duration?: string; - issuerRef: CertManagerIssuerRef; - privateKey?: CertManagerPrivateKey; - renewBefore?: string; - san?: SanForCert; - secretName?: string; -} - -// @public -export interface CertManagerCertOptions { - duration: string; - privateKey: CertManagerPrivateKey; - renewBefore: string; -} - -// @public -export type CertManagerIssuerKind = string; - -// @public -export interface CertManagerIssuerRef { - group: string; - kind: CertManagerIssuerKind; - name: string; -} - -// @public -export interface CertManagerPrivateKey { - algorithm: PrivateKeyAlgorithm; - rotationPolicy: PrivateKeyRotationPolicy; -} - -// @public -export interface ClientConfig { - maxKeepAliveSeconds?: number; - maxMessageExpirySeconds?: number; - maxPacketSizeBytes?: number; - maxReceiveMaximum?: number; - maxSessionExpirySeconds?: number; - subscriberQueueLimit?: SubscriberQueueLimit; -} - -// @public -export type CloudEventAttributeType = string; - -// @public -export type CreatedByType = string; - -// @public -export type DataExplorerAuthMethod = string; - -// @public -export interface DataflowBuiltInTransformationDataset { - description?: string; - expression?: string; - inputs: string[]; - key: string; - schemaRef?: string; -} - -// @public -export interface DataflowBuiltInTransformationFilter { - description?: string; - expression: string; - inputs: string[]; - type?: FilterType; -} - -// @public -export interface DataflowBuiltInTransformationMap { - description?: string; - expression?: string; - inputs: string[]; - output: string; - type?: DataflowMappingType; -} - -// @public -export interface DataflowBuiltInTransformationSettings { - datasets?: DataflowBuiltInTransformationDataset[]; - filter?: DataflowBuiltInTransformationFilter[]; - map?: DataflowBuiltInTransformationMap[]; - schemaRef?: string; - serializationFormat?: TransformationSerializationFormat; -} - -// @public -export interface DataflowDestinationOperationSettings { - dataDestination: string; - endpointRef: string; -} - -// @public -export interface DataflowEndpointAuthenticationAccessToken { - secretRef: string; -} - -// @public -export interface DataflowEndpointAuthenticationSasl { - saslType: DataflowEndpointAuthenticationSaslType; - secretRef: string; -} - -// @public -export type DataflowEndpointAuthenticationSaslType = string; - -// @public -export interface DataflowEndpointAuthenticationServiceAccountToken { - audience: string; -} - -// @public -export interface DataflowEndpointAuthenticationSystemAssignedManagedIdentity { - audience?: string; -} - -// @public -export interface DataflowEndpointAuthenticationUserAssignedManagedIdentity { - clientId: string; - scope?: string; - tenantId: string; -} - -// @public -export interface DataflowEndpointAuthenticationX509 { - secretRef: string; -} - -// @public -export interface DataflowEndpointDataExplorer { - authentication: DataflowEndpointDataExplorerAuthentication; - batching?: BatchingConfiguration; - database: string; - host: string; -} - -// @public -export interface DataflowEndpointDataExplorerAuthentication { - method: DataExplorerAuthMethod; - systemAssignedManagedIdentitySettings?: DataflowEndpointAuthenticationSystemAssignedManagedIdentity; - userAssignedManagedIdentitySettings?: DataflowEndpointAuthenticationUserAssignedManagedIdentity; -} - -// @public -export interface DataflowEndpointDataLakeStorage { - authentication: DataflowEndpointDataLakeStorageAuthentication; - batching?: BatchingConfiguration; - host: string; -} - -// @public -export interface DataflowEndpointDataLakeStorageAuthentication { - accessTokenSettings?: DataflowEndpointAuthenticationAccessToken; - method: DataLakeStorageAuthMethod; - systemAssignedManagedIdentitySettings?: DataflowEndpointAuthenticationSystemAssignedManagedIdentity; - userAssignedManagedIdentitySettings?: DataflowEndpointAuthenticationUserAssignedManagedIdentity; -} - -// @public -export interface DataflowEndpointFabricOneLake { - authentication: DataflowEndpointFabricOneLakeAuthentication; - batching?: BatchingConfiguration; - host: string; - names: DataflowEndpointFabricOneLakeNames; - oneLakePathType: DataflowEndpointFabricPathType; -} - -// @public -export interface DataflowEndpointFabricOneLakeAuthentication { - method: FabricOneLakeAuthMethod; - systemAssignedManagedIdentitySettings?: DataflowEndpointAuthenticationSystemAssignedManagedIdentity; - userAssignedManagedIdentitySettings?: DataflowEndpointAuthenticationUserAssignedManagedIdentity; -} - -// @public -export interface DataflowEndpointFabricOneLakeNames { - lakehouseName: string; - workspaceName: string; -} - -// @public -export type DataflowEndpointFabricPathType = string; - -// @public -export interface DataflowEndpointKafka { - authentication: DataflowEndpointKafkaAuthentication; - batching?: DataflowEndpointKafkaBatching; - cloudEventAttributes?: CloudEventAttributeType; - compression?: DataflowEndpointKafkaCompression; - consumerGroupId?: string; - copyMqttProperties?: OperationalMode; - host: string; - kafkaAcks?: DataflowEndpointKafkaAcks; - partitionStrategy?: DataflowEndpointKafkaPartitionStrategy; - tls?: TlsProperties; -} - -// @public -export type DataflowEndpointKafkaAcks = string; - -// @public -export interface DataflowEndpointKafkaAuthentication { - method: KafkaAuthMethod; - saslSettings?: DataflowEndpointAuthenticationSasl; - systemAssignedManagedIdentitySettings?: DataflowEndpointAuthenticationSystemAssignedManagedIdentity; - userAssignedManagedIdentitySettings?: DataflowEndpointAuthenticationUserAssignedManagedIdentity; - x509CertificateSettings?: DataflowEndpointAuthenticationX509; -} - -// @public -export interface DataflowEndpointKafkaBatching { - latencyMs?: number; - maxBytes?: number; - maxMessages?: number; - mode?: OperationalMode; -} - -// @public -export type DataflowEndpointKafkaCompression = string; - -// @public -export type DataflowEndpointKafkaPartitionStrategy = string; - -// @public -export interface DataflowEndpointLocalStorage { - persistentVolumeClaimRef: string; -} - -// @public -export interface DataflowEndpointMqtt { - authentication: DataflowEndpointMqttAuthentication; - clientIdPrefix?: string; - cloudEventAttributes?: CloudEventAttributeType; - host?: string; - keepAliveSeconds?: number; - maxInflightMessages?: number; - protocol?: BrokerProtocolType; - qos?: number; - retain?: MqttRetainType; - sessionExpirySeconds?: number; - tls?: TlsProperties; -} - -// @public -export interface DataflowEndpointMqttAuthentication { - method: MqttAuthMethod; - serviceAccountTokenSettings?: DataflowEndpointAuthenticationServiceAccountToken; - systemAssignedManagedIdentitySettings?: DataflowEndpointAuthenticationSystemAssignedManagedIdentity; - userAssignedManagedIdentitySettings?: DataflowEndpointAuthenticationUserAssignedManagedIdentity; - x509CertificateSettings?: DataflowEndpointAuthenticationX509; -} - -// @public -export interface DataflowEndpointProperties { - dataExplorerSettings?: DataflowEndpointDataExplorer; - dataLakeStorageSettings?: DataflowEndpointDataLakeStorage; - endpointType: EndpointType; - fabricOneLakeSettings?: DataflowEndpointFabricOneLake; - kafkaSettings?: DataflowEndpointKafka; - localStorageSettings?: DataflowEndpointLocalStorage; - mqttSettings?: DataflowEndpointMqtt; - readonly provisioningState?: ProvisioningState; -} - -// @public -export interface DataflowEndpointResource extends ProxyResource { - extendedLocation: ExtendedLocation; - properties?: DataflowEndpointProperties; -} - -// @public -export type DataflowMappingType = string; - -// @public -export interface DataflowOperation { - builtInTransformationSettings?: DataflowBuiltInTransformationSettings; - destinationSettings?: DataflowDestinationOperationSettings; - name?: string; - operationType: OperationType; - sourceSettings?: DataflowSourceOperationSettings; -} - -// @public -export interface DataflowProfileProperties { - diagnostics?: ProfileDiagnostics; - instanceCount?: number; - readonly provisioningState?: ProvisioningState; -} - -// @public -export interface DataflowProfileResource extends ProxyResource { - extendedLocation: ExtendedLocation; - properties?: DataflowProfileProperties; -} - -// @public -export interface DataflowProperties { - mode?: OperationalMode; - operations: DataflowOperation[]; - readonly provisioningState?: ProvisioningState; -} - -// @public -export interface DataflowResource extends ProxyResource { - extendedLocation: ExtendedLocation; - properties?: DataflowProperties; -} - -// @public -export interface DataflowSourceOperationSettings { - assetRef?: string; - dataSources: string[]; - endpointRef: string; - schemaRef?: string; - serializationFormat?: SourceSerializationFormat; -} - -// @public -export type DataLakeStorageAuthMethod = string; - -// @public -export interface DiagnosticsLogs { - level?: string; -} - -// @public -export interface DiskBackedMessageBuffer { - ephemeralVolumeClaimSpec?: VolumeClaimSpec; - maxSize: string; - persistentVolumeClaimSpec?: VolumeClaimSpec; -} - -// @public -export type EndpointType = string; - -// @public -export interface ExtendedLocation { - name: string; - type: ExtendedLocationType; -} - -// @public -export type ExtendedLocationType = string; - -// @public -export type FabricOneLakeAuthMethod = string; - -// @public -export type FilterType = string; - -// @public -export interface Frontend { - replicas: number; - workers?: number; -} - -// @public -export interface GenerateResourceLimits { - cpu?: OperationalMode; -} - -// @public -export interface InstancePatchModel { - identity?: ManagedServiceIdentity; - tags?: Record; -} - -// @public -export interface InstanceProperties { - description?: string; - readonly provisioningState?: ProvisioningState; - schemaRegistryRef: SchemaRegistryRef; - readonly version?: string; -} - -// @public -export interface InstanceResource extends TrackedResource { - extendedLocation: ExtendedLocation; - identity?: ManagedServiceIdentity; - properties?: InstanceProperties; -} - -// @public -export type KafkaAuthMethod = string; - -// @public -export enum KnownActionType { - Internal = "Internal" -} - -// @public -export enum KnownBrokerAuthenticationMethod { - Custom = "Custom", - ServiceAccountToken = "ServiceAccountToken", - X509 = "X509" -} - -// @public -export enum KnownBrokerMemoryProfile { - High = "High", - Low = "Low", - Medium = "Medium", - Tiny = "Tiny" -} - -// @public -export enum KnownBrokerProtocolType { - Mqtt = "Mqtt", - WebSockets = "WebSockets" -} - -// @public -export enum KnownBrokerResourceDefinitionMethods { - Connect = "Connect", - Publish = "Publish", - Subscribe = "Subscribe" -} - -// @public -export enum KnownCertManagerIssuerKind { - ClusterIssuer = "ClusterIssuer", - Issuer = "Issuer" -} - -// @public -export enum KnownCloudEventAttributeType { - CreateOrRemap = "CreateOrRemap", - Propagate = "Propagate" -} - -// @public -export enum KnownCreatedByType { - Application = "Application", - Key = "Key", - ManagedIdentity = "ManagedIdentity", - User = "User" -} - -// @public -export enum KnownDataExplorerAuthMethod { - SystemAssignedManagedIdentity = "SystemAssignedManagedIdentity", - UserAssignedManagedIdentity = "UserAssignedManagedIdentity" -} - -// @public -export enum KnownDataflowEndpointAuthenticationSaslType { - Plain = "Plain", - ScramSha256 = "ScramSha256", - ScramSha512 = "ScramSha512" -} - -// @public -export enum KnownDataflowEndpointFabricPathType { - Files = "Files", - Tables = "Tables" -} - -// @public -export enum KnownDataflowEndpointKafkaAcks { - All = "All", - One = "One", - Zero = "Zero" -} - -// @public -export enum KnownDataflowEndpointKafkaCompression { - Gzip = "Gzip", - Lz4 = "Lz4", - None = "None", - Snappy = "Snappy" -} - -// @public -export enum KnownDataflowEndpointKafkaPartitionStrategy { - Default = "Default", - Property = "Property", - Static = "Static", - Topic = "Topic" -} - -// @public -export enum KnownDataflowMappingType { - BuiltInFunction = "BuiltInFunction", - Compute = "Compute", - NewProperties = "NewProperties", - PassThrough = "PassThrough", - Rename = "Rename" -} - -// @public -export enum KnownDataLakeStorageAuthMethod { - AccessToken = "AccessToken", - SystemAssignedManagedIdentity = "SystemAssignedManagedIdentity", - UserAssignedManagedIdentity = "UserAssignedManagedIdentity" -} - -// @public -export enum KnownEndpointType { - DataExplorer = "DataExplorer", - DataLakeStorage = "DataLakeStorage", - FabricOneLake = "FabricOneLake", - Kafka = "Kafka", - LocalStorage = "LocalStorage", - Mqtt = "Mqtt" -} - -// @public -export enum KnownExtendedLocationType { - CustomLocation = "CustomLocation" -} - -// @public -export enum KnownFabricOneLakeAuthMethod { - SystemAssignedManagedIdentity = "SystemAssignedManagedIdentity", - UserAssignedManagedIdentity = "UserAssignedManagedIdentity" -} - -// @public -export enum KnownFilterType { - Filter = "Filter" -} - -// @public -export enum KnownKafkaAuthMethod { - Anonymous = "Anonymous", - Sasl = "Sasl", - SystemAssignedManagedIdentity = "SystemAssignedManagedIdentity", - UserAssignedManagedIdentity = "UserAssignedManagedIdentity", - X509Certificate = "X509Certificate" -} - -// @public -export enum KnownManagedServiceIdentityType { - 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", - Never = "Never" -} - -// @public -export enum KnownOperationalMode { - Disabled = "Disabled", - Enabled = "Enabled" -} - -// @public -export enum KnownOperationType { - BuiltInTransformation = "BuiltInTransformation", - Destination = "Destination", - Source = "Source" -} - -// @public -export enum KnownOperatorValues { - DoesNotExist = "DoesNotExist", - Exists = "Exists", - In = "In", - NotIn = "NotIn" -} - -// @public -export enum KnownOrigin { - System = "system", - User = "user", - UserSystem = "user,system" -} - -// @public -export enum KnownPrivateKeyAlgorithm { - Ec256 = "Ec256", - Ec384 = "Ec384", - Ec521 = "Ec521", - Ed25519 = "Ed25519", - Rsa2048 = "Rsa2048", - Rsa4096 = "Rsa4096", - Rsa8192 = "Rsa8192" -} - -// @public -export enum KnownPrivateKeyRotationPolicy { - Always = "Always", - Never = "Never" -} - -// @public -export enum KnownProvisioningState { - Accepted = "Accepted", - Canceled = "Canceled", - Deleting = "Deleting", - Failed = "Failed", - Provisioning = "Provisioning", - Succeeded = "Succeeded", - Updating = "Updating" -} - -// @public -export enum KnownServiceType { - ClusterIp = "ClusterIp", - LoadBalancer = "LoadBalancer", - NodePort = "NodePort" -} - -// @public -export enum KnownSourceSerializationFormat { - Json = "Json" -} - -// @public -export enum KnownStateStoreResourceDefinitionMethods { - Read = "Read", - ReadWrite = "ReadWrite", - Write = "Write" -} - -// @public -export enum KnownStateStoreResourceKeyTypes { - Binary = "Binary", - Pattern = "Pattern", - String = "String" -} - -// @public -export enum KnownSubscriberMessageDropStrategy { - DropOldest = "DropOldest", - None = "None" -} - -// @public -export enum KnownTlsCertMethodMode { - Automatic = "Automatic", - Manual = "Manual" -} - -// @public -export enum KnownTransformationSerializationFormat { - Delta = "Delta", - Json = "Json", - Parquet = "Parquet" -} - -// @public -export enum KnownVersions { - "V2024-11-01" = "2024-11-01" -} - -// @public -export interface KubernetesReference { - apiGroup?: string; - kind: string; - name: string; - namespace?: string; -} - -// @public -export interface ListenerPort { - authenticationRef?: string; - authorizationRef?: string; - nodePort?: number; - port: number; - protocol?: BrokerProtocolType; - tls?: TlsCertMethod; -} - -// @public -export interface LocalKubernetesReference { - apiGroup?: string; - kind: string; - name: string; -} - -// @public -export interface ManagedServiceIdentity { - readonly principalId?: string; - readonly tenantId?: string; - type: ManagedServiceIdentityType; - userAssignedIdentities?: Record; -} - -// @public -export type ManagedServiceIdentityType = string; - -// @public -export interface Metrics { - prometheusPort?: number; -} - -// @public -export type MqttAuthMethod = string; - -// @public -export type MqttRetainType = string; - -// @public -export interface Operation { - actionType?: ActionType; - readonly display?: OperationDisplay; - readonly isDataAction?: boolean; - readonly name?: string; - readonly origin?: Origin; -} - -// @public -export type OperationalMode = string; - -// @public -export interface OperationDisplay { - readonly description?: string; - readonly operation?: string; - readonly provider?: string; - readonly resource?: string; -} - -// @public -export type OperationType = string; - -// @public -export type OperatorValues = string; - -// @public -export type Origin = string; - -// @public -export interface PrincipalDefinition { - attributes?: Record[]; - clientIds?: string[]; - usernames?: string[]; -} - -// @public -export type PrivateKeyAlgorithm = string; - -// @public -export type PrivateKeyRotationPolicy = string; - -// @public -export interface ProfileDiagnostics { - logs?: DiagnosticsLogs; - metrics?: Metrics; -} - -// @public -export type ProvisioningState = string; - -// @public -export interface ProxyResource extends Resource { -} - -// @public -export interface Resource { - readonly id?: string; - readonly name?: string; - readonly systemData?: SystemData; - readonly type?: string; -} - -// @public -export interface SanForCert { - dns: string[]; - ip: string[]; -} - -// @public -export interface SchemaRegistryRef { - resourceId: string; -} - -// @public -export interface SelfCheck { - intervalSeconds?: number; - mode?: OperationalMode; - timeoutSeconds?: number; -} - -// @public -export interface SelfTracing { - intervalSeconds?: number; - mode?: OperationalMode; -} - -// @public -export type ServiceType = string; - -// @public -export type SourceSerializationFormat = string; - -// @public -export type StateStoreResourceDefinitionMethods = string; - -// @public -export type StateStoreResourceKeyTypes = string; - -// @public -export interface StateStoreResourceRule { - keys: string[]; - keyType: StateStoreResourceKeyTypes; - method: StateStoreResourceDefinitionMethods; -} - -// @public -export type SubscriberMessageDropStrategy = string; - -// @public -export interface SubscriberQueueLimit { - length?: number; - strategy?: SubscriberMessageDropStrategy; -} - -// @public -export interface SystemData { - createdAt?: Date; - createdBy?: string; - createdByType?: CreatedByType; - lastModifiedAt?: Date; - lastModifiedBy?: string; - lastModifiedByType?: CreatedByType; -} - -// @public -export interface TlsCertMethod { - certManagerCertificateSpec?: CertManagerCertificateSpec; - manual?: X509ManualCertificate; - mode: TlsCertMethodMode; -} - -// @public -export type TlsCertMethodMode = string; - -// @public -export interface TlsProperties { - mode?: OperationalMode; - trustedCaCertificateConfigMapRef?: string; -} - -// @public -export interface Traces { - cacheSizeMegabytes?: number; - mode?: OperationalMode; - selfTracing?: SelfTracing; - spanChannelCapacity?: number; -} - -// @public -export interface TrackedResource extends Resource { - location: string; - tags?: Record; -} - -// @public -export type TransformationSerializationFormat = string; - -// @public -export interface UserAssignedIdentity { - readonly clientId?: string; - readonly principalId?: string; -} - -// @public -export interface VolumeClaimResourceRequirements { - limits?: Record; - requests?: Record; -} - -// @public -export interface VolumeClaimSpec { - accessModes?: string[]; - dataSource?: LocalKubernetesReference; - dataSourceRef?: KubernetesReference; - resources?: VolumeClaimResourceRequirements; - selector?: VolumeClaimSpecSelector; - storageClassName?: string; - volumeMode?: string; - volumeName?: string; -} - -// @public -export interface VolumeClaimSpecSelector { - matchExpressions?: VolumeClaimSpecSelectorMatchExpressions[]; - matchLabels?: Record; -} - -// @public -export interface VolumeClaimSpecSelectorMatchExpressions { - key: string; - operator: OperatorValues; - values?: string[]; -} - -// @public -export interface X509ManualCertificate { - secretRef: string; -} - -// (No @packageDocumentation comment for this package) - -``` diff --git a/sdk/iotoperations/arm-iotoperations/review/arm-iotoperations.api.md b/sdk/iotoperations/arm-iotoperations/review/arm-iotoperations.api.md deleted file mode 100644 index 0a477bde221e..000000000000 --- a/sdk/iotoperations/arm-iotoperations/review/arm-iotoperations.api.md +++ /dev/null @@ -1,1362 +0,0 @@ -## API Report File for "@azure/arm-iotoperations" - -> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). - -```ts - -import { AbortSignalLike } from '@azure/abort-controller'; -import { ClientOptions } from '@azure-rest/core-client'; -import { OperationOptions } from '@azure-rest/core-client'; -import { OperationState } from '@azure/core-lro'; -import { PathUncheckedResponse } from '@azure-rest/core-client'; -import { Pipeline } from '@azure/core-rest-pipeline'; -import { PollerLike } from '@azure/core-lro'; -import { TokenCredential } from '@azure/core-auth'; - -// @public -export type ActionType = string; - -// @public -export interface AdvancedSettings { - clients?: ClientConfig; - encryptInternalTraffic?: OperationalMode; - internalCerts?: CertManagerCertOptions; -} - -// @public -export interface AuthorizationConfig { - cache?: OperationalMode; - rules?: AuthorizationRule[]; -} - -// @public -export interface AuthorizationRule { - brokerResources: BrokerResourceRule[]; - principals: PrincipalDefinition; - stateStoreResources?: StateStoreResourceRule[]; -} - -// @public -export interface BackendChain { - partitions: number; - redundancyFactor: number; - workers?: number; -} - -// @public -export interface BatchingConfiguration { - latencySeconds?: number; - maxMessages?: number; -} - -// @public -export interface BrokerAuthenticationCreateOrUpdateOptionalParams extends OperationOptions { - updateIntervalInMs?: number; -} - -// @public -export interface BrokerAuthenticationDeleteOptionalParams extends OperationOptions { - updateIntervalInMs?: number; -} - -// @public -export interface BrokerAuthenticationGetOptionalParams extends OperationOptions { -} - -// @public -export interface BrokerAuthenticationListByResourceGroupOptionalParams extends OperationOptions { -} - -// @public -export type BrokerAuthenticationMethod = string; - -// @public -export interface BrokerAuthenticationOperations { - createOrUpdate: (resourceGroupName: string, instanceName: string, brokerName: string, authenticationName: string, resource: BrokerAuthenticationResource, options?: BrokerAuthenticationCreateOrUpdateOptionalParams) => PollerLike, BrokerAuthenticationResource>; - delete: (resourceGroupName: string, instanceName: string, brokerName: string, authenticationName: string, options?: BrokerAuthenticationDeleteOptionalParams) => PollerLike, void>; - get: (resourceGroupName: string, instanceName: string, brokerName: string, authenticationName: string, options?: BrokerAuthenticationGetOptionalParams) => Promise; - listByResourceGroup: (resourceGroupName: string, instanceName: string, brokerName: string, options?: BrokerAuthenticationListByResourceGroupOptionalParams) => PagedAsyncIterableIterator; -} - -// @public -export interface BrokerAuthenticationProperties { - authenticationMethods: BrokerAuthenticatorMethods[]; - readonly provisioningState?: ProvisioningState; -} - -// @public -export interface BrokerAuthenticationResource extends ProxyResource { - extendedLocation: ExtendedLocation; - properties?: BrokerAuthenticationProperties; -} - -// @public -export interface BrokerAuthenticatorCustomAuth { - x509: X509ManualCertificate; -} - -// @public -export interface BrokerAuthenticatorMethodCustom { - auth?: BrokerAuthenticatorCustomAuth; - caCertConfigMap?: string; - endpoint: string; - headers?: Record; -} - -// @public -export interface BrokerAuthenticatorMethods { - customSettings?: BrokerAuthenticatorMethodCustom; - method: BrokerAuthenticationMethod; - serviceAccountTokenSettings?: BrokerAuthenticatorMethodSat; - x509Settings?: BrokerAuthenticatorMethodX509; -} - -// @public -export interface BrokerAuthenticatorMethodSat { - audiences: string[]; -} - -// @public -export interface BrokerAuthenticatorMethodX509 { - authorizationAttributes?: Record; - trustedClientCaCert?: string; -} - -// @public -export interface BrokerAuthenticatorMethodX509Attributes { - attributes: Record; - subject: string; -} - -// @public -export interface BrokerAuthorizationCreateOrUpdateOptionalParams extends OperationOptions { - updateIntervalInMs?: number; -} - -// @public -export interface BrokerAuthorizationDeleteOptionalParams extends OperationOptions { - updateIntervalInMs?: number; -} - -// @public -export interface BrokerAuthorizationGetOptionalParams extends OperationOptions { -} - -// @public -export interface BrokerAuthorizationListByResourceGroupOptionalParams extends OperationOptions { -} - -// @public -export interface BrokerAuthorizationOperations { - createOrUpdate: (resourceGroupName: string, instanceName: string, brokerName: string, authorizationName: string, resource: BrokerAuthorizationResource, options?: BrokerAuthorizationCreateOrUpdateOptionalParams) => PollerLike, BrokerAuthorizationResource>; - delete: (resourceGroupName: string, instanceName: string, brokerName: string, authorizationName: string, options?: BrokerAuthorizationDeleteOptionalParams) => PollerLike, void>; - get: (resourceGroupName: string, instanceName: string, brokerName: string, authorizationName: string, options?: BrokerAuthorizationGetOptionalParams) => Promise; - listByResourceGroup: (resourceGroupName: string, instanceName: string, brokerName: string, options?: BrokerAuthorizationListByResourceGroupOptionalParams) => PagedAsyncIterableIterator; -} - -// @public -export interface BrokerAuthorizationProperties { - authorizationPolicies: AuthorizationConfig; - readonly provisioningState?: ProvisioningState; -} - -// @public -export interface BrokerAuthorizationResource extends ProxyResource { - extendedLocation: ExtendedLocation; - properties?: BrokerAuthorizationProperties; -} - -// @public -export interface BrokerCreateOrUpdateOptionalParams extends OperationOptions { - updateIntervalInMs?: number; -} - -// @public -export interface BrokerDeleteOptionalParams extends OperationOptions { - updateIntervalInMs?: number; -} - -// @public -export interface BrokerDiagnostics { - logs?: DiagnosticsLogs; - metrics?: Metrics; - selfCheck?: SelfCheck; - traces?: Traces; -} - -// @public -export interface BrokerGetOptionalParams extends OperationOptions { -} - -// @public -export interface BrokerListByResourceGroupOptionalParams extends OperationOptions { -} - -// @public -export interface BrokerListenerCreateOrUpdateOptionalParams extends OperationOptions { - updateIntervalInMs?: number; -} - -// @public -export interface BrokerListenerDeleteOptionalParams extends OperationOptions { - updateIntervalInMs?: number; -} - -// @public -export interface BrokerListenerGetOptionalParams extends OperationOptions { -} - -// @public -export interface BrokerListenerListByResourceGroupOptionalParams extends OperationOptions { -} - -// @public -export interface BrokerListenerOperations { - createOrUpdate: (resourceGroupName: string, instanceName: string, brokerName: string, listenerName: string, resource: BrokerListenerResource, options?: BrokerListenerCreateOrUpdateOptionalParams) => PollerLike, BrokerListenerResource>; - delete: (resourceGroupName: string, instanceName: string, brokerName: string, listenerName: string, options?: BrokerListenerDeleteOptionalParams) => PollerLike, void>; - get: (resourceGroupName: string, instanceName: string, brokerName: string, listenerName: string, options?: BrokerListenerGetOptionalParams) => Promise; - listByResourceGroup: (resourceGroupName: string, instanceName: string, brokerName: string, options?: BrokerListenerListByResourceGroupOptionalParams) => PagedAsyncIterableIterator; -} - -// @public -export interface BrokerListenerProperties { - ports: ListenerPort[]; - readonly provisioningState?: ProvisioningState; - serviceName?: string; - serviceType?: ServiceType; -} - -// @public -export interface BrokerListenerResource extends ProxyResource { - extendedLocation: ExtendedLocation; - properties?: BrokerListenerProperties; -} - -// @public -export type BrokerMemoryProfile = string; - -// @public -export interface BrokerOperations { - createOrUpdate: (resourceGroupName: string, instanceName: string, brokerName: string, resource: BrokerResource, options?: BrokerCreateOrUpdateOptionalParams) => PollerLike, BrokerResource>; - delete: (resourceGroupName: string, instanceName: string, brokerName: string, options?: BrokerDeleteOptionalParams) => PollerLike, void>; - get: (resourceGroupName: string, instanceName: string, brokerName: string, options?: BrokerGetOptionalParams) => Promise; - listByResourceGroup: (resourceGroupName: string, instanceName: string, options?: BrokerListByResourceGroupOptionalParams) => PagedAsyncIterableIterator; -} - -// @public -export interface BrokerProperties { - advanced?: AdvancedSettings; - cardinality?: Cardinality; - diagnostics?: BrokerDiagnostics; - diskBackedMessageBuffer?: DiskBackedMessageBuffer; - generateResourceLimits?: GenerateResourceLimits; - memoryProfile?: BrokerMemoryProfile; - readonly provisioningState?: ProvisioningState; -} - -// @public -export type BrokerProtocolType = string; - -// @public -export interface BrokerResource extends ProxyResource { - extendedLocation: ExtendedLocation; - properties?: BrokerProperties; -} - -// @public -export type BrokerResourceDefinitionMethods = string; - -// @public -export interface BrokerResourceRule { - clientIds?: string[]; - method: BrokerResourceDefinitionMethods; - topics?: string[]; -} - -// @public -export interface Cardinality { - backendChain: BackendChain; - frontend: Frontend; -} - -// @public -export interface CertManagerCertificateSpec { - duration?: string; - issuerRef: CertManagerIssuerRef; - privateKey?: CertManagerPrivateKey; - renewBefore?: string; - san?: SanForCert; - secretName?: string; -} - -// @public -export interface CertManagerCertOptions { - duration: string; - privateKey: CertManagerPrivateKey; - renewBefore: string; -} - -// @public -export type CertManagerIssuerKind = string; - -// @public -export interface CertManagerIssuerRef { - group: string; - kind: CertManagerIssuerKind; - name: string; -} - -// @public -export interface CertManagerPrivateKey { - algorithm: PrivateKeyAlgorithm; - rotationPolicy: PrivateKeyRotationPolicy; -} - -// @public -export interface ClientConfig { - maxKeepAliveSeconds?: number; - maxMessageExpirySeconds?: number; - maxPacketSizeBytes?: number; - maxReceiveMaximum?: number; - maxSessionExpirySeconds?: number; - subscriberQueueLimit?: SubscriberQueueLimit; -} - -// @public -export type CloudEventAttributeType = string; - -// @public -export type ContinuablePage = TPage & { - continuationToken?: string; -}; - -// @public -export type CreatedByType = string; - -// @public -export type DataExplorerAuthMethod = string; - -// @public -export interface DataflowBuiltInTransformationDataset { - description?: string; - expression?: string; - inputs: string[]; - key: string; - schemaRef?: string; -} - -// @public -export interface DataflowBuiltInTransformationFilter { - description?: string; - expression: string; - inputs: string[]; - type?: FilterType; -} - -// @public -export interface DataflowBuiltInTransformationMap { - description?: string; - expression?: string; - inputs: string[]; - output: string; - type?: DataflowMappingType; -} - -// @public -export interface DataflowBuiltInTransformationSettings { - datasets?: DataflowBuiltInTransformationDataset[]; - filter?: DataflowBuiltInTransformationFilter[]; - map?: DataflowBuiltInTransformationMap[]; - schemaRef?: string; - serializationFormat?: TransformationSerializationFormat; -} - -// @public -export interface DataflowCreateOrUpdateOptionalParams extends OperationOptions { - updateIntervalInMs?: number; -} - -// @public -export interface DataflowDeleteOptionalParams extends OperationOptions { - updateIntervalInMs?: number; -} - -// @public -export interface DataflowDestinationOperationSettings { - dataDestination: string; - endpointRef: string; -} - -// @public -export interface DataflowEndpointAuthenticationAccessToken { - secretRef: string; -} - -// @public -export interface DataflowEndpointAuthenticationSasl { - saslType: DataflowEndpointAuthenticationSaslType; - secretRef: string; -} - -// @public -export type DataflowEndpointAuthenticationSaslType = string; - -// @public -export interface DataflowEndpointAuthenticationServiceAccountToken { - audience: string; -} - -// @public -export interface DataflowEndpointAuthenticationSystemAssignedManagedIdentity { - audience?: string; -} - -// @public -export interface DataflowEndpointAuthenticationUserAssignedManagedIdentity { - clientId: string; - scope?: string; - tenantId: string; -} - -// @public -export interface DataflowEndpointAuthenticationX509 { - secretRef: string; -} - -// @public -export interface DataflowEndpointCreateOrUpdateOptionalParams extends OperationOptions { - updateIntervalInMs?: number; -} - -// @public -export interface DataflowEndpointDataExplorer { - authentication: DataflowEndpointDataExplorerAuthentication; - batching?: BatchingConfiguration; - database: string; - host: string; -} - -// @public -export interface DataflowEndpointDataExplorerAuthentication { - method: DataExplorerAuthMethod; - systemAssignedManagedIdentitySettings?: DataflowEndpointAuthenticationSystemAssignedManagedIdentity; - userAssignedManagedIdentitySettings?: DataflowEndpointAuthenticationUserAssignedManagedIdentity; -} - -// @public -export interface DataflowEndpointDataLakeStorage { - authentication: DataflowEndpointDataLakeStorageAuthentication; - batching?: BatchingConfiguration; - host: string; -} - -// @public -export interface DataflowEndpointDataLakeStorageAuthentication { - accessTokenSettings?: DataflowEndpointAuthenticationAccessToken; - method: DataLakeStorageAuthMethod; - systemAssignedManagedIdentitySettings?: DataflowEndpointAuthenticationSystemAssignedManagedIdentity; - userAssignedManagedIdentitySettings?: DataflowEndpointAuthenticationUserAssignedManagedIdentity; -} - -// @public -export interface DataflowEndpointDeleteOptionalParams extends OperationOptions { - updateIntervalInMs?: number; -} - -// @public -export interface DataflowEndpointFabricOneLake { - authentication: DataflowEndpointFabricOneLakeAuthentication; - batching?: BatchingConfiguration; - host: string; - names: DataflowEndpointFabricOneLakeNames; - oneLakePathType: DataflowEndpointFabricPathType; -} - -// @public -export interface DataflowEndpointFabricOneLakeAuthentication { - method: FabricOneLakeAuthMethod; - systemAssignedManagedIdentitySettings?: DataflowEndpointAuthenticationSystemAssignedManagedIdentity; - userAssignedManagedIdentitySettings?: DataflowEndpointAuthenticationUserAssignedManagedIdentity; -} - -// @public -export interface DataflowEndpointFabricOneLakeNames { - lakehouseName: string; - workspaceName: string; -} - -// @public -export type DataflowEndpointFabricPathType = string; - -// @public -export interface DataflowEndpointGetOptionalParams extends OperationOptions { -} - -// @public -export interface DataflowEndpointKafka { - authentication: DataflowEndpointKafkaAuthentication; - batching?: DataflowEndpointKafkaBatching; - cloudEventAttributes?: CloudEventAttributeType; - compression?: DataflowEndpointKafkaCompression; - consumerGroupId?: string; - copyMqttProperties?: OperationalMode; - host: string; - kafkaAcks?: DataflowEndpointKafkaAcks; - partitionStrategy?: DataflowEndpointKafkaPartitionStrategy; - tls?: TlsProperties; -} - -// @public -export type DataflowEndpointKafkaAcks = string; - -// @public -export interface DataflowEndpointKafkaAuthentication { - method: KafkaAuthMethod; - saslSettings?: DataflowEndpointAuthenticationSasl; - systemAssignedManagedIdentitySettings?: DataflowEndpointAuthenticationSystemAssignedManagedIdentity; - userAssignedManagedIdentitySettings?: DataflowEndpointAuthenticationUserAssignedManagedIdentity; - x509CertificateSettings?: DataflowEndpointAuthenticationX509; -} - -// @public -export interface DataflowEndpointKafkaBatching { - latencyMs?: number; - maxBytes?: number; - maxMessages?: number; - mode?: OperationalMode; -} - -// @public -export type DataflowEndpointKafkaCompression = string; - -// @public -export type DataflowEndpointKafkaPartitionStrategy = string; - -// @public -export interface DataflowEndpointListByResourceGroupOptionalParams extends OperationOptions { -} - -// @public -export interface DataflowEndpointLocalStorage { - persistentVolumeClaimRef: string; -} - -// @public -export interface DataflowEndpointMqtt { - authentication: DataflowEndpointMqttAuthentication; - clientIdPrefix?: string; - cloudEventAttributes?: CloudEventAttributeType; - host?: string; - keepAliveSeconds?: number; - maxInflightMessages?: number; - protocol?: BrokerProtocolType; - qos?: number; - retain?: MqttRetainType; - sessionExpirySeconds?: number; - tls?: TlsProperties; -} - -// @public -export interface DataflowEndpointMqttAuthentication { - method: MqttAuthMethod; - serviceAccountTokenSettings?: DataflowEndpointAuthenticationServiceAccountToken; - systemAssignedManagedIdentitySettings?: DataflowEndpointAuthenticationSystemAssignedManagedIdentity; - userAssignedManagedIdentitySettings?: DataflowEndpointAuthenticationUserAssignedManagedIdentity; - x509CertificateSettings?: DataflowEndpointAuthenticationX509; -} - -// @public -export interface DataflowEndpointOperations { - createOrUpdate: (resourceGroupName: string, instanceName: string, dataflowEndpointName: string, resource: DataflowEndpointResource, options?: DataflowEndpointCreateOrUpdateOptionalParams) => PollerLike, DataflowEndpointResource>; - delete: (resourceGroupName: string, instanceName: string, dataflowEndpointName: string, options?: DataflowEndpointDeleteOptionalParams) => PollerLike, void>; - get: (resourceGroupName: string, instanceName: string, dataflowEndpointName: string, options?: DataflowEndpointGetOptionalParams) => Promise; - listByResourceGroup: (resourceGroupName: string, instanceName: string, options?: DataflowEndpointListByResourceGroupOptionalParams) => PagedAsyncIterableIterator; -} - -// @public -export interface DataflowEndpointProperties { - dataExplorerSettings?: DataflowEndpointDataExplorer; - dataLakeStorageSettings?: DataflowEndpointDataLakeStorage; - endpointType: EndpointType; - fabricOneLakeSettings?: DataflowEndpointFabricOneLake; - kafkaSettings?: DataflowEndpointKafka; - localStorageSettings?: DataflowEndpointLocalStorage; - mqttSettings?: DataflowEndpointMqtt; - readonly provisioningState?: ProvisioningState; -} - -// @public -export interface DataflowEndpointResource extends ProxyResource { - extendedLocation: ExtendedLocation; - properties?: DataflowEndpointProperties; -} - -// @public -export interface DataflowGetOptionalParams extends OperationOptions { -} - -// @public -export interface DataflowListByResourceGroupOptionalParams extends OperationOptions { -} - -// @public -export type DataflowMappingType = string; - -// @public -export interface DataflowOperation { - builtInTransformationSettings?: DataflowBuiltInTransformationSettings; - destinationSettings?: DataflowDestinationOperationSettings; - name?: string; - operationType: OperationType; - sourceSettings?: DataflowSourceOperationSettings; -} - -// @public -export interface DataflowOperations { - createOrUpdate: (resourceGroupName: string, instanceName: string, dataflowProfileName: string, dataflowName: string, resource: DataflowResource, options?: DataflowCreateOrUpdateOptionalParams) => PollerLike, DataflowResource>; - delete: (resourceGroupName: string, instanceName: string, dataflowProfileName: string, dataflowName: string, options?: DataflowDeleteOptionalParams) => PollerLike, void>; - get: (resourceGroupName: string, instanceName: string, dataflowProfileName: string, dataflowName: string, options?: DataflowGetOptionalParams) => Promise; - listByResourceGroup: (resourceGroupName: string, instanceName: string, dataflowProfileName: string, options?: DataflowListByResourceGroupOptionalParams) => PagedAsyncIterableIterator; -} - -// @public -export interface DataflowProfileCreateOrUpdateOptionalParams extends OperationOptions { - updateIntervalInMs?: number; -} - -// @public -export interface DataflowProfileDeleteOptionalParams extends OperationOptions { - updateIntervalInMs?: number; -} - -// @public -export interface DataflowProfileGetOptionalParams extends OperationOptions { -} - -// @public -export interface DataflowProfileListByResourceGroupOptionalParams extends OperationOptions { -} - -// @public -export interface DataflowProfileOperations { - createOrUpdate: (resourceGroupName: string, instanceName: string, dataflowProfileName: string, resource: DataflowProfileResource, options?: DataflowProfileCreateOrUpdateOptionalParams) => PollerLike, DataflowProfileResource>; - delete: (resourceGroupName: string, instanceName: string, dataflowProfileName: string, options?: DataflowProfileDeleteOptionalParams) => PollerLike, void>; - get: (resourceGroupName: string, instanceName: string, dataflowProfileName: string, options?: DataflowProfileGetOptionalParams) => Promise; - listByResourceGroup: (resourceGroupName: string, instanceName: string, options?: DataflowProfileListByResourceGroupOptionalParams) => PagedAsyncIterableIterator; -} - -// @public -export interface DataflowProfileProperties { - diagnostics?: ProfileDiagnostics; - instanceCount?: number; - readonly provisioningState?: ProvisioningState; -} - -// @public -export interface DataflowProfileResource extends ProxyResource { - extendedLocation: ExtendedLocation; - properties?: DataflowProfileProperties; -} - -// @public -export interface DataflowProperties { - mode?: OperationalMode; - operations: DataflowOperation[]; - readonly provisioningState?: ProvisioningState; -} - -// @public -export interface DataflowResource extends ProxyResource { - extendedLocation: ExtendedLocation; - properties?: DataflowProperties; -} - -// @public -export interface DataflowSourceOperationSettings { - assetRef?: string; - dataSources: string[]; - endpointRef: string; - schemaRef?: string; - serializationFormat?: SourceSerializationFormat; -} - -// @public -export type DataLakeStorageAuthMethod = string; - -// @public -export interface DiagnosticsLogs { - level?: string; -} - -// @public -export interface DiskBackedMessageBuffer { - ephemeralVolumeClaimSpec?: VolumeClaimSpec; - maxSize: string; - persistentVolumeClaimSpec?: VolumeClaimSpec; -} - -// @public -export type EndpointType = string; - -// @public -export interface ExtendedLocation { - name: string; - type: ExtendedLocationType; -} - -// @public -export type ExtendedLocationType = string; - -// @public -export type FabricOneLakeAuthMethod = string; - -// @public -export type FilterType = string; - -// @public -export interface Frontend { - replicas: number; - workers?: number; -} - -// @public -export interface GenerateResourceLimits { - cpu?: OperationalMode; -} - -// @public -export interface InstanceCreateOrUpdateOptionalParams extends OperationOptions { - updateIntervalInMs?: number; -} - -// @public -export interface InstanceDeleteOptionalParams extends OperationOptions { - updateIntervalInMs?: number; -} - -// @public -export interface InstanceGetOptionalParams extends OperationOptions { -} - -// @public -export interface InstanceListByResourceGroupOptionalParams extends OperationOptions { -} - -// @public -export interface InstanceListBySubscriptionOptionalParams extends OperationOptions { -} - -// @public -export interface InstanceOperations { - createOrUpdate: (resourceGroupName: string, instanceName: string, resource: InstanceResource, options?: InstanceCreateOrUpdateOptionalParams) => PollerLike, InstanceResource>; - delete: (resourceGroupName: string, instanceName: string, options?: InstanceDeleteOptionalParams) => PollerLike, void>; - get: (resourceGroupName: string, instanceName: string, options?: InstanceGetOptionalParams) => Promise; - listByResourceGroup: (resourceGroupName: string, options?: InstanceListByResourceGroupOptionalParams) => PagedAsyncIterableIterator; - listBySubscription: (options?: InstanceListBySubscriptionOptionalParams) => PagedAsyncIterableIterator; - update: (resourceGroupName: string, instanceName: string, properties: InstancePatchModel, options?: InstanceUpdateOptionalParams) => Promise; -} - -// @public -export interface InstancePatchModel { - identity?: ManagedServiceIdentity; - tags?: Record; -} - -// @public -export interface InstanceProperties { - description?: string; - readonly provisioningState?: ProvisioningState; - schemaRegistryRef: SchemaRegistryRef; - readonly version?: string; -} - -// @public -export interface InstanceResource extends TrackedResource { - extendedLocation: ExtendedLocation; - identity?: ManagedServiceIdentity; - properties?: InstanceProperties; -} - -// @public -export interface InstanceUpdateOptionalParams extends OperationOptions { -} - -// @public (undocumented) -export class IoTOperationsClient { - constructor(credential: TokenCredential, subscriptionId: string, options?: IoTOperationsClientOptionalParams); - readonly broker: BrokerOperations; - readonly brokerAuthentication: BrokerAuthenticationOperations; - readonly brokerAuthorization: BrokerAuthorizationOperations; - readonly brokerListener: BrokerListenerOperations; - readonly dataflow: DataflowOperations; - readonly dataflowEndpoint: DataflowEndpointOperations; - readonly dataflowProfile: DataflowProfileOperations; - readonly instance: InstanceOperations; - readonly operations: OperationsOperations; - readonly pipeline: Pipeline; -} - -// @public -export interface IoTOperationsClientOptionalParams extends ClientOptions { - apiVersion?: string; -} - -// @public -export type KafkaAuthMethod = string; - -// @public -export enum KnownActionType { - Internal = "Internal" -} - -// @public -export enum KnownBrokerAuthenticationMethod { - Custom = "Custom", - ServiceAccountToken = "ServiceAccountToken", - X509 = "X509" -} - -// @public -export enum KnownBrokerMemoryProfile { - High = "High", - Low = "Low", - Medium = "Medium", - Tiny = "Tiny" -} - -// @public -export enum KnownBrokerProtocolType { - Mqtt = "Mqtt", - WebSockets = "WebSockets" -} - -// @public -export enum KnownBrokerResourceDefinitionMethods { - Connect = "Connect", - Publish = "Publish", - Subscribe = "Subscribe" -} - -// @public -export enum KnownCertManagerIssuerKind { - ClusterIssuer = "ClusterIssuer", - Issuer = "Issuer" -} - -// @public -export enum KnownCloudEventAttributeType { - CreateOrRemap = "CreateOrRemap", - Propagate = "Propagate" -} - -// @public -export enum KnownCreatedByType { - Application = "Application", - Key = "Key", - ManagedIdentity = "ManagedIdentity", - User = "User" -} - -// @public -export enum KnownDataExplorerAuthMethod { - SystemAssignedManagedIdentity = "SystemAssignedManagedIdentity", - UserAssignedManagedIdentity = "UserAssignedManagedIdentity" -} - -// @public -export enum KnownDataflowEndpointAuthenticationSaslType { - Plain = "Plain", - ScramSha256 = "ScramSha256", - ScramSha512 = "ScramSha512" -} - -// @public -export enum KnownDataflowEndpointFabricPathType { - Files = "Files", - Tables = "Tables" -} - -// @public -export enum KnownDataflowEndpointKafkaAcks { - All = "All", - One = "One", - Zero = "Zero" -} - -// @public -export enum KnownDataflowEndpointKafkaCompression { - Gzip = "Gzip", - Lz4 = "Lz4", - None = "None", - Snappy = "Snappy" -} - -// @public -export enum KnownDataflowEndpointKafkaPartitionStrategy { - Default = "Default", - Property = "Property", - Static = "Static", - Topic = "Topic" -} - -// @public -export enum KnownDataflowMappingType { - BuiltInFunction = "BuiltInFunction", - Compute = "Compute", - NewProperties = "NewProperties", - PassThrough = "PassThrough", - Rename = "Rename" -} - -// @public -export enum KnownDataLakeStorageAuthMethod { - AccessToken = "AccessToken", - SystemAssignedManagedIdentity = "SystemAssignedManagedIdentity", - UserAssignedManagedIdentity = "UserAssignedManagedIdentity" -} - -// @public -export enum KnownEndpointType { - DataExplorer = "DataExplorer", - DataLakeStorage = "DataLakeStorage", - FabricOneLake = "FabricOneLake", - Kafka = "Kafka", - LocalStorage = "LocalStorage", - Mqtt = "Mqtt" -} - -// @public -export enum KnownExtendedLocationType { - CustomLocation = "CustomLocation" -} - -// @public -export enum KnownFabricOneLakeAuthMethod { - SystemAssignedManagedIdentity = "SystemAssignedManagedIdentity", - UserAssignedManagedIdentity = "UserAssignedManagedIdentity" -} - -// @public -export enum KnownFilterType { - Filter = "Filter" -} - -// @public -export enum KnownKafkaAuthMethod { - Anonymous = "Anonymous", - Sasl = "Sasl", - SystemAssignedManagedIdentity = "SystemAssignedManagedIdentity", - UserAssignedManagedIdentity = "UserAssignedManagedIdentity", - X509Certificate = "X509Certificate" -} - -// @public -export enum KnownManagedServiceIdentityType { - 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", - Never = "Never" -} - -// @public -export enum KnownOperationalMode { - Disabled = "Disabled", - Enabled = "Enabled" -} - -// @public -export enum KnownOperationType { - BuiltInTransformation = "BuiltInTransformation", - Destination = "Destination", - Source = "Source" -} - -// @public -export enum KnownOperatorValues { - DoesNotExist = "DoesNotExist", - Exists = "Exists", - In = "In", - NotIn = "NotIn" -} - -// @public -export enum KnownOrigin { - System = "system", - User = "user", - UserSystem = "user,system" -} - -// @public -export enum KnownPrivateKeyAlgorithm { - Ec256 = "Ec256", - Ec384 = "Ec384", - Ec521 = "Ec521", - Ed25519 = "Ed25519", - Rsa2048 = "Rsa2048", - Rsa4096 = "Rsa4096", - Rsa8192 = "Rsa8192" -} - -// @public -export enum KnownPrivateKeyRotationPolicy { - Always = "Always", - Never = "Never" -} - -// @public -export enum KnownProvisioningState { - Accepted = "Accepted", - Canceled = "Canceled", - Deleting = "Deleting", - Failed = "Failed", - Provisioning = "Provisioning", - Succeeded = "Succeeded", - Updating = "Updating" -} - -// @public -export enum KnownServiceType { - ClusterIp = "ClusterIp", - LoadBalancer = "LoadBalancer", - NodePort = "NodePort" -} - -// @public -export enum KnownSourceSerializationFormat { - Json = "Json" -} - -// @public -export enum KnownStateStoreResourceDefinitionMethods { - Read = "Read", - ReadWrite = "ReadWrite", - Write = "Write" -} - -// @public -export enum KnownStateStoreResourceKeyTypes { - Binary = "Binary", - Pattern = "Pattern", - String = "String" -} - -// @public -export enum KnownSubscriberMessageDropStrategy { - DropOldest = "DropOldest", - None = "None" -} - -// @public -export enum KnownTlsCertMethodMode { - Automatic = "Automatic", - Manual = "Manual" -} - -// @public -export enum KnownTransformationSerializationFormat { - Delta = "Delta", - Json = "Json", - Parquet = "Parquet" -} - -// @public -export enum KnownVersions { - "V2024-11-01" = "2024-11-01" -} - -// @public -export interface KubernetesReference { - apiGroup?: string; - kind: string; - name: string; - namespace?: string; -} - -// @public -export interface ListenerPort { - authenticationRef?: string; - authorizationRef?: string; - nodePort?: number; - port: number; - protocol?: BrokerProtocolType; - tls?: TlsCertMethod; -} - -// @public -export interface LocalKubernetesReference { - apiGroup?: string; - kind: string; - name: string; -} - -// @public -export interface ManagedServiceIdentity { - readonly principalId?: string; - readonly tenantId?: string; - type: ManagedServiceIdentityType; - userAssignedIdentities?: Record; -} - -// @public -export type ManagedServiceIdentityType = string; - -// @public -export interface Metrics { - prometheusPort?: number; -} - -// @public -export type MqttAuthMethod = string; - -// @public -export type MqttRetainType = string; - -// @public -export interface Operation { - actionType?: ActionType; - readonly display?: OperationDisplay; - readonly isDataAction?: boolean; - readonly name?: string; - readonly origin?: Origin; -} - -// @public -export type OperationalMode = string; - -// @public -export interface OperationDisplay { - readonly description?: string; - readonly operation?: string; - readonly provider?: string; - readonly resource?: string; -} - -// @public -export interface OperationsListOptionalParams extends OperationOptions { -} - -// @public -export interface OperationsOperations { - list: (options?: OperationsListOptionalParams) => PagedAsyncIterableIterator; -} - -// @public -export type OperationType = string; - -// @public -export type OperatorValues = string; - -// @public -export type Origin = string; - -// @public -export interface PagedAsyncIterableIterator { - [Symbol.asyncIterator](): PagedAsyncIterableIterator; - byPage: (settings?: TPageSettings) => AsyncIterableIterator>; - next(): Promise>; -} - -// @public -export interface PageSettings { - continuationToken?: string; -} - -// @public -export interface PrincipalDefinition { - attributes?: Record[]; - clientIds?: string[]; - usernames?: string[]; -} - -// @public -export type PrivateKeyAlgorithm = string; - -// @public -export type PrivateKeyRotationPolicy = string; - -// @public -export interface ProfileDiagnostics { - logs?: DiagnosticsLogs; - metrics?: Metrics; -} - -// @public -export type ProvisioningState = string; - -// @public -export interface ProxyResource extends Resource { -} - -// @public -export interface Resource { - readonly id?: string; - readonly name?: string; - readonly systemData?: SystemData; - readonly type?: string; -} - -// @public -export function restorePoller(client: IoTOperationsClient, serializedState: string, sourceOperation: (...args: any[]) => PollerLike, TResult>, options?: RestorePollerOptions): PollerLike, TResult>; - -// @public (undocumented) -export interface RestorePollerOptions extends OperationOptions { - abortSignal?: AbortSignalLike; - processResponseBody?: (result: TResponse) => Promise; - updateIntervalInMs?: number; -} - -// @public -export interface SanForCert { - dns: string[]; - ip: string[]; -} - -// @public -export interface SchemaRegistryRef { - resourceId: string; -} - -// @public -export interface SelfCheck { - intervalSeconds?: number; - mode?: OperationalMode; - timeoutSeconds?: number; -} - -// @public -export interface SelfTracing { - intervalSeconds?: number; - mode?: OperationalMode; -} - -// @public -export type ServiceType = string; - -// @public -export type SourceSerializationFormat = string; - -// @public -export type StateStoreResourceDefinitionMethods = string; - -// @public -export type StateStoreResourceKeyTypes = string; - -// @public -export interface StateStoreResourceRule { - keys: string[]; - keyType: StateStoreResourceKeyTypes; - method: StateStoreResourceDefinitionMethods; -} - -// @public -export type SubscriberMessageDropStrategy = string; - -// @public -export interface SubscriberQueueLimit { - length?: number; - strategy?: SubscriberMessageDropStrategy; -} - -// @public -export interface SystemData { - createdAt?: Date; - createdBy?: string; - createdByType?: CreatedByType; - lastModifiedAt?: Date; - lastModifiedBy?: string; - lastModifiedByType?: CreatedByType; -} - -// @public -export interface TlsCertMethod { - certManagerCertificateSpec?: CertManagerCertificateSpec; - manual?: X509ManualCertificate; - mode: TlsCertMethodMode; -} - -// @public -export type TlsCertMethodMode = string; - -// @public -export interface TlsProperties { - mode?: OperationalMode; - trustedCaCertificateConfigMapRef?: string; -} - -// @public -export interface Traces { - cacheSizeMegabytes?: number; - mode?: OperationalMode; - selfTracing?: SelfTracing; - spanChannelCapacity?: number; -} - -// @public -export interface TrackedResource extends Resource { - location: string; - tags?: Record; -} - -// @public -export type TransformationSerializationFormat = string; - -// @public -export interface UserAssignedIdentity { - readonly clientId?: string; - readonly principalId?: string; -} - -// @public -export interface VolumeClaimResourceRequirements { - limits?: Record; - requests?: Record; -} - -// @public -export interface VolumeClaimSpec { - accessModes?: string[]; - dataSource?: LocalKubernetesReference; - dataSourceRef?: KubernetesReference; - resources?: VolumeClaimResourceRequirements; - selector?: VolumeClaimSpecSelector; - storageClassName?: string; - volumeMode?: string; - volumeName?: string; -} - -// @public -export interface VolumeClaimSpecSelector { - matchExpressions?: VolumeClaimSpecSelectorMatchExpressions[]; - matchLabels?: Record; -} - -// @public -export interface VolumeClaimSpecSelectorMatchExpressions { - key: string; - operator: OperatorValues; - values?: string[]; -} - -// @public -export interface X509ManualCertificate { - secretRef: string; -} - -// (No @packageDocumentation comment for this package) - -``` diff --git a/sdk/iotoperations/arm-iotoperations/sample.env b/sdk/iotoperations/arm-iotoperations/sample.env deleted file mode 100644 index 508439fc7d62..000000000000 --- a/sdk/iotoperations/arm-iotoperations/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-dev/brokerAuthenticationCreateOrUpdateSample.ts b/sdk/iotoperations/arm-iotoperations/samples-dev/brokerAuthenticationCreateOrUpdateSample.ts deleted file mode 100644 index 7d3360f29447..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-11-01/BrokerAuthentication_CreateOrUpdate_Complex.json - */ -async function brokerAuthenticationCreateOrUpdateComplex(): Promise { - 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-11-01/BrokerAuthentication_CreateOrUpdate_MaximumSet_Gen.json - */ -async function brokerAuthenticationCreateOrUpdate(): Promise { - 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(): Promise { - await brokerAuthenticationCreateOrUpdateComplex(); - await 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 104c9e33769d..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-11-01/BrokerAuthentication_Delete_MaximumSet_Gen.json - */ -async function brokerAuthenticationDelete(): Promise { - 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(): Promise { - await 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 3f0122f7b575..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-11-01/BrokerAuthentication_Get_MaximumSet_Gen.json - */ -async function brokerAuthenticationGet(): Promise { - 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(): Promise { - await 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 95b0161e68fe..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-11-01/BrokerAuthentication_ListByResourceGroup_MaximumSet_Gen.json - */ -async function brokerAuthenticationListByResourceGroup(): Promise { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.brokerAuthentication.listByResourceGroup( - "rgiotoperations", - "resource-name123", - "resource-name123", - )) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main(): Promise { - await 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 7a85ca9cdd2b..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-11-01/BrokerAuthorization_CreateOrUpdate_Complex.json - */ -async function brokerAuthorizationCreateOrUpdateComplex(): Promise { - 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-11-01/BrokerAuthorization_CreateOrUpdate_MaximumSet_Gen.json - */ -async function brokerAuthorizationCreateOrUpdate(): Promise { - 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-11-01/BrokerAuthorization_CreateOrUpdate_Simple.json - */ -async function brokerAuthorizationCreateOrUpdateSimple(): Promise { - 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(): Promise { - await brokerAuthorizationCreateOrUpdateComplex(); - await brokerAuthorizationCreateOrUpdate(); - await 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 e5a32678a37b..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-11-01/BrokerAuthorization_Delete_MaximumSet_Gen.json - */ -async function brokerAuthorizationDelete(): Promise { - 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(): Promise { - await 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 d7c82ffcad82..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-11-01/BrokerAuthorization_Get_MaximumSet_Gen.json - */ -async function brokerAuthorizationGet(): Promise { - 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(): Promise { - await 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 51c0818f49c7..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-11-01/BrokerAuthorization_ListByResourceGroup_MaximumSet_Gen.json - */ -async function brokerAuthorizationListByResourceGroup(): Promise { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.brokerAuthorization.listByResourceGroup( - "rgiotoperations", - "resource-name123", - "resource-name123", - )) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main(): Promise { - await 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 aeb117d0d36f..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-11-01/Broker_CreateOrUpdate_Complex.json - */ -async function brokerCreateOrUpdateComplex(): Promise { - 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-11-01/Broker_CreateOrUpdate_MaximumSet_Gen.json - */ -async function brokerCreateOrUpdate(): Promise { - 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-11-01/Broker_CreateOrUpdate_Minimal.json - */ -async function brokerCreateOrUpdateMinimal(): Promise { - 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-11-01/Broker_CreateOrUpdate_Simple.json - */ -async function brokerCreateOrUpdateSimple(): Promise { - 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(): Promise { - await brokerCreateOrUpdateComplex(); - await brokerCreateOrUpdate(); - await brokerCreateOrUpdateMinimal(); - await 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 2b80064f0389..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-11-01/Broker_Delete_MaximumSet_Gen.json - */ -async function brokerDelete(): Promise { - 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(): Promise { - await 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 343697a8853b..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-11-01/Broker_Get_MaximumSet_Gen.json - */ -async function brokerGet(): Promise { - 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(): Promise { - await 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 9ee0bc2052a1..000000000000 --- a/sdk/iotoperations/arm-iotoperations/samples-dev/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-11-01/Broker_ListByResourceGroup_MaximumSet_Gen.json - */ -async function brokerListByResourceGroup(): Promise { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.broker.listByResourceGroup( - "rgiotoperations", - "resource-name123", - )) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main(): Promise { - await 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 7eef53122e63..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-11-01/BrokerListener_CreateOrUpdate_Complex.json - */ -async function brokerListenerCreateOrUpdateComplex(): Promise { - 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-11-01/BrokerListener_CreateOrUpdate_MaximumSet_Gen.json - */ -async function brokerListenerCreateOrUpdate(): Promise { - 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-11-01/BrokerListener_CreateOrUpdate_Simple.json - */ -async function brokerListenerCreateOrUpdateSimple(): Promise { - 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(): Promise { - await brokerListenerCreateOrUpdateComplex(); - await brokerListenerCreateOrUpdate(); - await 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 615d9de80063..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-11-01/BrokerListener_Delete_MaximumSet_Gen.json - */ -async function brokerListenerDelete(): Promise { - 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(): Promise { - await 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 55d520849fad..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-11-01/BrokerListener_Get_MaximumSet_Gen.json - */ -async function brokerListenerGet(): Promise { - 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(): Promise { - await 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 1b37ff5a357a..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-11-01/BrokerListener_ListByResourceGroup_MaximumSet_Gen.json - */ -async function brokerListenerListByResourceGroup(): Promise { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.brokerListener.listByResourceGroup( - "rgiotoperations", - "resource-name123", - "resource-name123", - )) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main(): Promise { - await 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 257f7fed1264..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-11-01/Dataflow_CreateOrUpdate_ComplexContextualization.json - */ -async function dataflowCreateOrUpdateComplexContextualization(): Promise { - 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-11-01/Dataflow_CreateOrUpdate_ComplexEventHub.json - */ -async function dataflowCreateOrUpdateComplexEventHub(): Promise { - 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-11-01/Dataflow_CreateOrUpdate_FilterToTopic.json - */ -async function dataflowCreateOrUpdateFilterToTopic(): Promise { - 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-11-01/Dataflow_CreateOrUpdate_MaximumSet_Gen.json - */ -async function dataflowCreateOrUpdate(): Promise { - 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-11-01/Dataflow_CreateOrUpdate_SimpleEventGrid.json - */ -async function dataflowCreateOrUpdateSimpleEventGrid(): Promise { - 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-11-01/Dataflow_CreateOrUpdate_SimpleFabric.json - */ -async function dataflowCreateOrUpdateSimpleFabric(): Promise { - 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(): Promise { - await dataflowCreateOrUpdateComplexContextualization(); - await dataflowCreateOrUpdateComplexEventHub(); - await dataflowCreateOrUpdateFilterToTopic(); - await dataflowCreateOrUpdate(); - await dataflowCreateOrUpdateSimpleEventGrid(); - await 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 79cdee044a73..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-11-01/Dataflow_Delete_MaximumSet_Gen.json - */ -async function dataflowDelete(): Promise { - 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(): Promise { - await 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 f0e64128bccf..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-11-01/DataflowEndpoint_CreateOrUpdate_ADLSv2.json - */ -async function dataflowEndpointCreateOrUpdateADLSv2(): Promise { - 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-11-01/DataflowEndpoint_CreateOrUpdate_ADX.json - */ -async function dataflowEndpointCreateOrUpdateAdx(): Promise { - 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-11-01/DataflowEndpoint_CreateOrUpdate_AIO.json - */ -async function dataflowEndpointCreateOrUpdateAio(): Promise { - 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-11-01/DataflowEndpoint_CreateOrUpdate_EventGrid.json - */ -async function dataflowEndpointCreateOrUpdateEventGrid(): Promise { - 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-11-01/DataflowEndpoint_CreateOrUpdate_EventHub.json - */ -async function dataflowEndpointCreateOrUpdateEventHub(): Promise { - 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-11-01/DataflowEndpoint_CreateOrUpdate_Fabric.json - */ -async function dataflowEndpointCreateOrUpdateFabric(): Promise { - 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-11-01/DataflowEndpoint_CreateOrUpdate_Kafka.json - */ -async function dataflowEndpointCreateOrUpdateKafka(): Promise { - 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-11-01/DataflowEndpoint_CreateOrUpdate_LocalStorage.json - */ -async function dataflowEndpointCreateOrUpdateLocalStorage(): Promise { - 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-11-01/DataflowEndpoint_CreateOrUpdate_MaximumSet_Gen.json - */ -async function dataflowEndpointCreateOrUpdate(): Promise { - 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-11-01/DataflowEndpoint_CreateOrUpdate_MQTT.json - */ -async function dataflowEndpointCreateOrUpdateMqtt(): Promise { - 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(): Promise { - await dataflowEndpointCreateOrUpdateADLSv2(); - await dataflowEndpointCreateOrUpdateAdx(); - await dataflowEndpointCreateOrUpdateAio(); - await dataflowEndpointCreateOrUpdateEventGrid(); - await dataflowEndpointCreateOrUpdateEventHub(); - await dataflowEndpointCreateOrUpdateFabric(); - await dataflowEndpointCreateOrUpdateKafka(); - await dataflowEndpointCreateOrUpdateLocalStorage(); - await dataflowEndpointCreateOrUpdate(); - await 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 ab8413882420..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-11-01/DataflowEndpoint_Delete_MaximumSet_Gen.json - */ -async function dataflowEndpointDelete(): Promise { - 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(): Promise { - await 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 26a7cb930721..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-11-01/DataflowEndpoint_Get_MaximumSet_Gen.json - */ -async function dataflowEndpointGet(): Promise { - 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(): Promise { - await 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 dabc90594038..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-11-01/DataflowEndpoint_ListByResourceGroup_MaximumSet_Gen.json - */ -async function dataflowEndpointListByResourceGroup(): Promise { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.dataflowEndpoint.listByResourceGroup( - "rgiotoperations", - "resource-name123", - )) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main(): Promise { - await 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 ee0ceebc6f36..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-11-01/Dataflow_Get_MaximumSet_Gen.json - */ -async function dataflowGet(): Promise { - 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(): Promise { - await 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 b95d22cb6150..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-11-01/Dataflow_ListByProfileResource_MaximumSet_Gen.json - */ -async function dataflowListByProfileResource(): Promise { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.dataflow.listByResourceGroup( - "rgiotoperations", - "resource-name123", - "resource-name123", - )) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main(): Promise { - await 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 fc9fd9d0537a..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-11-01/DataflowProfile_CreateOrUpdate_MaximumSet_Gen.json - */ -async function dataflowProfileCreateOrUpdate(): Promise { - 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-11-01/DataflowProfile_CreateOrUpdate_Minimal.json - */ -async function dataflowProfileCreateOrUpdateMinimal(): Promise { - 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-11-01/DataflowProfile_CreateOrUpdate_Multi.json - */ -async function dataflowProfileCreateOrUpdateMulti(): Promise { - 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(): Promise { - await dataflowProfileCreateOrUpdate(); - await dataflowProfileCreateOrUpdateMinimal(); - await 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 19667c5bbf52..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-11-01/DataflowProfile_Delete_MaximumSet_Gen.json - */ -async function dataflowProfileDelete(): Promise { - 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(): Promise { - await 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 023bf4c675d8..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-11-01/DataflowProfile_Get_MaximumSet_Gen.json - */ -async function dataflowProfileGet(): Promise { - 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(): Promise { - await 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 cbf65574d299..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-11-01/DataflowProfile_ListByResourceGroup_MaximumSet_Gen.json - */ -async function dataflowProfileListByResourceGroup(): Promise { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.dataflowProfile.listByResourceGroup( - "rgiotoperations", - "resource-name123", - )) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main(): Promise { - await 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 c0dea7db0011..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-11-01/Instance_CreateOrUpdate_MaximumSet_Gen.json - */ -async function instanceCreateOrUpdate(): Promise { - 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(): Promise { - await 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 66cdc3aa5691..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-11-01/Instance_Delete_MaximumSet_Gen.json - */ -async function instanceDelete(): Promise { - 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(): Promise { - await 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 c2882e779685..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-11-01/Instance_Get_MaximumSet_Gen.json - */ -async function instanceGet(): Promise { - 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(): Promise { - await 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 95f52919e8f6..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-11-01/Instance_ListByResourceGroup_MaximumSet_Gen.json - */ -async function instanceListByResourceGroup(): Promise { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.instance.listByResourceGroup("rgiotoperations")) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main(): Promise { - await 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 8f40624533af..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-11-01/Instance_ListBySubscription_MaximumSet_Gen.json - */ -async function instanceListBySubscription(): Promise { - const credential = new DefaultAzureCredential(); - const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; - const client = new IoTOperationsClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.instance.listBySubscription()) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main(): Promise { - await 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 a12158ce92f2..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-11-01/Instance_Update_MaximumSet_Gen.json - */ -async function instanceUpdate(): Promise { - 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(): Promise { - await 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 00fbf810fb42..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-11-01/Operations_List_MaximumSet_Gen.json - */ -async function operationsList(): Promise { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-00000000000"; - const client = new IoTOperationsClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.operations.list()) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main(): Promise { - await 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 855fb0992819..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-11-01/BrokerAuthentication_CreateOrUpdate_Complex.json | -| [brokerAuthenticationDeleteSample.js][brokerauthenticationdeletesample] | delete a BrokerAuthenticationResource x-ms-original-file: 2024-11-01/BrokerAuthentication_Delete_MaximumSet_Gen.json | -| [brokerAuthenticationGetSample.js][brokerauthenticationgetsample] | get a BrokerAuthenticationResource x-ms-original-file: 2024-11-01/BrokerAuthentication_Get_MaximumSet_Gen.json | -| [brokerAuthenticationListByResourceGroupSample.js][brokerauthenticationlistbyresourcegroupsample] | list BrokerAuthenticationResource resources by BrokerResource x-ms-original-file: 2024-11-01/BrokerAuthentication_ListByResourceGroup_MaximumSet_Gen.json | -| [brokerAuthorizationCreateOrUpdateSample.js][brokerauthorizationcreateorupdatesample] | create a BrokerAuthorizationResource x-ms-original-file: 2024-11-01/BrokerAuthorization_CreateOrUpdate_Complex.json | -| [brokerAuthorizationDeleteSample.js][brokerauthorizationdeletesample] | delete a BrokerAuthorizationResource x-ms-original-file: 2024-11-01/BrokerAuthorization_Delete_MaximumSet_Gen.json | -| [brokerAuthorizationGetSample.js][brokerauthorizationgetsample] | get a BrokerAuthorizationResource x-ms-original-file: 2024-11-01/BrokerAuthorization_Get_MaximumSet_Gen.json | -| [brokerAuthorizationListByResourceGroupSample.js][brokerauthorizationlistbyresourcegroupsample] | list BrokerAuthorizationResource resources by BrokerResource x-ms-original-file: 2024-11-01/BrokerAuthorization_ListByResourceGroup_MaximumSet_Gen.json | -| [brokerCreateOrUpdateSample.js][brokercreateorupdatesample] | create a BrokerResource x-ms-original-file: 2024-11-01/Broker_CreateOrUpdate_Complex.json | -| [brokerDeleteSample.js][brokerdeletesample] | delete a BrokerResource x-ms-original-file: 2024-11-01/Broker_Delete_MaximumSet_Gen.json | -| [brokerGetSample.js][brokergetsample] | get a BrokerResource x-ms-original-file: 2024-11-01/Broker_Get_MaximumSet_Gen.json | -| [brokerListByResourceGroupSample.js][brokerlistbyresourcegroupsample] | list BrokerResource resources by InstanceResource x-ms-original-file: 2024-11-01/Broker_ListByResourceGroup_MaximumSet_Gen.json | -| [brokerListenerCreateOrUpdateSample.js][brokerlistenercreateorupdatesample] | create a BrokerListenerResource x-ms-original-file: 2024-11-01/BrokerListener_CreateOrUpdate_Complex.json | -| [brokerListenerDeleteSample.js][brokerlistenerdeletesample] | delete a BrokerListenerResource x-ms-original-file: 2024-11-01/BrokerListener_Delete_MaximumSet_Gen.json | -| [brokerListenerGetSample.js][brokerlistenergetsample] | get a BrokerListenerResource x-ms-original-file: 2024-11-01/BrokerListener_Get_MaximumSet_Gen.json | -| [brokerListenerListByResourceGroupSample.js][brokerlistenerlistbyresourcegroupsample] | list BrokerListenerResource resources by BrokerResource x-ms-original-file: 2024-11-01/BrokerListener_ListByResourceGroup_MaximumSet_Gen.json | -| [dataflowCreateOrUpdateSample.js][dataflowcreateorupdatesample] | create a DataflowResource x-ms-original-file: 2024-11-01/Dataflow_CreateOrUpdate_ComplexContextualization.json | -| [dataflowDeleteSample.js][dataflowdeletesample] | delete a DataflowResource x-ms-original-file: 2024-11-01/Dataflow_Delete_MaximumSet_Gen.json | -| [dataflowEndpointCreateOrUpdateSample.js][dataflowendpointcreateorupdatesample] | create a DataflowEndpointResource x-ms-original-file: 2024-11-01/DataflowEndpoint_CreateOrUpdate_ADLSv2.json | -| [dataflowEndpointDeleteSample.js][dataflowendpointdeletesample] | delete a DataflowEndpointResource x-ms-original-file: 2024-11-01/DataflowEndpoint_Delete_MaximumSet_Gen.json | -| [dataflowEndpointGetSample.js][dataflowendpointgetsample] | get a DataflowEndpointResource x-ms-original-file: 2024-11-01/DataflowEndpoint_Get_MaximumSet_Gen.json | -| [dataflowEndpointListByResourceGroupSample.js][dataflowendpointlistbyresourcegroupsample] | list DataflowEndpointResource resources by InstanceResource x-ms-original-file: 2024-11-01/DataflowEndpoint_ListByResourceGroup_MaximumSet_Gen.json | -| [dataflowGetSample.js][dataflowgetsample] | get a DataflowResource x-ms-original-file: 2024-11-01/Dataflow_Get_MaximumSet_Gen.json | -| [dataflowListByResourceGroupSample.js][dataflowlistbyresourcegroupsample] | list DataflowResource resources by DataflowProfileResource x-ms-original-file: 2024-11-01/Dataflow_ListByProfileResource_MaximumSet_Gen.json | -| [dataflowProfileCreateOrUpdateSample.js][dataflowprofilecreateorupdatesample] | create a DataflowProfileResource x-ms-original-file: 2024-11-01/DataflowProfile_CreateOrUpdate_MaximumSet_Gen.json | -| [dataflowProfileDeleteSample.js][dataflowprofiledeletesample] | delete a DataflowProfileResource x-ms-original-file: 2024-11-01/DataflowProfile_Delete_MaximumSet_Gen.json | -| [dataflowProfileGetSample.js][dataflowprofilegetsample] | get a DataflowProfileResource x-ms-original-file: 2024-11-01/DataflowProfile_Get_MaximumSet_Gen.json | -| [dataflowProfileListByResourceGroupSample.js][dataflowprofilelistbyresourcegroupsample] | list DataflowProfileResource resources by InstanceResource x-ms-original-file: 2024-11-01/DataflowProfile_ListByResourceGroup_MaximumSet_Gen.json | -| [instanceCreateOrUpdateSample.js][instancecreateorupdatesample] | create a InstanceResource x-ms-original-file: 2024-11-01/Instance_CreateOrUpdate_MaximumSet_Gen.json | -| [instanceDeleteSample.js][instancedeletesample] | delete a InstanceResource x-ms-original-file: 2024-11-01/Instance_Delete_MaximumSet_Gen.json | -| [instanceGetSample.js][instancegetsample] | get a InstanceResource x-ms-original-file: 2024-11-01/Instance_Get_MaximumSet_Gen.json | -| [instanceListByResourceGroupSample.js][instancelistbyresourcegroupsample] | list InstanceResource resources by resource group x-ms-original-file: 2024-11-01/Instance_ListByResourceGroup_MaximumSet_Gen.json | -| [instanceListBySubscriptionSample.js][instancelistbysubscriptionsample] | list InstanceResource resources by subscription ID x-ms-original-file: 2024-11-01/Instance_ListBySubscription_MaximumSet_Gen.json | -| [instanceUpdateSample.js][instanceupdatesample] | update a InstanceResource x-ms-original-file: 2024-11-01/Instance_Update_MaximumSet_Gen.json | -| [operationsListSample.js][operationslistsample] | list the operations for the provider x-ms-original-file: 2024-11-01/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://learn.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 3c7ccb152bbf..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-11-01/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-11-01/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 24b8233734f5..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-11-01/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 c674a94ee3ef..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-11-01/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 54bd91ed0074..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-11-01/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 fd1a80964da5..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-11-01/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-11-01/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-11-01/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 6d4c34b263e1..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-11-01/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 7850ad3a0c76..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-11-01/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 3630ca26d500..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-11-01/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 56a6fb2121cc..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-11-01/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-11-01/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-11-01/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-11-01/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 e39b19518750..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-11-01/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 40225285deb9..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-11-01/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 bc80d62cc698..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-11-01/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 2437df79757b..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-11-01/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-11-01/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-11-01/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 82cb72a25c9c..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-11-01/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 cbc2dae72a3b..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-11-01/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 c415d3d97d05..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-11-01/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 d0558c09f927..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-11-01/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-11-01/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-11-01/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-11-01/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-11-01/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-11-01/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 e434ee976606..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-11-01/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 6733044d8070..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-11-01/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-11-01/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-11-01/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-11-01/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-11-01/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-11-01/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-11-01/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-11-01/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-11-01/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-11-01/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 0519bd24f754..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-11-01/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 1c8d1482bc0a..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-11-01/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 4a833b099298..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-11-01/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 0ef5cb112543..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-11-01/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 eaf83c379800..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-11-01/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 a5c41183d0f9..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-11-01/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-11-01/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-11-01/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 2881339a7e2a..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-11-01/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 c35c23d0df43..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-11-01/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 fddcaf3fdd7c..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-11-01/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 ca5549cc8293..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-11-01/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 f62de92aae5b..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-11-01/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 45b8230e1d5b..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-11-01/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 4fd3c8c8c4ce..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-11-01/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 2c67f60a7759..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-11-01/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 3cbc7a6440ad..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-11-01/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 a4e550cc403b..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-11-01/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 45ebbce7ca36..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-11-01/BrokerAuthentication_CreateOrUpdate_Complex.json | -| [brokerAuthenticationDeleteSample.ts][brokerauthenticationdeletesample] | delete a BrokerAuthenticationResource x-ms-original-file: 2024-11-01/BrokerAuthentication_Delete_MaximumSet_Gen.json | -| [brokerAuthenticationGetSample.ts][brokerauthenticationgetsample] | get a BrokerAuthenticationResource x-ms-original-file: 2024-11-01/BrokerAuthentication_Get_MaximumSet_Gen.json | -| [brokerAuthenticationListByResourceGroupSample.ts][brokerauthenticationlistbyresourcegroupsample] | list BrokerAuthenticationResource resources by BrokerResource x-ms-original-file: 2024-11-01/BrokerAuthentication_ListByResourceGroup_MaximumSet_Gen.json | -| [brokerAuthorizationCreateOrUpdateSample.ts][brokerauthorizationcreateorupdatesample] | create a BrokerAuthorizationResource x-ms-original-file: 2024-11-01/BrokerAuthorization_CreateOrUpdate_Complex.json | -| [brokerAuthorizationDeleteSample.ts][brokerauthorizationdeletesample] | delete a BrokerAuthorizationResource x-ms-original-file: 2024-11-01/BrokerAuthorization_Delete_MaximumSet_Gen.json | -| [brokerAuthorizationGetSample.ts][brokerauthorizationgetsample] | get a BrokerAuthorizationResource x-ms-original-file: 2024-11-01/BrokerAuthorization_Get_MaximumSet_Gen.json | -| [brokerAuthorizationListByResourceGroupSample.ts][brokerauthorizationlistbyresourcegroupsample] | list BrokerAuthorizationResource resources by BrokerResource x-ms-original-file: 2024-11-01/BrokerAuthorization_ListByResourceGroup_MaximumSet_Gen.json | -| [brokerCreateOrUpdateSample.ts][brokercreateorupdatesample] | create a BrokerResource x-ms-original-file: 2024-11-01/Broker_CreateOrUpdate_Complex.json | -| [brokerDeleteSample.ts][brokerdeletesample] | delete a BrokerResource x-ms-original-file: 2024-11-01/Broker_Delete_MaximumSet_Gen.json | -| [brokerGetSample.ts][brokergetsample] | get a BrokerResource x-ms-original-file: 2024-11-01/Broker_Get_MaximumSet_Gen.json | -| [brokerListByResourceGroupSample.ts][brokerlistbyresourcegroupsample] | list BrokerResource resources by InstanceResource x-ms-original-file: 2024-11-01/Broker_ListByResourceGroup_MaximumSet_Gen.json | -| [brokerListenerCreateOrUpdateSample.ts][brokerlistenercreateorupdatesample] | create a BrokerListenerResource x-ms-original-file: 2024-11-01/BrokerListener_CreateOrUpdate_Complex.json | -| [brokerListenerDeleteSample.ts][brokerlistenerdeletesample] | delete a BrokerListenerResource x-ms-original-file: 2024-11-01/BrokerListener_Delete_MaximumSet_Gen.json | -| [brokerListenerGetSample.ts][brokerlistenergetsample] | get a BrokerListenerResource x-ms-original-file: 2024-11-01/BrokerListener_Get_MaximumSet_Gen.json | -| [brokerListenerListByResourceGroupSample.ts][brokerlistenerlistbyresourcegroupsample] | list BrokerListenerResource resources by BrokerResource x-ms-original-file: 2024-11-01/BrokerListener_ListByResourceGroup_MaximumSet_Gen.json | -| [dataflowCreateOrUpdateSample.ts][dataflowcreateorupdatesample] | create a DataflowResource x-ms-original-file: 2024-11-01/Dataflow_CreateOrUpdate_ComplexContextualization.json | -| [dataflowDeleteSample.ts][dataflowdeletesample] | delete a DataflowResource x-ms-original-file: 2024-11-01/Dataflow_Delete_MaximumSet_Gen.json | -| [dataflowEndpointCreateOrUpdateSample.ts][dataflowendpointcreateorupdatesample] | create a DataflowEndpointResource x-ms-original-file: 2024-11-01/DataflowEndpoint_CreateOrUpdate_ADLSv2.json | -| [dataflowEndpointDeleteSample.ts][dataflowendpointdeletesample] | delete a DataflowEndpointResource x-ms-original-file: 2024-11-01/DataflowEndpoint_Delete_MaximumSet_Gen.json | -| [dataflowEndpointGetSample.ts][dataflowendpointgetsample] | get a DataflowEndpointResource x-ms-original-file: 2024-11-01/DataflowEndpoint_Get_MaximumSet_Gen.json | -| [dataflowEndpointListByResourceGroupSample.ts][dataflowendpointlistbyresourcegroupsample] | list DataflowEndpointResource resources by InstanceResource x-ms-original-file: 2024-11-01/DataflowEndpoint_ListByResourceGroup_MaximumSet_Gen.json | -| [dataflowGetSample.ts][dataflowgetsample] | get a DataflowResource x-ms-original-file: 2024-11-01/Dataflow_Get_MaximumSet_Gen.json | -| [dataflowListByResourceGroupSample.ts][dataflowlistbyresourcegroupsample] | list DataflowResource resources by DataflowProfileResource x-ms-original-file: 2024-11-01/Dataflow_ListByProfileResource_MaximumSet_Gen.json | -| [dataflowProfileCreateOrUpdateSample.ts][dataflowprofilecreateorupdatesample] | create a DataflowProfileResource x-ms-original-file: 2024-11-01/DataflowProfile_CreateOrUpdate_MaximumSet_Gen.json | -| [dataflowProfileDeleteSample.ts][dataflowprofiledeletesample] | delete a DataflowProfileResource x-ms-original-file: 2024-11-01/DataflowProfile_Delete_MaximumSet_Gen.json | -| [dataflowProfileGetSample.ts][dataflowprofilegetsample] | get a DataflowProfileResource x-ms-original-file: 2024-11-01/DataflowProfile_Get_MaximumSet_Gen.json | -| [dataflowProfileListByResourceGroupSample.ts][dataflowprofilelistbyresourcegroupsample] | list DataflowProfileResource resources by InstanceResource x-ms-original-file: 2024-11-01/DataflowProfile_ListByResourceGroup_MaximumSet_Gen.json | -| [instanceCreateOrUpdateSample.ts][instancecreateorupdatesample] | create a InstanceResource x-ms-original-file: 2024-11-01/Instance_CreateOrUpdate_MaximumSet_Gen.json | -| [instanceDeleteSample.ts][instancedeletesample] | delete a InstanceResource x-ms-original-file: 2024-11-01/Instance_Delete_MaximumSet_Gen.json | -| [instanceGetSample.ts][instancegetsample] | get a InstanceResource x-ms-original-file: 2024-11-01/Instance_Get_MaximumSet_Gen.json | -| [instanceListByResourceGroupSample.ts][instancelistbyresourcegroupsample] | list InstanceResource resources by resource group x-ms-original-file: 2024-11-01/Instance_ListByResourceGroup_MaximumSet_Gen.json | -| [instanceListBySubscriptionSample.ts][instancelistbysubscriptionsample] | list InstanceResource resources by subscription ID x-ms-original-file: 2024-11-01/Instance_ListBySubscription_MaximumSet_Gen.json | -| [instanceUpdateSample.ts][instanceupdatesample] | update a InstanceResource x-ms-original-file: 2024-11-01/Instance_Update_MaximumSet_Gen.json | -| [operationsListSample.ts][operationslistsample] | list the operations for the provider x-ms-original-file: 2024-11-01/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://learn.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 22d6f465a6ee..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.8.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 e6efddc1e6d5..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-11-01/BrokerAuthentication_CreateOrUpdate_Complex.json - */ -async function brokerAuthenticationCreateOrUpdateComplex(): Promise { - 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-11-01/BrokerAuthentication_CreateOrUpdate_MaximumSet_Gen.json - */ -async function brokerAuthenticationCreateOrUpdate(): Promise { - 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(): Promise { - 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 e6852e5222ca..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-11-01/BrokerAuthentication_Delete_MaximumSet_Gen.json - */ -async function brokerAuthenticationDelete(): Promise { - 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(): Promise { - 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 c989977bf603..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-11-01/BrokerAuthentication_Get_MaximumSet_Gen.json - */ -async function brokerAuthenticationGet(): Promise { - 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(): Promise { - 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 c6e9b36de43a..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-11-01/BrokerAuthentication_ListByResourceGroup_MaximumSet_Gen.json - */ -async function brokerAuthenticationListByResourceGroup(): Promise { - 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(): Promise { - 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 b46056a8a4bc..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-11-01/BrokerAuthorization_CreateOrUpdate_Complex.json - */ -async function brokerAuthorizationCreateOrUpdateComplex(): Promise { - 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-11-01/BrokerAuthorization_CreateOrUpdate_MaximumSet_Gen.json - */ -async function brokerAuthorizationCreateOrUpdate(): Promise { - 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-11-01/BrokerAuthorization_CreateOrUpdate_Simple.json - */ -async function brokerAuthorizationCreateOrUpdateSimple(): Promise { - 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(): Promise { - 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 297fea5a8547..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-11-01/BrokerAuthorization_Delete_MaximumSet_Gen.json - */ -async function brokerAuthorizationDelete(): Promise { - 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(): Promise { - 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 932d9d70bbf4..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-11-01/BrokerAuthorization_Get_MaximumSet_Gen.json - */ -async function brokerAuthorizationGet(): Promise { - 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(): Promise { - 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 e8aa6420ef51..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-11-01/BrokerAuthorization_ListByResourceGroup_MaximumSet_Gen.json - */ -async function brokerAuthorizationListByResourceGroup(): Promise { - 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(): Promise { - 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 9ef358eed512..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-11-01/Broker_CreateOrUpdate_Complex.json - */ -async function brokerCreateOrUpdateComplex(): Promise { - 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-11-01/Broker_CreateOrUpdate_MaximumSet_Gen.json - */ -async function brokerCreateOrUpdate(): Promise { - 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-11-01/Broker_CreateOrUpdate_Minimal.json - */ -async function brokerCreateOrUpdateMinimal(): Promise { - 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-11-01/Broker_CreateOrUpdate_Simple.json - */ -async function brokerCreateOrUpdateSimple(): Promise { - 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(): Promise { - 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 bec98929a5c7..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-11-01/Broker_Delete_MaximumSet_Gen.json - */ -async function brokerDelete(): Promise { - 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(): Promise { - 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 bc7995dd4370..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-11-01/Broker_Get_MaximumSet_Gen.json - */ -async function brokerGet(): Promise { - 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(): Promise { - 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 b399af59d01d..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-11-01/Broker_ListByResourceGroup_MaximumSet_Gen.json - */ -async function brokerListByResourceGroup(): Promise { - 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(): Promise { - 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 4546b1a2f218..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-11-01/BrokerListener_CreateOrUpdate_Complex.json - */ -async function brokerListenerCreateOrUpdateComplex(): Promise { - 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-11-01/BrokerListener_CreateOrUpdate_MaximumSet_Gen.json - */ -async function brokerListenerCreateOrUpdate(): Promise { - 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-11-01/BrokerListener_CreateOrUpdate_Simple.json - */ -async function brokerListenerCreateOrUpdateSimple(): Promise { - 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(): Promise { - 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 b0b55cc0638f..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-11-01/BrokerListener_Delete_MaximumSet_Gen.json - */ -async function brokerListenerDelete(): Promise { - 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(): Promise { - 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 2816bccf9025..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-11-01/BrokerListener_Get_MaximumSet_Gen.json - */ -async function brokerListenerGet(): Promise { - 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(): Promise { - 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 3ee34ac4ebc2..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-11-01/BrokerListener_ListByResourceGroup_MaximumSet_Gen.json - */ -async function brokerListenerListByResourceGroup(): Promise { - 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(): Promise { - 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 22741066a8b6..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-11-01/Dataflow_CreateOrUpdate_ComplexContextualization.json - */ -async function dataflowCreateOrUpdateComplexContextualization(): Promise { - 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-11-01/Dataflow_CreateOrUpdate_ComplexEventHub.json - */ -async function dataflowCreateOrUpdateComplexEventHub(): Promise { - 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-11-01/Dataflow_CreateOrUpdate_FilterToTopic.json - */ -async function dataflowCreateOrUpdateFilterToTopic(): Promise { - 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-11-01/Dataflow_CreateOrUpdate_MaximumSet_Gen.json - */ -async function dataflowCreateOrUpdate(): Promise { - 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-11-01/Dataflow_CreateOrUpdate_SimpleEventGrid.json - */ -async function dataflowCreateOrUpdateSimpleEventGrid(): Promise { - 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-11-01/Dataflow_CreateOrUpdate_SimpleFabric.json - */ -async function dataflowCreateOrUpdateSimpleFabric(): Promise { - 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(): Promise { - 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 8ce898b4b1c2..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-11-01/Dataflow_Delete_MaximumSet_Gen.json - */ -async function dataflowDelete(): Promise { - 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(): Promise { - 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 a1c5e97cfdd6..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-11-01/DataflowEndpoint_CreateOrUpdate_ADLSv2.json - */ -async function dataflowEndpointCreateOrUpdateADLSv2(): Promise { - 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-11-01/DataflowEndpoint_CreateOrUpdate_ADX.json - */ -async function dataflowEndpointCreateOrUpdateAdx(): Promise { - 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-11-01/DataflowEndpoint_CreateOrUpdate_AIO.json - */ -async function dataflowEndpointCreateOrUpdateAio(): Promise { - 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-11-01/DataflowEndpoint_CreateOrUpdate_EventGrid.json - */ -async function dataflowEndpointCreateOrUpdateEventGrid(): Promise { - 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-11-01/DataflowEndpoint_CreateOrUpdate_EventHub.json - */ -async function dataflowEndpointCreateOrUpdateEventHub(): Promise { - 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-11-01/DataflowEndpoint_CreateOrUpdate_Fabric.json - */ -async function dataflowEndpointCreateOrUpdateFabric(): Promise { - 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-11-01/DataflowEndpoint_CreateOrUpdate_Kafka.json - */ -async function dataflowEndpointCreateOrUpdateKafka(): Promise { - 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-11-01/DataflowEndpoint_CreateOrUpdate_LocalStorage.json - */ -async function dataflowEndpointCreateOrUpdateLocalStorage(): Promise { - 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-11-01/DataflowEndpoint_CreateOrUpdate_MaximumSet_Gen.json - */ -async function dataflowEndpointCreateOrUpdate(): Promise { - 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-11-01/DataflowEndpoint_CreateOrUpdate_MQTT.json - */ -async function dataflowEndpointCreateOrUpdateMqtt(): Promise { - 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(): Promise { - 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 ceb2a1c5d801..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-11-01/DataflowEndpoint_Delete_MaximumSet_Gen.json - */ -async function dataflowEndpointDelete(): Promise { - 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(): Promise { - 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 49280fe69945..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-11-01/DataflowEndpoint_Get_MaximumSet_Gen.json - */ -async function dataflowEndpointGet(): Promise { - 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(): Promise { - 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 64918f2d0c20..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-11-01/DataflowEndpoint_ListByResourceGroup_MaximumSet_Gen.json - */ -async function dataflowEndpointListByResourceGroup(): Promise { - 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(): Promise { - 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 02b607fa9a5a..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-11-01/Dataflow_Get_MaximumSet_Gen.json - */ -async function dataflowGet(): Promise { - 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(): Promise { - 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 16b936756ec4..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-11-01/Dataflow_ListByProfileResource_MaximumSet_Gen.json - */ -async function dataflowListByProfileResource(): Promise { - 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(): Promise { - 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 acb8adc42857..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-11-01/DataflowProfile_CreateOrUpdate_MaximumSet_Gen.json - */ -async function dataflowProfileCreateOrUpdate(): Promise { - 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-11-01/DataflowProfile_CreateOrUpdate_Minimal.json - */ -async function dataflowProfileCreateOrUpdateMinimal(): Promise { - 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-11-01/DataflowProfile_CreateOrUpdate_Multi.json - */ -async function dataflowProfileCreateOrUpdateMulti(): Promise { - 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(): Promise { - 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 c9d73b9e4979..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-11-01/DataflowProfile_Delete_MaximumSet_Gen.json - */ -async function dataflowProfileDelete(): Promise { - 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(): Promise { - 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 5767f9baeeff..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-11-01/DataflowProfile_Get_MaximumSet_Gen.json - */ -async function dataflowProfileGet(): Promise { - 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(): Promise { - 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 8929aa533178..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-11-01/DataflowProfile_ListByResourceGroup_MaximumSet_Gen.json - */ -async function dataflowProfileListByResourceGroup(): Promise { - 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(): Promise { - 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 bfc036413e83..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-11-01/Instance_CreateOrUpdate_MaximumSet_Gen.json - */ -async function instanceCreateOrUpdate(): Promise { - 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(): Promise { - 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 29ff884214c9..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-11-01/Instance_Delete_MaximumSet_Gen.json - */ -async function instanceDelete(): Promise { - 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(): Promise { - 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 15e62da084f9..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-11-01/Instance_Get_MaximumSet_Gen.json - */ -async function instanceGet(): Promise { - 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(): Promise { - 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 2cb624997de9..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-11-01/Instance_ListByResourceGroup_MaximumSet_Gen.json - */ -async function instanceListByResourceGroup(): Promise { - 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(): Promise { - 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 b8609c9c137a..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-11-01/Instance_ListBySubscription_MaximumSet_Gen.json - */ -async function instanceListBySubscription(): Promise { - 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(): Promise { - 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 5b26871ee7b6..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-11-01/Instance_Update_MaximumSet_Gen.json - */ -async function instanceUpdate(): Promise { - 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(): Promise { - 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 5c39238c9d1e..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-11-01/Operations_List_MaximumSet_Gen.json - */ -async function operationsList(): Promise { - 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(): Promise { - 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 deleted file mode 100644 index 5e9d3c951f69..000000000000 --- a/sdk/iotoperations/arm-iotoperations/src/api/broker/index.ts +++ /dev/null @@ -1,245 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { - BrokerCreateOrUpdateOptionalParams, - BrokerDeleteOptionalParams, - BrokerGetOptionalParams, - BrokerListByResourceGroupOptionalParams, - IoTOperationsContext as Client, -} from "../index.js"; -import { - BrokerResource, - brokerResourceSerializer, - brokerResourceDeserializer, - _BrokerResourceListResult, - _brokerResourceListResultDeserializer, -} from "../../models/models.js"; -import { - PagedAsyncIterableIterator, - buildPagedAsyncIterator, -} from "../../static-helpers/pagingHelpers.js"; -import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; -import { - StreamableMethod, - PathUncheckedResponse, - createRestError, - operationOptionsToRequestParameters, -} from "@azure-rest/core-client"; -import { PollerLike, OperationState } from "@azure/core-lro"; - -export function _brokerGetSend( - context: Client, - subscriptionId: string, - resourceGroupName: string, - instanceName: string, - brokerName: string, - options: BrokerGetOptionalParams = { requestOptions: {} }, -): StreamableMethod { - return context - .path( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/brokers/{brokerName}", - subscriptionId, - resourceGroupName, - instanceName, - brokerName, - ) - .get({ ...operationOptionsToRequestParameters(options) }); -} - -export async function _brokerGetDeserialize( - result: PathUncheckedResponse, -): Promise { - const expectedStatuses = ["200"]; - if (!expectedStatuses.includes(result.status)) { - throw createRestError(result); - } - - return brokerResourceDeserializer(result.body); -} - -/** Get a BrokerResource */ -export async function brokerGet( - context: Client, - subscriptionId: string, - resourceGroupName: string, - instanceName: string, - brokerName: string, - options: BrokerGetOptionalParams = { requestOptions: {} }, -): Promise { - const result = await _brokerGetSend( - context, - subscriptionId, - resourceGroupName, - instanceName, - brokerName, - options, - ); - return _brokerGetDeserialize(result); -} - -export function _brokerCreateOrUpdateSend( - context: Client, - subscriptionId: string, - resourceGroupName: string, - instanceName: string, - brokerName: string, - resource: BrokerResource, - options: BrokerCreateOrUpdateOptionalParams = { requestOptions: {} }, -): StreamableMethod { - return context - .path( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/brokers/{brokerName}", - subscriptionId, - resourceGroupName, - instanceName, - brokerName, - ) - .put({ - ...operationOptionsToRequestParameters(options), - body: brokerResourceSerializer(resource), - }); -} - -export async function _brokerCreateOrUpdateDeserialize( - result: PathUncheckedResponse, -): Promise { - const expectedStatuses = ["200", "201"]; - if (!expectedStatuses.includes(result.status)) { - throw createRestError(result); - } - - return brokerResourceDeserializer(result.body); -} - -/** Create a BrokerResource */ -export function brokerCreateOrUpdate( - context: Client, - subscriptionId: string, - resourceGroupName: string, - instanceName: string, - brokerName: string, - 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>; -} - -export function _brokerDeleteSend( - context: Client, - subscriptionId: string, - resourceGroupName: string, - instanceName: string, - brokerName: string, - options: BrokerDeleteOptionalParams = { requestOptions: {} }, -): StreamableMethod { - return context - .path( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/brokers/{brokerName}", - subscriptionId, - resourceGroupName, - instanceName, - brokerName, - ) - .delete({ ...operationOptionsToRequestParameters(options) }); -} - -export async function _brokerDeleteDeserialize(result: PathUncheckedResponse): Promise { - const expectedStatuses = ["202", "204", "200"]; - if (!expectedStatuses.includes(result.status)) { - throw createRestError(result); - } - - return; -} - -/** Delete a BrokerResource */ -export function brokerDelete( - context: Client, - subscriptionId: string, - resourceGroupName: string, - instanceName: string, - 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>; -} - -export function _brokerListByResourceGroupSend( - context: Client, - subscriptionId: string, - resourceGroupName: string, - instanceName: string, - options: BrokerListByResourceGroupOptionalParams = { requestOptions: {} }, -): StreamableMethod { - return context - .path( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/brokers", - subscriptionId, - resourceGroupName, - instanceName, - ) - .get({ ...operationOptionsToRequestParameters(options) }); -} - -export async function _brokerListByResourceGroupDeserialize( - result: PathUncheckedResponse, -): Promise<_BrokerResourceListResult> { - const expectedStatuses = ["200"]; - if (!expectedStatuses.includes(result.status)) { - throw createRestError(result); - } - - return _brokerResourceListResultDeserializer(result.body); -} - -/** List BrokerResource resources by InstanceResource */ -export function brokerListByResourceGroup( - context: Client, - subscriptionId: string, - resourceGroupName: string, - instanceName: string, - options: BrokerListByResourceGroupOptionalParams = { requestOptions: {} }, -): PagedAsyncIterableIterator { - return buildPagedAsyncIterator( - context, - () => - _brokerListByResourceGroupSend( - context, - subscriptionId, - resourceGroupName, - instanceName, - options, - ), - _brokerListByResourceGroupDeserialize, - ["200"], - { itemName: "value", nextLinkName: "nextLink" }, - ); -} diff --git a/sdk/iotoperations/arm-iotoperations/src/api/brokerAuthentication/index.ts b/sdk/iotoperations/arm-iotoperations/src/api/brokerAuthentication/index.ts deleted file mode 100644 index 2366b90d2801..000000000000 --- a/sdk/iotoperations/arm-iotoperations/src/api/brokerAuthentication/index.ts +++ /dev/null @@ -1,281 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { - BrokerAuthenticationCreateOrUpdateOptionalParams, - BrokerAuthenticationDeleteOptionalParams, - BrokerAuthenticationGetOptionalParams, - BrokerAuthenticationListByResourceGroupOptionalParams, - IoTOperationsContext as Client, -} from "../index.js"; -import { - BrokerAuthenticationResource, - brokerAuthenticationResourceSerializer, - brokerAuthenticationResourceDeserializer, - _BrokerAuthenticationResourceListResult, - _brokerAuthenticationResourceListResultDeserializer, -} from "../../models/models.js"; -import { - PagedAsyncIterableIterator, - buildPagedAsyncIterator, -} from "../../static-helpers/pagingHelpers.js"; -import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; -import { - StreamableMethod, - PathUncheckedResponse, - createRestError, - operationOptionsToRequestParameters, -} from "@azure-rest/core-client"; -import { PollerLike, OperationState } from "@azure/core-lro"; - -export function _brokerAuthenticationGetSend( - context: Client, - subscriptionId: string, - resourceGroupName: string, - instanceName: string, - brokerName: string, - authenticationName: string, - options: BrokerAuthenticationGetOptionalParams = { requestOptions: {} }, -): StreamableMethod { - return context - .path( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/brokers/{brokerName}/authentications/{authenticationName}", - subscriptionId, - resourceGroupName, - instanceName, - brokerName, - authenticationName, - ) - .get({ ...operationOptionsToRequestParameters(options) }); -} - -export async function _brokerAuthenticationGetDeserialize( - result: PathUncheckedResponse, -): Promise { - const expectedStatuses = ["200"]; - if (!expectedStatuses.includes(result.status)) { - throw createRestError(result); - } - - return brokerAuthenticationResourceDeserializer(result.body); -} - -/** Get a BrokerAuthenticationResource */ -export async function brokerAuthenticationGet( - context: Client, - subscriptionId: string, - resourceGroupName: string, - instanceName: string, - brokerName: string, - authenticationName: string, - options: BrokerAuthenticationGetOptionalParams = { requestOptions: {} }, -): Promise { - const result = await _brokerAuthenticationGetSend( - context, - subscriptionId, - resourceGroupName, - instanceName, - brokerName, - authenticationName, - options, - ); - return _brokerAuthenticationGetDeserialize(result); -} - -export function _brokerAuthenticationCreateOrUpdateSend( - context: Client, - subscriptionId: string, - resourceGroupName: string, - instanceName: string, - brokerName: string, - authenticationName: string, - resource: BrokerAuthenticationResource, - options: BrokerAuthenticationCreateOrUpdateOptionalParams = { - requestOptions: {}, - }, -): StreamableMethod { - return context - .path( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/brokers/{brokerName}/authentications/{authenticationName}", - subscriptionId, - resourceGroupName, - instanceName, - brokerName, - authenticationName, - ) - .put({ - ...operationOptionsToRequestParameters(options), - body: brokerAuthenticationResourceSerializer(resource), - }); -} - -export async function _brokerAuthenticationCreateOrUpdateDeserialize( - result: PathUncheckedResponse, -): Promise { - const expectedStatuses = ["200", "201"]; - if (!expectedStatuses.includes(result.status)) { - throw createRestError(result); - } - - return brokerAuthenticationResourceDeserializer(result.body); -} - -/** Create a BrokerAuthenticationResource */ -export function brokerAuthenticationCreateOrUpdate( - context: Client, - subscriptionId: string, - resourceGroupName: string, - instanceName: string, - brokerName: string, - authenticationName: string, - resource: BrokerAuthenticationResource, - options: BrokerAuthenticationCreateOrUpdateOptionalParams = { - requestOptions: {}, - }, -): PollerLike, BrokerAuthenticationResource> { - return getLongRunningPoller( - context, - _brokerAuthenticationCreateOrUpdateDeserialize, - ["200", "201"], - { - updateIntervalInMs: options?.updateIntervalInMs, - abortSignal: options?.abortSignal, - getInitialResponse: () => - _brokerAuthenticationCreateOrUpdateSend( - context, - subscriptionId, - resourceGroupName, - instanceName, - brokerName, - authenticationName, - resource, - options, - ), - resourceLocationConfig: "azure-async-operation", - }, - ) as PollerLike, BrokerAuthenticationResource>; -} - -export function _brokerAuthenticationDeleteSend( - context: Client, - subscriptionId: string, - resourceGroupName: string, - instanceName: string, - brokerName: string, - authenticationName: string, - options: BrokerAuthenticationDeleteOptionalParams = { requestOptions: {} }, -): StreamableMethod { - return context - .path( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/brokers/{brokerName}/authentications/{authenticationName}", - subscriptionId, - resourceGroupName, - instanceName, - brokerName, - authenticationName, - ) - .delete({ ...operationOptionsToRequestParameters(options) }); -} - -export async function _brokerAuthenticationDeleteDeserialize( - result: PathUncheckedResponse, -): Promise { - const expectedStatuses = ["202", "204", "200"]; - if (!expectedStatuses.includes(result.status)) { - throw createRestError(result); - } - - return; -} - -/** Delete a BrokerAuthenticationResource */ -export function brokerAuthenticationDelete( - context: Client, - subscriptionId: string, - resourceGroupName: string, - instanceName: string, - brokerName: string, - authenticationName: string, - options: BrokerAuthenticationDeleteOptionalParams = { requestOptions: {} }, -): PollerLike, void> { - return getLongRunningPoller( - context, - _brokerAuthenticationDeleteDeserialize, - ["202", "204", "200"], - { - updateIntervalInMs: options?.updateIntervalInMs, - abortSignal: options?.abortSignal, - getInitialResponse: () => - _brokerAuthenticationDeleteSend( - context, - subscriptionId, - resourceGroupName, - instanceName, - brokerName, - authenticationName, - options, - ), - resourceLocationConfig: "location", - }, - ) as PollerLike, void>; -} - -export function _brokerAuthenticationListByResourceGroupSend( - context: Client, - subscriptionId: string, - resourceGroupName: string, - instanceName: string, - brokerName: string, - options: BrokerAuthenticationListByResourceGroupOptionalParams = { - requestOptions: {}, - }, -): StreamableMethod { - return context - .path( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/brokers/{brokerName}/authentications", - subscriptionId, - resourceGroupName, - instanceName, - brokerName, - ) - .get({ ...operationOptionsToRequestParameters(options) }); -} - -export async function _brokerAuthenticationListByResourceGroupDeserialize( - result: PathUncheckedResponse, -): Promise<_BrokerAuthenticationResourceListResult> { - const expectedStatuses = ["200"]; - if (!expectedStatuses.includes(result.status)) { - throw createRestError(result); - } - - return _brokerAuthenticationResourceListResultDeserializer(result.body); -} - -/** List BrokerAuthenticationResource resources by BrokerResource */ -export function brokerAuthenticationListByResourceGroup( - context: Client, - subscriptionId: string, - resourceGroupName: string, - instanceName: string, - brokerName: string, - options: BrokerAuthenticationListByResourceGroupOptionalParams = { - requestOptions: {}, - }, -): PagedAsyncIterableIterator { - return buildPagedAsyncIterator( - context, - () => - _brokerAuthenticationListByResourceGroupSend( - context, - subscriptionId, - resourceGroupName, - instanceName, - brokerName, - options, - ), - _brokerAuthenticationListByResourceGroupDeserialize, - ["200"], - { itemName: "value", nextLinkName: "nextLink" }, - ); -} diff --git a/sdk/iotoperations/arm-iotoperations/src/api/brokerAuthorization/index.ts b/sdk/iotoperations/arm-iotoperations/src/api/brokerAuthorization/index.ts deleted file mode 100644 index 3b881e1ea998..000000000000 --- a/sdk/iotoperations/arm-iotoperations/src/api/brokerAuthorization/index.ts +++ /dev/null @@ -1,281 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { - BrokerAuthorizationCreateOrUpdateOptionalParams, - BrokerAuthorizationDeleteOptionalParams, - BrokerAuthorizationGetOptionalParams, - BrokerAuthorizationListByResourceGroupOptionalParams, - IoTOperationsContext as Client, -} from "../index.js"; -import { - BrokerAuthorizationResource, - brokerAuthorizationResourceSerializer, - brokerAuthorizationResourceDeserializer, - _BrokerAuthorizationResourceListResult, - _brokerAuthorizationResourceListResultDeserializer, -} from "../../models/models.js"; -import { - PagedAsyncIterableIterator, - buildPagedAsyncIterator, -} from "../../static-helpers/pagingHelpers.js"; -import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; -import { - StreamableMethod, - PathUncheckedResponse, - createRestError, - operationOptionsToRequestParameters, -} from "@azure-rest/core-client"; -import { PollerLike, OperationState } from "@azure/core-lro"; - -export function _brokerAuthorizationGetSend( - context: Client, - subscriptionId: string, - resourceGroupName: string, - instanceName: string, - brokerName: string, - authorizationName: string, - options: BrokerAuthorizationGetOptionalParams = { requestOptions: {} }, -): StreamableMethod { - return context - .path( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/brokers/{brokerName}/authorizations/{authorizationName}", - subscriptionId, - resourceGroupName, - instanceName, - brokerName, - authorizationName, - ) - .get({ ...operationOptionsToRequestParameters(options) }); -} - -export async function _brokerAuthorizationGetDeserialize( - result: PathUncheckedResponse, -): Promise { - const expectedStatuses = ["200"]; - if (!expectedStatuses.includes(result.status)) { - throw createRestError(result); - } - - return brokerAuthorizationResourceDeserializer(result.body); -} - -/** Get a BrokerAuthorizationResource */ -export async function brokerAuthorizationGet( - context: Client, - subscriptionId: string, - resourceGroupName: string, - instanceName: string, - brokerName: string, - authorizationName: string, - options: BrokerAuthorizationGetOptionalParams = { requestOptions: {} }, -): Promise { - const result = await _brokerAuthorizationGetSend( - context, - subscriptionId, - resourceGroupName, - instanceName, - brokerName, - authorizationName, - options, - ); - return _brokerAuthorizationGetDeserialize(result); -} - -export function _brokerAuthorizationCreateOrUpdateSend( - context: Client, - subscriptionId: string, - resourceGroupName: string, - instanceName: string, - brokerName: string, - authorizationName: string, - resource: BrokerAuthorizationResource, - options: BrokerAuthorizationCreateOrUpdateOptionalParams = { - requestOptions: {}, - }, -): StreamableMethod { - return context - .path( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/brokers/{brokerName}/authorizations/{authorizationName}", - subscriptionId, - resourceGroupName, - instanceName, - brokerName, - authorizationName, - ) - .put({ - ...operationOptionsToRequestParameters(options), - body: brokerAuthorizationResourceSerializer(resource), - }); -} - -export async function _brokerAuthorizationCreateOrUpdateDeserialize( - result: PathUncheckedResponse, -): Promise { - const expectedStatuses = ["200", "201"]; - if (!expectedStatuses.includes(result.status)) { - throw createRestError(result); - } - - return brokerAuthorizationResourceDeserializer(result.body); -} - -/** Create a BrokerAuthorizationResource */ -export function brokerAuthorizationCreateOrUpdate( - context: Client, - subscriptionId: string, - resourceGroupName: string, - instanceName: string, - brokerName: string, - authorizationName: string, - resource: BrokerAuthorizationResource, - options: BrokerAuthorizationCreateOrUpdateOptionalParams = { - requestOptions: {}, - }, -): PollerLike, BrokerAuthorizationResource> { - return getLongRunningPoller( - context, - _brokerAuthorizationCreateOrUpdateDeserialize, - ["200", "201"], - { - updateIntervalInMs: options?.updateIntervalInMs, - abortSignal: options?.abortSignal, - getInitialResponse: () => - _brokerAuthorizationCreateOrUpdateSend( - context, - subscriptionId, - resourceGroupName, - instanceName, - brokerName, - authorizationName, - resource, - options, - ), - resourceLocationConfig: "azure-async-operation", - }, - ) as PollerLike, BrokerAuthorizationResource>; -} - -export function _brokerAuthorizationDeleteSend( - context: Client, - subscriptionId: string, - resourceGroupName: string, - instanceName: string, - brokerName: string, - authorizationName: string, - options: BrokerAuthorizationDeleteOptionalParams = { requestOptions: {} }, -): StreamableMethod { - return context - .path( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/brokers/{brokerName}/authorizations/{authorizationName}", - subscriptionId, - resourceGroupName, - instanceName, - brokerName, - authorizationName, - ) - .delete({ ...operationOptionsToRequestParameters(options) }); -} - -export async function _brokerAuthorizationDeleteDeserialize( - result: PathUncheckedResponse, -): Promise { - const expectedStatuses = ["202", "204", "200"]; - if (!expectedStatuses.includes(result.status)) { - throw createRestError(result); - } - - return; -} - -/** Delete a BrokerAuthorizationResource */ -export function brokerAuthorizationDelete( - context: Client, - subscriptionId: string, - resourceGroupName: string, - instanceName: string, - brokerName: string, - authorizationName: string, - options: BrokerAuthorizationDeleteOptionalParams = { requestOptions: {} }, -): PollerLike, void> { - return getLongRunningPoller( - context, - _brokerAuthorizationDeleteDeserialize, - ["202", "204", "200"], - { - updateIntervalInMs: options?.updateIntervalInMs, - abortSignal: options?.abortSignal, - getInitialResponse: () => - _brokerAuthorizationDeleteSend( - context, - subscriptionId, - resourceGroupName, - instanceName, - brokerName, - authorizationName, - options, - ), - resourceLocationConfig: "location", - }, - ) as PollerLike, void>; -} - -export function _brokerAuthorizationListByResourceGroupSend( - context: Client, - subscriptionId: string, - resourceGroupName: string, - instanceName: string, - brokerName: string, - options: BrokerAuthorizationListByResourceGroupOptionalParams = { - requestOptions: {}, - }, -): StreamableMethod { - return context - .path( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/brokers/{brokerName}/authorizations", - subscriptionId, - resourceGroupName, - instanceName, - brokerName, - ) - .get({ ...operationOptionsToRequestParameters(options) }); -} - -export async function _brokerAuthorizationListByResourceGroupDeserialize( - result: PathUncheckedResponse, -): Promise<_BrokerAuthorizationResourceListResult> { - const expectedStatuses = ["200"]; - if (!expectedStatuses.includes(result.status)) { - throw createRestError(result); - } - - return _brokerAuthorizationResourceListResultDeserializer(result.body); -} - -/** List BrokerAuthorizationResource resources by BrokerResource */ -export function brokerAuthorizationListByResourceGroup( - context: Client, - subscriptionId: string, - resourceGroupName: string, - instanceName: string, - brokerName: string, - options: BrokerAuthorizationListByResourceGroupOptionalParams = { - requestOptions: {}, - }, -): PagedAsyncIterableIterator { - return buildPagedAsyncIterator( - context, - () => - _brokerAuthorizationListByResourceGroupSend( - context, - subscriptionId, - resourceGroupName, - instanceName, - brokerName, - options, - ), - _brokerAuthorizationListByResourceGroupDeserialize, - ["200"], - { itemName: "value", nextLinkName: "nextLink" }, - ); -} diff --git a/sdk/iotoperations/arm-iotoperations/src/api/brokerListener/index.ts b/sdk/iotoperations/arm-iotoperations/src/api/brokerListener/index.ts deleted file mode 100644 index 30186d1b7d74..000000000000 --- a/sdk/iotoperations/arm-iotoperations/src/api/brokerListener/index.ts +++ /dev/null @@ -1,267 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { - BrokerListenerCreateOrUpdateOptionalParams, - BrokerListenerDeleteOptionalParams, - BrokerListenerGetOptionalParams, - BrokerListenerListByResourceGroupOptionalParams, - IoTOperationsContext as Client, -} from "../index.js"; -import { - BrokerListenerResource, - brokerListenerResourceSerializer, - brokerListenerResourceDeserializer, - _BrokerListenerResourceListResult, - _brokerListenerResourceListResultDeserializer, -} from "../../models/models.js"; -import { - PagedAsyncIterableIterator, - buildPagedAsyncIterator, -} from "../../static-helpers/pagingHelpers.js"; -import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; -import { - StreamableMethod, - PathUncheckedResponse, - createRestError, - operationOptionsToRequestParameters, -} from "@azure-rest/core-client"; -import { PollerLike, OperationState } from "@azure/core-lro"; - -export function _brokerListenerGetSend( - context: Client, - subscriptionId: string, - resourceGroupName: string, - instanceName: string, - brokerName: string, - listenerName: string, - options: BrokerListenerGetOptionalParams = { requestOptions: {} }, -): StreamableMethod { - return context - .path( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/brokers/{brokerName}/listeners/{listenerName}", - subscriptionId, - resourceGroupName, - instanceName, - brokerName, - listenerName, - ) - .get({ ...operationOptionsToRequestParameters(options) }); -} - -export async function _brokerListenerGetDeserialize( - result: PathUncheckedResponse, -): Promise { - const expectedStatuses = ["200"]; - if (!expectedStatuses.includes(result.status)) { - throw createRestError(result); - } - - return brokerListenerResourceDeserializer(result.body); -} - -/** Get a BrokerListenerResource */ -export async function brokerListenerGet( - context: Client, - subscriptionId: string, - resourceGroupName: string, - instanceName: string, - brokerName: string, - listenerName: string, - options: BrokerListenerGetOptionalParams = { requestOptions: {} }, -): Promise { - const result = await _brokerListenerGetSend( - context, - subscriptionId, - resourceGroupName, - instanceName, - brokerName, - listenerName, - options, - ); - return _brokerListenerGetDeserialize(result); -} - -export function _brokerListenerCreateOrUpdateSend( - context: Client, - subscriptionId: string, - resourceGroupName: string, - instanceName: string, - brokerName: string, - listenerName: string, - resource: BrokerListenerResource, - options: BrokerListenerCreateOrUpdateOptionalParams = { requestOptions: {} }, -): StreamableMethod { - return context - .path( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/brokers/{brokerName}/listeners/{listenerName}", - subscriptionId, - resourceGroupName, - instanceName, - brokerName, - listenerName, - ) - .put({ - ...operationOptionsToRequestParameters(options), - body: brokerListenerResourceSerializer(resource), - }); -} - -export async function _brokerListenerCreateOrUpdateDeserialize( - result: PathUncheckedResponse, -): Promise { - const expectedStatuses = ["200", "201"]; - if (!expectedStatuses.includes(result.status)) { - throw createRestError(result); - } - - return brokerListenerResourceDeserializer(result.body); -} - -/** Create a BrokerListenerResource */ -export function brokerListenerCreateOrUpdate( - context: Client, - subscriptionId: string, - resourceGroupName: string, - instanceName: string, - brokerName: string, - listenerName: string, - 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>; -} - -export function _brokerListenerDeleteSend( - context: Client, - subscriptionId: string, - resourceGroupName: string, - instanceName: string, - brokerName: string, - listenerName: string, - options: BrokerListenerDeleteOptionalParams = { requestOptions: {} }, -): StreamableMethod { - return context - .path( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/brokers/{brokerName}/listeners/{listenerName}", - subscriptionId, - resourceGroupName, - instanceName, - brokerName, - listenerName, - ) - .delete({ ...operationOptionsToRequestParameters(options) }); -} - -export async function _brokerListenerDeleteDeserialize( - result: PathUncheckedResponse, -): Promise { - const expectedStatuses = ["202", "204", "200"]; - if (!expectedStatuses.includes(result.status)) { - throw createRestError(result); - } - - return; -} - -/** Delete a BrokerListenerResource */ -export function brokerListenerDelete( - context: Client, - subscriptionId: string, - resourceGroupName: string, - instanceName: string, - brokerName: string, - 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>; -} - -export function _brokerListenerListByResourceGroupSend( - context: Client, - subscriptionId: string, - resourceGroupName: string, - instanceName: string, - brokerName: string, - options: BrokerListenerListByResourceGroupOptionalParams = { - requestOptions: {}, - }, -): StreamableMethod { - return context - .path( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/brokers/{brokerName}/listeners", - subscriptionId, - resourceGroupName, - instanceName, - brokerName, - ) - .get({ ...operationOptionsToRequestParameters(options) }); -} - -export async function _brokerListenerListByResourceGroupDeserialize( - result: PathUncheckedResponse, -): Promise<_BrokerListenerResourceListResult> { - const expectedStatuses = ["200"]; - if (!expectedStatuses.includes(result.status)) { - throw createRestError(result); - } - - return _brokerListenerResourceListResultDeserializer(result.body); -} - -/** List BrokerListenerResource resources by BrokerResource */ -export function brokerListenerListByResourceGroup( - context: Client, - subscriptionId: string, - resourceGroupName: string, - instanceName: string, - brokerName: string, - options: BrokerListenerListByResourceGroupOptionalParams = { - requestOptions: {}, - }, -): PagedAsyncIterableIterator { - return buildPagedAsyncIterator( - context, - () => - _brokerListenerListByResourceGroupSend( - context, - subscriptionId, - resourceGroupName, - instanceName, - brokerName, - options, - ), - _brokerListenerListByResourceGroupDeserialize, - ["200"], - { itemName: "value", nextLinkName: "nextLink" }, - ); -} diff --git a/sdk/iotoperations/arm-iotoperations/src/api/dataflow/index.ts b/sdk/iotoperations/arm-iotoperations/src/api/dataflow/index.ts deleted file mode 100644 index df01cd457b54..000000000000 --- a/sdk/iotoperations/arm-iotoperations/src/api/dataflow/index.ts +++ /dev/null @@ -1,261 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { - IoTOperationsContext as Client, - DataflowCreateOrUpdateOptionalParams, - DataflowDeleteOptionalParams, - DataflowGetOptionalParams, - DataflowListByResourceGroupOptionalParams, -} from "../index.js"; -import { - DataflowResource, - dataflowResourceSerializer, - dataflowResourceDeserializer, - _DataflowResourceListResult, - _dataflowResourceListResultDeserializer, -} from "../../models/models.js"; -import { - PagedAsyncIterableIterator, - buildPagedAsyncIterator, -} from "../../static-helpers/pagingHelpers.js"; -import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; -import { - StreamableMethod, - PathUncheckedResponse, - createRestError, - operationOptionsToRequestParameters, -} from "@azure-rest/core-client"; -import { PollerLike, OperationState } from "@azure/core-lro"; - -export function _dataflowGetSend( - context: Client, - subscriptionId: string, - resourceGroupName: string, - instanceName: string, - dataflowProfileName: string, - dataflowName: string, - options: DataflowGetOptionalParams = { requestOptions: {} }, -): StreamableMethod { - return context - .path( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/dataflowProfiles/{dataflowProfileName}/dataflows/{dataflowName}", - subscriptionId, - resourceGroupName, - instanceName, - dataflowProfileName, - dataflowName, - ) - .get({ ...operationOptionsToRequestParameters(options) }); -} - -export async function _dataflowGetDeserialize( - result: PathUncheckedResponse, -): Promise { - const expectedStatuses = ["200"]; - if (!expectedStatuses.includes(result.status)) { - throw createRestError(result); - } - - return dataflowResourceDeserializer(result.body); -} - -/** Get a DataflowResource */ -export async function dataflowGet( - context: Client, - subscriptionId: string, - resourceGroupName: string, - instanceName: string, - dataflowProfileName: string, - dataflowName: string, - options: DataflowGetOptionalParams = { requestOptions: {} }, -): Promise { - const result = await _dataflowGetSend( - context, - subscriptionId, - resourceGroupName, - instanceName, - dataflowProfileName, - dataflowName, - options, - ); - return _dataflowGetDeserialize(result); -} - -export function _dataflowCreateOrUpdateSend( - context: Client, - subscriptionId: string, - resourceGroupName: string, - instanceName: string, - dataflowProfileName: string, - dataflowName: string, - resource: DataflowResource, - options: DataflowCreateOrUpdateOptionalParams = { requestOptions: {} }, -): StreamableMethod { - return context - .path( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/dataflowProfiles/{dataflowProfileName}/dataflows/{dataflowName}", - subscriptionId, - resourceGroupName, - instanceName, - dataflowProfileName, - dataflowName, - ) - .put({ - ...operationOptionsToRequestParameters(options), - body: dataflowResourceSerializer(resource), - }); -} - -export async function _dataflowCreateOrUpdateDeserialize( - result: PathUncheckedResponse, -): Promise { - const expectedStatuses = ["200", "201"]; - if (!expectedStatuses.includes(result.status)) { - throw createRestError(result); - } - - return dataflowResourceDeserializer(result.body); -} - -/** Create a DataflowResource */ -export function dataflowCreateOrUpdate( - context: Client, - subscriptionId: string, - resourceGroupName: string, - instanceName: string, - dataflowProfileName: string, - dataflowName: string, - 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>; -} - -export function _dataflowDeleteSend( - context: Client, - subscriptionId: string, - resourceGroupName: string, - instanceName: string, - dataflowProfileName: string, - dataflowName: string, - options: DataflowDeleteOptionalParams = { requestOptions: {} }, -): StreamableMethod { - return context - .path( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/dataflowProfiles/{dataflowProfileName}/dataflows/{dataflowName}", - subscriptionId, - resourceGroupName, - instanceName, - dataflowProfileName, - dataflowName, - ) - .delete({ ...operationOptionsToRequestParameters(options) }); -} - -export async function _dataflowDeleteDeserialize(result: PathUncheckedResponse): Promise { - const expectedStatuses = ["202", "204", "200"]; - if (!expectedStatuses.includes(result.status)) { - throw createRestError(result); - } - - return; -} - -/** Delete a DataflowResource */ -export function dataflowDelete( - context: Client, - subscriptionId: string, - resourceGroupName: string, - instanceName: string, - dataflowProfileName: string, - 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>; -} - -export function _dataflowListByResourceGroupSend( - context: Client, - subscriptionId: string, - resourceGroupName: string, - instanceName: string, - dataflowProfileName: string, - options: DataflowListByResourceGroupOptionalParams = { requestOptions: {} }, -): StreamableMethod { - return context - .path( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/dataflowProfiles/{dataflowProfileName}/dataflows", - subscriptionId, - resourceGroupName, - instanceName, - dataflowProfileName, - ) - .get({ ...operationOptionsToRequestParameters(options) }); -} - -export async function _dataflowListByResourceGroupDeserialize( - result: PathUncheckedResponse, -): Promise<_DataflowResourceListResult> { - const expectedStatuses = ["200"]; - if (!expectedStatuses.includes(result.status)) { - throw createRestError(result); - } - - return _dataflowResourceListResultDeserializer(result.body); -} - -/** List DataflowResource resources by DataflowProfileResource */ -export function dataflowListByResourceGroup( - context: Client, - subscriptionId: string, - resourceGroupName: string, - instanceName: string, - dataflowProfileName: string, - options: DataflowListByResourceGroupOptionalParams = { requestOptions: {} }, -): PagedAsyncIterableIterator { - return buildPagedAsyncIterator( - context, - () => - _dataflowListByResourceGroupSend( - context, - subscriptionId, - resourceGroupName, - instanceName, - dataflowProfileName, - options, - ), - _dataflowListByResourceGroupDeserialize, - ["200"], - { itemName: "value", nextLinkName: "nextLink" }, - ); -} diff --git a/sdk/iotoperations/arm-iotoperations/src/api/dataflowEndpoint/index.ts b/sdk/iotoperations/arm-iotoperations/src/api/dataflowEndpoint/index.ts deleted file mode 100644 index dfc6de5775c0..000000000000 --- a/sdk/iotoperations/arm-iotoperations/src/api/dataflowEndpoint/index.ts +++ /dev/null @@ -1,255 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { - IoTOperationsContext as Client, - DataflowEndpointCreateOrUpdateOptionalParams, - DataflowEndpointDeleteOptionalParams, - DataflowEndpointGetOptionalParams, - DataflowEndpointListByResourceGroupOptionalParams, -} from "../index.js"; -import { - DataflowEndpointResource, - dataflowEndpointResourceSerializer, - dataflowEndpointResourceDeserializer, - _DataflowEndpointResourceListResult, - _dataflowEndpointResourceListResultDeserializer, -} from "../../models/models.js"; -import { - PagedAsyncIterableIterator, - buildPagedAsyncIterator, -} from "../../static-helpers/pagingHelpers.js"; -import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; -import { - StreamableMethod, - PathUncheckedResponse, - createRestError, - operationOptionsToRequestParameters, -} from "@azure-rest/core-client"; -import { PollerLike, OperationState } from "@azure/core-lro"; - -export function _dataflowEndpointGetSend( - context: Client, - subscriptionId: string, - resourceGroupName: string, - instanceName: string, - dataflowEndpointName: string, - options: DataflowEndpointGetOptionalParams = { requestOptions: {} }, -): StreamableMethod { - return context - .path( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/dataflowEndpoints/{dataflowEndpointName}", - subscriptionId, - resourceGroupName, - instanceName, - dataflowEndpointName, - ) - .get({ ...operationOptionsToRequestParameters(options) }); -} - -export async function _dataflowEndpointGetDeserialize( - result: PathUncheckedResponse, -): Promise { - const expectedStatuses = ["200"]; - if (!expectedStatuses.includes(result.status)) { - throw createRestError(result); - } - - return dataflowEndpointResourceDeserializer(result.body); -} - -/** Get a DataflowEndpointResource */ -export async function dataflowEndpointGet( - context: Client, - subscriptionId: string, - resourceGroupName: string, - instanceName: string, - dataflowEndpointName: string, - options: DataflowEndpointGetOptionalParams = { requestOptions: {} }, -): Promise { - const result = await _dataflowEndpointGetSend( - context, - subscriptionId, - resourceGroupName, - instanceName, - dataflowEndpointName, - options, - ); - return _dataflowEndpointGetDeserialize(result); -} - -export function _dataflowEndpointCreateOrUpdateSend( - context: Client, - subscriptionId: string, - resourceGroupName: string, - instanceName: string, - dataflowEndpointName: string, - resource: DataflowEndpointResource, - options: DataflowEndpointCreateOrUpdateOptionalParams = { - requestOptions: {}, - }, -): StreamableMethod { - return context - .path( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/dataflowEndpoints/{dataflowEndpointName}", - subscriptionId, - resourceGroupName, - instanceName, - dataflowEndpointName, - ) - .put({ - ...operationOptionsToRequestParameters(options), - body: dataflowEndpointResourceSerializer(resource), - }); -} - -export async function _dataflowEndpointCreateOrUpdateDeserialize( - result: PathUncheckedResponse, -): Promise { - const expectedStatuses = ["200", "201"]; - if (!expectedStatuses.includes(result.status)) { - throw createRestError(result); - } - - return dataflowEndpointResourceDeserializer(result.body); -} - -/** Create a DataflowEndpointResource */ -export function dataflowEndpointCreateOrUpdate( - context: Client, - subscriptionId: string, - resourceGroupName: string, - instanceName: string, - dataflowEndpointName: string, - resource: DataflowEndpointResource, - 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>; -} - -export function _dataflowEndpointDeleteSend( - context: Client, - subscriptionId: string, - resourceGroupName: string, - instanceName: string, - dataflowEndpointName: string, - options: DataflowEndpointDeleteOptionalParams = { requestOptions: {} }, -): StreamableMethod { - return context - .path( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/dataflowEndpoints/{dataflowEndpointName}", - subscriptionId, - resourceGroupName, - instanceName, - dataflowEndpointName, - ) - .delete({ ...operationOptionsToRequestParameters(options) }); -} - -export async function _dataflowEndpointDeleteDeserialize( - result: PathUncheckedResponse, -): Promise { - const expectedStatuses = ["202", "204", "200"]; - if (!expectedStatuses.includes(result.status)) { - throw createRestError(result); - } - - return; -} - -/** Delete a DataflowEndpointResource */ -export function dataflowEndpointDelete( - context: Client, - subscriptionId: string, - resourceGroupName: string, - instanceName: string, - 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>; -} - -export function _dataflowEndpointListByResourceGroupSend( - context: Client, - subscriptionId: string, - resourceGroupName: string, - instanceName: string, - options: DataflowEndpointListByResourceGroupOptionalParams = { - requestOptions: {}, - }, -): StreamableMethod { - return context - .path( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/dataflowEndpoints", - subscriptionId, - resourceGroupName, - instanceName, - ) - .get({ ...operationOptionsToRequestParameters(options) }); -} - -export async function _dataflowEndpointListByResourceGroupDeserialize( - result: PathUncheckedResponse, -): Promise<_DataflowEndpointResourceListResult> { - const expectedStatuses = ["200"]; - if (!expectedStatuses.includes(result.status)) { - throw createRestError(result); - } - - return _dataflowEndpointResourceListResultDeserializer(result.body); -} - -/** List DataflowEndpointResource resources by InstanceResource */ -export function dataflowEndpointListByResourceGroup( - context: Client, - subscriptionId: string, - resourceGroupName: string, - instanceName: string, - options: DataflowEndpointListByResourceGroupOptionalParams = { - requestOptions: {}, - }, -): PagedAsyncIterableIterator { - return buildPagedAsyncIterator( - context, - () => - _dataflowEndpointListByResourceGroupSend( - context, - subscriptionId, - resourceGroupName, - instanceName, - options, - ), - _dataflowEndpointListByResourceGroupDeserialize, - ["200"], - { itemName: "value", nextLinkName: "nextLink" }, - ); -} diff --git a/sdk/iotoperations/arm-iotoperations/src/api/dataflowProfile/index.ts b/sdk/iotoperations/arm-iotoperations/src/api/dataflowProfile/index.ts deleted file mode 100644 index 6832042eb92c..000000000000 --- a/sdk/iotoperations/arm-iotoperations/src/api/dataflowProfile/index.ts +++ /dev/null @@ -1,251 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { - IoTOperationsContext as Client, - DataflowProfileCreateOrUpdateOptionalParams, - DataflowProfileDeleteOptionalParams, - DataflowProfileGetOptionalParams, - DataflowProfileListByResourceGroupOptionalParams, -} from "../index.js"; -import { - DataflowProfileResource, - dataflowProfileResourceSerializer, - dataflowProfileResourceDeserializer, - _DataflowProfileResourceListResult, - _dataflowProfileResourceListResultDeserializer, -} from "../../models/models.js"; -import { - PagedAsyncIterableIterator, - buildPagedAsyncIterator, -} from "../../static-helpers/pagingHelpers.js"; -import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; -import { - StreamableMethod, - PathUncheckedResponse, - createRestError, - operationOptionsToRequestParameters, -} from "@azure-rest/core-client"; -import { PollerLike, OperationState } from "@azure/core-lro"; - -export function _dataflowProfileGetSend( - context: Client, - subscriptionId: string, - resourceGroupName: string, - instanceName: string, - dataflowProfileName: string, - options: DataflowProfileGetOptionalParams = { requestOptions: {} }, -): StreamableMethod { - return context - .path( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/dataflowProfiles/{dataflowProfileName}", - subscriptionId, - resourceGroupName, - instanceName, - dataflowProfileName, - ) - .get({ ...operationOptionsToRequestParameters(options) }); -} - -export async function _dataflowProfileGetDeserialize( - result: PathUncheckedResponse, -): Promise { - const expectedStatuses = ["200"]; - if (!expectedStatuses.includes(result.status)) { - throw createRestError(result); - } - - return dataflowProfileResourceDeserializer(result.body); -} - -/** Get a DataflowProfileResource */ -export async function dataflowProfileGet( - context: Client, - subscriptionId: string, - resourceGroupName: string, - instanceName: string, - dataflowProfileName: string, - options: DataflowProfileGetOptionalParams = { requestOptions: {} }, -): Promise { - const result = await _dataflowProfileGetSend( - context, - subscriptionId, - resourceGroupName, - instanceName, - dataflowProfileName, - options, - ); - return _dataflowProfileGetDeserialize(result); -} - -export function _dataflowProfileCreateOrUpdateSend( - context: Client, - subscriptionId: string, - resourceGroupName: string, - instanceName: string, - dataflowProfileName: string, - resource: DataflowProfileResource, - options: DataflowProfileCreateOrUpdateOptionalParams = { requestOptions: {} }, -): StreamableMethod { - return context - .path( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/dataflowProfiles/{dataflowProfileName}", - subscriptionId, - resourceGroupName, - instanceName, - dataflowProfileName, - ) - .put({ - ...operationOptionsToRequestParameters(options), - body: dataflowProfileResourceSerializer(resource), - }); -} - -export async function _dataflowProfileCreateOrUpdateDeserialize( - result: PathUncheckedResponse, -): Promise { - const expectedStatuses = ["200", "201"]; - if (!expectedStatuses.includes(result.status)) { - throw createRestError(result); - } - - return dataflowProfileResourceDeserializer(result.body); -} - -/** Create a DataflowProfileResource */ -export function dataflowProfileCreateOrUpdate( - context: Client, - subscriptionId: string, - resourceGroupName: string, - instanceName: string, - 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>; -} - -export function _dataflowProfileDeleteSend( - context: Client, - subscriptionId: string, - resourceGroupName: string, - instanceName: string, - dataflowProfileName: string, - options: DataflowProfileDeleteOptionalParams = { requestOptions: {} }, -): StreamableMethod { - return context - .path( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/dataflowProfiles/{dataflowProfileName}", - subscriptionId, - resourceGroupName, - instanceName, - dataflowProfileName, - ) - .delete({ ...operationOptionsToRequestParameters(options) }); -} - -export async function _dataflowProfileDeleteDeserialize( - result: PathUncheckedResponse, -): Promise { - const expectedStatuses = ["202", "204", "200"]; - if (!expectedStatuses.includes(result.status)) { - throw createRestError(result); - } - - return; -} - -/** Delete a DataflowProfileResource */ -export function dataflowProfileDelete( - context: Client, - subscriptionId: string, - resourceGroupName: string, - instanceName: string, - 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>; -} - -export function _dataflowProfileListByResourceGroupSend( - context: Client, - subscriptionId: string, - resourceGroupName: string, - instanceName: string, - options: DataflowProfileListByResourceGroupOptionalParams = { - requestOptions: {}, - }, -): StreamableMethod { - return context - .path( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/dataflowProfiles", - subscriptionId, - resourceGroupName, - instanceName, - ) - .get({ ...operationOptionsToRequestParameters(options) }); -} - -export async function _dataflowProfileListByResourceGroupDeserialize( - result: PathUncheckedResponse, -): Promise<_DataflowProfileResourceListResult> { - const expectedStatuses = ["200"]; - if (!expectedStatuses.includes(result.status)) { - throw createRestError(result); - } - - return _dataflowProfileResourceListResultDeserializer(result.body); -} - -/** List DataflowProfileResource resources by InstanceResource */ -export function dataflowProfileListByResourceGroup( - context: Client, - subscriptionId: string, - resourceGroupName: string, - instanceName: string, - options: DataflowProfileListByResourceGroupOptionalParams = { - requestOptions: {}, - }, -): PagedAsyncIterableIterator { - return buildPagedAsyncIterator( - context, - () => - _dataflowProfileListByResourceGroupSend( - context, - subscriptionId, - resourceGroupName, - instanceName, - options, - ), - _dataflowProfileListByResourceGroupDeserialize, - ["200"], - { itemName: "value", nextLinkName: "nextLink" }, - ); -} diff --git a/sdk/iotoperations/arm-iotoperations/src/api/index.ts b/sdk/iotoperations/arm-iotoperations/src/api/index.ts deleted file mode 100644 index 2e2a5553245f..000000000000 --- a/sdk/iotoperations/arm-iotoperations/src/api/index.ts +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -export { - createIoTOperations, - IoTOperationsContext, - IoTOperationsClientOptionalParams, -} from "./ioTOperationsContext.js"; -export { - OperationsListOptionalParams, - InstanceGetOptionalParams, - InstanceCreateOrUpdateOptionalParams, - InstanceUpdateOptionalParams, - InstanceDeleteOptionalParams, - InstanceListByResourceGroupOptionalParams, - InstanceListBySubscriptionOptionalParams, - BrokerGetOptionalParams, - BrokerCreateOrUpdateOptionalParams, - BrokerDeleteOptionalParams, - BrokerListByResourceGroupOptionalParams, - BrokerListenerGetOptionalParams, - BrokerListenerCreateOrUpdateOptionalParams, - BrokerListenerDeleteOptionalParams, - BrokerListenerListByResourceGroupOptionalParams, - BrokerAuthenticationGetOptionalParams, - BrokerAuthenticationCreateOrUpdateOptionalParams, - BrokerAuthenticationDeleteOptionalParams, - BrokerAuthenticationListByResourceGroupOptionalParams, - BrokerAuthorizationGetOptionalParams, - BrokerAuthorizationCreateOrUpdateOptionalParams, - BrokerAuthorizationDeleteOptionalParams, - BrokerAuthorizationListByResourceGroupOptionalParams, - DataflowProfileGetOptionalParams, - DataflowProfileCreateOrUpdateOptionalParams, - DataflowProfileDeleteOptionalParams, - DataflowProfileListByResourceGroupOptionalParams, - DataflowGetOptionalParams, - DataflowCreateOrUpdateOptionalParams, - DataflowDeleteOptionalParams, - DataflowListByResourceGroupOptionalParams, - DataflowEndpointGetOptionalParams, - DataflowEndpointCreateOrUpdateOptionalParams, - DataflowEndpointDeleteOptionalParams, - DataflowEndpointListByResourceGroupOptionalParams, -} from "./options.js"; -export { - brokerGet, - brokerCreateOrUpdate, - brokerDelete, - brokerListByResourceGroup, -} from "./broker/index.js"; -export { - brokerAuthenticationGet, - brokerAuthenticationCreateOrUpdate, - brokerAuthenticationDelete, - brokerAuthenticationListByResourceGroup, -} from "./brokerAuthentication/index.js"; -export { - brokerAuthorizationGet, - brokerAuthorizationCreateOrUpdate, - brokerAuthorizationDelete, - brokerAuthorizationListByResourceGroup, -} from "./brokerAuthorization/index.js"; -export { - brokerListenerGet, - brokerListenerCreateOrUpdate, - brokerListenerDelete, - brokerListenerListByResourceGroup, -} from "./brokerListener/index.js"; -export { - dataflowGet, - dataflowCreateOrUpdate, - dataflowDelete, - dataflowListByResourceGroup, -} from "./dataflow/index.js"; -export { - dataflowEndpointGet, - dataflowEndpointCreateOrUpdate, - dataflowEndpointDelete, - dataflowEndpointListByResourceGroup, -} from "./dataflowEndpoint/index.js"; -export { - dataflowProfileGet, - dataflowProfileCreateOrUpdate, - dataflowProfileDelete, - dataflowProfileListByResourceGroup, -} from "./dataflowProfile/index.js"; -export { - instanceGet, - instanceCreateOrUpdate, - instanceUpdate, - instanceDelete, - instanceListByResourceGroup, - instanceListBySubscription, -} from "./instance/index.js"; -export { operationsList } from "./operations/index.js"; diff --git a/sdk/iotoperations/arm-iotoperations/src/api/instance/index.ts b/sdk/iotoperations/arm-iotoperations/src/api/instance/index.ts deleted file mode 100644 index 14d6a5cd9860..000000000000 --- a/sdk/iotoperations/arm-iotoperations/src/api/instance/index.ts +++ /dev/null @@ -1,312 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { - IoTOperationsContext as Client, - InstanceCreateOrUpdateOptionalParams, - InstanceDeleteOptionalParams, - InstanceGetOptionalParams, - InstanceListByResourceGroupOptionalParams, - InstanceListBySubscriptionOptionalParams, - InstanceUpdateOptionalParams, -} from "../index.js"; -import { - InstanceResource, - instanceResourceSerializer, - instanceResourceDeserializer, - InstancePatchModel, - instancePatchModelSerializer, - _InstanceResourceListResult, - _instanceResourceListResultDeserializer, -} from "../../models/models.js"; -import { - PagedAsyncIterableIterator, - buildPagedAsyncIterator, -} from "../../static-helpers/pagingHelpers.js"; -import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; -import { - StreamableMethod, - PathUncheckedResponse, - createRestError, - operationOptionsToRequestParameters, -} from "@azure-rest/core-client"; -import { PollerLike, OperationState } from "@azure/core-lro"; - -export function _instanceGetSend( - context: Client, - subscriptionId: string, - resourceGroupName: string, - instanceName: string, - options: InstanceGetOptionalParams = { requestOptions: {} }, -): StreamableMethod { - return context - .path( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}", - subscriptionId, - resourceGroupName, - instanceName, - ) - .get({ ...operationOptionsToRequestParameters(options) }); -} - -export async function _instanceGetDeserialize( - result: PathUncheckedResponse, -): Promise { - const expectedStatuses = ["200"]; - if (!expectedStatuses.includes(result.status)) { - throw createRestError(result); - } - - return instanceResourceDeserializer(result.body); -} - -/** Get a InstanceResource */ -export async function instanceGet( - context: Client, - subscriptionId: string, - resourceGroupName: string, - instanceName: string, - options: InstanceGetOptionalParams = { requestOptions: {} }, -): Promise { - const result = await _instanceGetSend( - context, - subscriptionId, - resourceGroupName, - instanceName, - options, - ); - return _instanceGetDeserialize(result); -} - -export function _instanceCreateOrUpdateSend( - context: Client, - subscriptionId: string, - resourceGroupName: string, - instanceName: string, - resource: InstanceResource, - options: InstanceCreateOrUpdateOptionalParams = { requestOptions: {} }, -): StreamableMethod { - return context - .path( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}", - subscriptionId, - resourceGroupName, - instanceName, - ) - .put({ - ...operationOptionsToRequestParameters(options), - body: instanceResourceSerializer(resource), - }); -} - -export async function _instanceCreateOrUpdateDeserialize( - result: PathUncheckedResponse, -): Promise { - const expectedStatuses = ["200", "201"]; - if (!expectedStatuses.includes(result.status)) { - throw createRestError(result); - } - - return instanceResourceDeserializer(result.body); -} - -/** Create a InstanceResource */ -export function instanceCreateOrUpdate( - context: Client, - subscriptionId: string, - resourceGroupName: string, - instanceName: string, - 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>; -} - -export function _instanceUpdateSend( - context: Client, - subscriptionId: string, - resourceGroupName: string, - instanceName: string, - properties: InstancePatchModel, - options: InstanceUpdateOptionalParams = { requestOptions: {} }, -): StreamableMethod { - return context - .path( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}", - subscriptionId, - resourceGroupName, - instanceName, - ) - .patch({ - ...operationOptionsToRequestParameters(options), - body: instancePatchModelSerializer(properties), - }); -} - -export async function _instanceUpdateDeserialize( - result: PathUncheckedResponse, -): Promise { - const expectedStatuses = ["200"]; - if (!expectedStatuses.includes(result.status)) { - throw createRestError(result); - } - - return instanceResourceDeserializer(result.body); -} - -/** Update a InstanceResource */ -export async function instanceUpdate( - context: Client, - subscriptionId: string, - resourceGroupName: string, - instanceName: string, - properties: InstancePatchModel, - options: InstanceUpdateOptionalParams = { requestOptions: {} }, -): Promise { - const result = await _instanceUpdateSend( - context, - subscriptionId, - resourceGroupName, - instanceName, - properties, - options, - ); - return _instanceUpdateDeserialize(result); -} - -export function _instanceDeleteSend( - context: Client, - subscriptionId: string, - resourceGroupName: string, - instanceName: string, - options: InstanceDeleteOptionalParams = { requestOptions: {} }, -): StreamableMethod { - return context - .path( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}", - subscriptionId, - resourceGroupName, - instanceName, - ) - .delete({ ...operationOptionsToRequestParameters(options) }); -} - -export async function _instanceDeleteDeserialize(result: PathUncheckedResponse): Promise { - const expectedStatuses = ["202", "204", "200"]; - if (!expectedStatuses.includes(result.status)) { - throw createRestError(result); - } - - return; -} - -/** Delete a InstanceResource */ -export function instanceDelete( - context: Client, - subscriptionId: string, - resourceGroupName: string, - 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>; -} - -export function _instanceListByResourceGroupSend( - context: Client, - subscriptionId: string, - resourceGroupName: string, - options: InstanceListByResourceGroupOptionalParams = { requestOptions: {} }, -): StreamableMethod { - return context - .path( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances", - subscriptionId, - resourceGroupName, - ) - .get({ ...operationOptionsToRequestParameters(options) }); -} - -export async function _instanceListByResourceGroupDeserialize( - result: PathUncheckedResponse, -): Promise<_InstanceResourceListResult> { - const expectedStatuses = ["200"]; - if (!expectedStatuses.includes(result.status)) { - throw createRestError(result); - } - - return _instanceResourceListResultDeserializer(result.body); -} - -/** List InstanceResource resources by resource group */ -export function instanceListByResourceGroup( - context: Client, - subscriptionId: string, - resourceGroupName: string, - options: InstanceListByResourceGroupOptionalParams = { requestOptions: {} }, -): PagedAsyncIterableIterator { - return buildPagedAsyncIterator( - context, - () => _instanceListByResourceGroupSend(context, subscriptionId, resourceGroupName, options), - _instanceListByResourceGroupDeserialize, - ["200"], - { itemName: "value", nextLinkName: "nextLink" }, - ); -} - -export function _instanceListBySubscriptionSend( - context: Client, - subscriptionId: string, - options: InstanceListBySubscriptionOptionalParams = { requestOptions: {} }, -): StreamableMethod { - return context - .path( - "/subscriptions/{subscriptionId}/providers/Microsoft.IoTOperations/instances", - subscriptionId, - ) - .get({ ...operationOptionsToRequestParameters(options) }); -} - -export async function _instanceListBySubscriptionDeserialize( - result: PathUncheckedResponse, -): Promise<_InstanceResourceListResult> { - const expectedStatuses = ["200"]; - if (!expectedStatuses.includes(result.status)) { - throw createRestError(result); - } - - return _instanceResourceListResultDeserializer(result.body); -} - -/** List InstanceResource resources by subscription ID */ -export function instanceListBySubscription( - context: Client, - subscriptionId: string, - options: InstanceListBySubscriptionOptionalParams = { requestOptions: {} }, -): PagedAsyncIterableIterator { - return buildPagedAsyncIterator( - context, - () => _instanceListBySubscriptionSend(context, subscriptionId, options), - _instanceListBySubscriptionDeserialize, - ["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 deleted file mode 100644 index 6fb0f66aae57..000000000000 --- a/sdk/iotoperations/arm-iotoperations/src/api/ioTOperationsContext.ts +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// 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"; - -/** Microsoft.IoTOperations Resource Provider management API. */ -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; -} - -/** Microsoft.IoTOperations Resource Provider management API. */ -export function createIoTOperations( - credential: TokenCredential, - options: IoTOperationsClientOptionalParams = {}, -): IoTOperationsContext { - const endpointUrl = options.endpoint ?? options.baseUrl ?? `https://management.azure.com`; - const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix; - const userAgentInfo = `azsdk-js-arm-iotoperations/1.0.0`; - const userAgentPrefix = prefixFromOptions - ? `${prefixFromOptions} azsdk-js-api ${userAgentInfo}` - : `azsdk-js-api ${userAgentInfo}`; - const { apiVersion: _, ...updatedOptions } = { - ...options, - userAgentOptions: { userAgentPrefix }, - loggingOptions: { logger: options.loggingOptions?.logger ?? logger.info }, - credentials: { - scopes: options.credentials?.scopes ?? [`${endpointUrl}/.default`], - }, - }; - const clientContext = getClient(endpointUrl, credential, updatedOptions); - clientContext.pipeline.removePolicy({ name: "ApiVersionPolicy" }); - const apiVersion = options.apiVersion ?? "2024-11-01"; - clientContext.pipeline.addPolicy({ - name: "ClientApiVersionPolicy", - sendRequest: (req, next) => { - // Use the apiVersion defined in request url directly - // Append one if there is no apiVersion and we have one at client options - const url = new URL(req.url); - if (!url.searchParams.get("api-version")) { - req.url = `${req.url}${ - Array.from(url.searchParams.keys()).length > 0 ? "&" : "?" - }api-version=${apiVersion}`; - } - - return next(req); - }, - }); - return clientContext; -} diff --git a/sdk/iotoperations/arm-iotoperations/src/api/operations/index.ts b/sdk/iotoperations/arm-iotoperations/src/api/operations/index.ts deleted file mode 100644 index 62b622776b8b..000000000000 --- a/sdk/iotoperations/arm-iotoperations/src/api/operations/index.ts +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsContext as Client, OperationsListOptionalParams } from "../index.js"; -import { - _OperationListResult, - _operationListResultDeserializer, - Operation, -} from "../../models/models.js"; -import { - PagedAsyncIterableIterator, - buildPagedAsyncIterator, -} from "../../static-helpers/pagingHelpers.js"; -import { - StreamableMethod, - PathUncheckedResponse, - createRestError, - operationOptionsToRequestParameters, -} from "@azure-rest/core-client"; - -export function _operationsListSend( - context: Client, - options: OperationsListOptionalParams = { requestOptions: {} }, -): StreamableMethod { - return context - .path("/providers/Microsoft.IoTOperations/operations") - .get({ ...operationOptionsToRequestParameters(options) }); -} - -export async function _operationsListDeserialize( - result: PathUncheckedResponse, -): Promise<_OperationListResult> { - const expectedStatuses = ["200"]; - if (!expectedStatuses.includes(result.status)) { - throw createRestError(result); - } - - return _operationListResultDeserializer(result.body); -} - -/** List the operations for the provider */ -export function operationsList( - context: Client, - options: OperationsListOptionalParams = { requestOptions: {} }, -): PagedAsyncIterableIterator { - return buildPagedAsyncIterator( - context, - () => _operationsListSend(context, options), - _operationsListDeserialize, - ["200"], - { itemName: "value", nextLinkName: "nextLink" }, - ); -} diff --git a/sdk/iotoperations/arm-iotoperations/src/api/options.ts b/sdk/iotoperations/arm-iotoperations/src/api/options.ts deleted file mode 100644 index e4fb02798e93..000000000000 --- a/sdk/iotoperations/arm-iotoperations/src/api/options.ts +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { OperationOptions } from "@azure-rest/core-client"; - -/** Optional parameters. */ -export interface OperationsListOptionalParams extends OperationOptions {} - -/** Optional parameters. */ -export interface InstanceGetOptionalParams extends OperationOptions {} - -/** Optional parameters. */ -export interface InstanceCreateOrUpdateOptionalParams extends OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; -} - -/** Optional parameters. */ -export interface InstanceUpdateOptionalParams extends OperationOptions {} - -/** Optional parameters. */ -export interface InstanceDeleteOptionalParams extends OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; -} - -/** Optional parameters. */ -export interface InstanceListByResourceGroupOptionalParams extends OperationOptions {} - -/** Optional parameters. */ -export interface InstanceListBySubscriptionOptionalParams extends OperationOptions {} - -/** Optional parameters. */ -export interface BrokerGetOptionalParams extends OperationOptions {} - -/** Optional parameters. */ -export interface BrokerCreateOrUpdateOptionalParams extends OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; -} - -/** Optional parameters. */ -export interface BrokerDeleteOptionalParams extends OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; -} - -/** Optional parameters. */ -export interface BrokerListByResourceGroupOptionalParams extends OperationOptions {} - -/** Optional parameters. */ -export interface BrokerListenerGetOptionalParams extends OperationOptions {} - -/** Optional parameters. */ -export interface BrokerListenerCreateOrUpdateOptionalParams extends OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; -} - -/** Optional parameters. */ -export interface BrokerListenerDeleteOptionalParams extends OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; -} - -/** Optional parameters. */ -export interface BrokerListenerListByResourceGroupOptionalParams extends OperationOptions {} - -/** Optional parameters. */ -export interface BrokerAuthenticationGetOptionalParams extends OperationOptions {} - -/** Optional parameters. */ -export interface BrokerAuthenticationCreateOrUpdateOptionalParams extends OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; -} - -/** Optional parameters. */ -export interface BrokerAuthenticationDeleteOptionalParams extends OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; -} - -/** Optional parameters. */ -export interface BrokerAuthenticationListByResourceGroupOptionalParams extends OperationOptions {} - -/** Optional parameters. */ -export interface BrokerAuthorizationGetOptionalParams extends OperationOptions {} - -/** Optional parameters. */ -export interface BrokerAuthorizationCreateOrUpdateOptionalParams extends OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; -} - -/** Optional parameters. */ -export interface BrokerAuthorizationDeleteOptionalParams extends OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; -} - -/** Optional parameters. */ -export interface BrokerAuthorizationListByResourceGroupOptionalParams extends OperationOptions {} - -/** Optional parameters. */ -export interface DataflowProfileGetOptionalParams extends OperationOptions {} - -/** Optional parameters. */ -export interface DataflowProfileCreateOrUpdateOptionalParams extends OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; -} - -/** Optional parameters. */ -export interface DataflowProfileDeleteOptionalParams extends OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; -} - -/** Optional parameters. */ -export interface DataflowProfileListByResourceGroupOptionalParams extends OperationOptions {} - -/** Optional parameters. */ -export interface DataflowGetOptionalParams extends OperationOptions {} - -/** Optional parameters. */ -export interface DataflowCreateOrUpdateOptionalParams extends OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; -} - -/** Optional parameters. */ -export interface DataflowDeleteOptionalParams extends OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; -} - -/** Optional parameters. */ -export interface DataflowListByResourceGroupOptionalParams extends OperationOptions {} - -/** Optional parameters. */ -export interface DataflowEndpointGetOptionalParams extends OperationOptions {} - -/** Optional parameters. */ -export interface DataflowEndpointCreateOrUpdateOptionalParams extends OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; -} - -/** Optional parameters. */ -export interface DataflowEndpointDeleteOptionalParams extends OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; -} - -/** Optional parameters. */ -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 deleted file mode 100644 index 22960939f743..000000000000 --- a/sdk/iotoperations/arm-iotoperations/src/classic/broker/index.ts +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsContext } from "../../api/ioTOperationsContext.js"; -import { - brokerGet, - brokerCreateOrUpdate, - brokerDelete, - brokerListByResourceGroup, -} from "../../api/broker/index.js"; -import { BrokerResource } from "../../models/models.js"; -import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; -import { PollerLike, OperationState } from "@azure/core-lro"; -import { - BrokerGetOptionalParams, - BrokerCreateOrUpdateOptionalParams, - BrokerDeleteOptionalParams, - BrokerListByResourceGroupOptionalParams, -} from "../../api/options.js"; - -/** Interface representing a Broker operations. */ -export interface BrokerOperations { - /** Get a BrokerResource */ - get: ( - resourceGroupName: string, - instanceName: string, - brokerName: string, - options?: BrokerGetOptionalParams, - ) => Promise; - /** Create a BrokerResource */ - createOrUpdate: ( - resourceGroupName: string, - instanceName: string, - brokerName: string, - resource: BrokerResource, - options?: BrokerCreateOrUpdateOptionalParams, - ) => PollerLike, BrokerResource>; - /** Delete a BrokerResource */ - delete: ( - resourceGroupName: string, - instanceName: string, - brokerName: string, - options?: BrokerDeleteOptionalParams, - ) => PollerLike, void>; - /** List BrokerResource resources by InstanceResource */ - listByResourceGroup: ( - resourceGroupName: string, - instanceName: string, - options?: BrokerListByResourceGroupOptionalParams, - ) => PagedAsyncIterableIterator; -} - -export function getBroker(context: IoTOperationsContext, subscriptionId: string) { - return { - get: ( - resourceGroupName: string, - instanceName: string, - brokerName: string, - options?: BrokerGetOptionalParams, - ) => brokerGet(context, subscriptionId, resourceGroupName, instanceName, brokerName, options), - createOrUpdate: ( - resourceGroupName: string, - instanceName: string, - brokerName: string, - resource: BrokerResource, - options?: BrokerCreateOrUpdateOptionalParams, - ) => - brokerCreateOrUpdate( - context, - subscriptionId, - resourceGroupName, - instanceName, - brokerName, - resource, - options, - ), - delete: ( - resourceGroupName: string, - instanceName: string, - brokerName: string, - options?: BrokerDeleteOptionalParams, - ) => - brokerDelete(context, subscriptionId, resourceGroupName, instanceName, brokerName, options), - listByResourceGroup: ( - resourceGroupName: string, - instanceName: string, - options?: BrokerListByResourceGroupOptionalParams, - ) => - brokerListByResourceGroup(context, subscriptionId, resourceGroupName, instanceName, options), - }; -} - -export function getBrokerOperations( - context: IoTOperationsContext, - subscriptionId: string, -): BrokerOperations { - return { - ...getBroker(context, subscriptionId), - }; -} diff --git a/sdk/iotoperations/arm-iotoperations/src/classic/brokerAuthentication/index.ts b/sdk/iotoperations/arm-iotoperations/src/classic/brokerAuthentication/index.ts deleted file mode 100644 index 012b9e785092..000000000000 --- a/sdk/iotoperations/arm-iotoperations/src/classic/brokerAuthentication/index.ts +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsContext } from "../../api/ioTOperationsContext.js"; -import { - brokerAuthenticationGet, - brokerAuthenticationCreateOrUpdate, - brokerAuthenticationDelete, - brokerAuthenticationListByResourceGroup, -} from "../../api/brokerAuthentication/index.js"; -import { BrokerAuthenticationResource } from "../../models/models.js"; -import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; -import { PollerLike, OperationState } from "@azure/core-lro"; -import { - BrokerAuthenticationGetOptionalParams, - BrokerAuthenticationCreateOrUpdateOptionalParams, - BrokerAuthenticationDeleteOptionalParams, - BrokerAuthenticationListByResourceGroupOptionalParams, -} from "../../api/options.js"; - -/** Interface representing a BrokerAuthentication operations. */ -export interface BrokerAuthenticationOperations { - /** Get a BrokerAuthenticationResource */ - get: ( - resourceGroupName: string, - instanceName: string, - brokerName: string, - authenticationName: string, - options?: BrokerAuthenticationGetOptionalParams, - ) => Promise; - /** Create a BrokerAuthenticationResource */ - createOrUpdate: ( - resourceGroupName: string, - instanceName: string, - brokerName: string, - authenticationName: string, - resource: BrokerAuthenticationResource, - options?: BrokerAuthenticationCreateOrUpdateOptionalParams, - ) => PollerLike, BrokerAuthenticationResource>; - /** Delete a BrokerAuthenticationResource */ - delete: ( - resourceGroupName: string, - instanceName: string, - brokerName: string, - authenticationName: string, - options?: BrokerAuthenticationDeleteOptionalParams, - ) => PollerLike, void>; - /** List BrokerAuthenticationResource resources by BrokerResource */ - listByResourceGroup: ( - resourceGroupName: string, - instanceName: string, - brokerName: string, - options?: BrokerAuthenticationListByResourceGroupOptionalParams, - ) => PagedAsyncIterableIterator; -} - -export function getBrokerAuthentication(context: IoTOperationsContext, subscriptionId: string) { - return { - get: ( - resourceGroupName: string, - instanceName: string, - brokerName: string, - authenticationName: string, - options?: BrokerAuthenticationGetOptionalParams, - ) => - brokerAuthenticationGet( - context, - subscriptionId, - resourceGroupName, - instanceName, - brokerName, - authenticationName, - options, - ), - createOrUpdate: ( - resourceGroupName: string, - instanceName: string, - brokerName: string, - authenticationName: string, - resource: BrokerAuthenticationResource, - options?: BrokerAuthenticationCreateOrUpdateOptionalParams, - ) => - brokerAuthenticationCreateOrUpdate( - context, - subscriptionId, - resourceGroupName, - instanceName, - brokerName, - authenticationName, - resource, - options, - ), - delete: ( - resourceGroupName: string, - instanceName: string, - brokerName: string, - authenticationName: string, - options?: BrokerAuthenticationDeleteOptionalParams, - ) => - brokerAuthenticationDelete( - context, - subscriptionId, - resourceGroupName, - instanceName, - brokerName, - authenticationName, - options, - ), - listByResourceGroup: ( - resourceGroupName: string, - instanceName: string, - brokerName: string, - options?: BrokerAuthenticationListByResourceGroupOptionalParams, - ) => - brokerAuthenticationListByResourceGroup( - context, - subscriptionId, - resourceGroupName, - instanceName, - brokerName, - options, - ), - }; -} - -export function getBrokerAuthenticationOperations( - context: IoTOperationsContext, - subscriptionId: string, -): BrokerAuthenticationOperations { - return { - ...getBrokerAuthentication(context, subscriptionId), - }; -} diff --git a/sdk/iotoperations/arm-iotoperations/src/classic/brokerAuthorization/index.ts b/sdk/iotoperations/arm-iotoperations/src/classic/brokerAuthorization/index.ts deleted file mode 100644 index c9019ad25d9d..000000000000 --- a/sdk/iotoperations/arm-iotoperations/src/classic/brokerAuthorization/index.ts +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsContext } from "../../api/ioTOperationsContext.js"; -import { - brokerAuthorizationGet, - brokerAuthorizationCreateOrUpdate, - brokerAuthorizationDelete, - brokerAuthorizationListByResourceGroup, -} from "../../api/brokerAuthorization/index.js"; -import { BrokerAuthorizationResource } from "../../models/models.js"; -import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; -import { PollerLike, OperationState } from "@azure/core-lro"; -import { - BrokerAuthorizationGetOptionalParams, - BrokerAuthorizationCreateOrUpdateOptionalParams, - BrokerAuthorizationDeleteOptionalParams, - BrokerAuthorizationListByResourceGroupOptionalParams, -} from "../../api/options.js"; - -/** Interface representing a BrokerAuthorization operations. */ -export interface BrokerAuthorizationOperations { - /** Get a BrokerAuthorizationResource */ - get: ( - resourceGroupName: string, - instanceName: string, - brokerName: string, - authorizationName: string, - options?: BrokerAuthorizationGetOptionalParams, - ) => Promise; - /** Create a BrokerAuthorizationResource */ - createOrUpdate: ( - resourceGroupName: string, - instanceName: string, - brokerName: string, - authorizationName: string, - resource: BrokerAuthorizationResource, - options?: BrokerAuthorizationCreateOrUpdateOptionalParams, - ) => PollerLike, BrokerAuthorizationResource>; - /** Delete a BrokerAuthorizationResource */ - delete: ( - resourceGroupName: string, - instanceName: string, - brokerName: string, - authorizationName: string, - options?: BrokerAuthorizationDeleteOptionalParams, - ) => PollerLike, void>; - /** List BrokerAuthorizationResource resources by BrokerResource */ - listByResourceGroup: ( - resourceGroupName: string, - instanceName: string, - brokerName: string, - options?: BrokerAuthorizationListByResourceGroupOptionalParams, - ) => PagedAsyncIterableIterator; -} - -export function getBrokerAuthorization(context: IoTOperationsContext, subscriptionId: string) { - return { - get: ( - resourceGroupName: string, - instanceName: string, - brokerName: string, - authorizationName: string, - options?: BrokerAuthorizationGetOptionalParams, - ) => - brokerAuthorizationGet( - context, - subscriptionId, - resourceGroupName, - instanceName, - brokerName, - authorizationName, - options, - ), - createOrUpdate: ( - resourceGroupName: string, - instanceName: string, - brokerName: string, - authorizationName: string, - resource: BrokerAuthorizationResource, - options?: BrokerAuthorizationCreateOrUpdateOptionalParams, - ) => - brokerAuthorizationCreateOrUpdate( - context, - subscriptionId, - resourceGroupName, - instanceName, - brokerName, - authorizationName, - resource, - options, - ), - delete: ( - resourceGroupName: string, - instanceName: string, - brokerName: string, - authorizationName: string, - options?: BrokerAuthorizationDeleteOptionalParams, - ) => - brokerAuthorizationDelete( - context, - subscriptionId, - resourceGroupName, - instanceName, - brokerName, - authorizationName, - options, - ), - listByResourceGroup: ( - resourceGroupName: string, - instanceName: string, - brokerName: string, - options?: BrokerAuthorizationListByResourceGroupOptionalParams, - ) => - brokerAuthorizationListByResourceGroup( - context, - subscriptionId, - resourceGroupName, - instanceName, - brokerName, - options, - ), - }; -} - -export function getBrokerAuthorizationOperations( - context: IoTOperationsContext, - subscriptionId: string, -): BrokerAuthorizationOperations { - return { - ...getBrokerAuthorization(context, subscriptionId), - }; -} diff --git a/sdk/iotoperations/arm-iotoperations/src/classic/brokerListener/index.ts b/sdk/iotoperations/arm-iotoperations/src/classic/brokerListener/index.ts deleted file mode 100644 index 434e5686682e..000000000000 --- a/sdk/iotoperations/arm-iotoperations/src/classic/brokerListener/index.ts +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsContext } from "../../api/ioTOperationsContext.js"; -import { - brokerListenerGet, - brokerListenerCreateOrUpdate, - brokerListenerDelete, - brokerListenerListByResourceGroup, -} from "../../api/brokerListener/index.js"; -import { BrokerListenerResource } from "../../models/models.js"; -import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; -import { PollerLike, OperationState } from "@azure/core-lro"; -import { - BrokerListenerGetOptionalParams, - BrokerListenerCreateOrUpdateOptionalParams, - BrokerListenerDeleteOptionalParams, - BrokerListenerListByResourceGroupOptionalParams, -} from "../../api/options.js"; - -/** Interface representing a BrokerListener operations. */ -export interface BrokerListenerOperations { - /** Get a BrokerListenerResource */ - get: ( - resourceGroupName: string, - instanceName: string, - brokerName: string, - listenerName: string, - options?: BrokerListenerGetOptionalParams, - ) => Promise; - /** Create a BrokerListenerResource */ - createOrUpdate: ( - resourceGroupName: string, - instanceName: string, - brokerName: string, - listenerName: string, - resource: BrokerListenerResource, - options?: BrokerListenerCreateOrUpdateOptionalParams, - ) => PollerLike, BrokerListenerResource>; - /** Delete a BrokerListenerResource */ - delete: ( - resourceGroupName: string, - instanceName: string, - brokerName: string, - listenerName: string, - options?: BrokerListenerDeleteOptionalParams, - ) => PollerLike, void>; - /** List BrokerListenerResource resources by BrokerResource */ - listByResourceGroup: ( - resourceGroupName: string, - instanceName: string, - brokerName: string, - options?: BrokerListenerListByResourceGroupOptionalParams, - ) => PagedAsyncIterableIterator; -} - -export function getBrokerListener(context: IoTOperationsContext, subscriptionId: string) { - return { - get: ( - resourceGroupName: string, - instanceName: string, - brokerName: string, - listenerName: string, - options?: BrokerListenerGetOptionalParams, - ) => - brokerListenerGet( - context, - subscriptionId, - resourceGroupName, - instanceName, - brokerName, - listenerName, - options, - ), - createOrUpdate: ( - resourceGroupName: string, - instanceName: string, - brokerName: string, - listenerName: string, - resource: BrokerListenerResource, - options?: BrokerListenerCreateOrUpdateOptionalParams, - ) => - brokerListenerCreateOrUpdate( - context, - subscriptionId, - resourceGroupName, - instanceName, - brokerName, - listenerName, - resource, - options, - ), - delete: ( - resourceGroupName: string, - instanceName: string, - brokerName: string, - listenerName: string, - options?: BrokerListenerDeleteOptionalParams, - ) => - brokerListenerDelete( - context, - subscriptionId, - resourceGroupName, - instanceName, - brokerName, - listenerName, - options, - ), - listByResourceGroup: ( - resourceGroupName: string, - instanceName: string, - brokerName: string, - options?: BrokerListenerListByResourceGroupOptionalParams, - ) => - brokerListenerListByResourceGroup( - context, - subscriptionId, - resourceGroupName, - instanceName, - brokerName, - options, - ), - }; -} - -export function getBrokerListenerOperations( - context: IoTOperationsContext, - subscriptionId: string, -): BrokerListenerOperations { - return { - ...getBrokerListener(context, subscriptionId), - }; -} diff --git a/sdk/iotoperations/arm-iotoperations/src/classic/dataflow/index.ts b/sdk/iotoperations/arm-iotoperations/src/classic/dataflow/index.ts deleted file mode 100644 index ee96b8637375..000000000000 --- a/sdk/iotoperations/arm-iotoperations/src/classic/dataflow/index.ts +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsContext } from "../../api/ioTOperationsContext.js"; -import { - dataflowGet, - dataflowCreateOrUpdate, - dataflowDelete, - dataflowListByResourceGroup, -} from "../../api/dataflow/index.js"; -import { DataflowResource } from "../../models/models.js"; -import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; -import { PollerLike, OperationState } from "@azure/core-lro"; -import { - DataflowGetOptionalParams, - DataflowCreateOrUpdateOptionalParams, - DataflowDeleteOptionalParams, - DataflowListByResourceGroupOptionalParams, -} from "../../api/options.js"; - -/** Interface representing a Dataflow operations. */ -export interface DataflowOperations { - /** Get a DataflowResource */ - get: ( - resourceGroupName: string, - instanceName: string, - dataflowProfileName: string, - dataflowName: string, - options?: DataflowGetOptionalParams, - ) => Promise; - /** Create a DataflowResource */ - createOrUpdate: ( - resourceGroupName: string, - instanceName: string, - dataflowProfileName: string, - dataflowName: string, - resource: DataflowResource, - options?: DataflowCreateOrUpdateOptionalParams, - ) => PollerLike, DataflowResource>; - /** Delete a DataflowResource */ - delete: ( - resourceGroupName: string, - instanceName: string, - dataflowProfileName: string, - dataflowName: string, - options?: DataflowDeleteOptionalParams, - ) => PollerLike, void>; - /** List DataflowResource resources by DataflowProfileResource */ - listByResourceGroup: ( - resourceGroupName: string, - instanceName: string, - dataflowProfileName: string, - options?: DataflowListByResourceGroupOptionalParams, - ) => PagedAsyncIterableIterator; -} - -export function getDataflow(context: IoTOperationsContext, subscriptionId: string) { - return { - get: ( - resourceGroupName: string, - instanceName: string, - dataflowProfileName: string, - dataflowName: string, - options?: DataflowGetOptionalParams, - ) => - dataflowGet( - context, - subscriptionId, - resourceGroupName, - instanceName, - dataflowProfileName, - dataflowName, - options, - ), - createOrUpdate: ( - resourceGroupName: string, - instanceName: string, - dataflowProfileName: string, - dataflowName: string, - resource: DataflowResource, - options?: DataflowCreateOrUpdateOptionalParams, - ) => - dataflowCreateOrUpdate( - context, - subscriptionId, - resourceGroupName, - instanceName, - dataflowProfileName, - dataflowName, - resource, - options, - ), - delete: ( - resourceGroupName: string, - instanceName: string, - dataflowProfileName: string, - dataflowName: string, - options?: DataflowDeleteOptionalParams, - ) => - dataflowDelete( - context, - subscriptionId, - resourceGroupName, - instanceName, - dataflowProfileName, - dataflowName, - options, - ), - listByResourceGroup: ( - resourceGroupName: string, - instanceName: string, - dataflowProfileName: string, - options?: DataflowListByResourceGroupOptionalParams, - ) => - dataflowListByResourceGroup( - context, - subscriptionId, - resourceGroupName, - instanceName, - dataflowProfileName, - options, - ), - }; -} - -export function getDataflowOperations( - context: IoTOperationsContext, - subscriptionId: string, -): DataflowOperations { - return { - ...getDataflow(context, subscriptionId), - }; -} diff --git a/sdk/iotoperations/arm-iotoperations/src/classic/dataflowEndpoint/index.ts b/sdk/iotoperations/arm-iotoperations/src/classic/dataflowEndpoint/index.ts deleted file mode 100644 index 8acb2a0dd8c0..000000000000 --- a/sdk/iotoperations/arm-iotoperations/src/classic/dataflowEndpoint/index.ts +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsContext } from "../../api/ioTOperationsContext.js"; -import { - dataflowEndpointGet, - dataflowEndpointCreateOrUpdate, - dataflowEndpointDelete, - dataflowEndpointListByResourceGroup, -} from "../../api/dataflowEndpoint/index.js"; -import { DataflowEndpointResource } from "../../models/models.js"; -import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; -import { PollerLike, OperationState } from "@azure/core-lro"; -import { - DataflowEndpointGetOptionalParams, - DataflowEndpointCreateOrUpdateOptionalParams, - DataflowEndpointDeleteOptionalParams, - DataflowEndpointListByResourceGroupOptionalParams, -} from "../../api/options.js"; - -/** Interface representing a DataflowEndpoint operations. */ -export interface DataflowEndpointOperations { - /** Get a DataflowEndpointResource */ - get: ( - resourceGroupName: string, - instanceName: string, - dataflowEndpointName: string, - options?: DataflowEndpointGetOptionalParams, - ) => Promise; - /** Create a DataflowEndpointResource */ - createOrUpdate: ( - resourceGroupName: string, - instanceName: string, - dataflowEndpointName: string, - resource: DataflowEndpointResource, - options?: DataflowEndpointCreateOrUpdateOptionalParams, - ) => PollerLike, DataflowEndpointResource>; - /** Delete a DataflowEndpointResource */ - delete: ( - resourceGroupName: string, - instanceName: string, - dataflowEndpointName: string, - options?: DataflowEndpointDeleteOptionalParams, - ) => PollerLike, void>; - /** List DataflowEndpointResource resources by InstanceResource */ - listByResourceGroup: ( - resourceGroupName: string, - instanceName: string, - options?: DataflowEndpointListByResourceGroupOptionalParams, - ) => PagedAsyncIterableIterator; -} - -export function getDataflowEndpoint(context: IoTOperationsContext, subscriptionId: string) { - return { - get: ( - resourceGroupName: string, - instanceName: string, - dataflowEndpointName: string, - options?: DataflowEndpointGetOptionalParams, - ) => - dataflowEndpointGet( - context, - subscriptionId, - resourceGroupName, - instanceName, - dataflowEndpointName, - options, - ), - createOrUpdate: ( - resourceGroupName: string, - instanceName: string, - dataflowEndpointName: string, - resource: DataflowEndpointResource, - options?: DataflowEndpointCreateOrUpdateOptionalParams, - ) => - dataflowEndpointCreateOrUpdate( - context, - subscriptionId, - resourceGroupName, - instanceName, - dataflowEndpointName, - resource, - options, - ), - delete: ( - resourceGroupName: string, - instanceName: string, - dataflowEndpointName: string, - options?: DataflowEndpointDeleteOptionalParams, - ) => - dataflowEndpointDelete( - context, - subscriptionId, - resourceGroupName, - instanceName, - dataflowEndpointName, - options, - ), - listByResourceGroup: ( - resourceGroupName: string, - instanceName: string, - options?: DataflowEndpointListByResourceGroupOptionalParams, - ) => - dataflowEndpointListByResourceGroup( - context, - subscriptionId, - resourceGroupName, - instanceName, - options, - ), - }; -} - -export function getDataflowEndpointOperations( - context: IoTOperationsContext, - subscriptionId: string, -): DataflowEndpointOperations { - return { - ...getDataflowEndpoint(context, subscriptionId), - }; -} diff --git a/sdk/iotoperations/arm-iotoperations/src/classic/dataflowProfile/index.ts b/sdk/iotoperations/arm-iotoperations/src/classic/dataflowProfile/index.ts deleted file mode 100644 index 6ec2a1760f6f..000000000000 --- a/sdk/iotoperations/arm-iotoperations/src/classic/dataflowProfile/index.ts +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsContext } from "../../api/ioTOperationsContext.js"; -import { - dataflowProfileGet, - dataflowProfileCreateOrUpdate, - dataflowProfileDelete, - dataflowProfileListByResourceGroup, -} from "../../api/dataflowProfile/index.js"; -import { DataflowProfileResource } from "../../models/models.js"; -import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; -import { PollerLike, OperationState } from "@azure/core-lro"; -import { - DataflowProfileGetOptionalParams, - DataflowProfileCreateOrUpdateOptionalParams, - DataflowProfileDeleteOptionalParams, - DataflowProfileListByResourceGroupOptionalParams, -} from "../../api/options.js"; - -/** Interface representing a DataflowProfile operations. */ -export interface DataflowProfileOperations { - /** Get a DataflowProfileResource */ - get: ( - resourceGroupName: string, - instanceName: string, - dataflowProfileName: string, - options?: DataflowProfileGetOptionalParams, - ) => Promise; - /** Create a DataflowProfileResource */ - createOrUpdate: ( - resourceGroupName: string, - instanceName: string, - dataflowProfileName: string, - resource: DataflowProfileResource, - options?: DataflowProfileCreateOrUpdateOptionalParams, - ) => PollerLike, DataflowProfileResource>; - /** Delete a DataflowProfileResource */ - delete: ( - resourceGroupName: string, - instanceName: string, - dataflowProfileName: string, - options?: DataflowProfileDeleteOptionalParams, - ) => PollerLike, void>; - /** List DataflowProfileResource resources by InstanceResource */ - listByResourceGroup: ( - resourceGroupName: string, - instanceName: string, - options?: DataflowProfileListByResourceGroupOptionalParams, - ) => PagedAsyncIterableIterator; -} - -export function getDataflowProfile(context: IoTOperationsContext, subscriptionId: string) { - return { - get: ( - resourceGroupName: string, - instanceName: string, - dataflowProfileName: string, - options?: DataflowProfileGetOptionalParams, - ) => - dataflowProfileGet( - context, - subscriptionId, - resourceGroupName, - instanceName, - dataflowProfileName, - options, - ), - createOrUpdate: ( - resourceGroupName: string, - instanceName: string, - dataflowProfileName: string, - resource: DataflowProfileResource, - options?: DataflowProfileCreateOrUpdateOptionalParams, - ) => - dataflowProfileCreateOrUpdate( - context, - subscriptionId, - resourceGroupName, - instanceName, - dataflowProfileName, - resource, - options, - ), - delete: ( - resourceGroupName: string, - instanceName: string, - dataflowProfileName: string, - options?: DataflowProfileDeleteOptionalParams, - ) => - dataflowProfileDelete( - context, - subscriptionId, - resourceGroupName, - instanceName, - dataflowProfileName, - options, - ), - listByResourceGroup: ( - resourceGroupName: string, - instanceName: string, - options?: DataflowProfileListByResourceGroupOptionalParams, - ) => - dataflowProfileListByResourceGroup( - context, - subscriptionId, - resourceGroupName, - instanceName, - options, - ), - }; -} - -export function getDataflowProfileOperations( - context: IoTOperationsContext, - subscriptionId: string, -): DataflowProfileOperations { - return { - ...getDataflowProfile(context, subscriptionId), - }; -} diff --git a/sdk/iotoperations/arm-iotoperations/src/classic/index.ts b/sdk/iotoperations/arm-iotoperations/src/classic/index.ts deleted file mode 100644 index 085e1a30b590..000000000000 --- a/sdk/iotoperations/arm-iotoperations/src/classic/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -export { BrokerOperations } from "./broker/index.js"; -export { BrokerAuthenticationOperations } from "./brokerAuthentication/index.js"; -export { BrokerAuthorizationOperations } from "./brokerAuthorization/index.js"; -export { BrokerListenerOperations } from "./brokerListener/index.js"; -export { DataflowOperations } from "./dataflow/index.js"; -export { DataflowEndpointOperations } from "./dataflowEndpoint/index.js"; -export { DataflowProfileOperations } from "./dataflowProfile/index.js"; -export { InstanceOperations } from "./instance/index.js"; -export { OperationsOperations } from "./operations/index.js"; diff --git a/sdk/iotoperations/arm-iotoperations/src/classic/instance/index.ts b/sdk/iotoperations/arm-iotoperations/src/classic/instance/index.ts deleted file mode 100644 index 0b5944a16ff0..000000000000 --- a/sdk/iotoperations/arm-iotoperations/src/classic/instance/index.ts +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsContext } from "../../api/ioTOperationsContext.js"; -import { - instanceGet, - instanceCreateOrUpdate, - instanceUpdate, - instanceDelete, - instanceListByResourceGroup, - instanceListBySubscription, -} from "../../api/instance/index.js"; -import { InstanceResource, InstancePatchModel } from "../../models/models.js"; -import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; -import { PollerLike, OperationState } from "@azure/core-lro"; -import { - InstanceGetOptionalParams, - InstanceCreateOrUpdateOptionalParams, - InstanceUpdateOptionalParams, - InstanceDeleteOptionalParams, - InstanceListByResourceGroupOptionalParams, - InstanceListBySubscriptionOptionalParams, -} from "../../api/options.js"; - -/** Interface representing a Instance operations. */ -export interface InstanceOperations { - /** Get a InstanceResource */ - get: ( - resourceGroupName: string, - instanceName: string, - options?: InstanceGetOptionalParams, - ) => Promise; - /** Create a InstanceResource */ - createOrUpdate: ( - resourceGroupName: string, - instanceName: string, - resource: InstanceResource, - options?: InstanceCreateOrUpdateOptionalParams, - ) => PollerLike, InstanceResource>; - /** Update a InstanceResource */ - update: ( - resourceGroupName: string, - instanceName: string, - properties: InstancePatchModel, - options?: InstanceUpdateOptionalParams, - ) => Promise; - /** Delete a InstanceResource */ - delete: ( - resourceGroupName: string, - instanceName: string, - options?: InstanceDeleteOptionalParams, - ) => PollerLike, void>; - /** List InstanceResource resources by resource group */ - listByResourceGroup: ( - resourceGroupName: string, - options?: InstanceListByResourceGroupOptionalParams, - ) => PagedAsyncIterableIterator; - /** List InstanceResource resources by subscription ID */ - listBySubscription: ( - options?: InstanceListBySubscriptionOptionalParams, - ) => PagedAsyncIterableIterator; -} - -export function getInstance(context: IoTOperationsContext, subscriptionId: string) { - return { - get: (resourceGroupName: string, instanceName: string, options?: InstanceGetOptionalParams) => - instanceGet(context, subscriptionId, resourceGroupName, instanceName, options), - createOrUpdate: ( - resourceGroupName: string, - instanceName: string, - resource: InstanceResource, - options?: InstanceCreateOrUpdateOptionalParams, - ) => - instanceCreateOrUpdate( - context, - subscriptionId, - resourceGroupName, - instanceName, - resource, - options, - ), - update: ( - resourceGroupName: string, - instanceName: string, - properties: InstancePatchModel, - options?: InstanceUpdateOptionalParams, - ) => - instanceUpdate(context, subscriptionId, resourceGroupName, instanceName, properties, options), - delete: ( - resourceGroupName: string, - instanceName: string, - options?: InstanceDeleteOptionalParams, - ) => instanceDelete(context, subscriptionId, resourceGroupName, instanceName, options), - listByResourceGroup: ( - resourceGroupName: string, - options?: InstanceListByResourceGroupOptionalParams, - ) => instanceListByResourceGroup(context, subscriptionId, resourceGroupName, options), - listBySubscription: (options?: InstanceListBySubscriptionOptionalParams) => - instanceListBySubscription(context, subscriptionId, options), - }; -} - -export function getInstanceOperations( - context: IoTOperationsContext, - subscriptionId: string, -): InstanceOperations { - return { - ...getInstance(context, subscriptionId), - }; -} diff --git a/sdk/iotoperations/arm-iotoperations/src/classic/operations/index.ts b/sdk/iotoperations/arm-iotoperations/src/classic/operations/index.ts deleted file mode 100644 index a5bcde30056e..000000000000 --- a/sdk/iotoperations/arm-iotoperations/src/classic/operations/index.ts +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsContext } from "../../api/ioTOperationsContext.js"; -import { operationsList } from "../../api/operations/index.js"; -import { OperationsListOptionalParams } from "../../api/options.js"; -import { Operation } from "../../models/models.js"; -import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; - -/** Interface representing a Operations operations. */ -export interface OperationsOperations { - /** List the operations for the provider */ - list: (options?: OperationsListOptionalParams) => PagedAsyncIterableIterator; -} - -export function getOperations(context: IoTOperationsContext) { - return { - list: (options?: OperationsListOptionalParams) => operationsList(context, options), - }; -} - -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 deleted file mode 100644 index 7518a16c2ee9..000000000000 --- a/sdk/iotoperations/arm-iotoperations/src/helpers/serializerHelpers.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -export function serializeRecord( - item: Record, -): Record; -export function serializeRecord( - item: Record, - serializer: (item: T) => R, -): Record; -export function serializeRecord( - item: Record, - serializer?: (item: T) => R, -): Record { - return Object.keys(item).reduce( - (acc, key) => { - if (isSupportedRecordType(item[key])) { - acc[key] = item[key] as any; - } else if (serializer) { - const value = item[key]; - if (value !== undefined) { - acc[key] = serializer(value); - } - } else { - console.warn(`Don't know how to serialize ${item[key]}`); - acc[key] = item[key] as any; - } - return acc; - }, - {} as Record, - ); -} - -function isSupportedRecordType(t: any) { - 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 deleted file mode 100644 index 9fc2984da58f..000000000000 --- a/sdk/iotoperations/arm-iotoperations/src/index.ts +++ /dev/null @@ -1,235 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { - PageSettings, - ContinuablePage, - PagedAsyncIterableIterator, -} from "./static-helpers/pagingHelpers.js"; - -export { IoTOperationsClient } from "./ioTOperationsClient.js"; -export { restorePoller, RestorePollerOptions } from "./restorePollerHelpers.js"; -export { - DataflowEndpointResource, - DataflowEndpointProperties, - KnownEndpointType, - EndpointType, - DataflowEndpointDataExplorer, - DataflowEndpointDataExplorerAuthentication, - KnownDataExplorerAuthMethod, - DataExplorerAuthMethod, - DataflowEndpointAuthenticationSystemAssignedManagedIdentity, - DataflowEndpointAuthenticationUserAssignedManagedIdentity, - BatchingConfiguration, - DataflowEndpointDataLakeStorage, - DataflowEndpointDataLakeStorageAuthentication, - KnownDataLakeStorageAuthMethod, - DataLakeStorageAuthMethod, - DataflowEndpointAuthenticationAccessToken, - DataflowEndpointFabricOneLake, - DataflowEndpointFabricOneLakeAuthentication, - KnownFabricOneLakeAuthMethod, - FabricOneLakeAuthMethod, - DataflowEndpointFabricOneLakeNames, - KnownDataflowEndpointFabricPathType, - DataflowEndpointFabricPathType, - DataflowEndpointKafka, - DataflowEndpointKafkaAuthentication, - KnownKafkaAuthMethod, - KafkaAuthMethod, - DataflowEndpointAuthenticationSasl, - KnownDataflowEndpointAuthenticationSaslType, - DataflowEndpointAuthenticationSaslType, - DataflowEndpointAuthenticationX509, - DataflowEndpointKafkaBatching, - KnownOperationalMode, - OperationalMode, - KnownDataflowEndpointKafkaCompression, - DataflowEndpointKafkaCompression, - KnownDataflowEndpointKafkaAcks, - DataflowEndpointKafkaAcks, - KnownDataflowEndpointKafkaPartitionStrategy, - DataflowEndpointKafkaPartitionStrategy, - TlsProperties, - KnownCloudEventAttributeType, - CloudEventAttributeType, - DataflowEndpointLocalStorage, - DataflowEndpointMqtt, - DataflowEndpointMqttAuthentication, - KnownMqttAuthMethod, - MqttAuthMethod, - DataflowEndpointAuthenticationServiceAccountToken, - KnownBrokerProtocolType, - BrokerProtocolType, - KnownMqttRetainType, - MqttRetainType, - KnownProvisioningState, - ProvisioningState, - ExtendedLocation, - KnownExtendedLocationType, - ExtendedLocationType, - ProxyResource, - Resource, - SystemData, - KnownCreatedByType, - CreatedByType, - DataflowResource, - DataflowProperties, - DataflowOperation, - KnownOperationType, - OperationType, - DataflowSourceOperationSettings, - KnownSourceSerializationFormat, - SourceSerializationFormat, - DataflowBuiltInTransformationSettings, - KnownTransformationSerializationFormat, - TransformationSerializationFormat, - DataflowBuiltInTransformationDataset, - DataflowBuiltInTransformationFilter, - KnownFilterType, - FilterType, - DataflowBuiltInTransformationMap, - KnownDataflowMappingType, - DataflowMappingType, - DataflowDestinationOperationSettings, - DataflowProfileResource, - DataflowProfileProperties, - ProfileDiagnostics, - DiagnosticsLogs, - Metrics, - BrokerAuthorizationResource, - BrokerAuthorizationProperties, - AuthorizationConfig, - AuthorizationRule, - BrokerResourceRule, - KnownBrokerResourceDefinitionMethods, - BrokerResourceDefinitionMethods, - PrincipalDefinition, - StateStoreResourceRule, - KnownStateStoreResourceKeyTypes, - StateStoreResourceKeyTypes, - KnownStateStoreResourceDefinitionMethods, - StateStoreResourceDefinitionMethods, - BrokerAuthenticationResource, - BrokerAuthenticationProperties, - BrokerAuthenticatorMethods, - KnownBrokerAuthenticationMethod, - BrokerAuthenticationMethod, - BrokerAuthenticatorMethodCustom, - BrokerAuthenticatorCustomAuth, - X509ManualCertificate, - BrokerAuthenticatorMethodSat, - BrokerAuthenticatorMethodX509, - BrokerAuthenticatorMethodX509Attributes, - BrokerListenerResource, - BrokerListenerProperties, - ListenerPort, - TlsCertMethod, - KnownTlsCertMethodMode, - TlsCertMethodMode, - CertManagerCertificateSpec, - CertManagerIssuerRef, - KnownCertManagerIssuerKind, - CertManagerIssuerKind, - CertManagerPrivateKey, - KnownPrivateKeyAlgorithm, - PrivateKeyAlgorithm, - KnownPrivateKeyRotationPolicy, - PrivateKeyRotationPolicy, - SanForCert, - KnownServiceType, - ServiceType, - BrokerResource, - BrokerProperties, - AdvancedSettings, - ClientConfig, - SubscriberQueueLimit, - KnownSubscriberMessageDropStrategy, - SubscriberMessageDropStrategy, - CertManagerCertOptions, - Cardinality, - BackendChain, - Frontend, - BrokerDiagnostics, - SelfCheck, - Traces, - SelfTracing, - DiskBackedMessageBuffer, - VolumeClaimSpec, - LocalKubernetesReference, - KubernetesReference, - VolumeClaimResourceRequirements, - VolumeClaimSpecSelector, - VolumeClaimSpecSelectorMatchExpressions, - KnownOperatorValues, - OperatorValues, - GenerateResourceLimits, - KnownBrokerMemoryProfile, - BrokerMemoryProfile, - InstanceResource, - InstanceProperties, - SchemaRegistryRef, - ManagedServiceIdentity, - KnownManagedServiceIdentityType, - ManagedServiceIdentityType, - UserAssignedIdentity, - TrackedResource, - InstancePatchModel, - Operation, - OperationDisplay, - KnownOrigin, - Origin, - KnownActionType, - ActionType, - KnownVersions, -} from "./models/index.js"; -export { - IoTOperationsClientOptionalParams, - OperationsListOptionalParams, - InstanceGetOptionalParams, - InstanceCreateOrUpdateOptionalParams, - InstanceUpdateOptionalParams, - InstanceDeleteOptionalParams, - InstanceListByResourceGroupOptionalParams, - InstanceListBySubscriptionOptionalParams, - BrokerGetOptionalParams, - BrokerCreateOrUpdateOptionalParams, - BrokerDeleteOptionalParams, - BrokerListByResourceGroupOptionalParams, - BrokerListenerGetOptionalParams, - BrokerListenerCreateOrUpdateOptionalParams, - BrokerListenerDeleteOptionalParams, - BrokerListenerListByResourceGroupOptionalParams, - BrokerAuthenticationGetOptionalParams, - BrokerAuthenticationCreateOrUpdateOptionalParams, - BrokerAuthenticationDeleteOptionalParams, - BrokerAuthenticationListByResourceGroupOptionalParams, - BrokerAuthorizationGetOptionalParams, - BrokerAuthorizationCreateOrUpdateOptionalParams, - BrokerAuthorizationDeleteOptionalParams, - BrokerAuthorizationListByResourceGroupOptionalParams, - DataflowProfileGetOptionalParams, - DataflowProfileCreateOrUpdateOptionalParams, - DataflowProfileDeleteOptionalParams, - DataflowProfileListByResourceGroupOptionalParams, - DataflowGetOptionalParams, - DataflowCreateOrUpdateOptionalParams, - DataflowDeleteOptionalParams, - DataflowListByResourceGroupOptionalParams, - DataflowEndpointGetOptionalParams, - DataflowEndpointCreateOrUpdateOptionalParams, - DataflowEndpointDeleteOptionalParams, - DataflowEndpointListByResourceGroupOptionalParams, -} from "./api/index.js"; -export { - BrokerOperations, - BrokerAuthenticationOperations, - BrokerAuthorizationOperations, - BrokerListenerOperations, - DataflowOperations, - DataflowEndpointOperations, - DataflowProfileOperations, - InstanceOperations, - OperationsOperations, -} from "./classic/index.js"; -export { PageSettings, ContinuablePage, PagedAsyncIterableIterator }; diff --git a/sdk/iotoperations/arm-iotoperations/src/ioTOperationsClient.ts b/sdk/iotoperations/arm-iotoperations/src/ioTOperationsClient.ts deleted file mode 100644 index 48fc9cb13269..000000000000 --- a/sdk/iotoperations/arm-iotoperations/src/ioTOperationsClient.ts +++ /dev/null @@ -1,87 +0,0 @@ -// 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 { - getBrokerListenerOperations, - BrokerListenerOperations, -} from "./classic/brokerListener/index.js"; -import { - getBrokerAuthenticationOperations, - BrokerAuthenticationOperations, -} from "./classic/brokerAuthentication/index.js"; -import { - getBrokerAuthorizationOperations, - BrokerAuthorizationOperations, -} from "./classic/brokerAuthorization/index.js"; -import { - getDataflowProfileOperations, - DataflowProfileOperations, -} from "./classic/dataflowProfile/index.js"; -import { getDataflowOperations, DataflowOperations } from "./classic/dataflow/index.js"; -import { - getDataflowEndpointOperations, - DataflowEndpointOperations, -} from "./classic/dataflowEndpoint/index.js"; -import { - createIoTOperations, - IoTOperationsContext, - IoTOperationsClientOptionalParams, -} from "./api/index.js"; -import { Pipeline } from "@azure/core-rest-pipeline"; -import { TokenCredential } from "@azure/core-auth"; - -export { IoTOperationsClientOptionalParams } from "./api/ioTOperationsContext.js"; - -export class IoTOperationsClient { - private _client: IoTOperationsContext; - /** The pipeline used by this client to make requests */ - public readonly pipeline: Pipeline; - - /** Microsoft.IoTOperations Resource Provider management API. */ - constructor( - credential: TokenCredential, - subscriptionId: string, - options: IoTOperationsClientOptionalParams = {}, - ) { - const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix; - const userAgentPrefix = prefixFromOptions - ? `${prefixFromOptions} azsdk-js-client` - : `azsdk-js-client`; - this._client = createIoTOperations(credential, { - ...options, - userAgentOptions: { userAgentPrefix }, - }); - this.pipeline = this._client.pipeline; - 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.dataflow = getDataflowOperations(this._client, subscriptionId); - this.dataflowEndpoint = getDataflowEndpointOperations(this._client, subscriptionId); - } - - /** The operation groups for Operations */ - public readonly operations: OperationsOperations; - /** The operation groups for Instance */ - public readonly instance: InstanceOperations; - /** The operation groups for Broker */ - public readonly broker: BrokerOperations; - /** The operation groups for BrokerListener */ - public readonly brokerListener: BrokerListenerOperations; - /** The operation groups for BrokerAuthentication */ - public readonly brokerAuthentication: BrokerAuthenticationOperations; - /** The operation groups for BrokerAuthorization */ - public readonly brokerAuthorization: BrokerAuthorizationOperations; - /** The operation groups for DataflowProfile */ - public readonly dataflowProfile: DataflowProfileOperations; - /** The operation groups for Dataflow */ - public readonly dataflow: DataflowOperations; - /** The operation groups for DataflowEndpoint */ - public readonly dataflowEndpoint: DataflowEndpointOperations; -} diff --git a/sdk/iotoperations/arm-iotoperations/src/logger.ts b/sdk/iotoperations/arm-iotoperations/src/logger.ts deleted file mode 100644 index 2bcb008c4672..000000000000 --- a/sdk/iotoperations/arm-iotoperations/src/logger.ts +++ /dev/null @@ -1,5 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { createClientLogger } from "@azure/logger"; -export const logger = createClientLogger("arm-iotoperations"); diff --git a/sdk/iotoperations/arm-iotoperations/src/models/index.ts b/sdk/iotoperations/arm-iotoperations/src/models/index.ts deleted file mode 100644 index 9329a0004e89..000000000000 --- a/sdk/iotoperations/arm-iotoperations/src/models/index.ts +++ /dev/null @@ -1,177 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -export { - DataflowEndpointResource, - DataflowEndpointProperties, - KnownEndpointType, - EndpointType, - DataflowEndpointDataExplorer, - DataflowEndpointDataExplorerAuthentication, - KnownDataExplorerAuthMethod, - DataExplorerAuthMethod, - DataflowEndpointAuthenticationSystemAssignedManagedIdentity, - DataflowEndpointAuthenticationUserAssignedManagedIdentity, - BatchingConfiguration, - DataflowEndpointDataLakeStorage, - DataflowEndpointDataLakeStorageAuthentication, - KnownDataLakeStorageAuthMethod, - DataLakeStorageAuthMethod, - DataflowEndpointAuthenticationAccessToken, - DataflowEndpointFabricOneLake, - DataflowEndpointFabricOneLakeAuthentication, - KnownFabricOneLakeAuthMethod, - FabricOneLakeAuthMethod, - DataflowEndpointFabricOneLakeNames, - KnownDataflowEndpointFabricPathType, - DataflowEndpointFabricPathType, - DataflowEndpointKafka, - DataflowEndpointKafkaAuthentication, - KnownKafkaAuthMethod, - KafkaAuthMethod, - DataflowEndpointAuthenticationSasl, - KnownDataflowEndpointAuthenticationSaslType, - DataflowEndpointAuthenticationSaslType, - DataflowEndpointAuthenticationX509, - DataflowEndpointKafkaBatching, - KnownOperationalMode, - OperationalMode, - KnownDataflowEndpointKafkaCompression, - DataflowEndpointKafkaCompression, - KnownDataflowEndpointKafkaAcks, - DataflowEndpointKafkaAcks, - KnownDataflowEndpointKafkaPartitionStrategy, - DataflowEndpointKafkaPartitionStrategy, - TlsProperties, - KnownCloudEventAttributeType, - CloudEventAttributeType, - DataflowEndpointLocalStorage, - DataflowEndpointMqtt, - DataflowEndpointMqttAuthentication, - KnownMqttAuthMethod, - MqttAuthMethod, - DataflowEndpointAuthenticationServiceAccountToken, - KnownBrokerProtocolType, - BrokerProtocolType, - KnownMqttRetainType, - MqttRetainType, - KnownProvisioningState, - ProvisioningState, - ExtendedLocation, - KnownExtendedLocationType, - ExtendedLocationType, - ProxyResource, - Resource, - SystemData, - KnownCreatedByType, - CreatedByType, - DataflowResource, - DataflowProperties, - DataflowOperation, - KnownOperationType, - OperationType, - DataflowSourceOperationSettings, - KnownSourceSerializationFormat, - SourceSerializationFormat, - DataflowBuiltInTransformationSettings, - KnownTransformationSerializationFormat, - TransformationSerializationFormat, - DataflowBuiltInTransformationDataset, - DataflowBuiltInTransformationFilter, - KnownFilterType, - FilterType, - DataflowBuiltInTransformationMap, - KnownDataflowMappingType, - DataflowMappingType, - DataflowDestinationOperationSettings, - DataflowProfileResource, - DataflowProfileProperties, - ProfileDiagnostics, - DiagnosticsLogs, - Metrics, - BrokerAuthorizationResource, - BrokerAuthorizationProperties, - AuthorizationConfig, - AuthorizationRule, - BrokerResourceRule, - KnownBrokerResourceDefinitionMethods, - BrokerResourceDefinitionMethods, - PrincipalDefinition, - StateStoreResourceRule, - KnownStateStoreResourceKeyTypes, - StateStoreResourceKeyTypes, - KnownStateStoreResourceDefinitionMethods, - StateStoreResourceDefinitionMethods, - BrokerAuthenticationResource, - BrokerAuthenticationProperties, - BrokerAuthenticatorMethods, - KnownBrokerAuthenticationMethod, - BrokerAuthenticationMethod, - BrokerAuthenticatorMethodCustom, - BrokerAuthenticatorCustomAuth, - X509ManualCertificate, - BrokerAuthenticatorMethodSat, - BrokerAuthenticatorMethodX509, - BrokerAuthenticatorMethodX509Attributes, - BrokerListenerResource, - BrokerListenerProperties, - ListenerPort, - TlsCertMethod, - KnownTlsCertMethodMode, - TlsCertMethodMode, - CertManagerCertificateSpec, - CertManagerIssuerRef, - KnownCertManagerIssuerKind, - CertManagerIssuerKind, - CertManagerPrivateKey, - KnownPrivateKeyAlgorithm, - PrivateKeyAlgorithm, - KnownPrivateKeyRotationPolicy, - PrivateKeyRotationPolicy, - SanForCert, - KnownServiceType, - ServiceType, - BrokerResource, - BrokerProperties, - AdvancedSettings, - ClientConfig, - SubscriberQueueLimit, - KnownSubscriberMessageDropStrategy, - SubscriberMessageDropStrategy, - CertManagerCertOptions, - Cardinality, - BackendChain, - Frontend, - BrokerDiagnostics, - SelfCheck, - Traces, - SelfTracing, - DiskBackedMessageBuffer, - VolumeClaimSpec, - LocalKubernetesReference, - KubernetesReference, - VolumeClaimResourceRequirements, - VolumeClaimSpecSelector, - VolumeClaimSpecSelectorMatchExpressions, - KnownOperatorValues, - OperatorValues, - GenerateResourceLimits, - KnownBrokerMemoryProfile, - BrokerMemoryProfile, - InstanceResource, - InstanceProperties, - SchemaRegistryRef, - ManagedServiceIdentity, - KnownManagedServiceIdentityType, - ManagedServiceIdentityType, - UserAssignedIdentity, - TrackedResource, - InstancePatchModel, - Operation, - OperationDisplay, - KnownOrigin, - 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 deleted file mode 100644 index 201dbb62822d..000000000000 --- a/sdk/iotoperations/arm-iotoperations/src/models/models.ts +++ /dev/null @@ -1,4233 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -/** Instance dataflowEndpoint resource */ -export interface DataflowEndpointResource extends ProxyResource { - /** The resource-specific properties for this resource. */ - properties?: DataflowEndpointProperties; - /** Edge location of the resource. */ - extendedLocation: ExtendedLocation; -} - -export function dataflowEndpointResourceSerializer(item: DataflowEndpointResource): any { - return { - properties: !item["properties"] - ? item["properties"] - : dataflowEndpointPropertiesSerializer(item["properties"]), - extendedLocation: extendedLocationSerializer(item["extendedLocation"]), - }; -} - -export function dataflowEndpointResourceDeserializer(item: any): DataflowEndpointResource { - return { - id: item["id"], - name: item["name"], - type: item["type"], - systemData: !item["systemData"] - ? item["systemData"] - : systemDataDeserializer(item["systemData"]), - properties: !item["properties"] - ? item["properties"] - : dataflowEndpointPropertiesDeserializer(item["properties"]), - extendedLocation: extendedLocationDeserializer(item["extendedLocation"]), - }; -} - -/** DataflowEndpoint Resource properties. NOTE - Only one type of endpoint is supported for one Resource */ -export interface DataflowEndpointProperties { - /** Endpoint Type. */ - endpointType: EndpointType; - /** Azure Data Explorer endpoint. */ - dataExplorerSettings?: DataflowEndpointDataExplorer; - /** Azure Data Lake endpoint. */ - dataLakeStorageSettings?: DataflowEndpointDataLakeStorage; - /** Microsoft Fabric endpoint. */ - fabricOneLakeSettings?: DataflowEndpointFabricOneLake; - /** Kafka endpoint. */ - kafkaSettings?: DataflowEndpointKafka; - /** Local persistent volume endpoint. */ - localStorageSettings?: DataflowEndpointLocalStorage; - /** Broker endpoint. */ - mqttSettings?: DataflowEndpointMqtt; - /** The status of the last operation. */ - readonly provisioningState?: ProvisioningState; -} - -export function dataflowEndpointPropertiesSerializer(item: DataflowEndpointProperties): any { - return { - endpointType: item["endpointType"], - dataExplorerSettings: !item["dataExplorerSettings"] - ? item["dataExplorerSettings"] - : dataflowEndpointDataExplorerSerializer(item["dataExplorerSettings"]), - dataLakeStorageSettings: !item["dataLakeStorageSettings"] - ? item["dataLakeStorageSettings"] - : dataflowEndpointDataLakeStorageSerializer(item["dataLakeStorageSettings"]), - fabricOneLakeSettings: !item["fabricOneLakeSettings"] - ? item["fabricOneLakeSettings"] - : dataflowEndpointFabricOneLakeSerializer(item["fabricOneLakeSettings"]), - kafkaSettings: !item["kafkaSettings"] - ? item["kafkaSettings"] - : dataflowEndpointKafkaSerializer(item["kafkaSettings"]), - localStorageSettings: !item["localStorageSettings"] - ? item["localStorageSettings"] - : dataflowEndpointLocalStorageSerializer(item["localStorageSettings"]), - mqttSettings: !item["mqttSettings"] - ? item["mqttSettings"] - : dataflowEndpointMqttSerializer(item["mqttSettings"]), - }; -} - -export function dataflowEndpointPropertiesDeserializer(item: any): DataflowEndpointProperties { - return { - endpointType: item["endpointType"], - dataExplorerSettings: !item["dataExplorerSettings"] - ? item["dataExplorerSettings"] - : dataflowEndpointDataExplorerDeserializer(item["dataExplorerSettings"]), - dataLakeStorageSettings: !item["dataLakeStorageSettings"] - ? item["dataLakeStorageSettings"] - : dataflowEndpointDataLakeStorageDeserializer(item["dataLakeStorageSettings"]), - fabricOneLakeSettings: !item["fabricOneLakeSettings"] - ? item["fabricOneLakeSettings"] - : dataflowEndpointFabricOneLakeDeserializer(item["fabricOneLakeSettings"]), - kafkaSettings: !item["kafkaSettings"] - ? item["kafkaSettings"] - : dataflowEndpointKafkaDeserializer(item["kafkaSettings"]), - localStorageSettings: !item["localStorageSettings"] - ? item["localStorageSettings"] - : dataflowEndpointLocalStorageDeserializer(item["localStorageSettings"]), - mqttSettings: !item["mqttSettings"] - ? item["mqttSettings"] - : dataflowEndpointMqttDeserializer(item["mqttSettings"]), - provisioningState: item["provisioningState"], - }; -} - -/** DataflowEndpoint Type properties */ -export enum KnownEndpointType { - /** Azure Data Explorer Type */ - DataExplorer = "DataExplorer", - /** Azure Data Lake Type */ - DataLakeStorage = "DataLakeStorage", - /** Microsoft Fabric Type */ - FabricOneLake = "FabricOneLake", - /** Kafka Type */ - Kafka = "Kafka", - /** Local Storage Type */ - LocalStorage = "LocalStorage", - /** Broker Type */ - Mqtt = "Mqtt", -} - -/** - * DataflowEndpoint Type properties \ - * {@link KnownEndpointType} can be used interchangeably with EndpointType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **DataExplorer**: Azure Data Explorer Type \ - * **DataLakeStorage**: Azure Data Lake Type \ - * **FabricOneLake**: Microsoft Fabric Type \ - * **Kafka**: Kafka Type \ - * **LocalStorage**: Local Storage Type \ - * **Mqtt**: Broker Type - */ -export type EndpointType = string; - -/** Azure Data Explorer endpoint properties */ -export interface DataflowEndpointDataExplorer { - /** Authentication configuration. NOTE - only authentication property is allowed per entry. */ - authentication: DataflowEndpointDataExplorerAuthentication; - /** Database name. */ - database: string; - /** Host of the Azure Data Explorer in the form of ..kusto.windows.net . */ - host: string; - /** Azure Data Explorer endpoint batching configuration. */ - batching?: BatchingConfiguration; -} - -export function dataflowEndpointDataExplorerSerializer(item: DataflowEndpointDataExplorer): any { - return { - authentication: dataflowEndpointDataExplorerAuthenticationSerializer(item["authentication"]), - database: item["database"], - host: item["host"], - batching: !item["batching"] - ? item["batching"] - : batchingConfigurationSerializer(item["batching"]), - }; -} - -export function dataflowEndpointDataExplorerDeserializer(item: any): DataflowEndpointDataExplorer { - return { - authentication: dataflowEndpointDataExplorerAuthenticationDeserializer(item["authentication"]), - database: item["database"], - host: item["host"], - batching: !item["batching"] - ? item["batching"] - : batchingConfigurationDeserializer(item["batching"]), - }; -} - -/** Azure Data Explorer Authentication properties. NOTE - only authentication property is allowed per entry. */ -export interface DataflowEndpointDataExplorerAuthentication { - /** Mode of Authentication. */ - method: DataExplorerAuthMethod; - /** System-assigned managed identity authentication. */ - systemAssignedManagedIdentitySettings?: DataflowEndpointAuthenticationSystemAssignedManagedIdentity; - /** User-assigned managed identity authentication. */ - userAssignedManagedIdentitySettings?: DataflowEndpointAuthenticationUserAssignedManagedIdentity; -} - -export function dataflowEndpointDataExplorerAuthenticationSerializer( - item: DataflowEndpointDataExplorerAuthentication, -): any { - return { - method: item["method"], - systemAssignedManagedIdentitySettings: !item["systemAssignedManagedIdentitySettings"] - ? item["systemAssignedManagedIdentitySettings"] - : dataflowEndpointAuthenticationSystemAssignedManagedIdentitySerializer( - item["systemAssignedManagedIdentitySettings"], - ), - userAssignedManagedIdentitySettings: !item["userAssignedManagedIdentitySettings"] - ? item["userAssignedManagedIdentitySettings"] - : dataflowEndpointAuthenticationUserAssignedManagedIdentitySerializer( - item["userAssignedManagedIdentitySettings"], - ), - }; -} - -export function dataflowEndpointDataExplorerAuthenticationDeserializer( - item: any, -): DataflowEndpointDataExplorerAuthentication { - return { - method: item["method"], - systemAssignedManagedIdentitySettings: !item["systemAssignedManagedIdentitySettings"] - ? item["systemAssignedManagedIdentitySettings"] - : dataflowEndpointAuthenticationSystemAssignedManagedIdentityDeserializer( - item["systemAssignedManagedIdentitySettings"], - ), - userAssignedManagedIdentitySettings: !item["userAssignedManagedIdentitySettings"] - ? item["userAssignedManagedIdentitySettings"] - : dataflowEndpointAuthenticationUserAssignedManagedIdentityDeserializer( - item["userAssignedManagedIdentitySettings"], - ), - }; -} - -/** DataflowEndpoint Data Explorer Authentication Method properties */ -export enum KnownDataExplorerAuthMethod { - /** SystemAssignedManagedIdentity type */ - SystemAssignedManagedIdentity = "SystemAssignedManagedIdentity", - /** UserAssignedManagedIdentity type */ - UserAssignedManagedIdentity = "UserAssignedManagedIdentity", -} - -/** - * 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 DataExplorerAuthMethod = string; - -/** DataflowEndpoint Authentication SystemAssignedManagedIdentity properties */ -export interface DataflowEndpointAuthenticationSystemAssignedManagedIdentity { - /** Audience of the service to authenticate against. Optional; defaults to the audience for Service host configuration. */ - audience?: string; -} - -export function dataflowEndpointAuthenticationSystemAssignedManagedIdentitySerializer( - item: DataflowEndpointAuthenticationSystemAssignedManagedIdentity, -): any { - return { audience: item["audience"] }; -} - -export function dataflowEndpointAuthenticationSystemAssignedManagedIdentityDeserializer( - item: any, -): DataflowEndpointAuthenticationSystemAssignedManagedIdentity { - return { - audience: item["audience"], - }; -} - -/** DataflowEndpoint Authentication UserAssignedManagedIdentity properties */ -export interface DataflowEndpointAuthenticationUserAssignedManagedIdentity { - /** Client ID for the user-assigned managed identity. */ - clientId: string; - /** Resource identifier (application ID URI) of the resource, affixed with the .default suffix. */ - scope?: string; - /** Tenant ID. */ - tenantId: string; -} - -export function dataflowEndpointAuthenticationUserAssignedManagedIdentitySerializer( - item: DataflowEndpointAuthenticationUserAssignedManagedIdentity, -): any { - return { - clientId: item["clientId"], - scope: item["scope"], - tenantId: item["tenantId"], - }; -} - -export function dataflowEndpointAuthenticationUserAssignedManagedIdentityDeserializer( - item: any, -): DataflowEndpointAuthenticationUserAssignedManagedIdentity { - return { - clientId: item["clientId"], - scope: item["scope"], - tenantId: item["tenantId"], - }; -} - -/** Batching configuration */ -export interface BatchingConfiguration { - /** Batching latency in seconds. */ - latencySeconds?: number; - /** Maximum number of messages in a batch. */ - maxMessages?: number; -} - -export function batchingConfigurationSerializer(item: BatchingConfiguration): any { - return { - latencySeconds: item["latencySeconds"], - maxMessages: item["maxMessages"], - }; -} - -export function batchingConfigurationDeserializer(item: any): BatchingConfiguration { - return { - latencySeconds: item["latencySeconds"], - maxMessages: item["maxMessages"], - }; -} - -/** Azure Data Lake endpoint properties */ -export interface DataflowEndpointDataLakeStorage { - /** Authentication configuration. NOTE - only authentication property is allowed per entry. */ - authentication: DataflowEndpointDataLakeStorageAuthentication; - /** Host of the Azure Data Lake in the form of .blob.core.windows.net . */ - host: string; - /** Azure Data Lake endpoint batching configuration. */ - batching?: BatchingConfiguration; -} - -export function dataflowEndpointDataLakeStorageSerializer( - item: DataflowEndpointDataLakeStorage, -): any { - return { - authentication: dataflowEndpointDataLakeStorageAuthenticationSerializer(item["authentication"]), - host: item["host"], - batching: !item["batching"] - ? item["batching"] - : batchingConfigurationSerializer(item["batching"]), - }; -} - -export function dataflowEndpointDataLakeStorageDeserializer( - item: any, -): DataflowEndpointDataLakeStorage { - return { - authentication: dataflowEndpointDataLakeStorageAuthenticationDeserializer( - item["authentication"], - ), - host: item["host"], - batching: !item["batching"] - ? item["batching"] - : batchingConfigurationDeserializer(item["batching"]), - }; -} - -/** Azure Data Lake endpoint Authentication properties. NOTE Enum - Only one method is supported for one entry */ -export interface DataflowEndpointDataLakeStorageAuthentication { - /** Mode of Authentication. */ - method: DataLakeStorageAuthMethod; - /** SAS token authentication. */ - accessTokenSettings?: DataflowEndpointAuthenticationAccessToken; - /** System-assigned managed identity authentication. */ - systemAssignedManagedIdentitySettings?: DataflowEndpointAuthenticationSystemAssignedManagedIdentity; - /** User-assigned managed identity authentication. */ - userAssignedManagedIdentitySettings?: DataflowEndpointAuthenticationUserAssignedManagedIdentity; -} - -export function dataflowEndpointDataLakeStorageAuthenticationSerializer( - item: DataflowEndpointDataLakeStorageAuthentication, -): any { - return { - method: item["method"], - accessTokenSettings: !item["accessTokenSettings"] - ? item["accessTokenSettings"] - : dataflowEndpointAuthenticationAccessTokenSerializer(item["accessTokenSettings"]), - systemAssignedManagedIdentitySettings: !item["systemAssignedManagedIdentitySettings"] - ? item["systemAssignedManagedIdentitySettings"] - : dataflowEndpointAuthenticationSystemAssignedManagedIdentitySerializer( - item["systemAssignedManagedIdentitySettings"], - ), - userAssignedManagedIdentitySettings: !item["userAssignedManagedIdentitySettings"] - ? item["userAssignedManagedIdentitySettings"] - : dataflowEndpointAuthenticationUserAssignedManagedIdentitySerializer( - item["userAssignedManagedIdentitySettings"], - ), - }; -} - -export function dataflowEndpointDataLakeStorageAuthenticationDeserializer( - item: any, -): DataflowEndpointDataLakeStorageAuthentication { - return { - method: item["method"], - accessTokenSettings: !item["accessTokenSettings"] - ? item["accessTokenSettings"] - : dataflowEndpointAuthenticationAccessTokenDeserializer(item["accessTokenSettings"]), - systemAssignedManagedIdentitySettings: !item["systemAssignedManagedIdentitySettings"] - ? item["systemAssignedManagedIdentitySettings"] - : dataflowEndpointAuthenticationSystemAssignedManagedIdentityDeserializer( - item["systemAssignedManagedIdentitySettings"], - ), - userAssignedManagedIdentitySettings: !item["userAssignedManagedIdentitySettings"] - ? item["userAssignedManagedIdentitySettings"] - : dataflowEndpointAuthenticationUserAssignedManagedIdentityDeserializer( - item["userAssignedManagedIdentitySettings"], - ), - }; -} - -/** DataflowEndpoint Data Lake Storage Authentication Method properties */ -export enum KnownDataLakeStorageAuthMethod { - /** SystemAssignedManagedIdentity type */ - SystemAssignedManagedIdentity = "SystemAssignedManagedIdentity", - /** UserAssignedManagedIdentity type */ - UserAssignedManagedIdentity = "UserAssignedManagedIdentity", - /** AccessToken Option */ - AccessToken = "AccessToken", -} - -/** - * 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 DataLakeStorageAuthMethod = string; - -/** DataflowEndpoint Authentication Access Token properties */ -export interface DataflowEndpointAuthenticationAccessToken { - /** Token secret name. */ - secretRef: string; -} - -export function dataflowEndpointAuthenticationAccessTokenSerializer( - item: DataflowEndpointAuthenticationAccessToken, -): any { - return { secretRef: item["secretRef"] }; -} - -export function dataflowEndpointAuthenticationAccessTokenDeserializer( - item: any, -): DataflowEndpointAuthenticationAccessToken { - return { - secretRef: item["secretRef"], - }; -} - -/** Microsoft Fabric endpoint properties */ -export interface DataflowEndpointFabricOneLake { - /** Authentication configuration. NOTE - only one authentication property is allowed per entry. */ - authentication: DataflowEndpointFabricOneLakeAuthentication; - /** Names of the workspace and lakehouse. */ - names: DataflowEndpointFabricOneLakeNames; - /** Type of location of the data in the workspace. Can be either tables or files. */ - oneLakePathType: DataflowEndpointFabricPathType; - /** Host of the Microsoft Fabric in the form of https://.fabric.microsoft.com. */ - host: string; - /** Batching configuration. */ - batching?: BatchingConfiguration; -} - -export function dataflowEndpointFabricOneLakeSerializer(item: DataflowEndpointFabricOneLake): any { - return { - authentication: dataflowEndpointFabricOneLakeAuthenticationSerializer(item["authentication"]), - names: dataflowEndpointFabricOneLakeNamesSerializer(item["names"]), - oneLakePathType: item["oneLakePathType"], - host: item["host"], - batching: !item["batching"] - ? item["batching"] - : batchingConfigurationSerializer(item["batching"]), - }; -} - -export function dataflowEndpointFabricOneLakeDeserializer( - item: any, -): DataflowEndpointFabricOneLake { - return { - authentication: dataflowEndpointFabricOneLakeAuthenticationDeserializer(item["authentication"]), - names: dataflowEndpointFabricOneLakeNamesDeserializer(item["names"]), - oneLakePathType: item["oneLakePathType"], - host: item["host"], - batching: !item["batching"] - ? item["batching"] - : batchingConfigurationDeserializer(item["batching"]), - }; -} - -/** Microsoft Fabric endpoint. Authentication properties. NOTE - Only one method is supported for one entry */ -export interface DataflowEndpointFabricOneLakeAuthentication { - /** Mode of Authentication. */ - method: FabricOneLakeAuthMethod; - /** System-assigned managed identity authentication. */ - systemAssignedManagedIdentitySettings?: DataflowEndpointAuthenticationSystemAssignedManagedIdentity; - /** User-assigned managed identity authentication. */ - userAssignedManagedIdentitySettings?: DataflowEndpointAuthenticationUserAssignedManagedIdentity; -} - -export function dataflowEndpointFabricOneLakeAuthenticationSerializer( - item: DataflowEndpointFabricOneLakeAuthentication, -): any { - return { - method: item["method"], - systemAssignedManagedIdentitySettings: !item["systemAssignedManagedIdentitySettings"] - ? item["systemAssignedManagedIdentitySettings"] - : dataflowEndpointAuthenticationSystemAssignedManagedIdentitySerializer( - item["systemAssignedManagedIdentitySettings"], - ), - userAssignedManagedIdentitySettings: !item["userAssignedManagedIdentitySettings"] - ? item["userAssignedManagedIdentitySettings"] - : dataflowEndpointAuthenticationUserAssignedManagedIdentitySerializer( - item["userAssignedManagedIdentitySettings"], - ), - }; -} - -export function dataflowEndpointFabricOneLakeAuthenticationDeserializer( - item: any, -): DataflowEndpointFabricOneLakeAuthentication { - return { - method: item["method"], - systemAssignedManagedIdentitySettings: !item["systemAssignedManagedIdentitySettings"] - ? item["systemAssignedManagedIdentitySettings"] - : dataflowEndpointAuthenticationSystemAssignedManagedIdentityDeserializer( - item["systemAssignedManagedIdentitySettings"], - ), - userAssignedManagedIdentitySettings: !item["userAssignedManagedIdentitySettings"] - ? item["userAssignedManagedIdentitySettings"] - : dataflowEndpointAuthenticationUserAssignedManagedIdentityDeserializer( - item["userAssignedManagedIdentitySettings"], - ), - }; -} - -/** DataflowEndpoint Fabric One Lake Authentication Method properties */ -export enum KnownFabricOneLakeAuthMethod { - /** SystemAssignedManagedIdentity type */ - SystemAssignedManagedIdentity = "SystemAssignedManagedIdentity", - /** UserAssignedManagedIdentity type */ - UserAssignedManagedIdentity = "UserAssignedManagedIdentity", -} - -/** - * 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 { - /** Lakehouse name. */ - lakehouseName: string; - /** Workspace name. */ - workspaceName: string; -} - -export function dataflowEndpointFabricOneLakeNamesSerializer( - item: DataflowEndpointFabricOneLakeNames, -): any { - return { - lakehouseName: item["lakehouseName"], - workspaceName: item["workspaceName"], - }; -} - -export function dataflowEndpointFabricOneLakeNamesDeserializer( - item: any, -): DataflowEndpointFabricOneLakeNames { - return { - lakehouseName: item["lakehouseName"], - workspaceName: item["workspaceName"], - }; -} - -/** DataflowEndpoint Fabric Path Type properties */ -export enum KnownDataflowEndpointFabricPathType { - /** FILES Type */ - Files = "Files", - /** TABLES Type */ - Tables = "Tables", -} - -/** - * DataflowEndpoint Fabric Path Type properties \ - * {@link KnownDataflowEndpointFabricPathType} can be used interchangeably with DataflowEndpointFabricPathType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Files**: FILES Type \ - * **Tables**: TABLES Type - */ -export type DataflowEndpointFabricPathType = string; - -/** Kafka endpoint properties */ -export interface DataflowEndpointKafka { - /** Authentication configuration. NOTE - only authentication property is allowed per entry. */ - authentication: DataflowEndpointKafkaAuthentication; - /** Consumer group ID. */ - consumerGroupId?: string; - /** Kafka endpoint host. */ - host: string; - /** Batching configuration. */ - batching?: DataflowEndpointKafkaBatching; - /** Copy Broker properties. No effect if the endpoint is used as a source or if the dataflow doesn't have an Broker source. */ - copyMqttProperties?: OperationalMode; - /** Compression. Can be none, gzip, lz4, or snappy. No effect if the endpoint is used as a source. */ - compression?: DataflowEndpointKafkaCompression; - /** Kafka acks. Can be all, one, or zero. No effect if the endpoint is used as a source. */ - kafkaAcks?: DataflowEndpointKafkaAcks; - /** Partition handling strategy. Can be default or static. No effect if the endpoint is used as a source. */ - partitionStrategy?: DataflowEndpointKafkaPartitionStrategy; - /** TLS configuration. */ - tls?: TlsProperties; - /** Cloud event mapping config. */ - cloudEventAttributes?: CloudEventAttributeType; -} - -export function dataflowEndpointKafkaSerializer(item: DataflowEndpointKafka): any { - return { - authentication: dataflowEndpointKafkaAuthenticationSerializer(item["authentication"]), - consumerGroupId: item["consumerGroupId"], - host: item["host"], - batching: !item["batching"] - ? item["batching"] - : dataflowEndpointKafkaBatchingSerializer(item["batching"]), - copyMqttProperties: item["copyMqttProperties"], - compression: item["compression"], - kafkaAcks: item["kafkaAcks"], - partitionStrategy: item["partitionStrategy"], - tls: !item["tls"] ? item["tls"] : tlsPropertiesSerializer(item["tls"]), - cloudEventAttributes: item["cloudEventAttributes"], - }; -} - -export function dataflowEndpointKafkaDeserializer(item: any): DataflowEndpointKafka { - return { - authentication: dataflowEndpointKafkaAuthenticationDeserializer(item["authentication"]), - consumerGroupId: item["consumerGroupId"], - host: item["host"], - batching: !item["batching"] - ? item["batching"] - : dataflowEndpointKafkaBatchingDeserializer(item["batching"]), - copyMqttProperties: item["copyMqttProperties"], - compression: item["compression"], - kafkaAcks: item["kafkaAcks"], - partitionStrategy: item["partitionStrategy"], - tls: !item["tls"] ? item["tls"] : tlsPropertiesDeserializer(item["tls"]), - cloudEventAttributes: item["cloudEventAttributes"], - }; -} - -/** Kafka endpoint Authentication properties. NOTE - only authentication property is allowed per entry */ -export interface DataflowEndpointKafkaAuthentication { - /** Mode of Authentication. */ - method: KafkaAuthMethod; - /** System-assigned managed identity authentication. */ - systemAssignedManagedIdentitySettings?: DataflowEndpointAuthenticationSystemAssignedManagedIdentity; - /** User-assigned managed identity authentication. */ - userAssignedManagedIdentitySettings?: DataflowEndpointAuthenticationUserAssignedManagedIdentity; - /** SASL authentication. */ - saslSettings?: DataflowEndpointAuthenticationSasl; - /** X.509 certificate authentication. */ - x509CertificateSettings?: DataflowEndpointAuthenticationX509; -} - -export function dataflowEndpointKafkaAuthenticationSerializer( - item: DataflowEndpointKafkaAuthentication, -): any { - return { - method: item["method"], - systemAssignedManagedIdentitySettings: !item["systemAssignedManagedIdentitySettings"] - ? item["systemAssignedManagedIdentitySettings"] - : dataflowEndpointAuthenticationSystemAssignedManagedIdentitySerializer( - item["systemAssignedManagedIdentitySettings"], - ), - userAssignedManagedIdentitySettings: !item["userAssignedManagedIdentitySettings"] - ? item["userAssignedManagedIdentitySettings"] - : dataflowEndpointAuthenticationUserAssignedManagedIdentitySerializer( - item["userAssignedManagedIdentitySettings"], - ), - saslSettings: !item["saslSettings"] - ? item["saslSettings"] - : dataflowEndpointAuthenticationSaslSerializer(item["saslSettings"]), - x509CertificateSettings: !item["x509CertificateSettings"] - ? item["x509CertificateSettings"] - : dataflowEndpointAuthenticationX509Serializer(item["x509CertificateSettings"]), - }; -} - -export function dataflowEndpointKafkaAuthenticationDeserializer( - item: any, -): DataflowEndpointKafkaAuthentication { - return { - method: item["method"], - systemAssignedManagedIdentitySettings: !item["systemAssignedManagedIdentitySettings"] - ? item["systemAssignedManagedIdentitySettings"] - : dataflowEndpointAuthenticationSystemAssignedManagedIdentityDeserializer( - item["systemAssignedManagedIdentitySettings"], - ), - userAssignedManagedIdentitySettings: !item["userAssignedManagedIdentitySettings"] - ? item["userAssignedManagedIdentitySettings"] - : dataflowEndpointAuthenticationUserAssignedManagedIdentityDeserializer( - item["userAssignedManagedIdentitySettings"], - ), - saslSettings: !item["saslSettings"] - ? item["saslSettings"] - : dataflowEndpointAuthenticationSaslDeserializer(item["saslSettings"]), - x509CertificateSettings: !item["x509CertificateSettings"] - ? item["x509CertificateSettings"] - : dataflowEndpointAuthenticationX509Deserializer(item["x509CertificateSettings"]), - }; -} - -/** DataflowEndpoint Kafka Authentication Method properties */ -export enum KnownKafkaAuthMethod { - /** SystemAssignedManagedIdentity type */ - SystemAssignedManagedIdentity = "SystemAssignedManagedIdentity", - /** UserAssignedManagedIdentity type */ - UserAssignedManagedIdentity = "UserAssignedManagedIdentity", - /** Sasl Option */ - Sasl = "Sasl", - /** x509Certificate Option */ - X509Certificate = "X509Certificate", - /** Anonymous Option */ - Anonymous = "Anonymous", -} - -/** - * 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 KafkaAuthMethod = string; - -/** DataflowEndpoint Authentication Sasl properties */ -export interface DataflowEndpointAuthenticationSasl { - /** Type of SASL authentication. Can be PLAIN, SCRAM-SHA-256, or SCRAM-SHA-512. */ - saslType: DataflowEndpointAuthenticationSaslType; - /** Token secret name. */ - secretRef: string; -} - -export function dataflowEndpointAuthenticationSaslSerializer( - item: DataflowEndpointAuthenticationSasl, -): any { - return { saslType: item["saslType"], secretRef: item["secretRef"] }; -} - -export function dataflowEndpointAuthenticationSaslDeserializer( - item: any, -): DataflowEndpointAuthenticationSasl { - return { - saslType: item["saslType"], - secretRef: item["secretRef"], - }; -} - -/** DataflowEndpoint Authentication Sasl Type properties */ -export enum KnownDataflowEndpointAuthenticationSaslType { - /** PLAIN Type */ - Plain = "Plain", - /** SCRAM_SHA_256 Type */ - ScramSha256 = "ScramSha256", - /** SCRAM_SHA_512 Type */ - ScramSha512 = "ScramSha512", -} - -/** - * DataflowEndpoint Authentication Sasl Type properties \ - * {@link KnownDataflowEndpointAuthenticationSaslType} can be used interchangeably with DataflowEndpointAuthenticationSaslType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Plain**: PLAIN Type \ - * **ScramSha256**: SCRAM_SHA_256 Type \ - * **ScramSha512**: SCRAM_SHA_512 Type - */ -export type DataflowEndpointAuthenticationSaslType = string; - -/** DataflowEndpoint Authentication X509 properties */ -export interface DataflowEndpointAuthenticationX509 { - /** Secret reference of the X.509 certificate. */ - secretRef: string; -} - -export function dataflowEndpointAuthenticationX509Serializer( - item: DataflowEndpointAuthenticationX509, -): any { - return { secretRef: item["secretRef"] }; -} - -export function dataflowEndpointAuthenticationX509Deserializer( - item: any, -): DataflowEndpointAuthenticationX509 { - return { - secretRef: item["secretRef"], - }; -} - -/** Kafka endpoint Batching properties */ -export interface DataflowEndpointKafkaBatching { - /** Mode for batching. */ - mode?: OperationalMode; - /** Batching latency in milliseconds. */ - latencyMs?: number; - /** Maximum number of bytes in a batch. */ - maxBytes?: number; - /** Maximum number of messages in a batch. */ - maxMessages?: number; -} - -export function dataflowEndpointKafkaBatchingSerializer(item: DataflowEndpointKafkaBatching): any { - return { - mode: item["mode"], - latencyMs: item["latencyMs"], - maxBytes: item["maxBytes"], - maxMessages: item["maxMessages"], - }; -} - -export function dataflowEndpointKafkaBatchingDeserializer( - item: any, -): DataflowEndpointKafkaBatching { - return { - mode: item["mode"], - latencyMs: item["latencyMs"], - maxBytes: item["maxBytes"], - maxMessages: item["maxMessages"], - }; -} - -/** Mode properties */ -export enum KnownOperationalMode { - /** Enabled is equivalent to True */ - Enabled = "Enabled", - /** Disabled is equivalent to False. */ - Disabled = "Disabled", -} - -/** - * Mode properties \ - * {@link KnownOperationalMode} can be used interchangeably with OperationalMode, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Enabled**: Enabled is equivalent to True \ - * **Disabled**: Disabled is equivalent to False. - */ -export type OperationalMode = string; - -/** Kafka endpoint Compression properties */ -export enum KnownDataflowEndpointKafkaCompression { - /** NONE Option */ - None = "None", - /** Gzip Option */ - Gzip = "Gzip", - /** SNAPPY Option */ - Snappy = "Snappy", - /** LZ4 Option */ - Lz4 = "Lz4", -} - -/** - * Kafka endpoint Compression properties \ - * {@link KnownDataflowEndpointKafkaCompression} can be used interchangeably with DataflowEndpointKafkaCompression, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **None**: NONE Option \ - * **Gzip**: Gzip Option \ - * **Snappy**: SNAPPY Option \ - * **Lz4**: LZ4 Option - */ -export type DataflowEndpointKafkaCompression = string; - -/** DataflowEndpoint Kafka Acks properties */ -export enum KnownDataflowEndpointKafkaAcks { - /** ZERO Option */ - Zero = "Zero", - /** ONE Option */ - One = "One", - /** ALL Option */ - All = "All", -} - -/** - * DataflowEndpoint Kafka Acks properties \ - * {@link KnownDataflowEndpointKafkaAcks} can be used interchangeably with DataflowEndpointKafkaAcks, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Zero**: ZERO Option \ - * **One**: ONE Option \ - * **All**: ALL Option - */ -export type DataflowEndpointKafkaAcks = string; - -/** DataflowEndpoint Kafka Partition Strategy properties */ -export enum KnownDataflowEndpointKafkaPartitionStrategy { - /** Default: Assigns messages to random partitions, using a round-robin algorithm. */ - Default = "Default", - /** Static: Assigns messages to a fixed partition number that's derived from the instance ID of the dataflow. */ - Static = "Static", - /** TOPIC Option */ - Topic = "Topic", - /** PROPERTY Option */ - Property = "Property", -} - -/** - * DataflowEndpoint Kafka Partition Strategy properties \ - * {@link KnownDataflowEndpointKafkaPartitionStrategy} can be used interchangeably with DataflowEndpointKafkaPartitionStrategy, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Default**: Default: Assigns messages to random partitions, using a round-robin algorithm. \ - * **Static**: Static: Assigns messages to a fixed partition number that's derived from the instance ID of the dataflow. \ - * **Topic**: TOPIC Option \ - * **Property**: PROPERTY Option - */ -export type DataflowEndpointKafkaPartitionStrategy = string; - -/** Tls properties */ -export interface TlsProperties { - /** Mode for TLS. */ - mode?: OperationalMode; - /** Trusted CA certificate config map. */ - trustedCaCertificateConfigMapRef?: string; -} - -export function tlsPropertiesSerializer(item: TlsProperties): any { - return { - mode: item["mode"], - trustedCaCertificateConfigMapRef: item["trustedCaCertificateConfigMapRef"], - }; -} - -export function tlsPropertiesDeserializer(item: any): TlsProperties { - return { - mode: item["mode"], - trustedCaCertificateConfigMapRef: item["trustedCaCertificateConfigMapRef"], - }; -} - -/** How to map events to the cloud. */ -export enum KnownCloudEventAttributeType { - /** Propagate type */ - Propagate = "Propagate", - /** CreateOrRemap type */ - CreateOrRemap = "CreateOrRemap", -} - -/** - * How to map events to the cloud. \ - * {@link KnownCloudEventAttributeType} can be used interchangeably with CloudEventAttributeType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Propagate**: Propagate type \ - * **CreateOrRemap**: CreateOrRemap type - */ -export type CloudEventAttributeType = string; - -/** Local persistent volume endpoint properties */ -export interface DataflowEndpointLocalStorage { - /** Persistent volume claim name. */ - persistentVolumeClaimRef: string; -} - -export function dataflowEndpointLocalStorageSerializer(item: DataflowEndpointLocalStorage): any { - return { persistentVolumeClaimRef: item["persistentVolumeClaimRef"] }; -} - -export function dataflowEndpointLocalStorageDeserializer(item: any): DataflowEndpointLocalStorage { - return { - persistentVolumeClaimRef: item["persistentVolumeClaimRef"], - }; -} - -/** Broker endpoint properties */ -export interface DataflowEndpointMqtt { - /** authentication properties. DEFAULT: kubernetes.audience=aio-internal. NOTE - Enum field only property is allowed */ - authentication: DataflowEndpointMqttAuthentication; - /** Client ID prefix. Client ID generated by the dataflow is -TBD. Optional; no prefix if omitted. */ - clientIdPrefix?: string; - /** Host of the Broker in the form of :. Optional; connects to Broker if omitted. */ - host?: string; - /** Enable or disable websockets. */ - protocol?: BrokerProtocolType; - /** Broker KeepAlive for connection in seconds. */ - keepAliveSeconds?: number; - /** Whether or not to keep the retain setting. */ - retain?: MqttRetainType; - /** The max number of messages to keep in flight. For subscribe, this is the receive maximum. For publish, this is the maximum number of messages to send before waiting for an ack. */ - maxInflightMessages?: number; - /** Qos for Broker connection. */ - qos?: number; - /** Session expiry in seconds. */ - sessionExpirySeconds?: number; - /** TLS configuration. */ - tls?: TlsProperties; - /** Cloud event mapping config. */ - cloudEventAttributes?: CloudEventAttributeType; -} - -export function dataflowEndpointMqttSerializer(item: DataflowEndpointMqtt): any { - return { - authentication: dataflowEndpointMqttAuthenticationSerializer(item["authentication"]), - clientIdPrefix: item["clientIdPrefix"], - host: item["host"], - protocol: item["protocol"], - keepAliveSeconds: item["keepAliveSeconds"], - retain: item["retain"], - maxInflightMessages: item["maxInflightMessages"], - qos: item["qos"], - sessionExpirySeconds: item["sessionExpirySeconds"], - tls: !item["tls"] ? item["tls"] : tlsPropertiesSerializer(item["tls"]), - cloudEventAttributes: item["cloudEventAttributes"], - }; -} - -export function dataflowEndpointMqttDeserializer(item: any): DataflowEndpointMqtt { - return { - authentication: dataflowEndpointMqttAuthenticationDeserializer(item["authentication"]), - clientIdPrefix: item["clientIdPrefix"], - host: item["host"], - protocol: item["protocol"], - keepAliveSeconds: item["keepAliveSeconds"], - retain: item["retain"], - maxInflightMessages: item["maxInflightMessages"], - qos: item["qos"], - sessionExpirySeconds: item["sessionExpirySeconds"], - tls: !item["tls"] ? item["tls"] : tlsPropertiesDeserializer(item["tls"]), - cloudEventAttributes: item["cloudEventAttributes"], - }; -} - -/** Mqtt endpoint Authentication properties. NOTE - only authentication property is allowed per entry. */ -export interface DataflowEndpointMqttAuthentication { - /** Mode of Authentication. */ - method: MqttAuthMethod; - /** System-assigned managed identity authentication. */ - systemAssignedManagedIdentitySettings?: DataflowEndpointAuthenticationSystemAssignedManagedIdentity; - /** User-assigned managed identity authentication. */ - userAssignedManagedIdentitySettings?: DataflowEndpointAuthenticationUserAssignedManagedIdentity; - /** Kubernetes service account token authentication. Default audience if not set is aio-internal */ - serviceAccountTokenSettings?: DataflowEndpointAuthenticationServiceAccountToken; - /** X.509 certificate authentication. */ - x509CertificateSettings?: DataflowEndpointAuthenticationX509; -} - -export function dataflowEndpointMqttAuthenticationSerializer( - item: DataflowEndpointMqttAuthentication, -): any { - return { - method: item["method"], - systemAssignedManagedIdentitySettings: !item["systemAssignedManagedIdentitySettings"] - ? item["systemAssignedManagedIdentitySettings"] - : dataflowEndpointAuthenticationSystemAssignedManagedIdentitySerializer( - item["systemAssignedManagedIdentitySettings"], - ), - userAssignedManagedIdentitySettings: !item["userAssignedManagedIdentitySettings"] - ? item["userAssignedManagedIdentitySettings"] - : dataflowEndpointAuthenticationUserAssignedManagedIdentitySerializer( - item["userAssignedManagedIdentitySettings"], - ), - serviceAccountTokenSettings: !item["serviceAccountTokenSettings"] - ? item["serviceAccountTokenSettings"] - : dataflowEndpointAuthenticationServiceAccountTokenSerializer( - item["serviceAccountTokenSettings"], - ), - x509CertificateSettings: !item["x509CertificateSettings"] - ? item["x509CertificateSettings"] - : dataflowEndpointAuthenticationX509Serializer(item["x509CertificateSettings"]), - }; -} - -export function dataflowEndpointMqttAuthenticationDeserializer( - item: any, -): DataflowEndpointMqttAuthentication { - return { - method: item["method"], - systemAssignedManagedIdentitySettings: !item["systemAssignedManagedIdentitySettings"] - ? item["systemAssignedManagedIdentitySettings"] - : dataflowEndpointAuthenticationSystemAssignedManagedIdentityDeserializer( - item["systemAssignedManagedIdentitySettings"], - ), - userAssignedManagedIdentitySettings: !item["userAssignedManagedIdentitySettings"] - ? item["userAssignedManagedIdentitySettings"] - : dataflowEndpointAuthenticationUserAssignedManagedIdentityDeserializer( - item["userAssignedManagedIdentitySettings"], - ), - serviceAccountTokenSettings: !item["serviceAccountTokenSettings"] - ? item["serviceAccountTokenSettings"] - : dataflowEndpointAuthenticationServiceAccountTokenDeserializer( - item["serviceAccountTokenSettings"], - ), - x509CertificateSettings: !item["x509CertificateSettings"] - ? item["x509CertificateSettings"] - : dataflowEndpointAuthenticationX509Deserializer(item["x509CertificateSettings"]), - }; -} - -/** 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", -} - -/** - * 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 - * **SystemAssignedManagedIdentity**: SystemAssignedManagedIdentity type \ - * **UserAssignedManagedIdentity**: UserAssignedManagedIdentity type \ - * **ServiceAccountToken**: ServiceAccountToken Option \ - * **X509Certificate**: x509Certificate Option \ - * **Anonymous**: Anonymous Option - */ -export type MqttAuthMethod = string; - -/** Service Account Token for BrokerAuthentication */ -export interface DataflowEndpointAuthenticationServiceAccountToken { - /** Audience of the service account. Optional, defaults to the broker internal service account audience. */ - audience: string; -} - -export function dataflowEndpointAuthenticationServiceAccountTokenSerializer( - item: DataflowEndpointAuthenticationServiceAccountToken, -): any { - return { audience: item["audience"] }; -} - -export function dataflowEndpointAuthenticationServiceAccountTokenDeserializer( - item: any, -): DataflowEndpointAuthenticationServiceAccountToken { - return { - audience: item["audience"], - }; -} - -/** Broker Protocol types */ -export enum KnownBrokerProtocolType { - /** protocol broker */ - Mqtt = "Mqtt", - /** protocol websocket */ - WebSockets = "WebSockets", -} - -/** - * Broker Protocol types \ - * {@link KnownBrokerProtocolType} can be used interchangeably with BrokerProtocolType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Mqtt**: protocol broker \ - * **WebSockets**: protocol websocket - */ -export type BrokerProtocolType = string; - -/** Broker Retain types */ -export enum KnownMqttRetainType { - /** Retain the messages. */ - Keep = "Keep", - /** Never retain messages. */ - Never = "Never", -} - -/** - * Broker Retain types \ - * {@link KnownMqttRetainType} can be used interchangeably with MqttRetainType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Keep**: Retain the messages. \ - * **Never**: Never retain messages. - */ -export type MqttRetainType = string; - -/** The enum defining status of resource. */ -export enum KnownProvisioningState { - /** Resource has been created. */ - Succeeded = "Succeeded", - /** Resource creation failed. */ - Failed = "Failed", - /** Resource creation was canceled. */ - Canceled = "Canceled", - /** Resource is getting provisioned. */ - Provisioning = "Provisioning", - /** Resource is Updating. */ - Updating = "Updating", - /** Resource is Deleting. */ - Deleting = "Deleting", - /** Resource has been Accepted. */ - Accepted = "Accepted", -} - -/** - * 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 was canceled. \ - * **Provisioning**: Resource is getting provisioned. \ - * **Updating**: Resource is Updating. \ - * **Deleting**: Resource is Deleting. \ - * **Accepted**: Resource has been Accepted. - */ -export type ProvisioningState = string; - -/** 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. */ - name: string; - /** Type of ExtendedLocation. */ - type: ExtendedLocationType; -} - -export function extendedLocationSerializer(item: ExtendedLocation): any { - return { name: item["name"], type: item["type"] }; -} - -export function extendedLocationDeserializer(item: any): ExtendedLocation { - return { - name: item["name"], - type: item["type"], - }; -} - -/** The enum defining type of ExtendedLocation accepted. */ -export enum KnownExtendedLocationType { - /** CustomLocation type */ - CustomLocation = "CustomLocation", -} - -/** - * The enum defining type of ExtendedLocation accepted. \ - * {@link KnownExtendedLocationType} can be used interchangeably with ExtendedLocationType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **CustomLocation**: CustomLocation type - */ -export type ExtendedLocationType = string; - -/** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ -export interface ProxyResource extends Resource {} - -export function proxyResourceSerializer(item: ProxyResource): any { - return item; -} - -export function proxyResourceDeserializer(item: any): ProxyResource { - return { - id: item["id"], - name: item["name"], - type: item["type"], - systemData: !item["systemData"] - ? item["systemData"] - : systemDataDeserializer(item["systemData"]), - }; -} - -/** Common fields that are returned in the response for all Azure Resource Manager resources */ -export interface Resource { - /** Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} */ - readonly id?: string; - /** The name of the resource */ - readonly name?: string; - /** The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" */ - readonly type?: string; - /** Azure Resource Manager metadata containing createdBy and modifiedBy information. */ - readonly systemData?: SystemData; -} - -export function resourceSerializer(item: Resource): any { - return item; -} - -export function resourceDeserializer(item: any): Resource { - return { - id: item["id"], - name: item["name"], - type: item["type"], - systemData: !item["systemData"] - ? item["systemData"] - : systemDataDeserializer(item["systemData"]), - }; -} - -/** Metadata pertaining to creation and last modification of the resource. */ -export interface SystemData { - /** The identity that created the resource. */ - createdBy?: string; - /** The type of identity that created the resource. */ - createdByType?: CreatedByType; - /** The timestamp of resource creation (UTC). */ - createdAt?: Date; - /** The identity that last modified the resource. */ - lastModifiedBy?: string; - /** The type of identity that last modified the resource. */ - lastModifiedByType?: CreatedByType; - /** The timestamp of resource last modification (UTC) */ - lastModifiedAt?: Date; -} - -export function systemDataDeserializer(item: any): SystemData { - return { - createdBy: item["createdBy"], - createdByType: item["createdByType"], - createdAt: !item["createdAt"] ? item["createdAt"] : new Date(item["createdAt"]), - lastModifiedBy: item["lastModifiedBy"], - lastModifiedByType: item["lastModifiedByType"], - lastModifiedAt: !item["lastModifiedAt"] - ? item["lastModifiedAt"] - : new Date(item["lastModifiedAt"]), - }; -} - -/** The kind of entity that created the resource. */ -export enum KnownCreatedByType { - /** The entity was created by a user. */ - User = "User", - /** The entity was created by an application. */ - Application = "Application", - /** The entity was created by a managed identity. */ - ManagedIdentity = "ManagedIdentity", - /** The entity was created by a key. */ - Key = "Key", -} - -/** - * The kind of entity that created the resource. \ - * {@link KnowncreatedByType} can be used interchangeably with createdByType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **User**: The entity was created by a user. \ - * **Application**: The entity was created by an application. \ - * **ManagedIdentity**: The entity was created by a managed identity. \ - * **Key**: The entity was created by a key. - */ -export type CreatedByType = string; - -/** The response of a DataflowEndpointResource list operation. */ -export interface _DataflowEndpointResourceListResult { - /** The DataflowEndpointResource items on this page */ - value: DataflowEndpointResource[]; - /** The link to the next page of items */ - nextLink?: string; -} - -export function _dataflowEndpointResourceListResultDeserializer( - item: any, -): _DataflowEndpointResourceListResult { - return { - value: dataflowEndpointResourceArrayDeserializer(item["value"]), - nextLink: item["nextLink"], - }; -} - -export function dataflowEndpointResourceArraySerializer( - result: Array, -): any[] { - return result.map((item) => { - return dataflowEndpointResourceSerializer(item); - }); -} - -export function dataflowEndpointResourceArrayDeserializer( - result: Array, -): any[] { - return result.map((item) => { - return dataflowEndpointResourceDeserializer(item); - }); -} - -/** Instance dataflowProfile dataflow resource */ -export interface DataflowResource extends ProxyResource { - /** The resource-specific properties for this resource. */ - properties?: DataflowProperties; - /** Edge location of the resource. */ - extendedLocation: ExtendedLocation; -} - -export function dataflowResourceSerializer(item: DataflowResource): any { - return { - properties: !item["properties"] - ? item["properties"] - : dataflowPropertiesSerializer(item["properties"]), - extendedLocation: extendedLocationSerializer(item["extendedLocation"]), - }; -} - -export function dataflowResourceDeserializer(item: any): DataflowResource { - return { - id: item["id"], - name: item["name"], - type: item["type"], - systemData: !item["systemData"] - ? item["systemData"] - : systemDataDeserializer(item["systemData"]), - properties: !item["properties"] - ? item["properties"] - : dataflowPropertiesDeserializer(item["properties"]), - extendedLocation: extendedLocationDeserializer(item["extendedLocation"]), - }; -} - -/** Dataflow Resource properties */ -export interface DataflowProperties { - /** Mode for Dataflow. Optional; defaults to Enabled. */ - mode?: OperationalMode; - /** List of operations including source and destination references as well as transformation. */ - operations: DataflowOperation[]; - /** The status of the last operation. */ - readonly provisioningState?: ProvisioningState; -} - -export function dataflowPropertiesSerializer(item: DataflowProperties): any { - return { - mode: item["mode"], - operations: dataflowOperationArraySerializer(item["operations"]), - }; -} - -export function dataflowPropertiesDeserializer(item: any): DataflowProperties { - return { - mode: item["mode"], - operations: dataflowOperationArrayDeserializer(item["operations"]), - 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. */ - operationType: OperationType; - /** Optional user provided name of the transformation. */ - name?: string; - /** Source configuration. */ - sourceSettings?: DataflowSourceOperationSettings; - /** Built In Transformation configuration. */ - builtInTransformationSettings?: DataflowBuiltInTransformationSettings; - /** Destination configuration. */ - destinationSettings?: DataflowDestinationOperationSettings; -} - -export function dataflowOperationSerializer(item: DataflowOperation): any { - return { - operationType: item["operationType"], - name: item["name"], - sourceSettings: !item["sourceSettings"] - ? item["sourceSettings"] - : dataflowSourceOperationSettingsSerializer(item["sourceSettings"]), - builtInTransformationSettings: !item["builtInTransformationSettings"] - ? item["builtInTransformationSettings"] - : dataflowBuiltInTransformationSettingsSerializer(item["builtInTransformationSettings"]), - destinationSettings: !item["destinationSettings"] - ? item["destinationSettings"] - : dataflowDestinationOperationSettingsSerializer(item["destinationSettings"]), - }; -} - -export function dataflowOperationDeserializer(item: any): DataflowOperation { - return { - operationType: item["operationType"], - name: item["name"], - sourceSettings: !item["sourceSettings"] - ? item["sourceSettings"] - : dataflowSourceOperationSettingsDeserializer(item["sourceSettings"]), - builtInTransformationSettings: !item["builtInTransformationSettings"] - ? item["builtInTransformationSettings"] - : dataflowBuiltInTransformationSettingsDeserializer(item["builtInTransformationSettings"]), - destinationSettings: !item["destinationSettings"] - ? item["destinationSettings"] - : dataflowDestinationOperationSettingsDeserializer(item["destinationSettings"]), - }; -} - -/** Dataflow Operation Type properties */ -export enum KnownOperationType { - /** Dataflow Source Operation */ - Source = "Source", - /** Dataflow Destination Operation */ - Destination = "Destination", - /** Dataflow BuiltIn Transformation Operation */ - BuiltInTransformation = "BuiltInTransformation", -} - -/** - * Dataflow Operation Type properties \ - * {@link KnownOperationType} can be used interchangeably with OperationType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Source**: Dataflow Source Operation \ - * **Destination**: Dataflow Destination Operation \ - * **BuiltInTransformation**: Dataflow BuiltIn Transformation Operation - */ -export type OperationType = string; - -/** Dataflow Source Operation properties */ -export interface DataflowSourceOperationSettings { - /** Reference to the Dataflow Endpoint resource. Can only be of Broker and Kafka type. */ - endpointRef: string; - /** Reference to the resource in Azure Device Registry where the data in the endpoint originates from. */ - assetRef?: string; - /** Content is a JSON Schema. Allowed: JSON Schema/draft-7. */ - serializationFormat?: SourceSerializationFormat; - /** Schema CR reference. Data will be deserialized according to the schema, and dropped if it doesn't match. */ - schemaRef?: string; - /** List of source locations. Can be Broker or Kafka topics. Supports wildcards # and +. */ - dataSources: string[]; -} - -export function dataflowSourceOperationSettingsSerializer( - item: DataflowSourceOperationSettings, -): any { - return { - endpointRef: item["endpointRef"], - assetRef: item["assetRef"], - serializationFormat: item["serializationFormat"], - schemaRef: item["schemaRef"], - dataSources: item["dataSources"].map((p: any) => { - return p; - }), - }; -} - -export function dataflowSourceOperationSettingsDeserializer( - item: any, -): DataflowSourceOperationSettings { - return { - endpointRef: item["endpointRef"], - assetRef: item["assetRef"], - serializationFormat: item["serializationFormat"], - schemaRef: item["schemaRef"], - dataSources: item["dataSources"].map((p: any) => { - return p; - }), - }; -} - -/** Serialization Format properties */ -export enum KnownSourceSerializationFormat { - /** JSON Format */ - Json = "Json", -} - -/** - * Serialization Format properties \ - * {@link KnownSourceSerializationFormat} can be used interchangeably with SourceSerializationFormat, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Json**: JSON Format - */ -export type SourceSerializationFormat = string; - -/** Dataflow BuiltIn Transformation properties */ -export interface DataflowBuiltInTransformationSettings { - /** Serialization format. Optional; defaults to JSON. Allowed value JSON Schema/draft-7, Parquet. Default: Json */ - serializationFormat?: TransformationSerializationFormat; - /** Reference to the schema that describes the output of the transformation. */ - schemaRef?: string; - /** Enrich data from Broker State Store. Dataset references a key in Broker State Store. */ - datasets?: DataflowBuiltInTransformationDataset[]; - /** Filters input record or datapoints based on condition. */ - filter?: DataflowBuiltInTransformationFilter[]; - /** Maps input to output message. */ - map?: DataflowBuiltInTransformationMap[]; -} - -export function dataflowBuiltInTransformationSettingsSerializer( - item: DataflowBuiltInTransformationSettings, -): any { - return { - serializationFormat: item["serializationFormat"], - schemaRef: item["schemaRef"], - datasets: !item["datasets"] - ? item["datasets"] - : dataflowBuiltInTransformationDatasetArraySerializer(item["datasets"]), - filter: !item["filter"] - ? item["filter"] - : dataflowBuiltInTransformationFilterArraySerializer(item["filter"]), - map: !item["map"] ? item["map"] : dataflowBuiltInTransformationMapArraySerializer(item["map"]), - }; -} - -export function dataflowBuiltInTransformationSettingsDeserializer( - item: any, -): DataflowBuiltInTransformationSettings { - return { - serializationFormat: item["serializationFormat"], - schemaRef: item["schemaRef"], - datasets: !item["datasets"] - ? item["datasets"] - : dataflowBuiltInTransformationDatasetArrayDeserializer(item["datasets"]), - filter: !item["filter"] - ? item["filter"] - : dataflowBuiltInTransformationFilterArrayDeserializer(item["filter"]), - map: !item["map"] - ? item["map"] - : dataflowBuiltInTransformationMapArrayDeserializer(item["map"]), - }; -} - -/** Transformation Format properties */ -export enum KnownTransformationSerializationFormat { - /** Delta Format */ - Delta = "Delta", - /** JSON Format */ - Json = "Json", - /** Parquet Format */ - Parquet = "Parquet", -} - -/** - * Transformation Format properties \ - * {@link KnownTransformationSerializationFormat} can be used interchangeably with TransformationSerializationFormat, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Delta**: Delta Format \ - * **Json**: JSON Format \ - * **Parquet**: Parquet Format - */ -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. */ - key: string; - /** A user provided optional description of the dataset. */ - description?: string; - /** The reference to the schema that describes the dataset. Allowed: JSON Schema/draft-7. */ - schemaRef?: string; - /** List of fields for enriching from the Broker State Store. */ - inputs: string[]; - /** Condition to enrich data from Broker State Store. Example: $1 < 0 || $1 > $2 (Assuming inputs section $1 and $2 are provided) */ - expression?: string; -} - -export function dataflowBuiltInTransformationDatasetSerializer( - item: DataflowBuiltInTransformationDataset, -): any { - return { - key: item["key"], - description: item["description"], - schemaRef: item["schemaRef"], - inputs: item["inputs"].map((p: any) => { - return p; - }), - expression: item["expression"], - }; -} - -export function dataflowBuiltInTransformationDatasetDeserializer( - item: any, -): DataflowBuiltInTransformationDataset { - return { - key: item["key"], - description: item["description"], - schemaRef: item["schemaRef"], - inputs: item["inputs"].map((p: any) => { - return p; - }), - expression: item["expression"], - }; -} - -export function dataflowBuiltInTransformationFilterArraySerializer( - result: Array, -): any[] { - return result.map((item) => { - return dataflowBuiltInTransformationFilterSerializer(item); - }); -} - -export function dataflowBuiltInTransformationFilterArrayDeserializer( - result: Array, -): any[] { - return result.map((item) => { - return dataflowBuiltInTransformationFilterDeserializer(item); - }); -} - -/** Dataflow BuiltIn Transformation filter properties */ -export interface DataflowBuiltInTransformationFilter { - /** The type of dataflow operation. */ - type?: FilterType; - /** A user provided optional description of the filter. */ - description?: string; - /** List of fields for filtering in JSON path expression. */ - inputs: string[]; - /** Condition to filter data. Can reference input fields with {n} where n is the index of the input field starting from 1. Example: $1 < 0 || $1 > $2 (Assuming inputs section $1 and $2 are provided) */ - expression: string; -} - -export function dataflowBuiltInTransformationFilterSerializer( - item: DataflowBuiltInTransformationFilter, -): any { - return { - type: item["type"], - description: item["description"], - inputs: item["inputs"].map((p: any) => { - return p; - }), - expression: item["expression"], - }; -} - -export function dataflowBuiltInTransformationFilterDeserializer( - item: any, -): DataflowBuiltInTransformationFilter { - return { - type: item["type"], - description: item["description"], - inputs: item["inputs"].map((p: any) => { - return p; - }), - expression: item["expression"], - }; -} - -/** Filter Type properties */ -export enum KnownFilterType { - /** Filter type */ - Filter = "Filter", -} - -/** - * Filter Type properties \ - * {@link KnownFilterType} can be used interchangeably with FilterType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Filter**: Filter type - */ -export type FilterType = 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 BuiltIn Transformation map properties */ -export interface DataflowBuiltInTransformationMap { - /** Type of transformation. */ - type?: DataflowMappingType; - /** A user provided optional description of the mapping function. */ - description?: string; - /** List of fields for mapping in JSON path expression. */ - inputs: string[]; - /** Modify the inputs field(s) to the final output field. Example: $1 * 2.2 (Assuming inputs section $1 is provided) */ - expression?: string; - /** Where and how the input fields to be organized in the output record. */ - output: string; -} - -export function dataflowBuiltInTransformationMapSerializer( - item: DataflowBuiltInTransformationMap, -): any { - return { - type: item["type"], - description: item["description"], - inputs: item["inputs"].map((p: any) => { - return p; - }), - expression: item["expression"], - output: item["output"], - }; -} - -export function dataflowBuiltInTransformationMapDeserializer( - item: any, -): DataflowBuiltInTransformationMap { - return { - type: item["type"], - description: item["description"], - inputs: item["inputs"].map((p: any) => { - return p; - }), - expression: item["expression"], - output: item["output"], - }; -} - -/** Dataflow type mapping properties */ -export enum KnownDataflowMappingType { - /** New Properties type */ - NewProperties = "NewProperties", - /** Rename type */ - Rename = "Rename", - /** Compute type */ - Compute = "Compute", - /** Pass-through type */ - PassThrough = "PassThrough", - /** Built in function type */ - BuiltInFunction = "BuiltInFunction", -} - -/** - * Dataflow type mapping properties \ - * {@link KnownDataflowMappingType} can be used interchangeably with DataflowMappingType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **NewProperties**: New Properties type \ - * **Rename**: Rename type \ - * **Compute**: Compute type \ - * **PassThrough**: Pass-through type \ - * **BuiltInFunction**: Built in function type - */ -export type DataflowMappingType = string; - -/** Dataflow Destination Operation properties */ -export interface DataflowDestinationOperationSettings { - /** Reference to the Endpoint CR. Can be of Broker, Kafka, Fabric, ADLS, ADX type. */ - endpointRef: string; - /** Destination location, can be a topic or table name. Supports dynamic values with $topic, $systemProperties, $userProperties, $payload, $context, and $subscription. */ - dataDestination: string; -} - -export function dataflowDestinationOperationSettingsSerializer( - item: DataflowDestinationOperationSettings, -): any { - return { - endpointRef: item["endpointRef"], - dataDestination: item["dataDestination"], - }; -} - -export function dataflowDestinationOperationSettingsDeserializer( - item: any, -): DataflowDestinationOperationSettings { - return { - endpointRef: item["endpointRef"], - dataDestination: item["dataDestination"], - }; -} - -/** The response of a DataflowResource list operation. */ -export interface _DataflowResourceListResult { - /** The DataflowResource items on this page */ - value: DataflowResource[]; - /** The link to the next page of items */ - nextLink?: string; -} - -export function _dataflowResourceListResultDeserializer(item: any): _DataflowResourceListResult { - return { - value: dataflowResourceArrayDeserializer(item["value"]), - nextLink: item["nextLink"], - }; -} - -export function dataflowResourceArraySerializer(result: Array): any[] { - return result.map((item) => { - return dataflowResourceSerializer(item); - }); -} - -export function dataflowResourceArrayDeserializer(result: Array): any[] { - return result.map((item) => { - return dataflowResourceDeserializer(item); - }); -} - -/** Instance dataflowProfile resource */ -export interface DataflowProfileResource extends ProxyResource { - /** The resource-specific properties for this resource. */ - properties?: DataflowProfileProperties; - /** Edge location of the resource. */ - extendedLocation: ExtendedLocation; -} - -export function dataflowProfileResourceSerializer(item: DataflowProfileResource): any { - return { - properties: !item["properties"] - ? item["properties"] - : dataflowProfilePropertiesSerializer(item["properties"]), - extendedLocation: extendedLocationSerializer(item["extendedLocation"]), - }; -} - -export function dataflowProfileResourceDeserializer(item: any): DataflowProfileResource { - return { - id: item["id"], - name: item["name"], - type: item["type"], - systemData: !item["systemData"] - ? item["systemData"] - : systemDataDeserializer(item["systemData"]), - properties: !item["properties"] - ? item["properties"] - : dataflowProfilePropertiesDeserializer(item["properties"]), - extendedLocation: extendedLocationDeserializer(item["extendedLocation"]), - }; -} - -/** DataflowProfile Resource properties */ -export interface DataflowProfileProperties { - /** Spec defines the desired identities of NBC diagnostics settings. */ - diagnostics?: ProfileDiagnostics; - /** To manually scale the dataflow profile, specify the maximum number of instances you want to run. */ - instanceCount?: number; - /** The status of the last operation. */ - readonly provisioningState?: ProvisioningState; -} - -export function dataflowProfilePropertiesSerializer(item: DataflowProfileProperties): any { - return { - diagnostics: !item["diagnostics"] - ? item["diagnostics"] - : profileDiagnosticsSerializer(item["diagnostics"]), - instanceCount: item["instanceCount"], - }; -} - -export function dataflowProfilePropertiesDeserializer(item: any): DataflowProfileProperties { - return { - diagnostics: !item["diagnostics"] - ? item["diagnostics"] - : profileDiagnosticsDeserializer(item["diagnostics"]), - instanceCount: item["instanceCount"], - provisioningState: item["provisioningState"], - }; -} - -/** DataflowProfile Diagnostics properties */ -export interface ProfileDiagnostics { - /** Diagnostic log settings for the resource. */ - logs?: DiagnosticsLogs; - /** The metrics settings for the resource. */ - metrics?: Metrics; -} - -export function profileDiagnosticsSerializer(item: ProfileDiagnostics): any { - return { - 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"]), - }; -} - -/** Diagnostic Log properties */ -export interface DiagnosticsLogs { - /** The log level. Examples - 'debug', 'info', 'warn', 'error', 'trace'. */ - level?: string; -} - -export function diagnosticsLogsSerializer(item: DiagnosticsLogs): any { - return { level: item["level"] }; -} - -export function diagnosticsLogsDeserializer(item: any): DiagnosticsLogs { - return { - level: item["level"], - }; -} - -/** Diagnostic Metrics properties */ -export interface Metrics { - /** The prometheus port to expose the metrics. */ - prometheusPort?: number; -} - -export function metricsSerializer(item: Metrics): any { - return { prometheusPort: item["prometheusPort"] }; -} - -export function metricsDeserializer(item: any): Metrics { - return { - prometheusPort: item["prometheusPort"], - }; -} - -/** The response of a DataflowProfileResource list operation. */ -export interface _DataflowProfileResourceListResult { - /** The DataflowProfileResource items on this page */ - value: DataflowProfileResource[]; - /** The link to the next page of items */ - nextLink?: string; -} - -export function _dataflowProfileResourceListResultDeserializer( - item: any, -): _DataflowProfileResourceListResult { - return { - value: dataflowProfileResourceArrayDeserializer(item["value"]), - nextLink: item["nextLink"], - }; -} - -export function dataflowProfileResourceArraySerializer( - result: Array, -): any[] { - return result.map((item) => { - return dataflowProfileResourceSerializer(item); - }); -} - -export function dataflowProfileResourceArrayDeserializer( - result: Array, -): any[] { - return result.map((item) => { - return dataflowProfileResourceDeserializer(item); - }); -} - -/** Instance broker authorizations resource */ -export interface BrokerAuthorizationResource extends ProxyResource { - /** The resource-specific properties for this resource. */ - properties?: BrokerAuthorizationProperties; - /** Edge location of the resource. */ - extendedLocation: ExtendedLocation; -} - -export function brokerAuthorizationResourceSerializer(item: BrokerAuthorizationResource): any { - return { - properties: !item["properties"] - ? item["properties"] - : brokerAuthorizationPropertiesSerializer(item["properties"]), - extendedLocation: extendedLocationSerializer(item["extendedLocation"]), - }; -} - -export function brokerAuthorizationResourceDeserializer(item: any): BrokerAuthorizationResource { - return { - id: item["id"], - name: item["name"], - type: item["type"], - systemData: !item["systemData"] - ? item["systemData"] - : systemDataDeserializer(item["systemData"]), - properties: !item["properties"] - ? item["properties"] - : brokerAuthorizationPropertiesDeserializer(item["properties"]), - extendedLocation: extendedLocationDeserializer(item["extendedLocation"]), - }; -} - -/** BrokerAuthorization Resource properties */ -export interface BrokerAuthorizationProperties { - /** The list of authorization policies supported by the Authorization Resource. */ - authorizationPolicies: AuthorizationConfig; - /** The status of the last operation. */ - readonly provisioningState?: ProvisioningState; -} - -export function brokerAuthorizationPropertiesSerializer(item: BrokerAuthorizationProperties): any { - return { - authorizationPolicies: authorizationConfigSerializer(item["authorizationPolicies"]), - }; -} - -export function brokerAuthorizationPropertiesDeserializer( - item: any, -): BrokerAuthorizationProperties { - return { - authorizationPolicies: authorizationConfigDeserializer(item["authorizationPolicies"]), - provisioningState: item["provisioningState"], - }; -} - -/** Broker AuthorizationConfig properties */ -export interface AuthorizationConfig { - /** Enable caching of the authorization rules. */ - cache?: OperationalMode; - /** The authorization rules to follow. If no rule is set, but Authorization Resource is used that would mean DenyAll. */ - rules?: AuthorizationRule[]; -} - -export function authorizationConfigSerializer(item: AuthorizationConfig): any { - return { - cache: item["cache"], - rules: !item["rules"] ? item["rules"] : authorizationRuleArraySerializer(item["rules"]), - }; -} - -export function authorizationConfigDeserializer(item: any): AuthorizationConfig { - return { - cache: item["cache"], - 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. */ - brokerResources: BrokerResourceRule[]; - /** Give access to clients based on the following properties. */ - principals: PrincipalDefinition; - /** Give access to state store resources. */ - stateStoreResources?: StateStoreResourceRule[]; -} - -export function authorizationRuleSerializer(item: AuthorizationRule): any { - return { - brokerResources: brokerResourceRuleArraySerializer(item["brokerResources"]), - principals: principalDefinitionSerializer(item["principals"]), - stateStoreResources: !item["stateStoreResources"] - ? item["stateStoreResources"] - : stateStoreResourceRuleArraySerializer(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. */ -export interface BrokerResourceRule { - /** Give access for a Broker method (i.e., Connect, Subscribe, or Publish). */ - method: BrokerResourceDefinitionMethods; - /** A list of client IDs that match the clients. The client IDs are case-sensitive and must match the client IDs provided by the clients during connection. This subfield may be set if the method is Connect. */ - clientIds?: string[]; - /** A list of topics or topic patterns that match the topics that the clients can publish or subscribe to. This subfield is required if the method is Publish or Subscribe. */ - topics?: string[]; -} - -export function brokerResourceRuleSerializer(item: BrokerResourceRule): any { - return { - method: item["method"], - clientIds: !item["clientIds"] - ? item["clientIds"] - : item["clientIds"].map((p: any) => { - return p; - }), - topics: !item["topics"] - ? item["topics"] - : item["topics"].map((p: any) => { - return p; - }), - }; -} - -export function brokerResourceRuleDeserializer(item: any): BrokerResourceRule { - return { - method: item["method"], - clientIds: !item["clientIds"] - ? item["clientIds"] - : item["clientIds"].map((p: any) => { - return p; - }), - topics: !item["topics"] - ? item["topics"] - : item["topics"].map((p: any) => { - return p; - }), - }; -} - -/** BrokerResourceDefinitionMethods methods allowed */ -export enum KnownBrokerResourceDefinitionMethods { - /** Allowed Connecting to Broker */ - Connect = "Connect", - /** Allowed Publishing to Broker */ - Publish = "Publish", - /** Allowed Subscribing to Broker */ - Subscribe = "Subscribe", -} - -/** - * BrokerResourceDefinitionMethods methods allowed \ - * {@link KnownBrokerResourceDefinitionMethods} can be used interchangeably with BrokerResourceDefinitionMethods, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Connect**: Allowed Connecting to Broker \ - * **Publish**: Allowed Publishing to Broker \ - * **Subscribe**: Allowed Subscribing to Broker - */ -export type BrokerResourceDefinitionMethods = string; - -/** 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. */ - attributes?: Record[]; - /** A list of client IDs that match the clients. The client IDs are case-sensitive and must match the client IDs provided by the clients during connection. */ - clientIds?: string[]; - /** A list of usernames that match the clients. The usernames are case-sensitive and must match the usernames provided by the clients during authentication. */ - usernames?: string[]; -} - -export function principalDefinitionSerializer(item: PrincipalDefinition): any { - return { - attributes: !item["attributes"] - ? item["attributes"] - : item["attributes"].map((p: any) => { - return p; - }), - clientIds: !item["clientIds"] - ? item["clientIds"] - : item["clientIds"].map((p: any) => { - return p; - }), - usernames: !item["usernames"] - ? item["usernames"] - : item["usernames"].map((p: any) => { - return p; - }), - }; -} - -export function principalDefinitionDeserializer(item: any): PrincipalDefinition { - return { - attributes: !item["attributes"] - ? item["attributes"] - : item["attributes"].map((p: any) => { - return p; - }), - clientIds: !item["clientIds"] - ? item["clientIds"] - : item["clientIds"].map((p: any) => { - return p; - }), - usernames: !item["usernames"] - ? item["usernames"] - : item["usernames"].map((p: any) => { - return p; - }), - }; -} - -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. */ - keyType: StateStoreResourceKeyTypes; - /** Give access to state store keys for the corresponding principals defined. When key type is pattern set glob-style pattern (e.g., '*', 'clients/*'). */ - keys: string[]; - /** Give access for `Read`, `Write` and `ReadWrite` access level. */ - method: StateStoreResourceDefinitionMethods; -} - -export function stateStoreResourceRuleSerializer(item: StateStoreResourceRule): any { - return { - keyType: item["keyType"], - keys: item["keys"].map((p: any) => { - return p; - }), - method: item["method"], - }; -} - -export function stateStoreResourceRuleDeserializer(item: any): StateStoreResourceRule { - return { - keyType: item["keyType"], - keys: item["keys"].map((p: any) => { - return p; - }), - method: item["method"], - }; -} - -/** StateStoreResourceKeyTypes properties */ -export enum KnownStateStoreResourceKeyTypes { - /** Key type - pattern */ - Pattern = "Pattern", - /** Key type - string */ - String = "String", - /** Key type - binary */ - Binary = "Binary", -} - -/** - * StateStoreResourceKeyTypes properties \ - * {@link KnownStateStoreResourceKeyTypes} can be used interchangeably with StateStoreResourceKeyTypes, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Pattern**: Key type - pattern \ - * **String**: Key type - string \ - * **Binary**: Key type - binary - */ -export type StateStoreResourceKeyTypes = string; - -/** StateStoreResourceDefinitionMethods methods allowed */ -export enum KnownStateStoreResourceDefinitionMethods { - /** Get/KeyNotify from Store */ - Read = "Read", - /** Set/Delete in Store */ - Write = "Write", - /** Allowed all operations on Store - Get/KeyNotify/Set/Delete */ - ReadWrite = "ReadWrite", -} - -/** - * StateStoreResourceDefinitionMethods methods allowed \ - * {@link KnownStateStoreResourceDefinitionMethods} can be used interchangeably with StateStoreResourceDefinitionMethods, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Read**: Get\/KeyNotify from Store \ - * **Write**: Set\/Delete in Store \ - * **ReadWrite**: Allowed all operations on Store - Get\/KeyNotify\/Set\/Delete - */ -export type StateStoreResourceDefinitionMethods = string; - -/** The response of a BrokerAuthorizationResource list operation. */ -export interface _BrokerAuthorizationResourceListResult { - /** The BrokerAuthorizationResource items on this page */ - value: BrokerAuthorizationResource[]; - /** The link to the next page of items */ - nextLink?: string; -} - -export function _brokerAuthorizationResourceListResultDeserializer( - item: any, -): _BrokerAuthorizationResourceListResult { - return { - value: brokerAuthorizationResourceArrayDeserializer(item["value"]), - nextLink: item["nextLink"], - }; -} - -export function brokerAuthorizationResourceArraySerializer( - result: Array, -): any[] { - return result.map((item) => { - return brokerAuthorizationResourceSerializer(item); - }); -} - -export function brokerAuthorizationResourceArrayDeserializer( - result: Array, -): any[] { - return result.map((item) => { - return brokerAuthorizationResourceDeserializer(item); - }); -} - -/** Instance broker authentication resource */ -export interface BrokerAuthenticationResource extends ProxyResource { - /** The resource-specific properties for this resource. */ - properties?: BrokerAuthenticationProperties; - /** Edge location of the resource. */ - extendedLocation: ExtendedLocation; -} - -export function brokerAuthenticationResourceSerializer(item: BrokerAuthenticationResource): any { - return { - properties: !item["properties"] - ? item["properties"] - : brokerAuthenticationPropertiesSerializer(item["properties"]), - extendedLocation: extendedLocationSerializer(item["extendedLocation"]), - }; -} - -export function brokerAuthenticationResourceDeserializer(item: any): BrokerAuthenticationResource { - return { - id: item["id"], - name: item["name"], - type: item["type"], - systemData: !item["systemData"] - ? item["systemData"] - : systemDataDeserializer(item["systemData"]), - properties: !item["properties"] - ? item["properties"] - : brokerAuthenticationPropertiesDeserializer(item["properties"]), - extendedLocation: extendedLocationDeserializer(item["extendedLocation"]), - }; -} - -/** BrokerAuthentication Resource properties */ -export interface BrokerAuthenticationProperties { - /** Defines a set of Broker authentication methods to be used on `BrokerListeners`. For each array element one authenticator type supported. */ - authenticationMethods: BrokerAuthenticatorMethods[]; - /** The status of the last operation. */ - readonly provisioningState?: ProvisioningState; -} - -export function brokerAuthenticationPropertiesSerializer( - item: BrokerAuthenticationProperties, -): any { - return { - authenticationMethods: brokerAuthenticatorMethodsArraySerializer(item["authenticationMethods"]), - }; -} - -export function brokerAuthenticationPropertiesDeserializer( - item: any, -): BrokerAuthenticationProperties { - return { - authenticationMethods: brokerAuthenticatorMethodsArrayDeserializer( - item["authenticationMethods"], - ), - 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. */ - method: BrokerAuthenticationMethod; - /** Custom authentication configuration. */ - customSettings?: BrokerAuthenticatorMethodCustom; - /** ServiceAccountToken authentication configuration. */ - serviceAccountTokenSettings?: BrokerAuthenticatorMethodSat; - /** X.509 authentication configuration. */ - x509Settings?: BrokerAuthenticatorMethodX509; -} - -export function brokerAuthenticatorMethodsSerializer(item: BrokerAuthenticatorMethods): any { - return { - method: item["method"], - customSettings: !item["customSettings"] - ? item["customSettings"] - : brokerAuthenticatorMethodCustomSerializer(item["customSettings"]), - serviceAccountTokenSettings: !item["serviceAccountTokenSettings"] - ? item["serviceAccountTokenSettings"] - : brokerAuthenticatorMethodSatSerializer(item["serviceAccountTokenSettings"]), - x509Settings: !item["x509Settings"] - ? item["x509Settings"] - : brokerAuthenticatorMethodX509Serializer(item["x509Settings"]), - }; -} - -export function brokerAuthenticatorMethodsDeserializer(item: any): BrokerAuthenticatorMethods { - return { - method: item["method"], - customSettings: !item["customSettings"] - ? item["customSettings"] - : brokerAuthenticatorMethodCustomDeserializer(item["customSettings"]), - serviceAccountTokenSettings: !item["serviceAccountTokenSettings"] - ? item["serviceAccountTokenSettings"] - : brokerAuthenticatorMethodSatDeserializer(item["serviceAccountTokenSettings"]), - x509Settings: !item["x509Settings"] - ? item["x509Settings"] - : brokerAuthenticatorMethodX509Deserializer(item["x509Settings"]), - }; -} - -/** Broker Authentication Mode */ -export enum KnownBrokerAuthenticationMethod { - /** Custom authentication configuration. */ - Custom = "Custom", - /** ServiceAccountToken authentication configuration. */ - ServiceAccountToken = "ServiceAccountToken", - /** X.509 authentication configuration. */ - X509 = "X509", -} - -/** - * Broker Authentication Mode \ - * {@link KnownBrokerAuthenticationMethod} can be used interchangeably with BrokerAuthenticationMethod, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Custom**: Custom authentication configuration. \ - * **ServiceAccountToken**: ServiceAccountToken authentication configuration. \ - * **X509**: X.509 authentication configuration. - */ -export type BrokerAuthenticationMethod = string; - -/** Custom method for BrokerAuthentication */ -export interface BrokerAuthenticatorMethodCustom { - /** Optional authentication needed for authenticating with the custom authentication server. */ - auth?: BrokerAuthenticatorCustomAuth; - /** Optional CA certificate for validating the custom authentication server's certificate. */ - caCertConfigMap?: string; - /** Endpoint of the custom authentication server. Must be an HTTPS endpoint. */ - endpoint: string; - /** Additional HTTP headers to pass to the custom authentication server. */ - headers?: Record; -} - -export function brokerAuthenticatorMethodCustomSerializer( - item: BrokerAuthenticatorMethodCustom, -): any { - return { - auth: !item["auth"] ? item["auth"] : brokerAuthenticatorCustomAuthSerializer(item["auth"]), - caCertConfigMap: item["caCertConfigMap"], - endpoint: item["endpoint"], - headers: item["headers"], - }; -} - -export function brokerAuthenticatorMethodCustomDeserializer( - item: any, -): BrokerAuthenticatorMethodCustom { - return { - auth: !item["auth"] ? item["auth"] : brokerAuthenticatorCustomAuthDeserializer(item["auth"]), - caCertConfigMap: item["caCertConfigMap"], - endpoint: item["endpoint"], - headers: item["headers"], - }; -} - -/** Custom Authentication properties */ -export interface BrokerAuthenticatorCustomAuth { - /** X509 Custom Auth type details. */ - x509: X509ManualCertificate; -} - -export function brokerAuthenticatorCustomAuthSerializer(item: BrokerAuthenticatorCustomAuth): any { - return { x509: x509ManualCertificateSerializer(item["x509"]) }; -} - -export function brokerAuthenticatorCustomAuthDeserializer( - item: any, -): BrokerAuthenticatorCustomAuth { - return { - x509: x509ManualCertificateDeserializer(item["x509"]), - }; -} - -/** X509 Certificate Authentication properties. */ -export interface X509ManualCertificate { - /** Kubernetes secret containing an X.509 client certificate. This is a reference to the secret through an identifying name, not the secret itself. */ - secretRef: string; -} - -export function x509ManualCertificateSerializer(item: X509ManualCertificate): any { - return { secretRef: item["secretRef"] }; -} - -export function x509ManualCertificateDeserializer(item: any): X509ManualCertificate { - return { - secretRef: item["secretRef"], - }; -} - -/** Service Account Token for BrokerAuthentication */ -export interface BrokerAuthenticatorMethodSat { - /** List of allowed audience. */ - audiences: string[]; -} - -export function brokerAuthenticatorMethodSatSerializer(item: BrokerAuthenticatorMethodSat): any { - return { - audiences: item["audiences"].map((p: any) => { - return p; - }), - }; -} - -export function brokerAuthenticatorMethodSatDeserializer(item: any): BrokerAuthenticatorMethodSat { - return { - audiences: item["audiences"].map((p: any) => { - return p; - }), - }; -} - -/** X509 for BrokerAuthentication. */ -export interface BrokerAuthenticatorMethodX509 { - /** X509 authorization attributes properties. */ - authorizationAttributes?: Record; - /** Name of the trusted client ca cert resource. */ - trustedClientCaCert?: string; -} - -export function brokerAuthenticatorMethodX509Serializer(item: BrokerAuthenticatorMethodX509): any { - return { - authorizationAttributes: !item["authorizationAttributes"] - ? item["authorizationAttributes"] - : brokerAuthenticatorMethodX509AttributesRecordSerializer(item["authorizationAttributes"]), - trustedClientCaCert: item["trustedClientCaCert"], - }; -} - -export function brokerAuthenticatorMethodX509Deserializer( - item: any, -): BrokerAuthenticatorMethodX509 { - return { - authorizationAttributes: !item["authorizationAttributes"] - ? item["authorizationAttributes"] - : brokerAuthenticatorMethodX509AttributesRecordDeserializer(item["authorizationAttributes"]), - trustedClientCaCert: item["trustedClientCaCert"], - }; -} - -export function brokerAuthenticatorMethodX509AttributesRecordSerializer( - item: Record, -): Record { - const result: Record = {}; - Object.keys(item).map((key) => { - result[key] = !item[key] - ? item[key] - : brokerAuthenticatorMethodX509AttributesSerializer(item[key]); - }); - return result; -} - -export function brokerAuthenticatorMethodX509AttributesRecordDeserializer( - item: Record, -): Record { - const result: Record = {}; - Object.keys(item).map((key) => { - result[key] = !item[key] - ? item[key] - : brokerAuthenticatorMethodX509AttributesDeserializer(item[key]); - }); - return result; -} - -/** 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"], - }; -} - -/** The response of a BrokerAuthenticationResource list operation. */ -export interface _BrokerAuthenticationResourceListResult { - /** The BrokerAuthenticationResource items on this page */ - value: BrokerAuthenticationResource[]; - /** The link to the next page of items */ - nextLink?: string; -} - -export function _brokerAuthenticationResourceListResultDeserializer( - item: any, -): _BrokerAuthenticationResourceListResult { - return { - value: brokerAuthenticationResourceArrayDeserializer(item["value"]), - nextLink: item["nextLink"], - }; -} - -export function brokerAuthenticationResourceArraySerializer( - result: Array, -): any[] { - return result.map((item) => { - return brokerAuthenticationResourceSerializer(item); - }); -} - -export function brokerAuthenticationResourceArrayDeserializer( - result: Array, -): any[] { - return result.map((item) => { - return brokerAuthenticationResourceDeserializer(item); - }); -} - -/** Instance broker resource */ -export interface BrokerListenerResource extends ProxyResource { - /** The resource-specific properties for this resource. */ - properties?: BrokerListenerProperties; - /** Edge location of the resource. */ - extendedLocation: ExtendedLocation; -} - -export function brokerListenerResourceSerializer(item: BrokerListenerResource): any { - return { - properties: !item["properties"] - ? item["properties"] - : brokerListenerPropertiesSerializer(item["properties"]), - extendedLocation: extendedLocationSerializer(item["extendedLocation"]), - }; -} - -export function brokerListenerResourceDeserializer(item: any): BrokerListenerResource { - return { - id: item["id"], - name: item["name"], - type: item["type"], - systemData: !item["systemData"] - ? item["systemData"] - : systemDataDeserializer(item["systemData"]), - properties: !item["properties"] - ? item["properties"] - : brokerListenerPropertiesDeserializer(item["properties"]), - extendedLocation: extendedLocationDeserializer(item["extendedLocation"]), - }; -} - -/** Defines a Broker listener. A listener is a collection of ports on which the broker accepts connections from clients. */ -export interface BrokerListenerProperties { - /** Kubernetes Service name of this listener. */ - serviceName?: string; - /** Ports on which this listener accepts client connections. */ - ports: ListenerPort[]; - /** Kubernetes Service type of this listener. */ - serviceType?: ServiceType; - /** The status of the last operation. */ - readonly provisioningState?: ProvisioningState; -} - -export function brokerListenerPropertiesSerializer(item: BrokerListenerProperties): any { - return { - serviceName: item["serviceName"], - ports: listenerPortArraySerializer(item["ports"]), - serviceType: item["serviceType"], - }; -} - -export function brokerListenerPropertiesDeserializer(item: any): BrokerListenerProperties { - return { - serviceName: item["serviceName"], - ports: listenerPortArrayDeserializer(item["ports"]), - serviceType: item["serviceType"], - 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. */ - authenticationRef?: string; - /** Reference to client authorization settings. Omit to disable authorization. */ - authorizationRef?: string; - /** Kubernetes node port. Only relevant when this port is associated with a `NodePort` listener. */ - nodePort?: number; - /** TCP port for accepting client connections. */ - port: number; - /** Protocol to use for client connections. */ - protocol?: BrokerProtocolType; - /** TLS server certificate settings for this port. Omit to disable TLS. */ - tls?: TlsCertMethod; -} - -export function listenerPortSerializer(item: ListenerPort): any { - return { - authenticationRef: item["authenticationRef"], - authorizationRef: item["authorizationRef"], - nodePort: item["nodePort"], - port: item["port"], - protocol: item["protocol"], - tls: !item["tls"] ? item["tls"] : tlsCertMethodSerializer(item["tls"]), - }; -} - -export function listenerPortDeserializer(item: any): ListenerPort { - return { - authenticationRef: item["authenticationRef"], - authorizationRef: item["authorizationRef"], - nodePort: item["nodePort"], - port: item["port"], - protocol: item["protocol"], - tls: !item["tls"] ? item["tls"] : tlsCertMethodDeserializer(item["tls"]), - }; -} - -/** Collection of different TLS types, NOTE- Enum at a time only one of them needs to be supported */ -export interface TlsCertMethod { - /** Mode of TLS server certificate management. */ - mode: TlsCertMethodMode; - /** Option 1 - Automatic TLS server certificate management with cert-manager. */ - certManagerCertificateSpec?: CertManagerCertificateSpec; - /** Option 2 - Manual TLS server certificate management through a defined secret. */ - manual?: X509ManualCertificate; -} - -export function tlsCertMethodSerializer(item: TlsCertMethod): any { - return { - mode: item["mode"], - certManagerCertificateSpec: !item["certManagerCertificateSpec"] - ? item["certManagerCertificateSpec"] - : certManagerCertificateSpecSerializer(item["certManagerCertificateSpec"]), - manual: !item["manual"] ? item["manual"] : x509ManualCertificateSerializer(item["manual"]), - }; -} - -export function tlsCertMethodDeserializer(item: any): TlsCertMethod { - return { - mode: item["mode"], - certManagerCertificateSpec: !item["certManagerCertificateSpec"] - ? item["certManagerCertificateSpec"] - : certManagerCertificateSpecDeserializer(item["certManagerCertificateSpec"]), - manual: !item["manual"] ? item["manual"] : x509ManualCertificateDeserializer(item["manual"]), - }; -} - -/** Broker Authentication Mode */ -export enum KnownTlsCertMethodMode { - /** Automatic TLS server certificate configuration. */ - Automatic = "Automatic", - /** Manual TLS server certificate configuration. */ - Manual = "Manual", -} - -/** - * Broker Authentication Mode \ - * {@link KnownTlsCertMethodMode} can be used interchangeably with TlsCertMethodMode, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Automatic**: Automatic TLS server certificate configuration. \ - * **Manual**: Manual TLS server certificate configuration. - */ -export type TlsCertMethodMode = string; - -/** Automatic TLS server certificate management with cert-manager */ -export interface CertManagerCertificateSpec { - /** Lifetime of certificate. Must be specified using a Go time.Duration format (h|m|s). E.g. 240h for 240 hours and 45m for 45 minutes. */ - duration?: string; - /** Secret for storing server certificate. Any existing data will be overwritten. This is a reference to the secret through an identifying name, not the secret itself. */ - secretName?: string; - /** When to begin renewing certificate. Must be specified using a Go time.Duration format (h|m|s). E.g. 240h for 240 hours and 45m for 45 minutes. */ - renewBefore?: string; - /** cert-manager issuerRef. */ - issuerRef: CertManagerIssuerRef; - /** Type of certificate private key. */ - privateKey?: CertManagerPrivateKey; - /** Additional Subject Alternative Names (SANs) to include in the certificate. */ - san?: SanForCert; -} - -export function certManagerCertificateSpecSerializer(item: CertManagerCertificateSpec): any { - return { - duration: item["duration"], - secretName: item["secretName"], - renewBefore: item["renewBefore"], - issuerRef: certManagerIssuerRefSerializer(item["issuerRef"]), - privateKey: !item["privateKey"] - ? item["privateKey"] - : certManagerPrivateKeySerializer(item["privateKey"]), - san: !item["san"] ? item["san"] : sanForCertSerializer(item["san"]), - }; -} - -export function certManagerCertificateSpecDeserializer(item: any): CertManagerCertificateSpec { - return { - duration: item["duration"], - secretName: item["secretName"], - renewBefore: item["renewBefore"], - issuerRef: certManagerIssuerRefDeserializer(item["issuerRef"]), - privateKey: !item["privateKey"] - ? item["privateKey"] - : certManagerPrivateKeyDeserializer(item["privateKey"]), - san: !item["san"] ? item["san"] : sanForCertDeserializer(item["san"]), - }; -} - -/** Cert-Manager issuerRef properties */ -export interface CertManagerIssuerRef { - /** group of issuer. */ - group: string; - /** kind of issuer (Issuer or ClusterIssuer). */ - kind: CertManagerIssuerKind; - /** name of issuer. */ - name: string; -} - -export function certManagerIssuerRefSerializer(item: CertManagerIssuerRef): any { - return { group: item["group"], kind: item["kind"], name: item["name"] }; -} - -export function certManagerIssuerRefDeserializer(item: any): CertManagerIssuerRef { - return { - group: item["group"], - kind: item["kind"], - name: item["name"], - }; -} - -/** CertManagerIssuerKind properties */ -export enum KnownCertManagerIssuerKind { - /** Issuer kind. */ - Issuer = "Issuer", - /** ClusterIssuer kind. */ - ClusterIssuer = "ClusterIssuer", -} - -/** - * CertManagerIssuerKind properties \ - * {@link KnownCertManagerIssuerKind} can be used interchangeably with CertManagerIssuerKind, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Issuer**: Issuer kind. \ - * **ClusterIssuer**: ClusterIssuer kind. - */ -export type CertManagerIssuerKind = string; - -/** Cert Manager private key properties */ -export interface CertManagerPrivateKey { - /** algorithm for private key. */ - algorithm: PrivateKeyAlgorithm; - /** cert-manager private key rotationPolicy. */ - rotationPolicy: PrivateKeyRotationPolicy; -} - -export function certManagerPrivateKeySerializer(item: CertManagerPrivateKey): any { - return { - algorithm: item["algorithm"], - rotationPolicy: item["rotationPolicy"], - }; -} - -export function certManagerPrivateKeyDeserializer(item: any): CertManagerPrivateKey { - return { - algorithm: item["algorithm"], - rotationPolicy: item["rotationPolicy"], - }; -} - -/** Private key algorithm types. */ -export enum KnownPrivateKeyAlgorithm { - /** Algorithm - ec256. */ - Ec256 = "Ec256", - /** Algorithm - ec384. */ - Ec384 = "Ec384", - /** Algorithm - ec521. */ - Ec521 = "Ec521", - /** Algorithm - ed25519. */ - Ed25519 = "Ed25519", - /** Algorithm - rsa2048. */ - Rsa2048 = "Rsa2048", - /** Algorithm - rsa4096. */ - Rsa4096 = "Rsa4096", - /** Algorithm - rsa8192. */ - Rsa8192 = "Rsa8192", -} - -/** - * Private key algorithm types. \ - * {@link KnownPrivateKeyAlgorithm} can be used interchangeably with PrivateKeyAlgorithm, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Ec256**: Algorithm - ec256. \ - * **Ec384**: Algorithm - ec384. \ - * **Ec521**: Algorithm - ec521. \ - * **Ed25519**: Algorithm - ed25519. \ - * **Rsa2048**: Algorithm - rsa2048. \ - * **Rsa4096**: Algorithm - rsa4096. \ - * **Rsa8192**: Algorithm - rsa8192. - */ -export type PrivateKeyAlgorithm = string; - -/** Private key rotation policy. */ -export enum KnownPrivateKeyRotationPolicy { - /** Rotation Policy - Always. */ - Always = "Always", - /** Rotation Policy - Never. */ - Never = "Never", -} - -/** - * Private key rotation policy. \ - * {@link KnownPrivateKeyRotationPolicy} can be used interchangeably with PrivateKeyRotationPolicy, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Always**: Rotation Policy - Always. \ - * **Never**: Rotation Policy - Never. - */ -export type PrivateKeyRotationPolicy = string; - -/** Subject Alternative Names (SANs) for certificate. */ -export interface SanForCert { - /** DNS SANs. */ - dns: string[]; - /** IP address SANs. */ - ip: string[]; -} - -export function sanForCertSerializer(item: SanForCert): any { - return { - dns: item["dns"].map((p: any) => { - return p; - }), - ip: item["ip"].map((p: any) => { - return p; - }), - }; -} - -export function sanForCertDeserializer(item: any): SanForCert { - return { - dns: item["dns"].map((p: any) => { - return p; - }), - ip: item["ip"].map((p: any) => { - return p; - }), - }; -} - -/** Kubernetes Service Types supported by Listener */ -export enum KnownServiceType { - /** Cluster IP Service. */ - ClusterIp = "ClusterIp", - /** Load Balancer Service. */ - LoadBalancer = "LoadBalancer", - /** Node Port Service. */ - NodePort = "NodePort", -} - -/** - * Kubernetes Service Types supported by Listener \ - * {@link KnownServiceType} can be used interchangeably with ServiceType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **ClusterIp**: Cluster IP Service. \ - * **LoadBalancer**: Load Balancer Service. \ - * **NodePort**: Node Port Service. - */ -export type ServiceType = string; - -/** The response of a BrokerListenerResource list operation. */ -export interface _BrokerListenerResourceListResult { - /** The BrokerListenerResource items on this page */ - value: BrokerListenerResource[]; - /** The link to the next page of items */ - nextLink?: string; -} - -export function _brokerListenerResourceListResultDeserializer( - item: any, -): _BrokerListenerResourceListResult { - return { - value: brokerListenerResourceArrayDeserializer(item["value"]), - nextLink: item["nextLink"], - }; -} - -export function brokerListenerResourceArraySerializer( - result: Array, -): any[] { - return result.map((item) => { - return brokerListenerResourceSerializer(item); - }); -} - -export function brokerListenerResourceArrayDeserializer( - result: Array, -): any[] { - return result.map((item) => { - return brokerListenerResourceDeserializer(item); - }); -} - -/** Instance broker resource */ -export interface BrokerResource extends ProxyResource { - /** The resource-specific properties for this resource. */ - properties?: BrokerProperties; - /** Edge location of the resource. */ - extendedLocation: ExtendedLocation; -} - -export function brokerResourceSerializer(item: BrokerResource): any { - return { - properties: !item["properties"] - ? item["properties"] - : brokerPropertiesSerializer(item["properties"]), - extendedLocation: extendedLocationSerializer(item["extendedLocation"]), - }; -} - -export function brokerResourceDeserializer(item: any): BrokerResource { - return { - id: item["id"], - name: item["name"], - type: item["type"], - systemData: !item["systemData"] - ? item["systemData"] - : systemDataDeserializer(item["systemData"]), - properties: !item["properties"] - ? item["properties"] - : brokerPropertiesDeserializer(item["properties"]), - extendedLocation: extendedLocationDeserializer(item["extendedLocation"]), - }; -} - -/** Broker Resource properties */ -export interface BrokerProperties { - /** Advanced settings of Broker. */ - advanced?: AdvancedSettings; - /** The cardinality details of the broker. */ - cardinality?: Cardinality; - /** Spec defines the desired identities of Broker diagnostics settings. */ - diagnostics?: BrokerDiagnostics; - /** Settings of Disk Backed Message Buffer. */ - diskBackedMessageBuffer?: DiskBackedMessageBuffer; - /** This setting controls whether Kubernetes CPU resource limits are requested. Increasing the number of replicas or workers proportionally increases the amount of CPU resources requested. If this setting is enabled and there are insufficient CPU resources, an error will be emitted. */ - generateResourceLimits?: GenerateResourceLimits; - /** Memory profile of Broker. */ - memoryProfile?: BrokerMemoryProfile; - /** The status of the last operation. */ - readonly provisioningState?: ProvisioningState; -} - -export function brokerPropertiesSerializer(item: BrokerProperties): any { - return { - advanced: !item["advanced"] ? item["advanced"] : advancedSettingsSerializer(item["advanced"]), - cardinality: !item["cardinality"] - ? item["cardinality"] - : cardinalitySerializer(item["cardinality"]), - diagnostics: !item["diagnostics"] - ? item["diagnostics"] - : brokerDiagnosticsSerializer(item["diagnostics"]), - diskBackedMessageBuffer: !item["diskBackedMessageBuffer"] - ? item["diskBackedMessageBuffer"] - : diskBackedMessageBufferSerializer(item["diskBackedMessageBuffer"]), - generateResourceLimits: !item["generateResourceLimits"] - ? item["generateResourceLimits"] - : generateResourceLimitsSerializer(item["generateResourceLimits"]), - memoryProfile: item["memoryProfile"], - }; -} - -export function brokerPropertiesDeserializer(item: any): BrokerProperties { - return { - advanced: !item["advanced"] ? item["advanced"] : advancedSettingsDeserializer(item["advanced"]), - cardinality: !item["cardinality"] - ? item["cardinality"] - : cardinalityDeserializer(item["cardinality"]), - diagnostics: !item["diagnostics"] - ? item["diagnostics"] - : brokerDiagnosticsDeserializer(item["diagnostics"]), - diskBackedMessageBuffer: !item["diskBackedMessageBuffer"] - ? item["diskBackedMessageBuffer"] - : diskBackedMessageBufferDeserializer(item["diskBackedMessageBuffer"]), - generateResourceLimits: !item["generateResourceLimits"] - ? item["generateResourceLimits"] - : generateResourceLimitsDeserializer(item["generateResourceLimits"]), - memoryProfile: item["memoryProfile"], - provisioningState: item["provisioningState"], - }; -} - -/** Broker Advanced Settings */ -export interface AdvancedSettings { - /** Configurations related to All Clients. */ - clients?: ClientConfig; - /** The setting to enable or disable encryption of internal Traffic. */ - encryptInternalTraffic?: OperationalMode; - /** Certificate rotation and private key configuration. */ - internalCerts?: CertManagerCertOptions; -} - -export function advancedSettingsSerializer(item: AdvancedSettings): any { - return { - clients: !item["clients"] ? item["clients"] : clientConfigSerializer(item["clients"]), - encryptInternalTraffic: item["encryptInternalTraffic"], - internalCerts: !item["internalCerts"] - ? item["internalCerts"] - : certManagerCertOptionsSerializer(item["internalCerts"]), - }; -} - -export function advancedSettingsDeserializer(item: any): AdvancedSettings { - return { - clients: !item["clients"] ? item["clients"] : clientConfigDeserializer(item["clients"]), - encryptInternalTraffic: item["encryptInternalTraffic"], - internalCerts: !item["internalCerts"] - ? item["internalCerts"] - : certManagerCertOptionsDeserializer(item["internalCerts"]), - }; -} - -/** The settings of Client Config. */ -export interface ClientConfig { - /** Upper bound of Session Expiry Interval, in seconds. */ - maxSessionExpirySeconds?: number; - /** Upper bound of Message Expiry Interval, in seconds. */ - maxMessageExpirySeconds?: number; - /** Max message size for a packet in Bytes. */ - maxPacketSizeBytes?: number; - /** The limit on the number of queued messages for a subscriber. */ - subscriberQueueLimit?: SubscriberQueueLimit; - /** Upper bound of Receive Maximum that a client can request in the CONNECT packet. */ - maxReceiveMaximum?: number; - /** Upper bound of a client's Keep Alive, in seconds. */ - maxKeepAliveSeconds?: number; -} - -export function clientConfigSerializer(item: ClientConfig): any { - return { - maxSessionExpirySeconds: item["maxSessionExpirySeconds"], - maxMessageExpirySeconds: item["maxMessageExpirySeconds"], - maxPacketSizeBytes: item["maxPacketSizeBytes"], - subscriberQueueLimit: !item["subscriberQueueLimit"] - ? item["subscriberQueueLimit"] - : subscriberQueueLimitSerializer(item["subscriberQueueLimit"]), - maxReceiveMaximum: item["maxReceiveMaximum"], - maxKeepAliveSeconds: item["maxKeepAliveSeconds"], - }; -} - -export function clientConfigDeserializer(item: any): ClientConfig { - return { - maxSessionExpirySeconds: item["maxSessionExpirySeconds"], - maxMessageExpirySeconds: item["maxMessageExpirySeconds"], - maxPacketSizeBytes: item["maxPacketSizeBytes"], - subscriberQueueLimit: !item["subscriberQueueLimit"] - ? item["subscriberQueueLimit"] - : subscriberQueueLimitDeserializer(item["subscriberQueueLimit"]), - maxReceiveMaximum: item["maxReceiveMaximum"], - maxKeepAliveSeconds: item["maxKeepAliveSeconds"], - }; -} - -/** The settings of Subscriber Queue Limit. */ -export interface SubscriberQueueLimit { - /** The maximum length of the queue before messages start getting dropped. */ - length?: number; - /** The strategy to use for dropping messages from the queue. */ - strategy?: SubscriberMessageDropStrategy; -} - -export function subscriberQueueLimitSerializer(item: SubscriberQueueLimit): any { - return { length: item["length"], strategy: item["strategy"] }; -} - -export function subscriberQueueLimitDeserializer(item: any): SubscriberQueueLimit { - return { - length: item["length"], - strategy: item["strategy"], - }; -} - -/** The enum defining strategies for dropping messages from the subscriber queue. */ -export enum KnownSubscriberMessageDropStrategy { - /** Messages are never dropped. */ - None = "None", - /** The oldest message is dropped. */ - DropOldest = "DropOldest", -} - -/** - * The enum defining strategies for dropping messages from the subscriber queue. \ - * {@link KnownSubscriberMessageDropStrategy} can be used interchangeably with SubscriberMessageDropStrategy, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **None**: Messages are never dropped. \ - * **DropOldest**: The oldest message is dropped. - */ -export type SubscriberMessageDropStrategy = string; - -/** Cert Manager Cert properties */ -export interface CertManagerCertOptions { - /** Lifetime of certificate. Must be specified using a Go time.Duration format (h|m|s). E.g. 240h for 240 hours and 45m for 45 minutes. */ - duration: string; - /** When to begin renewing certificate. Must be specified using a Go time.Duration format (h|m|s). E.g. 240h for 240 hours and 45m for 45 minutes. */ - renewBefore: string; - /** Configuration of certificate private key. */ - privateKey: CertManagerPrivateKey; -} - -export function certManagerCertOptionsSerializer(item: CertManagerCertOptions): any { - return { - duration: item["duration"], - renewBefore: item["renewBefore"], - privateKey: certManagerPrivateKeySerializer(item["privateKey"]), - }; -} - -export function certManagerCertOptionsDeserializer(item: any): CertManagerCertOptions { - return { - duration: item["duration"], - renewBefore: item["renewBefore"], - privateKey: certManagerPrivateKeyDeserializer(item["privateKey"]), - }; -} - -/** Cardinality properties */ -export interface Cardinality { - /** The backend broker desired properties */ - backendChain: BackendChain; - /** The frontend desired properties */ - frontend: Frontend; -} - -export function cardinalitySerializer(item: Cardinality): any { - return { - backendChain: backendChainSerializer(item["backendChain"]), - frontend: frontendSerializer(item["frontend"]), - }; -} - -export function cardinalityDeserializer(item: any): Cardinality { - return { - backendChain: backendChainDeserializer(item["backendChain"]), - frontend: frontendDeserializer(item["frontend"]), - }; -} - -/** Desired properties of the backend instances of the broker */ -export interface BackendChain { - /** The desired number of physical backend partitions. */ - partitions: number; - /** The desired numbers of backend replicas (pods) in a physical partition. */ - redundancyFactor: number; - /** Number of logical backend workers per replica (pod). */ - workers?: number; -} - -export function backendChainSerializer(item: BackendChain): any { - return { - partitions: item["partitions"], - redundancyFactor: item["redundancyFactor"], - workers: item["workers"], - }; -} - -export function backendChainDeserializer(item: any): BackendChain { - return { - partitions: item["partitions"], - redundancyFactor: item["redundancyFactor"], - workers: item["workers"], - }; -} - -/** The desired properties of the frontend instances of the Broker */ -export interface Frontend { - /** The desired number of frontend instances (pods). */ - replicas: number; - /** Number of logical frontend workers per instance (pod). */ - workers?: number; -} - -export function frontendSerializer(item: Frontend): any { - return { replicas: item["replicas"], workers: item["workers"] }; -} - -export function frontendDeserializer(item: any): Frontend { - return { - replicas: item["replicas"], - workers: item["workers"], - }; -} - -/** Broker Diagnostic Setting properties */ -export interface BrokerDiagnostics { - /** Diagnostic log settings for the resource. */ - logs?: DiagnosticsLogs; - /** The metrics settings for the resource. */ - metrics?: Metrics; - /** The self check properties. */ - selfCheck?: SelfCheck; - /** The trace properties. */ - traces?: Traces; -} - -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"]), - 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"]), - }; -} - -/** Broker Diagnostic Self check properties */ -export interface SelfCheck { - /** The toggle to enable/disable self check. */ - mode?: OperationalMode; - /** The self check interval. */ - intervalSeconds?: number; - /** The timeout for self check. */ - timeoutSeconds?: number; -} - -export function selfCheckSerializer(item: SelfCheck): any { - return { - mode: item["mode"], - intervalSeconds: item["intervalSeconds"], - timeoutSeconds: item["timeoutSeconds"], - }; -} - -export function selfCheckDeserializer(item: any): SelfCheck { - return { - mode: item["mode"], - intervalSeconds: item["intervalSeconds"], - timeoutSeconds: item["timeoutSeconds"], - }; -} - -/** Broker Diagnostic Trace properties */ -export interface Traces { - /** The toggle to enable/disable traces. */ - mode?: OperationalMode; - /** The cache size in megabytes. */ - cacheSizeMegabytes?: number; - /** The self tracing properties. */ - selfTracing?: SelfTracing; - /** The span channel capacity. */ - spanChannelCapacity?: number; -} - -export function tracesSerializer(item: Traces): any { - return { - mode: item["mode"], - cacheSizeMegabytes: item["cacheSizeMegabytes"], - selfTracing: !item["selfTracing"] - ? item["selfTracing"] - : selfTracingSerializer(item["selfTracing"]), - spanChannelCapacity: item["spanChannelCapacity"], - }; -} - -export function tracesDeserializer(item: any): Traces { - return { - mode: item["mode"], - cacheSizeMegabytes: item["cacheSizeMegabytes"], - selfTracing: !item["selfTracing"] - ? item["selfTracing"] - : selfTracingDeserializer(item["selfTracing"]), - spanChannelCapacity: item["spanChannelCapacity"], - }; -} - -/** Diagnostic Self tracing properties */ -export interface SelfTracing { - /** The toggle to enable/disable self tracing. */ - mode?: OperationalMode; - /** The self tracing interval. */ - intervalSeconds?: number; -} - -export function selfTracingSerializer(item: SelfTracing): any { - return { mode: item["mode"], intervalSeconds: item["intervalSeconds"] }; -} - -export function selfTracingDeserializer(item: any): SelfTracing { - return { - mode: item["mode"], - intervalSeconds: item["intervalSeconds"], - }; -} - -/** DiskBackedMessageBuffer properties */ -export interface DiskBackedMessageBuffer { - /** The max size of the message buffer on disk. If a PVC template is specified using one of ephemeralVolumeClaimSpec or persistentVolumeClaimSpec, then this size is used as the request and limit sizes of that template. If neither ephemeralVolumeClaimSpec nor persistentVolumeClaimSpec are specified, then an emptyDir volume is mounted with this size as its limit. See for details. */ - maxSize: string; - /** Use the specified persistent volume claim template to mount a "generic ephemeral volume" for the message buffer. See for details. */ - ephemeralVolumeClaimSpec?: VolumeClaimSpec; - /** Use the specified persistent volume claim template to mount a persistent volume for the message buffer. */ - persistentVolumeClaimSpec?: VolumeClaimSpec; -} - -export function diskBackedMessageBufferSerializer(item: DiskBackedMessageBuffer): any { - return { - maxSize: item["maxSize"], - ephemeralVolumeClaimSpec: !item["ephemeralVolumeClaimSpec"] - ? item["ephemeralVolumeClaimSpec"] - : volumeClaimSpecSerializer(item["ephemeralVolumeClaimSpec"]), - persistentVolumeClaimSpec: !item["persistentVolumeClaimSpec"] - ? item["persistentVolumeClaimSpec"] - : volumeClaimSpecSerializer(item["persistentVolumeClaimSpec"]), - }; -} - -export function diskBackedMessageBufferDeserializer(item: any): DiskBackedMessageBuffer { - return { - maxSize: item["maxSize"], - ephemeralVolumeClaimSpec: !item["ephemeralVolumeClaimSpec"] - ? item["ephemeralVolumeClaimSpec"] - : volumeClaimSpecDeserializer(item["ephemeralVolumeClaimSpec"]), - persistentVolumeClaimSpec: !item["persistentVolumeClaimSpec"] - ? item["persistentVolumeClaimSpec"] - : volumeClaimSpecDeserializer(item["persistentVolumeClaimSpec"]), - }; -} - -/** VolumeClaimSpec properties */ -export interface VolumeClaimSpec { - /** VolumeName is the binding reference to the PersistentVolume backing this claim. */ - volumeName?: string; - /** volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec. This is a beta feature. */ - volumeMode?: string; - /** Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1 */ - storageClassName?: string; - /** AccessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 */ - accessModes?: string[]; - /** This field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. If the AnyVolumeDataSource feature gate is enabled, this field will always have the same contents as the DataSourceRef field. */ - dataSource?: LocalKubernetesReference; - /** Specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any local object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the DataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, both fields (DataSource and DataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. There are two important differences between DataSource and DataSourceRef: * While DataSource only allows two specific types of objects, DataSourceRef allows any non-core object, as well as PersistentVolumeClaim objects. * While DataSource ignores disallowed values (dropping them), DataSourceRef preserves all values, and generates an error if a disallowed value is specified. (Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled. */ - dataSourceRef?: KubernetesReference; - /** Resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources */ - resources?: VolumeClaimResourceRequirements; - /** A label query over volumes to consider for binding. */ - selector?: VolumeClaimSpecSelector; -} - -export function volumeClaimSpecSerializer(item: VolumeClaimSpec): any { - return { - volumeName: item["volumeName"], - volumeMode: item["volumeMode"], - storageClassName: item["storageClassName"], - accessModes: !item["accessModes"] - ? item["accessModes"] - : item["accessModes"].map((p: any) => { - return p; - }), - dataSource: !item["dataSource"] - ? item["dataSource"] - : localKubernetesReferenceSerializer(item["dataSource"]), - dataSourceRef: !item["dataSourceRef"] - ? item["dataSourceRef"] - : kubernetesReferenceSerializer(item["dataSourceRef"]), - resources: !item["resources"] - ? item["resources"] - : volumeClaimResourceRequirementsSerializer(item["resources"]), - selector: !item["selector"] - ? item["selector"] - : volumeClaimSpecSelectorSerializer(item["selector"]), - }; -} - -export function volumeClaimSpecDeserializer(item: any): VolumeClaimSpec { - return { - volumeName: item["volumeName"], - volumeMode: item["volumeMode"], - storageClassName: item["storageClassName"], - accessModes: !item["accessModes"] - ? item["accessModes"] - : item["accessModes"].map((p: any) => { - return p; - }), - dataSource: !item["dataSource"] - ? item["dataSource"] - : localKubernetesReferenceDeserializer(item["dataSource"]), - dataSourceRef: !item["dataSourceRef"] - ? item["dataSourceRef"] - : kubernetesReferenceDeserializer(item["dataSourceRef"]), - resources: !item["resources"] - ? item["resources"] - : volumeClaimResourceRequirementsDeserializer(item["resources"]), - selector: !item["selector"] - ? item["selector"] - : volumeClaimSpecSelectorDeserializer(item["selector"]), - }; -} - -/** Kubernetes reference */ -export interface LocalKubernetesReference { - /** APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required. */ - apiGroup?: string; - /** Kind is the type of resource being referenced */ - kind: string; - /** Name is the name of resource being referenced */ - name: string; -} - -export function localKubernetesReferenceSerializer(item: LocalKubernetesReference): any { - return { apiGroup: item["apiGroup"], kind: item["kind"], name: item["name"] }; -} - -export function localKubernetesReferenceDeserializer(item: any): LocalKubernetesReference { - return { - apiGroup: item["apiGroup"], - kind: item["kind"], - name: item["name"], - }; -} - -/** Kubernetes reference */ -export interface KubernetesReference { - /** APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required. */ - apiGroup?: string; - /** Kind is the type of resource being referenced */ - kind: string; - /** Name is the name of resource being referenced */ - name: string; - /** Namespace is the namespace of the resource being referenced. This field is required when the resource has a namespace. */ - namespace?: string; -} - -export function kubernetesReferenceSerializer(item: KubernetesReference): any { - return { - apiGroup: item["apiGroup"], - kind: item["kind"], - name: item["name"], - namespace: item["namespace"], - }; -} - -export function kubernetesReferenceDeserializer(item: any): KubernetesReference { - return { - apiGroup: item["apiGroup"], - kind: item["kind"], - name: item["name"], - namespace: item["namespace"], - }; -} - -/** VolumeClaimResourceRequirements properties */ -export interface VolumeClaimResourceRequirements { - /** Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ */ - limits?: Record; - /** Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ */ - requests?: Record; -} - -export function volumeClaimResourceRequirementsSerializer( - item: VolumeClaimResourceRequirements, -): any { - return { limits: item["limits"], requests: item["requests"] }; -} - -export function volumeClaimResourceRequirementsDeserializer( - item: any, -): VolumeClaimResourceRequirements { - return { - limits: item["limits"], - requests: item["requests"], - }; -} - -/** VolumeClaimSpecSelector properties */ -export interface VolumeClaimSpecSelector { - /** MatchExpressions is a list of label selector requirements. The requirements are ANDed. */ - matchExpressions?: VolumeClaimSpecSelectorMatchExpressions[]; - /** MatchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. */ - matchLabels?: Record; -} - -export function volumeClaimSpecSelectorSerializer(item: VolumeClaimSpecSelector): any { - return { - matchExpressions: !item["matchExpressions"] - ? item["matchExpressions"] - : volumeClaimSpecSelectorMatchExpressionsArraySerializer(item["matchExpressions"]), - matchLabels: item["matchLabels"], - }; -} - -export function volumeClaimSpecSelectorDeserializer(item: any): VolumeClaimSpecSelector { - return { - matchExpressions: !item["matchExpressions"] - ? 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. */ - key: string; - /** operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. */ - operator: OperatorValues; - /** values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. */ - values?: string[]; -} - -export function volumeClaimSpecSelectorMatchExpressionsSerializer( - item: VolumeClaimSpecSelectorMatchExpressions, -): any { - return { - key: item["key"], - operator: item["operator"], - values: !item["values"] - ? item["values"] - : item["values"].map((p: any) => { - return p; - }), - }; -} - -export function volumeClaimSpecSelectorMatchExpressionsDeserializer( - item: any, -): VolumeClaimSpecSelectorMatchExpressions { - return { - key: item["key"], - operator: item["operator"], - values: !item["values"] - ? item["values"] - : item["values"].map((p: any) => { - return p; - }), - }; -} - -/** Valid operators are In, NotIn, Exists and DoesNotExist. */ -export enum KnownOperatorValues { - /** In operator. */ - In = "In", - /** NotIn operator. */ - NotIn = "NotIn", - /** Exists operator. */ - Exists = "Exists", - /** DoesNotExist operator. */ - DoesNotExist = "DoesNotExist", -} - -/** - * Valid operators are In, NotIn, Exists and DoesNotExist. \ - * {@link KnownOperatorValues} can be used interchangeably with OperatorValues, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **In**: In operator. \ - * **NotIn**: NotIn operator. \ - * **Exists**: Exists operator. \ - * **DoesNotExist**: DoesNotExist operator. - */ -export type OperatorValues = string; - -/** GenerateResourceLimits properties */ -export interface GenerateResourceLimits { - /** The toggle to enable/disable cpu resource limits. */ - cpu?: OperationalMode; -} - -export function generateResourceLimitsSerializer(item: GenerateResourceLimits): any { - return { cpu: item["cpu"] }; -} - -export function generateResourceLimitsDeserializer(item: any): GenerateResourceLimits { - return { - cpu: item["cpu"], - }; -} - -/** The memory profile settings of the Broker */ -export enum KnownBrokerMemoryProfile { - /** Tiny memory profile. */ - Tiny = "Tiny", - /** Low memory profile. */ - Low = "Low", - /** Medium memory profile. */ - Medium = "Medium", - /** High memory profile. */ - High = "High", -} - -/** - * The memory profile settings of the Broker \ - * {@link KnownBrokerMemoryProfile} can be used interchangeably with BrokerMemoryProfile, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Tiny**: Tiny memory profile. \ - * **Low**: Low memory profile. \ - * **Medium**: Medium memory profile. \ - * **High**: High memory profile. - */ -export type BrokerMemoryProfile = string; - -/** The response of a BrokerResource list operation. */ -export interface _BrokerResourceListResult { - /** The BrokerResource items on this page */ - value: BrokerResource[]; - /** The link to the next page of items */ - nextLink?: string; -} - -export function _brokerResourceListResultDeserializer(item: any): _BrokerResourceListResult { - return { - value: brokerResourceArrayDeserializer(item["value"]), - nextLink: item["nextLink"], - }; -} - -export function brokerResourceArraySerializer(result: Array): any[] { - return result.map((item) => { - return brokerResourceSerializer(item); - }); -} - -export function brokerResourceArrayDeserializer(result: Array): any[] { - return result.map((item) => { - return brokerResourceDeserializer(item); - }); -} - -/** A Instance resource is a logical container for a set of child resources. */ -export interface InstanceResource extends TrackedResource { - /** The resource-specific properties for this resource. */ - properties?: InstanceProperties; - /** Edge location of the resource. */ - extendedLocation: ExtendedLocation; - /** The managed service identities assigned to this resource. */ - identity?: ManagedServiceIdentity; -} - -export function instanceResourceSerializer(item: InstanceResource): any { - return { - tags: item["tags"], - location: item["location"], - properties: !item["properties"] - ? item["properties"] - : instancePropertiesSerializer(item["properties"]), - extendedLocation: extendedLocationSerializer(item["extendedLocation"]), - identity: !item["identity"] - ? item["identity"] - : managedServiceIdentitySerializer(item["identity"]), - }; -} - -export function instanceResourceDeserializer(item: any): InstanceResource { - return { - tags: item["tags"], - location: item["location"], - id: item["id"], - name: item["name"], - type: item["type"], - systemData: !item["systemData"] - ? item["systemData"] - : systemDataDeserializer(item["systemData"]), - properties: !item["properties"] - ? item["properties"] - : instancePropertiesDeserializer(item["properties"]), - extendedLocation: extendedLocationDeserializer(item["extendedLocation"]), - identity: !item["identity"] - ? item["identity"] - : managedServiceIdentityDeserializer(item["identity"]), - }; -} - -/** The properties of the Instance resource. */ -export interface InstanceProperties { - /** Detailed description of the Instance. */ - description?: string; - /** The status of the last operation. */ - readonly provisioningState?: ProvisioningState; - /** The Azure IoT Operations version. */ - readonly version?: string; - /** The reference to the Schema Registry for this AIO Instance. */ - schemaRegistryRef: SchemaRegistryRef; -} - -export function instancePropertiesSerializer(item: InstanceProperties): any { - return { - description: item["description"], - schemaRegistryRef: schemaRegistryRefSerializer(item["schemaRegistryRef"]), - }; -} - -export function instancePropertiesDeserializer(item: any): InstanceProperties { - return { - description: item["description"], - provisioningState: item["provisioningState"], - version: item["version"], - schemaRegistryRef: schemaRegistryRefDeserializer(item["schemaRegistryRef"]), - }; -} - -/** The reference to the Schema Registry for this AIO Instance. */ -export interface SchemaRegistryRef { - /** The resource ID of the Schema Registry. */ - resourceId: string; -} - -export function schemaRegistryRefSerializer(item: SchemaRegistryRef): any { - return { resourceId: item["resourceId"] }; -} - -export function schemaRegistryRefDeserializer(item: any): SchemaRegistryRef { - return { - resourceId: item["resourceId"], - }; -} - -/** Managed service identity (system assigned and/or user assigned identities) */ -export interface ManagedServiceIdentity { - /** The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity. */ - readonly principalId?: string; - /** The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. */ - readonly tenantId?: string; - /** The type of managed identity assigned to this resource. */ - type: ManagedServiceIdentityType; - /** The identities assigned to this resource by the user. */ - userAssignedIdentities?: Record; -} - -export function managedServiceIdentitySerializer(item: ManagedServiceIdentity): any { - return { - type: item["type"], - userAssignedIdentities: item["userAssignedIdentities"], - }; -} - -export function managedServiceIdentityDeserializer(item: any): ManagedServiceIdentity { - return { - principalId: item["principalId"], - tenantId: item["tenantId"], - type: item["type"], - userAssignedIdentities: item["userAssignedIdentities"], - }; -} - -/** Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). */ -export enum KnownManagedServiceIdentityType { - /** No managed identity. */ - None = "None", - /** System assigned managed identity. */ - SystemAssigned = "SystemAssigned", - /** User assigned managed identity. */ - UserAssigned = "UserAssigned", - /** System and user assigned managed identity. */ - SystemAssignedUserAssigned = "SystemAssigned,UserAssigned", -} - -/** - * Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). \ - * {@link KnownManagedServiceIdentityType} can be used interchangeably with ManagedServiceIdentityType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **None**: No managed identity. \ - * **SystemAssigned**: System assigned managed identity. \ - * **UserAssigned**: User assigned managed identity. \ - * **SystemAssigned,UserAssigned**: System and user assigned managed identity. - */ -export type ManagedServiceIdentityType = string; - -/** User assigned identity properties */ -export interface UserAssignedIdentity { - /** The principal ID of the assigned identity. */ - readonly principalId?: string; - /** The client ID of the assigned identity. */ - readonly clientId?: string; -} - -export function userAssignedIdentitySerializer(item: UserAssignedIdentity): any { - return item; -} - -export function userAssignedIdentityDeserializer(item: any): UserAssignedIdentity { - return { - principalId: item["principalId"], - clientId: item["clientId"], - }; -} - -/** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */ -export interface TrackedResource extends Resource { - /** Resource tags. */ - tags?: Record; - /** The geo-location where the resource lives */ - location: string; -} - -export function trackedResourceSerializer(item: TrackedResource): any { - return { tags: item["tags"], location: item["location"] }; -} - -export function trackedResourceDeserializer(item: any): TrackedResource { - return { - id: item["id"], - name: item["name"], - type: item["type"], - systemData: !item["systemData"] - ? item["systemData"] - : systemDataDeserializer(item["systemData"]), - tags: item["tags"], - location: item["location"], - }; -} - -/** The Instance update model. */ -export interface InstancePatchModel { - /** Resource tags. */ - tags?: Record; - /** The managed service identities assigned to this resource. */ - identity?: ManagedServiceIdentity; -} - -export function instancePatchModelSerializer(item: InstancePatchModel): any { - return { - tags: item["tags"], - identity: !item["identity"] - ? item["identity"] - : managedServiceIdentitySerializer(item["identity"]), - }; -} - -/** The response of a InstanceResource list operation. */ -export interface _InstanceResourceListResult { - /** The InstanceResource items on this page */ - value: InstanceResource[]; - /** The link to the next page of items */ - nextLink?: string; -} - -export function _instanceResourceListResultDeserializer(item: any): _InstanceResourceListResult { - return { - value: instanceResourceArrayDeserializer(item["value"]), - nextLink: item["nextLink"], - }; -} - -export function instanceResourceArraySerializer(result: Array): any[] { - return result.map((item) => { - return instanceResourceSerializer(item); - }); -} - -export function instanceResourceArrayDeserializer(result: Array): any[] { - return result.map((item) => { - return instanceResourceDeserializer(item); - }); -} - -/** A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results. */ -export interface _OperationListResult { - /** The Operation items on this page */ - value: Operation[]; - /** The link to the next page of items */ - nextLink?: string; -} - -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" */ - readonly name?: string; - /** Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for Azure Resource Manager/control-plane operations. */ - readonly isDataAction?: boolean; - /** Localized display information for this particular operation. */ - readonly display?: OperationDisplay; - /** The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system" */ - readonly origin?: Origin; - /** Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. */ - actionType?: ActionType; -} - -export function operationDeserializer(item: any): Operation { - return { - name: item["name"], - isDataAction: item["isDataAction"], - display: !item["display"] ? item["display"] : operationDisplayDeserializer(item["display"]), - origin: item["origin"], - actionType: item["actionType"], - }; -} - -/** Localized display information for and operation. */ -export interface OperationDisplay { - /** The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". */ - readonly provider?: string; - /** The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". */ - readonly resource?: string; - /** The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", "Restart Virtual Machine". */ - readonly operation?: string; - /** The short, localized friendly description of the operation; suitable for tool tips and detailed views. */ - readonly description?: string; -} - -export function operationDisplayDeserializer(item: any): OperationDisplay { - return { - provider: item["provider"], - resource: item["resource"], - operation: item["operation"], - description: item["description"], - }; -} - -/** 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 { - /** 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. */ - UserSystem = "user,system", -} - -/** - * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system" \ - * {@link KnownOrigin} can be used interchangeably with Origin, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **user**: Indicates the operation is initiated by a user. \ - * **system**: Indicates the operation is initiated by a system. \ - * **user,system**: Indicates the operation is initiated by a user or system. - */ -export type Origin = string; - -/** Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. */ -export enum KnownActionType { - /** Actions are for internal-only APIs. */ - Internal = "Internal", -} - -/** - * Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. \ - * {@link KnownActionType} can be used interchangeably with ActionType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Internal**: Actions are for internal-only APIs. - */ -export type ActionType = string; - -/** Api versions */ -export enum KnownVersions { - /** 2024-11-01 version */ - "V2024-11-01" = "2024-11-01", -} diff --git a/sdk/iotoperations/arm-iotoperations/src/restorePollerHelpers.ts b/sdk/iotoperations/arm-iotoperations/src/restorePollerHelpers.ts deleted file mode 100644 index 7f9aacca2234..000000000000 --- a/sdk/iotoperations/arm-iotoperations/src/restorePollerHelpers.ts +++ /dev/null @@ -1,257 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsClient } from "./ioTOperationsClient.js"; -import { - _instanceCreateOrUpdateDeserialize, - _instanceDeleteDeserialize, -} from "./api/instance/index.js"; -import { _brokerCreateOrUpdateDeserialize, _brokerDeleteDeserialize } from "./api/broker/index.js"; -import { - _brokerListenerCreateOrUpdateDeserialize, - _brokerListenerDeleteDeserialize, -} from "./api/brokerListener/index.js"; -import { - _brokerAuthenticationCreateOrUpdateDeserialize, - _brokerAuthenticationDeleteDeserialize, -} from "./api/brokerAuthentication/index.js"; -import { - _brokerAuthorizationCreateOrUpdateDeserialize, - _brokerAuthorizationDeleteDeserialize, -} from "./api/brokerAuthorization/index.js"; -import { - _dataflowProfileCreateOrUpdateDeserialize, - _dataflowProfileDeleteDeserialize, -} from "./api/dataflowProfile/index.js"; -import { - _dataflowCreateOrUpdateDeserialize, - _dataflowDeleteDeserialize, -} from "./api/dataflow/index.js"; -import { - _dataflowEndpointCreateOrUpdateDeserialize, - _dataflowEndpointDeleteDeserialize, -} from "./api/dataflowEndpoint/index.js"; -import { getLongRunningPoller } from "./static-helpers/pollingHelpers.js"; -import { OperationOptions, PathUncheckedResponse } from "@azure-rest/core-client"; -import { AbortSignalLike } from "@azure/abort-controller"; -import { - PollerLike, - OperationState, - deserializeState, - ResourceLocationConfig, -} from "@azure/core-lro"; - -export interface RestorePollerOptions< - TResult, - TResponse extends PathUncheckedResponse = PathUncheckedResponse, -> extends OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** - * The signal which can be used to abort requests. - */ - abortSignal?: AbortSignalLike; - /** Deserialization function for raw response body */ - processResponseBody?: (result: TResponse) => Promise; -} - -/** - * Creates a poller from the serialized state of another poller. This can be - * useful when you want to create pollers on a different host or a poller - * needs to be constructed after the original one is not in scope. - */ -export function restorePoller( - client: IoTOperationsClient, - serializedState: string, - sourceOperation: (...args: any[]) => PollerLike, TResult>, - options?: RestorePollerOptions, -): PollerLike, TResult> { - const pollerConfig = deserializeState(serializedState).config; - const { initialRequestUrl, requestMethod, metadata } = pollerConfig; - if (!initialRequestUrl || !requestMethod) { - throw new Error( - `Invalid serialized state: ${serializedState} for sourceOperation ${sourceOperation?.name}`, - ); - } - const resourceLocationConfig = metadata?.["resourceLocationConfig"] as - | ResourceLocationConfig - | undefined; - const { deserializer, expectedStatuses = [] } = - getDeserializationHelper(initialRequestUrl, requestMethod) ?? {}; - const deserializeHelper = options?.processResponseBody ?? deserializer; - if (!deserializeHelper) { - throw new Error( - `Please ensure the operation is in this client! We can't find its deserializeHelper for ${sourceOperation?.name}.`, - ); - } - return getLongRunningPoller( - (client as any)["_client"] ?? client, - deserializeHelper as (result: TResponse) => Promise, - expectedStatuses, - { - updateIntervalInMs: options?.updateIntervalInMs, - abortSignal: options?.abortSignal, - resourceLocationConfig, - restoreFrom: serializedState, - initialRequestUrl, - }, - ); -} - -interface DeserializationHelper { - deserializer: Function; - expectedStatuses: string[]; -} - -const deserializeMap: Record = { - "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}": - { - deserializer: _instanceCreateOrUpdateDeserialize, - expectedStatuses: ["200", "201"], - }, - "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}": - { - deserializer: _instanceDeleteDeserialize, - expectedStatuses: ["202", "204", "200"], - }, - "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/brokers/{brokerName}": - { - deserializer: _brokerCreateOrUpdateDeserialize, - expectedStatuses: ["200", "201"], - }, - "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/brokers/{brokerName}": - { - deserializer: _brokerDeleteDeserialize, - expectedStatuses: ["202", "204", "200"], - }, - "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/brokers/{brokerName}/listeners/{listenerName}": - { - deserializer: _brokerListenerCreateOrUpdateDeserialize, - expectedStatuses: ["200", "201"], - }, - "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/brokers/{brokerName}/listeners/{listenerName}": - { - deserializer: _brokerListenerDeleteDeserialize, - expectedStatuses: ["202", "204", "200"], - }, - "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/brokers/{brokerName}/authentications/{authenticationName}": - { - deserializer: _brokerAuthenticationCreateOrUpdateDeserialize, - expectedStatuses: ["200", "201"], - }, - "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/brokers/{brokerName}/authentications/{authenticationName}": - { - deserializer: _brokerAuthenticationDeleteDeserialize, - expectedStatuses: ["202", "204", "200"], - }, - "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/brokers/{brokerName}/authorizations/{authorizationName}": - { - deserializer: _brokerAuthorizationCreateOrUpdateDeserialize, - expectedStatuses: ["200", "201"], - }, - "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/brokers/{brokerName}/authorizations/{authorizationName}": - { - deserializer: _brokerAuthorizationDeleteDeserialize, - expectedStatuses: ["202", "204", "200"], - }, - "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/dataflowProfiles/{dataflowProfileName}": - { - deserializer: _dataflowProfileCreateOrUpdateDeserialize, - expectedStatuses: ["200", "201"], - }, - "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/dataflowProfiles/{dataflowProfileName}": - { - deserializer: _dataflowProfileDeleteDeserialize, - expectedStatuses: ["202", "204", "200"], - }, - "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/dataflowProfiles/{dataflowProfileName}/dataflows/{dataflowName}": - { - deserializer: _dataflowCreateOrUpdateDeserialize, - expectedStatuses: ["200", "201"], - }, - "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/dataflowProfiles/{dataflowProfileName}/dataflows/{dataflowName}": - { - deserializer: _dataflowDeleteDeserialize, - expectedStatuses: ["202", "204", "200"], - }, - "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/dataflowEndpoints/{dataflowEndpointName}": - { - deserializer: _dataflowEndpointCreateOrUpdateDeserialize, - expectedStatuses: ["200", "201"], - }, - "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/dataflowEndpoints/{dataflowEndpointName}": - { - deserializer: _dataflowEndpointDeleteDeserialize, - expectedStatuses: ["202", "204", "200"], - }, -}; - -function getDeserializationHelper( - urlStr: string, - method: string, -): DeserializationHelper | undefined { - const path = new URL(urlStr).pathname; - const pathParts = path.split("/"); - - // Traverse list to match the longest candidate - // matchedLen: the length of candidate path - // matchedValue: the matched status code array - let matchedLen = -1, - matchedValue: DeserializationHelper | undefined; - - // Iterate the responseMap to find a match - for (const [key, value] of Object.entries(deserializeMap)) { - // Extracting the path from the map key which is in format - // GET /path/foo - if (!key.startsWith(method)) { - continue; - } - const candidatePath = getPathFromMapKey(key); - // Get each part of the url path - const candidateParts = candidatePath.split("/"); - - // 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) { - 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] || "", - ); - - if (!isMatched) { - found = false; - break; - } - continue; - } - - // If the candidate part is not a template and - // the parts don't match mark the candidate as not found - // to move on with the next candidate path. - if (candidateParts[i] !== pathParts[j]) { - found = false; - break; - } - } - - // We finished evaluating the current candidate parts - // Update the matched value if and only if we found the longer pattern - if (found && candidatePath.length > matchedLen) { - matchedLen = candidatePath.length; - matchedValue = value; - } - } - - return matchedValue; -} - -function getPathFromMapKey(mapKey: string): string { - const pathStart = mapKey.indexOf("/"); - return mapKey.slice(pathStart); -} diff --git a/sdk/iotoperations/arm-iotoperations/src/static-helpers/pagingHelpers.ts b/sdk/iotoperations/arm-iotoperations/src/static-helpers/pagingHelpers.ts deleted file mode 100644 index ce33af5f4178..000000000000 --- a/sdk/iotoperations/arm-iotoperations/src/static-helpers/pagingHelpers.ts +++ /dev/null @@ -1,241 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { Client, createRestError, PathUncheckedResponse } from "@azure-rest/core-client"; -import { RestError } from "@azure/core-rest-pipeline"; - -/** - * Options for the byPage method - */ -export interface PageSettings { - /** - * A reference to a specific page to start iterating from. - */ - continuationToken?: string; -} - -/** - * An interface that describes a page of results. - */ -export type ContinuablePage = TPage & { - /** - * The token that keeps track of where to continue the iterator - */ - continuationToken?: string; -}; - -/** - * An interface that allows async iterable iteration both to completion and by page. - */ -export interface PagedAsyncIterableIterator< - TElement, - TPage = TElement[], - TPageSettings extends PageSettings = PageSettings, -> { - /** - * The next method, part of the iteration protocol - */ - next(): Promise>; - /** - * The connection to the async iterator, part of the iteration protocol - */ - [Symbol.asyncIterator](): PagedAsyncIterableIterator; - /** - * Return an AsyncIterableIterator that works a page at a time - */ - byPage: (settings?: TPageSettings) => AsyncIterableIterator>; -} - -/** - * An interface that describes how to communicate with the service. - */ -export interface PagedResult< - TElement, - TPage = TElement[], - TPageSettings extends PageSettings = PageSettings, -> { - /** - * Link to the first page of results. - */ - firstPageLink?: string; - /** - * A method that returns a page of results. - */ - 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>; - - /** - * A function to extract elements from a page. - */ - toElements?: (page: TPage) => TElement[]; -} - -/** - * Options for the paging helper - */ -export interface BuildPagedAsyncIteratorOptions { - itemName?: string; - nextLinkName?: string; -} - -/** - * Helper to paginate results in a generic way and return a PagedAsyncIterableIterator - */ -export function buildPagedAsyncIterator< - TElement, - TPage = TElement[], - TPageSettings extends PageSettings = PageSettings, - TResponse extends PathUncheckedResponse = PathUncheckedResponse, ->( - client: Client, - getInitialResponse: () => PromiseLike, - processResponseBody: (result: TResponse) => PromiseLike, - expectedStatuses: string[], - options: BuildPagedAsyncIteratorOptions = {}, -): PagedAsyncIterableIterator { - const itemName = options.itemName ?? "value"; - const nextLinkName = options.nextLinkName ?? "nextLink"; - const pagedResult: PagedResult = { - getPage: async (pageLink?: string) => { - const result = - pageLink === undefined - ? await getInitialResponse() - : await client.pathUnchecked(pageLink).get(); - checkPagingRequest(result, expectedStatuses); - const results = await processResponseBody(result as TResponse); - const nextLink = getNextLink(results, nextLinkName); - const values = getElements(results, itemName) as TPage; - return { - page: values, - nextPageLink: nextLink, - }; - }, - byPage: (settings?: TPageSettings) => { - const { continuationToken } = settings ?? {}; - return getPageAsyncIterator(pagedResult, { - pageLink: continuationToken, - }); - }, - }; - return getPagedAsyncIterator(pagedResult); -} - -/** - * returns an async iterator that iterates over results. It also has a `byPage` - * method that returns pages of items at once. - * - * @param pagedResult - an object that specifies how to get pages. - * @returns a paged async iterator that iterates over results. - */ - -function getPagedAsyncIterator< - TElement, - TPage = TElement[], - TPageSettings extends PageSettings = PageSettings, ->( - pagedResult: PagedResult, -): PagedAsyncIterableIterator { - const iter = getItemAsyncIterator(pagedResult); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: - pagedResult?.byPage ?? - ((settings?: TPageSettings) => { - const { continuationToken } = settings ?? {}; - return getPageAsyncIterator(pagedResult, { - pageLink: continuationToken, - }); - }), - }; -} - -async function* getItemAsyncIterator( - pagedResult: PagedResult, -): AsyncIterableIterator { - const pages = getPageAsyncIterator(pagedResult); - for await (const page of pages) { - yield* page as unknown as TElement[]; - } -} - -async function* getPageAsyncIterator( - pagedResult: PagedResult, - options: { - pageLink?: string; - } = {}, -): AsyncIterableIterator> { - const { pageLink } = options; - let response = await pagedResult.getPage(pageLink ?? pagedResult.firstPageLink); - if (!response) { - return; - } - let result = response.page as ContinuablePage; - result.continuationToken = response.nextPageLink; - yield result; - while (response.nextPageLink) { - response = await pagedResult.getPage(response.nextPageLink); - if (!response) { - return; - } - result = response.page as ContinuablePage; - result.continuationToken = response.nextPageLink; - yield result; - } -} - -/** - * Gets for the value of nextLink in the body - */ -function getNextLink(body: unknown, nextLinkName?: string): string | undefined { - if (!nextLinkName) { - return undefined; - } - - const nextLink = (body as Record)[nextLinkName]; - - 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}`, - ); - } - - if (nextLink === null) { - return undefined; - } - - return nextLink; -} - -/** - * Gets the elements of the current request in the body. - */ -function getElements(body: unknown, itemName: string): T[] { - const value = (body as Record)[itemName] as T[]; - if (!Array.isArray(value)) { - throw new RestError( - `Couldn't paginate response\n Body doesn't contain an array property with name: ${itemName}`, - ); - } - - return value ?? []; -} - -/** - * Checks if a request failed - */ -function checkPagingRequest(response: PathUncheckedResponse, expectedStatuses: string[]): void { - if (!expectedStatuses.includes(response.status)) { - throw createRestError( - `Pagination failed with unexpected statusCode ${response.status}`, - response, - ); - } -} diff --git a/sdk/iotoperations/arm-iotoperations/src/static-helpers/pollingHelpers.ts b/sdk/iotoperations/arm-iotoperations/src/static-helpers/pollingHelpers.ts deleted file mode 100644 index f01c41bab69d..000000000000 --- a/sdk/iotoperations/arm-iotoperations/src/static-helpers/pollingHelpers.ts +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { - PollerLike, - OperationState, - ResourceLocationConfig, - RunningOperation, - createHttpPoller, - OperationResponse, -} from "@azure/core-lro"; - -import { Client, PathUncheckedResponse, createRestError } from "@azure-rest/core-client"; -import { AbortSignalLike } from "@azure/abort-controller"; - -export interface GetLongRunningPollerOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** - * The signal which can be used to abort requests. - */ - abortSignal?: AbortSignalLike; - /** - * The potential location of the result of the LRO if specified by the LRO extension in the swagger. - */ - resourceLocationConfig?: ResourceLocationConfig; - /** - * The original url of the LRO - * Should not be null when restoreFrom is set - */ - initialRequestUrl?: string; - /** - * A serialized poller which can be used to resume an existing paused Long-Running-Operation. - */ - restoreFrom?: string; - /** - * The function to get the initial response - */ - getInitialResponse?: () => PromiseLike; -} -export function getLongRunningPoller( - client: Client, - processResponseBody: (result: TResponse) => Promise, - expectedStatuses: string[], - options: GetLongRunningPollerOptions, -): PollerLike, TResult> { - const { restoreFrom, getInitialResponse } = options; - if (!restoreFrom && !getInitialResponse) { - 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"); - } - initialResponse = await getInitialResponse(); - return getLroResponse(initialResponse, expectedStatuses); - }, - sendPollRequest: async ( - path: string, - pollOptions?: { - abortSignal?: AbortSignalLike; - }, - ) => { - // The poll request would both listen to the user provided abort signal and the poller's own abort signal - function abortListener(): void { - pollAbortController.abort(); - } - const abortSignal = pollAbortController.signal; - if (options.abortSignal?.aborted) { - pollAbortController.abort(); - } else if (pollOptions?.abortSignal?.aborted) { - pollAbortController.abort(); - } else if (!abortSignal.aborted) { - options.abortSignal?.addEventListener("abort", abortListener, { - once: true, - }); - pollOptions?.abortSignal?.addEventListener("abort", abortListener, { - once: true, - }); - } - let response; - try { - response = await client.pathUnchecked(path).get({ abortSignal }); - } finally { - options.abortSignal?.removeEventListener("abort", abortListener); - pollOptions?.abortSignal?.removeEventListener("abort", abortListener); - } - - return getLroResponse(response as TResponse, expectedStatuses); - }, - }; - return createHttpPoller(poller, { - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: options?.resourceLocationConfig, - restoreFrom: options?.restoreFrom, - processResult: (result: unknown) => { - return processResponseBody(result as TResponse); - }, - }); -} -/** - * Converts a Rest Client response to a response that the LRO implementation understands - * @param response - a rest client http response - * @param deserializeFn - deserialize function to convert Rest response to modular output - * @returns - An LRO response that the LRO implementation understands - */ -function getLroResponse( - response: TResponse, - expectedStatuses: string[], -): OperationResponse { - if (!expectedStatuses.includes(response.status)) { - throw createRestError(response); - } - - return { - flatResponse: response, - rawResponse: { - ...response, - statusCode: Number.parseInt(response.status), - body: response.body, - }, - }; -} 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 bd52fec67bae..000000000000 --- a/sdk/iotoperations/arm-iotoperations/test/public/iotoperations_operations_test.spec.ts +++ /dev/null @@ -1,47 +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 type { Recorder } from "@azure-tools/test-recorder"; -import { env, 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 () => { - await recorder.stop(); - }); - it("operations list test", async () => { - const resArray = new Array(); - for await (const item of client.operations.list()) { - resArray.push(item); - } - assert.notEqual(resArray.length, 0); - }); -}); diff --git a/sdk/iotoperations/arm-iotoperations/test/public/utils/recordedClient.ts b/sdk/iotoperations/arm-iotoperations/test/public/utils/recordedClient.ts deleted file mode 100644 index 1633714bdce8..000000000000 --- a/sdk/iotoperations/arm-iotoperations/test/public/utils/recordedClient.ts +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { RecorderStartOptions, VitestTestContext } from "@azure-tools/test-recorder"; -import { Recorder } from "@azure-tools/test-recorder"; - -const replaceableVariables: Record = { - SUBSCRIPTION_ID: "azure_subscription_id", -}; - -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 - ], -}; - -/** - * creates the recorder and reads the environment variables from the `.env` file. - * 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 { - const recorder = new Recorder(context); - await recorder.start(recorderEnvSetup); - return recorder; -} diff --git a/sdk/iotoperations/arm-iotoperations/test/snippets.spec.ts b/sdk/iotoperations/arm-iotoperations/test/snippets.spec.ts deleted file mode 100644 index 78e30d740ee0..000000000000 --- a/sdk/iotoperations/arm-iotoperations/test/snippets.spec.ts +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { IoTOperationsClient } from "../src/index.js"; -import { DefaultAzureCredential, InteractiveBrowserCredential } from "@azure/identity"; -import { setLogLevel } from "@azure/logger"; -import { describe, it } from "vitest"; - -describe("snippets", () => { - it("ReadmeSampleCreateClient_Node", async () => { - const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const client = new IoTOperationsClient(new DefaultAzureCredential(), subscriptionId); - }); - - it("ReadmeSampleCreateClient_Browser", async () => { - const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const credential = new InteractiveBrowserCredential({ - tenantId: "", - clientId: "", - }); - const client = new IoTOperationsClient(credential, subscriptionId); - }); - - it("SetLogLevel", async () => { - setLogLevel("info"); - }); -}); diff --git a/sdk/iotoperations/arm-iotoperations/tsconfig.browser.config.json b/sdk/iotoperations/arm-iotoperations/tsconfig.browser.config.json deleted file mode 100644 index 75871518e3a0..000000000000 --- a/sdk/iotoperations/arm-iotoperations/tsconfig.browser.config.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": ["./tsconfig.test.json", "../../../tsconfig.browser.base.json"] -} diff --git a/sdk/iotoperations/arm-iotoperations/tsconfig.json b/sdk/iotoperations/arm-iotoperations/tsconfig.json deleted file mode 100644 index 19ceb382b521..000000000000 --- a/sdk/iotoperations/arm-iotoperations/tsconfig.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "references": [ - { - "path": "./tsconfig.src.json" - }, - { - "path": "./tsconfig.samples.json" - }, - { - "path": "./tsconfig.test.json" - } - ] -} diff --git a/sdk/iotoperations/arm-iotoperations/tsconfig.samples.json b/sdk/iotoperations/arm-iotoperations/tsconfig.samples.json deleted file mode 100644 index 332c9e1bc463..000000000000 --- a/sdk/iotoperations/arm-iotoperations/tsconfig.samples.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "../../../tsconfig.samples.base.json", - "compilerOptions": { - "paths": { - "@azure/arm-iotoperations": ["./dist/esm"] - } - } -} diff --git a/sdk/iotoperations/arm-iotoperations/tsconfig.src.json b/sdk/iotoperations/arm-iotoperations/tsconfig.src.json deleted file mode 100644 index bae70752dd38..000000000000 --- a/sdk/iotoperations/arm-iotoperations/tsconfig.src.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "../../../tsconfig.lib.json" -} diff --git a/sdk/iotoperations/arm-iotoperations/tsconfig.test.json b/sdk/iotoperations/arm-iotoperations/tsconfig.test.json deleted file mode 100644 index 290ca214aebc..000000000000 --- a/sdk/iotoperations/arm-iotoperations/tsconfig.test.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": ["./tsconfig.src.json", "../../../tsconfig.test.base.json"] -} diff --git a/sdk/iotoperations/arm-iotoperations/tsp-location.yaml b/sdk/iotoperations/arm-iotoperations/tsp-location.yaml index 5a61b61c4a60..ef1e3dc1dc0d 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: e725ba2ceffe71772df6918b2950bf571577f968 +commit: 80690e373323752a2ba8c38f348d9e22ac330783 repo: Azure/azure-rest-api-specs additionalDirectories: diff --git a/sdk/iotoperations/arm-iotoperations/vitest.browser.config.ts b/sdk/iotoperations/arm-iotoperations/vitest.browser.config.ts deleted file mode 100644 index 10e70dbfa8ee..000000000000 --- a/sdk/iotoperations/arm-iotoperations/vitest.browser.config.ts +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { defineConfig, mergeConfig } from "vitest/config"; -import viteConfig from "../../../vitest.browser.shared.config.ts"; - -export default mergeConfig( - viteConfig, - defineConfig({ - test: { - include: ["dist-test/browser/test/**/*.spec.js"], - testTimeout: 1200000, - hookTimeout: 1200000, - }, - }), -); diff --git a/sdk/iotoperations/arm-iotoperations/vitest.config.ts b/sdk/iotoperations/arm-iotoperations/vitest.config.ts deleted file mode 100644 index 86a71911ccc2..000000000000 --- a/sdk/iotoperations/arm-iotoperations/vitest.config.ts +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { defineConfig, mergeConfig } from "vitest/config"; -import viteConfig from "../../../vitest.shared.config.ts"; - -export default mergeConfig( - viteConfig, - defineConfig({ - test: { - testTimeout: 1200000, - hookTimeout: 1200000, - }, - }), -); diff --git a/sdk/iotoperations/arm-iotoperations/vitest.esm.config.ts b/sdk/iotoperations/arm-iotoperations/vitest.esm.config.ts deleted file mode 100644 index 5e9735e9b144..000000000000 --- a/sdk/iotoperations/arm-iotoperations/vitest.esm.config.ts +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { mergeConfig } from "vitest/config"; -import vitestConfig from "./vitest.config.ts"; -import vitestEsmConfig from "../../../vitest.esm.shared.config.ts"; - -export default mergeConfig(vitestConfig, vitestEsmConfig);