From dea0b2e8aca7153bdabcc189d5483251d443cf4a Mon Sep 17 00:00:00 2001 From: Wei Dong <40835867+dw511214992@users.noreply.github.com> Date: Thu, 1 Jul 2021 09:44:57 +0800 Subject: [PATCH 01/28] update pipeline to feature/v4 (#15993) --- eng/pipelines/mgmt-ci.yml | 2 +- eng/pipelines/mgmt-pr.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/pipelines/mgmt-ci.yml b/eng/pipelines/mgmt-ci.yml index 906ab013e9b7..3a8b827da29f 100644 --- a/eng/pipelines/mgmt-ci.yml +++ b/eng/pipelines/mgmt-ci.yml @@ -1,7 +1,7 @@ trigger: branches: include: - - main + - feature/* paths: include: - eng/pipelines/mgmt-pr.yml diff --git a/eng/pipelines/mgmt-pr.yml b/eng/pipelines/mgmt-pr.yml index 32f30504a7aa..9aa319d8f27f 100644 --- a/eng/pipelines/mgmt-pr.yml +++ b/eng/pipelines/mgmt-pr.yml @@ -1,7 +1,7 @@ pr: branches: include: - - main + - feature/* - '*-preview' paths: include: From f34b099709a27240cd97b07005df3fe3bbf35fe8 Mon Sep 17 00:00:00 2001 From: colawwj <70128817+colawwj@users.noreply.github.com> Date: Thu, 1 Jul 2021 14:17:40 +0800 Subject: [PATCH 02/28] arm-security-release (#16135) --- sdk/security/arm-security/LICENSE.txt | 2 +- sdk/security/arm-security/README.md | 105 +- sdk/security/arm-security/package.json | 11 +- sdk/security/arm-security/rollup.config.js | 4 +- .../adaptiveApplicationControlsMappers.ts | 10 +- .../adaptiveNetworkHardeningsMappers.ts | 50 +- .../models/advancedThreatProtectionMappers.ts | 50 +- .../arm-security/src/models/alertsMappers.ts | 53 +- .../models/alertsSuppressionRulesMappers.ts | 50 +- .../src/models/allowedConnectionsMappers.ts | 4 +- .../src/models/assessmentsMappers.ts | 50 +- .../src/models/assessmentsMetadataMappers.ts | 50 +- .../models/autoProvisioningSettingsMappers.ts | 50 +- .../src/models/automationsMappers.ts | 4 +- .../src/models/complianceResultsMappers.ts | 50 +- .../src/models/compliancesMappers.ts | 50 +- .../src/models/connectorsMappers.ts | 144 + .../src/models/deviceOperationsMappers.ts | 143 + .../src/models/deviceSecurityGroupsMappers.ts | 50 +- .../src/models/devicesForHubMappers.ts | 144 + .../models/devicesForSubscriptionMappers.ts | 144 + .../discoveredSecuritySolutionsMappers.ts | 4 +- .../externalSecuritySolutionsMappers.ts | 4 +- sdk/security/arm-security/src/models/index.ts | 6735 ++++++++++--- .../informationProtectionPoliciesMappers.ts | 50 +- .../src/models/ingestionSettingsMappers.ts | 147 + .../src/models/iotAlertTypesMappers.ts | 144 + .../src/models/iotAlertsMappers.ts | 144 + .../src/models/iotDefenderSettingsMappers.ts | 153 + .../models/iotRecommendationTypesMappers.ts | 144 + .../src/models/iotRecommendationsMappers.ts | 144 + .../iotSecuritySolutionAnalyticsMappers.ts | 50 +- .../src/models/iotSecuritySolutionMappers.ts | 6 +- ...olutionsAnalyticsAggregatedAlertMappers.ts | 4 +- ...SolutionsAnalyticsRecommendationMappers.ts | 4 +- .../src/models/iotSensorsMappers.ts | 145 + .../src/models/iotSitesMappers.ts | 144 + .../models/jitNetworkAccessPoliciesMappers.ts | 4 +- .../src/models/locationsMappers.ts | 50 +- .../arm-security/src/models/mappers.ts | 8973 +++++++++++------ .../src/models/onPremiseIotSensorsMappers.ts | 145 + .../src/models/operationsMappers.ts | 4 +- .../arm-security/src/models/parameters.ts | 357 +- .../src/models/pricingsMappers.ts | 50 +- .../regulatoryComplianceAssessmentsMappers.ts | 50 +- .../regulatoryComplianceControlsMappers.ts | 50 +- .../regulatoryComplianceStandardsMappers.ts | 50 +- .../secureScoreControlDefinitionsMappers.ts | 50 +- .../src/models/secureScoreControlsMappers.ts | 50 +- .../src/models/secureScoresMappers.ts | 50 +- .../src/models/securityContactsMappers.ts | 50 +- .../src/models/securitySolutionsMappers.ts | 14 + ...SolutionsReferenceDataOperationsMappers.ts | 14 + ...ulnerabilityAssessmentOperationsMappers.ts | 50 +- .../src/models/settingsMappers.ts | 50 +- .../src/models/softwareInventoriesMappers.ts | 144 + ...erabilityAssessmentBaselineRulesMappers.ts | 146 + ...lnerabilityAssessmentScanResultsMappers.ts | 144 + .../sqlVulnerabilityAssessmentScansMappers.ts | 144 + .../src/models/subAssessmentsMappers.ts | 50 +- .../arm-security/src/models/tasksMappers.ts | 50 +- .../src/models/topologyMappers.ts | 4 +- .../src/models/workspaceSettingsMappers.ts | 50 +- .../operations/adaptiveApplicationControls.ts | 57 +- .../operations/adaptiveNetworkHardenings.ts | 8 +- .../operations/advancedThreatProtection.ts | 9 +- .../arm-security/src/operations/alerts.ts | 380 +- .../src/operations/alertsSuppressionRules.ts | 17 +- .../src/operations/allowedConnections.ts | 11 +- .../src/operations/assessments.ts | 8 +- .../src/operations/assessmentsMetadata.ts | 11 +- .../operations/autoProvisioningSettings.ts | 12 +- .../src/operations/automations.ts | 11 +- .../src/operations/complianceResults.ts | 8 +- .../src/operations/compliances.ts | 8 +- .../arm-security/src/operations/connectors.ts | 296 + .../src/operations/deviceOperations.ts | 85 + .../src/operations/deviceSecurityGroups.ts | 8 +- .../src/operations/devicesForHub.ts | 138 + .../src/operations/devicesForSubscription.ts | 134 + .../operations/discoveredSecuritySolutions.ts | 11 +- .../operations/externalSecuritySolutions.ts | 11 +- .../arm-security/src/operations/index.ts | 30 +- .../informationProtectionPolicies.ts | 8 +- .../src/operations/ingestionSettings.ts | 403 + .../src/operations/iotAlertTypes.ts | 128 + .../arm-security/src/operations/iotAlerts.ts | 214 + .../src/operations/iotDefenderSettings.ts | 329 + .../src/operations/iotRecommendationTypes.ts | 128 + .../src/operations/iotRecommendations.ts | 208 + .../src/operations/iotSecuritySolution.ts | 25 +- .../iotSecuritySolutionAnalytics.ts | 5 +- ...curitySolutionsAnalyticsAggregatedAlert.ts | 15 +- ...ecuritySolutionsAnalyticsRecommendation.ts | 15 +- .../arm-security/src/operations/iotSensors.ts | 448 + .../arm-security/src/operations/iotSites.ts | 246 + .../operations/jitNetworkAccessPolicies.ts | 17 +- .../arm-security/src/operations/locations.ts | 8 +- .../src/operations/onPremiseIotSensors.ts | 359 + .../arm-security/src/operations/operations.ts | 8 +- .../arm-security/src/operations/pricings.ts | 5 +- .../regulatoryComplianceAssessments.ts | 15 +- .../regulatoryComplianceControls.ts | 15 +- .../regulatoryComplianceStandards.ts | 15 +- .../secureScoreControlDefinitions.ts | 25 +- .../src/operations/secureScoreControls.ts | 46 +- .../src/operations/secureScores.ts | 28 +- .../src/operations/securityContacts.ts | 8 +- .../src/operations/securitySolutions.ts | 189 + ...ecuritySolutionsReferenceDataOperations.ts | 124 + ...serverVulnerabilityAssessmentOperations.ts | 46 +- .../arm-security/src/operations/settings.ts | 30 +- .../src/operations/softwareInventories.ts | 325 + ...sqlVulnerabilityAssessmentBaselineRules.ts | 359 + .../sqlVulnerabilityAssessmentScanResults.ts | 164 + .../sqlVulnerabilityAssessmentScans.ts | 154 + .../src/operations/subAssessments.ts | 11 +- .../arm-security/src/operations/tasks.ts | 35 +- .../arm-security/src/operations/topology.ts | 11 +- .../src/operations/workspaceSettings.ts | 8 +- .../arm-security/src/securityCenter.ts | 65 +- .../arm-security/src/securityCenterContext.ts | 25 +- 122 files changed, 20618 insertions(+), 4935 deletions(-) create mode 100644 sdk/security/arm-security/src/models/connectorsMappers.ts create mode 100644 sdk/security/arm-security/src/models/deviceOperationsMappers.ts create mode 100644 sdk/security/arm-security/src/models/devicesForHubMappers.ts create mode 100644 sdk/security/arm-security/src/models/devicesForSubscriptionMappers.ts create mode 100644 sdk/security/arm-security/src/models/ingestionSettingsMappers.ts create mode 100644 sdk/security/arm-security/src/models/iotAlertTypesMappers.ts create mode 100644 sdk/security/arm-security/src/models/iotAlertsMappers.ts create mode 100644 sdk/security/arm-security/src/models/iotDefenderSettingsMappers.ts create mode 100644 sdk/security/arm-security/src/models/iotRecommendationTypesMappers.ts create mode 100644 sdk/security/arm-security/src/models/iotRecommendationsMappers.ts create mode 100644 sdk/security/arm-security/src/models/iotSensorsMappers.ts create mode 100644 sdk/security/arm-security/src/models/iotSitesMappers.ts create mode 100644 sdk/security/arm-security/src/models/onPremiseIotSensorsMappers.ts create mode 100644 sdk/security/arm-security/src/models/securitySolutionsMappers.ts create mode 100644 sdk/security/arm-security/src/models/securitySolutionsReferenceDataOperationsMappers.ts create mode 100644 sdk/security/arm-security/src/models/softwareInventoriesMappers.ts create mode 100644 sdk/security/arm-security/src/models/sqlVulnerabilityAssessmentBaselineRulesMappers.ts create mode 100644 sdk/security/arm-security/src/models/sqlVulnerabilityAssessmentScanResultsMappers.ts create mode 100644 sdk/security/arm-security/src/models/sqlVulnerabilityAssessmentScansMappers.ts create mode 100644 sdk/security/arm-security/src/operations/connectors.ts create mode 100644 sdk/security/arm-security/src/operations/deviceOperations.ts create mode 100644 sdk/security/arm-security/src/operations/devicesForHub.ts create mode 100644 sdk/security/arm-security/src/operations/devicesForSubscription.ts create mode 100644 sdk/security/arm-security/src/operations/ingestionSettings.ts create mode 100644 sdk/security/arm-security/src/operations/iotAlertTypes.ts create mode 100644 sdk/security/arm-security/src/operations/iotAlerts.ts create mode 100644 sdk/security/arm-security/src/operations/iotDefenderSettings.ts create mode 100644 sdk/security/arm-security/src/operations/iotRecommendationTypes.ts create mode 100644 sdk/security/arm-security/src/operations/iotRecommendations.ts create mode 100644 sdk/security/arm-security/src/operations/iotSensors.ts create mode 100644 sdk/security/arm-security/src/operations/iotSites.ts create mode 100644 sdk/security/arm-security/src/operations/onPremiseIotSensors.ts create mode 100644 sdk/security/arm-security/src/operations/securitySolutions.ts create mode 100644 sdk/security/arm-security/src/operations/securitySolutionsReferenceDataOperations.ts create mode 100644 sdk/security/arm-security/src/operations/softwareInventories.ts create mode 100644 sdk/security/arm-security/src/operations/sqlVulnerabilityAssessmentBaselineRules.ts create mode 100644 sdk/security/arm-security/src/operations/sqlVulnerabilityAssessmentScanResults.ts create mode 100644 sdk/security/arm-security/src/operations/sqlVulnerabilityAssessmentScans.ts diff --git a/sdk/security/arm-security/LICENSE.txt b/sdk/security/arm-security/LICENSE.txt index ea8fb1516028..2d3163745319 100644 --- a/sdk/security/arm-security/LICENSE.txt +++ b/sdk/security/arm-security/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2020 Microsoft +Copyright (c) 2021 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/security/arm-security/README.md b/sdk/security/arm-security/README.md index 869cda4b96a1..16cb67aa9e5f 100644 --- a/sdk/security/arm-security/README.md +++ b/sdk/security/arm-security/README.md @@ -1,92 +1,99 @@ ## Azure SecurityCenter SDK for JavaScript -This package contains an isomorphic SDK for SecurityCenter. +This package contains an isomorphic SDK (runs both in node.js and in browsers) for SecurityCenter. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge and Firefox. -### How to Install +### Prerequisites +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-security` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: ```bash -npm install @azure/arm-security +npm install --save @azure/arm-security @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. ### How to use -#### nodejs - Authentication, client creation and list complianceResults as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth - -- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. -```bash -npm install @azure/ms-rest-nodeauth@"^3.0.0" -``` +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. +#### nodejs - Authentication, client creation, and list complianceResults as an example written in JavaScript. ##### Sample code -```typescript -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { SecurityCenter, SecurityCenterModels, SecurityCenterMappers } from "@azure/arm-security"; +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { SecurityCenter } = require("@azure/arm-security"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new SecurityCenter(creds, subscriptionId); - const scope = "testscope"; - client.complianceResults.list(scope).then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new SecurityCenter(creds, subscriptionId); +const scope = "testscope"; +client.complianceResults.list(scope).then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and list complianceResults as an example written in JavaScript. +#### browser - Authentication, client creation, and list complianceResults as an example written in JavaScript. -##### Install @azure/ms-rest-browserauth - -```bash -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-security sample - - + diff --git a/sdk/security/arm-security/package.json b/sdk/security/arm-security/package.json index ab9cfc26388f..7c2ce716cf2a 100644 --- a/sdk/security/arm-security/package.json +++ b/sdk/security/arm-security/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-security", "author": "Microsoft Corporation", "description": "SecurityCenter Library with typescript type definitions for node.js and browser.", - "version": "2.0.0", + "version": "3.0.0", "dependencies": { - "@azure/ms-rest-azure-js": "^2.0.1", - "@azure/ms-rest-js": "^2.0.4", + "@azure/ms-rest-azure-js": "^2.1.0", + "@azure/ms-rest-js": "^2.2.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.10.0" }, "keywords": [ @@ -20,13 +21,13 @@ "module": "./esm/securityCenter.js", "types": "./esm/securityCenter.d.ts", "devDependencies": { - "typescript": "^3.5.3", + "typescript": "^3.6.0", "rollup": "^1.18.0", "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", "uglify-js": "^3.6.0" }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/security/arm-security", + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/feature/v4/sdk/security/arm-security", "repository": { "type": "git", "url": "https://github.com/Azure/azure-sdk-for-js.git" diff --git a/sdk/security/arm-security/rollup.config.js b/sdk/security/arm-security/rollup.config.js index 2c4179d62509..bc2c8a23953c 100644 --- a/sdk/security/arm-security/rollup.config.js +++ b/sdk/security/arm-security/rollup.config.js @@ -21,8 +21,8 @@ const config = { "@azure/ms-rest-azure-js": "msRestAzure" }, banner: `/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. diff --git a/sdk/security/arm-security/src/models/adaptiveApplicationControlsMappers.ts b/sdk/security/arm-security/src/models/adaptiveApplicationControlsMappers.ts index 667ae58aa953..3a4325bbeb36 100644 --- a/sdk/security/arm-security/src/models/adaptiveApplicationControlsMappers.ts +++ b/sdk/security/arm-security/src/models/adaptiveApplicationControlsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -8,9 +8,9 @@ export { discriminators, - AppWhitelistingGroup, - AppWhitelistingGroups, - AppWhitelistingIssueSummary, + AdaptiveApplicationControlGroup, + AdaptiveApplicationControlGroups, + AdaptiveApplicationControlIssueSummary, CloudError, PathRecommendation, ProtectionMode, diff --git a/sdk/security/arm-security/src/models/adaptiveNetworkHardeningsMappers.ts b/sdk/security/arm-security/src/models/adaptiveNetworkHardeningsMappers.ts index e744310578ca..983b333d426b 100644 --- a/sdk/security/arm-security/src/models/adaptiveNetworkHardeningsMappers.ts +++ b/sdk/security/arm-security/src/models/adaptiveNetworkHardeningsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -15,9 +15,9 @@ export { AdditionalData, AdvancedThreatProtectionSetting, Alert, - AlertConfidenceReason, AlertEntity, AlertsSuppressionRule, + AlertSyncSettings, AllowlistCustomAlertRule, AmqpC2DMessagesNotInAllowedRange, AmqpC2DRejectedMessagesNotInAllowedRange, @@ -25,53 +25,91 @@ export { AscLocation, AssessmentLinks, AssessmentStatus, + AuthenticationDetailsProperties, AutoProvisioningSetting, + AwAssumeRoleAuthenticationDetailsProperties, + AwsCredsAuthenticationDetailsProperties, AzureResourceDetails, + AzureResourceIdentifier, AzureResourceLink, + Baseline, + BaselineAdjustedResult, BaseResource, + BenchmarkReference, CloudError, Compliance, ComplianceResult, ComplianceSegment, + ConnectionFromIpNotAllowed, ConnectionToIpNotAllowed, + ConnectorSetting, ContainerRegistryVulnerabilityProperties, CustomAlertRule, CVE, CVSS, DataExportSettings, DenylistCustomAlertRule, + Device, DeviceSecurityGroup, DirectMethodInvokesNotInAllowedRange, EffectiveNetworkSecurityGroups, FailedLocalLoginsNotInAllowedRange, FileUploadsNotInAllowedRange, + Firmware, + GcpCredentialsDetailsProperties, HttpC2DMessagesNotInAllowedRange, HttpC2DRejectedMessagesNotInAllowedRange, HttpD2CMessagesNotInAllowedRange, + HybridComputeSettingsProperties, InformationProtectionKeyword, InformationProtectionPolicy, InformationType, + IngestionSetting, + IotAlertModel, + IotAlertType, + IotDefenderSettingsModel, + IotRecommendationModel, + IotRecommendationType, IoTSecurityAlertedDevice, IoTSecurityDeviceAlert, IoTSecurityDeviceRecommendation, IoTSecuritySolutionAnalyticsModel, IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IotSensorsModel, IoTSeverityMetrics, + IotSitesModel, + IpAddress, ListCustomAlertRule, LocalUserNotAllowed, + LogAnalyticsIdentifier, + MacAddress, MqttC2DMessagesNotInAllowedRange, MqttC2DRejectedMessagesNotInAllowedRange, MqttD2CMessagesNotInAllowedRange, + NetworkInterface, + OnPremiseIotSensor, OnPremiseResourceDetails, + OnPremiseSqlResourceDetails, Pricing, ProcessNotAllowed, + Protocol1, + ProxyServerProperties, + QueryCheck, QueuePurgesNotInAllowedRange, RegulatoryComplianceAssessment, RegulatoryComplianceControl, RegulatoryComplianceStandard, + Remediation, Resource, ResourceDetails, + ResourceIdentifier, Rule, + RuleResults, + RuleResultsProperties, + Scan, + ScanProperties, + ScanResult, + ScanResultProperties, ScopeElement, SecureScoreControlDefinitionItem, SecureScoreControlDefinitionSource, @@ -87,10 +125,13 @@ export { SecurityTask, SecurityTaskParameters, SensitivityLabel, + Sensor, ServerVulnerabilityAssessment, ServerVulnerabilityProperties, + ServicePrincipalProperties, Setting, - SettingResource, + Site, + Software, SqlServerVulnerabilityProperties, SubAssessmentStatus, SuppressionAlertsScope, @@ -98,6 +139,7 @@ export { TimeWindowCustomAlertRule, TwinUpdatesNotInAllowedRange, UnauthorizedOperationsNotInAllowedRange, + VaRule, VendorReference, WorkspaceSetting } from "../models/mappers"; diff --git a/sdk/security/arm-security/src/models/advancedThreatProtectionMappers.ts b/sdk/security/arm-security/src/models/advancedThreatProtectionMappers.ts index 4e805a8af48e..4fac024d16d6 100644 --- a/sdk/security/arm-security/src/models/advancedThreatProtectionMappers.ts +++ b/sdk/security/arm-security/src/models/advancedThreatProtectionMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -13,9 +13,9 @@ export { AdditionalData, AdvancedThreatProtectionSetting, Alert, - AlertConfidenceReason, AlertEntity, AlertsSuppressionRule, + AlertSyncSettings, AllowlistCustomAlertRule, AmqpC2DMessagesNotInAllowedRange, AmqpC2DRejectedMessagesNotInAllowedRange, @@ -23,53 +23,91 @@ export { AscLocation, AssessmentLinks, AssessmentStatus, + AuthenticationDetailsProperties, AutoProvisioningSetting, + AwAssumeRoleAuthenticationDetailsProperties, + AwsCredsAuthenticationDetailsProperties, AzureResourceDetails, + AzureResourceIdentifier, AzureResourceLink, + Baseline, + BaselineAdjustedResult, BaseResource, + BenchmarkReference, CloudError, Compliance, ComplianceResult, ComplianceSegment, + ConnectionFromIpNotAllowed, ConnectionToIpNotAllowed, + ConnectorSetting, ContainerRegistryVulnerabilityProperties, CustomAlertRule, CVE, CVSS, DataExportSettings, DenylistCustomAlertRule, + Device, DeviceSecurityGroup, DirectMethodInvokesNotInAllowedRange, EffectiveNetworkSecurityGroups, FailedLocalLoginsNotInAllowedRange, FileUploadsNotInAllowedRange, + Firmware, + GcpCredentialsDetailsProperties, HttpC2DMessagesNotInAllowedRange, HttpC2DRejectedMessagesNotInAllowedRange, HttpD2CMessagesNotInAllowedRange, + HybridComputeSettingsProperties, InformationProtectionKeyword, InformationProtectionPolicy, InformationType, + IngestionSetting, + IotAlertModel, + IotAlertType, + IotDefenderSettingsModel, + IotRecommendationModel, + IotRecommendationType, IoTSecurityAlertedDevice, IoTSecurityDeviceAlert, IoTSecurityDeviceRecommendation, IoTSecuritySolutionAnalyticsModel, IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IotSensorsModel, IoTSeverityMetrics, + IotSitesModel, + IpAddress, ListCustomAlertRule, LocalUserNotAllowed, + LogAnalyticsIdentifier, + MacAddress, MqttC2DMessagesNotInAllowedRange, MqttC2DRejectedMessagesNotInAllowedRange, MqttD2CMessagesNotInAllowedRange, + NetworkInterface, + OnPremiseIotSensor, OnPremiseResourceDetails, + OnPremiseSqlResourceDetails, Pricing, ProcessNotAllowed, + Protocol1, + ProxyServerProperties, + QueryCheck, QueuePurgesNotInAllowedRange, RegulatoryComplianceAssessment, RegulatoryComplianceControl, RegulatoryComplianceStandard, + Remediation, Resource, ResourceDetails, + ResourceIdentifier, Rule, + RuleResults, + RuleResultsProperties, + Scan, + ScanProperties, + ScanResult, + ScanResultProperties, ScopeElement, SecureScoreControlDefinitionItem, SecureScoreControlDefinitionSource, @@ -85,10 +123,13 @@ export { SecurityTask, SecurityTaskParameters, SensitivityLabel, + Sensor, ServerVulnerabilityAssessment, ServerVulnerabilityProperties, + ServicePrincipalProperties, Setting, - SettingResource, + Site, + Software, SqlServerVulnerabilityProperties, SubAssessmentStatus, SuppressionAlertsScope, @@ -96,6 +137,7 @@ export { TimeWindowCustomAlertRule, TwinUpdatesNotInAllowedRange, UnauthorizedOperationsNotInAllowedRange, + VaRule, VendorReference, WorkspaceSetting } from "../models/mappers"; diff --git a/sdk/security/arm-security/src/models/alertsMappers.ts b/sdk/security/arm-security/src/models/alertsMappers.ts index 54ae8a36b48f..e40ad5185eaa 100644 --- a/sdk/security/arm-security/src/models/alertsMappers.ts +++ b/sdk/security/arm-security/src/models/alertsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -13,10 +13,13 @@ export { AdditionalData, AdvancedThreatProtectionSetting, Alert, - AlertConfidenceReason, AlertEntity, AlertList, + AlertSimulatorBundlesRequestProperties, + AlertSimulatorRequestBody, + AlertSimulatorRequestProperties, AlertsSuppressionRule, + AlertSyncSettings, AllowlistCustomAlertRule, AmqpC2DMessagesNotInAllowedRange, AmqpC2DRejectedMessagesNotInAllowedRange, @@ -24,53 +27,91 @@ export { AscLocation, AssessmentLinks, AssessmentStatus, + AuthenticationDetailsProperties, AutoProvisioningSetting, + AwAssumeRoleAuthenticationDetailsProperties, + AwsCredsAuthenticationDetailsProperties, AzureResourceDetails, + AzureResourceIdentifier, AzureResourceLink, + Baseline, + BaselineAdjustedResult, BaseResource, + BenchmarkReference, CloudError, Compliance, ComplianceResult, ComplianceSegment, + ConnectionFromIpNotAllowed, ConnectionToIpNotAllowed, + ConnectorSetting, ContainerRegistryVulnerabilityProperties, CustomAlertRule, CVE, CVSS, DataExportSettings, DenylistCustomAlertRule, + Device, DeviceSecurityGroup, DirectMethodInvokesNotInAllowedRange, EffectiveNetworkSecurityGroups, FailedLocalLoginsNotInAllowedRange, FileUploadsNotInAllowedRange, + Firmware, + GcpCredentialsDetailsProperties, HttpC2DMessagesNotInAllowedRange, HttpC2DRejectedMessagesNotInAllowedRange, HttpD2CMessagesNotInAllowedRange, + HybridComputeSettingsProperties, InformationProtectionKeyword, InformationProtectionPolicy, InformationType, + IngestionSetting, + IotAlertModel, + IotAlertType, + IotDefenderSettingsModel, + IotRecommendationModel, + IotRecommendationType, IoTSecurityAlertedDevice, IoTSecurityDeviceAlert, IoTSecurityDeviceRecommendation, IoTSecuritySolutionAnalyticsModel, IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IotSensorsModel, IoTSeverityMetrics, + IotSitesModel, + IpAddress, ListCustomAlertRule, LocalUserNotAllowed, + LogAnalyticsIdentifier, + MacAddress, MqttC2DMessagesNotInAllowedRange, MqttC2DRejectedMessagesNotInAllowedRange, MqttD2CMessagesNotInAllowedRange, + NetworkInterface, + OnPremiseIotSensor, OnPremiseResourceDetails, + OnPremiseSqlResourceDetails, Pricing, ProcessNotAllowed, + Protocol1, + ProxyServerProperties, + QueryCheck, QueuePurgesNotInAllowedRange, RegulatoryComplianceAssessment, RegulatoryComplianceControl, RegulatoryComplianceStandard, + Remediation, Resource, ResourceDetails, + ResourceIdentifier, Rule, + RuleResults, + RuleResultsProperties, + Scan, + ScanProperties, + ScanResult, + ScanResultProperties, ScopeElement, SecureScoreControlDefinitionItem, SecureScoreControlDefinitionSource, @@ -86,10 +127,13 @@ export { SecurityTask, SecurityTaskParameters, SensitivityLabel, + Sensor, ServerVulnerabilityAssessment, ServerVulnerabilityProperties, + ServicePrincipalProperties, Setting, - SettingResource, + Site, + Software, SqlServerVulnerabilityProperties, SubAssessmentStatus, SuppressionAlertsScope, @@ -97,6 +141,7 @@ export { TimeWindowCustomAlertRule, TwinUpdatesNotInAllowedRange, UnauthorizedOperationsNotInAllowedRange, + VaRule, VendorReference, WorkspaceSetting } from "../models/mappers"; diff --git a/sdk/security/arm-security/src/models/alertsSuppressionRulesMappers.ts b/sdk/security/arm-security/src/models/alertsSuppressionRulesMappers.ts index 1d11d709b04e..85425a2d0840 100644 --- a/sdk/security/arm-security/src/models/alertsSuppressionRulesMappers.ts +++ b/sdk/security/arm-security/src/models/alertsSuppressionRulesMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -13,10 +13,10 @@ export { AdditionalData, AdvancedThreatProtectionSetting, Alert, - AlertConfidenceReason, AlertEntity, AlertsSuppressionRule, AlertsSuppressionRulesList, + AlertSyncSettings, AllowlistCustomAlertRule, AmqpC2DMessagesNotInAllowedRange, AmqpC2DRejectedMessagesNotInAllowedRange, @@ -24,53 +24,91 @@ export { AscLocation, AssessmentLinks, AssessmentStatus, + AuthenticationDetailsProperties, AutoProvisioningSetting, + AwAssumeRoleAuthenticationDetailsProperties, + AwsCredsAuthenticationDetailsProperties, AzureResourceDetails, + AzureResourceIdentifier, AzureResourceLink, + Baseline, + BaselineAdjustedResult, BaseResource, + BenchmarkReference, CloudError, Compliance, ComplianceResult, ComplianceSegment, + ConnectionFromIpNotAllowed, ConnectionToIpNotAllowed, + ConnectorSetting, ContainerRegistryVulnerabilityProperties, CustomAlertRule, CVE, CVSS, DataExportSettings, DenylistCustomAlertRule, + Device, DeviceSecurityGroup, DirectMethodInvokesNotInAllowedRange, EffectiveNetworkSecurityGroups, FailedLocalLoginsNotInAllowedRange, FileUploadsNotInAllowedRange, + Firmware, + GcpCredentialsDetailsProperties, HttpC2DMessagesNotInAllowedRange, HttpC2DRejectedMessagesNotInAllowedRange, HttpD2CMessagesNotInAllowedRange, + HybridComputeSettingsProperties, InformationProtectionKeyword, InformationProtectionPolicy, InformationType, + IngestionSetting, + IotAlertModel, + IotAlertType, + IotDefenderSettingsModel, + IotRecommendationModel, + IotRecommendationType, IoTSecurityAlertedDevice, IoTSecurityDeviceAlert, IoTSecurityDeviceRecommendation, IoTSecuritySolutionAnalyticsModel, IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IotSensorsModel, IoTSeverityMetrics, + IotSitesModel, + IpAddress, ListCustomAlertRule, LocalUserNotAllowed, + LogAnalyticsIdentifier, + MacAddress, MqttC2DMessagesNotInAllowedRange, MqttC2DRejectedMessagesNotInAllowedRange, MqttD2CMessagesNotInAllowedRange, + NetworkInterface, + OnPremiseIotSensor, OnPremiseResourceDetails, + OnPremiseSqlResourceDetails, Pricing, ProcessNotAllowed, + Protocol1, + ProxyServerProperties, + QueryCheck, QueuePurgesNotInAllowedRange, RegulatoryComplianceAssessment, RegulatoryComplianceControl, RegulatoryComplianceStandard, + Remediation, Resource, ResourceDetails, + ResourceIdentifier, Rule, + RuleResults, + RuleResultsProperties, + Scan, + ScanProperties, + ScanResult, + ScanResultProperties, ScopeElement, SecureScoreControlDefinitionItem, SecureScoreControlDefinitionSource, @@ -86,10 +124,13 @@ export { SecurityTask, SecurityTaskParameters, SensitivityLabel, + Sensor, ServerVulnerabilityAssessment, ServerVulnerabilityProperties, + ServicePrincipalProperties, Setting, - SettingResource, + Site, + Software, SqlServerVulnerabilityProperties, SubAssessmentStatus, SuppressionAlertsScope, @@ -97,6 +138,7 @@ export { TimeWindowCustomAlertRule, TwinUpdatesNotInAllowedRange, UnauthorizedOperationsNotInAllowedRange, + VaRule, VendorReference, WorkspaceSetting } from "../models/mappers"; diff --git a/sdk/security/arm-security/src/models/allowedConnectionsMappers.ts b/sdk/security/arm-security/src/models/allowedConnectionsMappers.ts index 3c08bb7fe3fa..d5c8b95ffd52 100644 --- a/sdk/security/arm-security/src/models/allowedConnectionsMappers.ts +++ b/sdk/security/arm-security/src/models/allowedConnectionsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. diff --git a/sdk/security/arm-security/src/models/assessmentsMappers.ts b/sdk/security/arm-security/src/models/assessmentsMappers.ts index 588f3fb6ff9a..7ec5955c83c1 100644 --- a/sdk/security/arm-security/src/models/assessmentsMappers.ts +++ b/sdk/security/arm-security/src/models/assessmentsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -13,9 +13,9 @@ export { AdditionalData, AdvancedThreatProtectionSetting, Alert, - AlertConfidenceReason, AlertEntity, AlertsSuppressionRule, + AlertSyncSettings, AllowlistCustomAlertRule, AmqpC2DMessagesNotInAllowedRange, AmqpC2DRejectedMessagesNotInAllowedRange, @@ -23,53 +23,91 @@ export { AscLocation, AssessmentLinks, AssessmentStatus, + AuthenticationDetailsProperties, AutoProvisioningSetting, + AwAssumeRoleAuthenticationDetailsProperties, + AwsCredsAuthenticationDetailsProperties, AzureResourceDetails, + AzureResourceIdentifier, AzureResourceLink, + Baseline, + BaselineAdjustedResult, BaseResource, + BenchmarkReference, CloudError, Compliance, ComplianceResult, ComplianceSegment, + ConnectionFromIpNotAllowed, ConnectionToIpNotAllowed, + ConnectorSetting, ContainerRegistryVulnerabilityProperties, CustomAlertRule, CVE, CVSS, DataExportSettings, DenylistCustomAlertRule, + Device, DeviceSecurityGroup, DirectMethodInvokesNotInAllowedRange, EffectiveNetworkSecurityGroups, FailedLocalLoginsNotInAllowedRange, FileUploadsNotInAllowedRange, + Firmware, + GcpCredentialsDetailsProperties, HttpC2DMessagesNotInAllowedRange, HttpC2DRejectedMessagesNotInAllowedRange, HttpD2CMessagesNotInAllowedRange, + HybridComputeSettingsProperties, InformationProtectionKeyword, InformationProtectionPolicy, InformationType, + IngestionSetting, + IotAlertModel, + IotAlertType, + IotDefenderSettingsModel, + IotRecommendationModel, + IotRecommendationType, IoTSecurityAlertedDevice, IoTSecurityDeviceAlert, IoTSecurityDeviceRecommendation, IoTSecuritySolutionAnalyticsModel, IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IotSensorsModel, IoTSeverityMetrics, + IotSitesModel, + IpAddress, ListCustomAlertRule, LocalUserNotAllowed, + LogAnalyticsIdentifier, + MacAddress, MqttC2DMessagesNotInAllowedRange, MqttC2DRejectedMessagesNotInAllowedRange, MqttD2CMessagesNotInAllowedRange, + NetworkInterface, + OnPremiseIotSensor, OnPremiseResourceDetails, + OnPremiseSqlResourceDetails, Pricing, ProcessNotAllowed, + Protocol1, + ProxyServerProperties, + QueryCheck, QueuePurgesNotInAllowedRange, RegulatoryComplianceAssessment, RegulatoryComplianceControl, RegulatoryComplianceStandard, + Remediation, Resource, ResourceDetails, + ResourceIdentifier, Rule, + RuleResults, + RuleResultsProperties, + Scan, + ScanProperties, + ScanResult, + ScanResultProperties, ScopeElement, SecureScoreControlDefinitionItem, SecureScoreControlDefinitionSource, @@ -86,10 +124,13 @@ export { SecurityTask, SecurityTaskParameters, SensitivityLabel, + Sensor, ServerVulnerabilityAssessment, ServerVulnerabilityProperties, + ServicePrincipalProperties, Setting, - SettingResource, + Site, + Software, SqlServerVulnerabilityProperties, SubAssessmentStatus, SuppressionAlertsScope, @@ -97,6 +138,7 @@ export { TimeWindowCustomAlertRule, TwinUpdatesNotInAllowedRange, UnauthorizedOperationsNotInAllowedRange, + VaRule, VendorReference, WorkspaceSetting } from "../models/mappers"; diff --git a/sdk/security/arm-security/src/models/assessmentsMetadataMappers.ts b/sdk/security/arm-security/src/models/assessmentsMetadataMappers.ts index 206b63ca6c92..6e6b5c282cd8 100644 --- a/sdk/security/arm-security/src/models/assessmentsMetadataMappers.ts +++ b/sdk/security/arm-security/src/models/assessmentsMetadataMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -13,9 +13,9 @@ export { AdditionalData, AdvancedThreatProtectionSetting, Alert, - AlertConfidenceReason, AlertEntity, AlertsSuppressionRule, + AlertSyncSettings, AllowlistCustomAlertRule, AmqpC2DMessagesNotInAllowedRange, AmqpC2DRejectedMessagesNotInAllowedRange, @@ -23,53 +23,91 @@ export { AscLocation, AssessmentLinks, AssessmentStatus, + AuthenticationDetailsProperties, AutoProvisioningSetting, + AwAssumeRoleAuthenticationDetailsProperties, + AwsCredsAuthenticationDetailsProperties, AzureResourceDetails, + AzureResourceIdentifier, AzureResourceLink, + Baseline, + BaselineAdjustedResult, BaseResource, + BenchmarkReference, CloudError, Compliance, ComplianceResult, ComplianceSegment, + ConnectionFromIpNotAllowed, ConnectionToIpNotAllowed, + ConnectorSetting, ContainerRegistryVulnerabilityProperties, CustomAlertRule, CVE, CVSS, DataExportSettings, DenylistCustomAlertRule, + Device, DeviceSecurityGroup, DirectMethodInvokesNotInAllowedRange, EffectiveNetworkSecurityGroups, FailedLocalLoginsNotInAllowedRange, FileUploadsNotInAllowedRange, + Firmware, + GcpCredentialsDetailsProperties, HttpC2DMessagesNotInAllowedRange, HttpC2DRejectedMessagesNotInAllowedRange, HttpD2CMessagesNotInAllowedRange, + HybridComputeSettingsProperties, InformationProtectionKeyword, InformationProtectionPolicy, InformationType, + IngestionSetting, + IotAlertModel, + IotAlertType, + IotDefenderSettingsModel, + IotRecommendationModel, + IotRecommendationType, IoTSecurityAlertedDevice, IoTSecurityDeviceAlert, IoTSecurityDeviceRecommendation, IoTSecuritySolutionAnalyticsModel, IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IotSensorsModel, IoTSeverityMetrics, + IotSitesModel, + IpAddress, ListCustomAlertRule, LocalUserNotAllowed, + LogAnalyticsIdentifier, + MacAddress, MqttC2DMessagesNotInAllowedRange, MqttC2DRejectedMessagesNotInAllowedRange, MqttD2CMessagesNotInAllowedRange, + NetworkInterface, + OnPremiseIotSensor, OnPremiseResourceDetails, + OnPremiseSqlResourceDetails, Pricing, ProcessNotAllowed, + Protocol1, + ProxyServerProperties, + QueryCheck, QueuePurgesNotInAllowedRange, RegulatoryComplianceAssessment, RegulatoryComplianceControl, RegulatoryComplianceStandard, + Remediation, Resource, ResourceDetails, + ResourceIdentifier, Rule, + RuleResults, + RuleResultsProperties, + Scan, + ScanProperties, + ScanResult, + ScanResultProperties, ScopeElement, SecureScoreControlDefinitionItem, SecureScoreControlDefinitionSource, @@ -86,10 +124,13 @@ export { SecurityTask, SecurityTaskParameters, SensitivityLabel, + Sensor, ServerVulnerabilityAssessment, ServerVulnerabilityProperties, + ServicePrincipalProperties, Setting, - SettingResource, + Site, + Software, SqlServerVulnerabilityProperties, SubAssessmentStatus, SuppressionAlertsScope, @@ -97,6 +138,7 @@ export { TimeWindowCustomAlertRule, TwinUpdatesNotInAllowedRange, UnauthorizedOperationsNotInAllowedRange, + VaRule, VendorReference, WorkspaceSetting } from "../models/mappers"; diff --git a/sdk/security/arm-security/src/models/autoProvisioningSettingsMappers.ts b/sdk/security/arm-security/src/models/autoProvisioningSettingsMappers.ts index 10d241ae6e7d..584b2f099280 100644 --- a/sdk/security/arm-security/src/models/autoProvisioningSettingsMappers.ts +++ b/sdk/security/arm-security/src/models/autoProvisioningSettingsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -13,9 +13,9 @@ export { AdditionalData, AdvancedThreatProtectionSetting, Alert, - AlertConfidenceReason, AlertEntity, AlertsSuppressionRule, + AlertSyncSettings, AllowlistCustomAlertRule, AmqpC2DMessagesNotInAllowedRange, AmqpC2DRejectedMessagesNotInAllowedRange, @@ -23,54 +23,92 @@ export { AscLocation, AssessmentLinks, AssessmentStatus, + AuthenticationDetailsProperties, AutoProvisioningSetting, AutoProvisioningSettingList, + AwAssumeRoleAuthenticationDetailsProperties, + AwsCredsAuthenticationDetailsProperties, AzureResourceDetails, + AzureResourceIdentifier, AzureResourceLink, + Baseline, + BaselineAdjustedResult, BaseResource, + BenchmarkReference, CloudError, Compliance, ComplianceResult, ComplianceSegment, + ConnectionFromIpNotAllowed, ConnectionToIpNotAllowed, + ConnectorSetting, ContainerRegistryVulnerabilityProperties, CustomAlertRule, CVE, CVSS, DataExportSettings, DenylistCustomAlertRule, + Device, DeviceSecurityGroup, DirectMethodInvokesNotInAllowedRange, EffectiveNetworkSecurityGroups, FailedLocalLoginsNotInAllowedRange, FileUploadsNotInAllowedRange, + Firmware, + GcpCredentialsDetailsProperties, HttpC2DMessagesNotInAllowedRange, HttpC2DRejectedMessagesNotInAllowedRange, HttpD2CMessagesNotInAllowedRange, + HybridComputeSettingsProperties, InformationProtectionKeyword, InformationProtectionPolicy, InformationType, + IngestionSetting, + IotAlertModel, + IotAlertType, + IotDefenderSettingsModel, + IotRecommendationModel, + IotRecommendationType, IoTSecurityAlertedDevice, IoTSecurityDeviceAlert, IoTSecurityDeviceRecommendation, IoTSecuritySolutionAnalyticsModel, IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IotSensorsModel, IoTSeverityMetrics, + IotSitesModel, + IpAddress, ListCustomAlertRule, LocalUserNotAllowed, + LogAnalyticsIdentifier, + MacAddress, MqttC2DMessagesNotInAllowedRange, MqttC2DRejectedMessagesNotInAllowedRange, MqttD2CMessagesNotInAllowedRange, + NetworkInterface, + OnPremiseIotSensor, OnPremiseResourceDetails, + OnPremiseSqlResourceDetails, Pricing, ProcessNotAllowed, + Protocol1, + ProxyServerProperties, + QueryCheck, QueuePurgesNotInAllowedRange, RegulatoryComplianceAssessment, RegulatoryComplianceControl, RegulatoryComplianceStandard, + Remediation, Resource, ResourceDetails, + ResourceIdentifier, Rule, + RuleResults, + RuleResultsProperties, + Scan, + ScanProperties, + ScanResult, + ScanResultProperties, ScopeElement, SecureScoreControlDefinitionItem, SecureScoreControlDefinitionSource, @@ -86,10 +124,13 @@ export { SecurityTask, SecurityTaskParameters, SensitivityLabel, + Sensor, ServerVulnerabilityAssessment, ServerVulnerabilityProperties, + ServicePrincipalProperties, Setting, - SettingResource, + Site, + Software, SqlServerVulnerabilityProperties, SubAssessmentStatus, SuppressionAlertsScope, @@ -97,6 +138,7 @@ export { TimeWindowCustomAlertRule, TwinUpdatesNotInAllowedRange, UnauthorizedOperationsNotInAllowedRange, + VaRule, VendorReference, WorkspaceSetting } from "../models/mappers"; diff --git a/sdk/security/arm-security/src/models/automationsMappers.ts b/sdk/security/arm-security/src/models/automationsMappers.ts index c0c7f12b3797..5c234eb53d3d 100644 --- a/sdk/security/arm-security/src/models/automationsMappers.ts +++ b/sdk/security/arm-security/src/models/automationsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. diff --git a/sdk/security/arm-security/src/models/complianceResultsMappers.ts b/sdk/security/arm-security/src/models/complianceResultsMappers.ts index 9baf6d868a5f..66bdc211b151 100644 --- a/sdk/security/arm-security/src/models/complianceResultsMappers.ts +++ b/sdk/security/arm-security/src/models/complianceResultsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -13,9 +13,9 @@ export { AdditionalData, AdvancedThreatProtectionSetting, Alert, - AlertConfidenceReason, AlertEntity, AlertsSuppressionRule, + AlertSyncSettings, AllowlistCustomAlertRule, AmqpC2DMessagesNotInAllowedRange, AmqpC2DRejectedMessagesNotInAllowedRange, @@ -23,54 +23,92 @@ export { AscLocation, AssessmentLinks, AssessmentStatus, + AuthenticationDetailsProperties, AutoProvisioningSetting, + AwAssumeRoleAuthenticationDetailsProperties, + AwsCredsAuthenticationDetailsProperties, AzureResourceDetails, + AzureResourceIdentifier, AzureResourceLink, + Baseline, + BaselineAdjustedResult, BaseResource, + BenchmarkReference, CloudError, Compliance, ComplianceResult, ComplianceResultList, ComplianceSegment, + ConnectionFromIpNotAllowed, ConnectionToIpNotAllowed, + ConnectorSetting, ContainerRegistryVulnerabilityProperties, CustomAlertRule, CVE, CVSS, DataExportSettings, DenylistCustomAlertRule, + Device, DeviceSecurityGroup, DirectMethodInvokesNotInAllowedRange, EffectiveNetworkSecurityGroups, FailedLocalLoginsNotInAllowedRange, FileUploadsNotInAllowedRange, + Firmware, + GcpCredentialsDetailsProperties, HttpC2DMessagesNotInAllowedRange, HttpC2DRejectedMessagesNotInAllowedRange, HttpD2CMessagesNotInAllowedRange, + HybridComputeSettingsProperties, InformationProtectionKeyword, InformationProtectionPolicy, InformationType, + IngestionSetting, + IotAlertModel, + IotAlertType, + IotDefenderSettingsModel, + IotRecommendationModel, + IotRecommendationType, IoTSecurityAlertedDevice, IoTSecurityDeviceAlert, IoTSecurityDeviceRecommendation, IoTSecuritySolutionAnalyticsModel, IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IotSensorsModel, IoTSeverityMetrics, + IotSitesModel, + IpAddress, ListCustomAlertRule, LocalUserNotAllowed, + LogAnalyticsIdentifier, + MacAddress, MqttC2DMessagesNotInAllowedRange, MqttC2DRejectedMessagesNotInAllowedRange, MqttD2CMessagesNotInAllowedRange, + NetworkInterface, + OnPremiseIotSensor, OnPremiseResourceDetails, + OnPremiseSqlResourceDetails, Pricing, ProcessNotAllowed, + Protocol1, + ProxyServerProperties, + QueryCheck, QueuePurgesNotInAllowedRange, RegulatoryComplianceAssessment, RegulatoryComplianceControl, RegulatoryComplianceStandard, + Remediation, Resource, ResourceDetails, + ResourceIdentifier, Rule, + RuleResults, + RuleResultsProperties, + Scan, + ScanProperties, + ScanResult, + ScanResultProperties, ScopeElement, SecureScoreControlDefinitionItem, SecureScoreControlDefinitionSource, @@ -86,10 +124,13 @@ export { SecurityTask, SecurityTaskParameters, SensitivityLabel, + Sensor, ServerVulnerabilityAssessment, ServerVulnerabilityProperties, + ServicePrincipalProperties, Setting, - SettingResource, + Site, + Software, SqlServerVulnerabilityProperties, SubAssessmentStatus, SuppressionAlertsScope, @@ -97,6 +138,7 @@ export { TimeWindowCustomAlertRule, TwinUpdatesNotInAllowedRange, UnauthorizedOperationsNotInAllowedRange, + VaRule, VendorReference, WorkspaceSetting } from "../models/mappers"; diff --git a/sdk/security/arm-security/src/models/compliancesMappers.ts b/sdk/security/arm-security/src/models/compliancesMappers.ts index 7706b9dbf8c8..cbee8d0d4e77 100644 --- a/sdk/security/arm-security/src/models/compliancesMappers.ts +++ b/sdk/security/arm-security/src/models/compliancesMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -13,9 +13,9 @@ export { AdditionalData, AdvancedThreatProtectionSetting, Alert, - AlertConfidenceReason, AlertEntity, AlertsSuppressionRule, + AlertSyncSettings, AllowlistCustomAlertRule, AmqpC2DMessagesNotInAllowedRange, AmqpC2DRejectedMessagesNotInAllowedRange, @@ -23,54 +23,92 @@ export { AscLocation, AssessmentLinks, AssessmentStatus, + AuthenticationDetailsProperties, AutoProvisioningSetting, + AwAssumeRoleAuthenticationDetailsProperties, + AwsCredsAuthenticationDetailsProperties, AzureResourceDetails, + AzureResourceIdentifier, AzureResourceLink, + Baseline, + BaselineAdjustedResult, BaseResource, + BenchmarkReference, CloudError, Compliance, ComplianceList, ComplianceResult, ComplianceSegment, + ConnectionFromIpNotAllowed, ConnectionToIpNotAllowed, + ConnectorSetting, ContainerRegistryVulnerabilityProperties, CustomAlertRule, CVE, CVSS, DataExportSettings, DenylistCustomAlertRule, + Device, DeviceSecurityGroup, DirectMethodInvokesNotInAllowedRange, EffectiveNetworkSecurityGroups, FailedLocalLoginsNotInAllowedRange, FileUploadsNotInAllowedRange, + Firmware, + GcpCredentialsDetailsProperties, HttpC2DMessagesNotInAllowedRange, HttpC2DRejectedMessagesNotInAllowedRange, HttpD2CMessagesNotInAllowedRange, + HybridComputeSettingsProperties, InformationProtectionKeyword, InformationProtectionPolicy, InformationType, + IngestionSetting, + IotAlertModel, + IotAlertType, + IotDefenderSettingsModel, + IotRecommendationModel, + IotRecommendationType, IoTSecurityAlertedDevice, IoTSecurityDeviceAlert, IoTSecurityDeviceRecommendation, IoTSecuritySolutionAnalyticsModel, IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IotSensorsModel, IoTSeverityMetrics, + IotSitesModel, + IpAddress, ListCustomAlertRule, LocalUserNotAllowed, + LogAnalyticsIdentifier, + MacAddress, MqttC2DMessagesNotInAllowedRange, MqttC2DRejectedMessagesNotInAllowedRange, MqttD2CMessagesNotInAllowedRange, + NetworkInterface, + OnPremiseIotSensor, OnPremiseResourceDetails, + OnPremiseSqlResourceDetails, Pricing, ProcessNotAllowed, + Protocol1, + ProxyServerProperties, + QueryCheck, QueuePurgesNotInAllowedRange, RegulatoryComplianceAssessment, RegulatoryComplianceControl, RegulatoryComplianceStandard, + Remediation, Resource, ResourceDetails, + ResourceIdentifier, Rule, + RuleResults, + RuleResultsProperties, + Scan, + ScanProperties, + ScanResult, + ScanResultProperties, ScopeElement, SecureScoreControlDefinitionItem, SecureScoreControlDefinitionSource, @@ -86,10 +124,13 @@ export { SecurityTask, SecurityTaskParameters, SensitivityLabel, + Sensor, ServerVulnerabilityAssessment, ServerVulnerabilityProperties, + ServicePrincipalProperties, Setting, - SettingResource, + Site, + Software, SqlServerVulnerabilityProperties, SubAssessmentStatus, SuppressionAlertsScope, @@ -97,6 +138,7 @@ export { TimeWindowCustomAlertRule, TwinUpdatesNotInAllowedRange, UnauthorizedOperationsNotInAllowedRange, + VaRule, VendorReference, WorkspaceSetting } from "../models/mappers"; diff --git a/sdk/security/arm-security/src/models/connectorsMappers.ts b/sdk/security/arm-security/src/models/connectorsMappers.ts new file mode 100644 index 000000000000..ab08542a6ac3 --- /dev/null +++ b/sdk/security/arm-security/src/models/connectorsMappers.ts @@ -0,0 +1,144 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + ActiveConnectionsNotInAllowedRange, + AdaptiveNetworkHardening, + AdditionalData, + AdvancedThreatProtectionSetting, + Alert, + AlertEntity, + AlertsSuppressionRule, + AlertSyncSettings, + AllowlistCustomAlertRule, + AmqpC2DMessagesNotInAllowedRange, + AmqpC2DRejectedMessagesNotInAllowedRange, + AmqpD2CMessagesNotInAllowedRange, + AscLocation, + AssessmentLinks, + AssessmentStatus, + AuthenticationDetailsProperties, + AutoProvisioningSetting, + AwAssumeRoleAuthenticationDetailsProperties, + AwsCredsAuthenticationDetailsProperties, + AzureResourceDetails, + AzureResourceIdentifier, + AzureResourceLink, + Baseline, + BaselineAdjustedResult, + BaseResource, + BenchmarkReference, + CloudError, + Compliance, + ComplianceResult, + ComplianceSegment, + ConnectionFromIpNotAllowed, + ConnectionToIpNotAllowed, + ConnectorSetting, + ConnectorSettingList, + ContainerRegistryVulnerabilityProperties, + CustomAlertRule, + CVE, + CVSS, + DataExportSettings, + DenylistCustomAlertRule, + Device, + DeviceSecurityGroup, + DirectMethodInvokesNotInAllowedRange, + EffectiveNetworkSecurityGroups, + FailedLocalLoginsNotInAllowedRange, + FileUploadsNotInAllowedRange, + Firmware, + GcpCredentialsDetailsProperties, + HttpC2DMessagesNotInAllowedRange, + HttpC2DRejectedMessagesNotInAllowedRange, + HttpD2CMessagesNotInAllowedRange, + HybridComputeSettingsProperties, + InformationProtectionKeyword, + InformationProtectionPolicy, + InformationType, + IngestionSetting, + IotAlertModel, + IotAlertType, + IotDefenderSettingsModel, + IotRecommendationModel, + IotRecommendationType, + IoTSecurityAlertedDevice, + IoTSecurityDeviceAlert, + IoTSecurityDeviceRecommendation, + IoTSecuritySolutionAnalyticsModel, + IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IotSensorsModel, + IoTSeverityMetrics, + IotSitesModel, + IpAddress, + ListCustomAlertRule, + LocalUserNotAllowed, + LogAnalyticsIdentifier, + MacAddress, + MqttC2DMessagesNotInAllowedRange, + MqttC2DRejectedMessagesNotInAllowedRange, + MqttD2CMessagesNotInAllowedRange, + NetworkInterface, + OnPremiseIotSensor, + OnPremiseResourceDetails, + OnPremiseSqlResourceDetails, + Pricing, + ProcessNotAllowed, + Protocol1, + ProxyServerProperties, + QueryCheck, + QueuePurgesNotInAllowedRange, + RegulatoryComplianceAssessment, + RegulatoryComplianceControl, + RegulatoryComplianceStandard, + Remediation, + Resource, + ResourceDetails, + ResourceIdentifier, + Rule, + RuleResults, + RuleResultsProperties, + Scan, + ScanProperties, + ScanResult, + ScanResultProperties, + ScopeElement, + SecureScoreControlDefinitionItem, + SecureScoreControlDefinitionSource, + SecureScoreControlDetails, + SecureScoreItem, + SecurityAssessment, + SecurityAssessmentMetadata, + SecurityAssessmentMetadataPartnerData, + SecurityAssessmentMetadataProperties, + SecurityAssessmentPartnerData, + SecurityContact, + SecuritySubAssessment, + SecurityTask, + SecurityTaskParameters, + SensitivityLabel, + Sensor, + ServerVulnerabilityAssessment, + ServerVulnerabilityProperties, + ServicePrincipalProperties, + Setting, + Site, + Software, + SqlServerVulnerabilityProperties, + SubAssessmentStatus, + SuppressionAlertsScope, + ThresholdCustomAlertRule, + TimeWindowCustomAlertRule, + TwinUpdatesNotInAllowedRange, + UnauthorizedOperationsNotInAllowedRange, + VaRule, + VendorReference, + WorkspaceSetting +} from "../models/mappers"; diff --git a/sdk/security/arm-security/src/models/deviceOperationsMappers.ts b/sdk/security/arm-security/src/models/deviceOperationsMappers.ts new file mode 100644 index 000000000000..4fac024d16d6 --- /dev/null +++ b/sdk/security/arm-security/src/models/deviceOperationsMappers.ts @@ -0,0 +1,143 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + ActiveConnectionsNotInAllowedRange, + AdaptiveNetworkHardening, + AdditionalData, + AdvancedThreatProtectionSetting, + Alert, + AlertEntity, + AlertsSuppressionRule, + AlertSyncSettings, + AllowlistCustomAlertRule, + AmqpC2DMessagesNotInAllowedRange, + AmqpC2DRejectedMessagesNotInAllowedRange, + AmqpD2CMessagesNotInAllowedRange, + AscLocation, + AssessmentLinks, + AssessmentStatus, + AuthenticationDetailsProperties, + AutoProvisioningSetting, + AwAssumeRoleAuthenticationDetailsProperties, + AwsCredsAuthenticationDetailsProperties, + AzureResourceDetails, + AzureResourceIdentifier, + AzureResourceLink, + Baseline, + BaselineAdjustedResult, + BaseResource, + BenchmarkReference, + CloudError, + Compliance, + ComplianceResult, + ComplianceSegment, + ConnectionFromIpNotAllowed, + ConnectionToIpNotAllowed, + ConnectorSetting, + ContainerRegistryVulnerabilityProperties, + CustomAlertRule, + CVE, + CVSS, + DataExportSettings, + DenylistCustomAlertRule, + Device, + DeviceSecurityGroup, + DirectMethodInvokesNotInAllowedRange, + EffectiveNetworkSecurityGroups, + FailedLocalLoginsNotInAllowedRange, + FileUploadsNotInAllowedRange, + Firmware, + GcpCredentialsDetailsProperties, + HttpC2DMessagesNotInAllowedRange, + HttpC2DRejectedMessagesNotInAllowedRange, + HttpD2CMessagesNotInAllowedRange, + HybridComputeSettingsProperties, + InformationProtectionKeyword, + InformationProtectionPolicy, + InformationType, + IngestionSetting, + IotAlertModel, + IotAlertType, + IotDefenderSettingsModel, + IotRecommendationModel, + IotRecommendationType, + IoTSecurityAlertedDevice, + IoTSecurityDeviceAlert, + IoTSecurityDeviceRecommendation, + IoTSecuritySolutionAnalyticsModel, + IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IotSensorsModel, + IoTSeverityMetrics, + IotSitesModel, + IpAddress, + ListCustomAlertRule, + LocalUserNotAllowed, + LogAnalyticsIdentifier, + MacAddress, + MqttC2DMessagesNotInAllowedRange, + MqttC2DRejectedMessagesNotInAllowedRange, + MqttD2CMessagesNotInAllowedRange, + NetworkInterface, + OnPremiseIotSensor, + OnPremiseResourceDetails, + OnPremiseSqlResourceDetails, + Pricing, + ProcessNotAllowed, + Protocol1, + ProxyServerProperties, + QueryCheck, + QueuePurgesNotInAllowedRange, + RegulatoryComplianceAssessment, + RegulatoryComplianceControl, + RegulatoryComplianceStandard, + Remediation, + Resource, + ResourceDetails, + ResourceIdentifier, + Rule, + RuleResults, + RuleResultsProperties, + Scan, + ScanProperties, + ScanResult, + ScanResultProperties, + ScopeElement, + SecureScoreControlDefinitionItem, + SecureScoreControlDefinitionSource, + SecureScoreControlDetails, + SecureScoreItem, + SecurityAssessment, + SecurityAssessmentMetadata, + SecurityAssessmentMetadataPartnerData, + SecurityAssessmentMetadataProperties, + SecurityAssessmentPartnerData, + SecurityContact, + SecuritySubAssessment, + SecurityTask, + SecurityTaskParameters, + SensitivityLabel, + Sensor, + ServerVulnerabilityAssessment, + ServerVulnerabilityProperties, + ServicePrincipalProperties, + Setting, + Site, + Software, + SqlServerVulnerabilityProperties, + SubAssessmentStatus, + SuppressionAlertsScope, + ThresholdCustomAlertRule, + TimeWindowCustomAlertRule, + TwinUpdatesNotInAllowedRange, + UnauthorizedOperationsNotInAllowedRange, + VaRule, + VendorReference, + WorkspaceSetting +} from "../models/mappers"; diff --git a/sdk/security/arm-security/src/models/deviceSecurityGroupsMappers.ts b/sdk/security/arm-security/src/models/deviceSecurityGroupsMappers.ts index 8050255cd456..0246a6a6b306 100644 --- a/sdk/security/arm-security/src/models/deviceSecurityGroupsMappers.ts +++ b/sdk/security/arm-security/src/models/deviceSecurityGroupsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -13,9 +13,9 @@ export { AdditionalData, AdvancedThreatProtectionSetting, Alert, - AlertConfidenceReason, AlertEntity, AlertsSuppressionRule, + AlertSyncSettings, AllowlistCustomAlertRule, AmqpC2DMessagesNotInAllowedRange, AmqpC2DRejectedMessagesNotInAllowedRange, @@ -23,54 +23,92 @@ export { AscLocation, AssessmentLinks, AssessmentStatus, + AuthenticationDetailsProperties, AutoProvisioningSetting, + AwAssumeRoleAuthenticationDetailsProperties, + AwsCredsAuthenticationDetailsProperties, AzureResourceDetails, + AzureResourceIdentifier, AzureResourceLink, + Baseline, + BaselineAdjustedResult, BaseResource, + BenchmarkReference, CloudError, Compliance, ComplianceResult, ComplianceSegment, + ConnectionFromIpNotAllowed, ConnectionToIpNotAllowed, + ConnectorSetting, ContainerRegistryVulnerabilityProperties, CustomAlertRule, CVE, CVSS, DataExportSettings, DenylistCustomAlertRule, + Device, DeviceSecurityGroup, DeviceSecurityGroupList, DirectMethodInvokesNotInAllowedRange, EffectiveNetworkSecurityGroups, FailedLocalLoginsNotInAllowedRange, FileUploadsNotInAllowedRange, + Firmware, + GcpCredentialsDetailsProperties, HttpC2DMessagesNotInAllowedRange, HttpC2DRejectedMessagesNotInAllowedRange, HttpD2CMessagesNotInAllowedRange, + HybridComputeSettingsProperties, InformationProtectionKeyword, InformationProtectionPolicy, InformationType, + IngestionSetting, + IotAlertModel, + IotAlertType, + IotDefenderSettingsModel, + IotRecommendationModel, + IotRecommendationType, IoTSecurityAlertedDevice, IoTSecurityDeviceAlert, IoTSecurityDeviceRecommendation, IoTSecuritySolutionAnalyticsModel, IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IotSensorsModel, IoTSeverityMetrics, + IotSitesModel, + IpAddress, ListCustomAlertRule, LocalUserNotAllowed, + LogAnalyticsIdentifier, + MacAddress, MqttC2DMessagesNotInAllowedRange, MqttC2DRejectedMessagesNotInAllowedRange, MqttD2CMessagesNotInAllowedRange, + NetworkInterface, + OnPremiseIotSensor, OnPremiseResourceDetails, + OnPremiseSqlResourceDetails, Pricing, ProcessNotAllowed, + Protocol1, + ProxyServerProperties, + QueryCheck, QueuePurgesNotInAllowedRange, RegulatoryComplianceAssessment, RegulatoryComplianceControl, RegulatoryComplianceStandard, + Remediation, Resource, ResourceDetails, + ResourceIdentifier, Rule, + RuleResults, + RuleResultsProperties, + Scan, + ScanProperties, + ScanResult, + ScanResultProperties, ScopeElement, SecureScoreControlDefinitionItem, SecureScoreControlDefinitionSource, @@ -86,10 +124,13 @@ export { SecurityTask, SecurityTaskParameters, SensitivityLabel, + Sensor, ServerVulnerabilityAssessment, ServerVulnerabilityProperties, + ServicePrincipalProperties, Setting, - SettingResource, + Site, + Software, SqlServerVulnerabilityProperties, SubAssessmentStatus, SuppressionAlertsScope, @@ -97,6 +138,7 @@ export { TimeWindowCustomAlertRule, TwinUpdatesNotInAllowedRange, UnauthorizedOperationsNotInAllowedRange, + VaRule, VendorReference, WorkspaceSetting } from "../models/mappers"; diff --git a/sdk/security/arm-security/src/models/devicesForHubMappers.ts b/sdk/security/arm-security/src/models/devicesForHubMappers.ts new file mode 100644 index 000000000000..40d1e77831fa --- /dev/null +++ b/sdk/security/arm-security/src/models/devicesForHubMappers.ts @@ -0,0 +1,144 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + ActiveConnectionsNotInAllowedRange, + AdaptiveNetworkHardening, + AdditionalData, + AdvancedThreatProtectionSetting, + Alert, + AlertEntity, + AlertsSuppressionRule, + AlertSyncSettings, + AllowlistCustomAlertRule, + AmqpC2DMessagesNotInAllowedRange, + AmqpC2DRejectedMessagesNotInAllowedRange, + AmqpD2CMessagesNotInAllowedRange, + AscLocation, + AssessmentLinks, + AssessmentStatus, + AuthenticationDetailsProperties, + AutoProvisioningSetting, + AwAssumeRoleAuthenticationDetailsProperties, + AwsCredsAuthenticationDetailsProperties, + AzureResourceDetails, + AzureResourceIdentifier, + AzureResourceLink, + Baseline, + BaselineAdjustedResult, + BaseResource, + BenchmarkReference, + CloudError, + Compliance, + ComplianceResult, + ComplianceSegment, + ConnectionFromIpNotAllowed, + ConnectionToIpNotAllowed, + ConnectorSetting, + ContainerRegistryVulnerabilityProperties, + CustomAlertRule, + CVE, + CVSS, + DataExportSettings, + DenylistCustomAlertRule, + Device, + DeviceList, + DeviceSecurityGroup, + DirectMethodInvokesNotInAllowedRange, + EffectiveNetworkSecurityGroups, + FailedLocalLoginsNotInAllowedRange, + FileUploadsNotInAllowedRange, + Firmware, + GcpCredentialsDetailsProperties, + HttpC2DMessagesNotInAllowedRange, + HttpC2DRejectedMessagesNotInAllowedRange, + HttpD2CMessagesNotInAllowedRange, + HybridComputeSettingsProperties, + InformationProtectionKeyword, + InformationProtectionPolicy, + InformationType, + IngestionSetting, + IotAlertModel, + IotAlertType, + IotDefenderSettingsModel, + IotRecommendationModel, + IotRecommendationType, + IoTSecurityAlertedDevice, + IoTSecurityDeviceAlert, + IoTSecurityDeviceRecommendation, + IoTSecuritySolutionAnalyticsModel, + IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IotSensorsModel, + IoTSeverityMetrics, + IotSitesModel, + IpAddress, + ListCustomAlertRule, + LocalUserNotAllowed, + LogAnalyticsIdentifier, + MacAddress, + MqttC2DMessagesNotInAllowedRange, + MqttC2DRejectedMessagesNotInAllowedRange, + MqttD2CMessagesNotInAllowedRange, + NetworkInterface, + OnPremiseIotSensor, + OnPremiseResourceDetails, + OnPremiseSqlResourceDetails, + Pricing, + ProcessNotAllowed, + Protocol1, + ProxyServerProperties, + QueryCheck, + QueuePurgesNotInAllowedRange, + RegulatoryComplianceAssessment, + RegulatoryComplianceControl, + RegulatoryComplianceStandard, + Remediation, + Resource, + ResourceDetails, + ResourceIdentifier, + Rule, + RuleResults, + RuleResultsProperties, + Scan, + ScanProperties, + ScanResult, + ScanResultProperties, + ScopeElement, + SecureScoreControlDefinitionItem, + SecureScoreControlDefinitionSource, + SecureScoreControlDetails, + SecureScoreItem, + SecurityAssessment, + SecurityAssessmentMetadata, + SecurityAssessmentMetadataPartnerData, + SecurityAssessmentMetadataProperties, + SecurityAssessmentPartnerData, + SecurityContact, + SecuritySubAssessment, + SecurityTask, + SecurityTaskParameters, + SensitivityLabel, + Sensor, + ServerVulnerabilityAssessment, + ServerVulnerabilityProperties, + ServicePrincipalProperties, + Setting, + Site, + Software, + SqlServerVulnerabilityProperties, + SubAssessmentStatus, + SuppressionAlertsScope, + ThresholdCustomAlertRule, + TimeWindowCustomAlertRule, + TwinUpdatesNotInAllowedRange, + UnauthorizedOperationsNotInAllowedRange, + VaRule, + VendorReference, + WorkspaceSetting +} from "../models/mappers"; diff --git a/sdk/security/arm-security/src/models/devicesForSubscriptionMappers.ts b/sdk/security/arm-security/src/models/devicesForSubscriptionMappers.ts new file mode 100644 index 000000000000..40d1e77831fa --- /dev/null +++ b/sdk/security/arm-security/src/models/devicesForSubscriptionMappers.ts @@ -0,0 +1,144 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + ActiveConnectionsNotInAllowedRange, + AdaptiveNetworkHardening, + AdditionalData, + AdvancedThreatProtectionSetting, + Alert, + AlertEntity, + AlertsSuppressionRule, + AlertSyncSettings, + AllowlistCustomAlertRule, + AmqpC2DMessagesNotInAllowedRange, + AmqpC2DRejectedMessagesNotInAllowedRange, + AmqpD2CMessagesNotInAllowedRange, + AscLocation, + AssessmentLinks, + AssessmentStatus, + AuthenticationDetailsProperties, + AutoProvisioningSetting, + AwAssumeRoleAuthenticationDetailsProperties, + AwsCredsAuthenticationDetailsProperties, + AzureResourceDetails, + AzureResourceIdentifier, + AzureResourceLink, + Baseline, + BaselineAdjustedResult, + BaseResource, + BenchmarkReference, + CloudError, + Compliance, + ComplianceResult, + ComplianceSegment, + ConnectionFromIpNotAllowed, + ConnectionToIpNotAllowed, + ConnectorSetting, + ContainerRegistryVulnerabilityProperties, + CustomAlertRule, + CVE, + CVSS, + DataExportSettings, + DenylistCustomAlertRule, + Device, + DeviceList, + DeviceSecurityGroup, + DirectMethodInvokesNotInAllowedRange, + EffectiveNetworkSecurityGroups, + FailedLocalLoginsNotInAllowedRange, + FileUploadsNotInAllowedRange, + Firmware, + GcpCredentialsDetailsProperties, + HttpC2DMessagesNotInAllowedRange, + HttpC2DRejectedMessagesNotInAllowedRange, + HttpD2CMessagesNotInAllowedRange, + HybridComputeSettingsProperties, + InformationProtectionKeyword, + InformationProtectionPolicy, + InformationType, + IngestionSetting, + IotAlertModel, + IotAlertType, + IotDefenderSettingsModel, + IotRecommendationModel, + IotRecommendationType, + IoTSecurityAlertedDevice, + IoTSecurityDeviceAlert, + IoTSecurityDeviceRecommendation, + IoTSecuritySolutionAnalyticsModel, + IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IotSensorsModel, + IoTSeverityMetrics, + IotSitesModel, + IpAddress, + ListCustomAlertRule, + LocalUserNotAllowed, + LogAnalyticsIdentifier, + MacAddress, + MqttC2DMessagesNotInAllowedRange, + MqttC2DRejectedMessagesNotInAllowedRange, + MqttD2CMessagesNotInAllowedRange, + NetworkInterface, + OnPremiseIotSensor, + OnPremiseResourceDetails, + OnPremiseSqlResourceDetails, + Pricing, + ProcessNotAllowed, + Protocol1, + ProxyServerProperties, + QueryCheck, + QueuePurgesNotInAllowedRange, + RegulatoryComplianceAssessment, + RegulatoryComplianceControl, + RegulatoryComplianceStandard, + Remediation, + Resource, + ResourceDetails, + ResourceIdentifier, + Rule, + RuleResults, + RuleResultsProperties, + Scan, + ScanProperties, + ScanResult, + ScanResultProperties, + ScopeElement, + SecureScoreControlDefinitionItem, + SecureScoreControlDefinitionSource, + SecureScoreControlDetails, + SecureScoreItem, + SecurityAssessment, + SecurityAssessmentMetadata, + SecurityAssessmentMetadataPartnerData, + SecurityAssessmentMetadataProperties, + SecurityAssessmentPartnerData, + SecurityContact, + SecuritySubAssessment, + SecurityTask, + SecurityTaskParameters, + SensitivityLabel, + Sensor, + ServerVulnerabilityAssessment, + ServerVulnerabilityProperties, + ServicePrincipalProperties, + Setting, + Site, + Software, + SqlServerVulnerabilityProperties, + SubAssessmentStatus, + SuppressionAlertsScope, + ThresholdCustomAlertRule, + TimeWindowCustomAlertRule, + TwinUpdatesNotInAllowedRange, + UnauthorizedOperationsNotInAllowedRange, + VaRule, + VendorReference, + WorkspaceSetting +} from "../models/mappers"; diff --git a/sdk/security/arm-security/src/models/discoveredSecuritySolutionsMappers.ts b/sdk/security/arm-security/src/models/discoveredSecuritySolutionsMappers.ts index 7b504741880d..27e0cec44d25 100644 --- a/sdk/security/arm-security/src/models/discoveredSecuritySolutionsMappers.ts +++ b/sdk/security/arm-security/src/models/discoveredSecuritySolutionsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. diff --git a/sdk/security/arm-security/src/models/externalSecuritySolutionsMappers.ts b/sdk/security/arm-security/src/models/externalSecuritySolutionsMappers.ts index 55f2be16966d..f95eb684181d 100644 --- a/sdk/security/arm-security/src/models/externalSecuritySolutionsMappers.ts +++ b/sdk/security/arm-security/src/models/externalSecuritySolutionsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. diff --git a/sdk/security/arm-security/src/models/index.ts b/sdk/security/arm-security/src/models/index.ts index d24f392f288c..9588180edf0a 100644 --- a/sdk/security/arm-security/src/models/index.ts +++ b/sdk/security/arm-security/src/models/index.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -72,9 +72,8 @@ export interface TrackedResource { readonly type?: string; /** * Location where the resource is stored - * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly location?: string; + location?: string; /** * Kind of the resource */ @@ -92,12 +91,11 @@ export interface TrackedResource { /** * Describes an Azure resource with location */ -export interface Location { +export interface AzureTrackedResourceLocation { /** * Location where the resource is stored - * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly location?: string; + location?: string; } /** @@ -130,6 +128,22 @@ export interface Tags { tags?: { [propertyName: string]: string }; } +/** + * The resource management error additional info. + */ +export interface ErrorAdditionalInfo { + /** + * The additional info type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * The additional info. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly info?: any; +} + /** * Azure Security Center is provided in two pricing tiers: free and standard, with the standard * tier available with a trial period. The standard tier offers advanced security capabilities, @@ -161,243 +175,6 @@ export interface PricingList { value: Pricing[]; } -/** - * Changing set of properties depending on the entity type. - */ -export interface AlertEntity { - /** - * Type of entity - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly type?: string; - /** - * Describes unknown properties. The value of an unknown property can be of "any" type. - */ - [property: string]: any; -} - -/** - * Factors that increase our confidence that the alert is a true positive - */ -export interface AlertConfidenceReason { - /** - * Type of confidence factor - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly type?: string; - /** - * description of the confidence reason - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly reason?: string; -} - -/** - * Security alert - */ -export interface Alert extends Resource { - /** - * State of the alert (Active, Dismissed etc.) - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly state?: string; - /** - * The time the incident was reported to Microsoft.Security in UTC - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly reportedTimeUtc?: Date; - /** - * Name of the vendor that discovered the incident - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly vendorName?: string; - /** - * Name of the alert type - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly alertName?: string; - /** - * Display name of the alert type - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly alertDisplayName?: string; - /** - * The time the incident was detected by the vendor - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly detectedTimeUtc?: Date; - /** - * Description of the incident and what it means - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly description?: string; - /** - * Recommended steps to reradiate the incident - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly remediationSteps?: string; - /** - * The action that was taken as a response to the alert (Active, Blocked etc.) - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly actionTaken?: string; - /** - * Estimated severity of this alert. Possible values include: 'Informational', 'Low', 'Medium', - * 'High' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly reportedSeverity?: ReportedSeverity; - /** - * The entity that the incident happened on - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly compromisedEntity?: string; - /** - * Azure resource ID of the associated resource - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly associatedResource?: string; - extendedProperties?: { [propertyName: string]: any }; - /** - * The type of the alerted resource (Azure, Non-Azure) - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly systemSource?: string; - /** - * Whether this alert can be investigated with Azure Security Center - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly canBeInvestigated?: boolean; - /** - * Whether this alert is for incident type or not (otherwise - single alert) - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly isIncident?: boolean; - /** - * objects that are related to this alerts - */ - entities?: AlertEntity[]; - /** - * level of confidence we have on the alert - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly confidenceScore?: number; - /** - * reasons the alert got the confidenceScore value - */ - confidenceReasons?: AlertConfidenceReason[]; - /** - * Azure subscription ID of the resource that had the security alert or the subscription ID of - * the workspace that this resource reports to - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly subscriptionId?: string; - /** - * Instance ID of the alert. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly instanceId?: string; - /** - * Azure resource ID of the workspace that the alert was reported to. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly workspaceArmId?: string; - /** - * Alerts with the same CorrelationKey will be grouped together in Ibiza. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly correlationKey?: string; -} - -/** - * Contains the possible cases for SettingResource. - */ -export type SettingResourceUnion = SettingResource | SettingUnion; - -/** - * The kind of the security setting - */ -export interface SettingResource { - /** - * Polymorphic Discriminator - */ - kind: "SettingResource"; - /** - * Resource Id - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly id?: string; - /** - * Resource name - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly name?: string; - /** - * Resource type - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly type?: string; -} - -/** - * Contains the possible cases for Setting. - */ -export type SettingUnion = Setting | DataExportSettings; - -/** - * Represents a security setting in Azure Security Center. - */ -export interface Setting { - /** - * Polymorphic Discriminator - */ - kind: "Setting"; - /** - * Resource Id - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly id?: string; - /** - * Resource name - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly name?: string; - /** - * Resource type - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly type?: string; -} - -/** - * Represents a data export setting - */ -export interface DataExportSettings { - /** - * Polymorphic Discriminator - */ - kind: "DataExportSettings"; - /** - * Resource Id - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly id?: string; - /** - * Resource name - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly name?: string; - /** - * Resource type - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly type?: string; - /** - * Is the data export setting is enabled - */ - enabled: boolean; -} - /** * The Advanced Threat Protection resource. */ @@ -554,7 +331,7 @@ export interface ListCustomAlertRule { /** * Contains the possible cases for AllowlistCustomAlertRule. */ -export type AllowlistCustomAlertRuleUnion = AllowlistCustomAlertRule | ConnectionToIpNotAllowed | LocalUserNotAllowed | ProcessNotAllowed; +export type AllowlistCustomAlertRuleUnion = AllowlistCustomAlertRule | ConnectionToIpNotAllowed | ConnectionFromIpNotAllowed | LocalUserNotAllowed | ProcessNotAllowed; /** * A custom alert rule that checks if a value (depends on the custom alert type) is allowed. @@ -678,6 +455,40 @@ export interface ConnectionToIpNotAllowed { allowlistValues: string[]; } +/** + * Inbound connection from an ip that isn't allowed. Allow list consists of ipv4 or ipv6 range in + * CIDR notation. + */ +export interface ConnectionFromIpNotAllowed { + /** + * Polymorphic Discriminator + */ + ruleType: "ConnectionFromIpNotAllowed"; + /** + * The display name of the custom alert. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly displayName?: string; + /** + * The description of the custom alert. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly description?: string; + /** + * Status of the custom alert. + */ + isEnabled: boolean; + /** + * The value type of the items in the list. Possible values include: 'IpCidr', 'String' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly valueType?: ValueType; + /** + * The values to allow. The format of the values depends on the rule type. + */ + allowlistValues: string[]; +} + /** * Login by a local user that isn't allowed. Allow list consists of login names to allow. */ @@ -1371,28 +1182,78 @@ export interface RecommendationConfigurationProperties { } /** - * IoT Security solution configuration and resource information. + * Properties of the additional workspaces. */ -export interface IoTSecuritySolutionModel { +export interface AdditionalWorkspacesProperties { /** - * Resource Id - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Workspace resource id */ - readonly id?: string; + workspace?: string; /** - * Resource name - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Workspace type. Possible values include: 'Sentinel'. Default value: 'Sentinel'. */ - readonly name?: string; + type?: AdditionalWorkspaceType; /** - * Resource type - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * List of data types sent to workspace */ - readonly type?: string; + dataTypes?: AdditionalWorkspaceDataType[]; +} + +/** + * Metadata pertaining to creation and last modification of the resource. + */ +export interface SystemData { /** - * Resource tags + * The identity that created the resource. */ - tags?: { [propertyName: string]: string }; + createdBy?: string; + /** + * The type of identity that created the resource. Possible values include: 'User', + * 'Application', 'ManagedIdentity', 'Key' + */ + 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. Possible values include: 'User', + * 'Application', 'ManagedIdentity', 'Key' + */ + lastModifiedByType?: CreatedByType; + /** + * The timestamp of resource last modification (UTC) + */ + lastModifiedAt?: Date; +} + +/** + * IoT Security solution configuration and resource information. + */ +export interface IoTSecuritySolutionModel { + /** + * Resource Id + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * Resource name + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * Resource type + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * Resource tags + */ + tags?: { [propertyName: string]: string }; /** * The resource location. */ @@ -1400,7 +1261,7 @@ export interface IoTSecuritySolutionModel { /** * Workspace resource ID */ - workspace: string; + workspace?: string; /** * Resource display name. */ @@ -1434,6 +1295,15 @@ export interface IoTSecuritySolutionModel { * value: 'Disabled'. */ unmaskedIpLoggingStatus?: UnmaskedIpLoggingStatus; + /** + * List of additional workspaces + */ + additionalWorkspaces?: AdditionalWorkspacesProperties[]; + /** + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly systemData?: SystemData; } /** @@ -2165,25 +2035,6 @@ export interface RegulatoryComplianceAssessment extends Resource { readonly unsupportedResources?: number; } -/** - * Describes the server vulnerability assessment details on a resource - */ -export interface ServerVulnerabilityAssessment extends Resource { - /** - * The provisioningState of the vulnerability assessment capability on the VM. Possible values - * include: 'Succeeded', 'Failed', 'Canceled', 'Provisioning', 'Deprovisioning' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly provisioningState?: ProvisioningState; -} - -/** - * List of server vulnerability assessments - */ -export interface ServerVulnerabilityAssessmentsList { - value?: ServerVulnerabilityAssessment[]; -} - /** * Status of the sub-assessment */ @@ -2214,7 +2065,7 @@ export interface SubAssessmentStatus { /** * Contains the possible cases for ResourceDetails. */ -export type ResourceDetailsUnion = ResourceDetails | OnPremiseResourceDetails | AzureResourceDetails; +export type ResourceDetailsUnion = ResourceDetails | OnPremiseResourceDetailsUnion | AzureResourceDetails; /** * Details of the resource that was assessed @@ -2442,6 +2293,11 @@ export interface ServerVulnerabilityProperties { readonly vendorReferences?: VendorReference[]; } +/** + * Contains the possible cases for OnPremiseResourceDetails. + */ +export type OnPremiseResourceDetailsUnion = OnPremiseResourceDetails | OnPremiseSqlResourceDetails; + /** * Details of the On Premise resource that was assessed */ @@ -2468,6 +2324,40 @@ export interface OnPremiseResourceDetails { machineName: string; } +/** + * Details of the On Premise Sql resource that was assessed + */ +export interface OnPremiseSqlResourceDetails { + /** + * Polymorphic Discriminator + */ + source: "OnPremiseSql"; + /** + * Azure resource Id of the workspace the machine is attached to + */ + workspaceId: string; + /** + * The unique Id of the machine + */ + vmuuid: string; + /** + * The oms agent Id installed on the machine + */ + sourceComputerId: string; + /** + * The name of the machine + */ + machineName: string; + /** + * The Sql server name installed on the machine + */ + serverName: string; + /** + * The Sql database name installed on the machine + */ + databaseName: string; +} + /** * Details of the Azure resource that was assessed */ @@ -2540,7 +2430,9 @@ export interface AutomationRuleSet { */ export interface AutomationSource { /** - * A valid event source type. Possible values include: 'Assessments', 'Alerts' + * A valid event source type. Possible values include: 'Assessments', 'SubAssessments', 'Alerts', + * 'SecureScores', 'SecureScoresSnapshot', 'SecureScoreControls', 'SecureScoreControlsSnapshot', + * 'RegulatoryComplianceAssessment', 'RegulatoryComplianceAssessmentSnapshot' */ eventSource?: EventSource; /** @@ -2731,6 +2623,25 @@ export interface AlertsSuppressionRule extends Resource { suppressionAlertsScope?: SuppressionAlertsScope; } +/** + * Describes the server vulnerability assessment details on a resource + */ +export interface ServerVulnerabilityAssessment extends Resource { + /** + * The provisioningState of the vulnerability assessment capability on the VM. Possible values + * include: 'Succeeded', 'Failed', 'Canceled', 'Provisioning', 'Deprovisioning' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: ProvisioningState1; +} + +/** + * List of server vulnerability assessments + */ +export interface ServerVulnerabilityAssessmentsList { + value?: ServerVulnerabilityAssessment[]; +} + /** * Describes the partner that created the assessment */ @@ -2770,7 +2681,7 @@ export interface SecurityAssessmentMetadataProperties { * Human readable description of what you should do to mitigate this security issue */ remediationDescription?: string; - category?: Category[]; + categories?: Categories[]; /** * The severity level of the assessment. Possible values include: 'Low', 'Medium', 'High' */ @@ -2819,7 +2730,7 @@ export interface SecurityAssessmentMetadata extends Resource { * Human readable description of what you should do to mitigate this security issue */ remediationDescription?: string; - category?: Category[]; + categories?: Categories[]; /** * The severity level of the assessment. Possible values include: 'Low', 'Medium', 'High' */ @@ -2935,9 +2846,9 @@ export interface ProtectionMode { } /** - * Represents a summary of the alerts of the VM/server group + * Represents a summary of the alerts of the machine group */ -export interface AppWhitelistingIssueSummary { +export interface AdaptiveApplicationControlIssueSummary { /** * Possible values include: 'ViolationsAudited', 'ViolationsBlocked', * 'MsiAndScriptViolationsAudited', 'MsiAndScriptViolationsBlocked', @@ -2945,13 +2856,13 @@ export interface AppWhitelistingIssueSummary { */ issue?: Issue; /** - * The number of machines in the VM/server group that have this alert + * The number of machines in the group that have this alert */ numberOfVms?: number; } /** - * Represents a machine that is part of a VM/server group + * Represents a machine that is part of a machine group */ export interface VmRecommendation { /** @@ -3011,7 +2922,7 @@ export interface UserRecommendation { */ export interface PathRecommendation { /** - * The full path to whitelist + * The full path of the file, or an identifier of the application */ path?: string; /** @@ -3025,7 +2936,7 @@ export interface PathRecommendation { type?: Type; publisherInfo?: PublisherInfo; /** - * Whether the path is commonly run on the machine + * Whether the application is commonly run on the machine */ common?: boolean; userSids?: string[]; @@ -3041,9 +2952,9 @@ export interface PathRecommendation { } /** - * An interface representing AppWhitelistingGroup. + * An interface representing AdaptiveApplicationControlGroup. */ -export interface AppWhitelistingGroup { +export interface AdaptiveApplicationControlGroup { /** * Resource Id * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -3082,7 +2993,7 @@ export interface AppWhitelistingGroup { /** * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly issues?: AppWhitelistingIssueSummary[]; + readonly issues?: AdaptiveApplicationControlIssueSummary[]; /** * Possible values include: 'Azure_AppLocker', 'Azure_AuditD', 'NonAzure_AppLocker', * 'NonAzure_AuditD', 'None' @@ -3094,11 +3005,22 @@ export interface AppWhitelistingGroup { } /** - * Represents a list of VM/server groups and set of rules that are Recommended by Azure Security + * Represents a list of machine groups and set of rules that are recommended by Azure Security * Center to be allowed */ -export interface AppWhitelistingGroups { - value?: AppWhitelistingGroup[]; +export interface AdaptiveApplicationControlGroups { + value?: AdaptiveApplicationControlGroup[]; +} + +/** + * Describes an Azure resource with location + */ +export interface Location { + /** + * Location where the resource is stored + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly location?: string; } /** @@ -3595,6 +3517,68 @@ export interface DiscoveredSecuritySolution { sku: string; } +/** + * An interface representing SecuritySolutionsReferenceData. + */ +export interface SecuritySolutionsReferenceData { + /** + * Resource Id + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * Resource name + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * Resource type + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * Location where the resource is stored + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly location?: string; + /** + * The security family of the security solution. Possible values include: 'Waf', 'Ngfw', + * 'SaasWaf', 'Va' + */ + securityFamily: SecurityFamily; + /** + * The security solutions' vendor name + */ + alertVendorName: string; + /** + * The security solutions' package info url + */ + packageInfoUrl: string; + /** + * The security solutions' product name + */ + productName: string; + /** + * The security solutions' publisher + */ + publisher: string; + /** + * The security solutions' publisher display name + */ + publisherDisplayName: string; + /** + * The security solutions' template + */ + template: string; +} + +/** + * An interface representing SecuritySolutionsReferenceDataList. + */ +export interface SecuritySolutionsReferenceDataList { + value?: SecuritySolutionsReferenceData[]; +} + /** * Contains the possible cases for ExternalSecuritySolution. */ @@ -3807,20 +3791,31 @@ export interface AadConnectivityState1 { */ export interface SecureScoreItem extends Resource { /** - * User friendly display name of the secure score item + * The initiative’s name * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly displayName?: string; /** - * Maximum score applicable + * Maximum score available * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly max?: number; /** - * Actual score + * Current score * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly current?: number; + /** + * Ratio of the current score divided by the maximum. Rounded to 4 digits after the decimal point + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly percentage?: number; + /** + * The relative weight for each subscription. Used when calculating an aggregated secure score + * for multiple subscriptions. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly weight?: number; } /** @@ -3838,16 +3833,20 @@ export interface SecureScoreControlScore { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly current?: number; + /** + * Ratio of the current score divided by the maximum. Rounded to 4 digits after the decimal point + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly percentage?: number; } /** - * representing the source of the control + * The type of the security control (For example, BuiltIn) */ export interface SecureScoreControlDefinitionSource { /** - * BuiltIn if the control is built-in from Azure Security Center managed assessments, Custom - * (Future) if the assessment based on custom Azure Policy definition, CustomerManaged (future) - * for customers who build their own controls. Possible values include: 'BuiltIn', 'Custom' + * The type of security control (for example, BuiltIn). Possible values include: 'BuiltIn', + * 'Custom' */ sourceType?: ControlType; } @@ -3864,7 +3863,7 @@ export interface AzureResourceLink { } /** - * Secure Score Control's Definition information + * Information about the security control. */ export interface SecureScoreControlDefinitionItem extends Resource { /** @@ -3888,14 +3887,14 @@ export interface SecureScoreControlDefinitionItem extends Resource { */ readonly source?: SecureScoreControlDefinitionSource; /** - * array of assessments metadata IDs that are included in this control + * Array of assessments metadata IDs that are included in this security control * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly assessmentDefinitions?: AzureResourceLink[]; } /** - * Secure score control (calculated) object + * Details of the security control, its score, and the health status of the relevant resources. */ export interface SecureScoreControlDetails extends Resource { /** @@ -3904,15 +3903,20 @@ export interface SecureScoreControlDetails extends Resource { */ readonly displayName?: string; /** - * Maximum score applicable + * Maximum score available * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly max?: number; /** - * Actual score + * Current score * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly current?: number; + /** + * Ratio of the current score divided by the maximum. Rounded to 4 digits after the decimal point + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly percentage?: number; /** * Number of healthy resources in the control * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -3928,1201 +3932,4818 @@ export interface SecureScoreControlDetails extends Resource { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly notApplicableResourceCount?: number; + /** + * The relative weight for this specific control in each of your subscriptions. Used when + * calculating an aggregated score for this control across all of your subscriptions. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly weight?: number; definition?: SecureScoreControlDefinitionItem; } /** - * Optional Parameters. + * An interface representing SecuritySolution. */ -export interface AlertsListOptionalParams extends msRest.RequestOptionsBase { +export interface SecuritySolution { /** - * OData filter. Optional. + * Resource Id + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - filter?: string; + readonly id?: string; /** - * OData select. Optional. + * Resource name + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - select?: string; + readonly name?: string; /** - * OData expand. Optional. + * Resource type + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - expand?: string; + readonly type?: string; /** - * The name of an existing auto dismiss rule. Use it to simulate the rule on existing alerts and - * get the alerts that would have been dismissed if the rule was enabled when the alert was - * created + * Location where the resource is stored + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - autoDismissRuleName?: string; -} - -/** - * Optional Parameters. - */ -export interface AlertsListByResourceGroupOptionalParams extends msRest.RequestOptionsBase { + readonly location?: string; /** - * OData filter. Optional. + * The security family of the security solution. Possible values include: 'Waf', 'Ngfw', + * 'SaasWaf', 'Va' */ - filter?: string; + securityFamily: SecurityFamily; /** - * OData select. Optional. + * The security family provisioning State. Possible values include: 'Succeeded', 'Failed', + * 'Updating' */ - select?: string; + provisioningState: ProvisioningState; /** - * OData expand. Optional. + * The security solutions' template */ - expand?: string; + template: string; /** - * The name of an existing auto dismiss rule. Use it to simulate the rule on existing alerts and - * get the alerts that would have been dismissed if the rule was enabled when the alert was - * created + * The security solutions' status */ - autoDismissRuleName?: string; + protectionStatus: string; } /** - * Optional Parameters. + * For a non-Azure machine that is not connected directly to the internet, specify a proxy server + * that the non-Azure machine can use. */ -export interface AlertsListSubscriptionLevelAlertsByRegionOptionalParams extends msRest.RequestOptionsBase { +export interface ProxyServerProperties { /** - * OData filter. Optional. + * Proxy server IP */ - filter?: string; + ip?: string; /** - * OData select. Optional. + * Proxy server port */ - select?: string; + port?: string; +} + +/** + * Details of the service principal. + */ +export interface ServicePrincipalProperties { /** - * OData expand. Optional. + * Application ID of service principal. */ - expand?: string; + applicationId?: string; /** - * The name of an existing auto dismiss rule. Use it to simulate the rule on existing alerts and - * get the alerts that would have been dismissed if the rule was enabled when the alert was - * created + * A secret string that the application uses to prove its identity, also can be referred to as + * application password (write only). */ - autoDismissRuleName?: string; + secret?: string; } /** - * Optional Parameters. + * Settings for hybrid compute management */ -export interface AlertsListResourceGroupLevelAlertsByRegionOptionalParams extends msRest.RequestOptionsBase { +export interface HybridComputeSettingsProperties { /** - * OData filter. Optional. + * State of the service principal and its secret. Possible values include: 'Valid', 'Invalid', + * 'Expired' + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - filter?: string; + readonly hybridComputeProvisioningState?: HybridComputeProvisioningState; /** - * OData select. Optional. + * Whether or not to automatically install Azure Arc (hybrid compute) agents on machines. + * Possible values include: 'On', 'Off' */ - select?: string; + autoProvision: AutoProvision; /** - * OData expand. Optional. + * The name of the resource group where Arc (Hybrid Compute) connectors are connected. */ - expand?: string; + resourceGroupName?: string; /** - * The name of an existing auto dismiss rule. Use it to simulate the rule on existing alerts and - * get the alerts that would have been dismissed if the rule was enabled when the alert was - * created + * The location where the metadata of machines will be stored */ - autoDismissRuleName?: string; -} - -/** - * Optional Parameters. - */ -export interface IotSecuritySolutionListBySubscriptionOptionalParams extends msRest.RequestOptionsBase { + region?: string; /** - * Filter the IoT Security solution with OData syntax. Supports filtering by iotHubs. + * For a non-Azure machine that is not connected directly to the internet, specify a proxy server + * that the non-Azure machine can use. */ - filter?: string; + proxyServer?: ProxyServerProperties; + /** + * An object to access resources that are secured by an Azure AD tenant. + */ + servicePrincipal?: ServicePrincipalProperties; } /** - * Optional Parameters. + * Contains the possible cases for AuthenticationDetailsProperties. */ -export interface IotSecuritySolutionListByResourceGroupOptionalParams extends msRest.RequestOptionsBase { - /** - * Filter the IoT Security solution with OData syntax. Supports filtering by iotHubs. - */ - filter?: string; -} +export type AuthenticationDetailsPropertiesUnion = AuthenticationDetailsProperties | AwsCredsAuthenticationDetailsProperties | AwAssumeRoleAuthenticationDetailsProperties | GcpCredentialsDetailsProperties; /** - * Optional Parameters. + * Settings for cloud authentication management */ -export interface IotSecuritySolutionsAnalyticsAggregatedAlertListOptionalParams extends msRest.RequestOptionsBase { +export interface AuthenticationDetailsProperties { /** - * Number of results to retrieve. + * Polymorphic Discriminator */ - top?: number; + authenticationType: "AuthenticationDetailsProperties"; + /** + * State of the multi-cloud connector. Possible values include: 'Valid', 'Invalid', 'Expired', + * 'IncorrectPolicy' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly authenticationProvisioningState?: AuthenticationProvisioningState; + /** + * The permissions detected in the cloud account. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly grantedPermissions?: PermissionProperty[]; } /** - * Optional Parameters. + * The connector setting */ -export interface IotSecuritySolutionsAnalyticsRecommendationListOptionalParams extends msRest.RequestOptionsBase { +export interface ConnectorSetting extends Resource { /** - * Number of results to retrieve. + * Settings for hybrid compute management. These settings are relevant only for Arc autoProvision + * (Hybrid Compute). */ - top?: number; + hybridComputeSettings?: HybridComputeSettingsProperties; + /** + * Settings for authentication management, these settings are relevant only for the cloud + * connector. + */ + authenticationDetails?: AuthenticationDetailsPropertiesUnion; } /** - * Optional Parameters. + * AWS cloud account connector based credentials, the credentials is composed of access key ID and + * secret key, for more details, refer to Creating an IAM + * User in Your AWS Account (write only) */ -export interface TasksListOptionalParams extends msRest.RequestOptionsBase { +export interface AwsCredsAuthenticationDetailsProperties { /** - * OData filter. Optional. + * Polymorphic Discriminator */ - filter?: string; -} + authenticationType: "awsCreds"; + /** + * State of the multi-cloud connector. Possible values include: 'Valid', 'Invalid', 'Expired', + * 'IncorrectPolicy' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly authenticationProvisioningState?: AuthenticationProvisioningState; + /** + * The permissions detected in the cloud account. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly grantedPermissions?: PermissionProperty[]; + /** + * The ID of the cloud account + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly accountId?: string; + /** + * Public key element of the AWS credential object (write only) + */ + awsAccessKeyId: string; + /** + * Secret key element of the AWS credential object (write only) + */ + awsSecretAccessKey: string; +} /** - * Optional Parameters. + * AWS cloud account connector based assume role, the role enables delegating access to your AWS + * resources. The role is composed of role Amazon Resource Name (ARN) and external ID. For more + * details, refer to Creating a + * Role to Delegate Permissions to an IAM User (write only) */ -export interface TasksListByHomeRegionOptionalParams extends msRest.RequestOptionsBase { +export interface AwAssumeRoleAuthenticationDetailsProperties { /** - * OData filter. Optional. + * Polymorphic Discriminator */ - filter?: string; + authenticationType: "awsAssumeRole"; + /** + * State of the multi-cloud connector. Possible values include: 'Valid', 'Invalid', 'Expired', + * 'IncorrectPolicy' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly authenticationProvisioningState?: AuthenticationProvisioningState; + /** + * The permissions detected in the cloud account. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly grantedPermissions?: PermissionProperty[]; + /** + * The ID of the cloud account + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly accountId?: string; + /** + * Assumed role ID is an identifier that you can use to create temporary security credentials. + */ + awsAssumeRoleArn: string; + /** + * A unique identifier that is required when you assume a role in another account. + */ + awsExternalId: string; } /** - * Optional Parameters. + * GCP cloud account connector based service to service credentials, the credentials are composed + * of the organization ID and a JSON API key (write only) */ -export interface TasksListByResourceGroupOptionalParams extends msRest.RequestOptionsBase { +export interface GcpCredentialsDetailsProperties { /** - * OData filter. Optional. + * Polymorphic Discriminator */ - filter?: string; + authenticationType: "gcpCredentials"; + /** + * State of the multi-cloud connector. Possible values include: 'Valid', 'Invalid', 'Expired', + * 'IncorrectPolicy' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly authenticationProvisioningState?: AuthenticationProvisioningState; + /** + * The permissions detected in the cloud account. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly grantedPermissions?: PermissionProperty[]; + /** + * The organization ID of the GCP cloud account + */ + organizationId: string; + /** + * Type field of the API key (write only) + */ + type: string; + /** + * Project ID field of the API key (write only) + */ + projectId: string; + /** + * Private key ID field of the API key (write only) + */ + privateKeyId: string; + /** + * Private key field of the API key (write only) + */ + privateKey: string; + /** + * Client email field of the API key (write only) + */ + clientEmail: string; + /** + * Client ID field of the API key (write only) + */ + clientId: string; + /** + * Auth URI field of the API key (write only) + */ + authUri: string; + /** + * Token URI field of the API key (write only) + */ + tokenUri: string; + /** + * Auth provider x509 certificate URL field of the API key (write only) + */ + authProviderX509CertUrl: string; + /** + * Client x509 certificate URL field of the API key (write only) + */ + clientX509CertUrl: string; } /** - * Optional Parameters. + * A vulnerability assessment scan record properties. */ -export interface RegulatoryComplianceStandardsListOptionalParams extends msRest.RequestOptionsBase { +export interface ScanProperties { /** - * OData filter. Optional. + * Possible values include: 'OnDemand', 'Recurring' */ - filter?: string; + triggerType?: ScanTriggerType; + /** + * Possible values include: 'Failed', 'FailedToRun', 'InProgress', 'Passed' + */ + state?: ScanState; + /** + * The server name. + */ + server?: string; + /** + * The database name. + */ + database?: string; + /** + * The SQL version. + */ + sqlVersion?: string; + /** + * The scan start time (UTC). + */ + startTime?: Date; + /** + * Scan results are valid until end time (UTC). + */ + endTime?: Date; + /** + * The number of failed rules with high severity. + */ + highSeverityFailedRulesCount?: number; + /** + * The number of failed rules with medium severity. + */ + mediumSeverityFailedRulesCount?: number; + /** + * The number of failed rules with low severity. + */ + lowSeverityFailedRulesCount?: number; + /** + * The number of total passed rules. + */ + totalPassedRulesCount?: number; + /** + * The number of total failed rules. + */ + totalFailedRulesCount?: number; + /** + * The number of total rules assessed. + */ + totalRulesCount?: number; + /** + * Baseline created for this database, and has one or more rules. + */ + isBaselineApplied?: boolean; } /** - * Optional Parameters. + * A vulnerability assessment scan record. */ -export interface RegulatoryComplianceControlsListOptionalParams extends msRest.RequestOptionsBase { - /** - * OData filter. Optional. - */ - filter?: string; +export interface Scan extends Resource { + properties?: ScanProperties; } /** - * Optional Parameters. + * A list of vulnerability assessment scan records. */ -export interface RegulatoryComplianceAssessmentsListOptionalParams extends msRest.RequestOptionsBase { +export interface Scans { /** - * OData filter. Optional. + * List of vulnerability assessment scan records. */ - filter?: string; + value?: Scan[]; } /** - * Optional Parameters. + * Remediation details. */ -export interface AlertsSuppressionRulesListOptionalParams extends msRest.RequestOptionsBase { +export interface Remediation { /** - * Type of the alert to get rules for + * Remediation description. */ - alertType?: string; + description?: string; + /** + * Remediation script. + */ + scripts?: string[]; + /** + * Is remediation automated. + */ + automated?: boolean; + /** + * Optional link to remediate in Azure Portal. + */ + portalLink?: string; } /** - * Optional Parameters. + * Baseline details. */ -export interface AssessmentsGetOptionalParams extends msRest.RequestOptionsBase { +export interface Baseline { /** - * OData expand. Optional. Possible values include: 'links', 'metadata' + * Expected results. */ - expand?: ExpandEnum; + expectedResults?: string[][]; + /** + * Baseline update time (UTC). + */ + updatedTime?: Date; } /** - * Optional Parameters. + * The rule result adjusted with baseline. */ -export interface AdaptiveApplicationControlsListOptionalParams extends msRest.RequestOptionsBase { +export interface BaselineAdjustedResult { + baseline?: Baseline; /** - * Include the policy rules + * Possible values include: 'NonFinding', 'Finding', 'InternalError' */ - includePathRecommendations?: boolean; + status?: RuleStatus; /** - * Return output in a summarized form + * Results the are not in baseline. */ - summary?: boolean; + resultsNotInBaseline?: string[][]; + /** + * Results the are in baseline. + */ + resultsOnlyInBaseline?: string[][]; } /** - * Optional Parameters. + * The rule query details. */ -export interface SecureScoreControlsListBySecureScoreOptionalParams extends msRest.RequestOptionsBase { +export interface QueryCheck { /** - * OData expand. Optional. Possible values include: 'definition' + * The rule query. */ - expand?: ExpandControlsEnum; + query?: string; + /** + * Expected result. + */ + expectedResult?: string[][]; + /** + * Column names of expected result. + */ + columnNames?: string[]; } /** - * Optional Parameters. + * The benchmark references. */ -export interface SecureScoreControlsListOptionalParams extends msRest.RequestOptionsBase { +export interface BenchmarkReference { /** - * OData expand. Optional. Possible values include: 'definition' + * The benchmark name. */ - expand?: ExpandControlsEnum; + benchmark?: string; + /** + * The benchmark reference. + */ + reference?: string; } /** - * An interface representing SecurityCenterOptions. + * vulnerability assessment rule metadata details. */ -export interface SecurityCenterOptions extends AzureServiceClientOptions { - baseUri?: string; +export interface VaRule { + /** + * The rule Id. + */ + ruleId?: string; + /** + * Possible values include: 'High', 'Medium', 'Low', 'Informational', 'Obsolete' + */ + severity?: RuleSeverity; + /** + * The rule category. + */ + category?: string; + /** + * Possible values include: 'Binary', 'BaselineExpected', 'PositiveList', 'NegativeList' + */ + ruleType?: RuleType; + /** + * The rule title. + */ + title?: string; + /** + * The rule description. + */ + description?: string; + /** + * The rule rationale. + */ + rationale?: string; + queryCheck?: QueryCheck; + /** + * The benchmark references. + */ + benchmarkReferences?: BenchmarkReference[]; } /** - * @interface - * List of compliance results response - * @extends Array + * A vulnerability assessment scan result properties for a single rule. */ -export interface ComplianceResultList extends Array { +export interface ScanResultProperties { /** - * The URI to fetch the next page. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The rule Id. */ - readonly nextLink?: string; + ruleId?: string; + /** + * Possible values include: 'NonFinding', 'Finding', 'InternalError' + */ + status?: RuleStatus; + /** + * Indicated whether the results specified here are trimmed. + */ + isTrimmed?: boolean; + /** + * The results of the query that was run. + */ + queryResults?: string[][]; + remediation?: Remediation; + baselineAdjustedResult?: BaselineAdjustedResult; + ruleMetadata?: VaRule; } /** - * @interface - * List of security alerts - * @extends Array + * A vulnerability assessment scan result for a single rule. */ -export interface AlertList extends Array { - /** - * The URI to fetch the next page. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly nextLink?: string; +export interface ScanResult extends Resource { + properties?: ScanResultProperties; } /** - * @interface - * Subscription settings list. - * @extends Array + * A list of vulnerability assessment scan results. */ -export interface SettingsList extends Array { +export interface ScanResults { /** - * The URI to fetch the next page. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * List of vulnerability assessment scan results. */ - readonly nextLink?: string; + value?: ScanResult[]; } /** - * @interface - * List of device security groups - * @extends Array + * Rule results input. */ -export interface DeviceSecurityGroupList extends Array { +export interface RuleResultsInput { /** - * The URI to fetch the next page. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Take results from latest scan. */ - readonly nextLink?: string; + latestScan?: boolean; + /** + * Expected results to be inserted into the baseline. + * Leave this field empty it LatestScan == true. + */ + results?: string[][]; } /** - * @interface - * List of IoT Security solutions. - * @extends Array + * Rule results properties. */ -export interface IoTSecuritySolutionsList extends Array { +export interface RuleResultsProperties { /** - * The URI to fetch the next page. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Expected results in the baseline. */ - readonly nextLink?: string; + results?: string[][]; } /** - * @interface - * List of IoT Security solution aggregated alert data. - * @extends Array + * Rule results. */ -export interface IoTSecurityAggregatedAlertList extends Array { - /** - * When there is too much alert data for one page, use this URI to fetch the next page. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly nextLink?: string; +export interface RuleResults extends Resource { + properties?: RuleResultsProperties; } /** - * @interface - * List of IoT Security solution aggregated recommendations. - * @extends Array + * A list of rules results. */ -export interface IoTSecurityAggregatedRecommendationList extends Array { +export interface RulesResults { /** - * When there is too much alert data for one page, use this URI to fetch the next page. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * List of rule results. */ - readonly nextLink?: string; + value?: RuleResults[]; } /** - * @interface - * List of locations where ASC saves your data - * @extends Array + * Rules results input. */ -export interface AscLocationList extends Array { +export interface RulesResultsInput { /** - * The URI to fetch the next page. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Take results from latest scan. */ - readonly nextLink?: string; + latestScan?: boolean; + /** + * Expected results to be inserted into the baseline. + * Leave this field empty it LatestScan == true. + */ + results?: { [propertyName: string]: string[][] }; } /** - * @interface - * List of possible operations for Microsoft.Security resource provider - * @extends Array + * IoT Defender settings */ -export interface OperationList extends Array { +export interface IotDefenderSettingsModel extends Resource { /** - * The URI to fetch the next page. + * Size of the device quota (as a opposed to a Pay as You Go billing model). Value is required to + * be in multiples of 1000. + */ + deviceQuota: number; + /** + * Sentinel Workspace Resource Ids + */ + sentinelWorkspaceResourceIds: string[]; + /** + * The kind of onboarding for the subscription. Possible values include: 'Default', + * 'MigratedToAzure', 'Evaluation', 'Purchased' + */ + onboardingKind: OnboardingKind; + /** + * End time of the evaluation period, if such exist * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly nextLink?: string; + readonly evaluationEndTime?: Date; } /** - * @interface - * List of security task recommendations - * @extends Array + * List of IoT Defender settings */ -export interface SecurityTaskList extends Array { +export interface IotDefenderSettingsList { /** - * The URI to fetch the next page. + * List data * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly nextLink?: string; + readonly value?: IotDefenderSettingsModel[]; } /** - * @interface - * List of all the auto provisioning settings response - * @extends Array + * Information on a specific package download */ -export interface AutoProvisioningSettingList extends Array { +export interface PackageDownloadInfo { /** - * The URI to fetch the next page. + * Version number * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly nextLink?: string; -} - -/** - * @interface - * List of Compliance objects response - * @extends Array - */ -export interface ComplianceList extends Array { + readonly version?: string; /** - * The URI to fetch the next page. + * Download link + */ + link?: string; + /** + * Kind of the version. Possible values include: 'Latest', 'Previous', 'Preview' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly nextLink?: string; + readonly versionKind?: VersionKind; } /** - * @interface - * Information protection policies response. - * @extends Array + * Information on a specific package upgrade download */ -export interface InformationProtectionPolicyList extends Array { +export interface UpgradePackageDownloadInfo extends PackageDownloadInfo { /** - * The URI to fetch the next page. + * Minimum base version for upgrade * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly nextLink?: string; + readonly fromVersion?: string; } /** - * @interface - * List of security contacts response - * @extends Array + * Contains all OVF (virtual machine) full versions for the sensor */ -export interface SecurityContactList extends Array { +export interface PackageDownloadsSensorFullOvf { /** - * The URI to fetch the next page. + * Enterprise package type * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly nextLink?: string; -} - -/** - * @interface - * List of workspace settings response - * @extends Array - */ -export interface WorkspaceSettingList extends Array { + readonly enterprise?: PackageDownloadInfo[]; /** - * The URI to fetch the next page. + * Medium package type * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly nextLink?: string; + readonly medium?: PackageDownloadInfo[]; + /** + * Line package type + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly line?: PackageDownloadInfo[]; } /** - * @interface - * List of regulatory compliance standards response - * @extends Array + * Contains full package downloads */ -export interface RegulatoryComplianceStandardList extends Array { +export interface PackageDownloadsSensorFull { /** - * The URI to fetch the next page. + * Contains all ISO full versions for the sensor * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly nextLink?: string; + readonly iso?: PackageDownloadInfo[]; + /** + * Contains all OVF (virtual machine) full versions for the sensor + */ + ovf?: PackageDownloadsSensorFullOvf; } /** - * @interface - * List of regulatory compliance controls response - * @extends Array + * Contains all Sensor binary downloads */ -export interface RegulatoryComplianceControlList extends Array { +export interface PackageDownloadsSensor { /** - * The URI to fetch the next page. + * Contains full package downloads * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly nextLink?: string; + readonly full?: PackageDownloadsSensorFull; + /** + * Sensor upgrade package downloads (on existing installations) + */ + upgrade?: UpgradePackageDownloadInfo[]; } /** - * @interface - * List of regulatory compliance assessment response - * @extends Array + * Contains all OVF (virtual machine) full versions of the Central Manager */ -export interface RegulatoryComplianceAssessmentList extends Array { +export interface PackageDownloadsCentralManagerFullOvf { /** - * The URI to fetch the next page. + * The Enterprise package type * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly nextLink?: string; + readonly enterprise?: PackageDownloadInfo[]; + /** + * The EnterpriseHighAvailability package type + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly enterpriseHighAvailability?: PackageDownloadInfo[]; + /** + * The Medium package type + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly medium?: PackageDownloadInfo[]; + /** + * The MediumHighAvailability package type + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly mediumHighAvailability?: PackageDownloadInfo[]; } /** - * @interface - * List of security sub-assessments - * @extends Array + * Contains full package downloads */ -export interface SecuritySubAssessmentList extends Array { +export interface PackageDownloadsCentralManagerFull { /** - * The URI to fetch the next page. + * Contains all ISO full versions of the Central Manager * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly nextLink?: string; + readonly iso?: PackageDownloadInfo[]; + /** + * Contains all OVF (virtual machine) full versions of the Central Manager + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly ovf?: PackageDownloadsCentralManagerFullOvf; } /** - * @interface - * List of security automations response. - * @extends Array + * All downloads for Central Manager */ -export interface AutomationList extends Array { +export interface PackageDownloadsCentralManager { /** - * The URI to fetch the next page. + * Contains full package downloads * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly nextLink?: string; + readonly full?: PackageDownloadsCentralManagerFull; + /** + * Central Manager upgrade package downloads (on existing installations) + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly upgrade?: UpgradePackageDownloadInfo[]; } /** - * @interface - * Suppression rules list for subscription. - * @extends Array + * Information about package downloads */ -export interface AlertsSuppressionRulesList extends Array { +export interface PackageDownloads { /** - * URI to fetch the next page. + * Contains all Sensor binary downloads * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly nextLink?: string; + readonly sensor?: PackageDownloadsSensor; + /** + * All downloads for Central Manager + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly centralManager?: PackageDownloadsCentralManager; + /** + * All downloads for threat intelligence + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly threatIntelligence?: PackageDownloadInfo[]; + /** + * SNMP Server file + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly snmp?: PackageDownloadInfo[]; + /** + * Used for local configuration export + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly wmiTool?: PackageDownloadInfo[]; + /** + * Authorized devices import template + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly authorizedDevicesImportTemplate?: PackageDownloadInfo[]; + /** + * Authorized devices import template + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly deviceInformationUpdateImportTemplate?: PackageDownloadInfo[]; } /** - * @interface - * List of security assessment metadata - * @extends Array + * IoT sensor model */ -export interface SecurityAssessmentMetadataList extends Array { +export interface IotSensorsModel extends Resource { /** - * The URI to fetch the next page. + * Last connectivity time of the IoT sensor * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly nextLink?: string; + readonly connectivityTime?: string; + /** + * Creation time of the IoT sensor + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly creationTime?: string; + /** + * Dynamic mode status of the IoT sensor + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly dynamicLearning?: boolean; + /** + * Learning mode status of the IoT sensor + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly learningMode?: boolean; + /** + * Status of the IoT sensor. Possible values include: 'Ok', 'Disconnected', 'Unavailable' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly sensorStatus?: SensorStatus; + /** + * Version of the IoT sensor + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly sensorVersion?: string; + /** + * TI Automatic mode status of the IoT sensor + */ + tiAutomaticUpdates?: boolean; + /** + * TI Status of the IoT sensor. Possible values include: 'Ok', 'Failed', 'InProgress', + * 'UpdateAvailable' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly tiStatus?: TiStatus; + /** + * TI Version of the IoT sensor + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly tiVersion?: string; + /** + * Zone of the IoT sensor + */ + zone?: string; + /** + * Type of sensor. Possible values include: 'Ot', 'Enterprise' + */ + sensorType?: SensorType; } /** - * @interface - * Page of a security assessments list - * @extends Array + * List of IoT sensors */ -export interface SecurityAssessmentList extends Array { +export interface IotSensorsList { /** - * The URI to fetch the next page. + * List data * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly nextLink?: string; + readonly value?: IotSensorsModel[]; } /** - * @interface - * Response for ListAdaptiveNetworkHardenings API service call - * @extends Array + * Reset password input. */ -export interface AdaptiveNetworkHardeningsList extends Array { +export interface ResetPasswordInput { /** - * The URL to get the next set of results + * The appliance id of the sensor. */ - nextLink?: string; + applianceId?: string; } /** - * @interface - * List of all possible traffic between Azure resources - * @extends Array + * IP Address information */ -export interface AllowedConnectionsList extends Array { +export interface IpAddress { /** - * The URI to fetch the next page. + * IPV4 address * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly nextLink?: string; -} - -/** - * @interface - * An interface representing the TopologyList. - * @extends Array - */ -export interface TopologyList extends Array { + readonly v4Address?: string; /** - * The URI to fetch the next page. + * Detection time of the ip address. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly nextLink?: string; + readonly detectionTime?: Date; + /** + * Subnet Classless Inter-Domain Routing + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly subnetCidr?: string; + /** + * Fully qualified domain name + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly fqdn?: string; + /** + * FQDN last lookup time. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly fqdnLastLookupTime?: Date; } /** - * @interface - * An interface representing the JitNetworkAccessPoliciesList. - * @extends Array + * MAC Address information */ -export interface JitNetworkAccessPoliciesList extends Array { +export interface MacAddress { /** - * The URI to fetch the next page. + * MAC address * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly nextLink?: string; + readonly address?: string; + /** + * Detection time of the mac address. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly detectionTime?: Date; + /** + * Indicates whether this is the primary secondary MAC address of the device. Possible values + * include: 'Primary', 'Secondary' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly significance?: MacSignificance; + /** + * Indicates whether the relation of the mac to the ip address is certain or a guess. Possible + * values include: 'Guess', 'Certain' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly relationToIpStatus?: RelationToIpStatus; } /** - * @interface - * An interface representing the DiscoveredSecuritySolutionList. - * @extends Array + * Network interface */ -export interface DiscoveredSecuritySolutionList extends Array { +export interface NetworkInterface { + ipAddress?: IpAddress; + macAddress?: MacAddress; /** - * The URI to fetch the next page. + * List of device vlans. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly nextLink?: string; + readonly vlans?: string[]; } /** - * @interface - * An interface representing the ExternalSecuritySolutionList. - * @extends Array + * Protocol data */ -export interface ExternalSecuritySolutionList extends Array { +export interface Protocol1 { /** - * The URI to fetch the next page. + * Protocol name * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly nextLink?: string; + readonly name?: string; + /** + * list of protocol identifiers. + */ + identifiers?: string; } /** - * @interface - * Page of a secure scores list - * @extends Array + * Firmware information */ -export interface SecureScoresList extends Array { +export interface Firmware { /** - * The URI to fetch the next page. + * Address of the specific module a firmware is related to * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly nextLink?: string; + readonly moduleAddress?: string; + /** + * Rack number of the module a firmware is related to. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly rack?: string; + /** + * Slot number in the rack of the module a firmware is related to + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly slot?: string; + /** + * Serial of the firmware + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly serial?: string; + /** + * Firmware model + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly model?: string; + /** + * Firmware version + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly version?: string; + /** + * A bag of fields which extends the firmware information. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly additionalData?: any; } /** - * @interface - * Page of a secure score controls list - * @extends Array + * Sensor data */ -export interface SecureScoreControlList extends Array { +export interface Sensor { /** - * The URI to fetch the next page. + * Sensor name * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly nextLink?: string; + readonly name?: string; + /** + * Zone Name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly zone?: string; } /** - * @interface - * Page of a secure score controls definition list - * @extends Array + * Site data */ -export interface SecureScoreControlDefinitionList extends Array { +export interface Site { /** - * The URI to fetch the next page. + * Site display name * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly nextLink?: string; + readonly displayName?: string; } /** - * Defines values for ResourceStatus. - * Possible values include: 'Healthy', 'NotApplicable', 'OffByPolicy', 'NotHealthy' - * @readonly - * @enum {string} + * Device model + */ +export interface Device extends Resource { + /** + * Device display name given by the collector + */ + displayName?: string; + /** + * Device type. + */ + deviceType?: string; + /** + * The source that created the device + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly sourceName?: string; + /** + * List of network interfaces. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly networkInterfaces?: NetworkInterface[]; + /** + * Device vendor + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly vendor?: string; + /** + * Device operating system name. + */ + osName?: string; + /** + * List of protocols. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly protocols?: Protocol1[]; + /** + * last time the device was active in the network + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly lastActiveTime?: Date; + /** + * last time the device was updated + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly lastUpdateTime?: Date; + /** + * Managed state of the device. Possible values include: 'Managed', 'Unmanaged' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly managementState?: ManagementState; + /** + * Authorized state of the device. Possible values include: 'Authorized', 'Unauthorized'. Default + * value: 'Unauthorized'. + */ + authorizationState?: AuthorizationState; + /** + * Device criticality. Possible values include: 'Important', 'Standard'. Default value: + * 'Standard'. + */ + deviceCriticality?: DeviceCriticality; + /** + * Purdue level of the device. Possible values include: 'ProcessControl', 'Supervisory', + * 'Enterprise'. Default value: 'ProcessControl'. + */ + purdueLevel?: PurdueLevel; + /** + * user notes for the device, up to 300 characters. + */ + notes?: string; + /** + * List of device firmwares. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly firmwares?: Firmware[]; + /** + * Discovered time of the device. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly discoveryTime?: Date; + /** + * Indicates whether this device is programming. Possible values include: 'ProgrammingDevice', + * 'NotProgrammingDevice' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly programmingState?: ProgrammingState; + /** + * last time the device was programming or programed. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly lastProgrammingTime?: Date; + /** + * Indicates whether the device is a scanner. Possible values include: 'ScannerDevice', + * 'NotScannerDevice' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly scanningFunctionality?: ScanningFunctionality; + /** + * last time the device was scanning. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly lastScanTime?: Date; + /** + * risk score of the device. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly riskScore?: number; + /** + * List of sensors that scanned this device. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly sensors?: Sensor[]; + /** + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly site?: Site; + /** + * Device status. Possible values include: 'Active', 'Removed' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly deviceStatus?: DeviceStatus; +} + +/** + * On-premise IoT sensor + */ +export interface OnPremiseIotSensor extends Resource { + /** + * On-premise IoT sensor properties + */ + properties?: any; +} + +/** + * List of on-premise IoT sensors + */ +export interface OnPremiseIotSensorsList { + /** + * List data + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly value?: OnPremiseIotSensor[]; +} + +/** + * IoT site model + */ +export interface IotSitesModel extends Resource { + /** + * Display name of the IoT site + */ + displayName: string; + /** + * Tags of the IoT site + */ + tags?: { [propertyName: string]: string }; +} + +/** + * List of IoT sites + */ +export interface IotSitesList { + /** + * List data + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly value?: IotSitesModel[]; +} + +/** + * IoT alert + */ +export interface IotAlertModel extends Resource { + /** + * Holds the product canonical identifier of the alert within the scope of a product + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly systemAlertId?: string; + /** + * Display name of the main entity being reported on + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly compromisedEntity?: string; + /** + * The type name of the alert + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly alertType?: string; + /** + * The impact start time of the alert (the time of the first event or activity included in the + * alert) + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly startTimeUtc?: string; + /** + * The impact end time of the alert (the time of the last event or activity included in the + * alert) + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly endTimeUtc?: string; + /** + * A list of entities related to the alert + */ + entities?: any[]; + /** + * A bag of fields which extends the alert information + */ + extendedProperties?: any; +} + +/** + * IoT alert type. + */ +export interface IotAlertType extends Resource { + /** + * The display name of the alert + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly alertDisplayName?: string; + /** + * The severity of the alert. Possible values include: 'Informational', 'Low', 'Medium', 'High' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly severity?: AlertSeverity; + /** + * Description of the suspected vulnerability and meaning. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly description?: string; + /** + * The name of the alert provider or internal partner + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly providerName?: string; + /** + * The name of the product which published this alert + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly productName?: string; + /** + * The name of a component inside the product which generated the alert + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly productComponentName?: string; + /** + * The name of the vendor that raise the alert + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly vendorName?: string; + /** + * Kill chain related intent behind the alert. Could contain multiple enum values (separated by + * commas). Possible values include: 'Unknown', 'PreAttack', 'InitialAccess', 'Persistence', + * 'PrivilegeEscalation', 'DefenseEvasion', 'CredentialAccess', 'Discovery', 'LateralMovement', + * 'Execution', 'Collection', 'Exfiltration', 'CommandAndControl', 'Impact', 'Probing', + * 'Exploitation' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly intent?: AlertIntent; + /** + * Manual action items to take to remediate the alert + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly remediationSteps?: string[]; +} + +/** + * List of alert types + */ +export interface IotAlertTypeList { + /** + * List data + */ + value?: IotAlertType[]; +} + +/** + * IoT recommendation + */ +export interface IotRecommendationModel extends Resource { + /** + * Identifier of the device being reported on + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly deviceId?: string; + /** + * The type name of the recommendation + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly recommendationType?: string; + /** + * The discovery time of the recommendation + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly discoveredTimeUtc?: string; + /** + * A bag of fields which extends the recommendation information + */ + recommendationAdditionalData?: any; +} + +/** + * IoT recommendation type. + */ +export interface IotRecommendationType extends Resource { + /** + * The display name of the recommendation + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly recommendationDisplayName?: string; + /** + * The severity of the recommendation. Possible values include: 'Unknown', 'NotApplicable', + * 'Healthy', 'OffByPolicy', 'Low', 'Medium', 'High' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly severity?: RecommendationSeverity; + /** + * Description of the suspected vulnerability and meaning. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly description?: string; + /** + * The name of the product which published this recommendation + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly productName?: string; + /** + * The name of a component inside the product which generated the recommendation + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly productComponentName?: string; + /** + * The name of the vendor that raised the recommendation + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly vendorName?: string; + /** + * The name of the recommendation's control category + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly control?: string; + /** + * Manual action items to take to resolve the recommendation + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly remediationSteps?: string[]; + /** + * The alert's data source + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly dataSource?: string; +} + +/** + * List of recommendation types + */ +export interface IotRecommendationTypeList { + /** + * List data + */ + value?: IotRecommendationType[]; +} + +/** + * Contains the possible cases for ResourceIdentifier. + */ +export type ResourceIdentifierUnion = ResourceIdentifier | AzureResourceIdentifier | LogAnalyticsIdentifier; + +/** + * A resource identifier for an alert which can be used to direct the alert to the right product + * exposure group (tenant, workspace, subscription etc.). + */ +export interface ResourceIdentifier { + /** + * Polymorphic Discriminator + */ + type: "ResourceIdentifier"; +} + +/** + * Changing set of properties depending on the entity type. + */ +export interface AlertEntity { + /** + * Type of entity + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * Describes unknown properties. The value of an unknown property can be of "any" type. + */ + [property: string]: any; +} + +/** + * Security alert + */ +export interface Alert extends Resource { + /** + * Unique identifier for the detection logic (all alert instances from the same detection logic + * will have the same alertType). + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly alertType?: string; + /** + * Unique identifier for the alert. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly systemAlertId?: string; + /** + * The name of Azure Security Center pricing tier which powering this alert. Learn more: + * https://docs.microsoft.com/en-us/azure/security-center/security-center-pricing + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly productComponentName?: string; + /** + * The display name of the alert. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly alertDisplayName?: string; + /** + * Description of the suspicious activity that was detected. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly description?: string; + /** + * The risk level of the threat that was detected. Learn more: + * https://docs.microsoft.com/en-us/azure/security-center/security-center-alerts-overview#how-are-alerts-classified. + * Possible values include: 'Informational', 'Low', 'Medium', 'High' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly severity?: AlertSeverity; + /** + * The kill chain related intent behind the alert. For list of supported values, and explanations + * of Azure Security Center's supported kill chain intents. Possible values include: 'Unknown', + * 'PreAttack', 'InitialAccess', 'Persistence', 'PrivilegeEscalation', 'DefenseEvasion', + * 'CredentialAccess', 'Discovery', 'LateralMovement', 'Execution', 'Collection', 'Exfiltration', + * 'CommandAndControl', 'Impact', 'Probing', 'Exploitation' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly intent?: Intent; + /** + * The UTC time of the first event or activity included in the alert in ISO8601 format. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly startTimeUtc?: Date; + /** + * The UTC time of the last event or activity included in the alert in ISO8601 format. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly endTimeUtc?: Date; + /** + * The resource identifiers that can be used to direct the alert to the right product exposure + * group (tenant, workspace, subscription etc.). There can be multiple identifiers of different + * type per alert. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly resourceIdentifiers?: ResourceIdentifierUnion[]; + /** + * Manual action items to take to remediate the alert. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly remediationSteps?: string[]; + /** + * The name of the vendor that raises the alert. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly vendorName?: string; + /** + * The life cycle status of the alert. Possible values include: 'Active', 'Resolved', 'Dismissed' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly status?: AlertStatus; + /** + * Links related to the alert + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly extendedLinks?: { [propertyName: string]: string }[]; + /** + * A direct link to the alert page in Azure Portal. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly alertUri?: string; + /** + * The UTC time the alert was generated in ISO8601 format. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly timeGeneratedUtc?: Date; + /** + * The name of the product which published this alert (Azure Security Center, Azure ATP, + * Microsoft Defender ATP, O365 ATP, MCAS, and so on). + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly productName?: string; + /** + * The UTC processing end time of the alert in ISO8601 format. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly processingEndTimeUtc?: Date; + /** + * A list of entities related to the alert. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly entities?: AlertEntity[]; + /** + * This field determines whether the alert is an incident (a compound grouping of several alerts) + * or a single alert. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly isIncident?: boolean; + /** + * Key for corelating related alerts. Alerts with the same correlation key considered to be + * related. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly correlationKey?: string; + /** + * Custom properties for the alert. + */ + extendedProperties?: { [propertyName: string]: string }; + /** + * The display name of the resource most related to this alert. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly compromisedEntity?: string; +} + +/** + * Azure resource identifier. + */ +export interface AzureResourceIdentifier { + /** + * Polymorphic Discriminator + */ + type: "AzureResource"; + /** + * ARM resource identifier for the cloud resource being alerted on + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly azureResourceId?: string; +} + +/** + * Represents a Log Analytics workspace scope identifier. + */ +export interface LogAnalyticsIdentifier { + /** + * Polymorphic Discriminator + */ + type: "LogAnalytics"; + /** + * The LogAnalytics workspace id that stores this alert. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly workspaceId?: string; + /** + * The azure subscription id for the LogAnalytics workspace storing this alert. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly workspaceSubscriptionId?: string; + /** + * The azure resource group for the LogAnalytics workspace storing this alert + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly workspaceResourceGroup?: string; + /** + * (optional) The LogAnalytics agent id reporting the event that this alert is based on. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly agentId?: string; +} + +/** + * Contains the possible cases for AlertSimulatorRequestProperties. + */ +export type AlertSimulatorRequestPropertiesUnion = AlertSimulatorRequestProperties | AlertSimulatorBundlesRequestProperties; + +/** + * Describes properties of an alert simulation request + */ +export interface AlertSimulatorRequestProperties { + /** + * Polymorphic Discriminator + */ + kind: "AlertSimulatorRequestProperties"; + /** + * Describes unknown properties. The value of an unknown property can be of "any" type. + */ + [property: string]: any; +} + +/** + * Alert Simulator request body. + */ +export interface AlertSimulatorRequestBody { + /** + * Alert Simulator request body data. + */ + properties?: AlertSimulatorRequestPropertiesUnion; +} + +/** + * Simulate alerts according to this bundles. + */ +export interface AlertSimulatorBundlesRequestProperties { + /** + * Polymorphic Discriminator + */ + kind: "Bundles"; + /** + * Bundles list. + */ + bundles?: BundleType[]; +} + +/** + * Contains the possible cases for Setting. + */ +export type SettingUnion = Setting | DataExportSettings | AlertSyncSettings; + +/** + * The kind of the security setting + */ +export interface Setting { + /** + * Polymorphic Discriminator + */ + kind: "Setting"; + /** + * Resource Id + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * Resource name + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * Resource type + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; +} + +/** + * Represents a data export setting + */ +export interface DataExportSettings { + /** + * Polymorphic Discriminator + */ + kind: "DataExportSettings"; + /** + * Resource Id + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * Resource name + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * Resource type + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * Is the data export setting enabled + */ + enabled: boolean; +} + +/** + * Represents an alert sync setting + */ +export interface AlertSyncSettings { + /** + * Polymorphic Discriminator + */ + kind: "AlertSyncSettings"; + /** + * Resource Id + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * Resource name + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * Resource type + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * Is the alert sync setting enabled + */ + enabled: boolean; +} + +/** + * Configures how to correlate scan data and logs with resources associated with the subscription. + */ +export interface IngestionSetting extends Resource { + /** + * Ingestion setting data + */ + properties?: any; +} + +/** + * Configures how to correlate scan data and logs with resources associated with the subscription. + */ +export interface IngestionSettingToken { + /** + * The token is used for correlating security data and logs with the resources in the + * subscription. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly token?: string; +} + +/** + * Connection string for ingesting security data and logs + */ +export interface IngestionConnectionString { + /** + * The region where ingested logs and data resides + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly location?: string; + /** + * Connection string value + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly value?: string; +} + +/** + * Connection string for ingesting security data and logs + */ +export interface ConnectionStrings { + /** + * Connection strings + */ + value: IngestionConnectionString[]; +} + +/** + * Represents a software data + */ +export interface Software extends Resource { + /** + * Unique identifier for the virtual machine in the service. + */ + deviceId?: string; + /** + * Platform of the operating system running on the device. + */ + osPlatform?: string; + /** + * Name of the software vendor. + */ + vendor?: string; + /** + * Name of the software product. + */ + softwareName?: string; + /** + * Version number of the software product. + */ + version?: string; + /** + * End of support status. Possible values include: 'None', 'noLongerSupported', + * 'versionNoLongerSupported', 'upcomingNoLongerSupported', 'upcomingVersionNoLongerSupported' + */ + endOfSupportStatus?: EndOfSupportStatus; + /** + * The end of support date in case the product is upcoming end of support. + */ + endOfSupportDate?: string; + /** + * Number of weaknesses. + */ + numberOfKnownVulnerabilities?: number; + /** + * First time that the software was seen in the device. + */ + firstSeenAt?: string; +} + +/** + * Optional Parameters. + */ +export interface IotSecuritySolutionListBySubscriptionOptionalParams extends msRest.RequestOptionsBase { + /** + * Filter the IoT Security solution with OData syntax. Supports filtering by iotHubs. + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface IotSecuritySolutionListByResourceGroupOptionalParams extends msRest.RequestOptionsBase { + /** + * Filter the IoT Security solution with OData syntax. Supports filtering by iotHubs. + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface IotSecuritySolutionListBySubscriptionNextOptionalParams extends msRest.RequestOptionsBase { + /** + * Filter the IoT Security solution with OData syntax. Supports filtering by iotHubs. + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface IotSecuritySolutionListByResourceGroupNextOptionalParams extends msRest.RequestOptionsBase { + /** + * Filter the IoT Security solution with OData syntax. Supports filtering by iotHubs. + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface IotSecuritySolutionsAnalyticsAggregatedAlertListOptionalParams extends msRest.RequestOptionsBase { + /** + * Number of results to retrieve. + */ + top?: number; +} + +/** + * Optional Parameters. + */ +export interface IotSecuritySolutionsAnalyticsAggregatedAlertListNextOptionalParams extends msRest.RequestOptionsBase { + /** + * Number of results to retrieve. + */ + top?: number; +} + +/** + * Optional Parameters. + */ +export interface IotSecuritySolutionsAnalyticsRecommendationListOptionalParams extends msRest.RequestOptionsBase { + /** + * Number of results to retrieve. + */ + top?: number; +} + +/** + * Optional Parameters. + */ +export interface IotSecuritySolutionsAnalyticsRecommendationListNextOptionalParams extends msRest.RequestOptionsBase { + /** + * Number of results to retrieve. + */ + top?: number; +} + +/** + * Optional Parameters. + */ +export interface TasksListOptionalParams extends msRest.RequestOptionsBase { + /** + * OData filter. Optional. + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface TasksListByHomeRegionOptionalParams extends msRest.RequestOptionsBase { + /** + * OData filter. Optional. + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface TasksListByResourceGroupOptionalParams extends msRest.RequestOptionsBase { + /** + * OData filter. Optional. + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface TasksListNextOptionalParams extends msRest.RequestOptionsBase { + /** + * OData filter. Optional. + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface TasksListByHomeRegionNextOptionalParams extends msRest.RequestOptionsBase { + /** + * OData filter. Optional. + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface TasksListByResourceGroupNextOptionalParams extends msRest.RequestOptionsBase { + /** + * OData filter. Optional. + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface RegulatoryComplianceStandardsListOptionalParams extends msRest.RequestOptionsBase { + /** + * OData filter. Optional. + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface RegulatoryComplianceStandardsListNextOptionalParams extends msRest.RequestOptionsBase { + /** + * OData filter. Optional. + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface RegulatoryComplianceControlsListOptionalParams extends msRest.RequestOptionsBase { + /** + * OData filter. Optional. + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface RegulatoryComplianceControlsListNextOptionalParams extends msRest.RequestOptionsBase { + /** + * OData filter. Optional. + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface RegulatoryComplianceAssessmentsListOptionalParams extends msRest.RequestOptionsBase { + /** + * OData filter. Optional. + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface RegulatoryComplianceAssessmentsListNextOptionalParams extends msRest.RequestOptionsBase { + /** + * OData filter. Optional. + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface AlertsSuppressionRulesListOptionalParams extends msRest.RequestOptionsBase { + /** + * Type of the alert to get rules for + */ + alertType?: string; +} + +/** + * Optional Parameters. + */ +export interface AlertsSuppressionRulesListNextOptionalParams extends msRest.RequestOptionsBase { + /** + * Type of the alert to get rules for + */ + alertType?: string; +} + +/** + * Optional Parameters. + */ +export interface AssessmentsGetOptionalParams extends msRest.RequestOptionsBase { + /** + * OData expand. Optional. Possible values include: 'links', 'metadata' + */ + expand?: ExpandEnum; +} + +/** + * Optional Parameters. + */ +export interface AdaptiveApplicationControlsListOptionalParams extends msRest.RequestOptionsBase { + /** + * Include the policy rules + */ + includePathRecommendations?: boolean; + /** + * Return output in a summarized form + */ + summary?: boolean; +} + +/** + * Optional Parameters. + */ +export interface SecureScoreControlsListBySecureScoreOptionalParams extends msRest.RequestOptionsBase { + /** + * OData expand. Optional. Possible values include: 'definition' + */ + expand?: ExpandControlsEnum; +} + +/** + * Optional Parameters. + */ +export interface SecureScoreControlsListOptionalParams extends msRest.RequestOptionsBase { + /** + * OData expand. Optional. Possible values include: 'definition' + */ + expand?: ExpandControlsEnum; +} + +/** + * Optional Parameters. + */ +export interface SecureScoreControlsListBySecureScoreNextOptionalParams extends msRest.RequestOptionsBase { + /** + * OData expand. Optional. Possible values include: 'definition' + */ + expand?: ExpandControlsEnum; +} + +/** + * Optional Parameters. + */ +export interface SecureScoreControlsListNextOptionalParams extends msRest.RequestOptionsBase { + /** + * OData expand. Optional. Possible values include: 'definition' + */ + expand?: ExpandControlsEnum; +} + +/** + * Optional Parameters. + */ +export interface SqlVulnerabilityAssessmentBaselineRulesCreateOrUpdateOptionalParams extends msRest.RequestOptionsBase { + /** + * The baseline results for this rule. + */ + body?: RuleResultsInput; +} + +/** + * Optional Parameters. + */ +export interface SqlVulnerabilityAssessmentBaselineRulesAddOptionalParams extends msRest.RequestOptionsBase { + /** + * The baseline rules. + */ + body?: RulesResultsInput; +} + +/** + * Optional Parameters. + */ +export interface DevicesForSubscriptionListOptionalParams extends msRest.RequestOptionsBase { + /** + * Limit the number of items returned in a single page + */ + limit?: number; + /** + * Skip token used for pagination + */ + skipToken?: string; + /** + * Get devices only from specific type, Managed or Unmanaged. Possible values include: 'Managed', + * 'Unmanaged' + */ + deviceManagementType?: ManagementState; +} + +/** + * Optional Parameters. + */ +export interface DevicesForSubscriptionListNextOptionalParams extends msRest.RequestOptionsBase { + /** + * Limit the number of items returned in a single page + */ + limit?: number; + /** + * Skip token used for pagination + */ + skipToken?: string; + /** + * Get devices only from specific type, Managed or Unmanaged. Possible values include: 'Managed', + * 'Unmanaged' + */ + deviceManagementType?: ManagementState; +} + +/** + * Optional Parameters. + */ +export interface DevicesForHubListOptionalParams extends msRest.RequestOptionsBase { + /** + * Limit the number of items returned in a single page + */ + limit?: number; + /** + * Skip token used for pagination + */ + skipToken?: string; + /** + * Get devices only from specific type, Managed or Unmanaged. Possible values include: 'Managed', + * 'Unmanaged' + */ + deviceManagementType?: ManagementState; +} + +/** + * Optional Parameters. + */ +export interface DevicesForHubListNextOptionalParams extends msRest.RequestOptionsBase { + /** + * Limit the number of items returned in a single page + */ + limit?: number; + /** + * Skip token used for pagination + */ + skipToken?: string; + /** + * Get devices only from specific type, Managed or Unmanaged. Possible values include: 'Managed', + * 'Unmanaged' + */ + deviceManagementType?: ManagementState; +} + +/** + * Optional Parameters. + */ +export interface IotAlertsListOptionalParams extends msRest.RequestOptionsBase { + /** + * Filter by minimum startTimeUtc (ISO 8601 format) + */ + minStartTimeUtc?: string; + /** + * Filter by maximum startTimeUtc (ISO 8601 format) + */ + maxStartTimeUtc?: string; + /** + * Filter by alert type + */ + alertType?: string; + /** + * Get devices only from specific type, Managed or Unmanaged. Possible values include: 'Managed', + * 'Unmanaged' + */ + deviceManagementType?: ManagementState; + /** + * Filter by compromised device + */ + compromisedEntity?: string; + /** + * Limit the number of items returned in a single page + */ + limit?: number; + /** + * Skip token used for pagination + */ + skipToken?: string; +} + +/** + * Optional Parameters. + */ +export interface IotAlertsListNextOptionalParams extends msRest.RequestOptionsBase { + /** + * Filter by minimum startTimeUtc (ISO 8601 format) + */ + minStartTimeUtc?: string; + /** + * Filter by maximum startTimeUtc (ISO 8601 format) + */ + maxStartTimeUtc?: string; + /** + * Filter by alert type + */ + alertType?: string; + /** + * Get devices only from specific type, Managed or Unmanaged. Possible values include: 'Managed', + * 'Unmanaged' + */ + deviceManagementType?: ManagementState; + /** + * Filter by compromised device + */ + compromisedEntity?: string; + /** + * Limit the number of items returned in a single page + */ + limit?: number; + /** + * Skip token used for pagination + */ + skipToken?: string; +} + +/** + * Optional Parameters. + */ +export interface IotRecommendationsListOptionalParams extends msRest.RequestOptionsBase { + /** + * Filter by recommendation type + */ + recommendationType?: string; + /** + * Filter by device id + */ + deviceId?: string; + /** + * Limit the number of items returned in a single page + */ + limit?: number; + /** + * Skip token used for pagination + */ + skipToken?: string; +} + +/** + * Optional Parameters. + */ +export interface IotRecommendationsListNextOptionalParams extends msRest.RequestOptionsBase { + /** + * Filter by recommendation type + */ + recommendationType?: string; + /** + * Filter by device id + */ + deviceId?: string; + /** + * Limit the number of items returned in a single page + */ + limit?: number; + /** + * Skip token used for pagination + */ + skipToken?: string; +} + +/** + * An interface representing SecurityCenterOptions. + */ +export interface SecurityCenterOptions extends AzureServiceClientOptions { + baseUri?: string; +} + +/** + * @interface + * List of compliance results response + * @extends Array + */ +export interface ComplianceResultList extends Array { + /** + * The URI to fetch the next page. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * List of device security groups + * @extends Array + */ +export interface DeviceSecurityGroupList extends Array { + /** + * The URI to fetch the next page. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * List of IoT Security solutions. + * @extends Array + */ +export interface IoTSecuritySolutionsList extends Array { + /** + * The URI to fetch the next page. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * List of IoT Security solution aggregated alert data. + * @extends Array + */ +export interface IoTSecurityAggregatedAlertList extends Array { + /** + * When there is too much alert data for one page, use this URI to fetch the next page. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * List of IoT Security solution aggregated recommendations. + * @extends Array + */ +export interface IoTSecurityAggregatedRecommendationList extends Array { + /** + * When there is too much alert data for one page, use this URI to fetch the next page. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * List of locations where ASC saves your data + * @extends Array + */ +export interface AscLocationList extends Array { + /** + * The URI to fetch the next page. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * List of possible operations for Microsoft.Security resource provider + * @extends Array + */ +export interface OperationList extends Array { + /** + * The URI to fetch the next page. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * List of security task recommendations + * @extends Array + */ +export interface SecurityTaskList extends Array { + /** + * The URI to fetch the next page. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * List of all the auto provisioning settings response + * @extends Array + */ +export interface AutoProvisioningSettingList extends Array { + /** + * The URI to fetch the next page. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * List of Compliance objects response + * @extends Array + */ +export interface ComplianceList extends Array { + /** + * The URI to fetch the next page. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * Information protection policies response. + * @extends Array + */ +export interface InformationProtectionPolicyList extends Array { + /** + * The URI to fetch the next page. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * List of security contacts response + * @extends Array + */ +export interface SecurityContactList extends Array { + /** + * The URI to fetch the next page. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * List of workspace settings response + * @extends Array + */ +export interface WorkspaceSettingList extends Array { + /** + * The URI to fetch the next page. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * List of regulatory compliance standards response + * @extends Array + */ +export interface RegulatoryComplianceStandardList extends Array { + /** + * The URI to fetch the next page. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * List of regulatory compliance controls response + * @extends Array + */ +export interface RegulatoryComplianceControlList extends Array { + /** + * The URI to fetch the next page. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * List of regulatory compliance assessment response + * @extends Array + */ +export interface RegulatoryComplianceAssessmentList extends Array { + /** + * The URI to fetch the next page. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * List of security sub-assessments + * @extends Array + */ +export interface SecuritySubAssessmentList extends Array { + /** + * The URI to fetch the next page. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * List of security automations response. + * @extends Array + */ +export interface AutomationList extends Array { + /** + * The URI to fetch the next page. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * Suppression rules list for subscription. + * @extends Array + */ +export interface AlertsSuppressionRulesList extends Array { + /** + * URI to fetch the next page. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * List of security assessment metadata + * @extends Array + */ +export interface SecurityAssessmentMetadataList extends Array { + /** + * The URI to fetch the next page. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * Page of a security assessments list + * @extends Array + */ +export interface SecurityAssessmentList extends Array { + /** + * The URI to fetch the next page. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * Response for ListAdaptiveNetworkHardenings API service call + * @extends Array + */ +export interface AdaptiveNetworkHardeningsList extends Array { + /** + * The URL to get the next set of results + */ + nextLink?: string; +} + +/** + * @interface + * List of all possible traffic between Azure resources + * @extends Array + */ +export interface AllowedConnectionsList extends Array { + /** + * The URI to fetch the next page. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing the TopologyList. + * @extends Array + */ +export interface TopologyList extends Array { + /** + * The URI to fetch the next page. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing the JitNetworkAccessPoliciesList. + * @extends Array + */ +export interface JitNetworkAccessPoliciesList extends Array { + /** + * The URI to fetch the next page. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing the DiscoveredSecuritySolutionList. + * @extends Array + */ +export interface DiscoveredSecuritySolutionList extends Array { + /** + * The URI to fetch the next page. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing the ExternalSecuritySolutionList. + * @extends Array + */ +export interface ExternalSecuritySolutionList extends Array { + /** + * The URI to fetch the next page. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * List of secure scores + * @extends Array + */ +export interface SecureScoresList extends Array { + /** + * The URI to fetch the next page. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * List of security controls + * @extends Array + */ +export interface SecureScoreControlList extends Array { + /** + * The URI to fetch the next page. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * List of security controls definition + * @extends Array + */ +export interface SecureScoreControlDefinitionList extends Array { + /** + * The URI to fetch the next page. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing the SecuritySolutionList. + * @extends Array + */ +export interface SecuritySolutionList extends Array { + /** + * The URI to fetch the next page. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * For a subscription, list of all cloud account connectors and their settings + * @extends Array + */ +export interface ConnectorSettingList extends Array { + /** + * The URI to fetch the next page. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * List of Devices + * @extends Array + */ +export interface DeviceList extends Array { + /** + * When there are too many devices for one page, use this URI to fetch the next page. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * List of IoT alerts + * @extends Array + */ +export interface IotAlertListModel extends Array { + /** + * When available, follow the URI to get the next page of data + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * List of IoT recommendations + * @extends Array + */ +export interface IotRecommendationListModel extends Array { + /** + * When available, follow the URI to get the next page of data + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * List of security alerts + * @extends Array + */ +export interface AlertList extends Array { + /** + * The URI to fetch the next page. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * Subscription settings list. + * @extends Array + */ +export interface SettingsList extends Array { + /** + * The URI to fetch the next page. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * List of ingestion settings + * @extends Array + */ +export interface IngestionSettingList extends Array { + /** + * The URI to fetch the next page. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * Represents the software inventory of the virtual machine. + * @extends Array + */ +export interface SoftwaresList extends Array { + /** + * The URI to fetch the next page. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * Defines values for ResourceStatus. + * Possible values include: 'Healthy', 'NotApplicable', 'OffByPolicy', 'NotHealthy' + * @readonly + * @enum {string} */ export type ResourceStatus = 'Healthy' | 'NotApplicable' | 'OffByPolicy' | 'NotHealthy'; /** - * Defines values for PricingTier. - * Possible values include: 'Free', 'Standard' - * @readonly - * @enum {string} + * Defines values for PricingTier. + * Possible values include: 'Free', 'Standard' + * @readonly + * @enum {string} + */ +export type PricingTier = 'Free' | 'Standard'; + +/** + * Defines values for ValueType. + * Possible values include: 'IpCidr', 'String' + * @readonly + * @enum {string} + */ +export type ValueType = 'IpCidr' | 'String'; + +/** + * Defines values for SecuritySolutionStatus. + * Possible values include: 'Enabled', 'Disabled' + * @readonly + * @enum {string} + */ +export type SecuritySolutionStatus = 'Enabled' | 'Disabled'; + +/** + * Defines values for ExportData. + * Possible values include: 'RawEvents' + * @readonly + * @enum {string} + */ +export type ExportData = 'RawEvents'; + +/** + * Defines values for DataSource. + * Possible values include: 'TwinData' + * @readonly + * @enum {string} + */ +export type DataSource = 'TwinData'; + +/** + * Defines values for RecommendationType. + * Possible values include: 'IoT_ACRAuthentication', 'IoT_AgentSendsUnutilizedMessages', + * 'IoT_Baseline', 'IoT_EdgeHubMemOptimize', 'IoT_EdgeLoggingOptions', + * 'IoT_InconsistentModuleSettings', 'IoT_InstallAgent', 'IoT_IPFilter_DenyAll', + * 'IoT_IPFilter_PermissiveRule', 'IoT_OpenPorts', 'IoT_PermissiveFirewallPolicy', + * 'IoT_PermissiveInputFirewallRules', 'IoT_PermissiveOutputFirewallRules', + * 'IoT_PrivilegedDockerOptions', 'IoT_SharedCredentials', 'IoT_VulnerableTLSCipherSuite' + * @readonly + * @enum {string} + */ +export type RecommendationType = 'IoT_ACRAuthentication' | 'IoT_AgentSendsUnutilizedMessages' | 'IoT_Baseline' | 'IoT_EdgeHubMemOptimize' | 'IoT_EdgeLoggingOptions' | 'IoT_InconsistentModuleSettings' | 'IoT_InstallAgent' | 'IoT_IPFilter_DenyAll' | 'IoT_IPFilter_PermissiveRule' | 'IoT_OpenPorts' | 'IoT_PermissiveFirewallPolicy' | 'IoT_PermissiveInputFirewallRules' | 'IoT_PermissiveOutputFirewallRules' | 'IoT_PrivilegedDockerOptions' | 'IoT_SharedCredentials' | 'IoT_VulnerableTLSCipherSuite'; + +/** + * Defines values for RecommendationConfigStatus. + * Possible values include: 'Disabled', 'Enabled' + * @readonly + * @enum {string} + */ +export type RecommendationConfigStatus = 'Disabled' | 'Enabled'; + +/** + * Defines values for UnmaskedIpLoggingStatus. + * Possible values include: 'Disabled', 'Enabled' + * @readonly + * @enum {string} + */ +export type UnmaskedIpLoggingStatus = 'Disabled' | 'Enabled'; + +/** + * Defines values for AdditionalWorkspaceType. + * Possible values include: 'Sentinel' + * @readonly + * @enum {string} + */ +export type AdditionalWorkspaceType = 'Sentinel'; + +/** + * Defines values for AdditionalWorkspaceDataType. + * Possible values include: 'Alerts', 'RawEvents' + * @readonly + * @enum {string} + */ +export type AdditionalWorkspaceDataType = 'Alerts' | 'RawEvents'; + +/** + * Defines values for CreatedByType. + * Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' + * @readonly + * @enum {string} + */ +export type CreatedByType = 'User' | 'Application' | 'ManagedIdentity' | 'Key'; + +/** + * Defines values for ReportedSeverity. + * Possible values include: 'Informational', 'Low', 'Medium', 'High' + * @readonly + * @enum {string} + */ +export type ReportedSeverity = 'Informational' | 'Low' | 'Medium' | 'High'; + +/** + * Defines values for AutoProvision. + * Possible values include: 'On', 'Off' + * @readonly + * @enum {string} + */ +export type AutoProvision = 'On' | 'Off'; + +/** + * Defines values for Rank. + * Possible values include: 'None', 'Low', 'Medium', 'High', 'Critical' + * @readonly + * @enum {string} + */ +export type Rank = 'None' | 'Low' | 'Medium' | 'High' | 'Critical'; + +/** + * Defines values for AlertNotifications. + * Possible values include: 'On', 'Off' + * @readonly + * @enum {string} + */ +export type AlertNotifications = 'On' | 'Off'; + +/** + * Defines values for AlertsToAdmins. + * Possible values include: 'On', 'Off' + * @readonly + * @enum {string} + */ +export type AlertsToAdmins = 'On' | 'Off'; + +/** + * Defines values for State. + * Possible values include: 'Passed', 'Failed', 'Skipped', 'Unsupported' + * @readonly + * @enum {string} + */ +export type State = 'Passed' | 'Failed' | 'Skipped' | 'Unsupported'; + +/** + * Defines values for SubAssessmentStatusCode. + * Possible values include: 'Healthy', 'Unhealthy', 'NotApplicable' + * @readonly + * @enum {string} + */ +export type SubAssessmentStatusCode = 'Healthy' | 'Unhealthy' | 'NotApplicable'; + +/** + * Defines values for Severity. + * Possible values include: 'Low', 'Medium', 'High' + * @readonly + * @enum {string} + */ +export type Severity = 'Low' | 'Medium' | 'High'; + +/** + * Defines values for EventSource. + * Possible values include: 'Assessments', 'SubAssessments', 'Alerts', 'SecureScores', + * 'SecureScoresSnapshot', 'SecureScoreControls', 'SecureScoreControlsSnapshot', + * 'RegulatoryComplianceAssessment', 'RegulatoryComplianceAssessmentSnapshot' + * @readonly + * @enum {string} + */ +export type EventSource = 'Assessments' | 'SubAssessments' | 'Alerts' | 'SecureScores' | 'SecureScoresSnapshot' | 'SecureScoreControls' | 'SecureScoreControlsSnapshot' | 'RegulatoryComplianceAssessment' | 'RegulatoryComplianceAssessmentSnapshot'; + +/** + * Defines values for PropertyType. + * Possible values include: 'String', 'Integer', 'Number', 'Boolean' + * @readonly + * @enum {string} + */ +export type PropertyType = 'String' | 'Integer' | 'Number' | 'Boolean'; + +/** + * Defines values for Operator. + * Possible values include: 'Equals', 'GreaterThan', 'GreaterThanOrEqualTo', 'LesserThan', + * 'LesserThanOrEqualTo', 'NotEquals', 'Contains', 'StartsWith', 'EndsWith' + * @readonly + * @enum {string} + */ +export type Operator = 'Equals' | 'GreaterThan' | 'GreaterThanOrEqualTo' | 'LesserThan' | 'LesserThanOrEqualTo' | 'NotEquals' | 'Contains' | 'StartsWith' | 'EndsWith'; + +/** + * Defines values for RuleState. + * Possible values include: 'Enabled', 'Disabled', 'Expired' + * @readonly + * @enum {string} + */ +export type RuleState = 'Enabled' | 'Disabled' | 'Expired'; + +/** + * Defines values for Categories. + * Possible values include: 'Compute', 'Networking', 'Data', 'IdentityAndAccess', 'IoT' + * @readonly + * @enum {string} + */ +export type Categories = 'Compute' | 'Networking' | 'Data' | 'IdentityAndAccess' | 'IoT'; + +/** + * Defines values for UserImpact. + * Possible values include: 'Low', 'Moderate', 'High' + * @readonly + * @enum {string} + */ +export type UserImpact = 'Low' | 'Moderate' | 'High'; + +/** + * Defines values for ImplementationEffort. + * Possible values include: 'Low', 'Moderate', 'High' + * @readonly + * @enum {string} + */ +export type ImplementationEffort = 'Low' | 'Moderate' | 'High'; + +/** + * Defines values for Threats. + * Possible values include: 'accountBreach', 'dataExfiltration', 'dataSpillage', + * 'maliciousInsider', 'elevationOfPrivilege', 'threatResistance', 'missingCoverage', + * 'denialOfService' + * @readonly + * @enum {string} + */ +export type Threats = 'accountBreach' | 'dataExfiltration' | 'dataSpillage' | 'maliciousInsider' | 'elevationOfPrivilege' | 'threatResistance' | 'missingCoverage' | 'denialOfService'; + +/** + * Defines values for AssessmentType. + * Possible values include: 'BuiltIn', 'CustomPolicy', 'CustomerManaged', 'VerifiedPartner' + * @readonly + * @enum {string} + */ +export type AssessmentType = 'BuiltIn' | 'CustomPolicy' | 'CustomerManaged' | 'VerifiedPartner'; + +/** + * Defines values for AssessmentStatusCode. + * Possible values include: 'Healthy', 'Unhealthy', 'NotApplicable' + * @readonly + * @enum {string} + */ +export type AssessmentStatusCode = 'Healthy' | 'Unhealthy' | 'NotApplicable'; + +/** + * Defines values for Direction. + * Possible values include: 'Inbound', 'Outbound' + * @readonly + * @enum {string} + */ +export type Direction = 'Inbound' | 'Outbound'; + +/** + * Defines values for TransportProtocol. + * Possible values include: 'TCP', 'UDP' + * @readonly + * @enum {string} + */ +export type TransportProtocol = 'TCP' | 'UDP'; + +/** + * Defines values for Protocol. + * Possible values include: 'TCP', 'UDP', 'All' + * @readonly + * @enum {string} + */ +export type Protocol = 'TCP' | 'UDP' | '*'; + +/** + * Defines values for Status. + * Possible values include: 'Revoked', 'Initiated' + * @readonly + * @enum {string} + */ +export type Status = 'Revoked' | 'Initiated'; + +/** + * Defines values for StatusReason. + * Possible values include: 'Expired', 'UserRequested', 'NewerRequestInitiated' + * @readonly + * @enum {string} + */ +export type StatusReason = 'Expired' | 'UserRequested' | 'NewerRequestInitiated'; + +/** + * Defines values for SecurityFamily. + * Possible values include: 'Waf', 'Ngfw', 'SaasWaf', 'Va' + * @readonly + * @enum {string} + */ +export type SecurityFamily = 'Waf' | 'Ngfw' | 'SaasWaf' | 'Va'; + +/** + * Defines values for AadConnectivityState. + * Possible values include: 'Discovered', 'NotLicensed', 'Connected' + * @readonly + * @enum {string} + */ +export type AadConnectivityState = 'Discovered' | 'NotLicensed' | 'Connected'; + +/** + * Defines values for ExternalSecuritySolutionKind. + * Possible values include: 'CEF', 'ATA', 'AAD' + * @readonly + * @enum {string} + */ +export type ExternalSecuritySolutionKind = 'CEF' | 'ATA' | 'AAD'; + +/** + * Defines values for ControlType. + * Possible values include: 'BuiltIn', 'Custom' + * @readonly + * @enum {string} + */ +export type ControlType = 'BuiltIn' | 'Custom'; + +/** + * Defines values for ProvisioningState. + * Possible values include: 'Succeeded', 'Failed', 'Updating' + * @readonly + * @enum {string} + */ +export type ProvisioningState = 'Succeeded' | 'Failed' | 'Updating'; + +/** + * Defines values for HybridComputeProvisioningState. + * Possible values include: 'Valid', 'Invalid', 'Expired' + * @readonly + * @enum {string} + */ +export type HybridComputeProvisioningState = 'Valid' | 'Invalid' | 'Expired'; + +/** + * Defines values for AuthenticationProvisioningState. + * Possible values include: 'Valid', 'Invalid', 'Expired', 'IncorrectPolicy' + * @readonly + * @enum {string} + */ +export type AuthenticationProvisioningState = 'Valid' | 'Invalid' | 'Expired' | 'IncorrectPolicy'; + +/** + * Defines values for PermissionProperty. + * Possible values include: 'AWS::AWSSecurityHubReadOnlyAccess', 'AWS::SecurityAudit', + * 'AWS::AmazonSSMAutomationRole', 'GCP::Security Center Admin Viewer' + * @readonly + * @enum {string} + */ +export type PermissionProperty = 'AWS::AWSSecurityHubReadOnlyAccess' | 'AWS::SecurityAudit' | 'AWS::AmazonSSMAutomationRole' | 'GCP::Security Center Admin Viewer'; + +/** + * Defines values for ScanTriggerType. + * Possible values include: 'OnDemand', 'Recurring' + * @readonly + * @enum {string} + */ +export type ScanTriggerType = 'OnDemand' | 'Recurring'; + +/** + * Defines values for ScanState. + * Possible values include: 'Failed', 'FailedToRun', 'InProgress', 'Passed' + * @readonly + * @enum {string} + */ +export type ScanState = 'Failed' | 'FailedToRun' | 'InProgress' | 'Passed'; + +/** + * Defines values for RuleStatus. + * Possible values include: 'NonFinding', 'Finding', 'InternalError' + * @readonly + * @enum {string} + */ +export type RuleStatus = 'NonFinding' | 'Finding' | 'InternalError'; + +/** + * Defines values for RuleSeverity. + * Possible values include: 'High', 'Medium', 'Low', 'Informational', 'Obsolete' + * @readonly + * @enum {string} + */ +export type RuleSeverity = 'High' | 'Medium' | 'Low' | 'Informational' | 'Obsolete'; + +/** + * Defines values for RuleType. + * Possible values include: 'Binary', 'BaselineExpected', 'PositiveList', 'NegativeList' + * @readonly + * @enum {string} + */ +export type RuleType = 'Binary' | 'BaselineExpected' | 'PositiveList' | 'NegativeList'; + +/** + * Defines values for OnboardingKind. + * Possible values include: 'Default', 'MigratedToAzure', 'Evaluation', 'Purchased' + * @readonly + * @enum {string} + */ +export type OnboardingKind = 'Default' | 'MigratedToAzure' | 'Evaluation' | 'Purchased'; + +/** + * Defines values for VersionKind. + * Possible values include: 'Latest', 'Previous', 'Preview' + * @readonly + * @enum {string} + */ +export type VersionKind = 'Latest' | 'Previous' | 'Preview'; + +/** + * Defines values for SensorStatus. + * Possible values include: 'Ok', 'Disconnected', 'Unavailable' + * @readonly + * @enum {string} + */ +export type SensorStatus = 'Ok' | 'Disconnected' | 'Unavailable'; + +/** + * Defines values for TiStatus. + * Possible values include: 'Ok', 'Failed', 'InProgress', 'UpdateAvailable' + * @readonly + * @enum {string} + */ +export type TiStatus = 'Ok' | 'Failed' | 'InProgress' | 'UpdateAvailable'; + +/** + * Defines values for SensorType. + * Possible values include: 'Ot', 'Enterprise' + * @readonly + * @enum {string} + */ +export type SensorType = 'Ot' | 'Enterprise'; + +/** + * Defines values for MacSignificance. + * Possible values include: 'Primary', 'Secondary' + * @readonly + * @enum {string} + */ +export type MacSignificance = 'Primary' | 'Secondary'; + +/** + * Defines values for RelationToIpStatus. + * Possible values include: 'Guess', 'Certain' + * @readonly + * @enum {string} + */ +export type RelationToIpStatus = 'Guess' | 'Certain'; + +/** + * Defines values for ManagementState. + * Possible values include: 'Managed', 'Unmanaged' + * @readonly + * @enum {string} + */ +export type ManagementState = 'Managed' | 'Unmanaged'; + +/** + * Defines values for AuthorizationState. + * Possible values include: 'Authorized', 'Unauthorized' + * @readonly + * @enum {string} + */ +export type AuthorizationState = 'Authorized' | 'Unauthorized'; + +/** + * Defines values for DeviceCriticality. + * Possible values include: 'Important', 'Standard' + * @readonly + * @enum {string} + */ +export type DeviceCriticality = 'Important' | 'Standard'; + +/** + * Defines values for PurdueLevel. + * Possible values include: 'ProcessControl', 'Supervisory', 'Enterprise' + * @readonly + * @enum {string} + */ +export type PurdueLevel = 'ProcessControl' | 'Supervisory' | 'Enterprise'; + +/** + * Defines values for ProgrammingState. + * Possible values include: 'ProgrammingDevice', 'NotProgrammingDevice' + * @readonly + * @enum {string} + */ +export type ProgrammingState = 'ProgrammingDevice' | 'NotProgrammingDevice'; + +/** + * Defines values for ScanningFunctionality. + * Possible values include: 'ScannerDevice', 'NotScannerDevice' + * @readonly + * @enum {string} + */ +export type ScanningFunctionality = 'ScannerDevice' | 'NotScannerDevice'; + +/** + * Defines values for DeviceStatus. + * Possible values include: 'Active', 'Removed' + * @readonly + * @enum {string} + */ +export type DeviceStatus = 'Active' | 'Removed'; + +/** + * Defines values for AlertSeverity. + * Possible values include: 'Informational', 'Low', 'Medium', 'High' + * @readonly + * @enum {string} + */ +export type AlertSeverity = 'Informational' | 'Low' | 'Medium' | 'High'; + +/** + * Defines values for AlertIntent. + * Possible values include: 'Unknown', 'PreAttack', 'InitialAccess', 'Persistence', + * 'PrivilegeEscalation', 'DefenseEvasion', 'CredentialAccess', 'Discovery', 'LateralMovement', + * 'Execution', 'Collection', 'Exfiltration', 'CommandAndControl', 'Impact', 'Probing', + * 'Exploitation' + * @readonly + * @enum {string} + */ +export type AlertIntent = 'Unknown' | 'PreAttack' | 'InitialAccess' | 'Persistence' | 'PrivilegeEscalation' | 'DefenseEvasion' | 'CredentialAccess' | 'Discovery' | 'LateralMovement' | 'Execution' | 'Collection' | 'Exfiltration' | 'CommandAndControl' | 'Impact' | 'Probing' | 'Exploitation'; + +/** + * Defines values for RecommendationSeverity. + * Possible values include: 'Unknown', 'NotApplicable', 'Healthy', 'OffByPolicy', 'Low', 'Medium', + * 'High' + * @readonly + * @enum {string} + */ +export type RecommendationSeverity = 'Unknown' | 'NotApplicable' | 'Healthy' | 'OffByPolicy' | 'Low' | 'Medium' | 'High'; + +/** + * Defines values for Intent. + * Possible values include: 'Unknown', 'PreAttack', 'InitialAccess', 'Persistence', + * 'PrivilegeEscalation', 'DefenseEvasion', 'CredentialAccess', 'Discovery', 'LateralMovement', + * 'Execution', 'Collection', 'Exfiltration', 'CommandAndControl', 'Impact', 'Probing', + * 'Exploitation' + * @readonly + * @enum {string} + */ +export type Intent = 'Unknown' | 'PreAttack' | 'InitialAccess' | 'Persistence' | 'PrivilegeEscalation' | 'DefenseEvasion' | 'CredentialAccess' | 'Discovery' | 'LateralMovement' | 'Execution' | 'Collection' | 'Exfiltration' | 'CommandAndControl' | 'Impact' | 'Probing' | 'Exploitation'; + +/** + * Defines values for AlertStatus. + * Possible values include: 'Active', 'Resolved', 'Dismissed' + * @readonly + * @enum {string} + */ +export type AlertStatus = 'Active' | 'Resolved' | 'Dismissed'; + +/** + * Defines values for BundleType. + * Possible values include: 'AppServices', 'DNS', 'KeyVaults', 'KubernetesService', + * 'ResourceManager', 'SqlServers', 'StorageAccounts', 'VirtualMachines' + * @readonly + * @enum {string} + */ +export type BundleType = 'AppServices' | 'DNS' | 'KeyVaults' | 'KubernetesService' | 'ResourceManager' | 'SqlServers' | 'StorageAccounts' | 'VirtualMachines'; + +/** + * Defines values for EndOfSupportStatus. + * Possible values include: 'None', 'noLongerSupported', 'versionNoLongerSupported', + * 'upcomingNoLongerSupported', 'upcomingVersionNoLongerSupported' + * @readonly + * @enum {string} + */ +export type EndOfSupportStatus = 'None' | 'noLongerSupported' | 'versionNoLongerSupported' | 'upcomingNoLongerSupported' | 'upcomingVersionNoLongerSupported'; + +/** + * Defines values for ExpandEnum. + * Possible values include: 'links', 'metadata' + * @readonly + * @enum {string} + */ +export type ExpandEnum = 'links' | 'metadata'; + +/** + * Defines values for ConnectionType. + * Possible values include: 'Internal', 'External' + * @readonly + * @enum {string} + */ +export type ConnectionType = 'Internal' | 'External'; + +/** + * Defines values for ExpandControlsEnum. + * Possible values include: 'definition' + * @readonly + * @enum {string} + */ +export type ExpandControlsEnum = 'definition'; + +/** + * Defines values for ProvisioningState1. + * Possible values include: 'Succeeded', 'Failed', 'Canceled', 'Provisioning', 'Deprovisioning' + * @readonly + * @enum {string} + */ +export type ProvisioningState1 = 'Succeeded' | 'Failed' | 'Canceled' | 'Provisioning' | 'Deprovisioning'; + +/** + * Defines values for Exe. + * Possible values include: 'Audit', 'Enforce', 'None' + * @readonly + * @enum {string} + */ +export type Exe = 'Audit' | 'Enforce' | 'None'; + +/** + * Defines values for Msi. + * Possible values include: 'Audit', 'Enforce', 'None' + * @readonly + * @enum {string} + */ +export type Msi = 'Audit' | 'Enforce' | 'None'; + +/** + * Defines values for Script. + * Possible values include: 'Audit', 'Enforce', 'None' + * @readonly + * @enum {string} + */ +export type Script = 'Audit' | 'Enforce' | 'None'; + +/** + * Defines values for Executable. + * Possible values include: 'Audit', 'Enforce', 'None' + * @readonly + * @enum {string} + */ +export type Executable = 'Audit' | 'Enforce' | 'None'; + +/** + * Defines values for Issue. + * Possible values include: 'ViolationsAudited', 'ViolationsBlocked', + * 'MsiAndScriptViolationsAudited', 'MsiAndScriptViolationsBlocked', 'ExecutableViolationsAudited', + * 'RulesViolatedManually' + * @readonly + * @enum {string} + */ +export type Issue = 'ViolationsAudited' | 'ViolationsBlocked' | 'MsiAndScriptViolationsAudited' | 'MsiAndScriptViolationsBlocked' | 'ExecutableViolationsAudited' | 'RulesViolatedManually'; + +/** + * Defines values for ConfigurationStatus. + * Possible values include: 'Configured', 'NotConfigured', 'InProgress', 'Failed', 'NoStatus' + * @readonly + * @enum {string} + */ +export type ConfigurationStatus = 'Configured' | 'NotConfigured' | 'InProgress' | 'Failed' | 'NoStatus'; + +/** + * Defines values for RecommendationAction. + * Possible values include: 'Recommended', 'Add', 'Remove' + * @readonly + * @enum {string} + */ +export type RecommendationAction = 'Recommended' | 'Add' | 'Remove'; + +/** + * Defines values for EnforcementSupport. + * Possible values include: 'Supported', 'NotSupported', 'Unknown' + * @readonly + * @enum {string} + */ +export type EnforcementSupport = 'Supported' | 'NotSupported' | 'Unknown'; + +/** + * Defines values for RecommendationAction1. + * Possible values include: 'Recommended', 'Add', 'Remove' + * @readonly + * @enum {string} + */ +export type RecommendationAction1 = 'Recommended' | 'Add' | 'Remove'; + +/** + * Defines values for Action. + * Possible values include: 'Recommended', 'Add', 'Remove' + * @readonly + * @enum {string} + */ +export type Action = 'Recommended' | 'Add' | 'Remove'; + +/** + * Defines values for Type. + * Possible values include: 'File', 'FileHash', 'PublisherSignature', 'ProductSignature', + * 'BinarySignature', 'VersionAndAboveSignature' + * @readonly + * @enum {string} + */ +export type Type = 'File' | 'FileHash' | 'PublisherSignature' | 'ProductSignature' | 'BinarySignature' | 'VersionAndAboveSignature'; + +/** + * Defines values for FileType. + * Possible values include: 'Exe', 'Dll', 'Msi', 'Script', 'Executable', 'Unknown' + * @readonly + * @enum {string} + */ +export type FileType = 'Exe' | 'Dll' | 'Msi' | 'Script' | 'Executable' | 'Unknown'; + +/** + * Defines values for ConfigurationStatus1. + * Possible values include: 'Configured', 'NotConfigured', 'InProgress', 'Failed', 'NoStatus' + * @readonly + * @enum {string} + */ +export type ConfigurationStatus1 = 'Configured' | 'NotConfigured' | 'InProgress' | 'Failed' | 'NoStatus'; + +/** + * Defines values for EnforcementMode. + * Possible values include: 'Audit', 'Enforce', 'None' + * @readonly + * @enum {string} + */ +export type EnforcementMode = 'Audit' | 'Enforce' | 'None'; + +/** + * Defines values for ConfigurationStatus2. + * Possible values include: 'Configured', 'NotConfigured', 'InProgress', 'Failed', 'NoStatus' + * @readonly + * @enum {string} + */ +export type ConfigurationStatus2 = 'Configured' | 'NotConfigured' | 'InProgress' | 'Failed' | 'NoStatus'; + +/** + * Defines values for RecommendationStatus. + * Possible values include: 'Recommended', 'NotRecommended', 'NotAvailable', 'NoStatus' + * @readonly + * @enum {string} + */ +export type RecommendationStatus = 'Recommended' | 'NotRecommended' | 'NotAvailable' | 'NoStatus'; + +/** + * Defines values for SourceSystem. + * Possible values include: 'Azure_AppLocker', 'Azure_AuditD', 'NonAzure_AppLocker', + * 'NonAzure_AuditD', 'None' + * @readonly + * @enum {string} + */ +export type SourceSystem = 'Azure_AppLocker' | 'Azure_AuditD' | 'NonAzure_AppLocker' | 'NonAzure_AuditD' | 'None'; + +/** + * Defines values for TaskUpdateActionType. + * Possible values include: 'Activate', 'Dismiss', 'Start', 'Resolve', 'Close' + * @readonly + * @enum {string} + */ +export type TaskUpdateActionType = 'Activate' | 'Dismiss' | 'Start' | 'Resolve' | 'Close'; + +/** + * Defines values for TaskUpdateActionType1. + * Possible values include: 'Activate', 'Dismiss', 'Start', 'Resolve', 'Close' + * @readonly + * @enum {string} + */ +export type TaskUpdateActionType1 = 'Activate' | 'Dismiss' | 'Start' | 'Resolve' | 'Close'; + +/** + * Defines values for InformationProtectionPolicyName. + * Possible values include: 'effective', 'custom' + * @readonly + * @enum {string} + */ +export type InformationProtectionPolicyName = 'effective' | 'custom'; + +/** + * Defines values for InformationProtectionPolicyName1. + * Possible values include: 'effective', 'custom' + * @readonly + * @enum {string} + */ +export type InformationProtectionPolicyName1 = 'effective' | 'custom'; + +/** + * Defines values for SettingName. + * Possible values include: 'MCAS', 'WDATP', 'Sentinel' + * @readonly + * @enum {string} + */ +export type SettingName = 'MCAS' | 'WDATP' | 'Sentinel'; + +/** + * Defines values for SettingName1. + * Possible values include: 'MCAS', 'WDATP', 'Sentinel' + * @readonly + * @enum {string} + */ +export type SettingName1 = 'MCAS' | 'WDATP' | 'Sentinel'; + +/** + * Contains response data for the list operation. + */ +export type ComplianceResultsListResponse = ComplianceResultList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ComplianceResultList; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type ComplianceResultsGetResponse = ComplianceResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ComplianceResult; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type ComplianceResultsListNextResponse = ComplianceResultList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ComplianceResultList; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type PricingsListResponse = PricingList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PricingList; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type PricingsGetResponse = Pricing & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Pricing; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type PricingsUpdateResponse = Pricing & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Pricing; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type AdvancedThreatProtectionGetResponse = AdvancedThreatProtectionSetting & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: AdvancedThreatProtectionSetting; + }; +}; + +/** + * Contains response data for the create operation. + */ +export type AdvancedThreatProtectionCreateResponse = AdvancedThreatProtectionSetting & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: AdvancedThreatProtectionSetting; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type DeviceSecurityGroupsListResponse = DeviceSecurityGroupList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: DeviceSecurityGroupList; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type DeviceSecurityGroupsGetResponse = DeviceSecurityGroup & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: DeviceSecurityGroup; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. */ -export type PricingTier = 'Free' | 'Standard'; +export type DeviceSecurityGroupsCreateOrUpdateResponse = DeviceSecurityGroup & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: DeviceSecurityGroup; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type DeviceSecurityGroupsListNextResponse = DeviceSecurityGroupList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: DeviceSecurityGroupList; + }; +}; + +/** + * Contains response data for the listBySubscription operation. + */ +export type IotSecuritySolutionListBySubscriptionResponse = IoTSecuritySolutionsList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: IoTSecuritySolutionsList; + }; +}; + +/** + * Contains response data for the listByResourceGroup operation. + */ +export type IotSecuritySolutionListByResourceGroupResponse = IoTSecuritySolutionsList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: IoTSecuritySolutionsList; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type IotSecuritySolutionGetResponse = IoTSecuritySolutionModel & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: IoTSecuritySolutionModel; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type IotSecuritySolutionCreateOrUpdateResponse = IoTSecuritySolutionModel & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: IoTSecuritySolutionModel; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type IotSecuritySolutionUpdateResponse = IoTSecuritySolutionModel & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: IoTSecuritySolutionModel; + }; +}; + +/** + * Contains response data for the listBySubscriptionNext operation. + */ +export type IotSecuritySolutionListBySubscriptionNextResponse = IoTSecuritySolutionsList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: IoTSecuritySolutionsList; + }; +}; + +/** + * Contains response data for the listByResourceGroupNext operation. + */ +export type IotSecuritySolutionListByResourceGroupNextResponse = IoTSecuritySolutionsList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: IoTSecuritySolutionsList; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type IotSecuritySolutionAnalyticsListResponse = IoTSecuritySolutionAnalyticsModelList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: IoTSecuritySolutionAnalyticsModelList; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type IotSecuritySolutionAnalyticsGetResponse = IoTSecuritySolutionAnalyticsModel & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: IoTSecuritySolutionAnalyticsModel; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type IotSecuritySolutionsAnalyticsAggregatedAlertListResponse = IoTSecurityAggregatedAlertList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: IoTSecurityAggregatedAlertList; + }; +}; /** - * Defines values for ReportedSeverity. - * Possible values include: 'Informational', 'Low', 'Medium', 'High' - * @readonly - * @enum {string} + * Contains response data for the get operation. */ -export type ReportedSeverity = 'Informational' | 'Low' | 'Medium' | 'High'; +export type IotSecuritySolutionsAnalyticsAggregatedAlertGetResponse = IoTSecurityAggregatedAlert & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; -/** - * Defines values for ValueType. - * Possible values include: 'IpCidr', 'String' - * @readonly - * @enum {string} - */ -export type ValueType = 'IpCidr' | 'String'; + /** + * The response body as parsed JSON or XML + */ + parsedBody: IoTSecurityAggregatedAlert; + }; +}; /** - * Defines values for SecuritySolutionStatus. - * Possible values include: 'Enabled', 'Disabled' - * @readonly - * @enum {string} + * Contains response data for the listNext operation. */ -export type SecuritySolutionStatus = 'Enabled' | 'Disabled'; +export type IotSecuritySolutionsAnalyticsAggregatedAlertListNextResponse = IoTSecurityAggregatedAlertList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; -/** - * Defines values for ExportData. - * Possible values include: 'RawEvents' - * @readonly - * @enum {string} - */ -export type ExportData = 'RawEvents'; + /** + * The response body as parsed JSON or XML + */ + parsedBody: IoTSecurityAggregatedAlertList; + }; +}; /** - * Defines values for DataSource. - * Possible values include: 'TwinData' - * @readonly - * @enum {string} + * Contains response data for the get operation. */ -export type DataSource = 'TwinData'; +export type IotSecuritySolutionsAnalyticsRecommendationGetResponse = IoTSecurityAggregatedRecommendation & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; -/** - * Defines values for RecommendationType. - * Possible values include: 'IoT_ACRAuthentication', 'IoT_AgentSendsUnutilizedMessages', - * 'IoT_Baseline', 'IoT_EdgeHubMemOptimize', 'IoT_EdgeLoggingOptions', - * 'IoT_InconsistentModuleSettings', 'IoT_InstallAgent', 'IoT_IPFilter_DenyAll', - * 'IoT_IPFilter_PermissiveRule', 'IoT_OpenPorts', 'IoT_PermissiveFirewallPolicy', - * 'IoT_PermissiveInputFirewallRules', 'IoT_PermissiveOutputFirewallRules', - * 'IoT_PrivilegedDockerOptions', 'IoT_SharedCredentials', 'IoT_VulnerableTLSCipherSuite' - * @readonly - * @enum {string} - */ -export type RecommendationType = 'IoT_ACRAuthentication' | 'IoT_AgentSendsUnutilizedMessages' | 'IoT_Baseline' | 'IoT_EdgeHubMemOptimize' | 'IoT_EdgeLoggingOptions' | 'IoT_InconsistentModuleSettings' | 'IoT_InstallAgent' | 'IoT_IPFilter_DenyAll' | 'IoT_IPFilter_PermissiveRule' | 'IoT_OpenPorts' | 'IoT_PermissiveFirewallPolicy' | 'IoT_PermissiveInputFirewallRules' | 'IoT_PermissiveOutputFirewallRules' | 'IoT_PrivilegedDockerOptions' | 'IoT_SharedCredentials' | 'IoT_VulnerableTLSCipherSuite'; + /** + * The response body as parsed JSON or XML + */ + parsedBody: IoTSecurityAggregatedRecommendation; + }; +}; /** - * Defines values for RecommendationConfigStatus. - * Possible values include: 'Disabled', 'Enabled' - * @readonly - * @enum {string} + * Contains response data for the list operation. */ -export type RecommendationConfigStatus = 'Disabled' | 'Enabled'; +export type IotSecuritySolutionsAnalyticsRecommendationListResponse = IoTSecurityAggregatedRecommendationList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; -/** - * Defines values for UnmaskedIpLoggingStatus. - * Possible values include: 'Disabled', 'Enabled' - * @readonly - * @enum {string} - */ -export type UnmaskedIpLoggingStatus = 'Disabled' | 'Enabled'; + /** + * The response body as parsed JSON or XML + */ + parsedBody: IoTSecurityAggregatedRecommendationList; + }; +}; /** - * Defines values for AutoProvision. - * Possible values include: 'On', 'Off' - * @readonly - * @enum {string} + * Contains response data for the listNext operation. */ -export type AutoProvision = 'On' | 'Off'; +export type IotSecuritySolutionsAnalyticsRecommendationListNextResponse = IoTSecurityAggregatedRecommendationList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; -/** - * Defines values for Rank. - * Possible values include: 'None', 'Low', 'Medium', 'High', 'Critical' - * @readonly - * @enum {string} - */ -export type Rank = 'None' | 'Low' | 'Medium' | 'High' | 'Critical'; + /** + * The response body as parsed JSON or XML + */ + parsedBody: IoTSecurityAggregatedRecommendationList; + }; +}; /** - * Defines values for AlertNotifications. - * Possible values include: 'On', 'Off' - * @readonly - * @enum {string} + * Contains response data for the list operation. */ -export type AlertNotifications = 'On' | 'Off'; +export type LocationsListResponse = AscLocationList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; -/** - * Defines values for AlertsToAdmins. - * Possible values include: 'On', 'Off' - * @readonly - * @enum {string} - */ -export type AlertsToAdmins = 'On' | 'Off'; + /** + * The response body as parsed JSON or XML + */ + parsedBody: AscLocationList; + }; +}; /** - * Defines values for State. - * Possible values include: 'Passed', 'Failed', 'Skipped', 'Unsupported' - * @readonly - * @enum {string} + * Contains response data for the get operation. */ -export type State = 'Passed' | 'Failed' | 'Skipped' | 'Unsupported'; +export type LocationsGetResponse = AscLocation & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; -/** - * Defines values for SubAssessmentStatusCode. - * Possible values include: 'Healthy', 'Unhealthy', 'NotApplicable' - * @readonly - * @enum {string} - */ -export type SubAssessmentStatusCode = 'Healthy' | 'Unhealthy' | 'NotApplicable'; + /** + * The response body as parsed JSON or XML + */ + parsedBody: AscLocation; + }; +}; /** - * Defines values for Severity. - * Possible values include: 'Low', 'Medium', 'High' - * @readonly - * @enum {string} + * Contains response data for the listNext operation. */ -export type Severity = 'Low' | 'Medium' | 'High'; +export type LocationsListNextResponse = AscLocationList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; -/** - * Defines values for EventSource. - * Possible values include: 'Assessments', 'Alerts' - * @readonly - * @enum {string} - */ -export type EventSource = 'Assessments' | 'Alerts'; + /** + * The response body as parsed JSON or XML + */ + parsedBody: AscLocationList; + }; +}; /** - * Defines values for PropertyType. - * Possible values include: 'String', 'Integer', 'Number', 'Boolean' - * @readonly - * @enum {string} + * Contains response data for the list operation. */ -export type PropertyType = 'String' | 'Integer' | 'Number' | 'Boolean'; +export type OperationsListResponse = OperationList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; -/** - * Defines values for Operator. - * Possible values include: 'Equals', 'GreaterThan', 'GreaterThanOrEqualTo', 'LesserThan', - * 'LesserThanOrEqualTo', 'NotEquals', 'Contains', 'StartsWith', 'EndsWith' - * @readonly - * @enum {string} - */ -export type Operator = 'Equals' | 'GreaterThan' | 'GreaterThanOrEqualTo' | 'LesserThan' | 'LesserThanOrEqualTo' | 'NotEquals' | 'Contains' | 'StartsWith' | 'EndsWith'; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationList; + }; +}; /** - * Defines values for RuleState. - * Possible values include: 'Enabled', 'Disabled', 'Expired' - * @readonly - * @enum {string} + * Contains response data for the listNext operation. */ -export type RuleState = 'Enabled' | 'Disabled' | 'Expired'; +export type OperationsListNextResponse = OperationList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; -/** - * Defines values for Category. - * Possible values include: 'Compute', 'Networking', 'Data', 'IdentityAndAccess', 'IoT' - * @readonly - * @enum {string} - */ -export type Category = 'Compute' | 'Networking' | 'Data' | 'IdentityAndAccess' | 'IoT'; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationList; + }; +}; /** - * Defines values for UserImpact. - * Possible values include: 'Low', 'Moderate', 'High' - * @readonly - * @enum {string} + * Contains response data for the list operation. */ -export type UserImpact = 'Low' | 'Moderate' | 'High'; +export type TasksListResponse = SecurityTaskList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; -/** - * Defines values for ImplementationEffort. - * Possible values include: 'Low', 'Moderate', 'High' - * @readonly - * @enum {string} - */ -export type ImplementationEffort = 'Low' | 'Moderate' | 'High'; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SecurityTaskList; + }; +}; /** - * Defines values for Threats. - * Possible values include: 'accountBreach', 'dataExfiltration', 'dataSpillage', - * 'maliciousInsider', 'elevationOfPrivilege', 'threatResistance', 'missingCoverage', - * 'denialOfService' - * @readonly - * @enum {string} + * Contains response data for the listByHomeRegion operation. */ -export type Threats = 'accountBreach' | 'dataExfiltration' | 'dataSpillage' | 'maliciousInsider' | 'elevationOfPrivilege' | 'threatResistance' | 'missingCoverage' | 'denialOfService'; +export type TasksListByHomeRegionResponse = SecurityTaskList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; -/** - * Defines values for AssessmentType. - * Possible values include: 'BuiltIn', 'CustomPolicy', 'CustomerManaged', 'VerifiedPartner' - * @readonly - * @enum {string} - */ -export type AssessmentType = 'BuiltIn' | 'CustomPolicy' | 'CustomerManaged' | 'VerifiedPartner'; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SecurityTaskList; + }; +}; /** - * Defines values for AssessmentStatusCode. - * Possible values include: 'Healthy', 'Unhealthy', 'NotApplicable' - * @readonly - * @enum {string} + * Contains response data for the getSubscriptionLevelTask operation. */ -export type AssessmentStatusCode = 'Healthy' | 'Unhealthy' | 'NotApplicable'; +export type TasksGetSubscriptionLevelTaskResponse = SecurityTask & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; -/** - * Defines values for Direction. - * Possible values include: 'Inbound', 'Outbound' - * @readonly - * @enum {string} - */ -export type Direction = 'Inbound' | 'Outbound'; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SecurityTask; + }; +}; /** - * Defines values for TransportProtocol. - * Possible values include: 'TCP', 'UDP' - * @readonly - * @enum {string} + * Contains response data for the listByResourceGroup operation. */ -export type TransportProtocol = 'TCP' | 'UDP'; +export type TasksListByResourceGroupResponse = SecurityTaskList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; -/** - * Defines values for Protocol. - * Possible values include: 'TCP', 'UDP', 'All' - * @readonly - * @enum {string} - */ -export type Protocol = 'TCP' | 'UDP' | '*'; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SecurityTaskList; + }; +}; /** - * Defines values for Status. - * Possible values include: 'Revoked', 'Initiated' - * @readonly - * @enum {string} + * Contains response data for the getResourceGroupLevelTask operation. */ -export type Status = 'Revoked' | 'Initiated'; +export type TasksGetResourceGroupLevelTaskResponse = SecurityTask & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; -/** - * Defines values for StatusReason. - * Possible values include: 'Expired', 'UserRequested', 'NewerRequestInitiated' - * @readonly - * @enum {string} - */ -export type StatusReason = 'Expired' | 'UserRequested' | 'NewerRequestInitiated'; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SecurityTask; + }; +}; /** - * Defines values for SecurityFamily. - * Possible values include: 'Waf', 'Ngfw', 'SaasWaf', 'Va' - * @readonly - * @enum {string} + * Contains response data for the listNext operation. */ -export type SecurityFamily = 'Waf' | 'Ngfw' | 'SaasWaf' | 'Va'; +export type TasksListNextResponse = SecurityTaskList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: SecurityTaskList; + }; +}; /** - * Defines values for AadConnectivityState. - * Possible values include: 'Discovered', 'NotLicensed', 'Connected' - * @readonly - * @enum {string} + * Contains response data for the listByHomeRegionNext operation. */ -export type AadConnectivityState = 'Discovered' | 'NotLicensed' | 'Connected'; +export type TasksListByHomeRegionNextResponse = SecurityTaskList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: SecurityTaskList; + }; +}; /** - * Defines values for ExternalSecuritySolutionKind. - * Possible values include: 'CEF', 'ATA', 'AAD' - * @readonly - * @enum {string} + * Contains response data for the listByResourceGroupNext operation. */ -export type ExternalSecuritySolutionKind = 'CEF' | 'ATA' | 'AAD'; +export type TasksListByResourceGroupNextResponse = SecurityTaskList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: SecurityTaskList; + }; +}; /** - * Defines values for ControlType. - * Possible values include: 'BuiltIn', 'Custom' - * @readonly - * @enum {string} + * Contains response data for the list operation. */ -export type ControlType = 'BuiltIn' | 'Custom'; +export type AutoProvisioningSettingsListResponse = AutoProvisioningSettingList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: AutoProvisioningSettingList; + }; +}; /** - * Defines values for ExpandEnum. - * Possible values include: 'links', 'metadata' - * @readonly - * @enum {string} + * Contains response data for the get operation. */ -export type ExpandEnum = 'links' | 'metadata'; +export type AutoProvisioningSettingsGetResponse = AutoProvisioningSetting & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; -/** - * Defines values for ConnectionType. - * Possible values include: 'Internal', 'External' - * @readonly - * @enum {string} - */ -export type ConnectionType = 'Internal' | 'External'; + /** + * The response body as parsed JSON or XML + */ + parsedBody: AutoProvisioningSetting; + }; +}; /** - * Defines values for ExpandControlsEnum. - * Possible values include: 'definition' - * @readonly - * @enum {string} + * Contains response data for the create operation. */ -export type ExpandControlsEnum = 'definition'; +export type AutoProvisioningSettingsCreateResponse = AutoProvisioningSetting & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; -/** - * Defines values for ProvisioningState. - * Possible values include: 'Succeeded', 'Failed', 'Canceled', 'Provisioning', 'Deprovisioning' - * @readonly - * @enum {string} - */ -export type ProvisioningState = 'Succeeded' | 'Failed' | 'Canceled' | 'Provisioning' | 'Deprovisioning'; + /** + * The response body as parsed JSON or XML + */ + parsedBody: AutoProvisioningSetting; + }; +}; /** - * Defines values for Exe. - * Possible values include: 'Audit', 'Enforce', 'None' - * @readonly - * @enum {string} + * Contains response data for the listNext operation. */ -export type Exe = 'Audit' | 'Enforce' | 'None'; +export type AutoProvisioningSettingsListNextResponse = AutoProvisioningSettingList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; -/** - * Defines values for Msi. - * Possible values include: 'Audit', 'Enforce', 'None' - * @readonly - * @enum {string} - */ -export type Msi = 'Audit' | 'Enforce' | 'None'; + /** + * The response body as parsed JSON or XML + */ + parsedBody: AutoProvisioningSettingList; + }; +}; /** - * Defines values for Script. - * Possible values include: 'Audit', 'Enforce', 'None' - * @readonly - * @enum {string} + * Contains response data for the list operation. */ -export type Script = 'Audit' | 'Enforce' | 'None'; +export type CompliancesListResponse = ComplianceList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; -/** - * Defines values for Executable. - * Possible values include: 'Audit', 'Enforce', 'None' - * @readonly - * @enum {string} - */ -export type Executable = 'Audit' | 'Enforce' | 'None'; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ComplianceList; + }; +}; /** - * Defines values for Issue. - * Possible values include: 'ViolationsAudited', 'ViolationsBlocked', - * 'MsiAndScriptViolationsAudited', 'MsiAndScriptViolationsBlocked', 'ExecutableViolationsAudited', - * 'RulesViolatedManually' - * @readonly - * @enum {string} + * Contains response data for the get operation. */ -export type Issue = 'ViolationsAudited' | 'ViolationsBlocked' | 'MsiAndScriptViolationsAudited' | 'MsiAndScriptViolationsBlocked' | 'ExecutableViolationsAudited' | 'RulesViolatedManually'; +export type CompliancesGetResponse = Compliance & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; -/** - * Defines values for ConfigurationStatus. - * Possible values include: 'Configured', 'NotConfigured', 'InProgress', 'Failed', 'NoStatus' - * @readonly - * @enum {string} - */ -export type ConfigurationStatus = 'Configured' | 'NotConfigured' | 'InProgress' | 'Failed' | 'NoStatus'; + /** + * The response body as parsed JSON or XML + */ + parsedBody: Compliance; + }; +}; /** - * Defines values for RecommendationAction. - * Possible values include: 'Recommended', 'Add', 'Remove' - * @readonly - * @enum {string} + * Contains response data for the listNext operation. */ -export type RecommendationAction = 'Recommended' | 'Add' | 'Remove'; +export type CompliancesListNextResponse = ComplianceList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; -/** - * Defines values for EnforcementSupport. - * Possible values include: 'Supported', 'NotSupported', 'Unknown' - * @readonly - * @enum {string} - */ -export type EnforcementSupport = 'Supported' | 'NotSupported' | 'Unknown'; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ComplianceList; + }; +}; /** - * Defines values for RecommendationAction1. - * Possible values include: 'Recommended', 'Add', 'Remove' - * @readonly - * @enum {string} + * Contains response data for the get operation. */ -export type RecommendationAction1 = 'Recommended' | 'Add' | 'Remove'; +export type InformationProtectionPoliciesGetResponse = InformationProtectionPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: InformationProtectionPolicy; + }; +}; /** - * Defines values for Action. - * Possible values include: 'Recommended', 'Add', 'Remove' - * @readonly - * @enum {string} + * Contains response data for the createOrUpdate operation. */ -export type Action = 'Recommended' | 'Add' | 'Remove'; +export type InformationProtectionPoliciesCreateOrUpdateResponse = InformationProtectionPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: InformationProtectionPolicy; + }; +}; /** - * Defines values for Type. - * Possible values include: 'File', 'FileHash', 'PublisherSignature', 'ProductSignature', - * 'BinarySignature', 'VersionAndAboveSignature' - * @readonly - * @enum {string} + * Contains response data for the list operation. */ -export type Type = 'File' | 'FileHash' | 'PublisherSignature' | 'ProductSignature' | 'BinarySignature' | 'VersionAndAboveSignature'; +export type InformationProtectionPoliciesListResponse = InformationProtectionPolicyList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: InformationProtectionPolicyList; + }; +}; /** - * Defines values for FileType. - * Possible values include: 'Exe', 'Dll', 'Msi', 'Script', 'Executable', 'Unknown' - * @readonly - * @enum {string} + * Contains response data for the listNext operation. */ -export type FileType = 'Exe' | 'Dll' | 'Msi' | 'Script' | 'Executable' | 'Unknown'; +export type InformationProtectionPoliciesListNextResponse = InformationProtectionPolicyList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: InformationProtectionPolicyList; + }; +}; /** - * Defines values for ConfigurationStatus1. - * Possible values include: 'Configured', 'NotConfigured', 'InProgress', 'Failed', 'NoStatus' - * @readonly - * @enum {string} + * Contains response data for the list operation. */ -export type ConfigurationStatus1 = 'Configured' | 'NotConfigured' | 'InProgress' | 'Failed' | 'NoStatus'; +export type SecurityContactsListResponse = SecurityContactList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; -/** - * Defines values for EnforcementMode. - * Possible values include: 'Audit', 'Enforce', 'None' - * @readonly - * @enum {string} - */ -export type EnforcementMode = 'Audit' | 'Enforce' | 'None'; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SecurityContactList; + }; +}; /** - * Defines values for ConfigurationStatus2. - * Possible values include: 'Configured', 'NotConfigured', 'InProgress', 'Failed', 'NoStatus' - * @readonly - * @enum {string} + * Contains response data for the get operation. */ -export type ConfigurationStatus2 = 'Configured' | 'NotConfigured' | 'InProgress' | 'Failed' | 'NoStatus'; +export type SecurityContactsGetResponse = SecurityContact & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; -/** - * Defines values for RecommendationStatus. - * Possible values include: 'Recommended', 'NotRecommended', 'NotAvailable', 'NoStatus' - * @readonly - * @enum {string} - */ -export type RecommendationStatus = 'Recommended' | 'NotRecommended' | 'NotAvailable' | 'NoStatus'; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SecurityContact; + }; +}; /** - * Defines values for SourceSystem. - * Possible values include: 'Azure_AppLocker', 'Azure_AuditD', 'NonAzure_AppLocker', - * 'NonAzure_AuditD', 'None' - * @readonly - * @enum {string} + * Contains response data for the create operation. */ -export type SourceSystem = 'Azure_AppLocker' | 'Azure_AuditD' | 'NonAzure_AppLocker' | 'NonAzure_AuditD' | 'None'; +export type SecurityContactsCreateResponse = SecurityContact & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; -/** - * Defines values for SettingName. - * Possible values include: 'MCAS', 'WDATP' - * @readonly - * @enum {string} - */ -export type SettingName = 'MCAS' | 'WDATP'; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SecurityContact; + }; +}; /** - * Defines values for SettingName1. - * Possible values include: 'MCAS', 'WDATP' - * @readonly - * @enum {string} + * Contains response data for the update operation. */ -export type SettingName1 = 'MCAS' | 'WDATP'; +export type SecurityContactsUpdateResponse = SecurityContact & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; -/** - * Defines values for TaskUpdateActionType. - * Possible values include: 'Activate', 'Dismiss', 'Start', 'Resolve', 'Close' - * @readonly - * @enum {string} - */ -export type TaskUpdateActionType = 'Activate' | 'Dismiss' | 'Start' | 'Resolve' | 'Close'; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SecurityContact; + }; +}; /** - * Defines values for TaskUpdateActionType1. - * Possible values include: 'Activate', 'Dismiss', 'Start', 'Resolve', 'Close' - * @readonly - * @enum {string} + * Contains response data for the listNext operation. */ -export type TaskUpdateActionType1 = 'Activate' | 'Dismiss' | 'Start' | 'Resolve' | 'Close'; +export type SecurityContactsListNextResponse = SecurityContactList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: SecurityContactList; + }; +}; /** - * Defines values for InformationProtectionPolicyName. - * Possible values include: 'effective', 'custom' - * @readonly - * @enum {string} + * Contains response data for the list operation. */ -export type InformationProtectionPolicyName = 'effective' | 'custom'; +export type WorkspaceSettingsListResponse = WorkspaceSettingList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WorkspaceSettingList; + }; +}; /** - * Defines values for InformationProtectionPolicyName1. - * Possible values include: 'effective', 'custom' - * @readonly - * @enum {string} + * Contains response data for the get operation. */ -export type InformationProtectionPolicyName1 = 'effective' | 'custom'; +export type WorkspaceSettingsGetResponse = WorkspaceSetting & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WorkspaceSetting; + }; +}; /** - * Contains response data for the list operation. + * Contains response data for the create operation. */ -export type ComplianceResultsListResponse = ComplianceResultList & { +export type WorkspaceSettingsCreateResponse = WorkspaceSetting & { /** * The underlying HTTP response. */ @@ -5135,14 +8756,14 @@ export type ComplianceResultsListResponse = ComplianceResultList & { /** * The response body as parsed JSON or XML */ - parsedBody: ComplianceResultList; + parsedBody: WorkspaceSetting; }; }; /** - * Contains response data for the get operation. + * Contains response data for the update operation. */ -export type ComplianceResultsGetResponse = ComplianceResult & { +export type WorkspaceSettingsUpdateResponse = WorkspaceSetting & { /** * The underlying HTTP response. */ @@ -5155,14 +8776,14 @@ export type ComplianceResultsGetResponse = ComplianceResult & { /** * The response body as parsed JSON or XML */ - parsedBody: ComplianceResult; + parsedBody: WorkspaceSetting; }; }; /** * Contains response data for the listNext operation. */ -export type ComplianceResultsListNextResponse = ComplianceResultList & { +export type WorkspaceSettingsListNextResponse = WorkspaceSettingList & { /** * The underlying HTTP response. */ @@ -5175,14 +8796,14 @@ export type ComplianceResultsListNextResponse = ComplianceResultList & { /** * The response body as parsed JSON or XML */ - parsedBody: ComplianceResultList; + parsedBody: WorkspaceSettingList; }; }; /** * Contains response data for the list operation. */ -export type PricingsListResponse = PricingList & { +export type RegulatoryComplianceStandardsListResponse = RegulatoryComplianceStandardList & { /** * The underlying HTTP response. */ @@ -5195,14 +8816,14 @@ export type PricingsListResponse = PricingList & { /** * The response body as parsed JSON or XML */ - parsedBody: PricingList; + parsedBody: RegulatoryComplianceStandardList; }; }; /** * Contains response data for the get operation. */ -export type PricingsGetResponse = Pricing & { +export type RegulatoryComplianceStandardsGetResponse = RegulatoryComplianceStandard & { /** * The underlying HTTP response. */ @@ -5215,14 +8836,14 @@ export type PricingsGetResponse = Pricing & { /** * The response body as parsed JSON or XML */ - parsedBody: Pricing; + parsedBody: RegulatoryComplianceStandard; }; }; /** - * Contains response data for the update operation. + * Contains response data for the listNext operation. */ -export type PricingsUpdateResponse = Pricing & { +export type RegulatoryComplianceStandardsListNextResponse = RegulatoryComplianceStandardList & { /** * The underlying HTTP response. */ @@ -5235,14 +8856,14 @@ export type PricingsUpdateResponse = Pricing & { /** * The response body as parsed JSON or XML */ - parsedBody: Pricing; + parsedBody: RegulatoryComplianceStandardList; }; }; /** * Contains response data for the list operation. */ -export type AlertsListResponse = AlertList & { +export type RegulatoryComplianceControlsListResponse = RegulatoryComplianceControlList & { /** * The underlying HTTP response. */ @@ -5255,14 +8876,14 @@ export type AlertsListResponse = AlertList & { /** * The response body as parsed JSON or XML */ - parsedBody: AlertList; + parsedBody: RegulatoryComplianceControlList; }; }; /** - * Contains response data for the listByResourceGroup operation. + * Contains response data for the get operation. */ -export type AlertsListByResourceGroupResponse = AlertList & { +export type RegulatoryComplianceControlsGetResponse = RegulatoryComplianceControl & { /** * The underlying HTTP response. */ @@ -5275,14 +8896,14 @@ export type AlertsListByResourceGroupResponse = AlertList & { /** * The response body as parsed JSON or XML */ - parsedBody: AlertList; + parsedBody: RegulatoryComplianceControl; }; }; /** - * Contains response data for the listSubscriptionLevelAlertsByRegion operation. + * Contains response data for the listNext operation. */ -export type AlertsListSubscriptionLevelAlertsByRegionResponse = AlertList & { +export type RegulatoryComplianceControlsListNextResponse = RegulatoryComplianceControlList & { /** * The underlying HTTP response. */ @@ -5295,14 +8916,14 @@ export type AlertsListSubscriptionLevelAlertsByRegionResponse = AlertList & { /** * The response body as parsed JSON or XML */ - parsedBody: AlertList; + parsedBody: RegulatoryComplianceControlList; }; }; /** - * Contains response data for the listResourceGroupLevelAlertsByRegion operation. + * Contains response data for the list operation. */ -export type AlertsListResourceGroupLevelAlertsByRegionResponse = AlertList & { +export type RegulatoryComplianceAssessmentsListResponse = RegulatoryComplianceAssessmentList & { /** * The underlying HTTP response. */ @@ -5315,14 +8936,14 @@ export type AlertsListResourceGroupLevelAlertsByRegionResponse = AlertList & { /** * The response body as parsed JSON or XML */ - parsedBody: AlertList; + parsedBody: RegulatoryComplianceAssessmentList; }; }; /** - * Contains response data for the getSubscriptionLevelAlert operation. + * Contains response data for the get operation. */ -export type AlertsGetSubscriptionLevelAlertResponse = Alert & { +export type RegulatoryComplianceAssessmentsGetResponse = RegulatoryComplianceAssessment & { /** * The underlying HTTP response. */ @@ -5335,14 +8956,14 @@ export type AlertsGetSubscriptionLevelAlertResponse = Alert & { /** * The response body as parsed JSON or XML */ - parsedBody: Alert; + parsedBody: RegulatoryComplianceAssessment; }; }; /** - * Contains response data for the getResourceGroupLevelAlerts operation. + * Contains response data for the listNext operation. */ -export type AlertsGetResourceGroupLevelAlertsResponse = Alert & { +export type RegulatoryComplianceAssessmentsListNextResponse = RegulatoryComplianceAssessmentList & { /** * The underlying HTTP response. */ @@ -5355,14 +8976,34 @@ export type AlertsGetResourceGroupLevelAlertsResponse = Alert & { /** * The response body as parsed JSON or XML */ - parsedBody: Alert; + parsedBody: RegulatoryComplianceAssessmentList; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the listAll operation. */ -export type AlertsListNextResponse = AlertList & { +export type SubAssessmentsListAllResponse = SecuritySubAssessmentList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: SecuritySubAssessmentList; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type SubAssessmentsListResponse = SecuritySubAssessmentList & { /** * The underlying HTTP response. */ @@ -5375,14 +9016,14 @@ export type AlertsListNextResponse = AlertList & { /** * The response body as parsed JSON or XML */ - parsedBody: AlertList; + parsedBody: SecuritySubAssessmentList; }; }; /** - * Contains response data for the listByResourceGroupNext operation. + * Contains response data for the get operation. */ -export type AlertsListByResourceGroupNextResponse = AlertList & { +export type SubAssessmentsGetResponse = SecuritySubAssessment & { /** * The underlying HTTP response. */ @@ -5395,14 +9036,14 @@ export type AlertsListByResourceGroupNextResponse = AlertList & { /** * The response body as parsed JSON or XML */ - parsedBody: AlertList; + parsedBody: SecuritySubAssessment; }; }; /** - * Contains response data for the listSubscriptionLevelAlertsByRegionNext operation. + * Contains response data for the listAllNext operation. */ -export type AlertsListSubscriptionLevelAlertsByRegionNextResponse = AlertList & { +export type SubAssessmentsListAllNextResponse = SecuritySubAssessmentList & { /** * The underlying HTTP response. */ @@ -5415,14 +9056,14 @@ export type AlertsListSubscriptionLevelAlertsByRegionNextResponse = AlertList & /** * The response body as parsed JSON or XML */ - parsedBody: AlertList; + parsedBody: SecuritySubAssessmentList; }; }; /** - * Contains response data for the listResourceGroupLevelAlertsByRegionNext operation. + * Contains response data for the listNext operation. */ -export type AlertsListResourceGroupLevelAlertsByRegionNextResponse = AlertList & { +export type SubAssessmentsListNextResponse = SecuritySubAssessmentList & { /** * The underlying HTTP response. */ @@ -5435,14 +9076,14 @@ export type AlertsListResourceGroupLevelAlertsByRegionNextResponse = AlertList & /** * The response body as parsed JSON or XML */ - parsedBody: AlertList; + parsedBody: SecuritySubAssessmentList; }; }; /** * Contains response data for the list operation. */ -export type SettingsListResponse = SettingsList & { +export type AutomationsListResponse = AutomationList & { /** * The underlying HTTP response. */ @@ -5455,14 +9096,14 @@ export type SettingsListResponse = SettingsList & { /** * The response body as parsed JSON or XML */ - parsedBody: SettingsList; + parsedBody: AutomationList; }; }; /** - * Contains response data for the get operation. + * Contains response data for the listByResourceGroup operation. */ -export type SettingsGetResponse = SettingUnion & { +export type AutomationsListByResourceGroupResponse = AutomationList & { /** * The underlying HTTP response. */ @@ -5475,14 +9116,14 @@ export type SettingsGetResponse = SettingUnion & { /** * The response body as parsed JSON or XML */ - parsedBody: SettingUnion; + parsedBody: AutomationList; }; }; /** - * Contains response data for the update operation. + * Contains response data for the get operation. */ -export type SettingsUpdateResponse = SettingUnion & { +export type AutomationsGetResponse = Automation & { /** * The underlying HTTP response. */ @@ -5495,14 +9136,14 @@ export type SettingsUpdateResponse = SettingUnion & { /** * The response body as parsed JSON or XML */ - parsedBody: SettingUnion; + parsedBody: Automation; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the createOrUpdate operation. */ -export type SettingsListNextResponse = SettingsList & { +export type AutomationsCreateOrUpdateResponse = Automation & { /** * The underlying HTTP response. */ @@ -5515,14 +9156,14 @@ export type SettingsListNextResponse = SettingsList & { /** * The response body as parsed JSON or XML */ - parsedBody: SettingsList; + parsedBody: Automation; }; }; /** - * Contains response data for the get operation. + * Contains response data for the validate operation. */ -export type AdvancedThreatProtectionGetResponse = AdvancedThreatProtectionSetting & { +export type AutomationsValidateResponse = AutomationValidationStatus & { /** * The underlying HTTP response. */ @@ -5535,14 +9176,14 @@ export type AdvancedThreatProtectionGetResponse = AdvancedThreatProtectionSettin /** * The response body as parsed JSON or XML */ - parsedBody: AdvancedThreatProtectionSetting; + parsedBody: AutomationValidationStatus; }; }; /** - * Contains response data for the create operation. + * Contains response data for the listNext operation. */ -export type AdvancedThreatProtectionCreateResponse = AdvancedThreatProtectionSetting & { +export type AutomationsListNextResponse = AutomationList & { /** * The underlying HTTP response. */ @@ -5555,14 +9196,14 @@ export type AdvancedThreatProtectionCreateResponse = AdvancedThreatProtectionSet /** * The response body as parsed JSON or XML */ - parsedBody: AdvancedThreatProtectionSetting; + parsedBody: AutomationList; }; }; /** - * Contains response data for the list operation. + * Contains response data for the listByResourceGroupNext operation. */ -export type DeviceSecurityGroupsListResponse = DeviceSecurityGroupList & { +export type AutomationsListByResourceGroupNextResponse = AutomationList & { /** * The underlying HTTP response. */ @@ -5575,14 +9216,14 @@ export type DeviceSecurityGroupsListResponse = DeviceSecurityGroupList & { /** * The response body as parsed JSON or XML */ - parsedBody: DeviceSecurityGroupList; + parsedBody: AutomationList; }; }; /** - * Contains response data for the get operation. + * Contains response data for the list operation. */ -export type DeviceSecurityGroupsGetResponse = DeviceSecurityGroup & { +export type AlertsSuppressionRulesListResponse = AlertsSuppressionRulesList & { /** * The underlying HTTP response. */ @@ -5595,14 +9236,14 @@ export type DeviceSecurityGroupsGetResponse = DeviceSecurityGroup & { /** * The response body as parsed JSON or XML */ - parsedBody: DeviceSecurityGroup; + parsedBody: AlertsSuppressionRulesList; }; }; /** - * Contains response data for the createOrUpdate operation. + * Contains response data for the get operation. */ -export type DeviceSecurityGroupsCreateOrUpdateResponse = DeviceSecurityGroup & { +export type AlertsSuppressionRulesGetResponse = AlertsSuppressionRule & { /** * The underlying HTTP response. */ @@ -5615,14 +9256,14 @@ export type DeviceSecurityGroupsCreateOrUpdateResponse = DeviceSecurityGroup & { /** * The response body as parsed JSON or XML */ - parsedBody: DeviceSecurityGroup; + parsedBody: AlertsSuppressionRule; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the update operation. */ -export type DeviceSecurityGroupsListNextResponse = DeviceSecurityGroupList & { +export type AlertsSuppressionRulesUpdateResponse = AlertsSuppressionRule & { /** * The underlying HTTP response. */ @@ -5635,14 +9276,14 @@ export type DeviceSecurityGroupsListNextResponse = DeviceSecurityGroupList & { /** * The response body as parsed JSON or XML */ - parsedBody: DeviceSecurityGroupList; + parsedBody: AlertsSuppressionRule; }; }; /** - * Contains response data for the listBySubscription operation. + * Contains response data for the listNext operation. */ -export type IotSecuritySolutionListBySubscriptionResponse = IoTSecuritySolutionsList & { +export type AlertsSuppressionRulesListNextResponse = AlertsSuppressionRulesList & { /** * The underlying HTTP response. */ @@ -5655,14 +9296,14 @@ export type IotSecuritySolutionListBySubscriptionResponse = IoTSecuritySolutions /** * The response body as parsed JSON or XML */ - parsedBody: IoTSecuritySolutionsList; + parsedBody: AlertsSuppressionRulesList; }; }; /** - * Contains response data for the listByResourceGroup operation. + * Contains response data for the listByExtendedResource operation. */ -export type IotSecuritySolutionListByResourceGroupResponse = IoTSecuritySolutionsList & { +export type ServerVulnerabilityAssessmentListByExtendedResourceResponse = ServerVulnerabilityAssessmentsList & { /** * The underlying HTTP response. */ @@ -5675,14 +9316,14 @@ export type IotSecuritySolutionListByResourceGroupResponse = IoTSecuritySolution /** * The response body as parsed JSON or XML */ - parsedBody: IoTSecuritySolutionsList; + parsedBody: ServerVulnerabilityAssessmentsList; }; }; /** * Contains response data for the get operation. */ -export type IotSecuritySolutionGetResponse = IoTSecuritySolutionModel & { +export type ServerVulnerabilityAssessmentGetResponse = ServerVulnerabilityAssessment & { /** * The underlying HTTP response. */ @@ -5695,14 +9336,14 @@ export type IotSecuritySolutionGetResponse = IoTSecuritySolutionModel & { /** * The response body as parsed JSON or XML */ - parsedBody: IoTSecuritySolutionModel; + parsedBody: ServerVulnerabilityAssessment; }; }; /** * Contains response data for the createOrUpdate operation. */ -export type IotSecuritySolutionCreateOrUpdateResponse = IoTSecuritySolutionModel & { +export type ServerVulnerabilityAssessmentCreateOrUpdateResponse = ServerVulnerabilityAssessment & { /** * The underlying HTTP response. */ @@ -5715,14 +9356,14 @@ export type IotSecuritySolutionCreateOrUpdateResponse = IoTSecuritySolutionModel /** * The response body as parsed JSON or XML */ - parsedBody: IoTSecuritySolutionModel; + parsedBody: ServerVulnerabilityAssessment; }; }; /** - * Contains response data for the update operation. + * Contains response data for the list operation. */ -export type IotSecuritySolutionUpdateResponse = IoTSecuritySolutionModel & { +export type AssessmentsMetadataListResponse = SecurityAssessmentMetadataList & { /** * The underlying HTTP response. */ @@ -5735,14 +9376,14 @@ export type IotSecuritySolutionUpdateResponse = IoTSecuritySolutionModel & { /** * The response body as parsed JSON or XML */ - parsedBody: IoTSecuritySolutionModel; + parsedBody: SecurityAssessmentMetadataList; }; }; /** - * Contains response data for the listBySubscriptionNext operation. + * Contains response data for the get operation. */ -export type IotSecuritySolutionListBySubscriptionNextResponse = IoTSecuritySolutionsList & { +export type AssessmentsMetadataGetResponse = SecurityAssessmentMetadata & { /** * The underlying HTTP response. */ @@ -5755,14 +9396,14 @@ export type IotSecuritySolutionListBySubscriptionNextResponse = IoTSecuritySolut /** * The response body as parsed JSON or XML */ - parsedBody: IoTSecuritySolutionsList; + parsedBody: SecurityAssessmentMetadata; }; }; /** - * Contains response data for the listByResourceGroupNext operation. + * Contains response data for the listBySubscription operation. */ -export type IotSecuritySolutionListByResourceGroupNextResponse = IoTSecuritySolutionsList & { +export type AssessmentsMetadataListBySubscriptionResponse = SecurityAssessmentMetadataList & { /** * The underlying HTTP response. */ @@ -5775,14 +9416,14 @@ export type IotSecuritySolutionListByResourceGroupNextResponse = IoTSecuritySolu /** * The response body as parsed JSON or XML */ - parsedBody: IoTSecuritySolutionsList; + parsedBody: SecurityAssessmentMetadataList; }; }; /** - * Contains response data for the list operation. + * Contains response data for the getInSubscription operation. */ -export type IotSecuritySolutionAnalyticsListResponse = IoTSecuritySolutionAnalyticsModelList & { +export type AssessmentsMetadataGetInSubscriptionResponse = SecurityAssessmentMetadata & { /** * The underlying HTTP response. */ @@ -5795,14 +9436,14 @@ export type IotSecuritySolutionAnalyticsListResponse = IoTSecuritySolutionAnalyt /** * The response body as parsed JSON or XML */ - parsedBody: IoTSecuritySolutionAnalyticsModelList; + parsedBody: SecurityAssessmentMetadata; }; }; /** - * Contains response data for the get operation. + * Contains response data for the createInSubscription operation. */ -export type IotSecuritySolutionAnalyticsGetResponse = IoTSecuritySolutionAnalyticsModel & { +export type AssessmentsMetadataCreateInSubscriptionResponse = SecurityAssessmentMetadata & { /** * The underlying HTTP response. */ @@ -5815,14 +9456,14 @@ export type IotSecuritySolutionAnalyticsGetResponse = IoTSecuritySolutionAnalyti /** * The response body as parsed JSON or XML */ - parsedBody: IoTSecuritySolutionAnalyticsModel; + parsedBody: SecurityAssessmentMetadata; }; }; /** - * Contains response data for the list operation. + * Contains response data for the listNext operation. */ -export type IotSecuritySolutionsAnalyticsAggregatedAlertListResponse = IoTSecurityAggregatedAlertList & { +export type AssessmentsMetadataListNextResponse = SecurityAssessmentMetadataList & { /** * The underlying HTTP response. */ @@ -5835,14 +9476,14 @@ export type IotSecuritySolutionsAnalyticsAggregatedAlertListResponse = IoTSecuri /** * The response body as parsed JSON or XML */ - parsedBody: IoTSecurityAggregatedAlertList; + parsedBody: SecurityAssessmentMetadataList; }; }; /** - * Contains response data for the get operation. + * Contains response data for the listBySubscriptionNext operation. */ -export type IotSecuritySolutionsAnalyticsAggregatedAlertGetResponse = IoTSecurityAggregatedAlert & { +export type AssessmentsMetadataListBySubscriptionNextResponse = SecurityAssessmentMetadataList & { /** * The underlying HTTP response. */ @@ -5855,14 +9496,14 @@ export type IotSecuritySolutionsAnalyticsAggregatedAlertGetResponse = IoTSecurit /** * The response body as parsed JSON or XML */ - parsedBody: IoTSecurityAggregatedAlert; + parsedBody: SecurityAssessmentMetadataList; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the list operation. */ -export type IotSecuritySolutionsAnalyticsAggregatedAlertListNextResponse = IoTSecurityAggregatedAlertList & { +export type AssessmentsListResponse = SecurityAssessmentList & { /** * The underlying HTTP response. */ @@ -5875,14 +9516,14 @@ export type IotSecuritySolutionsAnalyticsAggregatedAlertListNextResponse = IoTSe /** * The response body as parsed JSON or XML */ - parsedBody: IoTSecurityAggregatedAlertList; + parsedBody: SecurityAssessmentList; }; }; /** * Contains response data for the get operation. */ -export type IotSecuritySolutionsAnalyticsRecommendationGetResponse = IoTSecurityAggregatedRecommendation & { +export type AssessmentsGetResponse = SecurityAssessment & { /** * The underlying HTTP response. */ @@ -5895,14 +9536,14 @@ export type IotSecuritySolutionsAnalyticsRecommendationGetResponse = IoTSecurity /** * The response body as parsed JSON or XML */ - parsedBody: IoTSecurityAggregatedRecommendation; + parsedBody: SecurityAssessment; }; }; /** - * Contains response data for the list operation. + * Contains response data for the createOrUpdate operation. */ -export type IotSecuritySolutionsAnalyticsRecommendationListResponse = IoTSecurityAggregatedRecommendationList & { +export type AssessmentsCreateOrUpdateResponse = SecurityAssessment & { /** * The underlying HTTP response. */ @@ -5915,14 +9556,14 @@ export type IotSecuritySolutionsAnalyticsRecommendationListResponse = IoTSecurit /** * The response body as parsed JSON or XML */ - parsedBody: IoTSecurityAggregatedRecommendationList; + parsedBody: SecurityAssessment; }; }; /** * Contains response data for the listNext operation. */ -export type IotSecuritySolutionsAnalyticsRecommendationListNextResponse = IoTSecurityAggregatedRecommendationList & { +export type AssessmentsListNextResponse = SecurityAssessmentList & { /** * The underlying HTTP response. */ @@ -5935,14 +9576,14 @@ export type IotSecuritySolutionsAnalyticsRecommendationListNextResponse = IoTSec /** * The response body as parsed JSON or XML */ - parsedBody: IoTSecurityAggregatedRecommendationList; + parsedBody: SecurityAssessmentList; }; }; /** * Contains response data for the list operation. */ -export type LocationsListResponse = AscLocationList & { +export type AdaptiveApplicationControlsListResponse = AdaptiveApplicationControlGroups & { /** * The underlying HTTP response. */ @@ -5955,14 +9596,14 @@ export type LocationsListResponse = AscLocationList & { /** * The response body as parsed JSON or XML */ - parsedBody: AscLocationList; + parsedBody: AdaptiveApplicationControlGroups; }; }; /** * Contains response data for the get operation. */ -export type LocationsGetResponse = AscLocation & { +export type AdaptiveApplicationControlsGetResponse = AdaptiveApplicationControlGroup & { /** * The underlying HTTP response. */ @@ -5975,14 +9616,14 @@ export type LocationsGetResponse = AscLocation & { /** * The response body as parsed JSON or XML */ - parsedBody: AscLocation; + parsedBody: AdaptiveApplicationControlGroup; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the put operation. */ -export type LocationsListNextResponse = AscLocationList & { +export type AdaptiveApplicationControlsPutResponse = AdaptiveApplicationControlGroup & { /** * The underlying HTTP response. */ @@ -5995,14 +9636,14 @@ export type LocationsListNextResponse = AscLocationList & { /** * The response body as parsed JSON or XML */ - parsedBody: AscLocationList; + parsedBody: AdaptiveApplicationControlGroup; }; }; /** - * Contains response data for the list operation. + * Contains response data for the listByExtendedResource operation. */ -export type OperationsListResponse = OperationList & { +export type AdaptiveNetworkHardeningsListByExtendedResourceResponse = AdaptiveNetworkHardeningsList & { /** * The underlying HTTP response. */ @@ -6015,14 +9656,14 @@ export type OperationsListResponse = OperationList & { /** * The response body as parsed JSON or XML */ - parsedBody: OperationList; + parsedBody: AdaptiveNetworkHardeningsList; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the get operation. */ -export type OperationsListNextResponse = OperationList & { +export type AdaptiveNetworkHardeningsGetResponse = AdaptiveNetworkHardening & { /** * The underlying HTTP response. */ @@ -6035,14 +9676,14 @@ export type OperationsListNextResponse = OperationList & { /** * The response body as parsed JSON or XML */ - parsedBody: OperationList; + parsedBody: AdaptiveNetworkHardening; }; }; /** - * Contains response data for the list operation. + * Contains response data for the listByExtendedResourceNext operation. */ -export type TasksListResponse = SecurityTaskList & { +export type AdaptiveNetworkHardeningsListByExtendedResourceNextResponse = AdaptiveNetworkHardeningsList & { /** * The underlying HTTP response. */ @@ -6055,14 +9696,14 @@ export type TasksListResponse = SecurityTaskList & { /** * The response body as parsed JSON or XML */ - parsedBody: SecurityTaskList; + parsedBody: AdaptiveNetworkHardeningsList; }; }; /** - * Contains response data for the listByHomeRegion operation. + * Contains response data for the list operation. */ -export type TasksListByHomeRegionResponse = SecurityTaskList & { +export type AllowedConnectionsListResponse = AllowedConnectionsList & { /** * The underlying HTTP response. */ @@ -6075,14 +9716,14 @@ export type TasksListByHomeRegionResponse = SecurityTaskList & { /** * The response body as parsed JSON or XML */ - parsedBody: SecurityTaskList; + parsedBody: AllowedConnectionsList; }; }; /** - * Contains response data for the getSubscriptionLevelTask operation. + * Contains response data for the listByHomeRegion operation. */ -export type TasksGetSubscriptionLevelTaskResponse = SecurityTask & { +export type AllowedConnectionsListByHomeRegionResponse = AllowedConnectionsList & { /** * The underlying HTTP response. */ @@ -6095,14 +9736,14 @@ export type TasksGetSubscriptionLevelTaskResponse = SecurityTask & { /** * The response body as parsed JSON or XML */ - parsedBody: SecurityTask; + parsedBody: AllowedConnectionsList; }; }; /** - * Contains response data for the listByResourceGroup operation. + * Contains response data for the get operation. */ -export type TasksListByResourceGroupResponse = SecurityTaskList & { +export type AllowedConnectionsGetResponse = AllowedConnectionsResource & { /** * The underlying HTTP response. */ @@ -6115,14 +9756,14 @@ export type TasksListByResourceGroupResponse = SecurityTaskList & { /** * The response body as parsed JSON or XML */ - parsedBody: SecurityTaskList; + parsedBody: AllowedConnectionsResource; }; }; /** - * Contains response data for the getResourceGroupLevelTask operation. + * Contains response data for the listNext operation. */ -export type TasksGetResourceGroupLevelTaskResponse = SecurityTask & { +export type AllowedConnectionsListNextResponse = AllowedConnectionsList & { /** * The underlying HTTP response. */ @@ -6135,14 +9776,14 @@ export type TasksGetResourceGroupLevelTaskResponse = SecurityTask & { /** * The response body as parsed JSON or XML */ - parsedBody: SecurityTask; + parsedBody: AllowedConnectionsList; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the listByHomeRegionNext operation. */ -export type TasksListNextResponse = SecurityTaskList & { +export type AllowedConnectionsListByHomeRegionNextResponse = AllowedConnectionsList & { /** * The underlying HTTP response. */ @@ -6155,14 +9796,14 @@ export type TasksListNextResponse = SecurityTaskList & { /** * The response body as parsed JSON or XML */ - parsedBody: SecurityTaskList; + parsedBody: AllowedConnectionsList; }; }; /** - * Contains response data for the listByHomeRegionNext operation. + * Contains response data for the list operation. */ -export type TasksListByHomeRegionNextResponse = SecurityTaskList & { +export type TopologyListResponse = TopologyList & { /** * The underlying HTTP response. */ @@ -6175,14 +9816,14 @@ export type TasksListByHomeRegionNextResponse = SecurityTaskList & { /** * The response body as parsed JSON or XML */ - parsedBody: SecurityTaskList; + parsedBody: TopologyList; }; }; /** - * Contains response data for the listByResourceGroupNext operation. + * Contains response data for the listByHomeRegion operation. */ -export type TasksListByResourceGroupNextResponse = SecurityTaskList & { +export type TopologyListByHomeRegionResponse = TopologyList & { /** * The underlying HTTP response. */ @@ -6195,14 +9836,14 @@ export type TasksListByResourceGroupNextResponse = SecurityTaskList & { /** * The response body as parsed JSON or XML */ - parsedBody: SecurityTaskList; + parsedBody: TopologyList; }; }; /** - * Contains response data for the list operation. + * Contains response data for the get operation. */ -export type AutoProvisioningSettingsListResponse = AutoProvisioningSettingList & { +export type TopologyGetResponse = TopologyResource & { /** * The underlying HTTP response. */ @@ -6215,14 +9856,14 @@ export type AutoProvisioningSettingsListResponse = AutoProvisioningSettingList & /** * The response body as parsed JSON or XML */ - parsedBody: AutoProvisioningSettingList; + parsedBody: TopologyResource; }; }; /** - * Contains response data for the get operation. + * Contains response data for the listNext operation. */ -export type AutoProvisioningSettingsGetResponse = AutoProvisioningSetting & { +export type TopologyListNextResponse = TopologyList & { /** * The underlying HTTP response. */ @@ -6235,14 +9876,14 @@ export type AutoProvisioningSettingsGetResponse = AutoProvisioningSetting & { /** * The response body as parsed JSON or XML */ - parsedBody: AutoProvisioningSetting; + parsedBody: TopologyList; }; }; /** - * Contains response data for the create operation. + * Contains response data for the listByHomeRegionNext operation. */ -export type AutoProvisioningSettingsCreateResponse = AutoProvisioningSetting & { +export type TopologyListByHomeRegionNextResponse = TopologyList & { /** * The underlying HTTP response. */ @@ -6255,14 +9896,14 @@ export type AutoProvisioningSettingsCreateResponse = AutoProvisioningSetting & { /** * The response body as parsed JSON or XML */ - parsedBody: AutoProvisioningSetting; + parsedBody: TopologyList; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the list operation. */ -export type AutoProvisioningSettingsListNextResponse = AutoProvisioningSettingList & { +export type JitNetworkAccessPoliciesListResponse = JitNetworkAccessPoliciesList & { /** * The underlying HTTP response. */ @@ -6275,14 +9916,14 @@ export type AutoProvisioningSettingsListNextResponse = AutoProvisioningSettingLi /** * The response body as parsed JSON or XML */ - parsedBody: AutoProvisioningSettingList; + parsedBody: JitNetworkAccessPoliciesList; }; }; /** - * Contains response data for the list operation. + * Contains response data for the listByRegion operation. */ -export type CompliancesListResponse = ComplianceList & { +export type JitNetworkAccessPoliciesListByRegionResponse = JitNetworkAccessPoliciesList & { /** * The underlying HTTP response. */ @@ -6295,14 +9936,14 @@ export type CompliancesListResponse = ComplianceList & { /** * The response body as parsed JSON or XML */ - parsedBody: ComplianceList; + parsedBody: JitNetworkAccessPoliciesList; }; }; /** - * Contains response data for the get operation. + * Contains response data for the listByResourceGroup operation. */ -export type CompliancesGetResponse = Compliance & { +export type JitNetworkAccessPoliciesListByResourceGroupResponse = JitNetworkAccessPoliciesList & { /** * The underlying HTTP response. */ @@ -6315,14 +9956,14 @@ export type CompliancesGetResponse = Compliance & { /** * The response body as parsed JSON or XML */ - parsedBody: Compliance; + parsedBody: JitNetworkAccessPoliciesList; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the listByResourceGroupAndRegion operation. */ -export type CompliancesListNextResponse = ComplianceList & { +export type JitNetworkAccessPoliciesListByResourceGroupAndRegionResponse = JitNetworkAccessPoliciesList & { /** * The underlying HTTP response. */ @@ -6335,14 +9976,14 @@ export type CompliancesListNextResponse = ComplianceList & { /** * The response body as parsed JSON or XML */ - parsedBody: ComplianceList; + parsedBody: JitNetworkAccessPoliciesList; }; }; /** * Contains response data for the get operation. */ -export type InformationProtectionPoliciesGetResponse = InformationProtectionPolicy & { +export type JitNetworkAccessPoliciesGetResponse = JitNetworkAccessPolicy & { /** * The underlying HTTP response. */ @@ -6355,14 +9996,14 @@ export type InformationProtectionPoliciesGetResponse = InformationProtectionPoli /** * The response body as parsed JSON or XML */ - parsedBody: InformationProtectionPolicy; + parsedBody: JitNetworkAccessPolicy; }; }; /** * Contains response data for the createOrUpdate operation. */ -export type InformationProtectionPoliciesCreateOrUpdateResponse = InformationProtectionPolicy & { +export type JitNetworkAccessPoliciesCreateOrUpdateResponse = JitNetworkAccessPolicy & { /** * The underlying HTTP response. */ @@ -6375,14 +10016,14 @@ export type InformationProtectionPoliciesCreateOrUpdateResponse = InformationPro /** * The response body as parsed JSON or XML */ - parsedBody: InformationProtectionPolicy; + parsedBody: JitNetworkAccessPolicy; }; }; /** - * Contains response data for the list operation. + * Contains response data for the initiate operation. */ -export type InformationProtectionPoliciesListResponse = InformationProtectionPolicyList & { +export type JitNetworkAccessPoliciesInitiateResponse = JitNetworkAccessRequest & { /** * The underlying HTTP response. */ @@ -6395,14 +10036,14 @@ export type InformationProtectionPoliciesListResponse = InformationProtectionPol /** * The response body as parsed JSON or XML */ - parsedBody: InformationProtectionPolicyList; + parsedBody: JitNetworkAccessRequest; }; }; /** * Contains response data for the listNext operation. */ -export type InformationProtectionPoliciesListNextResponse = InformationProtectionPolicyList & { +export type JitNetworkAccessPoliciesListNextResponse = JitNetworkAccessPoliciesList & { /** * The underlying HTTP response. */ @@ -6415,14 +10056,14 @@ export type InformationProtectionPoliciesListNextResponse = InformationProtectio /** * The response body as parsed JSON or XML */ - parsedBody: InformationProtectionPolicyList; + parsedBody: JitNetworkAccessPoliciesList; }; }; /** - * Contains response data for the list operation. + * Contains response data for the listByRegionNext operation. */ -export type SecurityContactsListResponse = SecurityContactList & { +export type JitNetworkAccessPoliciesListByRegionNextResponse = JitNetworkAccessPoliciesList & { /** * The underlying HTTP response. */ @@ -6435,14 +10076,14 @@ export type SecurityContactsListResponse = SecurityContactList & { /** * The response body as parsed JSON or XML */ - parsedBody: SecurityContactList; + parsedBody: JitNetworkAccessPoliciesList; }; }; /** - * Contains response data for the get operation. + * Contains response data for the listByResourceGroupNext operation. */ -export type SecurityContactsGetResponse = SecurityContact & { +export type JitNetworkAccessPoliciesListByResourceGroupNextResponse = JitNetworkAccessPoliciesList & { /** * The underlying HTTP response. */ @@ -6455,14 +10096,14 @@ export type SecurityContactsGetResponse = SecurityContact & { /** * The response body as parsed JSON or XML */ - parsedBody: SecurityContact; + parsedBody: JitNetworkAccessPoliciesList; }; }; /** - * Contains response data for the create operation. + * Contains response data for the listByResourceGroupAndRegionNext operation. */ -export type SecurityContactsCreateResponse = SecurityContact & { +export type JitNetworkAccessPoliciesListByResourceGroupAndRegionNextResponse = JitNetworkAccessPoliciesList & { /** * The underlying HTTP response. */ @@ -6475,14 +10116,14 @@ export type SecurityContactsCreateResponse = SecurityContact & { /** * The response body as parsed JSON or XML */ - parsedBody: SecurityContact; + parsedBody: JitNetworkAccessPoliciesList; }; }; /** - * Contains response data for the update operation. + * Contains response data for the list operation. */ -export type SecurityContactsUpdateResponse = SecurityContact & { +export type DiscoveredSecuritySolutionsListResponse = DiscoveredSecuritySolutionList & { /** * The underlying HTTP response. */ @@ -6495,14 +10136,14 @@ export type SecurityContactsUpdateResponse = SecurityContact & { /** * The response body as parsed JSON or XML */ - parsedBody: SecurityContact; + parsedBody: DiscoveredSecuritySolutionList; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the listByHomeRegion operation. */ -export type SecurityContactsListNextResponse = SecurityContactList & { +export type DiscoveredSecuritySolutionsListByHomeRegionResponse = DiscoveredSecuritySolutionList & { /** * The underlying HTTP response. */ @@ -6515,14 +10156,14 @@ export type SecurityContactsListNextResponse = SecurityContactList & { /** * The response body as parsed JSON or XML */ - parsedBody: SecurityContactList; + parsedBody: DiscoveredSecuritySolutionList; }; }; /** - * Contains response data for the list operation. + * Contains response data for the get operation. */ -export type WorkspaceSettingsListResponse = WorkspaceSettingList & { +export type DiscoveredSecuritySolutionsGetResponse = DiscoveredSecuritySolution & { /** * The underlying HTTP response. */ @@ -6535,14 +10176,14 @@ export type WorkspaceSettingsListResponse = WorkspaceSettingList & { /** * The response body as parsed JSON or XML */ - parsedBody: WorkspaceSettingList; + parsedBody: DiscoveredSecuritySolution; }; }; /** - * Contains response data for the get operation. + * Contains response data for the listNext operation. */ -export type WorkspaceSettingsGetResponse = WorkspaceSetting & { +export type DiscoveredSecuritySolutionsListNextResponse = DiscoveredSecuritySolutionList & { /** * The underlying HTTP response. */ @@ -6555,14 +10196,14 @@ export type WorkspaceSettingsGetResponse = WorkspaceSetting & { /** * The response body as parsed JSON or XML */ - parsedBody: WorkspaceSetting; + parsedBody: DiscoveredSecuritySolutionList; }; }; /** - * Contains response data for the create operation. + * Contains response data for the listByHomeRegionNext operation. */ -export type WorkspaceSettingsCreateResponse = WorkspaceSetting & { +export type DiscoveredSecuritySolutionsListByHomeRegionNextResponse = DiscoveredSecuritySolutionList & { /** * The underlying HTTP response. */ @@ -6575,14 +10216,14 @@ export type WorkspaceSettingsCreateResponse = WorkspaceSetting & { /** * The response body as parsed JSON or XML */ - parsedBody: WorkspaceSetting; + parsedBody: DiscoveredSecuritySolutionList; }; }; /** - * Contains response data for the update operation. + * Contains response data for the list operation. */ -export type WorkspaceSettingsUpdateResponse = WorkspaceSetting & { +export type SecuritySolutionsReferenceDataListResponse = SecuritySolutionsReferenceDataList & { /** * The underlying HTTP response. */ @@ -6595,14 +10236,14 @@ export type WorkspaceSettingsUpdateResponse = WorkspaceSetting & { /** * The response body as parsed JSON or XML */ - parsedBody: WorkspaceSetting; + parsedBody: SecuritySolutionsReferenceDataList; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the listByHomeRegion operation. */ -export type WorkspaceSettingsListNextResponse = WorkspaceSettingList & { +export type SecuritySolutionsReferenceDataListByHomeRegionResponse = SecuritySolutionsReferenceDataList & { /** * The underlying HTTP response. */ @@ -6615,14 +10256,14 @@ export type WorkspaceSettingsListNextResponse = WorkspaceSettingList & { /** * The response body as parsed JSON or XML */ - parsedBody: WorkspaceSettingList; + parsedBody: SecuritySolutionsReferenceDataList; }; }; /** * Contains response data for the list operation. */ -export type RegulatoryComplianceStandardsListResponse = RegulatoryComplianceStandardList & { +export type ExternalSecuritySolutionsListResponse = ExternalSecuritySolutionList & { /** * The underlying HTTP response. */ @@ -6635,14 +10276,14 @@ export type RegulatoryComplianceStandardsListResponse = RegulatoryComplianceStan /** * The response body as parsed JSON or XML */ - parsedBody: RegulatoryComplianceStandardList; + parsedBody: ExternalSecuritySolutionList; }; }; /** - * Contains response data for the get operation. + * Contains response data for the listByHomeRegion operation. */ -export type RegulatoryComplianceStandardsGetResponse = RegulatoryComplianceStandard & { +export type ExternalSecuritySolutionsListByHomeRegionResponse = ExternalSecuritySolutionList & { /** * The underlying HTTP response. */ @@ -6655,14 +10296,14 @@ export type RegulatoryComplianceStandardsGetResponse = RegulatoryComplianceStand /** * The response body as parsed JSON or XML */ - parsedBody: RegulatoryComplianceStandard; + parsedBody: ExternalSecuritySolutionList; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the get operation. */ -export type RegulatoryComplianceStandardsListNextResponse = RegulatoryComplianceStandardList & { +export type ExternalSecuritySolutionsGetResponse = ExternalSecuritySolutionUnion & { /** * The underlying HTTP response. */ @@ -6675,14 +10316,14 @@ export type RegulatoryComplianceStandardsListNextResponse = RegulatoryCompliance /** * The response body as parsed JSON or XML */ - parsedBody: RegulatoryComplianceStandardList; + parsedBody: ExternalSecuritySolutionUnion; }; }; /** - * Contains response data for the list operation. + * Contains response data for the listNext operation. */ -export type RegulatoryComplianceControlsListResponse = RegulatoryComplianceControlList & { +export type ExternalSecuritySolutionsListNextResponse = ExternalSecuritySolutionList & { /** * The underlying HTTP response. */ @@ -6695,14 +10336,14 @@ export type RegulatoryComplianceControlsListResponse = RegulatoryComplianceContr /** * The response body as parsed JSON or XML */ - parsedBody: RegulatoryComplianceControlList; + parsedBody: ExternalSecuritySolutionList; }; }; /** - * Contains response data for the get operation. + * Contains response data for the listByHomeRegionNext operation. */ -export type RegulatoryComplianceControlsGetResponse = RegulatoryComplianceControl & { +export type ExternalSecuritySolutionsListByHomeRegionNextResponse = ExternalSecuritySolutionList & { /** * The underlying HTTP response. */ @@ -6715,14 +10356,14 @@ export type RegulatoryComplianceControlsGetResponse = RegulatoryComplianceContro /** * The response body as parsed JSON or XML */ - parsedBody: RegulatoryComplianceControl; + parsedBody: ExternalSecuritySolutionList; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the list operation. */ -export type RegulatoryComplianceControlsListNextResponse = RegulatoryComplianceControlList & { +export type SecureScoresListResponse = SecureScoresList & { /** * The underlying HTTP response. */ @@ -6735,14 +10376,14 @@ export type RegulatoryComplianceControlsListNextResponse = RegulatoryComplianceC /** * The response body as parsed JSON or XML */ - parsedBody: RegulatoryComplianceControlList; + parsedBody: SecureScoresList; }; }; /** - * Contains response data for the list operation. + * Contains response data for the get operation. */ -export type RegulatoryComplianceAssessmentsListResponse = RegulatoryComplianceAssessmentList & { +export type SecureScoresGetResponse = SecureScoreItem & { /** * The underlying HTTP response. */ @@ -6755,14 +10396,14 @@ export type RegulatoryComplianceAssessmentsListResponse = RegulatoryComplianceAs /** * The response body as parsed JSON or XML */ - parsedBody: RegulatoryComplianceAssessmentList; + parsedBody: SecureScoreItem; }; }; /** - * Contains response data for the get operation. + * Contains response data for the listNext operation. */ -export type RegulatoryComplianceAssessmentsGetResponse = RegulatoryComplianceAssessment & { +export type SecureScoresListNextResponse = SecureScoresList & { /** * The underlying HTTP response. */ @@ -6775,14 +10416,14 @@ export type RegulatoryComplianceAssessmentsGetResponse = RegulatoryComplianceAss /** * The response body as parsed JSON or XML */ - parsedBody: RegulatoryComplianceAssessment; + parsedBody: SecureScoresList; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the listBySecureScore operation. */ -export type RegulatoryComplianceAssessmentsListNextResponse = RegulatoryComplianceAssessmentList & { +export type SecureScoreControlsListBySecureScoreResponse = SecureScoreControlList & { /** * The underlying HTTP response. */ @@ -6795,14 +10436,14 @@ export type RegulatoryComplianceAssessmentsListNextResponse = RegulatoryComplian /** * The response body as parsed JSON or XML */ - parsedBody: RegulatoryComplianceAssessmentList; + parsedBody: SecureScoreControlList; }; }; /** - * Contains response data for the listByExtendedResource operation. + * Contains response data for the list operation. */ -export type ServerVulnerabilityAssessmentListByExtendedResourceResponse = ServerVulnerabilityAssessmentsList & { +export type SecureScoreControlsListResponse = SecureScoreControlList & { /** * The underlying HTTP response. */ @@ -6815,14 +10456,14 @@ export type ServerVulnerabilityAssessmentListByExtendedResourceResponse = Server /** * The response body as parsed JSON or XML */ - parsedBody: ServerVulnerabilityAssessmentsList; + parsedBody: SecureScoreControlList; }; }; /** - * Contains response data for the get operation. + * Contains response data for the listBySecureScoreNext operation. */ -export type ServerVulnerabilityAssessmentGetResponse = ServerVulnerabilityAssessment & { +export type SecureScoreControlsListBySecureScoreNextResponse = SecureScoreControlList & { /** * The underlying HTTP response. */ @@ -6835,14 +10476,14 @@ export type ServerVulnerabilityAssessmentGetResponse = ServerVulnerabilityAssess /** * The response body as parsed JSON or XML */ - parsedBody: ServerVulnerabilityAssessment; + parsedBody: SecureScoreControlList; }; }; /** - * Contains response data for the createOrUpdate operation. + * Contains response data for the listNext operation. */ -export type ServerVulnerabilityAssessmentCreateOrUpdateResponse = ServerVulnerabilityAssessment & { +export type SecureScoreControlsListNextResponse = SecureScoreControlList & { /** * The underlying HTTP response. */ @@ -6855,14 +10496,14 @@ export type ServerVulnerabilityAssessmentCreateOrUpdateResponse = ServerVulnerab /** * The response body as parsed JSON or XML */ - parsedBody: ServerVulnerabilityAssessment; + parsedBody: SecureScoreControlList; }; }; /** - * Contains response data for the listAll operation. + * Contains response data for the list operation. */ -export type SubAssessmentsListAllResponse = SecuritySubAssessmentList & { +export type SecureScoreControlDefinitionsListResponse = SecureScoreControlDefinitionList & { /** * The underlying HTTP response. */ @@ -6875,14 +10516,14 @@ export type SubAssessmentsListAllResponse = SecuritySubAssessmentList & { /** * The response body as parsed JSON or XML */ - parsedBody: SecuritySubAssessmentList; + parsedBody: SecureScoreControlDefinitionList; }; }; /** - * Contains response data for the list operation. + * Contains response data for the listBySubscription operation. */ -export type SubAssessmentsListResponse = SecuritySubAssessmentList & { +export type SecureScoreControlDefinitionsListBySubscriptionResponse = SecureScoreControlDefinitionList & { /** * The underlying HTTP response. */ @@ -6895,14 +10536,14 @@ export type SubAssessmentsListResponse = SecuritySubAssessmentList & { /** * The response body as parsed JSON or XML */ - parsedBody: SecuritySubAssessmentList; + parsedBody: SecureScoreControlDefinitionList; }; }; /** - * Contains response data for the get operation. + * Contains response data for the listNext operation. */ -export type SubAssessmentsGetResponse = SecuritySubAssessment & { +export type SecureScoreControlDefinitionsListNextResponse = SecureScoreControlDefinitionList & { /** * The underlying HTTP response. */ @@ -6915,14 +10556,14 @@ export type SubAssessmentsGetResponse = SecuritySubAssessment & { /** * The response body as parsed JSON or XML */ - parsedBody: SecuritySubAssessment; + parsedBody: SecureScoreControlDefinitionList; }; }; /** - * Contains response data for the listAllNext operation. + * Contains response data for the listBySubscriptionNext operation. */ -export type SubAssessmentsListAllNextResponse = SecuritySubAssessmentList & { +export type SecureScoreControlDefinitionsListBySubscriptionNextResponse = SecureScoreControlDefinitionList & { /** * The underlying HTTP response. */ @@ -6935,14 +10576,14 @@ export type SubAssessmentsListAllNextResponse = SecuritySubAssessmentList & { /** * The response body as parsed JSON or XML */ - parsedBody: SecuritySubAssessmentList; + parsedBody: SecureScoreControlDefinitionList; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the list operation. */ -export type SubAssessmentsListNextResponse = SecuritySubAssessmentList & { +export type SecuritySolutionsListResponse = SecuritySolutionList & { /** * The underlying HTTP response. */ @@ -6955,14 +10596,14 @@ export type SubAssessmentsListNextResponse = SecuritySubAssessmentList & { /** * The response body as parsed JSON or XML */ - parsedBody: SecuritySubAssessmentList; + parsedBody: SecuritySolutionList; }; }; /** - * Contains response data for the list operation. + * Contains response data for the get operation. */ -export type AutomationsListResponse = AutomationList & { +export type SecuritySolutionsGetResponse = SecuritySolution & { /** * The underlying HTTP response. */ @@ -6975,14 +10616,14 @@ export type AutomationsListResponse = AutomationList & { /** * The response body as parsed JSON or XML */ - parsedBody: AutomationList; + parsedBody: SecuritySolution; }; }; /** - * Contains response data for the listByResourceGroup operation. + * Contains response data for the listNext operation. */ -export type AutomationsListByResourceGroupResponse = AutomationList & { +export type SecuritySolutionsListNextResponse = SecuritySolutionList & { /** * The underlying HTTP response. */ @@ -6995,14 +10636,14 @@ export type AutomationsListByResourceGroupResponse = AutomationList & { /** * The response body as parsed JSON or XML */ - parsedBody: AutomationList; + parsedBody: SecuritySolutionList; }; }; /** - * Contains response data for the get operation. + * Contains response data for the list operation. */ -export type AutomationsGetResponse = Automation & { +export type ConnectorsListResponse = ConnectorSettingList & { /** * The underlying HTTP response. */ @@ -7015,14 +10656,14 @@ export type AutomationsGetResponse = Automation & { /** * The response body as parsed JSON or XML */ - parsedBody: Automation; + parsedBody: ConnectorSettingList; }; }; /** - * Contains response data for the createOrUpdate operation. + * Contains response data for the get operation. */ -export type AutomationsCreateOrUpdateResponse = Automation & { +export type ConnectorsGetResponse = ConnectorSetting & { /** * The underlying HTTP response. */ @@ -7035,14 +10676,14 @@ export type AutomationsCreateOrUpdateResponse = Automation & { /** * The response body as parsed JSON or XML */ - parsedBody: Automation; + parsedBody: ConnectorSetting; }; }; /** - * Contains response data for the validate operation. + * Contains response data for the createOrUpdate operation. */ -export type AutomationsValidateResponse = AutomationValidationStatus & { +export type ConnectorsCreateOrUpdateResponse = ConnectorSetting & { /** * The underlying HTTP response. */ @@ -7055,14 +10696,14 @@ export type AutomationsValidateResponse = AutomationValidationStatus & { /** * The response body as parsed JSON or XML */ - parsedBody: AutomationValidationStatus; + parsedBody: ConnectorSetting; }; }; /** * Contains response data for the listNext operation. */ -export type AutomationsListNextResponse = AutomationList & { +export type ConnectorsListNextResponse = ConnectorSettingList & { /** * The underlying HTTP response. */ @@ -7075,14 +10716,14 @@ export type AutomationsListNextResponse = AutomationList & { /** * The response body as parsed JSON or XML */ - parsedBody: AutomationList; + parsedBody: ConnectorSettingList; }; }; /** - * Contains response data for the listByResourceGroupNext operation. + * Contains response data for the get operation. */ -export type AutomationsListByResourceGroupNextResponse = AutomationList & { +export type SqlVulnerabilityAssessmentScansGetResponse = Scan & { /** * The underlying HTTP response. */ @@ -7095,14 +10736,14 @@ export type AutomationsListByResourceGroupNextResponse = AutomationList & { /** * The response body as parsed JSON or XML */ - parsedBody: AutomationList; + parsedBody: Scan; }; }; /** * Contains response data for the list operation. */ -export type AlertsSuppressionRulesListResponse = AlertsSuppressionRulesList & { +export type SqlVulnerabilityAssessmentScansListResponse = Scans & { /** * The underlying HTTP response. */ @@ -7115,14 +10756,14 @@ export type AlertsSuppressionRulesListResponse = AlertsSuppressionRulesList & { /** * The response body as parsed JSON or XML */ - parsedBody: AlertsSuppressionRulesList; + parsedBody: Scans; }; }; /** * Contains response data for the get operation. */ -export type AlertsSuppressionRulesGetResponse = AlertsSuppressionRule & { +export type SqlVulnerabilityAssessmentScanResultsGetResponse = ScanResult & { /** * The underlying HTTP response. */ @@ -7135,14 +10776,14 @@ export type AlertsSuppressionRulesGetResponse = AlertsSuppressionRule & { /** * The response body as parsed JSON or XML */ - parsedBody: AlertsSuppressionRule; + parsedBody: ScanResult; }; }; /** - * Contains response data for the update operation. + * Contains response data for the list operation. */ -export type AlertsSuppressionRulesUpdateResponse = AlertsSuppressionRule & { +export type SqlVulnerabilityAssessmentScanResultsListResponse = ScanResults & { /** * The underlying HTTP response. */ @@ -7155,14 +10796,14 @@ export type AlertsSuppressionRulesUpdateResponse = AlertsSuppressionRule & { /** * The response body as parsed JSON or XML */ - parsedBody: AlertsSuppressionRule; + parsedBody: ScanResults; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the createOrUpdate operation. */ -export type AlertsSuppressionRulesListNextResponse = AlertsSuppressionRulesList & { +export type SqlVulnerabilityAssessmentBaselineRulesCreateOrUpdateResponse = RuleResults & { /** * The underlying HTTP response. */ @@ -7175,14 +10816,14 @@ export type AlertsSuppressionRulesListNextResponse = AlertsSuppressionRulesList /** * The response body as parsed JSON or XML */ - parsedBody: AlertsSuppressionRulesList; + parsedBody: RuleResults; }; }; /** - * Contains response data for the list operation. + * Contains response data for the get operation. */ -export type AssessmentsMetadataListResponse = SecurityAssessmentMetadataList & { +export type SqlVulnerabilityAssessmentBaselineRulesGetResponse = RuleResults & { /** * The underlying HTTP response. */ @@ -7195,14 +10836,14 @@ export type AssessmentsMetadataListResponse = SecurityAssessmentMetadataList & { /** * The response body as parsed JSON or XML */ - parsedBody: SecurityAssessmentMetadataList; + parsedBody: RuleResults; }; }; /** - * Contains response data for the get operation. + * Contains response data for the list operation. */ -export type AssessmentsMetadataGetResponse = SecurityAssessmentMetadata & { +export type SqlVulnerabilityAssessmentBaselineRulesListResponse = RulesResults & { /** * The underlying HTTP response. */ @@ -7215,14 +10856,14 @@ export type AssessmentsMetadataGetResponse = SecurityAssessmentMetadata & { /** * The response body as parsed JSON or XML */ - parsedBody: SecurityAssessmentMetadata; + parsedBody: RulesResults; }; }; /** - * Contains response data for the listBySubscription operation. + * Contains response data for the add operation. */ -export type AssessmentsMetadataListBySubscriptionResponse = SecurityAssessmentMetadataList & { +export type SqlVulnerabilityAssessmentBaselineRulesAddResponse = RulesResults & { /** * The underlying HTTP response. */ @@ -7235,14 +10876,14 @@ export type AssessmentsMetadataListBySubscriptionResponse = SecurityAssessmentMe /** * The response body as parsed JSON or XML */ - parsedBody: SecurityAssessmentMetadataList; + parsedBody: RulesResults; }; }; /** - * Contains response data for the getInSubscription operation. + * Contains response data for the list operation. */ -export type AssessmentsMetadataGetInSubscriptionResponse = SecurityAssessmentMetadata & { +export type IotDefenderSettingsListResponse = IotDefenderSettingsList & { /** * The underlying HTTP response. */ @@ -7255,14 +10896,14 @@ export type AssessmentsMetadataGetInSubscriptionResponse = SecurityAssessmentMet /** * The response body as parsed JSON or XML */ - parsedBody: SecurityAssessmentMetadata; + parsedBody: IotDefenderSettingsList; }; }; /** - * Contains response data for the createInSubscription operation. + * Contains response data for the get operation. */ -export type AssessmentsMetadataCreateInSubscriptionResponse = SecurityAssessmentMetadata & { +export type IotDefenderSettingsGetResponse = IotDefenderSettingsModel & { /** * The underlying HTTP response. */ @@ -7275,14 +10916,14 @@ export type AssessmentsMetadataCreateInSubscriptionResponse = SecurityAssessment /** * The response body as parsed JSON or XML */ - parsedBody: SecurityAssessmentMetadata; + parsedBody: IotDefenderSettingsModel; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the createOrUpdate operation. */ -export type AssessmentsMetadataListNextResponse = SecurityAssessmentMetadataList & { +export type IotDefenderSettingsCreateOrUpdateResponse = IotDefenderSettingsModel & { /** * The underlying HTTP response. */ @@ -7295,14 +10936,14 @@ export type AssessmentsMetadataListNextResponse = SecurityAssessmentMetadataList /** * The response body as parsed JSON or XML */ - parsedBody: SecurityAssessmentMetadataList; + parsedBody: IotDefenderSettingsModel; }; }; /** - * Contains response data for the listBySubscriptionNext operation. + * Contains response data for the packageDownloadsMethod operation. */ -export type AssessmentsMetadataListBySubscriptionNextResponse = SecurityAssessmentMetadataList & { +export type IotDefenderSettingsPackageDownloadsMethodResponse = PackageDownloads & { /** * The underlying HTTP response. */ @@ -7315,14 +10956,40 @@ export type AssessmentsMetadataListBySubscriptionNextResponse = SecurityAssessme /** * The response body as parsed JSON or XML */ - parsedBody: SecurityAssessmentMetadataList; + parsedBody: PackageDownloads; }; }; +/** + * Contains response data for the downloadManagerActivation operation. + */ +export type IotDefenderSettingsDownloadManagerActivationResponse = { + /** + * BROWSER ONLY + * + * The response body as a browser Blob. + * Always undefined in node.js. + */ + blobBody?: Promise; + + /** + * NODEJS ONLY + * + * The response body as a node.js Readable stream. + * Always undefined in the browser. + */ + readableStreamBody?: NodeJS.ReadableStream; + + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse; +}; + /** * Contains response data for the list operation. */ -export type AssessmentsListResponse = SecurityAssessmentList & { +export type IotSensorsListResponse = IotSensorsList & { /** * The underlying HTTP response. */ @@ -7335,14 +11002,14 @@ export type AssessmentsListResponse = SecurityAssessmentList & { /** * The response body as parsed JSON or XML */ - parsedBody: SecurityAssessmentList; + parsedBody: IotSensorsList; }; }; /** * Contains response data for the get operation. */ -export type AssessmentsGetResponse = SecurityAssessment & { +export type IotSensorsGetResponse = IotSensorsModel & { /** * The underlying HTTP response. */ @@ -7355,14 +11022,14 @@ export type AssessmentsGetResponse = SecurityAssessment & { /** * The response body as parsed JSON or XML */ - parsedBody: SecurityAssessment; + parsedBody: IotSensorsModel; }; }; /** * Contains response data for the createOrUpdate operation. */ -export type AssessmentsCreateOrUpdateResponse = SecurityAssessment & { +export type IotSensorsCreateOrUpdateResponse = IotSensorsModel & { /** * The underlying HTTP response. */ @@ -7375,34 +11042,66 @@ export type AssessmentsCreateOrUpdateResponse = SecurityAssessment & { /** * The response body as parsed JSON or XML */ - parsedBody: SecurityAssessment; + parsedBody: IotSensorsModel; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the downloadActivation operation. */ -export type AssessmentsListNextResponse = SecurityAssessmentList & { +export type IotSensorsDownloadActivationResponse = { + /** + * BROWSER ONLY + * + * The response body as a browser Blob. + * Always undefined in node.js. + */ + blobBody?: Promise; + + /** + * NODEJS ONLY + * + * The response body as a node.js Readable stream. + * Always undefined in the browser. + */ + readableStreamBody?: NodeJS.ReadableStream; + /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + _response: msRest.HttpResponse; +}; - /** - * The response body as parsed JSON or XML - */ - parsedBody: SecurityAssessmentList; - }; +/** + * Contains response data for the downloadResetPassword operation. + */ +export type IotSensorsDownloadResetPasswordResponse = { + /** + * BROWSER ONLY + * + * The response body as a browser Blob. + * Always undefined in node.js. + */ + blobBody?: Promise; + + /** + * NODEJS ONLY + * + * The response body as a node.js Readable stream. + * Always undefined in the browser. + */ + readableStreamBody?: NodeJS.ReadableStream; + + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse; }; /** * Contains response data for the list operation. */ -export type AdaptiveApplicationControlsListResponse = AppWhitelistingGroups & { +export type DevicesForSubscriptionListResponse = DeviceList & { /** * The underlying HTTP response. */ @@ -7415,14 +11114,14 @@ export type AdaptiveApplicationControlsListResponse = AppWhitelistingGroups & { /** * The response body as parsed JSON or XML */ - parsedBody: AppWhitelistingGroups; + parsedBody: DeviceList; }; }; /** - * Contains response data for the get operation. + * Contains response data for the listNext operation. */ -export type AdaptiveApplicationControlsGetResponse = AppWhitelistingGroup & { +export type DevicesForSubscriptionListNextResponse = DeviceList & { /** * The underlying HTTP response. */ @@ -7435,14 +11134,14 @@ export type AdaptiveApplicationControlsGetResponse = AppWhitelistingGroup & { /** * The response body as parsed JSON or XML */ - parsedBody: AppWhitelistingGroup; + parsedBody: DeviceList; }; }; /** - * Contains response data for the put operation. + * Contains response data for the list operation. */ -export type AdaptiveApplicationControlsPutResponse = AppWhitelistingGroup & { +export type DevicesForHubListResponse = DeviceList & { /** * The underlying HTTP response. */ @@ -7455,14 +11154,14 @@ export type AdaptiveApplicationControlsPutResponse = AppWhitelistingGroup & { /** * The response body as parsed JSON or XML */ - parsedBody: AppWhitelistingGroup; + parsedBody: DeviceList; }; }; /** - * Contains response data for the listByExtendedResource operation. + * Contains response data for the listNext operation. */ -export type AdaptiveNetworkHardeningsListByExtendedResourceResponse = AdaptiveNetworkHardeningsList & { +export type DevicesForHubListNextResponse = DeviceList & { /** * The underlying HTTP response. */ @@ -7475,14 +11174,14 @@ export type AdaptiveNetworkHardeningsListByExtendedResourceResponse = AdaptiveNe /** * The response body as parsed JSON or XML */ - parsedBody: AdaptiveNetworkHardeningsList; + parsedBody: DeviceList; }; }; /** * Contains response data for the get operation. */ -export type AdaptiveNetworkHardeningsGetResponse = AdaptiveNetworkHardening & { +export type DeviceGetResponse = Device & { /** * The underlying HTTP response. */ @@ -7495,14 +11194,14 @@ export type AdaptiveNetworkHardeningsGetResponse = AdaptiveNetworkHardening & { /** * The response body as parsed JSON or XML */ - parsedBody: AdaptiveNetworkHardening; + parsedBody: Device; }; }; /** - * Contains response data for the listByExtendedResourceNext operation. + * Contains response data for the list operation. */ -export type AdaptiveNetworkHardeningsListByExtendedResourceNextResponse = AdaptiveNetworkHardeningsList & { +export type OnPremiseIotSensorsListResponse = OnPremiseIotSensorsList & { /** * The underlying HTTP response. */ @@ -7515,14 +11214,14 @@ export type AdaptiveNetworkHardeningsListByExtendedResourceNextResponse = Adapti /** * The response body as parsed JSON or XML */ - parsedBody: AdaptiveNetworkHardeningsList; + parsedBody: OnPremiseIotSensorsList; }; }; /** - * Contains response data for the list operation. + * Contains response data for the get operation. */ -export type AllowedConnectionsListResponse = AllowedConnectionsList & { +export type OnPremiseIotSensorsGetResponse = OnPremiseIotSensor & { /** * The underlying HTTP response. */ @@ -7535,14 +11234,14 @@ export type AllowedConnectionsListResponse = AllowedConnectionsList & { /** * The response body as parsed JSON or XML */ - parsedBody: AllowedConnectionsList; + parsedBody: OnPremiseIotSensor; }; }; /** - * Contains response data for the listByHomeRegion operation. + * Contains response data for the createOrUpdate operation. */ -export type AllowedConnectionsListByHomeRegionResponse = AllowedConnectionsList & { +export type OnPremiseIotSensorsCreateOrUpdateResponse = OnPremiseIotSensor & { /** * The underlying HTTP response. */ @@ -7555,54 +11254,66 @@ export type AllowedConnectionsListByHomeRegionResponse = AllowedConnectionsList /** * The response body as parsed JSON or XML */ - parsedBody: AllowedConnectionsList; + parsedBody: OnPremiseIotSensor; }; }; /** - * Contains response data for the get operation. + * Contains response data for the downloadActivation operation. */ -export type AllowedConnectionsGetResponse = AllowedConnectionsResource & { +export type OnPremiseIotSensorsDownloadActivationResponse = { /** - * The underlying HTTP response. + * BROWSER ONLY + * + * The response body as a browser Blob. + * Always undefined in node.js. */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + blobBody?: Promise; - /** - * The response body as parsed JSON or XML - */ - parsedBody: AllowedConnectionsResource; - }; + /** + * NODEJS ONLY + * + * The response body as a node.js Readable stream. + * Always undefined in the browser. + */ + readableStreamBody?: NodeJS.ReadableStream; + + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse; }; /** - * Contains response data for the listNext operation. + * Contains response data for the downloadResetPassword operation. */ -export type AllowedConnectionsListNextResponse = AllowedConnectionsList & { +export type OnPremiseIotSensorsDownloadResetPasswordResponse = { /** - * The underlying HTTP response. + * BROWSER ONLY + * + * The response body as a browser Blob. + * Always undefined in node.js. */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + blobBody?: Promise; - /** - * The response body as parsed JSON or XML - */ - parsedBody: AllowedConnectionsList; - }; + /** + * NODEJS ONLY + * + * The response body as a node.js Readable stream. + * Always undefined in the browser. + */ + readableStreamBody?: NodeJS.ReadableStream; + + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse; }; /** - * Contains response data for the listByHomeRegionNext operation. + * Contains response data for the list operation. */ -export type AllowedConnectionsListByHomeRegionNextResponse = AllowedConnectionsList & { +export type IotSitesListResponse = IotSitesList & { /** * The underlying HTTP response. */ @@ -7615,14 +11326,14 @@ export type AllowedConnectionsListByHomeRegionNextResponse = AllowedConnectionsL /** * The response body as parsed JSON or XML */ - parsedBody: AllowedConnectionsList; + parsedBody: IotSitesList; }; }; /** - * Contains response data for the list operation. + * Contains response data for the get operation. */ -export type TopologyListResponse = TopologyList & { +export type IotSitesGetResponse = IotSitesModel & { /** * The underlying HTTP response. */ @@ -7635,14 +11346,14 @@ export type TopologyListResponse = TopologyList & { /** * The response body as parsed JSON or XML */ - parsedBody: TopologyList; + parsedBody: IotSitesModel; }; }; /** - * Contains response data for the listByHomeRegion operation. + * Contains response data for the createOrUpdate operation. */ -export type TopologyListByHomeRegionResponse = TopologyList & { +export type IotSitesCreateOrUpdateResponse = IotSitesModel & { /** * The underlying HTTP response. */ @@ -7655,14 +11366,14 @@ export type TopologyListByHomeRegionResponse = TopologyList & { /** * The response body as parsed JSON or XML */ - parsedBody: TopologyList; + parsedBody: IotSitesModel; }; }; /** - * Contains response data for the get operation. + * Contains response data for the list operation. */ -export type TopologyGetResponse = TopologyResource & { +export type IotAlertsListResponse = IotAlertListModel & { /** * The underlying HTTP response. */ @@ -7675,14 +11386,14 @@ export type TopologyGetResponse = TopologyResource & { /** * The response body as parsed JSON or XML */ - parsedBody: TopologyResource; + parsedBody: IotAlertListModel; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the get operation. */ -export type TopologyListNextResponse = TopologyList & { +export type IotAlertsGetResponse = IotAlertModel & { /** * The underlying HTTP response. */ @@ -7695,14 +11406,14 @@ export type TopologyListNextResponse = TopologyList & { /** * The response body as parsed JSON or XML */ - parsedBody: TopologyList; + parsedBody: IotAlertModel; }; }; /** - * Contains response data for the listByHomeRegionNext operation. + * Contains response data for the listNext operation. */ -export type TopologyListByHomeRegionNextResponse = TopologyList & { +export type IotAlertsListNextResponse = IotAlertListModel & { /** * The underlying HTTP response. */ @@ -7715,14 +11426,14 @@ export type TopologyListByHomeRegionNextResponse = TopologyList & { /** * The response body as parsed JSON or XML */ - parsedBody: TopologyList; + parsedBody: IotAlertListModel; }; }; /** * Contains response data for the list operation. */ -export type JitNetworkAccessPoliciesListResponse = JitNetworkAccessPoliciesList & { +export type IotAlertTypesListResponse = IotAlertTypeList & { /** * The underlying HTTP response. */ @@ -7735,14 +11446,14 @@ export type JitNetworkAccessPoliciesListResponse = JitNetworkAccessPoliciesList /** * The response body as parsed JSON or XML */ - parsedBody: JitNetworkAccessPoliciesList; + parsedBody: IotAlertTypeList; }; }; /** - * Contains response data for the listByRegion operation. + * Contains response data for the get operation. */ -export type JitNetworkAccessPoliciesListByRegionResponse = JitNetworkAccessPoliciesList & { +export type IotAlertTypesGetResponse = IotAlertType & { /** * The underlying HTTP response. */ @@ -7755,14 +11466,14 @@ export type JitNetworkAccessPoliciesListByRegionResponse = JitNetworkAccessPolic /** * The response body as parsed JSON or XML */ - parsedBody: JitNetworkAccessPoliciesList; + parsedBody: IotAlertType; }; }; /** - * Contains response data for the listByResourceGroup operation. + * Contains response data for the list operation. */ -export type JitNetworkAccessPoliciesListByResourceGroupResponse = JitNetworkAccessPoliciesList & { +export type IotRecommendationsListResponse = IotRecommendationListModel & { /** * The underlying HTTP response. */ @@ -7775,14 +11486,14 @@ export type JitNetworkAccessPoliciesListByResourceGroupResponse = JitNetworkAcce /** * The response body as parsed JSON or XML */ - parsedBody: JitNetworkAccessPoliciesList; + parsedBody: IotRecommendationListModel; }; }; /** - * Contains response data for the listByResourceGroupAndRegion operation. + * Contains response data for the get operation. */ -export type JitNetworkAccessPoliciesListByResourceGroupAndRegionResponse = JitNetworkAccessPoliciesList & { +export type IotRecommendationsGetResponse = IotRecommendationModel & { /** * The underlying HTTP response. */ @@ -7795,14 +11506,14 @@ export type JitNetworkAccessPoliciesListByResourceGroupAndRegionResponse = JitNe /** * The response body as parsed JSON or XML */ - parsedBody: JitNetworkAccessPoliciesList; + parsedBody: IotRecommendationModel; }; }; /** - * Contains response data for the get operation. + * Contains response data for the listNext operation. */ -export type JitNetworkAccessPoliciesGetResponse = JitNetworkAccessPolicy & { +export type IotRecommendationsListNextResponse = IotRecommendationListModel & { /** * The underlying HTTP response. */ @@ -7815,14 +11526,14 @@ export type JitNetworkAccessPoliciesGetResponse = JitNetworkAccessPolicy & { /** * The response body as parsed JSON or XML */ - parsedBody: JitNetworkAccessPolicy; + parsedBody: IotRecommendationListModel; }; }; /** - * Contains response data for the createOrUpdate operation. + * Contains response data for the list operation. */ -export type JitNetworkAccessPoliciesCreateOrUpdateResponse = JitNetworkAccessPolicy & { +export type IotRecommendationTypesListResponse = IotRecommendationTypeList & { /** * The underlying HTTP response. */ @@ -7835,14 +11546,14 @@ export type JitNetworkAccessPoliciesCreateOrUpdateResponse = JitNetworkAccessPol /** * The response body as parsed JSON or XML */ - parsedBody: JitNetworkAccessPolicy; + parsedBody: IotRecommendationTypeList; }; }; /** - * Contains response data for the initiate operation. + * Contains response data for the get operation. */ -export type JitNetworkAccessPoliciesInitiateResponse = JitNetworkAccessRequest & { +export type IotRecommendationTypesGetResponse = IotRecommendationType & { /** * The underlying HTTP response. */ @@ -7855,14 +11566,14 @@ export type JitNetworkAccessPoliciesInitiateResponse = JitNetworkAccessRequest & /** * The response body as parsed JSON or XML */ - parsedBody: JitNetworkAccessRequest; + parsedBody: IotRecommendationType; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the list operation. */ -export type JitNetworkAccessPoliciesListNextResponse = JitNetworkAccessPoliciesList & { +export type AlertsListResponse = AlertList & { /** * The underlying HTTP response. */ @@ -7875,14 +11586,14 @@ export type JitNetworkAccessPoliciesListNextResponse = JitNetworkAccessPoliciesL /** * The response body as parsed JSON or XML */ - parsedBody: JitNetworkAccessPoliciesList; + parsedBody: AlertList; }; }; /** - * Contains response data for the listByRegionNext operation. + * Contains response data for the listByResourceGroup operation. */ -export type JitNetworkAccessPoliciesListByRegionNextResponse = JitNetworkAccessPoliciesList & { +export type AlertsListByResourceGroupResponse = AlertList & { /** * The underlying HTTP response. */ @@ -7895,14 +11606,14 @@ export type JitNetworkAccessPoliciesListByRegionNextResponse = JitNetworkAccessP /** * The response body as parsed JSON or XML */ - parsedBody: JitNetworkAccessPoliciesList; + parsedBody: AlertList; }; }; /** - * Contains response data for the listByResourceGroupNext operation. + * Contains response data for the listSubscriptionLevelByRegion operation. */ -export type JitNetworkAccessPoliciesListByResourceGroupNextResponse = JitNetworkAccessPoliciesList & { +export type AlertsListSubscriptionLevelByRegionResponse = AlertList & { /** * The underlying HTTP response. */ @@ -7915,14 +11626,14 @@ export type JitNetworkAccessPoliciesListByResourceGroupNextResponse = JitNetwork /** * The response body as parsed JSON or XML */ - parsedBody: JitNetworkAccessPoliciesList; + parsedBody: AlertList; }; }; /** - * Contains response data for the listByResourceGroupAndRegionNext operation. + * Contains response data for the listResourceGroupLevelByRegion operation. */ -export type JitNetworkAccessPoliciesListByResourceGroupAndRegionNextResponse = JitNetworkAccessPoliciesList & { +export type AlertsListResourceGroupLevelByRegionResponse = AlertList & { /** * The underlying HTTP response. */ @@ -7935,14 +11646,14 @@ export type JitNetworkAccessPoliciesListByResourceGroupAndRegionNextResponse = J /** * The response body as parsed JSON or XML */ - parsedBody: JitNetworkAccessPoliciesList; + parsedBody: AlertList; }; }; /** - * Contains response data for the list operation. + * Contains response data for the getSubscriptionLevel operation. */ -export type DiscoveredSecuritySolutionsListResponse = DiscoveredSecuritySolutionList & { +export type AlertsGetSubscriptionLevelResponse = Alert & { /** * The underlying HTTP response. */ @@ -7955,14 +11666,14 @@ export type DiscoveredSecuritySolutionsListResponse = DiscoveredSecuritySolution /** * The response body as parsed JSON or XML */ - parsedBody: DiscoveredSecuritySolutionList; + parsedBody: Alert; }; }; /** - * Contains response data for the listByHomeRegion operation. + * Contains response data for the getResourceGroupLevel operation. */ -export type DiscoveredSecuritySolutionsListByHomeRegionResponse = DiscoveredSecuritySolutionList & { +export type AlertsGetResourceGroupLevelResponse = Alert & { /** * The underlying HTTP response. */ @@ -7975,14 +11686,14 @@ export type DiscoveredSecuritySolutionsListByHomeRegionResponse = DiscoveredSecu /** * The response body as parsed JSON or XML */ - parsedBody: DiscoveredSecuritySolutionList; + parsedBody: Alert; }; }; /** - * Contains response data for the get operation. + * Contains response data for the listNext operation. */ -export type DiscoveredSecuritySolutionsGetResponse = DiscoveredSecuritySolution & { +export type AlertsListNextResponse = AlertList & { /** * The underlying HTTP response. */ @@ -7995,14 +11706,14 @@ export type DiscoveredSecuritySolutionsGetResponse = DiscoveredSecuritySolution /** * The response body as parsed JSON or XML */ - parsedBody: DiscoveredSecuritySolution; + parsedBody: AlertList; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the listByResourceGroupNext operation. */ -export type DiscoveredSecuritySolutionsListNextResponse = DiscoveredSecuritySolutionList & { +export type AlertsListByResourceGroupNextResponse = AlertList & { /** * The underlying HTTP response. */ @@ -8015,14 +11726,14 @@ export type DiscoveredSecuritySolutionsListNextResponse = DiscoveredSecuritySolu /** * The response body as parsed JSON or XML */ - parsedBody: DiscoveredSecuritySolutionList; + parsedBody: AlertList; }; }; /** - * Contains response data for the listByHomeRegionNext operation. + * Contains response data for the listSubscriptionLevelByRegionNext operation. */ -export type DiscoveredSecuritySolutionsListByHomeRegionNextResponse = DiscoveredSecuritySolutionList & { +export type AlertsListSubscriptionLevelByRegionNextResponse = AlertList & { /** * The underlying HTTP response. */ @@ -8035,14 +11746,14 @@ export type DiscoveredSecuritySolutionsListByHomeRegionNextResponse = Discovered /** * The response body as parsed JSON or XML */ - parsedBody: DiscoveredSecuritySolutionList; + parsedBody: AlertList; }; }; /** - * Contains response data for the list operation. + * Contains response data for the listResourceGroupLevelByRegionNext operation. */ -export type ExternalSecuritySolutionsListResponse = ExternalSecuritySolutionList & { +export type AlertsListResourceGroupLevelByRegionNextResponse = AlertList & { /** * The underlying HTTP response. */ @@ -8055,14 +11766,14 @@ export type ExternalSecuritySolutionsListResponse = ExternalSecuritySolutionList /** * The response body as parsed JSON or XML */ - parsedBody: ExternalSecuritySolutionList; + parsedBody: AlertList; }; }; /** - * Contains response data for the listByHomeRegion operation. + * Contains response data for the list operation. */ -export type ExternalSecuritySolutionsListByHomeRegionResponse = ExternalSecuritySolutionList & { +export type SettingsListResponse = SettingsList & { /** * The underlying HTTP response. */ @@ -8075,14 +11786,14 @@ export type ExternalSecuritySolutionsListByHomeRegionResponse = ExternalSecurity /** * The response body as parsed JSON or XML */ - parsedBody: ExternalSecuritySolutionList; + parsedBody: SettingsList; }; }; /** * Contains response data for the get operation. */ -export type ExternalSecuritySolutionsGetResponse = ExternalSecuritySolutionUnion & { +export type SettingsGetResponse = SettingUnion & { /** * The underlying HTTP response. */ @@ -8095,14 +11806,14 @@ export type ExternalSecuritySolutionsGetResponse = ExternalSecuritySolutionUnion /** * The response body as parsed JSON or XML */ - parsedBody: ExternalSecuritySolutionUnion; + parsedBody: SettingUnion; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the update operation. */ -export type ExternalSecuritySolutionsListNextResponse = ExternalSecuritySolutionList & { +export type SettingsUpdateResponse = SettingUnion & { /** * The underlying HTTP response. */ @@ -8115,14 +11826,14 @@ export type ExternalSecuritySolutionsListNextResponse = ExternalSecuritySolution /** * The response body as parsed JSON or XML */ - parsedBody: ExternalSecuritySolutionList; + parsedBody: SettingUnion; }; }; /** - * Contains response data for the listByHomeRegionNext operation. + * Contains response data for the listNext operation. */ -export type ExternalSecuritySolutionsListByHomeRegionNextResponse = ExternalSecuritySolutionList & { +export type SettingsListNextResponse = SettingsList & { /** * The underlying HTTP response. */ @@ -8135,14 +11846,14 @@ export type ExternalSecuritySolutionsListByHomeRegionNextResponse = ExternalSecu /** * The response body as parsed JSON or XML */ - parsedBody: ExternalSecuritySolutionList; + parsedBody: SettingsList; }; }; /** * Contains response data for the list operation. */ -export type SecureScoresListResponse = SecureScoresList & { +export type IngestionSettingsListResponse = IngestionSettingList & { /** * The underlying HTTP response. */ @@ -8155,14 +11866,14 @@ export type SecureScoresListResponse = SecureScoresList & { /** * The response body as parsed JSON or XML */ - parsedBody: SecureScoresList; + parsedBody: IngestionSettingList; }; }; /** * Contains response data for the get operation. */ -export type SecureScoresGetResponse = SecureScoreItem & { +export type IngestionSettingsGetResponse = IngestionSetting & { /** * The underlying HTTP response. */ @@ -8175,14 +11886,14 @@ export type SecureScoresGetResponse = SecureScoreItem & { /** * The response body as parsed JSON or XML */ - parsedBody: SecureScoreItem; + parsedBody: IngestionSetting; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the create operation. */ -export type SecureScoresListNextResponse = SecureScoresList & { +export type IngestionSettingsCreateResponse = IngestionSetting & { /** * The underlying HTTP response. */ @@ -8195,14 +11906,14 @@ export type SecureScoresListNextResponse = SecureScoresList & { /** * The response body as parsed JSON or XML */ - parsedBody: SecureScoresList; + parsedBody: IngestionSetting; }; }; /** - * Contains response data for the listBySecureScore operation. + * Contains response data for the listTokens operation. */ -export type SecureScoreControlsListBySecureScoreResponse = SecureScoreControlList & { +export type IngestionSettingsListTokensResponse = IngestionSettingToken & { /** * The underlying HTTP response. */ @@ -8215,14 +11926,14 @@ export type SecureScoreControlsListBySecureScoreResponse = SecureScoreControlLis /** * The response body as parsed JSON or XML */ - parsedBody: SecureScoreControlList; + parsedBody: IngestionSettingToken; }; }; /** - * Contains response data for the list operation. + * Contains response data for the listConnectionStrings operation. */ -export type SecureScoreControlsListResponse = SecureScoreControlList & { +export type IngestionSettingsListConnectionStringsResponse = ConnectionStrings & { /** * The underlying HTTP response. */ @@ -8235,14 +11946,14 @@ export type SecureScoreControlsListResponse = SecureScoreControlList & { /** * The response body as parsed JSON or XML */ - parsedBody: SecureScoreControlList; + parsedBody: ConnectionStrings; }; }; /** - * Contains response data for the listBySecureScoreNext operation. + * Contains response data for the listNext operation. */ -export type SecureScoreControlsListBySecureScoreNextResponse = SecureScoreControlList & { +export type IngestionSettingsListNextResponse = IngestionSettingList & { /** * The underlying HTTP response. */ @@ -8255,14 +11966,14 @@ export type SecureScoreControlsListBySecureScoreNextResponse = SecureScoreContro /** * The response body as parsed JSON or XML */ - parsedBody: SecureScoreControlList; + parsedBody: IngestionSettingList; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the listByExtendedResource operation. */ -export type SecureScoreControlsListNextResponse = SecureScoreControlList & { +export type SoftwareInventoriesListByExtendedResourceResponse = SoftwaresList & { /** * The underlying HTTP response. */ @@ -8275,14 +11986,14 @@ export type SecureScoreControlsListNextResponse = SecureScoreControlList & { /** * The response body as parsed JSON or XML */ - parsedBody: SecureScoreControlList; + parsedBody: SoftwaresList; }; }; /** - * Contains response data for the list operation. + * Contains response data for the listBySubscription operation. */ -export type SecureScoreControlDefinitionsListResponse = SecureScoreControlDefinitionList & { +export type SoftwareInventoriesListBySubscriptionResponse = SoftwaresList & { /** * The underlying HTTP response. */ @@ -8295,14 +12006,14 @@ export type SecureScoreControlDefinitionsListResponse = SecureScoreControlDefini /** * The response body as parsed JSON or XML */ - parsedBody: SecureScoreControlDefinitionList; + parsedBody: SoftwaresList; }; }; /** - * Contains response data for the listBySubscription operation. + * Contains response data for the get operation. */ -export type SecureScoreControlDefinitionsListBySubscriptionResponse = SecureScoreControlDefinitionList & { +export type SoftwareInventoriesGetResponse = Software & { /** * The underlying HTTP response. */ @@ -8315,14 +12026,14 @@ export type SecureScoreControlDefinitionsListBySubscriptionResponse = SecureScor /** * The response body as parsed JSON or XML */ - parsedBody: SecureScoreControlDefinitionList; + parsedBody: Software; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the listByExtendedResourceNext operation. */ -export type SecureScoreControlDefinitionsListNextResponse = SecureScoreControlDefinitionList & { +export type SoftwareInventoriesListByExtendedResourceNextResponse = SoftwaresList & { /** * The underlying HTTP response. */ @@ -8335,14 +12046,14 @@ export type SecureScoreControlDefinitionsListNextResponse = SecureScoreControlDe /** * The response body as parsed JSON or XML */ - parsedBody: SecureScoreControlDefinitionList; + parsedBody: SoftwaresList; }; }; /** * Contains response data for the listBySubscriptionNext operation. */ -export type SecureScoreControlDefinitionsListBySubscriptionNextResponse = SecureScoreControlDefinitionList & { +export type SoftwareInventoriesListBySubscriptionNextResponse = SoftwaresList & { /** * The underlying HTTP response. */ @@ -8355,6 +12066,6 @@ export type SecureScoreControlDefinitionsListBySubscriptionNextResponse = Secure /** * The response body as parsed JSON or XML */ - parsedBody: SecureScoreControlDefinitionList; + parsedBody: SoftwaresList; }; }; diff --git a/sdk/security/arm-security/src/models/informationProtectionPoliciesMappers.ts b/sdk/security/arm-security/src/models/informationProtectionPoliciesMappers.ts index 817150abe35f..311426e1e10c 100644 --- a/sdk/security/arm-security/src/models/informationProtectionPoliciesMappers.ts +++ b/sdk/security/arm-security/src/models/informationProtectionPoliciesMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -13,9 +13,9 @@ export { AdditionalData, AdvancedThreatProtectionSetting, Alert, - AlertConfidenceReason, AlertEntity, AlertsSuppressionRule, + AlertSyncSettings, AllowlistCustomAlertRule, AmqpC2DMessagesNotInAllowedRange, AmqpC2DRejectedMessagesNotInAllowedRange, @@ -23,54 +23,92 @@ export { AscLocation, AssessmentLinks, AssessmentStatus, + AuthenticationDetailsProperties, AutoProvisioningSetting, + AwAssumeRoleAuthenticationDetailsProperties, + AwsCredsAuthenticationDetailsProperties, AzureResourceDetails, + AzureResourceIdentifier, AzureResourceLink, + Baseline, + BaselineAdjustedResult, BaseResource, + BenchmarkReference, CloudError, Compliance, ComplianceResult, ComplianceSegment, + ConnectionFromIpNotAllowed, ConnectionToIpNotAllowed, + ConnectorSetting, ContainerRegistryVulnerabilityProperties, CustomAlertRule, CVE, CVSS, DataExportSettings, DenylistCustomAlertRule, + Device, DeviceSecurityGroup, DirectMethodInvokesNotInAllowedRange, EffectiveNetworkSecurityGroups, FailedLocalLoginsNotInAllowedRange, FileUploadsNotInAllowedRange, + Firmware, + GcpCredentialsDetailsProperties, HttpC2DMessagesNotInAllowedRange, HttpC2DRejectedMessagesNotInAllowedRange, HttpD2CMessagesNotInAllowedRange, + HybridComputeSettingsProperties, InformationProtectionKeyword, InformationProtectionPolicy, InformationProtectionPolicyList, InformationType, + IngestionSetting, + IotAlertModel, + IotAlertType, + IotDefenderSettingsModel, + IotRecommendationModel, + IotRecommendationType, IoTSecurityAlertedDevice, IoTSecurityDeviceAlert, IoTSecurityDeviceRecommendation, IoTSecuritySolutionAnalyticsModel, IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IotSensorsModel, IoTSeverityMetrics, + IotSitesModel, + IpAddress, ListCustomAlertRule, LocalUserNotAllowed, + LogAnalyticsIdentifier, + MacAddress, MqttC2DMessagesNotInAllowedRange, MqttC2DRejectedMessagesNotInAllowedRange, MqttD2CMessagesNotInAllowedRange, + NetworkInterface, + OnPremiseIotSensor, OnPremiseResourceDetails, + OnPremiseSqlResourceDetails, Pricing, ProcessNotAllowed, + Protocol1, + ProxyServerProperties, + QueryCheck, QueuePurgesNotInAllowedRange, RegulatoryComplianceAssessment, RegulatoryComplianceControl, RegulatoryComplianceStandard, + Remediation, Resource, ResourceDetails, + ResourceIdentifier, Rule, + RuleResults, + RuleResultsProperties, + Scan, + ScanProperties, + ScanResult, + ScanResultProperties, ScopeElement, SecureScoreControlDefinitionItem, SecureScoreControlDefinitionSource, @@ -86,10 +124,13 @@ export { SecurityTask, SecurityTaskParameters, SensitivityLabel, + Sensor, ServerVulnerabilityAssessment, ServerVulnerabilityProperties, + ServicePrincipalProperties, Setting, - SettingResource, + Site, + Software, SqlServerVulnerabilityProperties, SubAssessmentStatus, SuppressionAlertsScope, @@ -97,6 +138,7 @@ export { TimeWindowCustomAlertRule, TwinUpdatesNotInAllowedRange, UnauthorizedOperationsNotInAllowedRange, + VaRule, VendorReference, WorkspaceSetting } from "../models/mappers"; diff --git a/sdk/security/arm-security/src/models/ingestionSettingsMappers.ts b/sdk/security/arm-security/src/models/ingestionSettingsMappers.ts new file mode 100644 index 000000000000..3782812f79e1 --- /dev/null +++ b/sdk/security/arm-security/src/models/ingestionSettingsMappers.ts @@ -0,0 +1,147 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + ActiveConnectionsNotInAllowedRange, + AdaptiveNetworkHardening, + AdditionalData, + AdvancedThreatProtectionSetting, + Alert, + AlertEntity, + AlertsSuppressionRule, + AlertSyncSettings, + AllowlistCustomAlertRule, + AmqpC2DMessagesNotInAllowedRange, + AmqpC2DRejectedMessagesNotInAllowedRange, + AmqpD2CMessagesNotInAllowedRange, + AscLocation, + AssessmentLinks, + AssessmentStatus, + AuthenticationDetailsProperties, + AutoProvisioningSetting, + AwAssumeRoleAuthenticationDetailsProperties, + AwsCredsAuthenticationDetailsProperties, + AzureResourceDetails, + AzureResourceIdentifier, + AzureResourceLink, + Baseline, + BaselineAdjustedResult, + BaseResource, + BenchmarkReference, + CloudError, + Compliance, + ComplianceResult, + ComplianceSegment, + ConnectionFromIpNotAllowed, + ConnectionStrings, + ConnectionToIpNotAllowed, + ConnectorSetting, + ContainerRegistryVulnerabilityProperties, + CustomAlertRule, + CVE, + CVSS, + DataExportSettings, + DenylistCustomAlertRule, + Device, + DeviceSecurityGroup, + DirectMethodInvokesNotInAllowedRange, + EffectiveNetworkSecurityGroups, + FailedLocalLoginsNotInAllowedRange, + FileUploadsNotInAllowedRange, + Firmware, + GcpCredentialsDetailsProperties, + HttpC2DMessagesNotInAllowedRange, + HttpC2DRejectedMessagesNotInAllowedRange, + HttpD2CMessagesNotInAllowedRange, + HybridComputeSettingsProperties, + InformationProtectionKeyword, + InformationProtectionPolicy, + InformationType, + IngestionConnectionString, + IngestionSetting, + IngestionSettingList, + IngestionSettingToken, + IotAlertModel, + IotAlertType, + IotDefenderSettingsModel, + IotRecommendationModel, + IotRecommendationType, + IoTSecurityAlertedDevice, + IoTSecurityDeviceAlert, + IoTSecurityDeviceRecommendation, + IoTSecuritySolutionAnalyticsModel, + IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IotSensorsModel, + IoTSeverityMetrics, + IotSitesModel, + IpAddress, + ListCustomAlertRule, + LocalUserNotAllowed, + LogAnalyticsIdentifier, + MacAddress, + MqttC2DMessagesNotInAllowedRange, + MqttC2DRejectedMessagesNotInAllowedRange, + MqttD2CMessagesNotInAllowedRange, + NetworkInterface, + OnPremiseIotSensor, + OnPremiseResourceDetails, + OnPremiseSqlResourceDetails, + Pricing, + ProcessNotAllowed, + Protocol1, + ProxyServerProperties, + QueryCheck, + QueuePurgesNotInAllowedRange, + RegulatoryComplianceAssessment, + RegulatoryComplianceControl, + RegulatoryComplianceStandard, + Remediation, + Resource, + ResourceDetails, + ResourceIdentifier, + Rule, + RuleResults, + RuleResultsProperties, + Scan, + ScanProperties, + ScanResult, + ScanResultProperties, + ScopeElement, + SecureScoreControlDefinitionItem, + SecureScoreControlDefinitionSource, + SecureScoreControlDetails, + SecureScoreItem, + SecurityAssessment, + SecurityAssessmentMetadata, + SecurityAssessmentMetadataPartnerData, + SecurityAssessmentMetadataProperties, + SecurityAssessmentPartnerData, + SecurityContact, + SecuritySubAssessment, + SecurityTask, + SecurityTaskParameters, + SensitivityLabel, + Sensor, + ServerVulnerabilityAssessment, + ServerVulnerabilityProperties, + ServicePrincipalProperties, + Setting, + Site, + Software, + SqlServerVulnerabilityProperties, + SubAssessmentStatus, + SuppressionAlertsScope, + ThresholdCustomAlertRule, + TimeWindowCustomAlertRule, + TwinUpdatesNotInAllowedRange, + UnauthorizedOperationsNotInAllowedRange, + VaRule, + VendorReference, + WorkspaceSetting +} from "../models/mappers"; diff --git a/sdk/security/arm-security/src/models/iotAlertTypesMappers.ts b/sdk/security/arm-security/src/models/iotAlertTypesMappers.ts new file mode 100644 index 000000000000..062f7953b60c --- /dev/null +++ b/sdk/security/arm-security/src/models/iotAlertTypesMappers.ts @@ -0,0 +1,144 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + ActiveConnectionsNotInAllowedRange, + AdaptiveNetworkHardening, + AdditionalData, + AdvancedThreatProtectionSetting, + Alert, + AlertEntity, + AlertsSuppressionRule, + AlertSyncSettings, + AllowlistCustomAlertRule, + AmqpC2DMessagesNotInAllowedRange, + AmqpC2DRejectedMessagesNotInAllowedRange, + AmqpD2CMessagesNotInAllowedRange, + AscLocation, + AssessmentLinks, + AssessmentStatus, + AuthenticationDetailsProperties, + AutoProvisioningSetting, + AwAssumeRoleAuthenticationDetailsProperties, + AwsCredsAuthenticationDetailsProperties, + AzureResourceDetails, + AzureResourceIdentifier, + AzureResourceLink, + Baseline, + BaselineAdjustedResult, + BaseResource, + BenchmarkReference, + CloudError, + Compliance, + ComplianceResult, + ComplianceSegment, + ConnectionFromIpNotAllowed, + ConnectionToIpNotAllowed, + ConnectorSetting, + ContainerRegistryVulnerabilityProperties, + CustomAlertRule, + CVE, + CVSS, + DataExportSettings, + DenylistCustomAlertRule, + Device, + DeviceSecurityGroup, + DirectMethodInvokesNotInAllowedRange, + EffectiveNetworkSecurityGroups, + FailedLocalLoginsNotInAllowedRange, + FileUploadsNotInAllowedRange, + Firmware, + GcpCredentialsDetailsProperties, + HttpC2DMessagesNotInAllowedRange, + HttpC2DRejectedMessagesNotInAllowedRange, + HttpD2CMessagesNotInAllowedRange, + HybridComputeSettingsProperties, + InformationProtectionKeyword, + InformationProtectionPolicy, + InformationType, + IngestionSetting, + IotAlertModel, + IotAlertType, + IotAlertTypeList, + IotDefenderSettingsModel, + IotRecommendationModel, + IotRecommendationType, + IoTSecurityAlertedDevice, + IoTSecurityDeviceAlert, + IoTSecurityDeviceRecommendation, + IoTSecuritySolutionAnalyticsModel, + IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IotSensorsModel, + IoTSeverityMetrics, + IotSitesModel, + IpAddress, + ListCustomAlertRule, + LocalUserNotAllowed, + LogAnalyticsIdentifier, + MacAddress, + MqttC2DMessagesNotInAllowedRange, + MqttC2DRejectedMessagesNotInAllowedRange, + MqttD2CMessagesNotInAllowedRange, + NetworkInterface, + OnPremiseIotSensor, + OnPremiseResourceDetails, + OnPremiseSqlResourceDetails, + Pricing, + ProcessNotAllowed, + Protocol1, + ProxyServerProperties, + QueryCheck, + QueuePurgesNotInAllowedRange, + RegulatoryComplianceAssessment, + RegulatoryComplianceControl, + RegulatoryComplianceStandard, + Remediation, + Resource, + ResourceDetails, + ResourceIdentifier, + Rule, + RuleResults, + RuleResultsProperties, + Scan, + ScanProperties, + ScanResult, + ScanResultProperties, + ScopeElement, + SecureScoreControlDefinitionItem, + SecureScoreControlDefinitionSource, + SecureScoreControlDetails, + SecureScoreItem, + SecurityAssessment, + SecurityAssessmentMetadata, + SecurityAssessmentMetadataPartnerData, + SecurityAssessmentMetadataProperties, + SecurityAssessmentPartnerData, + SecurityContact, + SecuritySubAssessment, + SecurityTask, + SecurityTaskParameters, + SensitivityLabel, + Sensor, + ServerVulnerabilityAssessment, + ServerVulnerabilityProperties, + ServicePrincipalProperties, + Setting, + Site, + Software, + SqlServerVulnerabilityProperties, + SubAssessmentStatus, + SuppressionAlertsScope, + ThresholdCustomAlertRule, + TimeWindowCustomAlertRule, + TwinUpdatesNotInAllowedRange, + UnauthorizedOperationsNotInAllowedRange, + VaRule, + VendorReference, + WorkspaceSetting +} from "../models/mappers"; diff --git a/sdk/security/arm-security/src/models/iotAlertsMappers.ts b/sdk/security/arm-security/src/models/iotAlertsMappers.ts new file mode 100644 index 000000000000..c05b8763c45d --- /dev/null +++ b/sdk/security/arm-security/src/models/iotAlertsMappers.ts @@ -0,0 +1,144 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + ActiveConnectionsNotInAllowedRange, + AdaptiveNetworkHardening, + AdditionalData, + AdvancedThreatProtectionSetting, + Alert, + AlertEntity, + AlertsSuppressionRule, + AlertSyncSettings, + AllowlistCustomAlertRule, + AmqpC2DMessagesNotInAllowedRange, + AmqpC2DRejectedMessagesNotInAllowedRange, + AmqpD2CMessagesNotInAllowedRange, + AscLocation, + AssessmentLinks, + AssessmentStatus, + AuthenticationDetailsProperties, + AutoProvisioningSetting, + AwAssumeRoleAuthenticationDetailsProperties, + AwsCredsAuthenticationDetailsProperties, + AzureResourceDetails, + AzureResourceIdentifier, + AzureResourceLink, + Baseline, + BaselineAdjustedResult, + BaseResource, + BenchmarkReference, + CloudError, + Compliance, + ComplianceResult, + ComplianceSegment, + ConnectionFromIpNotAllowed, + ConnectionToIpNotAllowed, + ConnectorSetting, + ContainerRegistryVulnerabilityProperties, + CustomAlertRule, + CVE, + CVSS, + DataExportSettings, + DenylistCustomAlertRule, + Device, + DeviceSecurityGroup, + DirectMethodInvokesNotInAllowedRange, + EffectiveNetworkSecurityGroups, + FailedLocalLoginsNotInAllowedRange, + FileUploadsNotInAllowedRange, + Firmware, + GcpCredentialsDetailsProperties, + HttpC2DMessagesNotInAllowedRange, + HttpC2DRejectedMessagesNotInAllowedRange, + HttpD2CMessagesNotInAllowedRange, + HybridComputeSettingsProperties, + InformationProtectionKeyword, + InformationProtectionPolicy, + InformationType, + IngestionSetting, + IotAlertListModel, + IotAlertModel, + IotAlertType, + IotDefenderSettingsModel, + IotRecommendationModel, + IotRecommendationType, + IoTSecurityAlertedDevice, + IoTSecurityDeviceAlert, + IoTSecurityDeviceRecommendation, + IoTSecuritySolutionAnalyticsModel, + IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IotSensorsModel, + IoTSeverityMetrics, + IotSitesModel, + IpAddress, + ListCustomAlertRule, + LocalUserNotAllowed, + LogAnalyticsIdentifier, + MacAddress, + MqttC2DMessagesNotInAllowedRange, + MqttC2DRejectedMessagesNotInAllowedRange, + MqttD2CMessagesNotInAllowedRange, + NetworkInterface, + OnPremiseIotSensor, + OnPremiseResourceDetails, + OnPremiseSqlResourceDetails, + Pricing, + ProcessNotAllowed, + Protocol1, + ProxyServerProperties, + QueryCheck, + QueuePurgesNotInAllowedRange, + RegulatoryComplianceAssessment, + RegulatoryComplianceControl, + RegulatoryComplianceStandard, + Remediation, + Resource, + ResourceDetails, + ResourceIdentifier, + Rule, + RuleResults, + RuleResultsProperties, + Scan, + ScanProperties, + ScanResult, + ScanResultProperties, + ScopeElement, + SecureScoreControlDefinitionItem, + SecureScoreControlDefinitionSource, + SecureScoreControlDetails, + SecureScoreItem, + SecurityAssessment, + SecurityAssessmentMetadata, + SecurityAssessmentMetadataPartnerData, + SecurityAssessmentMetadataProperties, + SecurityAssessmentPartnerData, + SecurityContact, + SecuritySubAssessment, + SecurityTask, + SecurityTaskParameters, + SensitivityLabel, + Sensor, + ServerVulnerabilityAssessment, + ServerVulnerabilityProperties, + ServicePrincipalProperties, + Setting, + Site, + Software, + SqlServerVulnerabilityProperties, + SubAssessmentStatus, + SuppressionAlertsScope, + ThresholdCustomAlertRule, + TimeWindowCustomAlertRule, + TwinUpdatesNotInAllowedRange, + UnauthorizedOperationsNotInAllowedRange, + VaRule, + VendorReference, + WorkspaceSetting +} from "../models/mappers"; diff --git a/sdk/security/arm-security/src/models/iotDefenderSettingsMappers.ts b/sdk/security/arm-security/src/models/iotDefenderSettingsMappers.ts new file mode 100644 index 000000000000..4170abcc4b17 --- /dev/null +++ b/sdk/security/arm-security/src/models/iotDefenderSettingsMappers.ts @@ -0,0 +1,153 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + ActiveConnectionsNotInAllowedRange, + AdaptiveNetworkHardening, + AdditionalData, + AdvancedThreatProtectionSetting, + Alert, + AlertEntity, + AlertsSuppressionRule, + AlertSyncSettings, + AllowlistCustomAlertRule, + AmqpC2DMessagesNotInAllowedRange, + AmqpC2DRejectedMessagesNotInAllowedRange, + AmqpD2CMessagesNotInAllowedRange, + AscLocation, + AssessmentLinks, + AssessmentStatus, + AuthenticationDetailsProperties, + AutoProvisioningSetting, + AwAssumeRoleAuthenticationDetailsProperties, + AwsCredsAuthenticationDetailsProperties, + AzureResourceDetails, + AzureResourceIdentifier, + AzureResourceLink, + Baseline, + BaselineAdjustedResult, + BaseResource, + BenchmarkReference, + CloudError, + Compliance, + ComplianceResult, + ComplianceSegment, + ConnectionFromIpNotAllowed, + ConnectionToIpNotAllowed, + ConnectorSetting, + ContainerRegistryVulnerabilityProperties, + CustomAlertRule, + CVE, + CVSS, + DataExportSettings, + DenylistCustomAlertRule, + Device, + DeviceSecurityGroup, + DirectMethodInvokesNotInAllowedRange, + EffectiveNetworkSecurityGroups, + FailedLocalLoginsNotInAllowedRange, + FileUploadsNotInAllowedRange, + Firmware, + GcpCredentialsDetailsProperties, + HttpC2DMessagesNotInAllowedRange, + HttpC2DRejectedMessagesNotInAllowedRange, + HttpD2CMessagesNotInAllowedRange, + HybridComputeSettingsProperties, + InformationProtectionKeyword, + InformationProtectionPolicy, + InformationType, + IngestionSetting, + IotAlertModel, + IotAlertType, + IotDefenderSettingsList, + IotDefenderSettingsModel, + IotRecommendationModel, + IotRecommendationType, + IoTSecurityAlertedDevice, + IoTSecurityDeviceAlert, + IoTSecurityDeviceRecommendation, + IoTSecuritySolutionAnalyticsModel, + IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IotSensorsModel, + IoTSeverityMetrics, + IotSitesModel, + IpAddress, + ListCustomAlertRule, + LocalUserNotAllowed, + LogAnalyticsIdentifier, + MacAddress, + MqttC2DMessagesNotInAllowedRange, + MqttC2DRejectedMessagesNotInAllowedRange, + MqttD2CMessagesNotInAllowedRange, + NetworkInterface, + OnPremiseIotSensor, + OnPremiseResourceDetails, + OnPremiseSqlResourceDetails, + PackageDownloadInfo, + PackageDownloads, + PackageDownloadsCentralManager, + PackageDownloadsCentralManagerFull, + PackageDownloadsCentralManagerFullOvf, + PackageDownloadsSensor, + PackageDownloadsSensorFull, + PackageDownloadsSensorFullOvf, + Pricing, + ProcessNotAllowed, + Protocol1, + ProxyServerProperties, + QueryCheck, + QueuePurgesNotInAllowedRange, + RegulatoryComplianceAssessment, + RegulatoryComplianceControl, + RegulatoryComplianceStandard, + Remediation, + Resource, + ResourceDetails, + ResourceIdentifier, + Rule, + RuleResults, + RuleResultsProperties, + Scan, + ScanProperties, + ScanResult, + ScanResultProperties, + ScopeElement, + SecureScoreControlDefinitionItem, + SecureScoreControlDefinitionSource, + SecureScoreControlDetails, + SecureScoreItem, + SecurityAssessment, + SecurityAssessmentMetadata, + SecurityAssessmentMetadataPartnerData, + SecurityAssessmentMetadataProperties, + SecurityAssessmentPartnerData, + SecurityContact, + SecuritySubAssessment, + SecurityTask, + SecurityTaskParameters, + SensitivityLabel, + Sensor, + ServerVulnerabilityAssessment, + ServerVulnerabilityProperties, + ServicePrincipalProperties, + Setting, + Site, + Software, + SqlServerVulnerabilityProperties, + SubAssessmentStatus, + SuppressionAlertsScope, + ThresholdCustomAlertRule, + TimeWindowCustomAlertRule, + TwinUpdatesNotInAllowedRange, + UnauthorizedOperationsNotInAllowedRange, + UpgradePackageDownloadInfo, + VaRule, + VendorReference, + WorkspaceSetting +} from "../models/mappers"; diff --git a/sdk/security/arm-security/src/models/iotRecommendationTypesMappers.ts b/sdk/security/arm-security/src/models/iotRecommendationTypesMappers.ts new file mode 100644 index 000000000000..89454e2f7d7f --- /dev/null +++ b/sdk/security/arm-security/src/models/iotRecommendationTypesMappers.ts @@ -0,0 +1,144 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + ActiveConnectionsNotInAllowedRange, + AdaptiveNetworkHardening, + AdditionalData, + AdvancedThreatProtectionSetting, + Alert, + AlertEntity, + AlertsSuppressionRule, + AlertSyncSettings, + AllowlistCustomAlertRule, + AmqpC2DMessagesNotInAllowedRange, + AmqpC2DRejectedMessagesNotInAllowedRange, + AmqpD2CMessagesNotInAllowedRange, + AscLocation, + AssessmentLinks, + AssessmentStatus, + AuthenticationDetailsProperties, + AutoProvisioningSetting, + AwAssumeRoleAuthenticationDetailsProperties, + AwsCredsAuthenticationDetailsProperties, + AzureResourceDetails, + AzureResourceIdentifier, + AzureResourceLink, + Baseline, + BaselineAdjustedResult, + BaseResource, + BenchmarkReference, + CloudError, + Compliance, + ComplianceResult, + ComplianceSegment, + ConnectionFromIpNotAllowed, + ConnectionToIpNotAllowed, + ConnectorSetting, + ContainerRegistryVulnerabilityProperties, + CustomAlertRule, + CVE, + CVSS, + DataExportSettings, + DenylistCustomAlertRule, + Device, + DeviceSecurityGroup, + DirectMethodInvokesNotInAllowedRange, + EffectiveNetworkSecurityGroups, + FailedLocalLoginsNotInAllowedRange, + FileUploadsNotInAllowedRange, + Firmware, + GcpCredentialsDetailsProperties, + HttpC2DMessagesNotInAllowedRange, + HttpC2DRejectedMessagesNotInAllowedRange, + HttpD2CMessagesNotInAllowedRange, + HybridComputeSettingsProperties, + InformationProtectionKeyword, + InformationProtectionPolicy, + InformationType, + IngestionSetting, + IotAlertModel, + IotAlertType, + IotDefenderSettingsModel, + IotRecommendationModel, + IotRecommendationType, + IotRecommendationTypeList, + IoTSecurityAlertedDevice, + IoTSecurityDeviceAlert, + IoTSecurityDeviceRecommendation, + IoTSecuritySolutionAnalyticsModel, + IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IotSensorsModel, + IoTSeverityMetrics, + IotSitesModel, + IpAddress, + ListCustomAlertRule, + LocalUserNotAllowed, + LogAnalyticsIdentifier, + MacAddress, + MqttC2DMessagesNotInAllowedRange, + MqttC2DRejectedMessagesNotInAllowedRange, + MqttD2CMessagesNotInAllowedRange, + NetworkInterface, + OnPremiseIotSensor, + OnPremiseResourceDetails, + OnPremiseSqlResourceDetails, + Pricing, + ProcessNotAllowed, + Protocol1, + ProxyServerProperties, + QueryCheck, + QueuePurgesNotInAllowedRange, + RegulatoryComplianceAssessment, + RegulatoryComplianceControl, + RegulatoryComplianceStandard, + Remediation, + Resource, + ResourceDetails, + ResourceIdentifier, + Rule, + RuleResults, + RuleResultsProperties, + Scan, + ScanProperties, + ScanResult, + ScanResultProperties, + ScopeElement, + SecureScoreControlDefinitionItem, + SecureScoreControlDefinitionSource, + SecureScoreControlDetails, + SecureScoreItem, + SecurityAssessment, + SecurityAssessmentMetadata, + SecurityAssessmentMetadataPartnerData, + SecurityAssessmentMetadataProperties, + SecurityAssessmentPartnerData, + SecurityContact, + SecuritySubAssessment, + SecurityTask, + SecurityTaskParameters, + SensitivityLabel, + Sensor, + ServerVulnerabilityAssessment, + ServerVulnerabilityProperties, + ServicePrincipalProperties, + Setting, + Site, + Software, + SqlServerVulnerabilityProperties, + SubAssessmentStatus, + SuppressionAlertsScope, + ThresholdCustomAlertRule, + TimeWindowCustomAlertRule, + TwinUpdatesNotInAllowedRange, + UnauthorizedOperationsNotInAllowedRange, + VaRule, + VendorReference, + WorkspaceSetting +} from "../models/mappers"; diff --git a/sdk/security/arm-security/src/models/iotRecommendationsMappers.ts b/sdk/security/arm-security/src/models/iotRecommendationsMappers.ts new file mode 100644 index 000000000000..ea269f0ce54d --- /dev/null +++ b/sdk/security/arm-security/src/models/iotRecommendationsMappers.ts @@ -0,0 +1,144 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + ActiveConnectionsNotInAllowedRange, + AdaptiveNetworkHardening, + AdditionalData, + AdvancedThreatProtectionSetting, + Alert, + AlertEntity, + AlertsSuppressionRule, + AlertSyncSettings, + AllowlistCustomAlertRule, + AmqpC2DMessagesNotInAllowedRange, + AmqpC2DRejectedMessagesNotInAllowedRange, + AmqpD2CMessagesNotInAllowedRange, + AscLocation, + AssessmentLinks, + AssessmentStatus, + AuthenticationDetailsProperties, + AutoProvisioningSetting, + AwAssumeRoleAuthenticationDetailsProperties, + AwsCredsAuthenticationDetailsProperties, + AzureResourceDetails, + AzureResourceIdentifier, + AzureResourceLink, + Baseline, + BaselineAdjustedResult, + BaseResource, + BenchmarkReference, + CloudError, + Compliance, + ComplianceResult, + ComplianceSegment, + ConnectionFromIpNotAllowed, + ConnectionToIpNotAllowed, + ConnectorSetting, + ContainerRegistryVulnerabilityProperties, + CustomAlertRule, + CVE, + CVSS, + DataExportSettings, + DenylistCustomAlertRule, + Device, + DeviceSecurityGroup, + DirectMethodInvokesNotInAllowedRange, + EffectiveNetworkSecurityGroups, + FailedLocalLoginsNotInAllowedRange, + FileUploadsNotInAllowedRange, + Firmware, + GcpCredentialsDetailsProperties, + HttpC2DMessagesNotInAllowedRange, + HttpC2DRejectedMessagesNotInAllowedRange, + HttpD2CMessagesNotInAllowedRange, + HybridComputeSettingsProperties, + InformationProtectionKeyword, + InformationProtectionPolicy, + InformationType, + IngestionSetting, + IotAlertModel, + IotAlertType, + IotDefenderSettingsModel, + IotRecommendationListModel, + IotRecommendationModel, + IotRecommendationType, + IoTSecurityAlertedDevice, + IoTSecurityDeviceAlert, + IoTSecurityDeviceRecommendation, + IoTSecuritySolutionAnalyticsModel, + IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IotSensorsModel, + IoTSeverityMetrics, + IotSitesModel, + IpAddress, + ListCustomAlertRule, + LocalUserNotAllowed, + LogAnalyticsIdentifier, + MacAddress, + MqttC2DMessagesNotInAllowedRange, + MqttC2DRejectedMessagesNotInAllowedRange, + MqttD2CMessagesNotInAllowedRange, + NetworkInterface, + OnPremiseIotSensor, + OnPremiseResourceDetails, + OnPremiseSqlResourceDetails, + Pricing, + ProcessNotAllowed, + Protocol1, + ProxyServerProperties, + QueryCheck, + QueuePurgesNotInAllowedRange, + RegulatoryComplianceAssessment, + RegulatoryComplianceControl, + RegulatoryComplianceStandard, + Remediation, + Resource, + ResourceDetails, + ResourceIdentifier, + Rule, + RuleResults, + RuleResultsProperties, + Scan, + ScanProperties, + ScanResult, + ScanResultProperties, + ScopeElement, + SecureScoreControlDefinitionItem, + SecureScoreControlDefinitionSource, + SecureScoreControlDetails, + SecureScoreItem, + SecurityAssessment, + SecurityAssessmentMetadata, + SecurityAssessmentMetadataPartnerData, + SecurityAssessmentMetadataProperties, + SecurityAssessmentPartnerData, + SecurityContact, + SecuritySubAssessment, + SecurityTask, + SecurityTaskParameters, + SensitivityLabel, + Sensor, + ServerVulnerabilityAssessment, + ServerVulnerabilityProperties, + ServicePrincipalProperties, + Setting, + Site, + Software, + SqlServerVulnerabilityProperties, + SubAssessmentStatus, + SuppressionAlertsScope, + ThresholdCustomAlertRule, + TimeWindowCustomAlertRule, + TwinUpdatesNotInAllowedRange, + UnauthorizedOperationsNotInAllowedRange, + VaRule, + VendorReference, + WorkspaceSetting +} from "../models/mappers"; diff --git a/sdk/security/arm-security/src/models/iotSecuritySolutionAnalyticsMappers.ts b/sdk/security/arm-security/src/models/iotSecuritySolutionAnalyticsMappers.ts index fed19cfb3888..b0a2893e6450 100644 --- a/sdk/security/arm-security/src/models/iotSecuritySolutionAnalyticsMappers.ts +++ b/sdk/security/arm-security/src/models/iotSecuritySolutionAnalyticsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -13,9 +13,9 @@ export { AdditionalData, AdvancedThreatProtectionSetting, Alert, - AlertConfidenceReason, AlertEntity, AlertsSuppressionRule, + AlertSyncSettings, AllowlistCustomAlertRule, AmqpC2DMessagesNotInAllowedRange, AmqpC2DRejectedMessagesNotInAllowedRange, @@ -23,54 +23,92 @@ export { AscLocation, AssessmentLinks, AssessmentStatus, + AuthenticationDetailsProperties, AutoProvisioningSetting, + AwAssumeRoleAuthenticationDetailsProperties, + AwsCredsAuthenticationDetailsProperties, AzureResourceDetails, + AzureResourceIdentifier, AzureResourceLink, + Baseline, + BaselineAdjustedResult, BaseResource, + BenchmarkReference, CloudError, Compliance, ComplianceResult, ComplianceSegment, + ConnectionFromIpNotAllowed, ConnectionToIpNotAllowed, + ConnectorSetting, ContainerRegistryVulnerabilityProperties, CustomAlertRule, CVE, CVSS, DataExportSettings, DenylistCustomAlertRule, + Device, DeviceSecurityGroup, DirectMethodInvokesNotInAllowedRange, EffectiveNetworkSecurityGroups, FailedLocalLoginsNotInAllowedRange, FileUploadsNotInAllowedRange, + Firmware, + GcpCredentialsDetailsProperties, HttpC2DMessagesNotInAllowedRange, HttpC2DRejectedMessagesNotInAllowedRange, HttpD2CMessagesNotInAllowedRange, + HybridComputeSettingsProperties, InformationProtectionKeyword, InformationProtectionPolicy, InformationType, + IngestionSetting, + IotAlertModel, + IotAlertType, + IotDefenderSettingsModel, + IotRecommendationModel, + IotRecommendationType, IoTSecurityAlertedDevice, IoTSecurityDeviceAlert, IoTSecurityDeviceRecommendation, IoTSecuritySolutionAnalyticsModel, IoTSecuritySolutionAnalyticsModelList, IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IotSensorsModel, IoTSeverityMetrics, + IotSitesModel, + IpAddress, ListCustomAlertRule, LocalUserNotAllowed, + LogAnalyticsIdentifier, + MacAddress, MqttC2DMessagesNotInAllowedRange, MqttC2DRejectedMessagesNotInAllowedRange, MqttD2CMessagesNotInAllowedRange, + NetworkInterface, + OnPremiseIotSensor, OnPremiseResourceDetails, + OnPremiseSqlResourceDetails, Pricing, ProcessNotAllowed, + Protocol1, + ProxyServerProperties, + QueryCheck, QueuePurgesNotInAllowedRange, RegulatoryComplianceAssessment, RegulatoryComplianceControl, RegulatoryComplianceStandard, + Remediation, Resource, ResourceDetails, + ResourceIdentifier, Rule, + RuleResults, + RuleResultsProperties, + Scan, + ScanProperties, + ScanResult, + ScanResultProperties, ScopeElement, SecureScoreControlDefinitionItem, SecureScoreControlDefinitionSource, @@ -86,10 +124,13 @@ export { SecurityTask, SecurityTaskParameters, SensitivityLabel, + Sensor, ServerVulnerabilityAssessment, ServerVulnerabilityProperties, + ServicePrincipalProperties, Setting, - SettingResource, + Site, + Software, SqlServerVulnerabilityProperties, SubAssessmentStatus, SuppressionAlertsScope, @@ -97,6 +138,7 @@ export { TimeWindowCustomAlertRule, TwinUpdatesNotInAllowedRange, UnauthorizedOperationsNotInAllowedRange, + VaRule, VendorReference, WorkspaceSetting } from "../models/mappers"; diff --git a/sdk/security/arm-security/src/models/iotSecuritySolutionMappers.ts b/sdk/security/arm-security/src/models/iotSecuritySolutionMappers.ts index 82c7cc05a088..674dd3d26dbe 100644 --- a/sdk/security/arm-security/src/models/iotSecuritySolutionMappers.ts +++ b/sdk/security/arm-security/src/models/iotSecuritySolutionMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -8,10 +8,12 @@ export { discriminators, + AdditionalWorkspacesProperties, CloudError, IoTSecuritySolutionModel, IoTSecuritySolutionsList, RecommendationConfigurationProperties, + SystemData, TagsResource, UpdateIotSecuritySolutionData, UserDefinedResourcesProperties diff --git a/sdk/security/arm-security/src/models/iotSecuritySolutionsAnalyticsAggregatedAlertMappers.ts b/sdk/security/arm-security/src/models/iotSecuritySolutionsAnalyticsAggregatedAlertMappers.ts index abdd83a924b0..497f5a0a8b0b 100644 --- a/sdk/security/arm-security/src/models/iotSecuritySolutionsAnalyticsAggregatedAlertMappers.ts +++ b/sdk/security/arm-security/src/models/iotSecuritySolutionsAnalyticsAggregatedAlertMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. diff --git a/sdk/security/arm-security/src/models/iotSecuritySolutionsAnalyticsRecommendationMappers.ts b/sdk/security/arm-security/src/models/iotSecuritySolutionsAnalyticsRecommendationMappers.ts index d0e756980cf6..edc31da8f968 100644 --- a/sdk/security/arm-security/src/models/iotSecuritySolutionsAnalyticsRecommendationMappers.ts +++ b/sdk/security/arm-security/src/models/iotSecuritySolutionsAnalyticsRecommendationMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. diff --git a/sdk/security/arm-security/src/models/iotSensorsMappers.ts b/sdk/security/arm-security/src/models/iotSensorsMappers.ts new file mode 100644 index 000000000000..5376ebbb2d56 --- /dev/null +++ b/sdk/security/arm-security/src/models/iotSensorsMappers.ts @@ -0,0 +1,145 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + ActiveConnectionsNotInAllowedRange, + AdaptiveNetworkHardening, + AdditionalData, + AdvancedThreatProtectionSetting, + Alert, + AlertEntity, + AlertsSuppressionRule, + AlertSyncSettings, + AllowlistCustomAlertRule, + AmqpC2DMessagesNotInAllowedRange, + AmqpC2DRejectedMessagesNotInAllowedRange, + AmqpD2CMessagesNotInAllowedRange, + AscLocation, + AssessmentLinks, + AssessmentStatus, + AuthenticationDetailsProperties, + AutoProvisioningSetting, + AwAssumeRoleAuthenticationDetailsProperties, + AwsCredsAuthenticationDetailsProperties, + AzureResourceDetails, + AzureResourceIdentifier, + AzureResourceLink, + Baseline, + BaselineAdjustedResult, + BaseResource, + BenchmarkReference, + CloudError, + Compliance, + ComplianceResult, + ComplianceSegment, + ConnectionFromIpNotAllowed, + ConnectionToIpNotAllowed, + ConnectorSetting, + ContainerRegistryVulnerabilityProperties, + CustomAlertRule, + CVE, + CVSS, + DataExportSettings, + DenylistCustomAlertRule, + Device, + DeviceSecurityGroup, + DirectMethodInvokesNotInAllowedRange, + EffectiveNetworkSecurityGroups, + FailedLocalLoginsNotInAllowedRange, + FileUploadsNotInAllowedRange, + Firmware, + GcpCredentialsDetailsProperties, + HttpC2DMessagesNotInAllowedRange, + HttpC2DRejectedMessagesNotInAllowedRange, + HttpD2CMessagesNotInAllowedRange, + HybridComputeSettingsProperties, + InformationProtectionKeyword, + InformationProtectionPolicy, + InformationType, + IngestionSetting, + IotAlertModel, + IotAlertType, + IotDefenderSettingsModel, + IotRecommendationModel, + IotRecommendationType, + IoTSecurityAlertedDevice, + IoTSecurityDeviceAlert, + IoTSecurityDeviceRecommendation, + IoTSecuritySolutionAnalyticsModel, + IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IotSensorsList, + IotSensorsModel, + IoTSeverityMetrics, + IotSitesModel, + IpAddress, + ListCustomAlertRule, + LocalUserNotAllowed, + LogAnalyticsIdentifier, + MacAddress, + MqttC2DMessagesNotInAllowedRange, + MqttC2DRejectedMessagesNotInAllowedRange, + MqttD2CMessagesNotInAllowedRange, + NetworkInterface, + OnPremiseIotSensor, + OnPremiseResourceDetails, + OnPremiseSqlResourceDetails, + Pricing, + ProcessNotAllowed, + Protocol1, + ProxyServerProperties, + QueryCheck, + QueuePurgesNotInAllowedRange, + RegulatoryComplianceAssessment, + RegulatoryComplianceControl, + RegulatoryComplianceStandard, + Remediation, + ResetPasswordInput, + Resource, + ResourceDetails, + ResourceIdentifier, + Rule, + RuleResults, + RuleResultsProperties, + Scan, + ScanProperties, + ScanResult, + ScanResultProperties, + ScopeElement, + SecureScoreControlDefinitionItem, + SecureScoreControlDefinitionSource, + SecureScoreControlDetails, + SecureScoreItem, + SecurityAssessment, + SecurityAssessmentMetadata, + SecurityAssessmentMetadataPartnerData, + SecurityAssessmentMetadataProperties, + SecurityAssessmentPartnerData, + SecurityContact, + SecuritySubAssessment, + SecurityTask, + SecurityTaskParameters, + SensitivityLabel, + Sensor, + ServerVulnerabilityAssessment, + ServerVulnerabilityProperties, + ServicePrincipalProperties, + Setting, + Site, + Software, + SqlServerVulnerabilityProperties, + SubAssessmentStatus, + SuppressionAlertsScope, + ThresholdCustomAlertRule, + TimeWindowCustomAlertRule, + TwinUpdatesNotInAllowedRange, + UnauthorizedOperationsNotInAllowedRange, + VaRule, + VendorReference, + WorkspaceSetting +} from "../models/mappers"; diff --git a/sdk/security/arm-security/src/models/iotSitesMappers.ts b/sdk/security/arm-security/src/models/iotSitesMappers.ts new file mode 100644 index 000000000000..a4cbe1be32f2 --- /dev/null +++ b/sdk/security/arm-security/src/models/iotSitesMappers.ts @@ -0,0 +1,144 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + ActiveConnectionsNotInAllowedRange, + AdaptiveNetworkHardening, + AdditionalData, + AdvancedThreatProtectionSetting, + Alert, + AlertEntity, + AlertsSuppressionRule, + AlertSyncSettings, + AllowlistCustomAlertRule, + AmqpC2DMessagesNotInAllowedRange, + AmqpC2DRejectedMessagesNotInAllowedRange, + AmqpD2CMessagesNotInAllowedRange, + AscLocation, + AssessmentLinks, + AssessmentStatus, + AuthenticationDetailsProperties, + AutoProvisioningSetting, + AwAssumeRoleAuthenticationDetailsProperties, + AwsCredsAuthenticationDetailsProperties, + AzureResourceDetails, + AzureResourceIdentifier, + AzureResourceLink, + Baseline, + BaselineAdjustedResult, + BaseResource, + BenchmarkReference, + CloudError, + Compliance, + ComplianceResult, + ComplianceSegment, + ConnectionFromIpNotAllowed, + ConnectionToIpNotAllowed, + ConnectorSetting, + ContainerRegistryVulnerabilityProperties, + CustomAlertRule, + CVE, + CVSS, + DataExportSettings, + DenylistCustomAlertRule, + Device, + DeviceSecurityGroup, + DirectMethodInvokesNotInAllowedRange, + EffectiveNetworkSecurityGroups, + FailedLocalLoginsNotInAllowedRange, + FileUploadsNotInAllowedRange, + Firmware, + GcpCredentialsDetailsProperties, + HttpC2DMessagesNotInAllowedRange, + HttpC2DRejectedMessagesNotInAllowedRange, + HttpD2CMessagesNotInAllowedRange, + HybridComputeSettingsProperties, + InformationProtectionKeyword, + InformationProtectionPolicy, + InformationType, + IngestionSetting, + IotAlertModel, + IotAlertType, + IotDefenderSettingsModel, + IotRecommendationModel, + IotRecommendationType, + IoTSecurityAlertedDevice, + IoTSecurityDeviceAlert, + IoTSecurityDeviceRecommendation, + IoTSecuritySolutionAnalyticsModel, + IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IotSensorsModel, + IoTSeverityMetrics, + IotSitesList, + IotSitesModel, + IpAddress, + ListCustomAlertRule, + LocalUserNotAllowed, + LogAnalyticsIdentifier, + MacAddress, + MqttC2DMessagesNotInAllowedRange, + MqttC2DRejectedMessagesNotInAllowedRange, + MqttD2CMessagesNotInAllowedRange, + NetworkInterface, + OnPremiseIotSensor, + OnPremiseResourceDetails, + OnPremiseSqlResourceDetails, + Pricing, + ProcessNotAllowed, + Protocol1, + ProxyServerProperties, + QueryCheck, + QueuePurgesNotInAllowedRange, + RegulatoryComplianceAssessment, + RegulatoryComplianceControl, + RegulatoryComplianceStandard, + Remediation, + Resource, + ResourceDetails, + ResourceIdentifier, + Rule, + RuleResults, + RuleResultsProperties, + Scan, + ScanProperties, + ScanResult, + ScanResultProperties, + ScopeElement, + SecureScoreControlDefinitionItem, + SecureScoreControlDefinitionSource, + SecureScoreControlDetails, + SecureScoreItem, + SecurityAssessment, + SecurityAssessmentMetadata, + SecurityAssessmentMetadataPartnerData, + SecurityAssessmentMetadataProperties, + SecurityAssessmentPartnerData, + SecurityContact, + SecuritySubAssessment, + SecurityTask, + SecurityTaskParameters, + SensitivityLabel, + Sensor, + ServerVulnerabilityAssessment, + ServerVulnerabilityProperties, + ServicePrincipalProperties, + Setting, + Site, + Software, + SqlServerVulnerabilityProperties, + SubAssessmentStatus, + SuppressionAlertsScope, + ThresholdCustomAlertRule, + TimeWindowCustomAlertRule, + TwinUpdatesNotInAllowedRange, + UnauthorizedOperationsNotInAllowedRange, + VaRule, + VendorReference, + WorkspaceSetting +} from "../models/mappers"; diff --git a/sdk/security/arm-security/src/models/jitNetworkAccessPoliciesMappers.ts b/sdk/security/arm-security/src/models/jitNetworkAccessPoliciesMappers.ts index 81a91877bca5..b0c4e9907c48 100644 --- a/sdk/security/arm-security/src/models/jitNetworkAccessPoliciesMappers.ts +++ b/sdk/security/arm-security/src/models/jitNetworkAccessPoliciesMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. diff --git a/sdk/security/arm-security/src/models/locationsMappers.ts b/sdk/security/arm-security/src/models/locationsMappers.ts index 7b7a015fa4a4..9182a818b048 100644 --- a/sdk/security/arm-security/src/models/locationsMappers.ts +++ b/sdk/security/arm-security/src/models/locationsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -13,9 +13,9 @@ export { AdditionalData, AdvancedThreatProtectionSetting, Alert, - AlertConfidenceReason, AlertEntity, AlertsSuppressionRule, + AlertSyncSettings, AllowlistCustomAlertRule, AmqpC2DMessagesNotInAllowedRange, AmqpC2DRejectedMessagesNotInAllowedRange, @@ -24,53 +24,91 @@ export { AscLocationList, AssessmentLinks, AssessmentStatus, + AuthenticationDetailsProperties, AutoProvisioningSetting, + AwAssumeRoleAuthenticationDetailsProperties, + AwsCredsAuthenticationDetailsProperties, AzureResourceDetails, + AzureResourceIdentifier, AzureResourceLink, + Baseline, + BaselineAdjustedResult, BaseResource, + BenchmarkReference, CloudError, Compliance, ComplianceResult, ComplianceSegment, + ConnectionFromIpNotAllowed, ConnectionToIpNotAllowed, + ConnectorSetting, ContainerRegistryVulnerabilityProperties, CustomAlertRule, CVE, CVSS, DataExportSettings, DenylistCustomAlertRule, + Device, DeviceSecurityGroup, DirectMethodInvokesNotInAllowedRange, EffectiveNetworkSecurityGroups, FailedLocalLoginsNotInAllowedRange, FileUploadsNotInAllowedRange, + Firmware, + GcpCredentialsDetailsProperties, HttpC2DMessagesNotInAllowedRange, HttpC2DRejectedMessagesNotInAllowedRange, HttpD2CMessagesNotInAllowedRange, + HybridComputeSettingsProperties, InformationProtectionKeyword, InformationProtectionPolicy, InformationType, + IngestionSetting, + IotAlertModel, + IotAlertType, + IotDefenderSettingsModel, + IotRecommendationModel, + IotRecommendationType, IoTSecurityAlertedDevice, IoTSecurityDeviceAlert, IoTSecurityDeviceRecommendation, IoTSecuritySolutionAnalyticsModel, IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IotSensorsModel, IoTSeverityMetrics, + IotSitesModel, + IpAddress, ListCustomAlertRule, LocalUserNotAllowed, + LogAnalyticsIdentifier, + MacAddress, MqttC2DMessagesNotInAllowedRange, MqttC2DRejectedMessagesNotInAllowedRange, MqttD2CMessagesNotInAllowedRange, + NetworkInterface, + OnPremiseIotSensor, OnPremiseResourceDetails, + OnPremiseSqlResourceDetails, Pricing, ProcessNotAllowed, + Protocol1, + ProxyServerProperties, + QueryCheck, QueuePurgesNotInAllowedRange, RegulatoryComplianceAssessment, RegulatoryComplianceControl, RegulatoryComplianceStandard, + Remediation, Resource, ResourceDetails, + ResourceIdentifier, Rule, + RuleResults, + RuleResultsProperties, + Scan, + ScanProperties, + ScanResult, + ScanResultProperties, ScopeElement, SecureScoreControlDefinitionItem, SecureScoreControlDefinitionSource, @@ -86,10 +124,13 @@ export { SecurityTask, SecurityTaskParameters, SensitivityLabel, + Sensor, ServerVulnerabilityAssessment, ServerVulnerabilityProperties, + ServicePrincipalProperties, Setting, - SettingResource, + Site, + Software, SqlServerVulnerabilityProperties, SubAssessmentStatus, SuppressionAlertsScope, @@ -97,6 +138,7 @@ export { TimeWindowCustomAlertRule, TwinUpdatesNotInAllowedRange, UnauthorizedOperationsNotInAllowedRange, + VaRule, VendorReference, WorkspaceSetting } from "../models/mappers"; diff --git a/sdk/security/arm-security/src/models/mappers.ts b/sdk/security/arm-security/src/models/mappers.ts index 3ef1960d14bf..945c8529f4af 100644 --- a/sdk/security/arm-security/src/models/mappers.ts +++ b/sdk/security/arm-security/src/models/mappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -106,7 +106,6 @@ export const TrackedResource: msRest.CompositeMapper = { } }, location: { - readOnly: true, serializedName: "location", type: { name: "String" @@ -139,14 +138,13 @@ export const TrackedResource: msRest.CompositeMapper = { } }; -export const Location: msRest.CompositeMapper = { - serializedName: "Location", +export const AzureTrackedResourceLocation: msRest.CompositeMapper = { + serializedName: "AzureTrackedResourceLocation", type: { name: "Composite", - className: "Location", + className: "AzureTrackedResourceLocation", modelProperties: { location: { - readOnly: true, serializedName: "location", type: { name: "String" @@ -209,6 +207,30 @@ export const Tags: msRest.CompositeMapper = { } }; +export const ErrorAdditionalInfo: msRest.CompositeMapper = { + serializedName: "ErrorAdditionalInfo", + type: { + name: "Composite", + className: "ErrorAdditionalInfo", + modelProperties: { + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + info: { + readOnly: true, + serializedName: "info", + type: { + name: "Object" + } + } + } + } +}; + export const Pricing: msRest.CompositeMapper = { serializedName: "Pricing", type: { @@ -257,44 +279,58 @@ export const PricingList: msRest.CompositeMapper = { } }; -export const AlertEntity: msRest.CompositeMapper = { - serializedName: "AlertEntity", +export const AdvancedThreatProtectionSetting: msRest.CompositeMapper = { + serializedName: "AdvancedThreatProtectionSetting", type: { name: "Composite", - className: "AlertEntity", + className: "AdvancedThreatProtectionSetting", modelProperties: { - type: { - readOnly: true, - serializedName: "type", + ...Resource.type.modelProperties, + isEnabled: { + serializedName: "properties.isEnabled", type: { - name: "String" + name: "Boolean" } } - }, - additionalProperties: { - type: { - name: "Object" - } } } }; -export const AlertConfidenceReason: msRest.CompositeMapper = { - serializedName: "AlertConfidenceReason", +export const CustomAlertRule: msRest.CompositeMapper = { + serializedName: "CustomAlertRule", type: { name: "Composite", - className: "AlertConfidenceReason", + polymorphicDiscriminator: { + serializedName: "ruleType", + clientName: "ruleType" + }, + uberParent: "CustomAlertRule", + className: "CustomAlertRule", modelProperties: { - type: { + displayName: { readOnly: true, - serializedName: "type", + serializedName: "displayName", type: { name: "String" } }, - reason: { + description: { readOnly: true, - serializedName: "reason", + serializedName: "description", + type: { + name: "String" + } + }, + isEnabled: { + required: true, + serializedName: "isEnabled", + type: { + name: "Boolean" + } + }, + ruleType: { + required: true, + serializedName: "ruleType", type: { name: "String" } @@ -303,587 +339,293 @@ export const AlertConfidenceReason: msRest.CompositeMapper = { } }; -export const Alert: msRest.CompositeMapper = { - serializedName: "Alert", +export const ThresholdCustomAlertRule: msRest.CompositeMapper = { + serializedName: "ThresholdCustomAlertRule", type: { name: "Composite", - className: "Alert", + polymorphicDiscriminator: CustomAlertRule.type.polymorphicDiscriminator, + uberParent: "CustomAlertRule", + className: "ThresholdCustomAlertRule", modelProperties: { - ...Resource.type.modelProperties, - state: { - readOnly: true, - serializedName: "properties.state", + ...CustomAlertRule.type.modelProperties, + minThreshold: { + required: true, + serializedName: "minThreshold", type: { - name: "String" + name: "Number" } }, - reportedTimeUtc: { - readOnly: true, - serializedName: "properties.reportedTimeUtc", + maxThreshold: { + required: true, + serializedName: "maxThreshold", type: { - name: "DateTime" + name: "Number" } - }, - vendorName: { - readOnly: true, - serializedName: "properties.vendorName", + } + } + } +}; + +export const TimeWindowCustomAlertRule: msRest.CompositeMapper = { + serializedName: "TimeWindowCustomAlertRule", + type: { + name: "Composite", + polymorphicDiscriminator: CustomAlertRule.type.polymorphicDiscriminator, + uberParent: "CustomAlertRule", + className: "TimeWindowCustomAlertRule", + modelProperties: { + ...ThresholdCustomAlertRule.type.modelProperties, + timeWindowSize: { + required: true, + serializedName: "timeWindowSize", type: { - name: "String" + name: "TimeSpan" } - }, - alertName: { + } + } + } +}; + +export const ListCustomAlertRule: msRest.CompositeMapper = { + serializedName: "ListCustomAlertRule", + type: { + name: "Composite", + polymorphicDiscriminator: CustomAlertRule.type.polymorphicDiscriminator, + uberParent: "CustomAlertRule", + className: "ListCustomAlertRule", + modelProperties: { + ...CustomAlertRule.type.modelProperties, + valueType: { readOnly: true, - serializedName: "properties.alertName", + serializedName: "valueType", type: { name: "String" } - }, - alertDisplayName: { - readOnly: true, - serializedName: "properties.alertDisplayName", + } + } + } +}; + +export const AllowlistCustomAlertRule: msRest.CompositeMapper = { + serializedName: "AllowlistCustomAlertRule", + type: { + name: "Composite", + polymorphicDiscriminator: CustomAlertRule.type.polymorphicDiscriminator, + uberParent: "CustomAlertRule", + className: "AllowlistCustomAlertRule", + modelProperties: { + ...ListCustomAlertRule.type.modelProperties, + allowlistValues: { + required: true, + serializedName: "allowlistValues", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } - }, - detectedTimeUtc: { - readOnly: true, - serializedName: "properties.detectedTimeUtc", + } + } + } +}; + +export const DenylistCustomAlertRule: msRest.CompositeMapper = { + serializedName: "DenylistCustomAlertRule", + type: { + name: "Composite", + polymorphicDiscriminator: CustomAlertRule.type.polymorphicDiscriminator, + uberParent: "CustomAlertRule", + className: "DenylistCustomAlertRule", + modelProperties: { + ...ListCustomAlertRule.type.modelProperties, + denylistValues: { + required: true, + serializedName: "denylistValues", type: { - name: "DateTime" + name: "Sequence", + element: { + type: { + name: "String" + } + } } - }, - description: { - readOnly: true, - serializedName: "properties.description", + } + } + } +}; + +export const DeviceSecurityGroup: msRest.CompositeMapper = { + serializedName: "DeviceSecurityGroup", + type: { + name: "Composite", + className: "DeviceSecurityGroup", + modelProperties: { + ...Resource.type.modelProperties, + thresholdRules: { + serializedName: "properties.thresholdRules", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ThresholdCustomAlertRule" + } + } } }, - remediationSteps: { - readOnly: true, - serializedName: "properties.remediationSteps", + timeWindowRules: { + serializedName: "properties.timeWindowRules", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TimeWindowCustomAlertRule" + } + } } }, - actionTaken: { - readOnly: true, - serializedName: "properties.actionTaken", + allowlistRules: { + serializedName: "properties.allowlistRules", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AllowlistCustomAlertRule" + } + } } }, - reportedSeverity: { - readOnly: true, - serializedName: "properties.reportedSeverity", + denylistRules: { + serializedName: "properties.denylistRules", type: { - name: "String" - } - }, - compromisedEntity: { - readOnly: true, - serializedName: "properties.compromisedEntity", - type: { - name: "String" - } - }, - associatedResource: { - readOnly: true, - serializedName: "properties.associatedResource", - type: { - name: "String" - } - }, - extendedProperties: { - serializedName: "properties.extendedProperties", - type: { - name: "Dictionary", - value: { - type: { - name: "Object" - } - } - } - }, - systemSource: { - readOnly: true, - serializedName: "properties.systemSource", - type: { - name: "String" - } - }, - canBeInvestigated: { - readOnly: true, - serializedName: "properties.canBeInvestigated", - type: { - name: "Boolean" - } - }, - isIncident: { - readOnly: true, - serializedName: "properties.isIncident", - type: { - name: "Boolean" - } - }, - entities: { - serializedName: "properties.entities", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AlertEntity", - additionalProperties: { - type: { - name: "Object" - } - } - } - } - } - }, - confidenceScore: { - readOnly: true, - serializedName: "properties.confidenceScore", - constraints: { - InclusiveMaximum: 1, - InclusiveMinimum: 0 - }, - type: { - name: "Number" - } - }, - confidenceReasons: { - serializedName: "properties.confidenceReasons", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AlertConfidenceReason" - } - } - } - }, - subscriptionId: { - readOnly: true, - serializedName: "properties.subscriptionId", - type: { - name: "String" - } - }, - instanceId: { - readOnly: true, - serializedName: "properties.instanceId", - type: { - name: "String" - } - }, - workspaceArmId: { - readOnly: true, - serializedName: "properties.workspaceArmId", - type: { - name: "String" - } - }, - correlationKey: { - readOnly: true, - serializedName: "properties.correlationKey", - type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DenylistCustomAlertRule" + } + } } } } } }; -export const SettingResource: msRest.CompositeMapper = { - serializedName: "SettingResource", +export const ConnectionToIpNotAllowed: msRest.CompositeMapper = { + serializedName: "ConnectionToIpNotAllowed", type: { name: "Composite", - polymorphicDiscriminator: { - serializedName: "kind", - clientName: "kind" - }, - uberParent: "BaseResource", - className: "SettingResource", + polymorphicDiscriminator: CustomAlertRule.type.polymorphicDiscriminator, + uberParent: "CustomAlertRule", + className: "ConnectionToIpNotAllowed", modelProperties: { - ...Resource.type.modelProperties, - kind: { - required: true, - serializedName: "kind", - type: { - name: "String" - } - } + ...AllowlistCustomAlertRule.type.modelProperties } } }; -export const Setting: msRest.CompositeMapper = { - serializedName: "Setting", +export const ConnectionFromIpNotAllowed: msRest.CompositeMapper = { + serializedName: "ConnectionFromIpNotAllowed", type: { name: "Composite", - className: "Setting", + polymorphicDiscriminator: CustomAlertRule.type.polymorphicDiscriminator, + uberParent: "CustomAlertRule", + className: "ConnectionFromIpNotAllowed", modelProperties: { - ...SettingResource.type.modelProperties + ...AllowlistCustomAlertRule.type.modelProperties } } }; -export const DataExportSettings: msRest.CompositeMapper = { - serializedName: "DataExportSettings", +export const LocalUserNotAllowed: msRest.CompositeMapper = { + serializedName: "LocalUserNotAllowed", type: { name: "Composite", - className: "DataExportSettings", + polymorphicDiscriminator: CustomAlertRule.type.polymorphicDiscriminator, + uberParent: "CustomAlertRule", + className: "LocalUserNotAllowed", modelProperties: { - ...Setting.type.modelProperties, - enabled: { - required: true, - serializedName: "properties.enabled", - type: { - name: "Boolean" - } - } + ...AllowlistCustomAlertRule.type.modelProperties } } }; -export const AdvancedThreatProtectionSetting: msRest.CompositeMapper = { - serializedName: "AdvancedThreatProtectionSetting", +export const ProcessNotAllowed: msRest.CompositeMapper = { + serializedName: "ProcessNotAllowed", type: { name: "Composite", - className: "AdvancedThreatProtectionSetting", + polymorphicDiscriminator: CustomAlertRule.type.polymorphicDiscriminator, + uberParent: "CustomAlertRule", + className: "ProcessNotAllowed", modelProperties: { - ...Resource.type.modelProperties, - isEnabled: { - serializedName: "properties.isEnabled", - type: { - name: "Boolean" - } - } + ...AllowlistCustomAlertRule.type.modelProperties } } }; -export const CustomAlertRule: msRest.CompositeMapper = { - serializedName: "CustomAlertRule", +export const ActiveConnectionsNotInAllowedRange: msRest.CompositeMapper = { + serializedName: "ActiveConnectionsNotInAllowedRange", type: { name: "Composite", - polymorphicDiscriminator: { - serializedName: "ruleType", - clientName: "ruleType" - }, + polymorphicDiscriminator: CustomAlertRule.type.polymorphicDiscriminator, uberParent: "CustomAlertRule", - className: "CustomAlertRule", + className: "ActiveConnectionsNotInAllowedRange", modelProperties: { - displayName: { - readOnly: true, - serializedName: "displayName", - type: { - name: "String" - } - }, - description: { - readOnly: true, - serializedName: "description", - type: { - name: "String" - } - }, - isEnabled: { - required: true, - serializedName: "isEnabled", - type: { - name: "Boolean" - } - }, - ruleType: { - required: true, - serializedName: "ruleType", - type: { - name: "String" - } - } + ...TimeWindowCustomAlertRule.type.modelProperties } } }; -export const ThresholdCustomAlertRule: msRest.CompositeMapper = { - serializedName: "ThresholdCustomAlertRule", +export const AmqpC2DMessagesNotInAllowedRange: msRest.CompositeMapper = { + serializedName: "AmqpC2DMessagesNotInAllowedRange", type: { name: "Composite", polymorphicDiscriminator: CustomAlertRule.type.polymorphicDiscriminator, uberParent: "CustomAlertRule", - className: "ThresholdCustomAlertRule", + className: "AmqpC2DMessagesNotInAllowedRange", modelProperties: { - ...CustomAlertRule.type.modelProperties, - minThreshold: { - required: true, - serializedName: "minThreshold", - type: { - name: "Number" - } - }, - maxThreshold: { - required: true, - serializedName: "maxThreshold", - type: { - name: "Number" - } - } + ...TimeWindowCustomAlertRule.type.modelProperties } } }; -export const TimeWindowCustomAlertRule: msRest.CompositeMapper = { - serializedName: "TimeWindowCustomAlertRule", +export const MqttC2DMessagesNotInAllowedRange: msRest.CompositeMapper = { + serializedName: "MqttC2DMessagesNotInAllowedRange", type: { name: "Composite", polymorphicDiscriminator: CustomAlertRule.type.polymorphicDiscriminator, uberParent: "CustomAlertRule", - className: "TimeWindowCustomAlertRule", + className: "MqttC2DMessagesNotInAllowedRange", modelProperties: { - ...ThresholdCustomAlertRule.type.modelProperties, - timeWindowSize: { - required: true, - serializedName: "timeWindowSize", - type: { - name: "TimeSpan" - } - } + ...TimeWindowCustomAlertRule.type.modelProperties } } }; -export const ListCustomAlertRule: msRest.CompositeMapper = { - serializedName: "ListCustomAlertRule", +export const HttpC2DMessagesNotInAllowedRange: msRest.CompositeMapper = { + serializedName: "HttpC2DMessagesNotInAllowedRange", type: { name: "Composite", polymorphicDiscriminator: CustomAlertRule.type.polymorphicDiscriminator, uberParent: "CustomAlertRule", - className: "ListCustomAlertRule", + className: "HttpC2DMessagesNotInAllowedRange", modelProperties: { - ...CustomAlertRule.type.modelProperties, - valueType: { - readOnly: true, - serializedName: "valueType", - type: { - name: "String" - } - } + ...TimeWindowCustomAlertRule.type.modelProperties } } }; -export const AllowlistCustomAlertRule: msRest.CompositeMapper = { - serializedName: "AllowlistCustomAlertRule", +export const AmqpC2DRejectedMessagesNotInAllowedRange: msRest.CompositeMapper = { + serializedName: "AmqpC2DRejectedMessagesNotInAllowedRange", type: { name: "Composite", polymorphicDiscriminator: CustomAlertRule.type.polymorphicDiscriminator, uberParent: "CustomAlertRule", - className: "AllowlistCustomAlertRule", - modelProperties: { - ...ListCustomAlertRule.type.modelProperties, - allowlistValues: { - required: true, - serializedName: "allowlistValues", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const DenylistCustomAlertRule: msRest.CompositeMapper = { - serializedName: "DenylistCustomAlertRule", - type: { - name: "Composite", - polymorphicDiscriminator: CustomAlertRule.type.polymorphicDiscriminator, - uberParent: "CustomAlertRule", - className: "DenylistCustomAlertRule", - modelProperties: { - ...ListCustomAlertRule.type.modelProperties, - denylistValues: { - required: true, - serializedName: "denylistValues", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const DeviceSecurityGroup: msRest.CompositeMapper = { - serializedName: "DeviceSecurityGroup", - type: { - name: "Composite", - className: "DeviceSecurityGroup", - modelProperties: { - ...Resource.type.modelProperties, - thresholdRules: { - serializedName: "properties.thresholdRules", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ThresholdCustomAlertRule" - } - } - } - }, - timeWindowRules: { - serializedName: "properties.timeWindowRules", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "TimeWindowCustomAlertRule" - } - } - } - }, - allowlistRules: { - serializedName: "properties.allowlistRules", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AllowlistCustomAlertRule" - } - } - } - }, - denylistRules: { - serializedName: "properties.denylistRules", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DenylistCustomAlertRule" - } - } - } - } - } - } -}; - -export const ConnectionToIpNotAllowed: msRest.CompositeMapper = { - serializedName: "ConnectionToIpNotAllowed", - type: { - name: "Composite", - polymorphicDiscriminator: CustomAlertRule.type.polymorphicDiscriminator, - uberParent: "CustomAlertRule", - className: "ConnectionToIpNotAllowed", - modelProperties: { - ...AllowlistCustomAlertRule.type.modelProperties - } - } -}; - -export const LocalUserNotAllowed: msRest.CompositeMapper = { - serializedName: "LocalUserNotAllowed", - type: { - name: "Composite", - polymorphicDiscriminator: CustomAlertRule.type.polymorphicDiscriminator, - uberParent: "CustomAlertRule", - className: "LocalUserNotAllowed", - modelProperties: { - ...AllowlistCustomAlertRule.type.modelProperties - } - } -}; - -export const ProcessNotAllowed: msRest.CompositeMapper = { - serializedName: "ProcessNotAllowed", - type: { - name: "Composite", - polymorphicDiscriminator: CustomAlertRule.type.polymorphicDiscriminator, - uberParent: "CustomAlertRule", - className: "ProcessNotAllowed", - modelProperties: { - ...AllowlistCustomAlertRule.type.modelProperties - } - } -}; - -export const ActiveConnectionsNotInAllowedRange: msRest.CompositeMapper = { - serializedName: "ActiveConnectionsNotInAllowedRange", - type: { - name: "Composite", - polymorphicDiscriminator: CustomAlertRule.type.polymorphicDiscriminator, - uberParent: "CustomAlertRule", - className: "ActiveConnectionsNotInAllowedRange", - modelProperties: { - ...TimeWindowCustomAlertRule.type.modelProperties - } - } -}; - -export const AmqpC2DMessagesNotInAllowedRange: msRest.CompositeMapper = { - serializedName: "AmqpC2DMessagesNotInAllowedRange", - type: { - name: "Composite", - polymorphicDiscriminator: CustomAlertRule.type.polymorphicDiscriminator, - uberParent: "CustomAlertRule", - className: "AmqpC2DMessagesNotInAllowedRange", - modelProperties: { - ...TimeWindowCustomAlertRule.type.modelProperties - } - } -}; - -export const MqttC2DMessagesNotInAllowedRange: msRest.CompositeMapper = { - serializedName: "MqttC2DMessagesNotInAllowedRange", - type: { - name: "Composite", - polymorphicDiscriminator: CustomAlertRule.type.polymorphicDiscriminator, - uberParent: "CustomAlertRule", - className: "MqttC2DMessagesNotInAllowedRange", - modelProperties: { - ...TimeWindowCustomAlertRule.type.modelProperties - } - } -}; - -export const HttpC2DMessagesNotInAllowedRange: msRest.CompositeMapper = { - serializedName: "HttpC2DMessagesNotInAllowedRange", - type: { - name: "Composite", - polymorphicDiscriminator: CustomAlertRule.type.polymorphicDiscriminator, - uberParent: "CustomAlertRule", - className: "HttpC2DMessagesNotInAllowedRange", - modelProperties: { - ...TimeWindowCustomAlertRule.type.modelProperties - } - } -}; - -export const AmqpC2DRejectedMessagesNotInAllowedRange: msRest.CompositeMapper = { - serializedName: "AmqpC2DRejectedMessagesNotInAllowedRange", - type: { - name: "Composite", - polymorphicDiscriminator: CustomAlertRule.type.polymorphicDiscriminator, - uberParent: "CustomAlertRule", - className: "AmqpC2DRejectedMessagesNotInAllowedRange", + className: "AmqpC2DRejectedMessagesNotInAllowedRange", modelProperties: { ...TimeWindowCustomAlertRule.type.modelProperties } @@ -1054,24 +796,2630 @@ export const TagsResource: msRest.CompositeMapper = { } }; -export const UserDefinedResourcesProperties: msRest.CompositeMapper = { - serializedName: "UserDefinedResourcesProperties", +export const UserDefinedResourcesProperties: msRest.CompositeMapper = { + serializedName: "UserDefinedResourcesProperties", + type: { + name: "Composite", + className: "UserDefinedResourcesProperties", + modelProperties: { + query: { + required: true, + nullable: true, + serializedName: "query", + type: { + name: "String" + } + }, + querySubscriptions: { + required: true, + nullable: true, + serializedName: "querySubscriptions", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const RecommendationConfigurationProperties: msRest.CompositeMapper = { + serializedName: "RecommendationConfigurationProperties", + type: { + name: "Composite", + className: "RecommendationConfigurationProperties", + modelProperties: { + recommendationType: { + required: true, + serializedName: "recommendationType", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + status: { + required: true, + serializedName: "status", + defaultValue: 'Enabled', + type: { + name: "String" + } + } + } + } +}; + +export const AdditionalWorkspacesProperties: msRest.CompositeMapper = { + serializedName: "AdditionalWorkspacesProperties", + type: { + name: "Composite", + className: "AdditionalWorkspacesProperties", + modelProperties: { + workspace: { + serializedName: "workspace", + type: { + name: "String" + } + }, + type: { + serializedName: "type", + defaultValue: 'Sentinel', + type: { + name: "String" + } + }, + dataTypes: { + serializedName: "dataTypes", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const SystemData: msRest.CompositeMapper = { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData", + modelProperties: { + createdBy: { + serializedName: "createdBy", + type: { + name: "String" + } + }, + createdByType: { + serializedName: "createdByType", + type: { + name: "String" + } + }, + createdAt: { + serializedName: "createdAt", + type: { + name: "DateTime" + } + }, + lastModifiedBy: { + serializedName: "lastModifiedBy", + type: { + name: "String" + } + }, + lastModifiedByType: { + serializedName: "lastModifiedByType", + type: { + name: "String" + } + }, + lastModifiedAt: { + serializedName: "lastModifiedAt", + type: { + name: "DateTime" + } + } + } + } +}; + +export const IoTSecuritySolutionModel: msRest.CompositeMapper = { + serializedName: "IoTSecuritySolutionModel", + type: { + name: "Composite", + className: "IoTSecuritySolutionModel", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + location: { + serializedName: "location", + type: { + name: "String" + } + }, + workspace: { + serializedName: "properties.workspace", + type: { + name: "String" + } + }, + displayName: { + required: true, + serializedName: "properties.displayName", + type: { + name: "String" + } + }, + status: { + serializedName: "properties.status", + defaultValue: 'Enabled', + type: { + name: "String" + } + }, + exportProperty: { + serializedName: "properties.export", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + disabledDataSources: { + serializedName: "properties.disabledDataSources", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + iotHubs: { + required: true, + serializedName: "properties.iotHubs", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + userDefinedResources: { + serializedName: "properties.userDefinedResources", + type: { + name: "Composite", + className: "UserDefinedResourcesProperties" + } + }, + autoDiscoveredResources: { + readOnly: true, + serializedName: "properties.autoDiscoveredResources", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + recommendationsConfiguration: { + serializedName: "properties.recommendationsConfiguration", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RecommendationConfigurationProperties" + } + } + } + }, + unmaskedIpLoggingStatus: { + serializedName: "properties.unmaskedIpLoggingStatus", + defaultValue: 'Disabled', + type: { + name: "String" + } + }, + additionalWorkspaces: { + serializedName: "properties.additionalWorkspaces", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AdditionalWorkspacesProperties" + } + } + } + }, + systemData: { + readOnly: true, + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + } + } + } +}; + +export const UpdateIotSecuritySolutionData: msRest.CompositeMapper = { + serializedName: "UpdateIotSecuritySolutionData", + type: { + name: "Composite", + className: "UpdateIotSecuritySolutionData", + modelProperties: { + ...TagsResource.type.modelProperties, + userDefinedResources: { + serializedName: "properties.userDefinedResources", + type: { + name: "Composite", + className: "UserDefinedResourcesProperties" + } + }, + recommendationsConfiguration: { + serializedName: "properties.recommendationsConfiguration", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RecommendationConfigurationProperties" + } + } + } + } + } + } +}; + +export const IoTSeverityMetrics: msRest.CompositeMapper = { + serializedName: "IoTSeverityMetrics", + type: { + name: "Composite", + className: "IoTSeverityMetrics", + modelProperties: { + high: { + serializedName: "high", + type: { + name: "Number" + } + }, + medium: { + serializedName: "medium", + type: { + name: "Number" + } + }, + low: { + serializedName: "low", + type: { + name: "Number" + } + } + } + } +}; + +export const IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem: msRest.CompositeMapper = { + serializedName: "IoTSecuritySolutionAnalyticsModelProperties_devicesMetricsItem", + type: { + name: "Composite", + className: "IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem", + modelProperties: { + date: { + serializedName: "date", + type: { + name: "DateTime" + } + }, + devicesMetrics: { + serializedName: "devicesMetrics", + type: { + name: "Composite", + className: "IoTSeverityMetrics" + } + } + } + } +}; + +export const IoTSecurityAlertedDevice: msRest.CompositeMapper = { + serializedName: "IoTSecurityAlertedDevice", + type: { + name: "Composite", + className: "IoTSecurityAlertedDevice", + modelProperties: { + deviceId: { + readOnly: true, + serializedName: "deviceId", + type: { + name: "String" + } + }, + alertsCount: { + readOnly: true, + serializedName: "alertsCount", + type: { + name: "Number" + } + } + } + } +}; + +export const IoTSecurityDeviceAlert: msRest.CompositeMapper = { + serializedName: "IoTSecurityDeviceAlert", + type: { + name: "Composite", + className: "IoTSecurityDeviceAlert", + modelProperties: { + alertDisplayName: { + readOnly: true, + serializedName: "alertDisplayName", + type: { + name: "String" + } + }, + reportedSeverity: { + readOnly: true, + serializedName: "reportedSeverity", + type: { + name: "String" + } + }, + alertsCount: { + readOnly: true, + serializedName: "alertsCount", + type: { + name: "Number" + } + } + } + } +}; + +export const IoTSecurityDeviceRecommendation: msRest.CompositeMapper = { + serializedName: "IoTSecurityDeviceRecommendation", + type: { + name: "Composite", + className: "IoTSecurityDeviceRecommendation", + modelProperties: { + recommendationDisplayName: { + readOnly: true, + serializedName: "recommendationDisplayName", + type: { + name: "String" + } + }, + reportedSeverity: { + readOnly: true, + serializedName: "reportedSeverity", + type: { + name: "String" + } + }, + devicesCount: { + readOnly: true, + serializedName: "devicesCount", + type: { + name: "Number" + } + } + } + } +}; + +export const IoTSecuritySolutionAnalyticsModel: msRest.CompositeMapper = { + serializedName: "IoTSecuritySolutionAnalyticsModel", + type: { + name: "Composite", + className: "IoTSecuritySolutionAnalyticsModel", + modelProperties: { + ...Resource.type.modelProperties, + metrics: { + readOnly: true, + serializedName: "properties.metrics", + type: { + name: "Composite", + className: "IoTSeverityMetrics" + } + }, + unhealthyDeviceCount: { + readOnly: true, + serializedName: "properties.unhealthyDeviceCount", + type: { + name: "Number" + } + }, + devicesMetrics: { + readOnly: true, + serializedName: "properties.devicesMetrics", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem" + } + } + } + }, + topAlertedDevices: { + serializedName: "properties.topAlertedDevices", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IoTSecurityAlertedDevice" + } + } + } + }, + mostPrevalentDeviceAlerts: { + serializedName: "properties.mostPrevalentDeviceAlerts", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IoTSecurityDeviceAlert" + } + } + } + }, + mostPrevalentDeviceRecommendations: { + serializedName: "properties.mostPrevalentDeviceRecommendations", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IoTSecurityDeviceRecommendation" + } + } + } + } + } + } +}; + +export const IoTSecuritySolutionAnalyticsModelList: msRest.CompositeMapper = { + serializedName: "IoTSecuritySolutionAnalyticsModelList", + type: { + name: "Composite", + className: "IoTSecuritySolutionAnalyticsModelList", + modelProperties: { + value: { + required: true, + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IoTSecuritySolutionAnalyticsModel" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const IoTSecurityAggregatedAlertPropertiesTopDevicesListItem: msRest.CompositeMapper = { + serializedName: "IoTSecurityAggregatedAlertProperties_topDevicesListItem", + type: { + name: "Composite", + className: "IoTSecurityAggregatedAlertPropertiesTopDevicesListItem", + modelProperties: { + deviceId: { + readOnly: true, + serializedName: "deviceId", + type: { + name: "String" + } + }, + alertsCount: { + readOnly: true, + serializedName: "alertsCount", + type: { + name: "Number" + } + }, + lastOccurrence: { + readOnly: true, + serializedName: "lastOccurrence", + type: { + name: "String" + } + } + } + } +}; + +export const IoTSecurityAggregatedAlert: msRest.CompositeMapper = { + serializedName: "IoTSecurityAggregatedAlert", + type: { + name: "Composite", + className: "IoTSecurityAggregatedAlert", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + alertType: { + readOnly: true, + serializedName: "properties.alertType", + type: { + name: "String" + } + }, + alertDisplayName: { + readOnly: true, + serializedName: "properties.alertDisplayName", + type: { + name: "String" + } + }, + aggregatedDateUtc: { + readOnly: true, + serializedName: "properties.aggregatedDateUtc", + type: { + name: "Date" + } + }, + vendorName: { + readOnly: true, + serializedName: "properties.vendorName", + type: { + name: "String" + } + }, + reportedSeverity: { + readOnly: true, + serializedName: "properties.reportedSeverity", + type: { + name: "String" + } + }, + remediationSteps: { + readOnly: true, + serializedName: "properties.remediationSteps", + type: { + name: "String" + } + }, + description: { + readOnly: true, + serializedName: "properties.description", + type: { + name: "String" + } + }, + count: { + readOnly: true, + serializedName: "properties.count", + type: { + name: "Number" + } + }, + effectedResourceType: { + readOnly: true, + serializedName: "properties.effectedResourceType", + type: { + name: "String" + } + }, + systemSource: { + readOnly: true, + serializedName: "properties.systemSource", + type: { + name: "String" + } + }, + actionTaken: { + readOnly: true, + serializedName: "properties.actionTaken", + type: { + name: "String" + } + }, + logAnalyticsQuery: { + readOnly: true, + serializedName: "properties.logAnalyticsQuery", + type: { + name: "String" + } + }, + topDevicesList: { + readOnly: true, + serializedName: "properties.topDevicesList", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IoTSecurityAggregatedAlertPropertiesTopDevicesListItem" + } + } + } + } + } + } +}; + +export const IoTSecurityAggregatedRecommendation: msRest.CompositeMapper = { + serializedName: "IoTSecurityAggregatedRecommendation", + type: { + name: "Composite", + className: "IoTSecurityAggregatedRecommendation", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + recommendationName: { + serializedName: "properties.recommendationName", + type: { + name: "String" + } + }, + recommendationDisplayName: { + readOnly: true, + serializedName: "properties.recommendationDisplayName", + type: { + name: "String" + } + }, + description: { + readOnly: true, + serializedName: "properties.description", + type: { + name: "String" + } + }, + recommendationTypeId: { + readOnly: true, + serializedName: "properties.recommendationTypeId", + type: { + name: "String" + } + }, + detectedBy: { + readOnly: true, + serializedName: "properties.detectedBy", + type: { + name: "String" + } + }, + remediationSteps: { + readOnly: true, + serializedName: "properties.remediationSteps", + type: { + name: "String" + } + }, + reportedSeverity: { + readOnly: true, + serializedName: "properties.reportedSeverity", + type: { + name: "String" + } + }, + healthyDevices: { + readOnly: true, + serializedName: "properties.healthyDevices", + type: { + name: "Number" + } + }, + unhealthyDeviceCount: { + readOnly: true, + serializedName: "properties.unhealthyDeviceCount", + type: { + name: "Number" + } + }, + logAnalyticsQuery: { + readOnly: true, + serializedName: "properties.logAnalyticsQuery", + type: { + name: "String" + } + } + } + } +}; + +export const OperationDisplay: msRest.CompositeMapper = { + serializedName: "OperationDisplay", + type: { + name: "Composite", + className: "OperationDisplay", + modelProperties: { + provider: { + readOnly: true, + serializedName: "provider", + type: { + name: "String" + } + }, + resource: { + readOnly: true, + serializedName: "resource", + type: { + name: "String" + } + }, + operation: { + readOnly: true, + serializedName: "operation", + type: { + name: "String" + } + }, + description: { + readOnly: true, + serializedName: "description", + type: { + name: "String" + } + } + } + } +}; + +export const Operation: msRest.CompositeMapper = { + serializedName: "Operation", + type: { + name: "Composite", + className: "Operation", + modelProperties: { + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + origin: { + readOnly: true, + serializedName: "origin", + type: { + name: "String" + } + }, + display: { + serializedName: "display", + type: { + name: "Composite", + className: "OperationDisplay" + } + } + } + } +}; + +export const SecurityTaskParameters: msRest.CompositeMapper = { + serializedName: "SecurityTaskParameters", + type: { + name: "Composite", + className: "SecurityTaskParameters", + modelProperties: { + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + } + }, + additionalProperties: { + type: { + name: "Object" + } + } + } +}; + +export const SecurityTask: msRest.CompositeMapper = { + serializedName: "SecurityTask", + type: { + name: "Composite", + className: "SecurityTask", + modelProperties: { + ...Resource.type.modelProperties, + state: { + readOnly: true, + serializedName: "properties.state", + type: { + name: "String" + } + }, + creationTimeUtc: { + readOnly: true, + serializedName: "properties.creationTimeUtc", + type: { + name: "DateTime" + } + }, + securityTaskParameters: { + serializedName: "properties.securityTaskParameters", + type: { + name: "Composite", + className: "SecurityTaskParameters", + additionalProperties: { + type: { + name: "Object" + } + } + } + }, + lastStateChangeTimeUtc: { + readOnly: true, + serializedName: "properties.lastStateChangeTimeUtc", + type: { + name: "DateTime" + } + }, + subState: { + readOnly: true, + serializedName: "properties.subState", + type: { + name: "String" + } + } + } + } +}; + +export const AutoProvisioningSetting: msRest.CompositeMapper = { + serializedName: "AutoProvisioningSetting", + type: { + name: "Composite", + className: "AutoProvisioningSetting", + modelProperties: { + ...Resource.type.modelProperties, + autoProvision: { + required: true, + serializedName: "properties.autoProvision", + type: { + name: "String" + } + } + } + } +}; + +export const ComplianceSegment: msRest.CompositeMapper = { + serializedName: "ComplianceSegment", + type: { + name: "Composite", + className: "ComplianceSegment", + modelProperties: { + segmentType: { + readOnly: true, + serializedName: "segmentType", + type: { + name: "String" + } + }, + percentage: { + readOnly: true, + serializedName: "percentage", + type: { + name: "Number" + } + } + } + } +}; + +export const Compliance: msRest.CompositeMapper = { + serializedName: "Compliance", + type: { + name: "Composite", + className: "Compliance", + modelProperties: { + ...Resource.type.modelProperties, + assessmentTimestampUtcDate: { + readOnly: true, + serializedName: "properties.assessmentTimestampUtcDate", + type: { + name: "DateTime" + } + }, + resourceCount: { + readOnly: true, + serializedName: "properties.resourceCount", + type: { + name: "Number" + } + }, + assessmentResult: { + readOnly: true, + serializedName: "properties.assessmentResult", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ComplianceSegment" + } + } + } + } + } + } +}; + +export const SensitivityLabel: msRest.CompositeMapper = { + serializedName: "SensitivityLabel", + type: { + name: "Composite", + className: "SensitivityLabel", + modelProperties: { + displayName: { + serializedName: "displayName", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + }, + rank: { + serializedName: "rank", + type: { + name: "Enum", + allowedValues: [ + "None", + "Low", + "Medium", + "High", + "Critical" + ] + } + }, + order: { + serializedName: "order", + type: { + name: "Number" + } + }, + enabled: { + serializedName: "enabled", + type: { + name: "Boolean" + } + } + } + } +}; + +export const InformationProtectionKeyword: msRest.CompositeMapper = { + serializedName: "InformationProtectionKeyword", + type: { + name: "Composite", + className: "InformationProtectionKeyword", + modelProperties: { + pattern: { + serializedName: "pattern", + type: { + name: "String" + } + }, + custom: { + serializedName: "custom", + type: { + name: "Boolean" + } + }, + canBeNumeric: { + serializedName: "canBeNumeric", + type: { + name: "Boolean" + } + }, + excluded: { + serializedName: "excluded", + type: { + name: "Boolean" + } + } + } + } +}; + +export const InformationType: msRest.CompositeMapper = { + serializedName: "InformationType", + type: { + name: "Composite", + className: "InformationType", + modelProperties: { + displayName: { + serializedName: "displayName", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + }, + order: { + serializedName: "order", + type: { + name: "Number" + } + }, + recommendedLabelId: { + serializedName: "recommendedLabelId", + type: { + name: "Uuid" + } + }, + enabled: { + serializedName: "enabled", + type: { + name: "Boolean" + } + }, + custom: { + serializedName: "custom", + type: { + name: "Boolean" + } + }, + keywords: { + serializedName: "keywords", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "InformationProtectionKeyword" + } + } + } + } + } + } +}; + +export const InformationProtectionPolicy: msRest.CompositeMapper = { + serializedName: "InformationProtectionPolicy", + type: { + name: "Composite", + className: "InformationProtectionPolicy", + modelProperties: { + ...Resource.type.modelProperties, + lastModifiedUtc: { + readOnly: true, + serializedName: "properties.lastModifiedUtc", + type: { + name: "DateTime" + } + }, + version: { + readOnly: true, + serializedName: "properties.version", + type: { + name: "String" + } + }, + labels: { + serializedName: "properties.labels", + type: { + name: "Dictionary", + value: { + type: { + name: "Composite", + className: "SensitivityLabel" + } + } + } + }, + informationTypes: { + serializedName: "properties.informationTypes", + type: { + name: "Dictionary", + value: { + type: { + name: "Composite", + className: "InformationType" + } + } + } + } + } + } +}; + +export const SecurityContact: msRest.CompositeMapper = { + serializedName: "SecurityContact", + type: { + name: "Composite", + className: "SecurityContact", + modelProperties: { + ...Resource.type.modelProperties, + email: { + required: true, + serializedName: "properties.email", + type: { + name: "String" + } + }, + phone: { + serializedName: "properties.phone", + type: { + name: "String" + } + }, + alertNotifications: { + required: true, + serializedName: "properties.alertNotifications", + type: { + name: "String" + } + }, + alertsToAdmins: { + required: true, + serializedName: "properties.alertsToAdmins", + type: { + name: "String" + } + } + } + } +}; + +export const WorkspaceSetting: msRest.CompositeMapper = { + serializedName: "WorkspaceSetting", + type: { + name: "Composite", + className: "WorkspaceSetting", + modelProperties: { + ...Resource.type.modelProperties, + workspaceId: { + required: true, + serializedName: "properties.workspaceId", + type: { + name: "String" + } + }, + scope: { + required: true, + serializedName: "properties.scope", + type: { + name: "String" + } + } + } + } +}; + +export const RegulatoryComplianceStandard: msRest.CompositeMapper = { + serializedName: "RegulatoryComplianceStandard", + type: { + name: "Composite", + className: "RegulatoryComplianceStandard", + modelProperties: { + ...Resource.type.modelProperties, + state: { + serializedName: "properties.state", + type: { + name: "String" + } + }, + passedControls: { + readOnly: true, + serializedName: "properties.passedControls", + type: { + name: "Number" + } + }, + failedControls: { + readOnly: true, + serializedName: "properties.failedControls", + type: { + name: "Number" + } + }, + skippedControls: { + readOnly: true, + serializedName: "properties.skippedControls", + type: { + name: "Number" + } + }, + unsupportedControls: { + readOnly: true, + serializedName: "properties.unsupportedControls", + type: { + name: "Number" + } + } + } + } +}; + +export const RegulatoryComplianceControl: msRest.CompositeMapper = { + serializedName: "RegulatoryComplianceControl", + type: { + name: "Composite", + className: "RegulatoryComplianceControl", + modelProperties: { + ...Resource.type.modelProperties, + description: { + readOnly: true, + serializedName: "properties.description", + type: { + name: "String" + } + }, + state: { + serializedName: "properties.state", + type: { + name: "String" + } + }, + passedAssessments: { + readOnly: true, + serializedName: "properties.passedAssessments", + type: { + name: "Number" + } + }, + failedAssessments: { + readOnly: true, + serializedName: "properties.failedAssessments", + type: { + name: "Number" + } + }, + skippedAssessments: { + readOnly: true, + serializedName: "properties.skippedAssessments", + type: { + name: "Number" + } + } + } + } +}; + +export const RegulatoryComplianceAssessment: msRest.CompositeMapper = { + serializedName: "RegulatoryComplianceAssessment", + type: { + name: "Composite", + className: "RegulatoryComplianceAssessment", + modelProperties: { + ...Resource.type.modelProperties, + description: { + readOnly: true, + serializedName: "properties.description", + type: { + name: "String" + } + }, + assessmentType: { + readOnly: true, + serializedName: "properties.assessmentType", + type: { + name: "String" + } + }, + assessmentDetailsLink: { + readOnly: true, + serializedName: "properties.assessmentDetailsLink", + type: { + name: "String" + } + }, + state: { + serializedName: "properties.state", + type: { + name: "String" + } + }, + passedResources: { + readOnly: true, + serializedName: "properties.passedResources", + type: { + name: "Number" + } + }, + failedResources: { + readOnly: true, + serializedName: "properties.failedResources", + type: { + name: "Number" + } + }, + skippedResources: { + readOnly: true, + serializedName: "properties.skippedResources", + type: { + name: "Number" + } + }, + unsupportedResources: { + readOnly: true, + serializedName: "properties.unsupportedResources", + type: { + name: "Number" + } + } + } + } +}; + +export const SubAssessmentStatus: msRest.CompositeMapper = { + serializedName: "SubAssessmentStatus", + type: { + name: "Composite", + className: "SubAssessmentStatus", + modelProperties: { + code: { + readOnly: true, + serializedName: "code", + type: { + name: "String" + } + }, + cause: { + readOnly: true, + serializedName: "cause", + type: { + name: "String" + } + }, + description: { + readOnly: true, + serializedName: "description", + type: { + name: "String" + } + }, + severity: { + readOnly: true, + serializedName: "severity", + type: { + name: "String" + } + } + } + } +}; + +export const ResourceDetails: msRest.CompositeMapper = { + serializedName: "ResourceDetails", + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "source", + clientName: "source" + }, + uberParent: "ResourceDetails", + className: "ResourceDetails", + modelProperties: { + source: { + required: true, + serializedName: "source", + type: { + name: "String" + } + } + } + } +}; + +export const AdditionalData: msRest.CompositeMapper = { + serializedName: "AdditionalData", + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "assessedResourceType", + clientName: "assessedResourceType" + }, + uberParent: "AdditionalData", + className: "AdditionalData", + modelProperties: { + assessedResourceType: { + required: true, + serializedName: "assessedResourceType", + type: { + name: "String" + } + } + } + } +}; + +export const SecuritySubAssessment: msRest.CompositeMapper = { + serializedName: "SecuritySubAssessment", + type: { + name: "Composite", + className: "SecuritySubAssessment", + modelProperties: { + ...Resource.type.modelProperties, + securitySubAssessmentId: { + readOnly: true, + serializedName: "properties.id", + type: { + name: "String" + } + }, + displayName: { + readOnly: true, + serializedName: "properties.displayName", + type: { + name: "String" + } + }, + status: { + serializedName: "properties.status", + type: { + name: "Composite", + className: "SubAssessmentStatus" + } + }, + remediation: { + readOnly: true, + serializedName: "properties.remediation", + type: { + name: "String" + } + }, + impact: { + readOnly: true, + serializedName: "properties.impact", + type: { + name: "String" + } + }, + category: { + readOnly: true, + serializedName: "properties.category", + type: { + name: "String" + } + }, + description: { + readOnly: true, + serializedName: "properties.description", + type: { + name: "String" + } + }, + timeGenerated: { + readOnly: true, + serializedName: "properties.timeGenerated", + type: { + name: "DateTime" + } + }, + resourceDetails: { + serializedName: "properties.resourceDetails", + type: { + name: "Composite", + className: "ResourceDetails" + } + }, + additionalData: { + serializedName: "properties.additionalData", + type: { + name: "Composite", + className: "AdditionalData" + } + } + } + } +}; + +export const SqlServerVulnerabilityProperties: msRest.CompositeMapper = { + serializedName: "SqlServerVulnerability", + type: { + name: "Composite", + polymorphicDiscriminator: AdditionalData.type.polymorphicDiscriminator, + uberParent: "AdditionalData", + className: "SqlServerVulnerabilityProperties", + modelProperties: { + ...AdditionalData.type.modelProperties, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + query: { + readOnly: true, + serializedName: "query", + type: { + name: "String" + } + } + } + } +}; + +export const CVSS: msRest.CompositeMapper = { + serializedName: "CVSS", + type: { + name: "Composite", + className: "CVSS", + modelProperties: { + base: { + readOnly: true, + serializedName: "base", + type: { + name: "Number" + } + } + } + } +}; + +export const CVE: msRest.CompositeMapper = { + serializedName: "CVE", + type: { + name: "Composite", + className: "CVE", + modelProperties: { + title: { + readOnly: true, + serializedName: "title", + type: { + name: "String" + } + }, + link: { + readOnly: true, + serializedName: "link", + type: { + name: "String" + } + } + } + } +}; + +export const VendorReference: msRest.CompositeMapper = { + serializedName: "VendorReference", + type: { + name: "Composite", + className: "VendorReference", + modelProperties: { + title: { + readOnly: true, + serializedName: "title", + type: { + name: "String" + } + }, + link: { + readOnly: true, + serializedName: "link", + type: { + name: "String" + } + } + } + } +}; + +export const ContainerRegistryVulnerabilityProperties: msRest.CompositeMapper = { + serializedName: "ContainerRegistryVulnerability", + type: { + name: "Composite", + polymorphicDiscriminator: AdditionalData.type.polymorphicDiscriminator, + uberParent: "AdditionalData", + className: "ContainerRegistryVulnerabilityProperties", + modelProperties: { + ...AdditionalData.type.modelProperties, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + cvss: { + readOnly: true, + serializedName: "cvss", + type: { + name: "Dictionary", + value: { + type: { + name: "Composite", + className: "CVSS" + } + } + } + }, + patchable: { + readOnly: true, + serializedName: "patchable", + type: { + name: "Boolean" + } + }, + cve: { + readOnly: true, + serializedName: "cve", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CVE" + } + } + } + }, + publishedTime: { + readOnly: true, + serializedName: "publishedTime", + type: { + name: "DateTime" + } + }, + vendorReferences: { + readOnly: true, + serializedName: "vendorReferences", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VendorReference" + } + } + } + }, + repositoryName: { + readOnly: true, + serializedName: "repositoryName", + type: { + name: "String" + } + }, + imageDigest: { + readOnly: true, + serializedName: "imageDigest", + type: { + name: "String" + } + } + } + } +}; + +export const ServerVulnerabilityProperties: msRest.CompositeMapper = { + serializedName: "ServerVulnerabilityAssessment", + type: { + name: "Composite", + polymorphicDiscriminator: AdditionalData.type.polymorphicDiscriminator, + uberParent: "AdditionalData", + className: "ServerVulnerabilityProperties", + modelProperties: { + ...AdditionalData.type.modelProperties, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + cvss: { + readOnly: true, + serializedName: "cvss", + type: { + name: "Dictionary", + value: { + type: { + name: "Composite", + className: "CVSS" + } + } + } + }, + patchable: { + readOnly: true, + serializedName: "patchable", + type: { + name: "Boolean" + } + }, + cve: { + readOnly: true, + serializedName: "cve", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CVE" + } + } + } + }, + threat: { + readOnly: true, + serializedName: "threat", + type: { + name: "String" + } + }, + publishedTime: { + readOnly: true, + serializedName: "publishedTime", + type: { + name: "DateTime" + } + }, + vendorReferences: { + readOnly: true, + serializedName: "vendorReferences", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VendorReference" + } + } + } + } + } + } +}; + +export const OnPremiseResourceDetails: msRest.CompositeMapper = { + serializedName: "OnPremise", + type: { + name: "Composite", + polymorphicDiscriminator: ResourceDetails.type.polymorphicDiscriminator, + uberParent: "ResourceDetails", + className: "OnPremiseResourceDetails", + modelProperties: { + ...ResourceDetails.type.modelProperties, + workspaceId: { + required: true, + serializedName: "workspaceId", + type: { + name: "String" + } + }, + vmuuid: { + required: true, + serializedName: "vmuuid", + type: { + name: "String" + } + }, + sourceComputerId: { + required: true, + serializedName: "sourceComputerId", + type: { + name: "String" + } + }, + machineName: { + required: true, + serializedName: "machineName", + type: { + name: "String" + } + } + } + } +}; + +export const OnPremiseSqlResourceDetails: msRest.CompositeMapper = { + serializedName: "OnPremiseSql", + type: { + name: "Composite", + polymorphicDiscriminator: ResourceDetails.type.polymorphicDiscriminator, + uberParent: "ResourceDetails", + className: "OnPremiseSqlResourceDetails", + modelProperties: { + ...OnPremiseResourceDetails.type.modelProperties, + serverName: { + required: true, + serializedName: "serverName", + type: { + name: "String" + } + }, + databaseName: { + required: true, + serializedName: "databaseName", + type: { + name: "String" + } + } + } + } +}; + +export const AzureResourceDetails: msRest.CompositeMapper = { + serializedName: "Azure", + type: { + name: "Composite", + polymorphicDiscriminator: ResourceDetails.type.polymorphicDiscriminator, + uberParent: "ResourceDetails", + className: "AzureResourceDetails", + modelProperties: { + ...ResourceDetails.type.modelProperties, + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + } + } + } +}; + +export const AutomationScope: msRest.CompositeMapper = { + serializedName: "AutomationScope", + type: { + name: "Composite", + className: "AutomationScope", + modelProperties: { + description: { + serializedName: "description", + type: { + name: "String" + } + }, + scopePath: { + serializedName: "scopePath", + type: { + name: "String" + } + } + } + } +}; + +export const AutomationTriggeringRule: msRest.CompositeMapper = { + serializedName: "AutomationTriggeringRule", + type: { + name: "Composite", + className: "AutomationTriggeringRule", + modelProperties: { + propertyJPath: { + serializedName: "propertyJPath", + type: { + name: "String" + } + }, + propertyType: { + serializedName: "propertyType", + type: { + name: "String" + } + }, + expectedValue: { + serializedName: "expectedValue", + type: { + name: "String" + } + }, + operator: { + serializedName: "operator", + type: { + name: "String" + } + } + } + } +}; + +export const AutomationRuleSet: msRest.CompositeMapper = { + serializedName: "AutomationRuleSet", + type: { + name: "Composite", + className: "AutomationRuleSet", + modelProperties: { + rules: { + serializedName: "rules", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AutomationTriggeringRule" + } + } + } + } + } + } +}; + +export const AutomationSource: msRest.CompositeMapper = { + serializedName: "AutomationSource", + type: { + name: "Composite", + className: "AutomationSource", + modelProperties: { + eventSource: { + serializedName: "eventSource", + type: { + name: "String" + } + }, + ruleSets: { + serializedName: "ruleSets", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AutomationRuleSet" + } + } + } + } + } + } +}; + +export const AutomationAction: msRest.CompositeMapper = { + serializedName: "AutomationAction", + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "actionType", + clientName: "actionType" + }, + uberParent: "AutomationAction", + className: "AutomationAction", + modelProperties: { + actionType: { + required: true, + serializedName: "actionType", + type: { + name: "String" + } + } + } + } +}; + +export const Automation: msRest.CompositeMapper = { + serializedName: "Automation", + type: { + name: "Composite", + className: "Automation", + modelProperties: { + ...TrackedResource.type.modelProperties, + description: { + serializedName: "properties.description", + type: { + name: "String" + } + }, + isEnabled: { + serializedName: "properties.isEnabled", + type: { + name: "Boolean" + } + }, + scopes: { + serializedName: "properties.scopes", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AutomationScope" + } + } + } + }, + sources: { + serializedName: "properties.sources", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AutomationSource" + } + } + } + }, + actions: { + serializedName: "properties.actions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AutomationAction" + } + } + } + } + } + } +}; + +export const AutomationActionLogicApp: msRest.CompositeMapper = { + serializedName: "LogicApp", + type: { + name: "Composite", + polymorphicDiscriminator: AutomationAction.type.polymorphicDiscriminator, + uberParent: "AutomationAction", + className: "AutomationActionLogicApp", + modelProperties: { + ...AutomationAction.type.modelProperties, + logicAppResourceId: { + serializedName: "logicAppResourceId", + type: { + name: "String" + } + }, + uri: { + serializedName: "uri", + type: { + name: "String" + } + } + } + } +}; + +export const AutomationActionEventHub: msRest.CompositeMapper = { + serializedName: "EventHub", + type: { + name: "Composite", + polymorphicDiscriminator: AutomationAction.type.polymorphicDiscriminator, + uberParent: "AutomationAction", + className: "AutomationActionEventHub", + modelProperties: { + ...AutomationAction.type.modelProperties, + eventHubResourceId: { + serializedName: "eventHubResourceId", + type: { + name: "String" + } + }, + sasPolicyName: { + readOnly: true, + serializedName: "sasPolicyName", + type: { + name: "String" + } + }, + connectionString: { + serializedName: "connectionString", + type: { + name: "String" + } + } + } + } +}; + +export const AutomationActionWorkspace: msRest.CompositeMapper = { + serializedName: "Workspace", + type: { + name: "Composite", + polymorphicDiscriminator: AutomationAction.type.polymorphicDiscriminator, + uberParent: "AutomationAction", + className: "AutomationActionWorkspace", + modelProperties: { + ...AutomationAction.type.modelProperties, + workspaceResourceId: { + serializedName: "workspaceResourceId", + type: { + name: "String" + } + } + } + } +}; + +export const AutomationValidationStatus: msRest.CompositeMapper = { + serializedName: "AutomationValidationStatus", + type: { + name: "Composite", + className: "AutomationValidationStatus", + modelProperties: { + isValid: { + serializedName: "isValid", + type: { + name: "Boolean" + } + }, + message: { + serializedName: "message", + type: { + name: "String" + } + } + } + } +}; + +export const ScopeElement: msRest.CompositeMapper = { + serializedName: "ScopeElement", + type: { + name: "Composite", + className: "ScopeElement", + modelProperties: { + field: { + serializedName: "field", + type: { + name: "String" + } + } + }, + additionalProperties: { + type: { + name: "Object" + } + } + } +}; + +export const SuppressionAlertsScope: msRest.CompositeMapper = { + serializedName: "SuppressionAlertsScope", + type: { + name: "Composite", + className: "SuppressionAlertsScope", + modelProperties: { + allOf: { + required: true, + serializedName: "allOf", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ScopeElement", + additionalProperties: { + type: { + name: "Object" + } + } + } + } + } + } + } + } +}; + +export const AlertsSuppressionRule: msRest.CompositeMapper = { + serializedName: "AlertsSuppressionRule", + type: { + name: "Composite", + className: "AlertsSuppressionRule", + modelProperties: { + ...Resource.type.modelProperties, + alertType: { + required: true, + serializedName: "properties.alertType", + type: { + name: "String" + } + }, + lastModifiedUtc: { + readOnly: true, + serializedName: "properties.lastModifiedUtc", + type: { + name: "DateTime" + } + }, + expirationDateUtc: { + serializedName: "properties.expirationDateUtc", + type: { + name: "DateTime" + } + }, + reason: { + required: true, + serializedName: "properties.reason", + type: { + name: "String" + } + }, + state: { + required: true, + serializedName: "properties.state", + type: { + name: "Enum", + allowedValues: [ + "Enabled", + "Disabled", + "Expired" + ] + } + }, + comment: { + serializedName: "properties.comment", + type: { + name: "String" + } + }, + suppressionAlertsScope: { + serializedName: "properties.suppressionAlertsScope", + type: { + name: "Composite", + className: "SuppressionAlertsScope" + } + } + } + } +}; + +export const ServerVulnerabilityAssessment: msRest.CompositeMapper = { + serializedName: "ServerVulnerabilityAssessment", + type: { + name: "Composite", + className: "ServerVulnerabilityAssessment", + modelProperties: { + ...Resource.type.modelProperties, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + } + } + } +}; + +export const ServerVulnerabilityAssessmentsList: msRest.CompositeMapper = { + serializedName: "ServerVulnerabilityAssessmentsList", + type: { + name: "Composite", + className: "ServerVulnerabilityAssessmentsList", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ServerVulnerabilityAssessment" + } + } + } + } + } + } +}; + +export const SecurityAssessmentMetadataPartnerData: msRest.CompositeMapper = { + serializedName: "SecurityAssessmentMetadataPartnerData", + type: { + name: "Composite", + className: "SecurityAssessmentMetadataPartnerData", + modelProperties: { + partnerName: { + required: true, + serializedName: "partnerName", + type: { + name: "String" + } + }, + productName: { + serializedName: "productName", + type: { + name: "String" + } + }, + secret: { + required: true, + serializedName: "secret", + type: { + name: "String" + } + } + } + } +}; + +export const SecurityAssessmentMetadataProperties: msRest.CompositeMapper = { + serializedName: "SecurityAssessmentMetadataProperties", + type: { + name: "Composite", + className: "SecurityAssessmentMetadataProperties", + modelProperties: { + displayName: { + required: true, + serializedName: "displayName", + type: { + name: "String" + } + }, + policyDefinitionId: { + readOnly: true, + serializedName: "policyDefinitionId", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + }, + remediationDescription: { + serializedName: "remediationDescription", + type: { + name: "String" + } + }, + categories: { + serializedName: "categories", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + severity: { + required: true, + serializedName: "severity", + type: { + name: "String" + } + }, + userImpact: { + serializedName: "userImpact", + type: { + name: "String" + } + }, + implementationEffort: { + serializedName: "implementationEffort", + type: { + name: "String" + } + }, + threats: { + serializedName: "threats", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + preview: { + serializedName: "preview", + type: { + name: "Boolean" + } + }, + assessmentType: { + required: true, + serializedName: "assessmentType", + type: { + name: "String" + } + }, + partnerData: { + serializedName: "partnerData", + type: { + name: "Composite", + className: "SecurityAssessmentMetadataPartnerData" + } + } + } + } +}; + +export const SecurityAssessmentMetadata: msRest.CompositeMapper = { + serializedName: "SecurityAssessmentMetadata", type: { name: "Composite", - className: "UserDefinedResourcesProperties", + className: "SecurityAssessmentMetadata", modelProperties: { - query: { + ...Resource.type.modelProperties, + displayName: { required: true, - nullable: true, - serializedName: "query", + serializedName: "properties.displayName", type: { name: "String" } }, - querySubscriptions: { + policyDefinitionId: { + readOnly: true, + serializedName: "properties.policyDefinitionId", + type: { + name: "String" + } + }, + description: { + serializedName: "properties.description", + type: { + name: "String" + } + }, + remediationDescription: { + serializedName: "properties.remediationDescription", + type: { + name: "String" + } + }, + categories: { + serializedName: "properties.categories", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + severity: { required: true, - nullable: true, - serializedName: "querySubscriptions", + serializedName: "properties.severity", + type: { + name: "String" + } + }, + userImpact: { + serializedName: "properties.userImpact", + type: { + name: "String" + } + }, + implementationEffort: { + serializedName: "properties.implementationEffort", + type: { + name: "String" + } + }, + threats: { + serializedName: "properties.threats", type: { name: "Sequence", element: { @@ -1080,35 +3428,52 @@ export const UserDefinedResourcesProperties: msRest.CompositeMapper = { } } } + }, + preview: { + serializedName: "properties.preview", + type: { + name: "Boolean" + } + }, + assessmentType: { + required: true, + serializedName: "properties.assessmentType", + type: { + name: "String" + } + }, + partnerData: { + serializedName: "properties.partnerData", + type: { + name: "Composite", + className: "SecurityAssessmentMetadataPartnerData" + } } } } }; -export const RecommendationConfigurationProperties: msRest.CompositeMapper = { - serializedName: "RecommendationConfigurationProperties", +export const AssessmentStatus: msRest.CompositeMapper = { + serializedName: "AssessmentStatus", type: { name: "Composite", - className: "RecommendationConfigurationProperties", + className: "AssessmentStatus", modelProperties: { - recommendationType: { + code: { required: true, - serializedName: "recommendationType", + serializedName: "code", type: { name: "String" } }, - name: { - readOnly: true, - serializedName: "name", + cause: { + serializedName: "cause", type: { name: "String" } }, - status: { - required: true, - serializedName: "status", - defaultValue: 'Enabled', + description: { + serializedName: "description", type: { name: "String" } @@ -1117,139 +3482,139 @@ export const RecommendationConfigurationProperties: msRest.CompositeMapper = { } }; -export const IoTSecuritySolutionModel: msRest.CompositeMapper = { - serializedName: "IoTSecuritySolutionModel", +export const AssessmentLinks: msRest.CompositeMapper = { + serializedName: "AssessmentLinks", type: { name: "Composite", - className: "IoTSecuritySolutionModel", + className: "AssessmentLinks", modelProperties: { - id: { - readOnly: true, - serializedName: "id", - type: { - name: "String" - } - }, - name: { + azurePortalUri: { readOnly: true, - serializedName: "name", + serializedName: "azurePortalUri", type: { name: "String" } - }, - type: { - readOnly: true, - serializedName: "type", + } + } + } +}; + +export const SecurityAssessmentPartnerData: msRest.CompositeMapper = { + serializedName: "SecurityAssessmentPartnerData", + type: { + name: "Composite", + className: "SecurityAssessmentPartnerData", + modelProperties: { + partnerName: { + required: true, + serializedName: "partnerName", type: { name: "String" } }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - }, - location: { - serializedName: "location", + secret: { + required: true, + serializedName: "secret", type: { name: "String" } - }, - workspace: { + } + } + } +}; + +export const SecurityAssessment: msRest.CompositeMapper = { + serializedName: "SecurityAssessment", + type: { + name: "Composite", + className: "SecurityAssessment", + modelProperties: { + ...Resource.type.modelProperties, + resourceDetails: { required: true, - serializedName: "properties.workspace", + serializedName: "properties.resourceDetails", type: { - name: "String" + name: "Composite", + className: "ResourceDetails" } }, displayName: { - required: true, + readOnly: true, serializedName: "properties.displayName", type: { name: "String" } }, status: { + required: true, serializedName: "properties.status", - defaultValue: 'Enabled', type: { - name: "String" + name: "Composite", + className: "AssessmentStatus" } }, - exportProperty: { - serializedName: "properties.export", + additionalData: { + serializedName: "properties.additionalData", type: { - name: "Sequence", - element: { + name: "Dictionary", + value: { type: { name: "String" } } } }, - disabledDataSources: { - serializedName: "properties.disabledDataSources", + links: { + serializedName: "properties.links", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "Composite", + className: "AssessmentLinks" } }, - iotHubs: { - required: true, - serializedName: "properties.iotHubs", + metadata: { + serializedName: "properties.metadata", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "Composite", + className: "SecurityAssessmentMetadataProperties" } }, - userDefinedResources: { - serializedName: "properties.userDefinedResources", + partnersData: { + serializedName: "properties.partnersData", type: { name: "Composite", - className: "UserDefinedResourcesProperties" + className: "SecurityAssessmentPartnerData" + } + } + } + } +}; + +export const ProtectionMode: msRest.CompositeMapper = { + serializedName: "ProtectionMode", + type: { + name: "Composite", + className: "ProtectionMode", + modelProperties: { + exe: { + serializedName: "exe", + type: { + name: "String" } }, - autoDiscoveredResources: { - readOnly: true, - serializedName: "properties.autoDiscoveredResources", + msi: { + serializedName: "msi", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "String" } }, - recommendationsConfiguration: { - serializedName: "properties.recommendationsConfiguration", + script: { + serializedName: "script", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RecommendationConfigurationProperties" - } - } + name: "String" } }, - unmaskedIpLoggingStatus: { - serializedName: "properties.unmaskedIpLoggingStatus", - defaultValue: 'Disabled', + executable: { + serializedName: "executable", type: { name: "String" } @@ -1258,240 +3623,295 @@ export const IoTSecuritySolutionModel: msRest.CompositeMapper = { } }; -export const UpdateIotSecuritySolutionData: msRest.CompositeMapper = { - serializedName: "UpdateIotSecuritySolutionData", +export const AdaptiveApplicationControlIssueSummary: msRest.CompositeMapper = { + serializedName: "AdaptiveApplicationControlIssueSummary", type: { name: "Composite", - className: "UpdateIotSecuritySolutionData", + className: "AdaptiveApplicationControlIssueSummary", modelProperties: { - ...TagsResource.type.modelProperties, - userDefinedResources: { - serializedName: "properties.userDefinedResources", + issue: { + serializedName: "issue", type: { - name: "Composite", - className: "UserDefinedResourcesProperties" + name: "String" } }, - recommendationsConfiguration: { - serializedName: "properties.recommendationsConfiguration", + numberOfVms: { + serializedName: "numberOfVms", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RecommendationConfigurationProperties" - } - } + name: "Number" } } } } }; -export const IoTSeverityMetrics: msRest.CompositeMapper = { - serializedName: "IoTSeverityMetrics", +export const VmRecommendation: msRest.CompositeMapper = { + serializedName: "VmRecommendation", type: { name: "Composite", - className: "IoTSeverityMetrics", + className: "VmRecommendation", modelProperties: { - high: { - serializedName: "high", + configurationStatus: { + serializedName: "configurationStatus", type: { - name: "Number" + name: "String" } }, - medium: { - serializedName: "medium", + recommendationAction: { + serializedName: "recommendationAction", type: { - name: "Number" + name: "String" } }, - low: { - serializedName: "low", + resourceId: { + serializedName: "resourceId", type: { - name: "Number" + name: "String" + } + }, + enforcementSupport: { + serializedName: "enforcementSupport", + type: { + name: "String" } } } } }; -export const IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem: msRest.CompositeMapper = { - serializedName: "IoTSecuritySolutionAnalyticsModelProperties_devicesMetricsItem", +export const PublisherInfo: msRest.CompositeMapper = { + serializedName: "PublisherInfo", type: { name: "Composite", - className: "IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem", + className: "PublisherInfo", modelProperties: { - date: { - serializedName: "date", + publisherName: { + serializedName: "publisherName", type: { - name: "DateTime" + name: "String" } }, - devicesMetrics: { - serializedName: "devicesMetrics", + productName: { + serializedName: "productName", type: { - name: "Composite", - className: "IoTSeverityMetrics" + name: "String" + } + }, + binaryName: { + serializedName: "binaryName", + type: { + name: "String" + } + }, + version: { + serializedName: "version", + type: { + name: "String" } } } } }; -export const IoTSecurityAlertedDevice: msRest.CompositeMapper = { - serializedName: "IoTSecurityAlertedDevice", +export const UserRecommendation: msRest.CompositeMapper = { + serializedName: "UserRecommendation", type: { name: "Composite", - className: "IoTSecurityAlertedDevice", + className: "UserRecommendation", modelProperties: { - deviceId: { - readOnly: true, - serializedName: "deviceId", + username: { + serializedName: "username", type: { name: "String" } }, - alertsCount: { - readOnly: true, - serializedName: "alertsCount", + recommendationAction: { + serializedName: "recommendationAction", type: { - name: "Number" + name: "String" } } } } }; -export const IoTSecurityDeviceAlert: msRest.CompositeMapper = { - serializedName: "IoTSecurityDeviceAlert", +export const PathRecommendation: msRest.CompositeMapper = { + serializedName: "PathRecommendation", type: { name: "Composite", - className: "IoTSecurityDeviceAlert", + className: "PathRecommendation", modelProperties: { - alertDisplayName: { - readOnly: true, - serializedName: "alertDisplayName", + path: { + serializedName: "path", type: { name: "String" } }, - reportedSeverity: { - readOnly: true, - serializedName: "reportedSeverity", + action: { + serializedName: "action", type: { name: "String" } }, - alertsCount: { - readOnly: true, - serializedName: "alertsCount", + type: { + serializedName: "type", type: { - name: "Number" + name: "String" + } + }, + publisherInfo: { + serializedName: "publisherInfo", + type: { + name: "Composite", + className: "PublisherInfo" + } + }, + common: { + serializedName: "common", + type: { + name: "Boolean" + } + }, + userSids: { + serializedName: "userSids", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + usernames: { + serializedName: "usernames", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "UserRecommendation" + } + } + } + }, + fileType: { + serializedName: "fileType", + type: { + name: "String" + } + }, + configurationStatus: { + serializedName: "configurationStatus", + type: { + name: "String" } } } } }; -export const IoTSecurityDeviceRecommendation: msRest.CompositeMapper = { - serializedName: "IoTSecurityDeviceRecommendation", +export const AdaptiveApplicationControlGroup: msRest.CompositeMapper = { + serializedName: "AdaptiveApplicationControlGroup", type: { name: "Composite", - className: "IoTSecurityDeviceRecommendation", + className: "AdaptiveApplicationControlGroup", modelProperties: { - recommendationDisplayName: { + id: { readOnly: true, - serializedName: "recommendationDisplayName", + serializedName: "id", type: { name: "String" } }, - reportedSeverity: { + name: { readOnly: true, - serializedName: "reportedSeverity", + serializedName: "name", type: { name: "String" } }, - devicesCount: { + type: { readOnly: true, - serializedName: "devicesCount", + serializedName: "type", type: { - name: "Number" + name: "String" } - } - } - } -}; - -export const IoTSecuritySolutionAnalyticsModel: msRest.CompositeMapper = { - serializedName: "IoTSecuritySolutionAnalyticsModel", - type: { - name: "Composite", - className: "IoTSecuritySolutionAnalyticsModel", - modelProperties: { - ...Resource.type.modelProperties, - metrics: { + }, + location: { readOnly: true, - serializedName: "properties.metrics", + serializedName: "location", + type: { + name: "String" + } + }, + enforcementMode: { + serializedName: "properties.enforcementMode", + type: { + name: "String" + } + }, + protectionMode: { + serializedName: "properties.protectionMode", type: { name: "Composite", - className: "IoTSeverityMetrics" + className: "ProtectionMode" } }, - unhealthyDeviceCount: { + configurationStatus: { readOnly: true, - serializedName: "properties.unhealthyDeviceCount", + serializedName: "properties.configurationStatus", type: { - name: "Number" + name: "String" } }, - devicesMetrics: { + recommendationStatus: { readOnly: true, - serializedName: "properties.devicesMetrics", + serializedName: "properties.recommendationStatus", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem" - } - } + name: "String" } }, - topAlertedDevices: { - serializedName: "properties.topAlertedDevices", + issues: { + readOnly: true, + serializedName: "properties.issues", type: { name: "Sequence", element: { type: { name: "Composite", - className: "IoTSecurityAlertedDevice" + className: "AdaptiveApplicationControlIssueSummary" } } } }, - mostPrevalentDeviceAlerts: { - serializedName: "properties.mostPrevalentDeviceAlerts", + sourceSystem: { + readOnly: true, + serializedName: "properties.sourceSystem", + type: { + name: "String" + } + }, + vmRecommendations: { + serializedName: "properties.vmRecommendations", type: { name: "Sequence", element: { type: { name: "Composite", - className: "IoTSecurityDeviceAlert" + className: "VmRecommendation" } } } }, - mostPrevalentDeviceRecommendations: { - serializedName: "properties.mostPrevalentDeviceRecommendations", + pathRecommendations: { + serializedName: "properties.pathRecommendations", type: { name: "Sequence", element: { type: { name: "Composite", - className: "IoTSecurityDeviceRecommendation" + className: "PathRecommendation" } } } @@ -1500,59 +3920,37 @@ export const IoTSecuritySolutionAnalyticsModel: msRest.CompositeMapper = { } }; -export const IoTSecuritySolutionAnalyticsModelList: msRest.CompositeMapper = { - serializedName: "IoTSecuritySolutionAnalyticsModelList", +export const AdaptiveApplicationControlGroups: msRest.CompositeMapper = { + serializedName: "AdaptiveApplicationControlGroups", type: { name: "Composite", - className: "IoTSecuritySolutionAnalyticsModelList", + className: "AdaptiveApplicationControlGroups", modelProperties: { value: { - required: true, serializedName: "value", type: { name: "Sequence", element: { type: { name: "Composite", - className: "IoTSecuritySolutionAnalyticsModel" + className: "AdaptiveApplicationControlGroup" } } } - }, - nextLink: { - readOnly: true, - serializedName: "nextLink", - type: { - name: "String" - } } } } }; -export const IoTSecurityAggregatedAlertPropertiesTopDevicesListItem: msRest.CompositeMapper = { - serializedName: "IoTSecurityAggregatedAlertProperties_topDevicesListItem", +export const Location: msRest.CompositeMapper = { + serializedName: "Location", type: { name: "Composite", - className: "IoTSecurityAggregatedAlertPropertiesTopDevicesListItem", + className: "Location", modelProperties: { - deviceId: { - readOnly: true, - serializedName: "deviceId", - type: { - name: "String" - } - }, - alertsCount: { - readOnly: true, - serializedName: "alertsCount", - type: { - name: "Number" - } - }, - lastOccurrence: { + location: { readOnly: true, - serializedName: "lastOccurrence", + serializedName: "location", type: { name: "String" } @@ -1561,137 +3959,225 @@ export const IoTSecurityAggregatedAlertPropertiesTopDevicesListItem: msRest.Comp } }; -export const IoTSecurityAggregatedAlert: msRest.CompositeMapper = { - serializedName: "IoTSecurityAggregatedAlert", +export const Rule: msRest.CompositeMapper = { + serializedName: "Rule", type: { name: "Composite", - className: "IoTSecurityAggregatedAlert", + className: "Rule", modelProperties: { - id: { - readOnly: true, - serializedName: "id", + name: { + serializedName: "name", type: { name: "String" } }, - name: { - readOnly: true, - serializedName: "name", + direction: { + serializedName: "direction", type: { name: "String" } }, - type: { - readOnly: true, - serializedName: "type", + destinationPort: { + serializedName: "destinationPort", type: { - name: "String" + name: "Number" } }, - tags: { - serializedName: "tags", + protocols: { + serializedName: "protocols", type: { - name: "Dictionary", - value: { + name: "Sequence", + element: { type: { name: "String" } } } }, - alertType: { - readOnly: true, - serializedName: "properties.alertType", + ipAddresses: { + serializedName: "ipAddresses", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } - }, - alertDisplayName: { - readOnly: true, - serializedName: "properties.alertDisplayName", + } + } + } +}; + +export const EffectiveNetworkSecurityGroups: msRest.CompositeMapper = { + serializedName: "EffectiveNetworkSecurityGroups", + type: { + name: "Composite", + className: "EffectiveNetworkSecurityGroups", + modelProperties: { + networkInterface: { + serializedName: "networkInterface", type: { name: "String" } }, - aggregatedDateUtc: { - readOnly: true, - serializedName: "properties.aggregatedDateUtc", + networkSecurityGroups: { + serializedName: "networkSecurityGroups", type: { - name: "Date" + name: "Sequence", + element: { + type: { + name: "String" + } + } } - }, - vendorName: { - readOnly: true, - serializedName: "properties.vendorName", + } + } + } +}; + +export const AdaptiveNetworkHardening: msRest.CompositeMapper = { + serializedName: "AdaptiveNetworkHardening", + type: { + name: "Composite", + className: "AdaptiveNetworkHardening", + modelProperties: { + ...Resource.type.modelProperties, + rules: { + serializedName: "properties.rules", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Rule" + } + } } }, - reportedSeverity: { - readOnly: true, - serializedName: "properties.reportedSeverity", + rulesCalculationTime: { + serializedName: "properties.rulesCalculationTime", type: { - name: "String" + name: "DateTime" } }, - remediationSteps: { - readOnly: true, - serializedName: "properties.remediationSteps", + effectiveNetworkSecurityGroups: { + serializedName: "properties.effectiveNetworkSecurityGroups", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EffectiveNetworkSecurityGroups" + } + } } - }, - description: { - readOnly: true, - serializedName: "properties.description", + } + } + } +}; + +export const AdaptiveNetworkHardeningEnforceRequest: msRest.CompositeMapper = { + serializedName: "AdaptiveNetworkHardeningEnforceRequest", + type: { + name: "Composite", + className: "AdaptiveNetworkHardeningEnforceRequest", + modelProperties: { + rules: { + required: true, + serializedName: "rules", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Rule" + } + } } }, - count: { + networkSecurityGroups: { + required: true, + serializedName: "networkSecurityGroups", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const ConnectedResource: msRest.CompositeMapper = { + serializedName: "ConnectedResource", + type: { + name: "Composite", + className: "ConnectedResource", + modelProperties: { + connectedResourceId: { readOnly: true, - serializedName: "properties.count", + serializedName: "connectedResourceId", type: { - name: "Number" + name: "String" } }, - effectedResourceType: { + tcpPorts: { readOnly: true, - serializedName: "properties.effectedResourceType", + serializedName: "tcpPorts", type: { name: "String" } }, - systemSource: { + udpPorts: { readOnly: true, - serializedName: "properties.systemSource", + serializedName: "udpPorts", type: { name: "String" } - }, - actionTaken: { + } + } + } +}; + +export const ConnectableResource: msRest.CompositeMapper = { + serializedName: "ConnectableResource", + type: { + name: "Composite", + className: "ConnectableResource", + modelProperties: { + id: { readOnly: true, - serializedName: "properties.actionTaken", + serializedName: "id", type: { name: "String" } }, - logAnalyticsQuery: { + inboundConnectedResources: { readOnly: true, - serializedName: "properties.logAnalyticsQuery", + serializedName: "inboundConnectedResources", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ConnectedResource" + } + } } }, - topDevicesList: { + outboundConnectedResources: { readOnly: true, - serializedName: "properties.topDevicesList", + serializedName: "outboundConnectedResources", type: { name: "Sequence", element: { type: { name: "Composite", - className: "IoTSecurityAggregatedAlertPropertiesTopDevicesListItem" + className: "ConnectedResource" } } } @@ -1700,11 +4186,11 @@ export const IoTSecurityAggregatedAlert: msRest.CompositeMapper = { } }; -export const IoTSecurityAggregatedRecommendation: msRest.CompositeMapper = { - serializedName: "IoTSecurityAggregatedRecommendation", +export const AllowedConnectionsResource: msRest.CompositeMapper = { + serializedName: "AllowedConnectionsResource", type: { name: "Composite", - className: "IoTSecurityAggregatedRecommendation", + className: "AllowedConnectionsResource", modelProperties: { id: { readOnly: true, @@ -1727,555 +4213,735 @@ export const IoTSecurityAggregatedRecommendation: msRest.CompositeMapper = { name: "String" } }, - tags: { - serializedName: "tags", + location: { + readOnly: true, + serializedName: "location", type: { - name: "Dictionary", - value: { + name: "String" + } + }, + calculatedDateTime: { + readOnly: true, + serializedName: "properties.calculatedDateTime", + type: { + name: "DateTime" + } + }, + connectableResources: { + readOnly: true, + serializedName: "properties.connectableResources", + type: { + name: "Sequence", + element: { type: { - name: "String" + name: "Composite", + className: "ConnectableResource" } } } - }, - recommendationName: { - serializedName: "properties.recommendationName", + } + } + } +}; + +export const TopologySingleResourceParent: msRest.CompositeMapper = { + serializedName: "TopologySingleResourceParent", + type: { + name: "Composite", + className: "TopologySingleResourceParent", + modelProperties: { + resourceId: { + readOnly: true, + serializedName: "resourceId", type: { name: "String" } - }, - recommendationDisplayName: { + } + } + } +}; + +export const TopologySingleResourceChild: msRest.CompositeMapper = { + serializedName: "TopologySingleResourceChild", + type: { + name: "Composite", + className: "TopologySingleResourceChild", + modelProperties: { + resourceId: { readOnly: true, - serializedName: "properties.recommendationDisplayName", + serializedName: "resourceId", type: { name: "String" } - }, - description: { + } + } + } +}; + +export const TopologySingleResource: msRest.CompositeMapper = { + serializedName: "TopologySingleResource", + type: { + name: "Composite", + className: "TopologySingleResource", + modelProperties: { + resourceId: { readOnly: true, - serializedName: "properties.description", + serializedName: "resourceId", type: { name: "String" } }, - recommendationTypeId: { + severity: { readOnly: true, - serializedName: "properties.recommendationTypeId", + serializedName: "severity", type: { name: "String" } }, - detectedBy: { + recommendationsExist: { readOnly: true, - serializedName: "properties.detectedBy", + serializedName: "recommendationsExist", type: { - name: "String" + name: "Boolean" } }, - remediationSteps: { + networkZones: { readOnly: true, - serializedName: "properties.remediationSteps", + serializedName: "networkZones", type: { name: "String" } }, - reportedSeverity: { + topologyScore: { readOnly: true, - serializedName: "properties.reportedSeverity", + serializedName: "topologyScore", type: { - name: "String" + name: "Number" } }, - healthyDevices: { + location: { readOnly: true, - serializedName: "properties.healthyDevices", + serializedName: "location", type: { - name: "Number" + name: "String" } }, - unhealthyDeviceCount: { + parents: { readOnly: true, - serializedName: "properties.unhealthyDeviceCount", + serializedName: "parents", type: { - name: "Number" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TopologySingleResourceParent" + } + } } }, - logAnalyticsQuery: { + children: { readOnly: true, - serializedName: "properties.logAnalyticsQuery", + serializedName: "children", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TopologySingleResourceChild" + } + } } } } } }; -export const OperationDisplay: msRest.CompositeMapper = { - serializedName: "OperationDisplay", +export const TopologyResource: msRest.CompositeMapper = { + serializedName: "TopologyResource", type: { name: "Composite", - className: "OperationDisplay", + className: "TopologyResource", modelProperties: { - provider: { + id: { readOnly: true, - serializedName: "provider", + serializedName: "id", type: { name: "String" } }, - resource: { + name: { readOnly: true, - serializedName: "resource", + serializedName: "name", type: { name: "String" } }, - operation: { + type: { readOnly: true, - serializedName: "operation", + serializedName: "type", type: { name: "String" } }, - description: { + location: { readOnly: true, - serializedName: "description", + serializedName: "location", type: { name: "String" } + }, + calculatedDateTime: { + readOnly: true, + serializedName: "properties.calculatedDateTime", + type: { + name: "DateTime" + } + }, + topologyResources: { + readOnly: true, + serializedName: "properties.topologyResources", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TopologySingleResource" + } + } + } } } } }; -export const Operation: msRest.CompositeMapper = { - serializedName: "Operation", +export const JitNetworkAccessPortRule: msRest.CompositeMapper = { + serializedName: "JitNetworkAccessPortRule", type: { name: "Composite", - className: "Operation", + className: "JitNetworkAccessPortRule", modelProperties: { - name: { - readOnly: true, - serializedName: "name", + number: { + required: true, + serializedName: "number", + type: { + name: "Number" + } + }, + protocol: { + required: true, + serializedName: "protocol", type: { name: "String" } }, - origin: { - readOnly: true, - serializedName: "origin", + allowedSourceAddressPrefix: { + serializedName: "allowedSourceAddressPrefix", type: { name: "String" } }, - display: { - serializedName: "display", + allowedSourceAddressPrefixes: { + serializedName: "allowedSourceAddressPrefixes", type: { - name: "Composite", - className: "OperationDisplay" + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + maxRequestAccessDuration: { + required: true, + serializedName: "maxRequestAccessDuration", + type: { + name: "String" } } } } }; -export const SecurityTaskParameters: msRest.CompositeMapper = { - serializedName: "SecurityTaskParameters", +export const JitNetworkAccessPolicyVirtualMachine: msRest.CompositeMapper = { + serializedName: "JitNetworkAccessPolicyVirtualMachine", type: { name: "Composite", - className: "SecurityTaskParameters", + className: "JitNetworkAccessPolicyVirtualMachine", modelProperties: { - name: { - readOnly: true, - serializedName: "name", + id: { + required: true, + serializedName: "id", + type: { + name: "String" + } + }, + ports: { + required: true, + serializedName: "ports", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "JitNetworkAccessPortRule" + } + } + } + }, + publicIpAddress: { + serializedName: "publicIpAddress", type: { name: "String" } } - }, - additionalProperties: { - type: { - name: "Object" - } } } }; -export const SecurityTask: msRest.CompositeMapper = { - serializedName: "SecurityTask", +export const JitNetworkAccessRequestPort: msRest.CompositeMapper = { + serializedName: "JitNetworkAccessRequestPort", type: { name: "Composite", - className: "SecurityTask", + className: "JitNetworkAccessRequestPort", modelProperties: { - ...Resource.type.modelProperties, - state: { - readOnly: true, - serializedName: "properties.state", + number: { + required: true, + serializedName: "number", type: { - name: "String" + name: "Number" } }, - creationTimeUtc: { - readOnly: true, - serializedName: "properties.creationTimeUtc", + allowedSourceAddressPrefix: { + serializedName: "allowedSourceAddressPrefix", type: { - name: "DateTime" + name: "String" } }, - securityTaskParameters: { - serializedName: "properties.securityTaskParameters", + allowedSourceAddressPrefixes: { + serializedName: "allowedSourceAddressPrefixes", type: { - name: "Composite", - className: "SecurityTaskParameters", - additionalProperties: { + name: "Sequence", + element: { type: { - name: "Object" + name: "String" } } } }, - lastStateChangeTimeUtc: { - readOnly: true, - serializedName: "properties.lastStateChangeTimeUtc", + endTimeUtc: { + required: true, + serializedName: "endTimeUtc", type: { name: "DateTime" } }, - subState: { - readOnly: true, - serializedName: "properties.subState", + status: { + required: true, + serializedName: "status", + type: { + name: "String" + } + }, + statusReason: { + required: true, + serializedName: "statusReason", type: { name: "String" } + }, + mappedPort: { + serializedName: "mappedPort", + type: { + name: "Number" + } } } } }; -export const AutoProvisioningSetting: msRest.CompositeMapper = { - serializedName: "AutoProvisioningSetting", +export const JitNetworkAccessRequestVirtualMachine: msRest.CompositeMapper = { + serializedName: "JitNetworkAccessRequestVirtualMachine", type: { name: "Composite", - className: "AutoProvisioningSetting", + className: "JitNetworkAccessRequestVirtualMachine", modelProperties: { - ...Resource.type.modelProperties, - autoProvision: { + id: { required: true, - serializedName: "properties.autoProvision", + serializedName: "id", type: { name: "String" } + }, + ports: { + required: true, + serializedName: "ports", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "JitNetworkAccessRequestPort" + } + } + } } } } }; -export const ComplianceSegment: msRest.CompositeMapper = { - serializedName: "ComplianceSegment", +export const JitNetworkAccessRequest: msRest.CompositeMapper = { + serializedName: "JitNetworkAccessRequest", type: { name: "Composite", - className: "ComplianceSegment", + className: "JitNetworkAccessRequest", modelProperties: { - segmentType: { - readOnly: true, - serializedName: "segmentType", + virtualMachines: { + required: true, + serializedName: "virtualMachines", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "JitNetworkAccessRequestVirtualMachine" + } + } + } + }, + startTimeUtc: { + required: true, + serializedName: "startTimeUtc", + type: { + name: "DateTime" + } + }, + requestor: { + required: true, + serializedName: "requestor", type: { name: "String" } }, - percentage: { - readOnly: true, - serializedName: "percentage", + justification: { + serializedName: "justification", type: { - name: "Number" + name: "String" } } } } }; -export const Compliance: msRest.CompositeMapper = { - serializedName: "Compliance", +export const JitNetworkAccessPolicy: msRest.CompositeMapper = { + serializedName: "JitNetworkAccessPolicy", type: { name: "Composite", - className: "Compliance", + className: "JitNetworkAccessPolicy", modelProperties: { - ...Resource.type.modelProperties, - assessmentTimestampUtcDate: { + id: { readOnly: true, - serializedName: "properties.assessmentTimestampUtcDate", + serializedName: "id", type: { - name: "DateTime" + name: "String" } }, - resourceCount: { + name: { readOnly: true, - serializedName: "properties.resourceCount", + serializedName: "name", type: { - name: "Number" + name: "String" } }, - assessmentResult: { + type: { readOnly: true, - serializedName: "properties.assessmentResult", + serializedName: "type", + type: { + name: "String" + } + }, + kind: { + serializedName: "kind", + type: { + name: "String" + } + }, + location: { + readOnly: true, + serializedName: "location", + type: { + name: "String" + } + }, + virtualMachines: { + required: true, + serializedName: "properties.virtualMachines", type: { name: "Sequence", element: { type: { name: "Composite", - className: "ComplianceSegment" + className: "JitNetworkAccessPolicyVirtualMachine" + } + } + } + }, + requests: { + serializedName: "properties.requests", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "JitNetworkAccessRequest" } } } + }, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } } } } }; -export const SensitivityLabel: msRest.CompositeMapper = { - serializedName: "SensitivityLabel", +export const JitNetworkAccessPolicyInitiatePort: msRest.CompositeMapper = { + serializedName: "JitNetworkAccessPolicyInitiatePort", type: { name: "Composite", - className: "SensitivityLabel", + className: "JitNetworkAccessPolicyInitiatePort", modelProperties: { - displayName: { - serializedName: "displayName", + number: { + required: true, + serializedName: "number", type: { - name: "String" + name: "Number" } }, - description: { - serializedName: "description", + allowedSourceAddressPrefix: { + serializedName: "allowedSourceAddressPrefix", type: { name: "String" } }, - rank: { - serializedName: "rank", + endTimeUtc: { + required: true, + serializedName: "endTimeUtc", type: { - name: "Enum", - allowedValues: [ - "None", - "Low", - "Medium", - "High", - "Critical" - ] + name: "DateTime" } - }, - order: { - serializedName: "order", + } + } + } +}; + +export const JitNetworkAccessPolicyInitiateVirtualMachine: msRest.CompositeMapper = { + serializedName: "JitNetworkAccessPolicyInitiateVirtualMachine", + type: { + name: "Composite", + className: "JitNetworkAccessPolicyInitiateVirtualMachine", + modelProperties: { + id: { + required: true, + serializedName: "id", type: { - name: "Number" + name: "String" } }, - enabled: { - serializedName: "enabled", + ports: { + required: true, + serializedName: "ports", type: { - name: "Boolean" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "JitNetworkAccessPolicyInitiatePort" + } + } } } } } }; -export const InformationProtectionKeyword: msRest.CompositeMapper = { - serializedName: "InformationProtectionKeyword", +export const JitNetworkAccessPolicyInitiateRequest: msRest.CompositeMapper = { + serializedName: "JitNetworkAccessPolicyInitiateRequest", type: { name: "Composite", - className: "InformationProtectionKeyword", + className: "JitNetworkAccessPolicyInitiateRequest", modelProperties: { - pattern: { - serializedName: "pattern", - type: { - name: "String" - } - }, - custom: { - serializedName: "custom", - type: { - name: "Boolean" - } - }, - canBeNumeric: { - serializedName: "canBeNumeric", + virtualMachines: { + required: true, + serializedName: "virtualMachines", type: { - name: "Boolean" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "JitNetworkAccessPolicyInitiateVirtualMachine" + } + } } }, - excluded: { - serializedName: "excluded", + justification: { + serializedName: "justification", type: { - name: "Boolean" + name: "String" } } } } }; -export const InformationType: msRest.CompositeMapper = { - serializedName: "InformationType", +export const DiscoveredSecuritySolution: msRest.CompositeMapper = { + serializedName: "DiscoveredSecuritySolution", type: { name: "Composite", - className: "InformationType", + className: "DiscoveredSecuritySolution", modelProperties: { - displayName: { - serializedName: "displayName", + id: { + readOnly: true, + serializedName: "id", type: { name: "String" } }, - description: { - serializedName: "description", + name: { + readOnly: true, + serializedName: "name", type: { name: "String" } }, - order: { - serializedName: "order", + type: { + readOnly: true, + serializedName: "type", type: { - name: "Number" + name: "String" } }, - recommendedLabelId: { - serializedName: "recommendedLabelId", + location: { + readOnly: true, + serializedName: "location", type: { - name: "Uuid" + name: "String" } }, - enabled: { - serializedName: "enabled", + securityFamily: { + required: true, + serializedName: "properties.securityFamily", type: { - name: "Boolean" + name: "String" } }, - custom: { - serializedName: "custom", + offer: { + required: true, + serializedName: "properties.offer", type: { - name: "Boolean" + name: "String" } }, - keywords: { - serializedName: "keywords", + publisher: { + required: true, + serializedName: "properties.publisher", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "InformationProtectionKeyword" - } - } + name: "String" + } + }, + sku: { + required: true, + serializedName: "properties.sku", + type: { + name: "String" } } } } }; -export const InformationProtectionPolicy: msRest.CompositeMapper = { - serializedName: "InformationProtectionPolicy", +export const SecuritySolutionsReferenceData: msRest.CompositeMapper = { + serializedName: "securitySolutionsReferenceData", type: { name: "Composite", - className: "InformationProtectionPolicy", + className: "SecuritySolutionsReferenceData", modelProperties: { - ...Resource.type.modelProperties, - lastModifiedUtc: { + id: { readOnly: true, - serializedName: "properties.lastModifiedUtc", + serializedName: "id", type: { - name: "DateTime" + name: "String" } }, - version: { + name: { readOnly: true, - serializedName: "properties.version", + serializedName: "name", type: { name: "String" } }, - labels: { - serializedName: "properties.labels", + type: { + readOnly: true, + serializedName: "type", type: { - name: "Dictionary", - value: { - type: { - name: "Composite", - className: "SensitivityLabel" - } - } + name: "String" } }, - informationTypes: { - serializedName: "properties.informationTypes", + location: { + readOnly: true, + serializedName: "location", type: { - name: "Dictionary", - value: { - type: { - name: "Composite", - className: "InformationType" - } - } + name: "String" } - } - } - } -}; - -export const SecurityContact: msRest.CompositeMapper = { - serializedName: "SecurityContact", - type: { - name: "Composite", - className: "SecurityContact", - modelProperties: { - ...Resource.type.modelProperties, - email: { + }, + securityFamily: { required: true, - serializedName: "properties.email", + serializedName: "properties.securityFamily", type: { name: "String" } }, - phone: { - serializedName: "properties.phone", + alertVendorName: { + required: true, + serializedName: "properties.alertVendorName", type: { name: "String" } }, - alertNotifications: { + packageInfoUrl: { required: true, - serializedName: "properties.alertNotifications", + serializedName: "properties.packageInfoUrl", type: { name: "String" } }, - alertsToAdmins: { + productName: { required: true, - serializedName: "properties.alertsToAdmins", + serializedName: "properties.productName", type: { name: "String" } - } - } - } -}; - -export const WorkspaceSetting: msRest.CompositeMapper = { - serializedName: "WorkspaceSetting", - type: { - name: "Composite", - className: "WorkspaceSetting", - modelProperties: { - ...Resource.type.modelProperties, - workspaceId: { + }, + publisher: { required: true, - serializedName: "properties.workspaceId", + serializedName: "properties.publisher", type: { name: "String" } }, - scope: { + publisherDisplayName: { required: true, - serializedName: "properties.scope", + serializedName: "properties.publisherDisplayName", + type: { + name: "String" + } + }, + template: { + required: true, + serializedName: "properties.template", type: { name: "String" } @@ -2284,232 +4950,245 @@ export const WorkspaceSetting: msRest.CompositeMapper = { } }; -export const RegulatoryComplianceStandard: msRest.CompositeMapper = { - serializedName: "RegulatoryComplianceStandard", +export const SecuritySolutionsReferenceDataList: msRest.CompositeMapper = { + serializedName: "securitySolutionsReferenceDataList", type: { name: "Composite", - className: "RegulatoryComplianceStandard", + className: "SecuritySolutionsReferenceDataList", modelProperties: { - ...Resource.type.modelProperties, - state: { - serializedName: "properties.state", - type: { - name: "String" - } - }, - passedControls: { - readOnly: true, - serializedName: "properties.passedControls", - type: { - name: "Number" - } - }, - failedControls: { - readOnly: true, - serializedName: "properties.failedControls", - type: { - name: "Number" - } - }, - skippedControls: { - readOnly: true, - serializedName: "properties.skippedControls", - type: { - name: "Number" - } - }, - unsupportedControls: { - readOnly: true, - serializedName: "properties.unsupportedControls", + value: { + serializedName: "value", type: { - name: "Number" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SecuritySolutionsReferenceData" + } + } } } } } }; -export const RegulatoryComplianceControl: msRest.CompositeMapper = { - serializedName: "RegulatoryComplianceControl", +export const ExternalSecuritySolution: msRest.CompositeMapper = { + serializedName: "ExternalSecuritySolution", type: { name: "Composite", - className: "RegulatoryComplianceControl", + polymorphicDiscriminator: { + serializedName: "kind", + clientName: "kind" + }, + uberParent: "ExternalSecuritySolution", + className: "ExternalSecuritySolution", modelProperties: { - ...Resource.type.modelProperties, - description: { + id: { readOnly: true, - serializedName: "properties.description", + serializedName: "id", type: { name: "String" } - }, - state: { - serializedName: "properties.state", + }, + name: { + readOnly: true, + serializedName: "name", type: { name: "String" } }, - passedAssessments: { + type: { readOnly: true, - serializedName: "properties.passedAssessments", + serializedName: "type", type: { - name: "Number" + name: "String" } }, - failedAssessments: { + location: { readOnly: true, - serializedName: "properties.failedAssessments", + serializedName: "location", type: { - name: "Number" + name: "String" } }, - skippedAssessments: { - readOnly: true, - serializedName: "properties.skippedAssessments", + kind: { + required: true, + serializedName: "kind", type: { - name: "Number" + name: "String" } } } } }; -export const RegulatoryComplianceAssessment: msRest.CompositeMapper = { - serializedName: "RegulatoryComplianceAssessment", +export const ExternalSecuritySolutionProperties: msRest.CompositeMapper = { + serializedName: "ExternalSecuritySolutionProperties", type: { name: "Composite", - className: "RegulatoryComplianceAssessment", + className: "ExternalSecuritySolutionProperties", modelProperties: { - ...Resource.type.modelProperties, - description: { - readOnly: true, - serializedName: "properties.description", + deviceVendor: { + serializedName: "deviceVendor", type: { name: "String" } }, - assessmentType: { - readOnly: true, - serializedName: "properties.assessmentType", + deviceType: { + serializedName: "deviceType", type: { name: "String" } }, - assessmentDetailsLink: { - readOnly: true, - serializedName: "properties.assessmentDetailsLink", + workspace: { + serializedName: "workspace", type: { - name: "String" + name: "Composite", + className: "ConnectedWorkspace" } - }, - state: { - serializedName: "properties.state", + } + }, + additionalProperties: { + type: { + name: "Object" + } + } + } +}; + +export const CefSolutionProperties: msRest.CompositeMapper = { + serializedName: "CefSolutionProperties", + type: { + name: "Composite", + className: "CefSolutionProperties", + modelProperties: { + ...ExternalSecuritySolutionProperties.type.modelProperties, + hostname: { + serializedName: "hostname", type: { name: "String" } }, - passedResources: { - readOnly: true, - serializedName: "properties.passedResources", - type: { - name: "Number" - } - }, - failedResources: { - readOnly: true, - serializedName: "properties.failedResources", + agent: { + serializedName: "agent", type: { - name: "Number" + name: "String" } }, - skippedResources: { - readOnly: true, - serializedName: "properties.skippedResources", + lastEventReceived: { + serializedName: "lastEventReceived", type: { - name: "Number" + name: "String" } - }, - unsupportedResources: { - readOnly: true, - serializedName: "properties.unsupportedResources", + } + }, + additionalProperties: ExternalSecuritySolutionProperties.type.additionalProperties + } +}; + +export const CefExternalSecuritySolution: msRest.CompositeMapper = { + serializedName: "CEF", + type: { + name: "Composite", + polymorphicDiscriminator: ExternalSecuritySolution.type.polymorphicDiscriminator, + uberParent: "ExternalSecuritySolution", + className: "CefExternalSecuritySolution", + modelProperties: { + ...ExternalSecuritySolution.type.modelProperties, + properties: { + serializedName: "properties", type: { - name: "Number" + name: "Composite", + className: "CefSolutionProperties", + additionalProperties: ExternalSecuritySolutionProperties.type.additionalProperties } } } } }; -export const ServerVulnerabilityAssessment: msRest.CompositeMapper = { - serializedName: "ServerVulnerabilityAssessment", +export const AtaSolutionProperties: msRest.CompositeMapper = { + serializedName: "AtaSolutionProperties", type: { name: "Composite", - className: "ServerVulnerabilityAssessment", + className: "AtaSolutionProperties", modelProperties: { - ...Resource.type.modelProperties, - provisioningState: { - readOnly: true, - serializedName: "properties.provisioningState", + ...ExternalSecuritySolutionProperties.type.modelProperties, + lastEventReceived: { + serializedName: "lastEventReceived", type: { name: "String" } } + }, + additionalProperties: ExternalSecuritySolutionProperties.type.additionalProperties + } +}; + +export const AtaExternalSecuritySolution: msRest.CompositeMapper = { + serializedName: "ATA", + type: { + name: "Composite", + polymorphicDiscriminator: ExternalSecuritySolution.type.polymorphicDiscriminator, + uberParent: "ExternalSecuritySolution", + className: "AtaExternalSecuritySolution", + modelProperties: { + ...ExternalSecuritySolution.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "AtaSolutionProperties", + additionalProperties: ExternalSecuritySolutionProperties.type.additionalProperties + } + } } } }; -export const ServerVulnerabilityAssessmentsList: msRest.CompositeMapper = { - serializedName: "ServerVulnerabilityAssessmentsList", +export const ConnectedWorkspace: msRest.CompositeMapper = { + serializedName: "ConnectedWorkspace", type: { name: "Composite", - className: "ServerVulnerabilityAssessmentsList", + className: "ConnectedWorkspace", modelProperties: { - value: { - serializedName: "value", + id: { + serializedName: "id", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ServerVulnerabilityAssessment" - } - } + name: "String" } } } } }; -export const SubAssessmentStatus: msRest.CompositeMapper = { - serializedName: "SubAssessmentStatus", +export const AadSolutionProperties: msRest.CompositeMapper = { + serializedName: "AadSolutionProperties", type: { name: "Composite", - className: "SubAssessmentStatus", + className: "AadSolutionProperties", modelProperties: { - code: { - readOnly: true, - serializedName: "code", + deviceVendor: { + serializedName: "deviceVendor", type: { name: "String" } }, - cause: { - readOnly: true, - serializedName: "cause", + deviceType: { + serializedName: "deviceType", type: { name: "String" } }, - description: { - readOnly: true, - serializedName: "description", + workspace: { + serializedName: "workspace", type: { - name: "String" + name: "Composite", + className: "ConnectedWorkspace" } }, - severity: { - readOnly: true, - serializedName: "severity", + connectivityState: { + serializedName: "connectivityState", type: { name: "String" } @@ -2518,42 +5197,34 @@ export const SubAssessmentStatus: msRest.CompositeMapper = { } }; -export const ResourceDetails: msRest.CompositeMapper = { - serializedName: "ResourceDetails", +export const AadExternalSecuritySolution: msRest.CompositeMapper = { + serializedName: "AAD", type: { name: "Composite", - polymorphicDiscriminator: { - serializedName: "source", - clientName: "source" - }, - uberParent: "ResourceDetails", - className: "ResourceDetails", + polymorphicDiscriminator: ExternalSecuritySolution.type.polymorphicDiscriminator, + uberParent: "ExternalSecuritySolution", + className: "AadExternalSecuritySolution", modelProperties: { - source: { - required: true, - serializedName: "source", + ...ExternalSecuritySolution.type.modelProperties, + properties: { + serializedName: "properties", type: { - name: "String" + name: "Composite", + className: "AadSolutionProperties" } } } } }; -export const AdditionalData: msRest.CompositeMapper = { - serializedName: "AdditionalData", +export const ExternalSecuritySolutionKind1: msRest.CompositeMapper = { + serializedName: "ExternalSecuritySolutionKind", type: { name: "Composite", - polymorphicDiscriminator: { - serializedName: "assessedResourceType", - clientName: "assessedResourceType" - }, - uberParent: "AdditionalData", - className: "AdditionalData", + className: "ExternalSecuritySolutionKind1", modelProperties: { - assessedResourceType: { - required: true, - serializedName: "assessedResourceType", + kind: { + serializedName: "kind", type: { name: "String" } @@ -2562,20 +5233,29 @@ export const AdditionalData: msRest.CompositeMapper = { } }; -export const SecuritySubAssessment: msRest.CompositeMapper = { - serializedName: "SecuritySubAssessment", +export const AadConnectivityState1: msRest.CompositeMapper = { + serializedName: "AadConnectivityState", type: { name: "Composite", - className: "SecuritySubAssessment", + className: "AadConnectivityState1", modelProperties: { - ...Resource.type.modelProperties, - securitySubAssessmentId: { - readOnly: true, - serializedName: "properties.id", + connectivityState: { + serializedName: "connectivityState", type: { name: "String" } - }, + } + } + } +}; + +export const SecureScoreItem: msRest.CompositeMapper = { + serializedName: "SecureScoreItem", + type: { + name: "Composite", + className: "SecureScoreItem", + modelProperties: { + ...Resource.type.modelProperties, displayName: { readOnly: true, serializedName: "properties.displayName", @@ -2583,85 +5263,102 @@ export const SecuritySubAssessment: msRest.CompositeMapper = { name: "String" } }, - status: { - serializedName: "properties.status", - type: { - name: "Composite", - className: "SubAssessmentStatus" - } - }, - remediation: { + max: { readOnly: true, - serializedName: "properties.remediation", + serializedName: "properties.score.max", + constraints: { + InclusiveMinimum: 0 + }, type: { - name: "String" + name: "Number" } }, - impact: { + current: { readOnly: true, - serializedName: "properties.impact", + serializedName: "properties.score.current", + constraints: { + InclusiveMinimum: 0 + }, type: { - name: "String" + name: "Number" } }, - category: { + percentage: { readOnly: true, - serializedName: "properties.category", + serializedName: "properties.score.percentage", + constraints: { + InclusiveMaximum: 1, + InclusiveMinimum: 0 + }, type: { - name: "String" + name: "Number" } }, - description: { + weight: { readOnly: true, - serializedName: "properties.description", + serializedName: "properties.weight", + constraints: { + InclusiveMinimum: 0 + }, type: { - name: "String" + name: "Number" } - }, - timeGenerated: { + } + } + } +}; + +export const SecureScoreControlScore: msRest.CompositeMapper = { + serializedName: "SecureScoreControlScore", + type: { + name: "Composite", + className: "SecureScoreControlScore", + modelProperties: { + max: { readOnly: true, - serializedName: "properties.timeGenerated", + serializedName: "max", + constraints: { + InclusiveMaximum: 10, + InclusiveMinimum: 0 + }, type: { - name: "DateTime" + name: "Number" } }, - resourceDetails: { - serializedName: "properties.resourceDetails", + current: { + readOnly: true, + serializedName: "current", + constraints: { + InclusiveMaximum: 10, + InclusiveMinimum: 0 + }, type: { - name: "Composite", - className: "ResourceDetails" + name: "Number" } }, - additionalData: { - serializedName: "properties.additionalData", + percentage: { + readOnly: true, + serializedName: "percentage", + constraints: { + InclusiveMaximum: 1, + InclusiveMinimum: 0 + }, type: { - name: "Composite", - className: "AdditionalData" + name: "Number" } } } } }; -export const SqlServerVulnerabilityProperties: msRest.CompositeMapper = { - serializedName: "SqlServerVulnerability", +export const SecureScoreControlDefinitionSource: msRest.CompositeMapper = { + serializedName: "SecureScoreControlDefinitionSource", type: { name: "Composite", - polymorphicDiscriminator: AdditionalData.type.polymorphicDiscriminator, - uberParent: "AdditionalData", - className: "SqlServerVulnerabilityProperties", + className: "SecureScoreControlDefinitionSource", modelProperties: { - ...AdditionalData.type.modelProperties, - type: { - readOnly: true, - serializedName: "type", - type: { - name: "String" - } - }, - query: { - readOnly: true, - serializedName: "query", + sourceType: { + serializedName: "sourceType", type: { name: "String" } @@ -2670,271 +5367,228 @@ export const SqlServerVulnerabilityProperties: msRest.CompositeMapper = { } }; -export const CVSS: msRest.CompositeMapper = { - serializedName: "CVSS", +export const AzureResourceLink: msRest.CompositeMapper = { + serializedName: "AzureResourceLink", type: { name: "Composite", - className: "CVSS", + className: "AzureResourceLink", modelProperties: { - base: { + id: { readOnly: true, - serializedName: "base", + serializedName: "id", type: { - name: "Number" + name: "String" } } } } }; -export const CVE: msRest.CompositeMapper = { - serializedName: "CVE", +export const SecureScoreControlDefinitionItem: msRest.CompositeMapper = { + serializedName: "SecureScoreControlDefinitionItem", type: { name: "Composite", - className: "CVE", + className: "SecureScoreControlDefinitionItem", modelProperties: { - title: { + ...Resource.type.modelProperties, + displayName: { readOnly: true, - serializedName: "title", + serializedName: "properties.displayName", type: { name: "String" } }, - link: { + description: { readOnly: true, - serializedName: "link", + serializedName: "properties.description", + constraints: { + MaxLength: 256 + }, type: { name: "String" } - } - } - } -}; - -export const VendorReference: msRest.CompositeMapper = { - serializedName: "VendorReference", - type: { - name: "Composite", - className: "VendorReference", - modelProperties: { - title: { + }, + maxScore: { readOnly: true, - serializedName: "title", + serializedName: "properties.maxScore", + constraints: { + InclusiveMaximum: 10, + InclusiveMinimum: 0 + }, type: { - name: "String" + name: "Number" } }, - link: { + source: { readOnly: true, - serializedName: "link", + serializedName: "properties.source", type: { - name: "String" + name: "Composite", + className: "SecureScoreControlDefinitionSource" + } + }, + assessmentDefinitions: { + readOnly: true, + serializedName: "properties.assessmentDefinitions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AzureResourceLink" + } + } } } } } }; -export const ContainerRegistryVulnerabilityProperties: msRest.CompositeMapper = { - serializedName: "ContainerRegistryVulnerability", +export const SecureScoreControlDetails: msRest.CompositeMapper = { + serializedName: "SecureScoreControlDetails", type: { name: "Composite", - polymorphicDiscriminator: AdditionalData.type.polymorphicDiscriminator, - uberParent: "AdditionalData", - className: "ContainerRegistryVulnerabilityProperties", + className: "SecureScoreControlDetails", modelProperties: { - ...AdditionalData.type.modelProperties, - type: { + ...Resource.type.modelProperties, + displayName: { readOnly: true, - serializedName: "type", + serializedName: "properties.displayName", type: { name: "String" } }, - cvss: { + max: { readOnly: true, - serializedName: "cvss", + serializedName: "properties.score.max", + constraints: { + InclusiveMinimum: 0 + }, type: { - name: "Dictionary", - value: { - type: { - name: "Composite", - className: "CVSS" - } - } + name: "Number" } }, - patchable: { + current: { readOnly: true, - serializedName: "patchable", + serializedName: "properties.score.current", + constraints: { + InclusiveMinimum: 0 + }, type: { - name: "Boolean" + name: "Number" } }, - cve: { + percentage: { readOnly: true, - serializedName: "cve", + serializedName: "properties.score.percentage", + constraints: { + InclusiveMaximum: 1, + InclusiveMinimum: 0 + }, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "CVE" - } - } + name: "Number" } }, - publishedTime: { + healthyResourceCount: { readOnly: true, - serializedName: "publishedTime", + serializedName: "properties.healthyResourceCount", type: { - name: "DateTime" + name: "Number" } }, - vendorReferences: { + unhealthyResourceCount: { readOnly: true, - serializedName: "vendorReferences", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VendorReference" - } - } + serializedName: "properties.unhealthyResourceCount", + type: { + name: "Number" } }, - repositoryName: { + notApplicableResourceCount: { readOnly: true, - serializedName: "repositoryName", + serializedName: "properties.notApplicableResourceCount", type: { - name: "String" + name: "Number" } }, - imageDigest: { + weight: { readOnly: true, - serializedName: "imageDigest", + serializedName: "properties.weight", + constraints: { + InclusiveMinimum: 0 + }, type: { - name: "String" + name: "Number" + } + }, + definition: { + serializedName: "properties.definition", + type: { + name: "Composite", + className: "SecureScoreControlDefinitionItem" } } } } }; -export const ServerVulnerabilityProperties: msRest.CompositeMapper = { - serializedName: "ServerVulnerabilityAssessment", +export const SecuritySolution: msRest.CompositeMapper = { + serializedName: "SecuritySolution", type: { name: "Composite", - polymorphicDiscriminator: AdditionalData.type.polymorphicDiscriminator, - uberParent: "AdditionalData", - className: "ServerVulnerabilityProperties", + className: "SecuritySolution", modelProperties: { - ...AdditionalData.type.modelProperties, - type: { + id: { readOnly: true, - serializedName: "type", + serializedName: "id", type: { name: "String" } }, - cvss: { - readOnly: true, - serializedName: "cvss", - type: { - name: "Dictionary", - value: { - type: { - name: "Composite", - className: "CVSS" - } - } - } - }, - patchable: { - readOnly: true, - serializedName: "patchable", - type: { - name: "Boolean" - } - }, - cve: { + name: { readOnly: true, - serializedName: "cve", + serializedName: "name", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "CVE" - } - } + name: "String" } }, - threat: { + type: { readOnly: true, - serializedName: "threat", + serializedName: "type", type: { name: "String" } }, - publishedTime: { + location: { readOnly: true, - serializedName: "publishedTime", + serializedName: "location", type: { - name: "DateTime" + name: "String" } }, - vendorReferences: { - readOnly: true, - serializedName: "vendorReferences", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VendorReference" - } - } - } - } - } - } -}; - -export const OnPremiseResourceDetails: msRest.CompositeMapper = { - serializedName: "OnPremise", - type: { - name: "Composite", - polymorphicDiscriminator: ResourceDetails.type.polymorphicDiscriminator, - uberParent: "ResourceDetails", - className: "OnPremiseResourceDetails", - modelProperties: { - ...ResourceDetails.type.modelProperties, - workspaceId: { + securityFamily: { required: true, - serializedName: "workspaceId", + serializedName: "properties.securityFamily", type: { name: "String" } }, - vmuuid: { + provisioningState: { required: true, - serializedName: "vmuuid", + serializedName: "properties.provisioningState", type: { name: "String" } }, - sourceComputerId: { + template: { required: true, - serializedName: "sourceComputerId", + serializedName: "properties.template", type: { name: "String" } }, - machineName: { + protectionStatus: { required: true, - serializedName: "machineName", + serializedName: "properties.protectionStatus", type: { name: "String" } @@ -2943,18 +5597,20 @@ export const OnPremiseResourceDetails: msRest.CompositeMapper = { } }; -export const AzureResourceDetails: msRest.CompositeMapper = { - serializedName: "Azure", +export const ProxyServerProperties: msRest.CompositeMapper = { + serializedName: "ProxyServerProperties", type: { name: "Composite", - polymorphicDiscriminator: ResourceDetails.type.polymorphicDiscriminator, - uberParent: "ResourceDetails", - className: "AzureResourceDetails", + className: "ProxyServerProperties", modelProperties: { - ...ResourceDetails.type.modelProperties, - id: { - readOnly: true, - serializedName: "id", + ip: { + serializedName: "ip", + type: { + name: "String" + } + }, + port: { + serializedName: "port", type: { name: "String" } @@ -2963,20 +5619,20 @@ export const AzureResourceDetails: msRest.CompositeMapper = { } }; -export const AutomationScope: msRest.CompositeMapper = { - serializedName: "AutomationScope", +export const ServicePrincipalProperties: msRest.CompositeMapper = { + serializedName: "ServicePrincipalProperties", type: { name: "Composite", - className: "AutomationScope", + className: "ServicePrincipalProperties", modelProperties: { - description: { - serializedName: "description", + applicationId: { + serializedName: "applicationId", type: { name: "String" } }, - scopePath: { - serializedName: "scopePath", + secret: { + serializedName: "secret", type: { name: "String" } @@ -2985,220 +5641,148 @@ export const AutomationScope: msRest.CompositeMapper = { } }; -export const AutomationTriggeringRule: msRest.CompositeMapper = { - serializedName: "AutomationTriggeringRule", +export const HybridComputeSettingsProperties: msRest.CompositeMapper = { + serializedName: "HybridComputeSettingsProperties", type: { name: "Composite", - className: "AutomationTriggeringRule", + className: "HybridComputeSettingsProperties", modelProperties: { - propertyJPath: { - serializedName: "propertyJPath", + hybridComputeProvisioningState: { + readOnly: true, + serializedName: "hybridComputeProvisioningState", type: { name: "String" } }, - propertyType: { - serializedName: "propertyType", + autoProvision: { + required: true, + serializedName: "autoProvision", type: { name: "String" } }, - expectedValue: { - serializedName: "expectedValue", + resourceGroupName: { + serializedName: "resourceGroupName", type: { name: "String" } }, - operator: { - serializedName: "operator", + region: { + serializedName: "region", type: { name: "String" } - } - } - } -}; - -export const AutomationRuleSet: msRest.CompositeMapper = { - serializedName: "AutomationRuleSet", - type: { - name: "Composite", - className: "AutomationRuleSet", - modelProperties: { - rules: { - serializedName: "rules", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AutomationTriggeringRule" - } - } - } - } - } - } -}; - -export const AutomationSource: msRest.CompositeMapper = { - serializedName: "AutomationSource", - type: { - name: "Composite", - className: "AutomationSource", - modelProperties: { - eventSource: { - serializedName: "eventSource", + }, + proxyServer: { + serializedName: "proxyServer", type: { - name: "String" + name: "Composite", + className: "ProxyServerProperties" } }, - ruleSets: { - serializedName: "ruleSets", + servicePrincipal: { + serializedName: "servicePrincipal", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AutomationRuleSet" - } - } + name: "Composite", + className: "ServicePrincipalProperties" } } } } }; -export const AutomationAction: msRest.CompositeMapper = { - serializedName: "AutomationAction", +export const AuthenticationDetailsProperties: msRest.CompositeMapper = { + serializedName: "AuthenticationDetailsProperties", type: { name: "Composite", polymorphicDiscriminator: { - serializedName: "actionType", - clientName: "actionType" + serializedName: "authenticationType", + clientName: "authenticationType" }, - uberParent: "AutomationAction", - className: "AutomationAction", - modelProperties: { - actionType: { - required: true, - serializedName: "actionType", - type: { - name: "String" - } - } - } - } -}; - -export const Automation: msRest.CompositeMapper = { - serializedName: "Automation", - type: { - name: "Composite", - className: "Automation", + uberParent: "AuthenticationDetailsProperties", + className: "AuthenticationDetailsProperties", modelProperties: { - ...TrackedResource.type.modelProperties, - description: { - serializedName: "properties.description", - type: { - name: "String" - } - }, - isEnabled: { - serializedName: "properties.isEnabled", - type: { - name: "Boolean" - } - }, - scopes: { - serializedName: "properties.scopes", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AutomationScope" - } - } - } - }, - sources: { - serializedName: "properties.sources", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AutomationSource" - } - } + authenticationProvisioningState: { + readOnly: true, + serializedName: "authenticationProvisioningState", + type: { + name: "String" } }, - actions: { - serializedName: "properties.actions", + grantedPermissions: { + readOnly: true, + serializedName: "grantedPermissions", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "AutomationAction" + name: "String" } } } + }, + authenticationType: { + required: true, + serializedName: "authenticationType", + type: { + name: "String" + } } } } }; -export const AutomationActionLogicApp: msRest.CompositeMapper = { - serializedName: "LogicApp", +export const ConnectorSetting: msRest.CompositeMapper = { + serializedName: "ConnectorSetting", type: { name: "Composite", - polymorphicDiscriminator: AutomationAction.type.polymorphicDiscriminator, - uberParent: "AutomationAction", - className: "AutomationActionLogicApp", + className: "ConnectorSetting", modelProperties: { - ...AutomationAction.type.modelProperties, - logicAppResourceId: { - serializedName: "logicAppResourceId", + ...Resource.type.modelProperties, + hybridComputeSettings: { + serializedName: "properties.hybridComputeSettings", type: { - name: "String" + name: "Composite", + className: "HybridComputeSettingsProperties" } }, - uri: { - serializedName: "uri", + authenticationDetails: { + serializedName: "properties.authenticationDetails", type: { - name: "String" + name: "Composite", + className: "AuthenticationDetailsProperties" } } } } }; -export const AutomationActionEventHub: msRest.CompositeMapper = { - serializedName: "EventHub", +export const AwsCredsAuthenticationDetailsProperties: msRest.CompositeMapper = { + serializedName: "awsCreds", type: { name: "Composite", - polymorphicDiscriminator: AutomationAction.type.polymorphicDiscriminator, - uberParent: "AutomationAction", - className: "AutomationActionEventHub", + polymorphicDiscriminator: AuthenticationDetailsProperties.type.polymorphicDiscriminator, + uberParent: "AuthenticationDetailsProperties", + className: "AwsCredsAuthenticationDetailsProperties", modelProperties: { - ...AutomationAction.type.modelProperties, - eventHubResourceId: { - serializedName: "eventHubResourceId", + ...AuthenticationDetailsProperties.type.modelProperties, + accountId: { + readOnly: true, + serializedName: "accountId", type: { name: "String" } }, - sasPolicyName: { - readOnly: true, - serializedName: "sasPolicyName", + awsAccessKeyId: { + required: true, + serializedName: "awsAccessKeyId", type: { name: "String" } }, - connectionString: { - serializedName: "connectionString", + awsSecretAccessKey: { + required: true, + serializedName: "awsSecretAccessKey", type: { name: "String" } @@ -3207,17 +5791,32 @@ export const AutomationActionEventHub: msRest.CompositeMapper = { } }; -export const AutomationActionWorkspace: msRest.CompositeMapper = { - serializedName: "Workspace", +export const AwAssumeRoleAuthenticationDetailsProperties: msRest.CompositeMapper = { + serializedName: "awsAssumeRole", type: { name: "Composite", - polymorphicDiscriminator: AutomationAction.type.polymorphicDiscriminator, - uberParent: "AutomationAction", - className: "AutomationActionWorkspace", + polymorphicDiscriminator: AuthenticationDetailsProperties.type.polymorphicDiscriminator, + uberParent: "AuthenticationDetailsProperties", + className: "AwAssumeRoleAuthenticationDetailsProperties", modelProperties: { - ...AutomationAction.type.modelProperties, - workspaceResourceId: { - serializedName: "workspaceResourceId", + ...AuthenticationDetailsProperties.type.modelProperties, + accountId: { + readOnly: true, + serializedName: "accountId", + type: { + name: "String" + } + }, + awsAssumeRoleArn: { + required: true, + serializedName: "awsAssumeRoleArn", + type: { + name: "String" + } + }, + awsExternalId: { + required: true, + serializedName: "awsExternalId", type: { name: "String" } @@ -3226,20 +5825,88 @@ export const AutomationActionWorkspace: msRest.CompositeMapper = { } }; -export const AutomationValidationStatus: msRest.CompositeMapper = { - serializedName: "AutomationValidationStatus", +export const GcpCredentialsDetailsProperties: msRest.CompositeMapper = { + serializedName: "gcpCredentials", type: { name: "Composite", - className: "AutomationValidationStatus", + polymorphicDiscriminator: AuthenticationDetailsProperties.type.polymorphicDiscriminator, + uberParent: "AuthenticationDetailsProperties", + className: "GcpCredentialsDetailsProperties", modelProperties: { - isValid: { - serializedName: "isValid", + ...AuthenticationDetailsProperties.type.modelProperties, + organizationId: { + required: true, + serializedName: "organizationId", type: { - name: "Boolean" + name: "String" } }, - message: { - serializedName: "message", + type: { + required: true, + serializedName: "type", + type: { + name: "String" + } + }, + projectId: { + required: true, + serializedName: "projectId", + type: { + name: "String" + } + }, + privateKeyId: { + required: true, + serializedName: "privateKeyId", + type: { + name: "String" + } + }, + privateKey: { + required: true, + serializedName: "privateKey", + type: { + name: "String" + } + }, + clientEmail: { + required: true, + serializedName: "clientEmail", + type: { + name: "String" + } + }, + clientId: { + required: true, + serializedName: "clientId", + type: { + name: "String" + } + }, + authUri: { + required: true, + serializedName: "authUri", + type: { + name: "String" + } + }, + tokenUri: { + required: true, + serializedName: "tokenUri", + type: { + name: "String" + } + }, + authProviderX509CertUrl: { + required: true, + serializedName: "authProviderX509CertUrl", + type: { + name: "String" + } + }, + clientX509CertUrl: { + required: true, + serializedName: "clientX509CertUrl", type: { name: "String" } @@ -3248,47 +5915,132 @@ export const AutomationValidationStatus: msRest.CompositeMapper = { } }; -export const ScopeElement: msRest.CompositeMapper = { - serializedName: "ScopeElement", +export const ScanProperties: msRest.CompositeMapper = { + serializedName: "ScanProperties", type: { name: "Composite", - className: "ScopeElement", + className: "ScanProperties", modelProperties: { - field: { - serializedName: "field", + triggerType: { + serializedName: "triggerType", + type: { + name: "String" + } + }, + state: { + serializedName: "state", + type: { + name: "String" + } + }, + server: { + serializedName: "server", + type: { + name: "String" + } + }, + database: { + serializedName: "database", + type: { + name: "String" + } + }, + sqlVersion: { + serializedName: "sqlVersion", type: { name: "String" } + }, + startTime: { + serializedName: "startTime", + type: { + name: "DateTime" + } + }, + endTime: { + serializedName: "endTime", + type: { + name: "DateTime" + } + }, + highSeverityFailedRulesCount: { + serializedName: "highSeverityFailedRulesCount", + type: { + name: "Number" + } + }, + mediumSeverityFailedRulesCount: { + serializedName: "mediumSeverityFailedRulesCount", + type: { + name: "Number" + } + }, + lowSeverityFailedRulesCount: { + serializedName: "lowSeverityFailedRulesCount", + type: { + name: "Number" + } + }, + totalPassedRulesCount: { + serializedName: "totalPassedRulesCount", + type: { + name: "Number" + } + }, + totalFailedRulesCount: { + serializedName: "totalFailedRulesCount", + type: { + name: "Number" + } + }, + totalRulesCount: { + serializedName: "totalRulesCount", + type: { + name: "Number" + } + }, + isBaselineApplied: { + serializedName: "isBaselineApplied", + type: { + name: "Boolean" + } } - }, - additionalProperties: { - type: { - name: "Object" + } + } +}; + +export const Scan: msRest.CompositeMapper = { + serializedName: "Scan", + type: { + name: "Composite", + className: "Scan", + modelProperties: { + ...Resource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "ScanProperties" + } } } } }; -export const SuppressionAlertsScope: msRest.CompositeMapper = { - serializedName: "SuppressionAlertsScope", +export const Scans: msRest.CompositeMapper = { + serializedName: "Scans", type: { name: "Composite", - className: "SuppressionAlertsScope", + className: "Scans", modelProperties: { - allOf: { - required: true, - serializedName: "allOf", + value: { + serializedName: "value", type: { name: "Sequence", element: { type: { name: "Composite", - className: "ScopeElement", - additionalProperties: { - type: { - name: "Object" - } - } + className: "Scan" } } } @@ -3297,163 +6049,162 @@ export const SuppressionAlertsScope: msRest.CompositeMapper = { } }; -export const AlertsSuppressionRule: msRest.CompositeMapper = { - serializedName: "AlertsSuppressionRule", +export const Remediation: msRest.CompositeMapper = { + serializedName: "Remediation", type: { name: "Composite", - className: "AlertsSuppressionRule", + className: "Remediation", modelProperties: { - ...Resource.type.modelProperties, - alertType: { - required: true, - serializedName: "properties.alertType", - type: { - name: "String" - } - }, - lastModifiedUtc: { - readOnly: true, - serializedName: "properties.lastModifiedUtc", - type: { - name: "DateTime" - } - }, - expirationDateUtc: { - serializedName: "properties.expirationDateUtc", - type: { - name: "DateTime" - } - }, - reason: { - required: true, - serializedName: "properties.reason", + description: { + serializedName: "description", type: { name: "String" } }, - state: { - required: true, - serializedName: "properties.state", + scripts: { + serializedName: "scripts", type: { - name: "Enum", - allowedValues: [ - "Enabled", - "Disabled", - "Expired" - ] + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - comment: { - serializedName: "properties.comment", + automated: { + serializedName: "automated", type: { - name: "String" + name: "Boolean" } }, - suppressionAlertsScope: { - serializedName: "properties.suppressionAlertsScope", + portalLink: { + serializedName: "portalLink", type: { - name: "Composite", - className: "SuppressionAlertsScope" + name: "String" } } } } }; -export const SecurityAssessmentMetadataPartnerData: msRest.CompositeMapper = { - serializedName: "SecurityAssessmentMetadataPartnerData", +export const Baseline: msRest.CompositeMapper = { + serializedName: "Baseline", type: { name: "Composite", - className: "SecurityAssessmentMetadataPartnerData", + className: "Baseline", modelProperties: { - partnerName: { - required: true, - serializedName: "partnerName", - type: { - name: "String" - } - }, - productName: { - serializedName: "productName", + expectedResults: { + serializedName: "expectedResults", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } } }, - secret: { - required: true, - serializedName: "secret", + updatedTime: { + serializedName: "updatedTime", type: { - name: "String" + name: "DateTime" } } } } }; -export const SecurityAssessmentMetadataProperties: msRest.CompositeMapper = { - serializedName: "SecurityAssessmentMetadataProperties", +export const BaselineAdjustedResult: msRest.CompositeMapper = { + serializedName: "BaselineAdjustedResult", type: { name: "Composite", - className: "SecurityAssessmentMetadataProperties", + className: "BaselineAdjustedResult", modelProperties: { - displayName: { - required: true, - serializedName: "displayName", - type: { - name: "String" - } - }, - policyDefinitionId: { - readOnly: true, - serializedName: "policyDefinitionId", - type: { - name: "String" - } - }, - description: { - serializedName: "description", + baseline: { + serializedName: "baseline", type: { - name: "String" + name: "Composite", + className: "Baseline" } }, - remediationDescription: { - serializedName: "remediationDescription", + status: { + serializedName: "status", type: { name: "String" } }, - category: { - serializedName: "category", + resultsNotInBaseline: { + serializedName: "resultsNotInBaseline", type: { name: "Sequence", element: { type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } } } }, - severity: { - required: true, - serializedName: "severity", + resultsOnlyInBaseline: { + serializedName: "resultsOnlyInBaseline", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } } - }, - userImpact: { - serializedName: "userImpact", + } + } + } +}; + +export const QueryCheck: msRest.CompositeMapper = { + serializedName: "QueryCheck", + type: { + name: "Composite", + className: "QueryCheck", + modelProperties: { + query: { + serializedName: "query", type: { name: "String" } }, - implementationEffort: { - serializedName: "implementationEffort", + expectedResult: { + serializedName: "expectedResult", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } } }, - threats: { - serializedName: "threats", + columnNames: { + serializedName: "columnNames", type: { name: "Sequence", element: { @@ -3462,347 +6213,436 @@ export const SecurityAssessmentMetadataProperties: msRest.CompositeMapper = { } } } - }, - preview: { - serializedName: "preview", - type: { - name: "Boolean" - } - }, - assessmentType: { - required: true, - serializedName: "assessmentType", + } + } + } +}; + +export const BenchmarkReference: msRest.CompositeMapper = { + serializedName: "BenchmarkReference", + type: { + name: "Composite", + className: "BenchmarkReference", + modelProperties: { + benchmark: { + serializedName: "benchmark", type: { name: "String" } }, - partnerData: { - serializedName: "partnerData", + reference: { + serializedName: "reference", type: { - name: "Composite", - className: "SecurityAssessmentMetadataPartnerData" + name: "String" } } } } }; -export const SecurityAssessmentMetadata: msRest.CompositeMapper = { - serializedName: "SecurityAssessmentMetadata", +export const VaRule: msRest.CompositeMapper = { + serializedName: "VaRule", type: { name: "Composite", - className: "SecurityAssessmentMetadata", + className: "VaRule", modelProperties: { - ...Resource.type.modelProperties, - displayName: { - required: true, - serializedName: "properties.displayName", + ruleId: { + serializedName: "ruleId", type: { name: "String" } }, - policyDefinitionId: { - readOnly: true, - serializedName: "properties.policyDefinitionId", + severity: { + serializedName: "severity", + type: { + name: "String" + } + }, + category: { + serializedName: "category", + type: { + name: "String" + } + }, + ruleType: { + serializedName: "ruleType", + type: { + name: "String" + } + }, + title: { + serializedName: "title", type: { name: "String" } }, description: { - serializedName: "properties.description", + serializedName: "description", type: { name: "String" } }, - remediationDescription: { - serializedName: "properties.remediationDescription", + rationale: { + serializedName: "rationale", type: { name: "String" } }, - category: { - serializedName: "properties.category", + queryCheck: { + serializedName: "queryCheck", + type: { + name: "Composite", + className: "QueryCheck" + } + }, + benchmarkReferences: { + serializedName: "benchmarkReferences", type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "BenchmarkReference" } } } - }, - severity: { - required: true, - serializedName: "properties.severity", + } + } + } +}; + +export const ScanResultProperties: msRest.CompositeMapper = { + serializedName: "ScanResultProperties", + type: { + name: "Composite", + className: "ScanResultProperties", + modelProperties: { + ruleId: { + serializedName: "ruleId", type: { name: "String" } }, - userImpact: { - serializedName: "properties.userImpact", + status: { + serializedName: "status", type: { name: "String" } }, - implementationEffort: { - serializedName: "properties.implementationEffort", + isTrimmed: { + serializedName: "isTrimmed", type: { - name: "String" + name: "Boolean" } }, - threats: { - serializedName: "properties.threats", + queryResults: { + serializedName: "queryResults", type: { name: "Sequence", element: { type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } } } }, - preview: { - serializedName: "properties.preview", + remediation: { + serializedName: "remediation", type: { - name: "Boolean" + name: "Composite", + className: "Remediation" } }, - assessmentType: { - required: true, - serializedName: "properties.assessmentType", + baselineAdjustedResult: { + serializedName: "baselineAdjustedResult", type: { - name: "String" + name: "Composite", + className: "BaselineAdjustedResult" } }, - partnerData: { - serializedName: "properties.partnerData", + ruleMetadata: { + serializedName: "ruleMetadata", type: { name: "Composite", - className: "SecurityAssessmentMetadataPartnerData" + className: "VaRule" } } } } }; -export const AssessmentStatus: msRest.CompositeMapper = { - serializedName: "AssessmentStatus", +export const ScanResult: msRest.CompositeMapper = { + serializedName: "ScanResult", type: { name: "Composite", - className: "AssessmentStatus", + className: "ScanResult", modelProperties: { - code: { - required: true, - serializedName: "code", + ...Resource.type.modelProperties, + properties: { + serializedName: "properties", type: { - name: "String" + name: "Composite", + className: "ScanResultProperties" } - }, - cause: { - serializedName: "cause", + } + } + } +}; + +export const ScanResults: msRest.CompositeMapper = { + serializedName: "ScanResults", + type: { + name: "Composite", + className: "ScanResults", + modelProperties: { + value: { + serializedName: "value", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ScanResult" + } + } + } + } + } + } +}; + +export const RuleResultsInput: msRest.CompositeMapper = { + serializedName: "RuleResultsInput", + type: { + name: "Composite", + className: "RuleResultsInput", + modelProperties: { + latestScan: { + serializedName: "latestScan", + type: { + name: "Boolean" } }, - description: { - serializedName: "description", + results: { + serializedName: "results", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } } } } } }; -export const AssessmentLinks: msRest.CompositeMapper = { - serializedName: "AssessmentLinks", +export const RuleResultsProperties: msRest.CompositeMapper = { + serializedName: "RuleResultsProperties", type: { name: "Composite", - className: "AssessmentLinks", + className: "RuleResultsProperties", modelProperties: { - azurePortalUri: { - readOnly: true, - serializedName: "azurePortalUri", + results: { + serializedName: "results", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } } } } } }; -export const SecurityAssessmentPartnerData: msRest.CompositeMapper = { - serializedName: "SecurityAssessmentPartnerData", +export const RuleResults: msRest.CompositeMapper = { + serializedName: "RuleResults", type: { name: "Composite", - className: "SecurityAssessmentPartnerData", + className: "RuleResults", modelProperties: { - partnerName: { - required: true, - serializedName: "partnerName", - type: { - name: "String" - } - }, - secret: { - required: true, - serializedName: "secret", + ...Resource.type.modelProperties, + properties: { + serializedName: "properties", type: { - name: "String" + name: "Composite", + className: "RuleResultsProperties" } } } } }; -export const SecurityAssessment: msRest.CompositeMapper = { - serializedName: "SecurityAssessment", +export const RulesResults: msRest.CompositeMapper = { + serializedName: "RulesResults", type: { name: "Composite", - className: "SecurityAssessment", + className: "RulesResults", modelProperties: { - ...Resource.type.modelProperties, - resourceDetails: { - required: true, - serializedName: "properties.resourceDetails", - type: { - name: "Composite", - className: "ResourceDetails" - } - }, - displayName: { - readOnly: true, - serializedName: "properties.displayName", + value: { + serializedName: "value", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RuleResults" + } + } } - }, - status: { - required: true, - serializedName: "properties.status", + } + } + } +}; + +export const RulesResultsInput: msRest.CompositeMapper = { + serializedName: "RulesResultsInput", + type: { + name: "Composite", + className: "RulesResultsInput", + modelProperties: { + latestScan: { + serializedName: "latestScan", type: { - name: "Composite", - className: "AssessmentStatus" + name: "Boolean" } }, - additionalData: { - serializedName: "properties.additionalData", + results: { + serializedName: "results", type: { name: "Dictionary", value: { type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } } } } - }, - links: { - serializedName: "properties.links", - type: { - name: "Composite", - className: "AssessmentLinks" - } - }, - metadata: { - serializedName: "properties.metadata", - type: { - name: "Composite", - className: "SecurityAssessmentMetadataProperties" - } - }, - partnersData: { - serializedName: "properties.partnersData", - type: { - name: "Composite", - className: "SecurityAssessmentPartnerData" - } } } } }; -export const ProtectionMode: msRest.CompositeMapper = { - serializedName: "ProtectionMode", +export const IotDefenderSettingsModel: msRest.CompositeMapper = { + serializedName: "IotDefenderSettingsModel", type: { name: "Composite", - className: "ProtectionMode", + className: "IotDefenderSettingsModel", modelProperties: { - exe: { - serializedName: "exe", + ...Resource.type.modelProperties, + deviceQuota: { + required: true, + serializedName: "properties.deviceQuota", + constraints: { + InclusiveMinimum: 1000 + }, type: { - name: "String" + name: "Number" } }, - msi: { - serializedName: "msi", + sentinelWorkspaceResourceIds: { + required: true, + serializedName: "properties.sentinelWorkspaceResourceIds", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - script: { - serializedName: "script", + onboardingKind: { + required: true, + serializedName: "properties.onboardingKind", type: { name: "String" } }, - executable: { - serializedName: "executable", + evaluationEndTime: { + readOnly: true, + serializedName: "properties.evaluationEndTime", type: { - name: "String" + name: "DateTime" } } } } }; -export const AppWhitelistingIssueSummary: msRest.CompositeMapper = { - serializedName: "AppWhitelistingIssueSummary", +export const IotDefenderSettingsList: msRest.CompositeMapper = { + serializedName: "IotDefenderSettingsList", type: { name: "Composite", - className: "AppWhitelistingIssueSummary", + className: "IotDefenderSettingsList", modelProperties: { - issue: { - serializedName: "issue", - type: { - name: "String" - } - }, - numberOfVms: { - serializedName: "numberOfVms", + value: { + readOnly: true, + serializedName: "value", type: { - name: "Number" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IotDefenderSettingsModel" + } + } } } } } }; -export const VmRecommendation: msRest.CompositeMapper = { - serializedName: "VmRecommendation", +export const PackageDownloadInfo: msRest.CompositeMapper = { + serializedName: "PackageDownloadInfo", type: { name: "Composite", - className: "VmRecommendation", + className: "PackageDownloadInfo", modelProperties: { - configurationStatus: { - serializedName: "configurationStatus", - type: { - name: "String" - } - }, - recommendationAction: { - serializedName: "recommendationAction", + version: { + readOnly: true, + serializedName: "version", type: { name: "String" } }, - resourceId: { - serializedName: "resourceId", + link: { + serializedName: "link", type: { name: "String" } }, - enforcementSupport: { - serializedName: "enforcementSupport", + versionKind: { + readOnly: true, + serializedName: "versionKind", type: { name: "String" } @@ -3811,32 +6651,16 @@ export const VmRecommendation: msRest.CompositeMapper = { } }; -export const PublisherInfo: msRest.CompositeMapper = { - serializedName: "PublisherInfo", +export const UpgradePackageDownloadInfo: msRest.CompositeMapper = { + serializedName: "UpgradePackageDownloadInfo", type: { name: "Composite", - className: "PublisherInfo", + className: "UpgradePackageDownloadInfo", modelProperties: { - publisherName: { - serializedName: "publisherName", - type: { - name: "String" - } - }, - productName: { - serializedName: "productName", - type: { - name: "String" - } - }, - binaryName: { - serializedName: "binaryName", - type: { - name: "String" - } - }, - version: { - serializedName: "version", + ...PackageDownloadInfo.type.modelProperties, + fromVersion: { + readOnly: true, + serializedName: "fromVersion", type: { name: "String" } @@ -3845,227 +6669,322 @@ export const PublisherInfo: msRest.CompositeMapper = { } }; -export const UserRecommendation: msRest.CompositeMapper = { - serializedName: "UserRecommendation", +export const PackageDownloadsSensorFullOvf: msRest.CompositeMapper = { + serializedName: "PackageDownloads_sensor_full_ovf", type: { name: "Composite", - className: "UserRecommendation", + className: "PackageDownloadsSensorFullOvf", modelProperties: { - username: { - serializedName: "username", + enterprise: { + readOnly: true, + serializedName: "enterprise", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PackageDownloadInfo" + } + } } }, - recommendationAction: { - serializedName: "recommendationAction", + medium: { + readOnly: true, + serializedName: "medium", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PackageDownloadInfo" + } + } + } + }, + line: { + readOnly: true, + serializedName: "line", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PackageDownloadInfo" + } + } } } } } }; -export const PathRecommendation: msRest.CompositeMapper = { - serializedName: "PathRecommendation", +export const PackageDownloadsSensorFull: msRest.CompositeMapper = { + serializedName: "PackageDownloads_sensor_full", type: { name: "Composite", - className: "PathRecommendation", + className: "PackageDownloadsSensorFull", modelProperties: { - path: { - serializedName: "path", - type: { - name: "String" - } - }, - action: { - serializedName: "action", + iso: { + readOnly: true, + serializedName: "iso", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PackageDownloadInfo" + } + } } }, - type: { - serializedName: "type", + ovf: { + serializedName: "ovf", type: { - name: "String" + name: "Composite", + className: "PackageDownloadsSensorFullOvf" } - }, - publisherInfo: { - serializedName: "publisherInfo", + } + } + } +}; + +export const PackageDownloadsSensor: msRest.CompositeMapper = { + serializedName: "PackageDownloads_sensor", + type: { + name: "Composite", + className: "PackageDownloadsSensor", + modelProperties: { + full: { + readOnly: true, + serializedName: "full", type: { name: "Composite", - className: "PublisherInfo" + className: "PackageDownloadsSensorFull" } }, - common: { - serializedName: "common", + upgrade: { + serializedName: "upgrade", type: { - name: "Boolean" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "UpgradePackageDownloadInfo" + } + } } - }, - userSids: { - serializedName: "userSids", + } + } + } +}; + +export const PackageDownloadsCentralManagerFullOvf: msRest.CompositeMapper = { + serializedName: "PackageDownloads_centralManager_full_ovf", + type: { + name: "Composite", + className: "PackageDownloadsCentralManagerFullOvf", + modelProperties: { + enterprise: { + readOnly: true, + serializedName: "enterprise", type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "PackageDownloadInfo" } } } }, - usernames: { - serializedName: "usernames", + enterpriseHighAvailability: { + readOnly: true, + serializedName: "enterpriseHighAvailability", type: { name: "Sequence", element: { type: { name: "Composite", - className: "UserRecommendation" + className: "PackageDownloadInfo" } } } }, - fileType: { - serializedName: "fileType", + medium: { + readOnly: true, + serializedName: "medium", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PackageDownloadInfo" + } + } } }, - configurationStatus: { - serializedName: "configurationStatus", + mediumHighAvailability: { + readOnly: true, + serializedName: "mediumHighAvailability", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PackageDownloadInfo" + } + } } } } } }; -export const AppWhitelistingGroup: msRest.CompositeMapper = { - serializedName: "AppWhitelistingGroup", +export const PackageDownloadsCentralManagerFull: msRest.CompositeMapper = { + serializedName: "PackageDownloads_centralManager_full", type: { name: "Composite", - className: "AppWhitelistingGroup", + className: "PackageDownloadsCentralManagerFull", modelProperties: { - id: { + iso: { readOnly: true, - serializedName: "id", + serializedName: "iso", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PackageDownloadInfo" + } + } } }, - name: { + ovf: { readOnly: true, - serializedName: "name", + serializedName: "ovf", type: { - name: "String" + name: "Composite", + className: "PackageDownloadsCentralManagerFullOvf" } - }, - type: { + } + } + } +}; + +export const PackageDownloadsCentralManager: msRest.CompositeMapper = { + serializedName: "PackageDownloads_centralManager", + type: { + name: "Composite", + className: "PackageDownloadsCentralManager", + modelProperties: { + full: { readOnly: true, - serializedName: "type", + serializedName: "full", type: { - name: "String" + name: "Composite", + className: "PackageDownloadsCentralManagerFull" } }, - location: { + upgrade: { readOnly: true, - serializedName: "location", - type: { - name: "String" - } - }, - enforcementMode: { - serializedName: "properties.enforcementMode", + serializedName: "upgrade", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "UpgradePackageDownloadInfo" + } + } } - }, - protectionMode: { - serializedName: "properties.protectionMode", + } + } + } +}; + +export const PackageDownloads: msRest.CompositeMapper = { + serializedName: "PackageDownloads", + type: { + name: "Composite", + className: "PackageDownloads", + modelProperties: { + sensor: { + readOnly: true, + serializedName: "sensor", type: { name: "Composite", - className: "ProtectionMode" + className: "PackageDownloadsSensor" } }, - configurationStatus: { + centralManager: { readOnly: true, - serializedName: "properties.configurationStatus", + serializedName: "centralManager", type: { - name: "String" + name: "Composite", + className: "PackageDownloadsCentralManager" } }, - recommendationStatus: { + threatIntelligence: { readOnly: true, - serializedName: "properties.recommendationStatus", + serializedName: "threatIntelligence", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PackageDownloadInfo" + } + } } }, - issues: { + snmp: { readOnly: true, - serializedName: "properties.issues", + serializedName: "snmp", type: { name: "Sequence", element: { type: { name: "Composite", - className: "AppWhitelistingIssueSummary" + className: "PackageDownloadInfo" } } } }, - sourceSystem: { + wmiTool: { readOnly: true, - serializedName: "properties.sourceSystem", - type: { - name: "String" - } - }, - vmRecommendations: { - serializedName: "properties.vmRecommendations", + serializedName: "wmiTool", type: { name: "Sequence", element: { type: { name: "Composite", - className: "VmRecommendation" + className: "PackageDownloadInfo" } } } }, - pathRecommendations: { - serializedName: "properties.pathRecommendations", + authorizedDevicesImportTemplate: { + readOnly: true, + serializedName: "authorizedDevicesImportTemplate", type: { name: "Sequence", element: { type: { name: "Composite", - className: "PathRecommendation" + className: "PackageDownloadInfo" } } } - } - } - } -}; - -export const AppWhitelistingGroups: msRest.CompositeMapper = { - serializedName: "AppWhitelistingGroups", - type: { - name: "Composite", - className: "AppWhitelistingGroups", - modelProperties: { - value: { - serializedName: "value", + }, + deviceInformationUpdateImportTemplate: { + readOnly: true, + serializedName: "deviceInformationUpdateImportTemplate", type: { name: "Sequence", element: { type: { name: "Composite", - className: "AppWhitelistingGroup" + className: "PackageDownloadInfo" } } } @@ -4074,116 +6993,106 @@ export const AppWhitelistingGroups: msRest.CompositeMapper = { } }; -export const Rule: msRest.CompositeMapper = { - serializedName: "Rule", +export const IotSensorsModel: msRest.CompositeMapper = { + serializedName: "IotSensorsModel", type: { name: "Composite", - className: "Rule", + className: "IotSensorsModel", modelProperties: { - name: { - serializedName: "name", + ...Resource.type.modelProperties, + connectivityTime: { + readOnly: true, + serializedName: "properties.connectivityTime", type: { name: "String" } }, - direction: { - serializedName: "direction", + creationTime: { + readOnly: true, + serializedName: "properties.creationTime", type: { name: "String" } }, - destinationPort: { - serializedName: "destinationPort", + dynamicLearning: { + readOnly: true, + serializedName: "properties.dynamicLearning", type: { - name: "Number" + name: "Boolean" } }, - protocols: { - serializedName: "protocols", + learningMode: { + readOnly: true, + serializedName: "properties.learningMode", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "Boolean" } }, - ipAddresses: { - serializedName: "ipAddresses", + sensorStatus: { + readOnly: true, + serializedName: "properties.sensorStatus", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "String" } - } - } - } -}; - -export const EffectiveNetworkSecurityGroups: msRest.CompositeMapper = { - serializedName: "EffectiveNetworkSecurityGroups", - type: { - name: "Composite", - className: "EffectiveNetworkSecurityGroups", - modelProperties: { - networkInterface: { - serializedName: "networkInterface", + }, + sensorVersion: { + readOnly: true, + serializedName: "properties.sensorVersion", type: { name: "String" } }, - networkSecurityGroups: { - serializedName: "networkSecurityGroups", + tiAutomaticUpdates: { + serializedName: "properties.tiAutomaticUpdates", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "Boolean" + } + }, + tiStatus: { + readOnly: true, + serializedName: "properties.tiStatus", + type: { + name: "String" + } + }, + tiVersion: { + readOnly: true, + serializedName: "properties.tiVersion", + type: { + name: "String" + } + }, + zone: { + serializedName: "properties.zone", + type: { + name: "String" + } + }, + sensorType: { + serializedName: "properties.sensorType", + type: { + name: "String" } } } } }; -export const AdaptiveNetworkHardening: msRest.CompositeMapper = { - serializedName: "AdaptiveNetworkHardening", +export const IotSensorsList: msRest.CompositeMapper = { + serializedName: "IotSensorsList", type: { name: "Composite", - className: "AdaptiveNetworkHardening", + className: "IotSensorsList", modelProperties: { - ...Resource.type.modelProperties, - rules: { - serializedName: "properties.rules", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Rule" - } - } - } - }, - rulesCalculationTime: { - serializedName: "properties.rulesCalculationTime", - type: { - name: "DateTime" - } - }, - effectiveNetworkSecurityGroups: { - serializedName: "properties.effectiveNetworkSecurityGroups", + value: { + readOnly: true, + serializedName: "value", type: { name: "Sequence", element: { type: { name: "Composite", - className: "EffectiveNetworkSecurityGroups" + className: "IotSensorsModel" } } } @@ -4192,107 +7101,133 @@ export const AdaptiveNetworkHardening: msRest.CompositeMapper = { } }; -export const AdaptiveNetworkHardeningEnforceRequest: msRest.CompositeMapper = { - serializedName: "AdaptiveNetworkHardeningEnforceRequest", +export const ResetPasswordInput: msRest.CompositeMapper = { + serializedName: "ResetPasswordInput", type: { name: "Composite", - className: "AdaptiveNetworkHardeningEnforceRequest", + className: "ResetPasswordInput", modelProperties: { - rules: { - required: true, - serializedName: "rules", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Rule" - } - } - } - }, - networkSecurityGroups: { - required: true, - serializedName: "networkSecurityGroups", + applianceId: { + serializedName: "applianceId", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "String" } } } } }; -export const ConnectedResource: msRest.CompositeMapper = { - serializedName: "ConnectedResource", +export const IpAddress: msRest.CompositeMapper = { + serializedName: "IpAddress", type: { name: "Composite", - className: "ConnectedResource", + className: "IpAddress", modelProperties: { - connectedResourceId: { + v4Address: { readOnly: true, - serializedName: "connectedResourceId", + serializedName: "v4Address", type: { name: "String" } }, - tcpPorts: { + detectionTime: { readOnly: true, - serializedName: "tcpPorts", + serializedName: "detectionTime", + type: { + name: "DateTime" + } + }, + subnetCidr: { + readOnly: true, + serializedName: "subnetCidr", type: { name: "String" } }, - udpPorts: { + fqdn: { readOnly: true, - serializedName: "udpPorts", + serializedName: "fqdn", type: { name: "String" } + }, + fqdnLastLookupTime: { + readOnly: true, + serializedName: "fqdnLastLookupTime", + type: { + name: "DateTime" + } } } } }; -export const ConnectableResource: msRest.CompositeMapper = { - serializedName: "ConnectableResource", +export const MacAddress: msRest.CompositeMapper = { + serializedName: "MacAddress", type: { name: "Composite", - className: "ConnectableResource", + className: "MacAddress", modelProperties: { - id: { + address: { readOnly: true, - serializedName: "id", + serializedName: "address", type: { name: "String" } }, - inboundConnectedResources: { + detectionTime: { readOnly: true, - serializedName: "inboundConnectedResources", + serializedName: "detectionTime", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ConnectedResource" - } - } + name: "DateTime" } }, - outboundConnectedResources: { + significance: { readOnly: true, - serializedName: "outboundConnectedResources", + serializedName: "significance", + type: { + name: "String" + } + }, + relationToIpStatus: { + readOnly: true, + serializedName: "relationToIpStatus", + type: { + name: "String" + } + } + } + } +}; + +export const NetworkInterface: msRest.CompositeMapper = { + serializedName: "NetworkInterface", + type: { + name: "Composite", + className: "NetworkInterface", + modelProperties: { + ipAddress: { + serializedName: "ipAddress", + type: { + name: "Composite", + className: "IpAddress" + } + }, + macAddress: { + serializedName: "macAddress", + type: { + name: "Composite", + className: "MacAddress" + } + }, + vlans: { + readOnly: true, + serializedName: "vlans", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "ConnectedResource" + name: "String" } } } @@ -4301,73 +7236,104 @@ export const ConnectableResource: msRest.CompositeMapper = { } }; -export const AllowedConnectionsResource: msRest.CompositeMapper = { - serializedName: "AllowedConnectionsResource", +export const Protocol1: msRest.CompositeMapper = { + serializedName: "Protocol", type: { name: "Composite", - className: "AllowedConnectionsResource", + className: "Protocol1", modelProperties: { - id: { + name: { readOnly: true, - serializedName: "id", + serializedName: "name", type: { name: "String" } }, - name: { + identifiers: { + serializedName: "identifiers", + type: { + name: "String" + } + } + } + } +}; + +export const Firmware: msRest.CompositeMapper = { + serializedName: "Firmware", + type: { + name: "Composite", + className: "Firmware", + modelProperties: { + moduleAddress: { readOnly: true, - serializedName: "name", + serializedName: "moduleAddress", type: { name: "String" } }, - type: { + rack: { readOnly: true, - serializedName: "type", + serializedName: "rack", type: { name: "String" } }, - location: { + slot: { readOnly: true, - serializedName: "location", + serializedName: "slot", type: { name: "String" } }, - calculatedDateTime: { + serial: { readOnly: true, - serializedName: "properties.calculatedDateTime", + serializedName: "serial", type: { - name: "DateTime" + name: "String" } }, - connectableResources: { + model: { readOnly: true, - serializedName: "properties.connectableResources", + serializedName: "model", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ConnectableResource" - } - } + name: "String" + } + }, + version: { + readOnly: true, + serializedName: "version", + type: { + name: "String" + } + }, + additionalData: { + readOnly: true, + serializedName: "additionalData", + type: { + name: "Object" } } } } }; -export const TopologySingleResourceParent: msRest.CompositeMapper = { - serializedName: "TopologySingleResourceParent", +export const Sensor: msRest.CompositeMapper = { + serializedName: "Sensor", type: { name: "Composite", - className: "TopologySingleResourceParent", + className: "Sensor", modelProperties: { - resourceId: { + name: { readOnly: true, - serializedName: "resourceId", + serializedName: "name", + type: { + name: "String" + } + }, + zone: { + readOnly: true, + serializedName: "zone", type: { name: "String" } @@ -4376,15 +7342,15 @@ export const TopologySingleResourceParent: msRest.CompositeMapper = { } }; -export const TopologySingleResourceChild: msRest.CompositeMapper = { - serializedName: "TopologySingleResourceChild", +export const Site: msRest.CompositeMapper = { + serializedName: "Site", type: { name: "Composite", - className: "TopologySingleResourceChild", + className: "Site", modelProperties: { - resourceId: { + displayName: { readOnly: true, - serializedName: "resourceId", + serializedName: "displayName", type: { name: "String" } @@ -4393,76 +7359,242 @@ export const TopologySingleResourceChild: msRest.CompositeMapper = { } }; -export const TopologySingleResource: msRest.CompositeMapper = { - serializedName: "TopologySingleResource", +export const Device: msRest.CompositeMapper = { + serializedName: "Device", type: { name: "Composite", - className: "TopologySingleResource", + className: "Device", modelProperties: { - resourceId: { + ...Resource.type.modelProperties, + displayName: { + serializedName: "properties.displayName", + type: { + name: "String" + } + }, + deviceType: { + serializedName: "properties.deviceType", + type: { + name: "String" + } + }, + sourceName: { readOnly: true, - serializedName: "resourceId", + serializedName: "properties.sourceName", type: { name: "String" } }, - severity: { + networkInterfaces: { readOnly: true, - serializedName: "severity", + serializedName: "properties.networkInterfaces", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "NetworkInterface" + } + } + } + }, + vendor: { + readOnly: true, + serializedName: "properties.vendor", + type: { + name: "String" + } + }, + osName: { + serializedName: "properties.osName", + type: { + name: "String" + } + }, + protocols: { + readOnly: true, + serializedName: "properties.protocols", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Protocol1" + } + } + } + }, + lastActiveTime: { + readOnly: true, + serializedName: "properties.lastActiveTime", + type: { + name: "DateTime" + } + }, + lastUpdateTime: { + readOnly: true, + serializedName: "properties.lastUpdateTime", + type: { + name: "DateTime" + } + }, + managementState: { + readOnly: true, + serializedName: "properties.managementState", + type: { + name: "String" + } + }, + authorizationState: { + serializedName: "properties.authorizationState", + defaultValue: 'Unauthorized', + type: { + name: "String" + } + }, + deviceCriticality: { + serializedName: "properties.deviceCriticality", + defaultValue: 'Standard', + type: { + name: "String" + } + }, + purdueLevel: { + serializedName: "properties.purdueLevel", + defaultValue: 'ProcessControl', + type: { + name: "String" + } + }, + notes: { + serializedName: "properties.notes", + type: { + name: "String" + } + }, + firmwares: { + readOnly: true, + serializedName: "properties.firmwares", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Firmware" + } + } + } + }, + discoveryTime: { + readOnly: true, + serializedName: "properties.discoveryTime", + type: { + name: "DateTime" + } + }, + programmingState: { + readOnly: true, + serializedName: "properties.programmingState", type: { name: "String" } }, - recommendationsExist: { + lastProgrammingTime: { readOnly: true, - serializedName: "recommendationsExist", + serializedName: "properties.lastProgrammingTime", type: { - name: "Boolean" + name: "DateTime" } }, - networkZones: { + scanningFunctionality: { readOnly: true, - serializedName: "networkZones", + serializedName: "properties.scanningFunctionality", type: { name: "String" } }, - topologyScore: { + lastScanTime: { readOnly: true, - serializedName: "topologyScore", + serializedName: "properties.lastScanTime", type: { - name: "Number" + name: "DateTime" } }, - location: { + riskScore: { readOnly: true, - serializedName: "location", + serializedName: "properties.riskScore", + constraints: { + InclusiveMaximum: 100, + InclusiveMinimum: 0 + }, type: { - name: "String" + name: "Number" } }, - parents: { + sensors: { readOnly: true, - serializedName: "parents", + serializedName: "properties.sensors", type: { name: "Sequence", element: { type: { name: "Composite", - className: "TopologySingleResourceParent" + className: "Sensor" } } } }, - children: { + site: { readOnly: true, - serializedName: "children", + serializedName: "properties.site", + type: { + name: "Composite", + className: "Site" + } + }, + deviceStatus: { + readOnly: true, + serializedName: "properties.deviceStatus", + type: { + name: "String" + } + } + } + } +}; + +export const OnPremiseIotSensor: msRest.CompositeMapper = { + serializedName: "OnPremiseIotSensor", + type: { + name: "Composite", + className: "OnPremiseIotSensor", + modelProperties: { + ...Resource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Object" + } + } + } + } +}; + +export const OnPremiseIotSensorsList: msRest.CompositeMapper = { + serializedName: "OnPremiseIotSensorsList", + type: { + name: "Composite", + className: "OnPremiseIotSensorsList", + modelProperties: { + value: { + readOnly: true, + serializedName: "value", type: { name: "Sequence", element: { type: { name: "Composite", - className: "TopologySingleResourceChild" + className: "OnPremiseIotSensor" } } } @@ -4471,56 +7603,50 @@ export const TopologySingleResource: msRest.CompositeMapper = { } }; -export const TopologyResource: msRest.CompositeMapper = { - serializedName: "TopologyResource", +export const IotSitesModel: msRest.CompositeMapper = { + serializedName: "IotSitesModel", type: { name: "Composite", - className: "TopologyResource", + className: "IotSitesModel", modelProperties: { - id: { - readOnly: true, - serializedName: "id", - type: { - name: "String" - } - }, - name: { - readOnly: true, - serializedName: "name", - type: { - name: "String" - } - }, - type: { - readOnly: true, - serializedName: "type", - type: { - name: "String" - } - }, - location: { - readOnly: true, - serializedName: "location", + ...Resource.type.modelProperties, + displayName: { + required: true, + serializedName: "properties.displayName", type: { name: "String" } }, - calculatedDateTime: { - readOnly: true, - serializedName: "properties.calculatedDateTime", + tags: { + serializedName: "properties.tags", type: { - name: "DateTime" + name: "Dictionary", + value: { + type: { + name: "String" + } + } } - }, - topologyResources: { + } + } + } +}; + +export const IotSitesList: msRest.CompositeMapper = { + serializedName: "IotSitesList", + type: { + name: "Composite", + className: "IotSitesList", + modelProperties: { + value: { readOnly: true, - serializedName: "properties.topologyResources", + serializedName: "value", type: { name: "Sequence", element: { type: { name: "Composite", - className: "TopologySingleResource" + className: "IotSitesModel" } } } @@ -4529,173 +7655,140 @@ export const TopologyResource: msRest.CompositeMapper = { } }; -export const JitNetworkAccessPortRule: msRest.CompositeMapper = { - serializedName: "JitNetworkAccessPortRule", +export const IotAlertModel: msRest.CompositeMapper = { + serializedName: "IotAlertModel", type: { name: "Composite", - className: "JitNetworkAccessPortRule", + className: "IotAlertModel", modelProperties: { - number: { - required: true, - serializedName: "number", - type: { - name: "Number" - } - }, - protocol: { - required: true, - serializedName: "protocol", + ...Resource.type.modelProperties, + systemAlertId: { + readOnly: true, + serializedName: "properties.systemAlertId", type: { name: "String" } }, - allowedSourceAddressPrefix: { - serializedName: "allowedSourceAddressPrefix", + compromisedEntity: { + readOnly: true, + serializedName: "properties.compromisedEntity", type: { name: "String" } }, - allowedSourceAddressPrefixes: { - serializedName: "allowedSourceAddressPrefixes", + alertType: { + readOnly: true, + serializedName: "properties.alertType", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "String" } }, - maxRequestAccessDuration: { - required: true, - serializedName: "maxRequestAccessDuration", + startTimeUtc: { + readOnly: true, + serializedName: "properties.startTimeUtc", type: { name: "String" } - } - } - } -}; - -export const JitNetworkAccessPolicyVirtualMachine: msRest.CompositeMapper = { - serializedName: "JitNetworkAccessPolicyVirtualMachine", - type: { - name: "Composite", - className: "JitNetworkAccessPolicyVirtualMachine", - modelProperties: { - id: { - required: true, - serializedName: "id", + }, + endTimeUtc: { + readOnly: true, + serializedName: "properties.endTimeUtc", type: { name: "String" } }, - ports: { - required: true, - serializedName: "ports", + entities: { + serializedName: "properties.entities", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "JitNetworkAccessPortRule" + name: "Object" } } } }, - publicIpAddress: { - serializedName: "publicIpAddress", + extendedProperties: { + serializedName: "properties.extendedProperties", type: { - name: "String" + name: "Object" } } } } }; -export const JitNetworkAccessRequestPort: msRest.CompositeMapper = { - serializedName: "JitNetworkAccessRequestPort", +export const IotAlertType: msRest.CompositeMapper = { + serializedName: "IotAlertType", type: { name: "Composite", - className: "JitNetworkAccessRequestPort", + className: "IotAlertType", modelProperties: { - number: { - required: true, - serializedName: "number", + ...Resource.type.modelProperties, + alertDisplayName: { + readOnly: true, + serializedName: "properties.alertDisplayName", type: { - name: "Number" + name: "String" } }, - allowedSourceAddressPrefix: { - serializedName: "allowedSourceAddressPrefix", + severity: { + readOnly: true, + serializedName: "properties.severity", type: { name: "String" } }, - allowedSourceAddressPrefixes: { - serializedName: "allowedSourceAddressPrefixes", + description: { + readOnly: true, + serializedName: "properties.description", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "String" } }, - endTimeUtc: { - required: true, - serializedName: "endTimeUtc", + providerName: { + readOnly: true, + serializedName: "properties.providerName", type: { - name: "DateTime" + name: "String" } }, - status: { - required: true, - serializedName: "status", + productName: { + readOnly: true, + serializedName: "properties.productName", type: { name: "String" } }, - statusReason: { - required: true, - serializedName: "statusReason", + productComponentName: { + readOnly: true, + serializedName: "properties.productComponentName", type: { name: "String" } }, - mappedPort: { - serializedName: "mappedPort", + vendorName: { + readOnly: true, + serializedName: "properties.vendorName", type: { - name: "Number" + name: "String" } - } - } - } -}; - -export const JitNetworkAccessRequestVirtualMachine: msRest.CompositeMapper = { - serializedName: "JitNetworkAccessRequestVirtualMachine", - type: { - name: "Composite", - className: "JitNetworkAccessRequestVirtualMachine", - modelProperties: { - id: { - required: true, - serializedName: "id", + }, + intent: { + readOnly: true, + serializedName: "properties.intent", type: { name: "String" } }, - ports: { - required: true, - serializedName: "ports", + remediationSteps: { + readOnly: true, + serializedName: "properties.remediationSteps", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "JitNetworkAccessRequestPort" + name: "String" } } } @@ -4704,117 +7797,137 @@ export const JitNetworkAccessRequestVirtualMachine: msRest.CompositeMapper = { } }; -export const JitNetworkAccessRequest: msRest.CompositeMapper = { - serializedName: "JitNetworkAccessRequest", +export const IotAlertTypeList: msRest.CompositeMapper = { + serializedName: "IotAlertTypeList", type: { name: "Composite", - className: "JitNetworkAccessRequest", + className: "IotAlertTypeList", modelProperties: { - virtualMachines: { - required: true, - serializedName: "virtualMachines", + value: { + serializedName: "value", type: { name: "Sequence", element: { type: { name: "Composite", - className: "JitNetworkAccessRequestVirtualMachine" + className: "IotAlertType" } } } - }, - startTimeUtc: { - required: true, - serializedName: "startTimeUtc", + } + } + } +}; + +export const IotRecommendationModel: msRest.CompositeMapper = { + serializedName: "IotRecommendationModel", + type: { + name: "Composite", + className: "IotRecommendationModel", + modelProperties: { + ...Resource.type.modelProperties, + deviceId: { + readOnly: true, + serializedName: "properties.deviceId", type: { - name: "DateTime" + name: "String" } }, - requestor: { - required: true, - serializedName: "requestor", + recommendationType: { + readOnly: true, + serializedName: "properties.recommendationType", type: { name: "String" } }, - justification: { - serializedName: "justification", + discoveredTimeUtc: { + readOnly: true, + serializedName: "properties.discoveredTimeUtc", type: { name: "String" } + }, + recommendationAdditionalData: { + serializedName: "properties.recommendationAdditionalData", + type: { + name: "Object" + } } } } }; -export const JitNetworkAccessPolicy: msRest.CompositeMapper = { - serializedName: "JitNetworkAccessPolicy", +export const IotRecommendationType: msRest.CompositeMapper = { + serializedName: "IotRecommendationType", type: { name: "Composite", - className: "JitNetworkAccessPolicy", + className: "IotRecommendationType", modelProperties: { - id: { + ...Resource.type.modelProperties, + recommendationDisplayName: { readOnly: true, - serializedName: "id", + serializedName: "properties.recommendationDisplayName", type: { name: "String" } }, - name: { + severity: { readOnly: true, - serializedName: "name", + serializedName: "properties.severity", type: { name: "String" } }, - type: { + description: { readOnly: true, - serializedName: "type", + serializedName: "properties.description", type: { name: "String" } }, - kind: { - serializedName: "kind", + productName: { + readOnly: true, + serializedName: "properties.productName", type: { name: "String" } }, - location: { + productComponentName: { readOnly: true, - serializedName: "location", + serializedName: "properties.productComponentName", type: { name: "String" } }, - virtualMachines: { - required: true, - serializedName: "properties.virtualMachines", + vendorName: { + readOnly: true, + serializedName: "properties.vendorName", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "JitNetworkAccessPolicyVirtualMachine" - } - } + name: "String" } }, - requests: { - serializedName: "properties.requests", + control: { + readOnly: true, + serializedName: "properties.control", + type: { + name: "String" + } + }, + remediationSteps: { + readOnly: true, + serializedName: "properties.remediationSteps", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "JitNetworkAccessRequest" + name: "String" } } } }, - provisioningState: { + dataSource: { readOnly: true, - serializedName: "properties.provisioningState", + serializedName: "properties.dataSource", type: { name: "String" } @@ -4823,203 +7936,272 @@ export const JitNetworkAccessPolicy: msRest.CompositeMapper = { } }; -export const JitNetworkAccessPolicyInitiatePort: msRest.CompositeMapper = { - serializedName: "JitNetworkAccessPolicyInitiatePort", +export const IotRecommendationTypeList: msRest.CompositeMapper = { + serializedName: "IotRecommendationTypeList", type: { name: "Composite", - className: "JitNetworkAccessPolicyInitiatePort", + className: "IotRecommendationTypeList", modelProperties: { - number: { - required: true, - serializedName: "number", - type: { - name: "Number" - } - }, - allowedSourceAddressPrefix: { - serializedName: "allowedSourceAddressPrefix", - type: { - name: "String" - } - }, - endTimeUtc: { - required: true, - serializedName: "endTimeUtc", + value: { + serializedName: "value", type: { - name: "DateTime" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IotRecommendationType" + } + } } } } } }; -export const JitNetworkAccessPolicyInitiateVirtualMachine: msRest.CompositeMapper = { - serializedName: "JitNetworkAccessPolicyInitiateVirtualMachine", +export const ResourceIdentifier: msRest.CompositeMapper = { + serializedName: "ResourceIdentifier", type: { name: "Composite", - className: "JitNetworkAccessPolicyInitiateVirtualMachine", + polymorphicDiscriminator: { + serializedName: "type", + clientName: "type" + }, + uberParent: "ResourceIdentifier", + className: "ResourceIdentifier", modelProperties: { - id: { + type: { required: true, - serializedName: "id", + serializedName: "type", type: { name: "String" } - }, - ports: { - required: true, - serializedName: "ports", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "JitNetworkAccessPolicyInitiatePort" - } - } - } } } } }; -export const JitNetworkAccessPolicyInitiateRequest: msRest.CompositeMapper = { - serializedName: "JitNetworkAccessPolicyInitiateRequest", +export const AlertEntity: msRest.CompositeMapper = { + serializedName: "AlertEntity", type: { name: "Composite", - className: "JitNetworkAccessPolicyInitiateRequest", + className: "AlertEntity", modelProperties: { - virtualMachines: { - required: true, - serializedName: "virtualMachines", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "JitNetworkAccessPolicyInitiateVirtualMachine" - } - } - } - }, - justification: { - serializedName: "justification", + type: { + readOnly: true, + serializedName: "type", type: { name: "String" } } + }, + additionalProperties: { + type: { + name: "Object" + } } } }; -export const DiscoveredSecuritySolution: msRest.CompositeMapper = { - serializedName: "DiscoveredSecuritySolution", +export const Alert: msRest.CompositeMapper = { + serializedName: "Alert", type: { name: "Composite", - className: "DiscoveredSecuritySolution", + className: "Alert", modelProperties: { - id: { + ...Resource.type.modelProperties, + alertType: { readOnly: true, - serializedName: "id", + serializedName: "properties.alertType", type: { name: "String" } }, - name: { + systemAlertId: { readOnly: true, - serializedName: "name", + serializedName: "properties.systemAlertId", type: { name: "String" } }, - type: { + productComponentName: { readOnly: true, - serializedName: "type", + serializedName: "properties.productComponentName", + type: { + name: "String" + } + }, + alertDisplayName: { + readOnly: true, + serializedName: "properties.alertDisplayName", + type: { + name: "String" + } + }, + description: { + readOnly: true, + serializedName: "properties.description", + type: { + name: "String" + } + }, + severity: { + readOnly: true, + serializedName: "properties.severity", + type: { + name: "String" + } + }, + intent: { + readOnly: true, + serializedName: "properties.intent", + type: { + name: "String" + } + }, + startTimeUtc: { + readOnly: true, + serializedName: "properties.startTimeUtc", + type: { + name: "DateTime" + } + }, + endTimeUtc: { + readOnly: true, + serializedName: "properties.endTimeUtc", + type: { + name: "DateTime" + } + }, + resourceIdentifiers: { + readOnly: true, + serializedName: "properties.resourceIdentifiers", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ResourceIdentifier" + } + } + } + }, + remediationSteps: { + readOnly: true, + serializedName: "properties.remediationSteps", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + vendorName: { + readOnly: true, + serializedName: "properties.vendorName", + type: { + name: "String" + } + }, + status: { + readOnly: true, + serializedName: "properties.status", type: { name: "String" } }, - location: { + extendedLinks: { readOnly: true, - serializedName: "location", + serializedName: "properties.extendedLinks", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } } }, - securityFamily: { - required: true, - serializedName: "properties.securityFamily", + alertUri: { + readOnly: true, + serializedName: "properties.alertUri", type: { name: "String" } }, - offer: { - required: true, - serializedName: "properties.offer", + timeGeneratedUtc: { + readOnly: true, + serializedName: "properties.timeGeneratedUtc", type: { - name: "String" + name: "DateTime" } }, - publisher: { - required: true, - serializedName: "properties.publisher", + productName: { + readOnly: true, + serializedName: "properties.productName", type: { name: "String" } }, - sku: { - required: true, - serializedName: "properties.sku", + processingEndTimeUtc: { + readOnly: true, + serializedName: "properties.processingEndTimeUtc", type: { - name: "String" + name: "DateTime" } - } - } - } -}; - -export const ExternalSecuritySolution: msRest.CompositeMapper = { - serializedName: "ExternalSecuritySolution", - type: { - name: "Composite", - polymorphicDiscriminator: { - serializedName: "kind", - clientName: "kind" - }, - uberParent: "ExternalSecuritySolution", - className: "ExternalSecuritySolution", - modelProperties: { - id: { + }, + entities: { readOnly: true, - serializedName: "id", + serializedName: "properties.entities", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AlertEntity", + additionalProperties: { + type: { + name: "Object" + } + } + } + } } }, - name: { + isIncident: { readOnly: true, - serializedName: "name", + serializedName: "properties.isIncident", type: { - name: "String" + name: "Boolean" } }, - type: { + correlationKey: { readOnly: true, - serializedName: "type", + serializedName: "properties.correlationKey", type: { name: "String" } }, - location: { - readOnly: true, - serializedName: "location", + extendedProperties: { + serializedName: "properties.extendedProperties", type: { - name: "String" + name: "Dictionary", + value: { + type: { + name: "String" + } + } } }, - kind: { - required: true, - serializedName: "kind", + compromisedEntity: { + readOnly: true, + serializedName: "properties.compromisedEntity", type: { name: "String" } @@ -5028,225 +8210,159 @@ export const ExternalSecuritySolution: msRest.CompositeMapper = { } }; -export const ExternalSecuritySolutionProperties: msRest.CompositeMapper = { - serializedName: "ExternalSecuritySolutionProperties", +export const AzureResourceIdentifier: msRest.CompositeMapper = { + serializedName: "AzureResource", type: { name: "Composite", - className: "ExternalSecuritySolutionProperties", + polymorphicDiscriminator: ResourceIdentifier.type.polymorphicDiscriminator, + uberParent: "ResourceIdentifier", + className: "AzureResourceIdentifier", modelProperties: { - deviceVendor: { - serializedName: "deviceVendor", - type: { - name: "String" - } - }, - deviceType: { - serializedName: "deviceType", + ...ResourceIdentifier.type.modelProperties, + azureResourceId: { + readOnly: true, + serializedName: "azureResourceId", type: { name: "String" } - }, - workspace: { - serializedName: "workspace", - type: { - name: "Composite", - className: "ConnectedWorkspace" - } - } - }, - additionalProperties: { - type: { - name: "Object" } } } }; -export const CefSolutionProperties: msRest.CompositeMapper = { - serializedName: "CefSolutionProperties", +export const LogAnalyticsIdentifier: msRest.CompositeMapper = { + serializedName: "LogAnalytics", type: { name: "Composite", - className: "CefSolutionProperties", + polymorphicDiscriminator: ResourceIdentifier.type.polymorphicDiscriminator, + uberParent: "ResourceIdentifier", + className: "LogAnalyticsIdentifier", modelProperties: { - ...ExternalSecuritySolutionProperties.type.modelProperties, - hostname: { - serializedName: "hostname", + ...ResourceIdentifier.type.modelProperties, + workspaceId: { + readOnly: true, + serializedName: "workspaceId", type: { name: "String" } }, - agent: { - serializedName: "agent", + workspaceSubscriptionId: { + readOnly: true, + serializedName: "workspaceSubscriptionId", + constraints: { + Pattern: /^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$/ + }, type: { name: "String" } }, - lastEventReceived: { - serializedName: "lastEventReceived", + workspaceResourceGroup: { + readOnly: true, + serializedName: "workspaceResourceGroup", type: { name: "String" } - } - }, - additionalProperties: ExternalSecuritySolutionProperties.type.additionalProperties - } -}; - -export const CefExternalSecuritySolution: msRest.CompositeMapper = { - serializedName: "CEF", - type: { - name: "Composite", - polymorphicDiscriminator: ExternalSecuritySolution.type.polymorphicDiscriminator, - uberParent: "ExternalSecuritySolution", - className: "CefExternalSecuritySolution", - modelProperties: { - ...ExternalSecuritySolution.type.modelProperties, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "CefSolutionProperties", - additionalProperties: ExternalSecuritySolutionProperties.type.additionalProperties - } - } - } - } -}; - -export const AtaSolutionProperties: msRest.CompositeMapper = { - serializedName: "AtaSolutionProperties", - type: { - name: "Composite", - className: "AtaSolutionProperties", - modelProperties: { - ...ExternalSecuritySolutionProperties.type.modelProperties, - lastEventReceived: { - serializedName: "lastEventReceived", + }, + agentId: { + readOnly: true, + serializedName: "agentId", type: { name: "String" } } - }, - additionalProperties: ExternalSecuritySolutionProperties.type.additionalProperties - } -}; - -export const AtaExternalSecuritySolution: msRest.CompositeMapper = { - serializedName: "ATA", - type: { - name: "Composite", - polymorphicDiscriminator: ExternalSecuritySolution.type.polymorphicDiscriminator, - uberParent: "ExternalSecuritySolution", - className: "AtaExternalSecuritySolution", - modelProperties: { - ...ExternalSecuritySolution.type.modelProperties, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "AtaSolutionProperties", - additionalProperties: ExternalSecuritySolutionProperties.type.additionalProperties - } - } } } }; -export const ConnectedWorkspace: msRest.CompositeMapper = { - serializedName: "ConnectedWorkspace", +export const AlertSimulatorRequestProperties: msRest.CompositeMapper = { + serializedName: "AlertSimulatorRequestProperties", type: { name: "Composite", - className: "ConnectedWorkspace", + polymorphicDiscriminator: { + serializedName: "kind", + clientName: "kind" + }, + uberParent: "AlertSimulatorRequestProperties", + className: "AlertSimulatorRequestProperties", modelProperties: { - id: { - serializedName: "id", + kind: { + required: true, + serializedName: "kind", type: { name: "String" } } - } - } -}; - -export const AadSolutionProperties: msRest.CompositeMapper = { - serializedName: "AadSolutionProperties", - type: { - name: "Composite", - className: "AadSolutionProperties", - modelProperties: { - deviceVendor: { - serializedName: "deviceVendor", - type: { - name: "String" - } - }, - deviceType: { - serializedName: "deviceType", - type: { - name: "String" - } - }, - workspace: { - serializedName: "workspace", - type: { - name: "Composite", - className: "ConnectedWorkspace" - } - }, - connectivityState: { - serializedName: "connectivityState", - type: { - name: "String" - } + }, + additionalProperties: { + type: { + name: "Object" } } } }; -export const AadExternalSecuritySolution: msRest.CompositeMapper = { - serializedName: "AAD", +export const AlertSimulatorRequestBody: msRest.CompositeMapper = { + serializedName: "AlertSimulatorRequestBody", type: { name: "Composite", - polymorphicDiscriminator: ExternalSecuritySolution.type.polymorphicDiscriminator, - uberParent: "ExternalSecuritySolution", - className: "AadExternalSecuritySolution", + className: "AlertSimulatorRequestBody", modelProperties: { - ...ExternalSecuritySolution.type.modelProperties, properties: { serializedName: "properties", type: { name: "Composite", - className: "AadSolutionProperties" + className: "AlertSimulatorRequestProperties", + additionalProperties: { + type: { + name: "Object" + } + } } } } } }; -export const ExternalSecuritySolutionKind1: msRest.CompositeMapper = { - serializedName: "ExternalSecuritySolutionKind", +export const AlertSimulatorBundlesRequestProperties: msRest.CompositeMapper = { + serializedName: "Bundles", type: { name: "Composite", - className: "ExternalSecuritySolutionKind1", + polymorphicDiscriminator: AlertSimulatorRequestProperties.type.polymorphicDiscriminator, + uberParent: "AlertSimulatorRequestProperties", + className: "AlertSimulatorBundlesRequestProperties", modelProperties: { - kind: { - serializedName: "kind", + ...AlertSimulatorRequestProperties.type.modelProperties, + bundles: { + serializedName: "bundles", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } } - } + }, + additionalProperties: AlertSimulatorRequestProperties.type.additionalProperties } }; -export const AadConnectivityState1: msRest.CompositeMapper = { - serializedName: "AadConnectivityState", +export const Setting: msRest.CompositeMapper = { + serializedName: "Setting", type: { name: "Composite", - className: "AadConnectivityState1", + polymorphicDiscriminator: { + serializedName: "kind", + clientName: "kind" + }, + uberParent: "Setting", + className: "Setting", modelProperties: { - connectivityState: { - serializedName: "connectivityState", + ...Resource.type.modelProperties, + kind: { + required: true, + serializedName: "kind", type: { name: "String" } @@ -5255,101 +8371,72 @@ export const AadConnectivityState1: msRest.CompositeMapper = { } }; -export const SecureScoreItem: msRest.CompositeMapper = { - serializedName: "SecureScoreItem", +export const DataExportSettings: msRest.CompositeMapper = { + serializedName: "DataExportSettings", type: { name: "Composite", - className: "SecureScoreItem", + polymorphicDiscriminator: Setting.type.polymorphicDiscriminator, + uberParent: "Setting", + className: "DataExportSettings", modelProperties: { - ...Resource.type.modelProperties, - displayName: { - readOnly: true, - serializedName: "properties.displayName", - type: { - name: "String" - } - }, - max: { - readOnly: true, - serializedName: "properties.score.max", - constraints: { - InclusiveMinimum: 0 - }, - type: { - name: "Number" - } - }, - current: { - readOnly: true, - serializedName: "properties.score.current", - constraints: { - InclusiveMinimum: 0 - }, + ...Setting.type.modelProperties, + enabled: { + required: true, + serializedName: "properties.enabled", type: { - name: "Number" + name: "Boolean" } } } } }; -export const SecureScoreControlScore: msRest.CompositeMapper = { - serializedName: "SecureScoreControlScore", +export const AlertSyncSettings: msRest.CompositeMapper = { + serializedName: "AlertSyncSettings", type: { name: "Composite", - className: "SecureScoreControlScore", + polymorphicDiscriminator: Setting.type.polymorphicDiscriminator, + uberParent: "Setting", + className: "AlertSyncSettings", modelProperties: { - max: { - readOnly: true, - serializedName: "max", - constraints: { - InclusiveMaximum: 10, - InclusiveMinimum: 0 - }, - type: { - name: "Number" - } - }, - current: { - readOnly: true, - serializedName: "current", - constraints: { - InclusiveMaximum: 10, - InclusiveMinimum: 0 - }, + ...Setting.type.modelProperties, + enabled: { + required: true, + serializedName: "properties.enabled", type: { - name: "Number" + name: "Boolean" } } } } }; -export const SecureScoreControlDefinitionSource: msRest.CompositeMapper = { - serializedName: "SecureScoreControlDefinitionSource", +export const IngestionSetting: msRest.CompositeMapper = { + serializedName: "IngestionSetting", type: { name: "Composite", - className: "SecureScoreControlDefinitionSource", + className: "IngestionSetting", modelProperties: { - sourceType: { - serializedName: "sourceType", + ...Resource.type.modelProperties, + properties: { + serializedName: "properties", type: { - name: "String" + name: "Object" } } } } }; -export const AzureResourceLink: msRest.CompositeMapper = { - serializedName: "AzureResourceLink", +export const IngestionSettingToken: msRest.CompositeMapper = { + serializedName: "IngestionSettingToken", type: { name: "Composite", - className: "AzureResourceLink", + className: "IngestionSettingToken", modelProperties: { - id: { + token: { readOnly: true, - serializedName: "id", + serializedName: "token", type: { name: "String" } @@ -5358,58 +8445,45 @@ export const AzureResourceLink: msRest.CompositeMapper = { } }; -export const SecureScoreControlDefinitionItem: msRest.CompositeMapper = { - serializedName: "SecureScoreControlDefinitionItem", +export const IngestionConnectionString: msRest.CompositeMapper = { + serializedName: "IngestionConnectionString", type: { name: "Composite", - className: "SecureScoreControlDefinitionItem", + className: "IngestionConnectionString", modelProperties: { - ...Resource.type.modelProperties, - displayName: { + location: { readOnly: true, - serializedName: "properties.displayName", + serializedName: "location", type: { name: "String" } }, - description: { + value: { readOnly: true, - serializedName: "properties.description", - constraints: { - MaxLength: 256 - }, + serializedName: "value", type: { name: "String" } - }, - maxScore: { - readOnly: true, - serializedName: "properties.maxScore", - constraints: { - InclusiveMaximum: 10, - InclusiveMinimum: 0 - }, - type: { - name: "Number" - } - }, - source: { - readOnly: true, - serializedName: "properties.source", - type: { - name: "Composite", - className: "SecureScoreControlDefinitionSource" - } - }, - assessmentDefinitions: { - readOnly: true, - serializedName: "properties.assessmentDefinitions", + } + } + } +}; + +export const ConnectionStrings: msRest.CompositeMapper = { + serializedName: "ConnectionStrings", + type: { + name: "Composite", + className: "ConnectionStrings", + modelProperties: { + value: { + required: true, + serializedName: "value", type: { name: "Sequence", element: { type: { name: "Composite", - className: "AzureResourceLink" + className: "IngestionConnectionString" } } } @@ -5418,123 +8492,63 @@ export const SecureScoreControlDefinitionItem: msRest.CompositeMapper = { } }; -export const SecureScoreControlDetails: msRest.CompositeMapper = { - serializedName: "SecureScoreControlDetails", +export const Software: msRest.CompositeMapper = { + serializedName: "Software", type: { name: "Composite", - className: "SecureScoreControlDetails", + className: "Software", modelProperties: { ...Resource.type.modelProperties, - displayName: { - readOnly: true, - serializedName: "properties.displayName", + deviceId: { + serializedName: "properties.deviceId", type: { name: "String" } }, - max: { - readOnly: true, - serializedName: "properties.score.max", - constraints: { - InclusiveMinimum: 0 - }, - type: { - name: "Number" - } - }, - current: { - readOnly: true, - serializedName: "properties.score.current", - constraints: { - InclusiveMinimum: 0 - }, - type: { - name: "Number" - } - }, - healthyResourceCount: { - readOnly: true, - serializedName: "properties.healthyResourceCount", + osPlatform: { + serializedName: "properties.osPlatform", type: { - name: "Number" + name: "String" } }, - unhealthyResourceCount: { - readOnly: true, - serializedName: "properties.unhealthyResourceCount", + vendor: { + serializedName: "properties.vendor", type: { - name: "Number" + name: "String" } }, - notApplicableResourceCount: { - readOnly: true, - serializedName: "properties.notApplicableResourceCount", + softwareName: { + serializedName: "properties.softwareName", type: { - name: "Number" + name: "String" } }, - definition: { - serializedName: "properties.definition", - type: { - name: "Composite", - className: "SecureScoreControlDefinitionItem" - } - } - } - } -}; - -export const ComplianceResultList: msRest.CompositeMapper = { - serializedName: "ComplianceResultList", - type: { - name: "Composite", - className: "ComplianceResultList", - modelProperties: { - value: { - required: true, - serializedName: "", + version: { + serializedName: "properties.version", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ComplianceResult" - } - } + name: "String" } }, - nextLink: { - readOnly: true, - serializedName: "nextLink", + endOfSupportStatus: { + serializedName: "properties.endOfSupportStatus", type: { name: "String" } - } - } - } -}; - -export const AlertList: msRest.CompositeMapper = { - serializedName: "AlertList", - type: { - name: "Composite", - className: "AlertList", - modelProperties: { - value: { - serializedName: "", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Alert" - } - } + }, + endOfSupportDate: { + serializedName: "properties.endOfSupportDate", + type: { + name: "String" } }, - nextLink: { - readOnly: true, - serializedName: "nextLink", + numberOfKnownVulnerabilities: { + serializedName: "properties.numberOfKnownVulnerabilities", + type: { + name: "Number" + } + }, + firstSeenAt: { + serializedName: "properties.firstSeenAt", type: { name: "String" } @@ -5543,20 +8557,21 @@ export const AlertList: msRest.CompositeMapper = { } }; -export const SettingsList: msRest.CompositeMapper = { - serializedName: "SettingsList", +export const ComplianceResultList: msRest.CompositeMapper = { + serializedName: "ComplianceResultList", type: { name: "Composite", - className: "SettingsList", + className: "ComplianceResultList", modelProperties: { value: { + required: true, serializedName: "", type: { name: "Sequence", element: { type: { name: "Composite", - className: "Setting" + className: "ComplianceResult" } } } @@ -6432,10 +9447,272 @@ export const SecureScoreControlDefinitionList: msRest.CompositeMapper = { } }; +export const SecuritySolutionList: msRest.CompositeMapper = { + serializedName: "SecuritySolutionList", + type: { + name: "Composite", + className: "SecuritySolutionList", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SecuritySolution" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const ConnectorSettingList: msRest.CompositeMapper = { + serializedName: "ConnectorSettingList", + type: { + name: "Composite", + className: "ConnectorSettingList", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ConnectorSetting" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const DeviceList: msRest.CompositeMapper = { + serializedName: "DeviceList", + type: { + name: "Composite", + className: "DeviceList", + modelProperties: { + value: { + required: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Device" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const IotAlertListModel: msRest.CompositeMapper = { + serializedName: "IotAlertListModel", + type: { + name: "Composite", + className: "IotAlertListModel", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IotAlertModel" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const IotRecommendationListModel: msRest.CompositeMapper = { + serializedName: "IotRecommendationListModel", + type: { + name: "Composite", + className: "IotRecommendationListModel", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IotRecommendationModel" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const AlertList: msRest.CompositeMapper = { + serializedName: "AlertList", + type: { + name: "Composite", + className: "AlertList", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Alert" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const SettingsList: msRest.CompositeMapper = { + serializedName: "SettingsList", + type: { + name: "Composite", + className: "SettingsList", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Setting" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const IngestionSettingList: msRest.CompositeMapper = { + serializedName: "IngestionSettingList", + type: { + name: "Composite", + className: "IngestionSettingList", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IngestionSetting" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const SoftwaresList: msRest.CompositeMapper = { + serializedName: "SoftwaresList", + type: { + name: "Composite", + className: "SoftwaresList", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Software" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + export const discriminators = { - 'BaseResource.Setting' : Setting, - 'BaseResource.DataExportSettings' : DataExportSettings, - 'BaseResource.SettingResource' : SettingResource, 'CustomAlertRule.ThresholdCustomAlertRule' : ThresholdCustomAlertRule, 'CustomAlertRule.TimeWindowCustomAlertRule' : TimeWindowCustomAlertRule, 'CustomAlertRule.AllowlistCustomAlertRule' : AllowlistCustomAlertRule, @@ -6443,6 +9720,7 @@ export const discriminators = { 'CustomAlertRule' : CustomAlertRule, 'CustomAlertRule.ListCustomAlertRule' : ListCustomAlertRule, 'CustomAlertRule.ConnectionToIpNotAllowed' : ConnectionToIpNotAllowed, + 'CustomAlertRule.ConnectionFromIpNotAllowed' : ConnectionFromIpNotAllowed, 'CustomAlertRule.LocalUserNotAllowed' : LocalUserNotAllowed, 'CustomAlertRule.ProcessNotAllowed' : ProcessNotAllowed, 'CustomAlertRule.ActiveConnectionsNotInAllowedRange' : ActiveConnectionsNotInAllowedRange, @@ -6466,6 +9744,7 @@ export const discriminators = { 'AdditionalData.SqlServerVulnerability' : SqlServerVulnerabilityProperties, 'AdditionalData.ContainerRegistryVulnerability' : ContainerRegistryVulnerabilityProperties, 'AdditionalData.ServerVulnerabilityAssessment' : ServerVulnerabilityProperties, + 'ResourceDetails.OnPremiseSql' : OnPremiseSqlResourceDetails, 'ResourceDetails.OnPremise' : OnPremiseResourceDetails, 'ResourceDetails.Azure' : AzureResourceDetails, 'AutomationAction' : AutomationAction, @@ -6475,6 +9754,18 @@ export const discriminators = { 'ExternalSecuritySolution' : ExternalSecuritySolution, 'ExternalSecuritySolution.CEF' : CefExternalSecuritySolution, 'ExternalSecuritySolution.ATA' : AtaExternalSecuritySolution, - 'ExternalSecuritySolution.AAD' : AadExternalSecuritySolution + 'ExternalSecuritySolution.AAD' : AadExternalSecuritySolution, + 'AuthenticationDetailsProperties' : AuthenticationDetailsProperties, + 'AuthenticationDetailsProperties.awsCreds' : AwsCredsAuthenticationDetailsProperties, + 'AuthenticationDetailsProperties.awsAssumeRole' : AwAssumeRoleAuthenticationDetailsProperties, + 'AuthenticationDetailsProperties.gcpCredentials' : GcpCredentialsDetailsProperties, + 'ResourceIdentifier' : ResourceIdentifier, + 'ResourceIdentifier.AzureResource' : AzureResourceIdentifier, + 'ResourceIdentifier.LogAnalytics' : LogAnalyticsIdentifier, + 'AlertSimulatorRequestProperties' : AlertSimulatorRequestProperties, + 'AlertSimulatorRequestProperties.Bundles' : AlertSimulatorBundlesRequestProperties, + 'Setting' : Setting, + 'Setting.DataExportSettings' : DataExportSettings, + 'Setting.AlertSyncSettings' : AlertSyncSettings }; diff --git a/sdk/security/arm-security/src/models/onPremiseIotSensorsMappers.ts b/sdk/security/arm-security/src/models/onPremiseIotSensorsMappers.ts new file mode 100644 index 000000000000..7e62c67c18c6 --- /dev/null +++ b/sdk/security/arm-security/src/models/onPremiseIotSensorsMappers.ts @@ -0,0 +1,145 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + ActiveConnectionsNotInAllowedRange, + AdaptiveNetworkHardening, + AdditionalData, + AdvancedThreatProtectionSetting, + Alert, + AlertEntity, + AlertsSuppressionRule, + AlertSyncSettings, + AllowlistCustomAlertRule, + AmqpC2DMessagesNotInAllowedRange, + AmqpC2DRejectedMessagesNotInAllowedRange, + AmqpD2CMessagesNotInAllowedRange, + AscLocation, + AssessmentLinks, + AssessmentStatus, + AuthenticationDetailsProperties, + AutoProvisioningSetting, + AwAssumeRoleAuthenticationDetailsProperties, + AwsCredsAuthenticationDetailsProperties, + AzureResourceDetails, + AzureResourceIdentifier, + AzureResourceLink, + Baseline, + BaselineAdjustedResult, + BaseResource, + BenchmarkReference, + CloudError, + Compliance, + ComplianceResult, + ComplianceSegment, + ConnectionFromIpNotAllowed, + ConnectionToIpNotAllowed, + ConnectorSetting, + ContainerRegistryVulnerabilityProperties, + CustomAlertRule, + CVE, + CVSS, + DataExportSettings, + DenylistCustomAlertRule, + Device, + DeviceSecurityGroup, + DirectMethodInvokesNotInAllowedRange, + EffectiveNetworkSecurityGroups, + FailedLocalLoginsNotInAllowedRange, + FileUploadsNotInAllowedRange, + Firmware, + GcpCredentialsDetailsProperties, + HttpC2DMessagesNotInAllowedRange, + HttpC2DRejectedMessagesNotInAllowedRange, + HttpD2CMessagesNotInAllowedRange, + HybridComputeSettingsProperties, + InformationProtectionKeyword, + InformationProtectionPolicy, + InformationType, + IngestionSetting, + IotAlertModel, + IotAlertType, + IotDefenderSettingsModel, + IotRecommendationModel, + IotRecommendationType, + IoTSecurityAlertedDevice, + IoTSecurityDeviceAlert, + IoTSecurityDeviceRecommendation, + IoTSecuritySolutionAnalyticsModel, + IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IotSensorsModel, + IoTSeverityMetrics, + IotSitesModel, + IpAddress, + ListCustomAlertRule, + LocalUserNotAllowed, + LogAnalyticsIdentifier, + MacAddress, + MqttC2DMessagesNotInAllowedRange, + MqttC2DRejectedMessagesNotInAllowedRange, + MqttD2CMessagesNotInAllowedRange, + NetworkInterface, + OnPremiseIotSensor, + OnPremiseIotSensorsList, + OnPremiseResourceDetails, + OnPremiseSqlResourceDetails, + Pricing, + ProcessNotAllowed, + Protocol1, + ProxyServerProperties, + QueryCheck, + QueuePurgesNotInAllowedRange, + RegulatoryComplianceAssessment, + RegulatoryComplianceControl, + RegulatoryComplianceStandard, + Remediation, + ResetPasswordInput, + Resource, + ResourceDetails, + ResourceIdentifier, + Rule, + RuleResults, + RuleResultsProperties, + Scan, + ScanProperties, + ScanResult, + ScanResultProperties, + ScopeElement, + SecureScoreControlDefinitionItem, + SecureScoreControlDefinitionSource, + SecureScoreControlDetails, + SecureScoreItem, + SecurityAssessment, + SecurityAssessmentMetadata, + SecurityAssessmentMetadataPartnerData, + SecurityAssessmentMetadataProperties, + SecurityAssessmentPartnerData, + SecurityContact, + SecuritySubAssessment, + SecurityTask, + SecurityTaskParameters, + SensitivityLabel, + Sensor, + ServerVulnerabilityAssessment, + ServerVulnerabilityProperties, + ServicePrincipalProperties, + Setting, + Site, + Software, + SqlServerVulnerabilityProperties, + SubAssessmentStatus, + SuppressionAlertsScope, + ThresholdCustomAlertRule, + TimeWindowCustomAlertRule, + TwinUpdatesNotInAllowedRange, + UnauthorizedOperationsNotInAllowedRange, + VaRule, + VendorReference, + WorkspaceSetting +} from "../models/mappers"; diff --git a/sdk/security/arm-security/src/models/operationsMappers.ts b/sdk/security/arm-security/src/models/operationsMappers.ts index 786d9130f59f..583dd59bc975 100644 --- a/sdk/security/arm-security/src/models/operationsMappers.ts +++ b/sdk/security/arm-security/src/models/operationsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. diff --git a/sdk/security/arm-security/src/models/parameters.ts b/sdk/security/arm-security/src/models/parameters.ts index f9b159e02557..a22ff0f8d0db 100644 --- a/sdk/security/arm-security/src/models/parameters.ts +++ b/sdk/security/arm-security/src/models/parameters.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -82,7 +81,7 @@ export const alertsSuppressionRuleName: msRest.OperationURLParameter = { } } }; -export const alertType: msRest.OperationQueryParameter = { +export const alertType0: msRest.OperationQueryParameter = { parameterPath: [ "options", "alertType" @@ -94,6 +93,18 @@ export const alertType: msRest.OperationQueryParameter = { } } }; +export const alertType1: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "alertType" + ], + mapper: { + serializedName: "alertType", + type: { + name: "String" + } + } +}; export const apiVersion0: msRest.OperationQueryParameter = { parameterPath: "apiVersion", mapper: { @@ -118,6 +129,66 @@ export const apiVersion1: msRest.OperationQueryParameter = { } } }; +export const apiVersion10: msRest.OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + required: true, + isConstant: true, + serializedName: "api-version", + defaultValue: '2020-08-06-preview', + type: { + name: "String" + } + } +}; +export const apiVersion11: msRest.OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + required: true, + isConstant: true, + serializedName: "api-version", + defaultValue: '2021-01-01', + type: { + name: "String" + } + } +}; +export const apiVersion12: msRest.OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + required: true, + isConstant: true, + serializedName: "api-version", + defaultValue: '2021-06-01', + type: { + name: "String" + } + } +}; +export const apiVersion13: msRest.OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + required: true, + isConstant: true, + serializedName: "api-version", + defaultValue: '2021-01-15-preview', + type: { + name: "String" + } + } +}; +export const apiVersion14: msRest.OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + required: true, + isConstant: true, + serializedName: "api-version", + defaultValue: '2021-05-01-preview', + type: { + name: "String" + } + } +}; export const apiVersion2: msRest.OperationQueryParameter = { parameterPath: "apiVersion", mapper: { @@ -202,6 +273,16 @@ export const apiVersion8: msRest.OperationQueryParameter = { } } }; +export const apiVersion9: msRest.OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + required: true, + serializedName: "api-version", + type: { + name: "String" + } + } +}; export const ascLocation: msRest.OperationURLParameter = { parameterPath: "ascLocation", mapper: { @@ -232,18 +313,6 @@ export const assessmentName: msRest.OperationURLParameter = { } } }; -export const autoDismissRuleName: msRest.OperationQueryParameter = { - parameterPath: [ - "options", - "autoDismissRuleName" - ], - mapper: { - serializedName: "autoDismissRuleName", - type: { - name: "String" - } - } -}; export const automationName: msRest.OperationURLParameter = { parameterPath: "automationName", mapper: { @@ -274,6 +343,18 @@ export const complianceResultName: msRest.OperationURLParameter = { } } }; +export const compromisedEntity: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "compromisedEntity" + ], + mapper: { + serializedName: "compromisedEntity", + type: { + name: "String" + } + } +}; export const connectionType: msRest.OperationURLParameter = { parameterPath: "connectionType", mapper: { @@ -284,6 +365,50 @@ export const connectionType: msRest.OperationURLParameter = { } } }; +export const connectorName: msRest.OperationURLParameter = { + parameterPath: "connectorName", + mapper: { + required: true, + serializedName: "connectorName", + type: { + name: "String" + } + } +}; +export const deviceId0: msRest.OperationURLParameter = { + parameterPath: "deviceId", + mapper: { + required: true, + serializedName: "deviceId", + type: { + name: "String" + } + } +}; +export const deviceId1: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "deviceId" + ], + mapper: { + serializedName: "deviceId", + type: { + name: "String" + } + } +}; +export const deviceManagementType: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "deviceManagementType" + ], + mapper: { + serializedName: "deviceManagementType", + type: { + name: "String" + } + } +}; export const deviceSecurityGroupName: msRest.OperationURLParameter = { parameterPath: "deviceSecurityGroupName", mapper: { @@ -370,6 +495,66 @@ export const informationProtectionPolicyName: msRest.OperationURLParameter = { } } }; +export const ingestionSettingName: msRest.OperationURLParameter = { + parameterPath: "ingestionSettingName", + mapper: { + required: true, + serializedName: "ingestionSettingName", + type: { + name: "String" + } + } +}; +export const iotAlertId: msRest.OperationURLParameter = { + parameterPath: "iotAlertId", + mapper: { + required: true, + serializedName: "iotAlertId", + type: { + name: "String" + } + } +}; +export const iotAlertTypeName: msRest.OperationURLParameter = { + parameterPath: "iotAlertTypeName", + mapper: { + required: true, + serializedName: "iotAlertTypeName", + type: { + name: "String" + } + } +}; +export const iotRecommendationId: msRest.OperationURLParameter = { + parameterPath: "iotRecommendationId", + mapper: { + required: true, + serializedName: "iotRecommendationId", + type: { + name: "String" + } + } +}; +export const iotRecommendationTypeName: msRest.OperationURLParameter = { + parameterPath: "iotRecommendationTypeName", + mapper: { + required: true, + serializedName: "iotRecommendationTypeName", + type: { + name: "String" + } + } +}; +export const iotSensorName: msRest.OperationURLParameter = { + parameterPath: "iotSensorName", + mapper: { + required: true, + serializedName: "iotSensorName", + type: { + name: "String" + } + } +}; export const jitNetworkAccessPolicyInitiateType: msRest.OperationURLParameter = { parameterPath: "jitNetworkAccessPolicyInitiateType", mapper: { @@ -392,6 +577,42 @@ export const jitNetworkAccessPolicyName: msRest.OperationURLParameter = { } } }; +export const limit: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "limit" + ], + mapper: { + serializedName: "$limit", + type: { + name: "Number" + } + } +}; +export const maxStartTimeUtc: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "maxStartTimeUtc" + ], + mapper: { + serializedName: "startTimeUtc<", + type: { + name: "String" + } + } +}; +export const minStartTimeUtc: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "minStartTimeUtc" + ], + mapper: { + serializedName: "startTimeUtc>", + type: { + name: "String" + } + } +}; export const nextPageLink: msRest.OperationURLParameter = { parameterPath: "nextPageLink", mapper: { @@ -403,6 +624,16 @@ export const nextPageLink: msRest.OperationURLParameter = { }, skipEncoding: true }; +export const onPremiseIotSensorName: msRest.OperationURLParameter = { + parameterPath: "onPremiseIotSensorName", + mapper: { + required: true, + serializedName: "onPremiseIotSensorName", + type: { + name: "String" + } + } +}; export const pricingName: msRest.OperationURLParameter = { parameterPath: "pricingName", mapper: { @@ -413,6 +644,18 @@ export const pricingName: msRest.OperationURLParameter = { } } }; +export const recommendationType: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "recommendationType" + ], + mapper: { + serializedName: "recommendationType", + type: { + name: "String" + } + } +}; export const regulatoryComplianceAssessmentName: msRest.OperationURLParameter = { parameterPath: "regulatoryComplianceAssessmentName", mapper: { @@ -466,7 +709,8 @@ export const resourceId: msRest.OperationURLParameter = { type: { name: "String" } - } + }, + skipEncoding: true }; export const resourceName: msRest.OperationURLParameter = { parameterPath: "resourceName", @@ -498,6 +742,36 @@ export const resourceType: msRest.OperationURLParameter = { } } }; +export const ruleId: msRest.OperationURLParameter = { + parameterPath: "ruleId", + mapper: { + required: true, + serializedName: "ruleId", + type: { + name: "String" + } + } +}; +export const scanId: msRest.OperationURLParameter = { + parameterPath: "scanId", + mapper: { + required: true, + serializedName: "scanId", + type: { + name: "String" + } + } +}; +export const scanResultId: msRest.OperationURLParameter = { + parameterPath: "scanResultId", + mapper: { + required: true, + serializedName: "scanResultId", + type: { + name: "String" + } + } +}; export const scope: msRest.OperationURLParameter = { parameterPath: "scope", mapper: { @@ -506,7 +780,8 @@ export const scope: msRest.OperationURLParameter = { type: { name: "String" } - } + }, + skipEncoding: true }; export const secureScoreName: msRest.OperationURLParameter = { parameterPath: "secureScoreName", @@ -528,13 +803,11 @@ export const securityContactName: msRest.OperationURLParameter = { } } }; -export const select: msRest.OperationQueryParameter = { - parameterPath: [ - "options", - "select" - ], +export const securitySolutionName: msRest.OperationURLParameter = { + parameterPath: "securitySolutionName", mapper: { - serializedName: "$select", + required: true, + serializedName: "securitySolutionName", type: { name: "String" } @@ -556,7 +829,9 @@ export const settingName0: msRest.OperationURLParameter = { parameterPath: "settingName", mapper: { required: true, + isConstant: true, serializedName: "settingName", + defaultValue: 'current', type: { name: "String" } @@ -566,9 +841,29 @@ export const settingName1: msRest.OperationURLParameter = { parameterPath: "settingName", mapper: { required: true, - isConstant: true, serializedName: "settingName", - defaultValue: 'current', + type: { + name: "String" + } + } +}; +export const skipToken: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "skipToken" + ], + mapper: { + serializedName: "$skipToken", + type: { + name: "String" + } + } +}; +export const softwareName: msRest.OperationURLParameter = { + parameterPath: "softwareName", + mapper: { + required: true, + serializedName: "softwareName", type: { name: "String" } @@ -661,6 +956,16 @@ export const topologyResourceName: msRest.OperationURLParameter = { } } }; +export const workspaceId: msRest.OperationQueryParameter = { + parameterPath: "workspaceId", + mapper: { + required: true, + serializedName: "workspaceId", + type: { + name: "String" + } + } +}; export const workspaceSettingName: msRest.OperationURLParameter = { parameterPath: "workspaceSettingName", mapper: { diff --git a/sdk/security/arm-security/src/models/pricingsMappers.ts b/sdk/security/arm-security/src/models/pricingsMappers.ts index 8c0b7e2f63d0..cd5b9ba52653 100644 --- a/sdk/security/arm-security/src/models/pricingsMappers.ts +++ b/sdk/security/arm-security/src/models/pricingsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -13,9 +13,9 @@ export { AdditionalData, AdvancedThreatProtectionSetting, Alert, - AlertConfidenceReason, AlertEntity, AlertsSuppressionRule, + AlertSyncSettings, AllowlistCustomAlertRule, AmqpC2DMessagesNotInAllowedRange, AmqpC2DRejectedMessagesNotInAllowedRange, @@ -23,54 +23,92 @@ export { AscLocation, AssessmentLinks, AssessmentStatus, + AuthenticationDetailsProperties, AutoProvisioningSetting, + AwAssumeRoleAuthenticationDetailsProperties, + AwsCredsAuthenticationDetailsProperties, AzureResourceDetails, + AzureResourceIdentifier, AzureResourceLink, + Baseline, + BaselineAdjustedResult, BaseResource, + BenchmarkReference, CloudError, Compliance, ComplianceResult, ComplianceSegment, + ConnectionFromIpNotAllowed, ConnectionToIpNotAllowed, + ConnectorSetting, ContainerRegistryVulnerabilityProperties, CustomAlertRule, CVE, CVSS, DataExportSettings, DenylistCustomAlertRule, + Device, DeviceSecurityGroup, DirectMethodInvokesNotInAllowedRange, EffectiveNetworkSecurityGroups, FailedLocalLoginsNotInAllowedRange, FileUploadsNotInAllowedRange, + Firmware, + GcpCredentialsDetailsProperties, HttpC2DMessagesNotInAllowedRange, HttpC2DRejectedMessagesNotInAllowedRange, HttpD2CMessagesNotInAllowedRange, + HybridComputeSettingsProperties, InformationProtectionKeyword, InformationProtectionPolicy, InformationType, + IngestionSetting, + IotAlertModel, + IotAlertType, + IotDefenderSettingsModel, + IotRecommendationModel, + IotRecommendationType, IoTSecurityAlertedDevice, IoTSecurityDeviceAlert, IoTSecurityDeviceRecommendation, IoTSecuritySolutionAnalyticsModel, IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IotSensorsModel, IoTSeverityMetrics, + IotSitesModel, + IpAddress, ListCustomAlertRule, LocalUserNotAllowed, + LogAnalyticsIdentifier, + MacAddress, MqttC2DMessagesNotInAllowedRange, MqttC2DRejectedMessagesNotInAllowedRange, MqttD2CMessagesNotInAllowedRange, + NetworkInterface, + OnPremiseIotSensor, OnPremiseResourceDetails, + OnPremiseSqlResourceDetails, Pricing, PricingList, ProcessNotAllowed, + Protocol1, + ProxyServerProperties, + QueryCheck, QueuePurgesNotInAllowedRange, RegulatoryComplianceAssessment, RegulatoryComplianceControl, RegulatoryComplianceStandard, + Remediation, Resource, ResourceDetails, + ResourceIdentifier, Rule, + RuleResults, + RuleResultsProperties, + Scan, + ScanProperties, + ScanResult, + ScanResultProperties, ScopeElement, SecureScoreControlDefinitionItem, SecureScoreControlDefinitionSource, @@ -86,10 +124,13 @@ export { SecurityTask, SecurityTaskParameters, SensitivityLabel, + Sensor, ServerVulnerabilityAssessment, ServerVulnerabilityProperties, + ServicePrincipalProperties, Setting, - SettingResource, + Site, + Software, SqlServerVulnerabilityProperties, SubAssessmentStatus, SuppressionAlertsScope, @@ -97,6 +138,7 @@ export { TimeWindowCustomAlertRule, TwinUpdatesNotInAllowedRange, UnauthorizedOperationsNotInAllowedRange, + VaRule, VendorReference, WorkspaceSetting } from "../models/mappers"; diff --git a/sdk/security/arm-security/src/models/regulatoryComplianceAssessmentsMappers.ts b/sdk/security/arm-security/src/models/regulatoryComplianceAssessmentsMappers.ts index e7b0eb8c1f54..2aa52938afb9 100644 --- a/sdk/security/arm-security/src/models/regulatoryComplianceAssessmentsMappers.ts +++ b/sdk/security/arm-security/src/models/regulatoryComplianceAssessmentsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -13,9 +13,9 @@ export { AdditionalData, AdvancedThreatProtectionSetting, Alert, - AlertConfidenceReason, AlertEntity, AlertsSuppressionRule, + AlertSyncSettings, AllowlistCustomAlertRule, AmqpC2DMessagesNotInAllowedRange, AmqpC2DRejectedMessagesNotInAllowedRange, @@ -23,54 +23,92 @@ export { AscLocation, AssessmentLinks, AssessmentStatus, + AuthenticationDetailsProperties, AutoProvisioningSetting, + AwAssumeRoleAuthenticationDetailsProperties, + AwsCredsAuthenticationDetailsProperties, AzureResourceDetails, + AzureResourceIdentifier, AzureResourceLink, + Baseline, + BaselineAdjustedResult, BaseResource, + BenchmarkReference, CloudError, Compliance, ComplianceResult, ComplianceSegment, + ConnectionFromIpNotAllowed, ConnectionToIpNotAllowed, + ConnectorSetting, ContainerRegistryVulnerabilityProperties, CustomAlertRule, CVE, CVSS, DataExportSettings, DenylistCustomAlertRule, + Device, DeviceSecurityGroup, DirectMethodInvokesNotInAllowedRange, EffectiveNetworkSecurityGroups, FailedLocalLoginsNotInAllowedRange, FileUploadsNotInAllowedRange, + Firmware, + GcpCredentialsDetailsProperties, HttpC2DMessagesNotInAllowedRange, HttpC2DRejectedMessagesNotInAllowedRange, HttpD2CMessagesNotInAllowedRange, + HybridComputeSettingsProperties, InformationProtectionKeyword, InformationProtectionPolicy, InformationType, + IngestionSetting, + IotAlertModel, + IotAlertType, + IotDefenderSettingsModel, + IotRecommendationModel, + IotRecommendationType, IoTSecurityAlertedDevice, IoTSecurityDeviceAlert, IoTSecurityDeviceRecommendation, IoTSecuritySolutionAnalyticsModel, IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IotSensorsModel, IoTSeverityMetrics, + IotSitesModel, + IpAddress, ListCustomAlertRule, LocalUserNotAllowed, + LogAnalyticsIdentifier, + MacAddress, MqttC2DMessagesNotInAllowedRange, MqttC2DRejectedMessagesNotInAllowedRange, MqttD2CMessagesNotInAllowedRange, + NetworkInterface, + OnPremiseIotSensor, OnPremiseResourceDetails, + OnPremiseSqlResourceDetails, Pricing, ProcessNotAllowed, + Protocol1, + ProxyServerProperties, + QueryCheck, QueuePurgesNotInAllowedRange, RegulatoryComplianceAssessment, RegulatoryComplianceAssessmentList, RegulatoryComplianceControl, RegulatoryComplianceStandard, + Remediation, Resource, ResourceDetails, + ResourceIdentifier, Rule, + RuleResults, + RuleResultsProperties, + Scan, + ScanProperties, + ScanResult, + ScanResultProperties, ScopeElement, SecureScoreControlDefinitionItem, SecureScoreControlDefinitionSource, @@ -86,10 +124,13 @@ export { SecurityTask, SecurityTaskParameters, SensitivityLabel, + Sensor, ServerVulnerabilityAssessment, ServerVulnerabilityProperties, + ServicePrincipalProperties, Setting, - SettingResource, + Site, + Software, SqlServerVulnerabilityProperties, SubAssessmentStatus, SuppressionAlertsScope, @@ -97,6 +138,7 @@ export { TimeWindowCustomAlertRule, TwinUpdatesNotInAllowedRange, UnauthorizedOperationsNotInAllowedRange, + VaRule, VendorReference, WorkspaceSetting } from "../models/mappers"; diff --git a/sdk/security/arm-security/src/models/regulatoryComplianceControlsMappers.ts b/sdk/security/arm-security/src/models/regulatoryComplianceControlsMappers.ts index 4317808f4caa..9b546318a0fb 100644 --- a/sdk/security/arm-security/src/models/regulatoryComplianceControlsMappers.ts +++ b/sdk/security/arm-security/src/models/regulatoryComplianceControlsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -13,9 +13,9 @@ export { AdditionalData, AdvancedThreatProtectionSetting, Alert, - AlertConfidenceReason, AlertEntity, AlertsSuppressionRule, + AlertSyncSettings, AllowlistCustomAlertRule, AmqpC2DMessagesNotInAllowedRange, AmqpC2DRejectedMessagesNotInAllowedRange, @@ -23,54 +23,92 @@ export { AscLocation, AssessmentLinks, AssessmentStatus, + AuthenticationDetailsProperties, AutoProvisioningSetting, + AwAssumeRoleAuthenticationDetailsProperties, + AwsCredsAuthenticationDetailsProperties, AzureResourceDetails, + AzureResourceIdentifier, AzureResourceLink, + Baseline, + BaselineAdjustedResult, BaseResource, + BenchmarkReference, CloudError, Compliance, ComplianceResult, ComplianceSegment, + ConnectionFromIpNotAllowed, ConnectionToIpNotAllowed, + ConnectorSetting, ContainerRegistryVulnerabilityProperties, CustomAlertRule, CVE, CVSS, DataExportSettings, DenylistCustomAlertRule, + Device, DeviceSecurityGroup, DirectMethodInvokesNotInAllowedRange, EffectiveNetworkSecurityGroups, FailedLocalLoginsNotInAllowedRange, FileUploadsNotInAllowedRange, + Firmware, + GcpCredentialsDetailsProperties, HttpC2DMessagesNotInAllowedRange, HttpC2DRejectedMessagesNotInAllowedRange, HttpD2CMessagesNotInAllowedRange, + HybridComputeSettingsProperties, InformationProtectionKeyword, InformationProtectionPolicy, InformationType, + IngestionSetting, + IotAlertModel, + IotAlertType, + IotDefenderSettingsModel, + IotRecommendationModel, + IotRecommendationType, IoTSecurityAlertedDevice, IoTSecurityDeviceAlert, IoTSecurityDeviceRecommendation, IoTSecuritySolutionAnalyticsModel, IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IotSensorsModel, IoTSeverityMetrics, + IotSitesModel, + IpAddress, ListCustomAlertRule, LocalUserNotAllowed, + LogAnalyticsIdentifier, + MacAddress, MqttC2DMessagesNotInAllowedRange, MqttC2DRejectedMessagesNotInAllowedRange, MqttD2CMessagesNotInAllowedRange, + NetworkInterface, + OnPremiseIotSensor, OnPremiseResourceDetails, + OnPremiseSqlResourceDetails, Pricing, ProcessNotAllowed, + Protocol1, + ProxyServerProperties, + QueryCheck, QueuePurgesNotInAllowedRange, RegulatoryComplianceAssessment, RegulatoryComplianceControl, RegulatoryComplianceControlList, RegulatoryComplianceStandard, + Remediation, Resource, ResourceDetails, + ResourceIdentifier, Rule, + RuleResults, + RuleResultsProperties, + Scan, + ScanProperties, + ScanResult, + ScanResultProperties, ScopeElement, SecureScoreControlDefinitionItem, SecureScoreControlDefinitionSource, @@ -86,10 +124,13 @@ export { SecurityTask, SecurityTaskParameters, SensitivityLabel, + Sensor, ServerVulnerabilityAssessment, ServerVulnerabilityProperties, + ServicePrincipalProperties, Setting, - SettingResource, + Site, + Software, SqlServerVulnerabilityProperties, SubAssessmentStatus, SuppressionAlertsScope, @@ -97,6 +138,7 @@ export { TimeWindowCustomAlertRule, TwinUpdatesNotInAllowedRange, UnauthorizedOperationsNotInAllowedRange, + VaRule, VendorReference, WorkspaceSetting } from "../models/mappers"; diff --git a/sdk/security/arm-security/src/models/regulatoryComplianceStandardsMappers.ts b/sdk/security/arm-security/src/models/regulatoryComplianceStandardsMappers.ts index 55f0fb2e32a0..f71c9be427e1 100644 --- a/sdk/security/arm-security/src/models/regulatoryComplianceStandardsMappers.ts +++ b/sdk/security/arm-security/src/models/regulatoryComplianceStandardsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -13,9 +13,9 @@ export { AdditionalData, AdvancedThreatProtectionSetting, Alert, - AlertConfidenceReason, AlertEntity, AlertsSuppressionRule, + AlertSyncSettings, AllowlistCustomAlertRule, AmqpC2DMessagesNotInAllowedRange, AmqpC2DRejectedMessagesNotInAllowedRange, @@ -23,54 +23,92 @@ export { AscLocation, AssessmentLinks, AssessmentStatus, + AuthenticationDetailsProperties, AutoProvisioningSetting, + AwAssumeRoleAuthenticationDetailsProperties, + AwsCredsAuthenticationDetailsProperties, AzureResourceDetails, + AzureResourceIdentifier, AzureResourceLink, + Baseline, + BaselineAdjustedResult, BaseResource, + BenchmarkReference, CloudError, Compliance, ComplianceResult, ComplianceSegment, + ConnectionFromIpNotAllowed, ConnectionToIpNotAllowed, + ConnectorSetting, ContainerRegistryVulnerabilityProperties, CustomAlertRule, CVE, CVSS, DataExportSettings, DenylistCustomAlertRule, + Device, DeviceSecurityGroup, DirectMethodInvokesNotInAllowedRange, EffectiveNetworkSecurityGroups, FailedLocalLoginsNotInAllowedRange, FileUploadsNotInAllowedRange, + Firmware, + GcpCredentialsDetailsProperties, HttpC2DMessagesNotInAllowedRange, HttpC2DRejectedMessagesNotInAllowedRange, HttpD2CMessagesNotInAllowedRange, + HybridComputeSettingsProperties, InformationProtectionKeyword, InformationProtectionPolicy, InformationType, + IngestionSetting, + IotAlertModel, + IotAlertType, + IotDefenderSettingsModel, + IotRecommendationModel, + IotRecommendationType, IoTSecurityAlertedDevice, IoTSecurityDeviceAlert, IoTSecurityDeviceRecommendation, IoTSecuritySolutionAnalyticsModel, IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IotSensorsModel, IoTSeverityMetrics, + IotSitesModel, + IpAddress, ListCustomAlertRule, LocalUserNotAllowed, + LogAnalyticsIdentifier, + MacAddress, MqttC2DMessagesNotInAllowedRange, MqttC2DRejectedMessagesNotInAllowedRange, MqttD2CMessagesNotInAllowedRange, + NetworkInterface, + OnPremiseIotSensor, OnPremiseResourceDetails, + OnPremiseSqlResourceDetails, Pricing, ProcessNotAllowed, + Protocol1, + ProxyServerProperties, + QueryCheck, QueuePurgesNotInAllowedRange, RegulatoryComplianceAssessment, RegulatoryComplianceControl, RegulatoryComplianceStandard, RegulatoryComplianceStandardList, + Remediation, Resource, ResourceDetails, + ResourceIdentifier, Rule, + RuleResults, + RuleResultsProperties, + Scan, + ScanProperties, + ScanResult, + ScanResultProperties, ScopeElement, SecureScoreControlDefinitionItem, SecureScoreControlDefinitionSource, @@ -86,10 +124,13 @@ export { SecurityTask, SecurityTaskParameters, SensitivityLabel, + Sensor, ServerVulnerabilityAssessment, ServerVulnerabilityProperties, + ServicePrincipalProperties, Setting, - SettingResource, + Site, + Software, SqlServerVulnerabilityProperties, SubAssessmentStatus, SuppressionAlertsScope, @@ -97,6 +138,7 @@ export { TimeWindowCustomAlertRule, TwinUpdatesNotInAllowedRange, UnauthorizedOperationsNotInAllowedRange, + VaRule, VendorReference, WorkspaceSetting } from "../models/mappers"; diff --git a/sdk/security/arm-security/src/models/secureScoreControlDefinitionsMappers.ts b/sdk/security/arm-security/src/models/secureScoreControlDefinitionsMappers.ts index be7137baa179..ccfb073559a9 100644 --- a/sdk/security/arm-security/src/models/secureScoreControlDefinitionsMappers.ts +++ b/sdk/security/arm-security/src/models/secureScoreControlDefinitionsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -13,9 +13,9 @@ export { AdditionalData, AdvancedThreatProtectionSetting, Alert, - AlertConfidenceReason, AlertEntity, AlertsSuppressionRule, + AlertSyncSettings, AllowlistCustomAlertRule, AmqpC2DMessagesNotInAllowedRange, AmqpC2DRejectedMessagesNotInAllowedRange, @@ -23,53 +23,91 @@ export { AscLocation, AssessmentLinks, AssessmentStatus, + AuthenticationDetailsProperties, AutoProvisioningSetting, + AwAssumeRoleAuthenticationDetailsProperties, + AwsCredsAuthenticationDetailsProperties, AzureResourceDetails, + AzureResourceIdentifier, AzureResourceLink, + Baseline, + BaselineAdjustedResult, BaseResource, + BenchmarkReference, CloudError, Compliance, ComplianceResult, ComplianceSegment, + ConnectionFromIpNotAllowed, ConnectionToIpNotAllowed, + ConnectorSetting, ContainerRegistryVulnerabilityProperties, CustomAlertRule, CVE, CVSS, DataExportSettings, DenylistCustomAlertRule, + Device, DeviceSecurityGroup, DirectMethodInvokesNotInAllowedRange, EffectiveNetworkSecurityGroups, FailedLocalLoginsNotInAllowedRange, FileUploadsNotInAllowedRange, + Firmware, + GcpCredentialsDetailsProperties, HttpC2DMessagesNotInAllowedRange, HttpC2DRejectedMessagesNotInAllowedRange, HttpD2CMessagesNotInAllowedRange, + HybridComputeSettingsProperties, InformationProtectionKeyword, InformationProtectionPolicy, InformationType, + IngestionSetting, + IotAlertModel, + IotAlertType, + IotDefenderSettingsModel, + IotRecommendationModel, + IotRecommendationType, IoTSecurityAlertedDevice, IoTSecurityDeviceAlert, IoTSecurityDeviceRecommendation, IoTSecuritySolutionAnalyticsModel, IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IotSensorsModel, IoTSeverityMetrics, + IotSitesModel, + IpAddress, ListCustomAlertRule, LocalUserNotAllowed, + LogAnalyticsIdentifier, + MacAddress, MqttC2DMessagesNotInAllowedRange, MqttC2DRejectedMessagesNotInAllowedRange, MqttD2CMessagesNotInAllowedRange, + NetworkInterface, + OnPremiseIotSensor, OnPremiseResourceDetails, + OnPremiseSqlResourceDetails, Pricing, ProcessNotAllowed, + Protocol1, + ProxyServerProperties, + QueryCheck, QueuePurgesNotInAllowedRange, RegulatoryComplianceAssessment, RegulatoryComplianceControl, RegulatoryComplianceStandard, + Remediation, Resource, ResourceDetails, + ResourceIdentifier, Rule, + RuleResults, + RuleResultsProperties, + Scan, + ScanProperties, + ScanResult, + ScanResultProperties, ScopeElement, SecureScoreControlDefinitionItem, SecureScoreControlDefinitionList, @@ -86,10 +124,13 @@ export { SecurityTask, SecurityTaskParameters, SensitivityLabel, + Sensor, ServerVulnerabilityAssessment, ServerVulnerabilityProperties, + ServicePrincipalProperties, Setting, - SettingResource, + Site, + Software, SqlServerVulnerabilityProperties, SubAssessmentStatus, SuppressionAlertsScope, @@ -97,6 +138,7 @@ export { TimeWindowCustomAlertRule, TwinUpdatesNotInAllowedRange, UnauthorizedOperationsNotInAllowedRange, + VaRule, VendorReference, WorkspaceSetting } from "../models/mappers"; diff --git a/sdk/security/arm-security/src/models/secureScoreControlsMappers.ts b/sdk/security/arm-security/src/models/secureScoreControlsMappers.ts index 95ef07ed4ed6..18831f247670 100644 --- a/sdk/security/arm-security/src/models/secureScoreControlsMappers.ts +++ b/sdk/security/arm-security/src/models/secureScoreControlsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -13,9 +13,9 @@ export { AdditionalData, AdvancedThreatProtectionSetting, Alert, - AlertConfidenceReason, AlertEntity, AlertsSuppressionRule, + AlertSyncSettings, AllowlistCustomAlertRule, AmqpC2DMessagesNotInAllowedRange, AmqpC2DRejectedMessagesNotInAllowedRange, @@ -23,53 +23,91 @@ export { AscLocation, AssessmentLinks, AssessmentStatus, + AuthenticationDetailsProperties, AutoProvisioningSetting, + AwAssumeRoleAuthenticationDetailsProperties, + AwsCredsAuthenticationDetailsProperties, AzureResourceDetails, + AzureResourceIdentifier, AzureResourceLink, + Baseline, + BaselineAdjustedResult, BaseResource, + BenchmarkReference, CloudError, Compliance, ComplianceResult, ComplianceSegment, + ConnectionFromIpNotAllowed, ConnectionToIpNotAllowed, + ConnectorSetting, ContainerRegistryVulnerabilityProperties, CustomAlertRule, CVE, CVSS, DataExportSettings, DenylistCustomAlertRule, + Device, DeviceSecurityGroup, DirectMethodInvokesNotInAllowedRange, EffectiveNetworkSecurityGroups, FailedLocalLoginsNotInAllowedRange, FileUploadsNotInAllowedRange, + Firmware, + GcpCredentialsDetailsProperties, HttpC2DMessagesNotInAllowedRange, HttpC2DRejectedMessagesNotInAllowedRange, HttpD2CMessagesNotInAllowedRange, + HybridComputeSettingsProperties, InformationProtectionKeyword, InformationProtectionPolicy, InformationType, + IngestionSetting, + IotAlertModel, + IotAlertType, + IotDefenderSettingsModel, + IotRecommendationModel, + IotRecommendationType, IoTSecurityAlertedDevice, IoTSecurityDeviceAlert, IoTSecurityDeviceRecommendation, IoTSecuritySolutionAnalyticsModel, IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IotSensorsModel, IoTSeverityMetrics, + IotSitesModel, + IpAddress, ListCustomAlertRule, LocalUserNotAllowed, + LogAnalyticsIdentifier, + MacAddress, MqttC2DMessagesNotInAllowedRange, MqttC2DRejectedMessagesNotInAllowedRange, MqttD2CMessagesNotInAllowedRange, + NetworkInterface, + OnPremiseIotSensor, OnPremiseResourceDetails, + OnPremiseSqlResourceDetails, Pricing, ProcessNotAllowed, + Protocol1, + ProxyServerProperties, + QueryCheck, QueuePurgesNotInAllowedRange, RegulatoryComplianceAssessment, RegulatoryComplianceControl, RegulatoryComplianceStandard, + Remediation, Resource, ResourceDetails, + ResourceIdentifier, Rule, + RuleResults, + RuleResultsProperties, + Scan, + ScanProperties, + ScanResult, + ScanResultProperties, ScopeElement, SecureScoreControlDefinitionItem, SecureScoreControlDefinitionSource, @@ -86,10 +124,13 @@ export { SecurityTask, SecurityTaskParameters, SensitivityLabel, + Sensor, ServerVulnerabilityAssessment, ServerVulnerabilityProperties, + ServicePrincipalProperties, Setting, - SettingResource, + Site, + Software, SqlServerVulnerabilityProperties, SubAssessmentStatus, SuppressionAlertsScope, @@ -97,6 +138,7 @@ export { TimeWindowCustomAlertRule, TwinUpdatesNotInAllowedRange, UnauthorizedOperationsNotInAllowedRange, + VaRule, VendorReference, WorkspaceSetting } from "../models/mappers"; diff --git a/sdk/security/arm-security/src/models/secureScoresMappers.ts b/sdk/security/arm-security/src/models/secureScoresMappers.ts index fad75d0ee288..7a8e2e4fe3e6 100644 --- a/sdk/security/arm-security/src/models/secureScoresMappers.ts +++ b/sdk/security/arm-security/src/models/secureScoresMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -13,9 +13,9 @@ export { AdditionalData, AdvancedThreatProtectionSetting, Alert, - AlertConfidenceReason, AlertEntity, AlertsSuppressionRule, + AlertSyncSettings, AllowlistCustomAlertRule, AmqpC2DMessagesNotInAllowedRange, AmqpC2DRejectedMessagesNotInAllowedRange, @@ -23,53 +23,91 @@ export { AscLocation, AssessmentLinks, AssessmentStatus, + AuthenticationDetailsProperties, AutoProvisioningSetting, + AwAssumeRoleAuthenticationDetailsProperties, + AwsCredsAuthenticationDetailsProperties, AzureResourceDetails, + AzureResourceIdentifier, AzureResourceLink, + Baseline, + BaselineAdjustedResult, BaseResource, + BenchmarkReference, CloudError, Compliance, ComplianceResult, ComplianceSegment, + ConnectionFromIpNotAllowed, ConnectionToIpNotAllowed, + ConnectorSetting, ContainerRegistryVulnerabilityProperties, CustomAlertRule, CVE, CVSS, DataExportSettings, DenylistCustomAlertRule, + Device, DeviceSecurityGroup, DirectMethodInvokesNotInAllowedRange, EffectiveNetworkSecurityGroups, FailedLocalLoginsNotInAllowedRange, FileUploadsNotInAllowedRange, + Firmware, + GcpCredentialsDetailsProperties, HttpC2DMessagesNotInAllowedRange, HttpC2DRejectedMessagesNotInAllowedRange, HttpD2CMessagesNotInAllowedRange, + HybridComputeSettingsProperties, InformationProtectionKeyword, InformationProtectionPolicy, InformationType, + IngestionSetting, + IotAlertModel, + IotAlertType, + IotDefenderSettingsModel, + IotRecommendationModel, + IotRecommendationType, IoTSecurityAlertedDevice, IoTSecurityDeviceAlert, IoTSecurityDeviceRecommendation, IoTSecuritySolutionAnalyticsModel, IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IotSensorsModel, IoTSeverityMetrics, + IotSitesModel, + IpAddress, ListCustomAlertRule, LocalUserNotAllowed, + LogAnalyticsIdentifier, + MacAddress, MqttC2DMessagesNotInAllowedRange, MqttC2DRejectedMessagesNotInAllowedRange, MqttD2CMessagesNotInAllowedRange, + NetworkInterface, + OnPremiseIotSensor, OnPremiseResourceDetails, + OnPremiseSqlResourceDetails, Pricing, ProcessNotAllowed, + Protocol1, + ProxyServerProperties, + QueryCheck, QueuePurgesNotInAllowedRange, RegulatoryComplianceAssessment, RegulatoryComplianceControl, RegulatoryComplianceStandard, + Remediation, Resource, ResourceDetails, + ResourceIdentifier, Rule, + RuleResults, + RuleResultsProperties, + Scan, + ScanProperties, + ScanResult, + ScanResultProperties, ScopeElement, SecureScoreControlDefinitionItem, SecureScoreControlDefinitionSource, @@ -86,10 +124,13 @@ export { SecurityTask, SecurityTaskParameters, SensitivityLabel, + Sensor, ServerVulnerabilityAssessment, ServerVulnerabilityProperties, + ServicePrincipalProperties, Setting, - SettingResource, + Site, + Software, SqlServerVulnerabilityProperties, SubAssessmentStatus, SuppressionAlertsScope, @@ -97,6 +138,7 @@ export { TimeWindowCustomAlertRule, TwinUpdatesNotInAllowedRange, UnauthorizedOperationsNotInAllowedRange, + VaRule, VendorReference, WorkspaceSetting } from "../models/mappers"; diff --git a/sdk/security/arm-security/src/models/securityContactsMappers.ts b/sdk/security/arm-security/src/models/securityContactsMappers.ts index c55eb989a1e5..d65ed7c3ecf5 100644 --- a/sdk/security/arm-security/src/models/securityContactsMappers.ts +++ b/sdk/security/arm-security/src/models/securityContactsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -13,9 +13,9 @@ export { AdditionalData, AdvancedThreatProtectionSetting, Alert, - AlertConfidenceReason, AlertEntity, AlertsSuppressionRule, + AlertSyncSettings, AllowlistCustomAlertRule, AmqpC2DMessagesNotInAllowedRange, AmqpC2DRejectedMessagesNotInAllowedRange, @@ -23,53 +23,91 @@ export { AscLocation, AssessmentLinks, AssessmentStatus, + AuthenticationDetailsProperties, AutoProvisioningSetting, + AwAssumeRoleAuthenticationDetailsProperties, + AwsCredsAuthenticationDetailsProperties, AzureResourceDetails, + AzureResourceIdentifier, AzureResourceLink, + Baseline, + BaselineAdjustedResult, BaseResource, + BenchmarkReference, CloudError, Compliance, ComplianceResult, ComplianceSegment, + ConnectionFromIpNotAllowed, ConnectionToIpNotAllowed, + ConnectorSetting, ContainerRegistryVulnerabilityProperties, CustomAlertRule, CVE, CVSS, DataExportSettings, DenylistCustomAlertRule, + Device, DeviceSecurityGroup, DirectMethodInvokesNotInAllowedRange, EffectiveNetworkSecurityGroups, FailedLocalLoginsNotInAllowedRange, FileUploadsNotInAllowedRange, + Firmware, + GcpCredentialsDetailsProperties, HttpC2DMessagesNotInAllowedRange, HttpC2DRejectedMessagesNotInAllowedRange, HttpD2CMessagesNotInAllowedRange, + HybridComputeSettingsProperties, InformationProtectionKeyword, InformationProtectionPolicy, InformationType, + IngestionSetting, + IotAlertModel, + IotAlertType, + IotDefenderSettingsModel, + IotRecommendationModel, + IotRecommendationType, IoTSecurityAlertedDevice, IoTSecurityDeviceAlert, IoTSecurityDeviceRecommendation, IoTSecuritySolutionAnalyticsModel, IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IotSensorsModel, IoTSeverityMetrics, + IotSitesModel, + IpAddress, ListCustomAlertRule, LocalUserNotAllowed, + LogAnalyticsIdentifier, + MacAddress, MqttC2DMessagesNotInAllowedRange, MqttC2DRejectedMessagesNotInAllowedRange, MqttD2CMessagesNotInAllowedRange, + NetworkInterface, + OnPremiseIotSensor, OnPremiseResourceDetails, + OnPremiseSqlResourceDetails, Pricing, ProcessNotAllowed, + Protocol1, + ProxyServerProperties, + QueryCheck, QueuePurgesNotInAllowedRange, RegulatoryComplianceAssessment, RegulatoryComplianceControl, RegulatoryComplianceStandard, + Remediation, Resource, ResourceDetails, + ResourceIdentifier, Rule, + RuleResults, + RuleResultsProperties, + Scan, + ScanProperties, + ScanResult, + ScanResultProperties, ScopeElement, SecureScoreControlDefinitionItem, SecureScoreControlDefinitionSource, @@ -86,10 +124,13 @@ export { SecurityTask, SecurityTaskParameters, SensitivityLabel, + Sensor, ServerVulnerabilityAssessment, ServerVulnerabilityProperties, + ServicePrincipalProperties, Setting, - SettingResource, + Site, + Software, SqlServerVulnerabilityProperties, SubAssessmentStatus, SuppressionAlertsScope, @@ -97,6 +138,7 @@ export { TimeWindowCustomAlertRule, TwinUpdatesNotInAllowedRange, UnauthorizedOperationsNotInAllowedRange, + VaRule, VendorReference, WorkspaceSetting } from "../models/mappers"; diff --git a/sdk/security/arm-security/src/models/securitySolutionsMappers.ts b/sdk/security/arm-security/src/models/securitySolutionsMappers.ts new file mode 100644 index 000000000000..fd2d20d72cfd --- /dev/null +++ b/sdk/security/arm-security/src/models/securitySolutionsMappers.ts @@ -0,0 +1,14 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + CloudError, + SecuritySolution, + SecuritySolutionList +} from "../models/mappers"; diff --git a/sdk/security/arm-security/src/models/securitySolutionsReferenceDataOperationsMappers.ts b/sdk/security/arm-security/src/models/securitySolutionsReferenceDataOperationsMappers.ts new file mode 100644 index 000000000000..67198c4e8267 --- /dev/null +++ b/sdk/security/arm-security/src/models/securitySolutionsReferenceDataOperationsMappers.ts @@ -0,0 +1,14 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + CloudError, + SecuritySolutionsReferenceData, + SecuritySolutionsReferenceDataList +} from "../models/mappers"; diff --git a/sdk/security/arm-security/src/models/serverVulnerabilityAssessmentOperationsMappers.ts b/sdk/security/arm-security/src/models/serverVulnerabilityAssessmentOperationsMappers.ts index 6b1483809d9b..3c9889a7549e 100644 --- a/sdk/security/arm-security/src/models/serverVulnerabilityAssessmentOperationsMappers.ts +++ b/sdk/security/arm-security/src/models/serverVulnerabilityAssessmentOperationsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -13,9 +13,9 @@ export { AdditionalData, AdvancedThreatProtectionSetting, Alert, - AlertConfidenceReason, AlertEntity, AlertsSuppressionRule, + AlertSyncSettings, AllowlistCustomAlertRule, AmqpC2DMessagesNotInAllowedRange, AmqpC2DRejectedMessagesNotInAllowedRange, @@ -23,53 +23,91 @@ export { AscLocation, AssessmentLinks, AssessmentStatus, + AuthenticationDetailsProperties, AutoProvisioningSetting, + AwAssumeRoleAuthenticationDetailsProperties, + AwsCredsAuthenticationDetailsProperties, AzureResourceDetails, + AzureResourceIdentifier, AzureResourceLink, + Baseline, + BaselineAdjustedResult, BaseResource, + BenchmarkReference, CloudError, Compliance, ComplianceResult, ComplianceSegment, + ConnectionFromIpNotAllowed, ConnectionToIpNotAllowed, + ConnectorSetting, ContainerRegistryVulnerabilityProperties, CustomAlertRule, CVE, CVSS, DataExportSettings, DenylistCustomAlertRule, + Device, DeviceSecurityGroup, DirectMethodInvokesNotInAllowedRange, EffectiveNetworkSecurityGroups, FailedLocalLoginsNotInAllowedRange, FileUploadsNotInAllowedRange, + Firmware, + GcpCredentialsDetailsProperties, HttpC2DMessagesNotInAllowedRange, HttpC2DRejectedMessagesNotInAllowedRange, HttpD2CMessagesNotInAllowedRange, + HybridComputeSettingsProperties, InformationProtectionKeyword, InformationProtectionPolicy, InformationType, + IngestionSetting, + IotAlertModel, + IotAlertType, + IotDefenderSettingsModel, + IotRecommendationModel, + IotRecommendationType, IoTSecurityAlertedDevice, IoTSecurityDeviceAlert, IoTSecurityDeviceRecommendation, IoTSecuritySolutionAnalyticsModel, IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IotSensorsModel, IoTSeverityMetrics, + IotSitesModel, + IpAddress, ListCustomAlertRule, LocalUserNotAllowed, + LogAnalyticsIdentifier, + MacAddress, MqttC2DMessagesNotInAllowedRange, MqttC2DRejectedMessagesNotInAllowedRange, MqttD2CMessagesNotInAllowedRange, + NetworkInterface, + OnPremiseIotSensor, OnPremiseResourceDetails, + OnPremiseSqlResourceDetails, Pricing, ProcessNotAllowed, + Protocol1, + ProxyServerProperties, + QueryCheck, QueuePurgesNotInAllowedRange, RegulatoryComplianceAssessment, RegulatoryComplianceControl, RegulatoryComplianceStandard, + Remediation, Resource, ResourceDetails, + ResourceIdentifier, Rule, + RuleResults, + RuleResultsProperties, + Scan, + ScanProperties, + ScanResult, + ScanResultProperties, ScopeElement, SecureScoreControlDefinitionItem, SecureScoreControlDefinitionSource, @@ -85,11 +123,14 @@ export { SecurityTask, SecurityTaskParameters, SensitivityLabel, + Sensor, ServerVulnerabilityAssessment, ServerVulnerabilityAssessmentsList, ServerVulnerabilityProperties, + ServicePrincipalProperties, Setting, - SettingResource, + Site, + Software, SqlServerVulnerabilityProperties, SubAssessmentStatus, SuppressionAlertsScope, @@ -97,6 +138,7 @@ export { TimeWindowCustomAlertRule, TwinUpdatesNotInAllowedRange, UnauthorizedOperationsNotInAllowedRange, + VaRule, VendorReference, WorkspaceSetting } from "../models/mappers"; diff --git a/sdk/security/arm-security/src/models/settingsMappers.ts b/sdk/security/arm-security/src/models/settingsMappers.ts index 9f1dbb8616d5..01ab7cffadc7 100644 --- a/sdk/security/arm-security/src/models/settingsMappers.ts +++ b/sdk/security/arm-security/src/models/settingsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -13,9 +13,9 @@ export { AdditionalData, AdvancedThreatProtectionSetting, Alert, - AlertConfidenceReason, AlertEntity, AlertsSuppressionRule, + AlertSyncSettings, AllowlistCustomAlertRule, AmqpC2DMessagesNotInAllowedRange, AmqpC2DRejectedMessagesNotInAllowedRange, @@ -23,53 +23,91 @@ export { AscLocation, AssessmentLinks, AssessmentStatus, + AuthenticationDetailsProperties, AutoProvisioningSetting, + AwAssumeRoleAuthenticationDetailsProperties, + AwsCredsAuthenticationDetailsProperties, AzureResourceDetails, + AzureResourceIdentifier, AzureResourceLink, + Baseline, + BaselineAdjustedResult, BaseResource, + BenchmarkReference, CloudError, Compliance, ComplianceResult, ComplianceSegment, + ConnectionFromIpNotAllowed, ConnectionToIpNotAllowed, + ConnectorSetting, ContainerRegistryVulnerabilityProperties, CustomAlertRule, CVE, CVSS, DataExportSettings, DenylistCustomAlertRule, + Device, DeviceSecurityGroup, DirectMethodInvokesNotInAllowedRange, EffectiveNetworkSecurityGroups, FailedLocalLoginsNotInAllowedRange, FileUploadsNotInAllowedRange, + Firmware, + GcpCredentialsDetailsProperties, HttpC2DMessagesNotInAllowedRange, HttpC2DRejectedMessagesNotInAllowedRange, HttpD2CMessagesNotInAllowedRange, + HybridComputeSettingsProperties, InformationProtectionKeyword, InformationProtectionPolicy, InformationType, + IngestionSetting, + IotAlertModel, + IotAlertType, + IotDefenderSettingsModel, + IotRecommendationModel, + IotRecommendationType, IoTSecurityAlertedDevice, IoTSecurityDeviceAlert, IoTSecurityDeviceRecommendation, IoTSecuritySolutionAnalyticsModel, IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IotSensorsModel, IoTSeverityMetrics, + IotSitesModel, + IpAddress, ListCustomAlertRule, LocalUserNotAllowed, + LogAnalyticsIdentifier, + MacAddress, MqttC2DMessagesNotInAllowedRange, MqttC2DRejectedMessagesNotInAllowedRange, MqttD2CMessagesNotInAllowedRange, + NetworkInterface, + OnPremiseIotSensor, OnPremiseResourceDetails, + OnPremiseSqlResourceDetails, Pricing, ProcessNotAllowed, + Protocol1, + ProxyServerProperties, + QueryCheck, QueuePurgesNotInAllowedRange, RegulatoryComplianceAssessment, RegulatoryComplianceControl, RegulatoryComplianceStandard, + Remediation, Resource, ResourceDetails, + ResourceIdentifier, Rule, + RuleResults, + RuleResultsProperties, + Scan, + ScanProperties, + ScanResult, + ScanResultProperties, ScopeElement, SecureScoreControlDefinitionItem, SecureScoreControlDefinitionSource, @@ -85,11 +123,14 @@ export { SecurityTask, SecurityTaskParameters, SensitivityLabel, + Sensor, ServerVulnerabilityAssessment, ServerVulnerabilityProperties, + ServicePrincipalProperties, Setting, - SettingResource, SettingsList, + Site, + Software, SqlServerVulnerabilityProperties, SubAssessmentStatus, SuppressionAlertsScope, @@ -97,6 +138,7 @@ export { TimeWindowCustomAlertRule, TwinUpdatesNotInAllowedRange, UnauthorizedOperationsNotInAllowedRange, + VaRule, VendorReference, WorkspaceSetting } from "../models/mappers"; diff --git a/sdk/security/arm-security/src/models/softwareInventoriesMappers.ts b/sdk/security/arm-security/src/models/softwareInventoriesMappers.ts new file mode 100644 index 000000000000..16d53638fabd --- /dev/null +++ b/sdk/security/arm-security/src/models/softwareInventoriesMappers.ts @@ -0,0 +1,144 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + ActiveConnectionsNotInAllowedRange, + AdaptiveNetworkHardening, + AdditionalData, + AdvancedThreatProtectionSetting, + Alert, + AlertEntity, + AlertsSuppressionRule, + AlertSyncSettings, + AllowlistCustomAlertRule, + AmqpC2DMessagesNotInAllowedRange, + AmqpC2DRejectedMessagesNotInAllowedRange, + AmqpD2CMessagesNotInAllowedRange, + AscLocation, + AssessmentLinks, + AssessmentStatus, + AuthenticationDetailsProperties, + AutoProvisioningSetting, + AwAssumeRoleAuthenticationDetailsProperties, + AwsCredsAuthenticationDetailsProperties, + AzureResourceDetails, + AzureResourceIdentifier, + AzureResourceLink, + Baseline, + BaselineAdjustedResult, + BaseResource, + BenchmarkReference, + CloudError, + Compliance, + ComplianceResult, + ComplianceSegment, + ConnectionFromIpNotAllowed, + ConnectionToIpNotAllowed, + ConnectorSetting, + ContainerRegistryVulnerabilityProperties, + CustomAlertRule, + CVE, + CVSS, + DataExportSettings, + DenylistCustomAlertRule, + Device, + DeviceSecurityGroup, + DirectMethodInvokesNotInAllowedRange, + EffectiveNetworkSecurityGroups, + FailedLocalLoginsNotInAllowedRange, + FileUploadsNotInAllowedRange, + Firmware, + GcpCredentialsDetailsProperties, + HttpC2DMessagesNotInAllowedRange, + HttpC2DRejectedMessagesNotInAllowedRange, + HttpD2CMessagesNotInAllowedRange, + HybridComputeSettingsProperties, + InformationProtectionKeyword, + InformationProtectionPolicy, + InformationType, + IngestionSetting, + IotAlertModel, + IotAlertType, + IotDefenderSettingsModel, + IotRecommendationModel, + IotRecommendationType, + IoTSecurityAlertedDevice, + IoTSecurityDeviceAlert, + IoTSecurityDeviceRecommendation, + IoTSecuritySolutionAnalyticsModel, + IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IotSensorsModel, + IoTSeverityMetrics, + IotSitesModel, + IpAddress, + ListCustomAlertRule, + LocalUserNotAllowed, + LogAnalyticsIdentifier, + MacAddress, + MqttC2DMessagesNotInAllowedRange, + MqttC2DRejectedMessagesNotInAllowedRange, + MqttD2CMessagesNotInAllowedRange, + NetworkInterface, + OnPremiseIotSensor, + OnPremiseResourceDetails, + OnPremiseSqlResourceDetails, + Pricing, + ProcessNotAllowed, + Protocol1, + ProxyServerProperties, + QueryCheck, + QueuePurgesNotInAllowedRange, + RegulatoryComplianceAssessment, + RegulatoryComplianceControl, + RegulatoryComplianceStandard, + Remediation, + Resource, + ResourceDetails, + ResourceIdentifier, + Rule, + RuleResults, + RuleResultsProperties, + Scan, + ScanProperties, + ScanResult, + ScanResultProperties, + ScopeElement, + SecureScoreControlDefinitionItem, + SecureScoreControlDefinitionSource, + SecureScoreControlDetails, + SecureScoreItem, + SecurityAssessment, + SecurityAssessmentMetadata, + SecurityAssessmentMetadataPartnerData, + SecurityAssessmentMetadataProperties, + SecurityAssessmentPartnerData, + SecurityContact, + SecuritySubAssessment, + SecurityTask, + SecurityTaskParameters, + SensitivityLabel, + Sensor, + ServerVulnerabilityAssessment, + ServerVulnerabilityProperties, + ServicePrincipalProperties, + Setting, + Site, + Software, + SoftwaresList, + SqlServerVulnerabilityProperties, + SubAssessmentStatus, + SuppressionAlertsScope, + ThresholdCustomAlertRule, + TimeWindowCustomAlertRule, + TwinUpdatesNotInAllowedRange, + UnauthorizedOperationsNotInAllowedRange, + VaRule, + VendorReference, + WorkspaceSetting +} from "../models/mappers"; diff --git a/sdk/security/arm-security/src/models/sqlVulnerabilityAssessmentBaselineRulesMappers.ts b/sdk/security/arm-security/src/models/sqlVulnerabilityAssessmentBaselineRulesMappers.ts new file mode 100644 index 000000000000..ffa9771f7eb8 --- /dev/null +++ b/sdk/security/arm-security/src/models/sqlVulnerabilityAssessmentBaselineRulesMappers.ts @@ -0,0 +1,146 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + ActiveConnectionsNotInAllowedRange, + AdaptiveNetworkHardening, + AdditionalData, + AdvancedThreatProtectionSetting, + Alert, + AlertEntity, + AlertsSuppressionRule, + AlertSyncSettings, + AllowlistCustomAlertRule, + AmqpC2DMessagesNotInAllowedRange, + AmqpC2DRejectedMessagesNotInAllowedRange, + AmqpD2CMessagesNotInAllowedRange, + AscLocation, + AssessmentLinks, + AssessmentStatus, + AuthenticationDetailsProperties, + AutoProvisioningSetting, + AwAssumeRoleAuthenticationDetailsProperties, + AwsCredsAuthenticationDetailsProperties, + AzureResourceDetails, + AzureResourceIdentifier, + AzureResourceLink, + Baseline, + BaselineAdjustedResult, + BaseResource, + BenchmarkReference, + CloudError, + Compliance, + ComplianceResult, + ComplianceSegment, + ConnectionFromIpNotAllowed, + ConnectionToIpNotAllowed, + ConnectorSetting, + ContainerRegistryVulnerabilityProperties, + CustomAlertRule, + CVE, + CVSS, + DataExportSettings, + DenylistCustomAlertRule, + Device, + DeviceSecurityGroup, + DirectMethodInvokesNotInAllowedRange, + EffectiveNetworkSecurityGroups, + FailedLocalLoginsNotInAllowedRange, + FileUploadsNotInAllowedRange, + Firmware, + GcpCredentialsDetailsProperties, + HttpC2DMessagesNotInAllowedRange, + HttpC2DRejectedMessagesNotInAllowedRange, + HttpD2CMessagesNotInAllowedRange, + HybridComputeSettingsProperties, + InformationProtectionKeyword, + InformationProtectionPolicy, + InformationType, + IngestionSetting, + IotAlertModel, + IotAlertType, + IotDefenderSettingsModel, + IotRecommendationModel, + IotRecommendationType, + IoTSecurityAlertedDevice, + IoTSecurityDeviceAlert, + IoTSecurityDeviceRecommendation, + IoTSecuritySolutionAnalyticsModel, + IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IotSensorsModel, + IoTSeverityMetrics, + IotSitesModel, + IpAddress, + ListCustomAlertRule, + LocalUserNotAllowed, + LogAnalyticsIdentifier, + MacAddress, + MqttC2DMessagesNotInAllowedRange, + MqttC2DRejectedMessagesNotInAllowedRange, + MqttD2CMessagesNotInAllowedRange, + NetworkInterface, + OnPremiseIotSensor, + OnPremiseResourceDetails, + OnPremiseSqlResourceDetails, + Pricing, + ProcessNotAllowed, + Protocol1, + ProxyServerProperties, + QueryCheck, + QueuePurgesNotInAllowedRange, + RegulatoryComplianceAssessment, + RegulatoryComplianceControl, + RegulatoryComplianceStandard, + Remediation, + Resource, + ResourceDetails, + ResourceIdentifier, + Rule, + RuleResults, + RuleResultsInput, + RuleResultsProperties, + RulesResults, + RulesResultsInput, + Scan, + ScanProperties, + ScanResult, + ScanResultProperties, + ScopeElement, + SecureScoreControlDefinitionItem, + SecureScoreControlDefinitionSource, + SecureScoreControlDetails, + SecureScoreItem, + SecurityAssessment, + SecurityAssessmentMetadata, + SecurityAssessmentMetadataPartnerData, + SecurityAssessmentMetadataProperties, + SecurityAssessmentPartnerData, + SecurityContact, + SecuritySubAssessment, + SecurityTask, + SecurityTaskParameters, + SensitivityLabel, + Sensor, + ServerVulnerabilityAssessment, + ServerVulnerabilityProperties, + ServicePrincipalProperties, + Setting, + Site, + Software, + SqlServerVulnerabilityProperties, + SubAssessmentStatus, + SuppressionAlertsScope, + ThresholdCustomAlertRule, + TimeWindowCustomAlertRule, + TwinUpdatesNotInAllowedRange, + UnauthorizedOperationsNotInAllowedRange, + VaRule, + VendorReference, + WorkspaceSetting +} from "../models/mappers"; diff --git a/sdk/security/arm-security/src/models/sqlVulnerabilityAssessmentScanResultsMappers.ts b/sdk/security/arm-security/src/models/sqlVulnerabilityAssessmentScanResultsMappers.ts new file mode 100644 index 000000000000..e410464eff2a --- /dev/null +++ b/sdk/security/arm-security/src/models/sqlVulnerabilityAssessmentScanResultsMappers.ts @@ -0,0 +1,144 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + ActiveConnectionsNotInAllowedRange, + AdaptiveNetworkHardening, + AdditionalData, + AdvancedThreatProtectionSetting, + Alert, + AlertEntity, + AlertsSuppressionRule, + AlertSyncSettings, + AllowlistCustomAlertRule, + AmqpC2DMessagesNotInAllowedRange, + AmqpC2DRejectedMessagesNotInAllowedRange, + AmqpD2CMessagesNotInAllowedRange, + AscLocation, + AssessmentLinks, + AssessmentStatus, + AuthenticationDetailsProperties, + AutoProvisioningSetting, + AwAssumeRoleAuthenticationDetailsProperties, + AwsCredsAuthenticationDetailsProperties, + AzureResourceDetails, + AzureResourceIdentifier, + AzureResourceLink, + Baseline, + BaselineAdjustedResult, + BaseResource, + BenchmarkReference, + CloudError, + Compliance, + ComplianceResult, + ComplianceSegment, + ConnectionFromIpNotAllowed, + ConnectionToIpNotAllowed, + ConnectorSetting, + ContainerRegistryVulnerabilityProperties, + CustomAlertRule, + CVE, + CVSS, + DataExportSettings, + DenylistCustomAlertRule, + Device, + DeviceSecurityGroup, + DirectMethodInvokesNotInAllowedRange, + EffectiveNetworkSecurityGroups, + FailedLocalLoginsNotInAllowedRange, + FileUploadsNotInAllowedRange, + Firmware, + GcpCredentialsDetailsProperties, + HttpC2DMessagesNotInAllowedRange, + HttpC2DRejectedMessagesNotInAllowedRange, + HttpD2CMessagesNotInAllowedRange, + HybridComputeSettingsProperties, + InformationProtectionKeyword, + InformationProtectionPolicy, + InformationType, + IngestionSetting, + IotAlertModel, + IotAlertType, + IotDefenderSettingsModel, + IotRecommendationModel, + IotRecommendationType, + IoTSecurityAlertedDevice, + IoTSecurityDeviceAlert, + IoTSecurityDeviceRecommendation, + IoTSecuritySolutionAnalyticsModel, + IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IotSensorsModel, + IoTSeverityMetrics, + IotSitesModel, + IpAddress, + ListCustomAlertRule, + LocalUserNotAllowed, + LogAnalyticsIdentifier, + MacAddress, + MqttC2DMessagesNotInAllowedRange, + MqttC2DRejectedMessagesNotInAllowedRange, + MqttD2CMessagesNotInAllowedRange, + NetworkInterface, + OnPremiseIotSensor, + OnPremiseResourceDetails, + OnPremiseSqlResourceDetails, + Pricing, + ProcessNotAllowed, + Protocol1, + ProxyServerProperties, + QueryCheck, + QueuePurgesNotInAllowedRange, + RegulatoryComplianceAssessment, + RegulatoryComplianceControl, + RegulatoryComplianceStandard, + Remediation, + Resource, + ResourceDetails, + ResourceIdentifier, + Rule, + RuleResults, + RuleResultsProperties, + Scan, + ScanProperties, + ScanResult, + ScanResultProperties, + ScanResults, + ScopeElement, + SecureScoreControlDefinitionItem, + SecureScoreControlDefinitionSource, + SecureScoreControlDetails, + SecureScoreItem, + SecurityAssessment, + SecurityAssessmentMetadata, + SecurityAssessmentMetadataPartnerData, + SecurityAssessmentMetadataProperties, + SecurityAssessmentPartnerData, + SecurityContact, + SecuritySubAssessment, + SecurityTask, + SecurityTaskParameters, + SensitivityLabel, + Sensor, + ServerVulnerabilityAssessment, + ServerVulnerabilityProperties, + ServicePrincipalProperties, + Setting, + Site, + Software, + SqlServerVulnerabilityProperties, + SubAssessmentStatus, + SuppressionAlertsScope, + ThresholdCustomAlertRule, + TimeWindowCustomAlertRule, + TwinUpdatesNotInAllowedRange, + UnauthorizedOperationsNotInAllowedRange, + VaRule, + VendorReference, + WorkspaceSetting +} from "../models/mappers"; diff --git a/sdk/security/arm-security/src/models/sqlVulnerabilityAssessmentScansMappers.ts b/sdk/security/arm-security/src/models/sqlVulnerabilityAssessmentScansMappers.ts new file mode 100644 index 000000000000..ffc403e3625a --- /dev/null +++ b/sdk/security/arm-security/src/models/sqlVulnerabilityAssessmentScansMappers.ts @@ -0,0 +1,144 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + ActiveConnectionsNotInAllowedRange, + AdaptiveNetworkHardening, + AdditionalData, + AdvancedThreatProtectionSetting, + Alert, + AlertEntity, + AlertsSuppressionRule, + AlertSyncSettings, + AllowlistCustomAlertRule, + AmqpC2DMessagesNotInAllowedRange, + AmqpC2DRejectedMessagesNotInAllowedRange, + AmqpD2CMessagesNotInAllowedRange, + AscLocation, + AssessmentLinks, + AssessmentStatus, + AuthenticationDetailsProperties, + AutoProvisioningSetting, + AwAssumeRoleAuthenticationDetailsProperties, + AwsCredsAuthenticationDetailsProperties, + AzureResourceDetails, + AzureResourceIdentifier, + AzureResourceLink, + Baseline, + BaselineAdjustedResult, + BaseResource, + BenchmarkReference, + CloudError, + Compliance, + ComplianceResult, + ComplianceSegment, + ConnectionFromIpNotAllowed, + ConnectionToIpNotAllowed, + ConnectorSetting, + ContainerRegistryVulnerabilityProperties, + CustomAlertRule, + CVE, + CVSS, + DataExportSettings, + DenylistCustomAlertRule, + Device, + DeviceSecurityGroup, + DirectMethodInvokesNotInAllowedRange, + EffectiveNetworkSecurityGroups, + FailedLocalLoginsNotInAllowedRange, + FileUploadsNotInAllowedRange, + Firmware, + GcpCredentialsDetailsProperties, + HttpC2DMessagesNotInAllowedRange, + HttpC2DRejectedMessagesNotInAllowedRange, + HttpD2CMessagesNotInAllowedRange, + HybridComputeSettingsProperties, + InformationProtectionKeyword, + InformationProtectionPolicy, + InformationType, + IngestionSetting, + IotAlertModel, + IotAlertType, + IotDefenderSettingsModel, + IotRecommendationModel, + IotRecommendationType, + IoTSecurityAlertedDevice, + IoTSecurityDeviceAlert, + IoTSecurityDeviceRecommendation, + IoTSecuritySolutionAnalyticsModel, + IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IotSensorsModel, + IoTSeverityMetrics, + IotSitesModel, + IpAddress, + ListCustomAlertRule, + LocalUserNotAllowed, + LogAnalyticsIdentifier, + MacAddress, + MqttC2DMessagesNotInAllowedRange, + MqttC2DRejectedMessagesNotInAllowedRange, + MqttD2CMessagesNotInAllowedRange, + NetworkInterface, + OnPremiseIotSensor, + OnPremiseResourceDetails, + OnPremiseSqlResourceDetails, + Pricing, + ProcessNotAllowed, + Protocol1, + ProxyServerProperties, + QueryCheck, + QueuePurgesNotInAllowedRange, + RegulatoryComplianceAssessment, + RegulatoryComplianceControl, + RegulatoryComplianceStandard, + Remediation, + Resource, + ResourceDetails, + ResourceIdentifier, + Rule, + RuleResults, + RuleResultsProperties, + Scan, + ScanProperties, + ScanResult, + ScanResultProperties, + Scans, + ScopeElement, + SecureScoreControlDefinitionItem, + SecureScoreControlDefinitionSource, + SecureScoreControlDetails, + SecureScoreItem, + SecurityAssessment, + SecurityAssessmentMetadata, + SecurityAssessmentMetadataPartnerData, + SecurityAssessmentMetadataProperties, + SecurityAssessmentPartnerData, + SecurityContact, + SecuritySubAssessment, + SecurityTask, + SecurityTaskParameters, + SensitivityLabel, + Sensor, + ServerVulnerabilityAssessment, + ServerVulnerabilityProperties, + ServicePrincipalProperties, + Setting, + Site, + Software, + SqlServerVulnerabilityProperties, + SubAssessmentStatus, + SuppressionAlertsScope, + ThresholdCustomAlertRule, + TimeWindowCustomAlertRule, + TwinUpdatesNotInAllowedRange, + UnauthorizedOperationsNotInAllowedRange, + VaRule, + VendorReference, + WorkspaceSetting +} from "../models/mappers"; diff --git a/sdk/security/arm-security/src/models/subAssessmentsMappers.ts b/sdk/security/arm-security/src/models/subAssessmentsMappers.ts index fb7d8ae47902..5e4c6901a101 100644 --- a/sdk/security/arm-security/src/models/subAssessmentsMappers.ts +++ b/sdk/security/arm-security/src/models/subAssessmentsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -13,9 +13,9 @@ export { AdditionalData, AdvancedThreatProtectionSetting, Alert, - AlertConfidenceReason, AlertEntity, AlertsSuppressionRule, + AlertSyncSettings, AllowlistCustomAlertRule, AmqpC2DMessagesNotInAllowedRange, AmqpC2DRejectedMessagesNotInAllowedRange, @@ -23,53 +23,91 @@ export { AscLocation, AssessmentLinks, AssessmentStatus, + AuthenticationDetailsProperties, AutoProvisioningSetting, + AwAssumeRoleAuthenticationDetailsProperties, + AwsCredsAuthenticationDetailsProperties, AzureResourceDetails, + AzureResourceIdentifier, AzureResourceLink, + Baseline, + BaselineAdjustedResult, BaseResource, + BenchmarkReference, CloudError, Compliance, ComplianceResult, ComplianceSegment, + ConnectionFromIpNotAllowed, ConnectionToIpNotAllowed, + ConnectorSetting, ContainerRegistryVulnerabilityProperties, CustomAlertRule, CVE, CVSS, DataExportSettings, DenylistCustomAlertRule, + Device, DeviceSecurityGroup, DirectMethodInvokesNotInAllowedRange, EffectiveNetworkSecurityGroups, FailedLocalLoginsNotInAllowedRange, FileUploadsNotInAllowedRange, + Firmware, + GcpCredentialsDetailsProperties, HttpC2DMessagesNotInAllowedRange, HttpC2DRejectedMessagesNotInAllowedRange, HttpD2CMessagesNotInAllowedRange, + HybridComputeSettingsProperties, InformationProtectionKeyword, InformationProtectionPolicy, InformationType, + IngestionSetting, + IotAlertModel, + IotAlertType, + IotDefenderSettingsModel, + IotRecommendationModel, + IotRecommendationType, IoTSecurityAlertedDevice, IoTSecurityDeviceAlert, IoTSecurityDeviceRecommendation, IoTSecuritySolutionAnalyticsModel, IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IotSensorsModel, IoTSeverityMetrics, + IotSitesModel, + IpAddress, ListCustomAlertRule, LocalUserNotAllowed, + LogAnalyticsIdentifier, + MacAddress, MqttC2DMessagesNotInAllowedRange, MqttC2DRejectedMessagesNotInAllowedRange, MqttD2CMessagesNotInAllowedRange, + NetworkInterface, + OnPremiseIotSensor, OnPremiseResourceDetails, + OnPremiseSqlResourceDetails, Pricing, ProcessNotAllowed, + Protocol1, + ProxyServerProperties, + QueryCheck, QueuePurgesNotInAllowedRange, RegulatoryComplianceAssessment, RegulatoryComplianceControl, RegulatoryComplianceStandard, + Remediation, Resource, ResourceDetails, + ResourceIdentifier, Rule, + RuleResults, + RuleResultsProperties, + Scan, + ScanProperties, + ScanResult, + ScanResultProperties, ScopeElement, SecureScoreControlDefinitionItem, SecureScoreControlDefinitionSource, @@ -86,10 +124,13 @@ export { SecurityTask, SecurityTaskParameters, SensitivityLabel, + Sensor, ServerVulnerabilityAssessment, ServerVulnerabilityProperties, + ServicePrincipalProperties, Setting, - SettingResource, + Site, + Software, SqlServerVulnerabilityProperties, SubAssessmentStatus, SuppressionAlertsScope, @@ -97,6 +138,7 @@ export { TimeWindowCustomAlertRule, TwinUpdatesNotInAllowedRange, UnauthorizedOperationsNotInAllowedRange, + VaRule, VendorReference, WorkspaceSetting } from "../models/mappers"; diff --git a/sdk/security/arm-security/src/models/tasksMappers.ts b/sdk/security/arm-security/src/models/tasksMappers.ts index b286ef7f5251..1f079e13f684 100644 --- a/sdk/security/arm-security/src/models/tasksMappers.ts +++ b/sdk/security/arm-security/src/models/tasksMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -13,9 +13,9 @@ export { AdditionalData, AdvancedThreatProtectionSetting, Alert, - AlertConfidenceReason, AlertEntity, AlertsSuppressionRule, + AlertSyncSettings, AllowlistCustomAlertRule, AmqpC2DMessagesNotInAllowedRange, AmqpC2DRejectedMessagesNotInAllowedRange, @@ -23,53 +23,91 @@ export { AscLocation, AssessmentLinks, AssessmentStatus, + AuthenticationDetailsProperties, AutoProvisioningSetting, + AwAssumeRoleAuthenticationDetailsProperties, + AwsCredsAuthenticationDetailsProperties, AzureResourceDetails, + AzureResourceIdentifier, AzureResourceLink, + Baseline, + BaselineAdjustedResult, BaseResource, + BenchmarkReference, CloudError, Compliance, ComplianceResult, ComplianceSegment, + ConnectionFromIpNotAllowed, ConnectionToIpNotAllowed, + ConnectorSetting, ContainerRegistryVulnerabilityProperties, CustomAlertRule, CVE, CVSS, DataExportSettings, DenylistCustomAlertRule, + Device, DeviceSecurityGroup, DirectMethodInvokesNotInAllowedRange, EffectiveNetworkSecurityGroups, FailedLocalLoginsNotInAllowedRange, FileUploadsNotInAllowedRange, + Firmware, + GcpCredentialsDetailsProperties, HttpC2DMessagesNotInAllowedRange, HttpC2DRejectedMessagesNotInAllowedRange, HttpD2CMessagesNotInAllowedRange, + HybridComputeSettingsProperties, InformationProtectionKeyword, InformationProtectionPolicy, InformationType, + IngestionSetting, + IotAlertModel, + IotAlertType, + IotDefenderSettingsModel, + IotRecommendationModel, + IotRecommendationType, IoTSecurityAlertedDevice, IoTSecurityDeviceAlert, IoTSecurityDeviceRecommendation, IoTSecuritySolutionAnalyticsModel, IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IotSensorsModel, IoTSeverityMetrics, + IotSitesModel, + IpAddress, ListCustomAlertRule, LocalUserNotAllowed, + LogAnalyticsIdentifier, + MacAddress, MqttC2DMessagesNotInAllowedRange, MqttC2DRejectedMessagesNotInAllowedRange, MqttD2CMessagesNotInAllowedRange, + NetworkInterface, + OnPremiseIotSensor, OnPremiseResourceDetails, + OnPremiseSqlResourceDetails, Pricing, ProcessNotAllowed, + Protocol1, + ProxyServerProperties, + QueryCheck, QueuePurgesNotInAllowedRange, RegulatoryComplianceAssessment, RegulatoryComplianceControl, RegulatoryComplianceStandard, + Remediation, Resource, ResourceDetails, + ResourceIdentifier, Rule, + RuleResults, + RuleResultsProperties, + Scan, + ScanProperties, + ScanResult, + ScanResultProperties, ScopeElement, SecureScoreControlDefinitionItem, SecureScoreControlDefinitionSource, @@ -86,10 +124,13 @@ export { SecurityTaskList, SecurityTaskParameters, SensitivityLabel, + Sensor, ServerVulnerabilityAssessment, ServerVulnerabilityProperties, + ServicePrincipalProperties, Setting, - SettingResource, + Site, + Software, SqlServerVulnerabilityProperties, SubAssessmentStatus, SuppressionAlertsScope, @@ -97,6 +138,7 @@ export { TimeWindowCustomAlertRule, TwinUpdatesNotInAllowedRange, UnauthorizedOperationsNotInAllowedRange, + VaRule, VendorReference, WorkspaceSetting } from "../models/mappers"; diff --git a/sdk/security/arm-security/src/models/topologyMappers.ts b/sdk/security/arm-security/src/models/topologyMappers.ts index 80804dc1264b..e4d48be2f7d0 100644 --- a/sdk/security/arm-security/src/models/topologyMappers.ts +++ b/sdk/security/arm-security/src/models/topologyMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. diff --git a/sdk/security/arm-security/src/models/workspaceSettingsMappers.ts b/sdk/security/arm-security/src/models/workspaceSettingsMappers.ts index 7073a31098ee..15b4b89f160c 100644 --- a/sdk/security/arm-security/src/models/workspaceSettingsMappers.ts +++ b/sdk/security/arm-security/src/models/workspaceSettingsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -13,9 +13,9 @@ export { AdditionalData, AdvancedThreatProtectionSetting, Alert, - AlertConfidenceReason, AlertEntity, AlertsSuppressionRule, + AlertSyncSettings, AllowlistCustomAlertRule, AmqpC2DMessagesNotInAllowedRange, AmqpC2DRejectedMessagesNotInAllowedRange, @@ -23,53 +23,91 @@ export { AscLocation, AssessmentLinks, AssessmentStatus, + AuthenticationDetailsProperties, AutoProvisioningSetting, + AwAssumeRoleAuthenticationDetailsProperties, + AwsCredsAuthenticationDetailsProperties, AzureResourceDetails, + AzureResourceIdentifier, AzureResourceLink, + Baseline, + BaselineAdjustedResult, BaseResource, + BenchmarkReference, CloudError, Compliance, ComplianceResult, ComplianceSegment, + ConnectionFromIpNotAllowed, ConnectionToIpNotAllowed, + ConnectorSetting, ContainerRegistryVulnerabilityProperties, CustomAlertRule, CVE, CVSS, DataExportSettings, DenylistCustomAlertRule, + Device, DeviceSecurityGroup, DirectMethodInvokesNotInAllowedRange, EffectiveNetworkSecurityGroups, FailedLocalLoginsNotInAllowedRange, FileUploadsNotInAllowedRange, + Firmware, + GcpCredentialsDetailsProperties, HttpC2DMessagesNotInAllowedRange, HttpC2DRejectedMessagesNotInAllowedRange, HttpD2CMessagesNotInAllowedRange, + HybridComputeSettingsProperties, InformationProtectionKeyword, InformationProtectionPolicy, InformationType, + IngestionSetting, + IotAlertModel, + IotAlertType, + IotDefenderSettingsModel, + IotRecommendationModel, + IotRecommendationType, IoTSecurityAlertedDevice, IoTSecurityDeviceAlert, IoTSecurityDeviceRecommendation, IoTSecuritySolutionAnalyticsModel, IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IotSensorsModel, IoTSeverityMetrics, + IotSitesModel, + IpAddress, ListCustomAlertRule, LocalUserNotAllowed, + LogAnalyticsIdentifier, + MacAddress, MqttC2DMessagesNotInAllowedRange, MqttC2DRejectedMessagesNotInAllowedRange, MqttD2CMessagesNotInAllowedRange, + NetworkInterface, + OnPremiseIotSensor, OnPremiseResourceDetails, + OnPremiseSqlResourceDetails, Pricing, ProcessNotAllowed, + Protocol1, + ProxyServerProperties, + QueryCheck, QueuePurgesNotInAllowedRange, RegulatoryComplianceAssessment, RegulatoryComplianceControl, RegulatoryComplianceStandard, + Remediation, Resource, ResourceDetails, + ResourceIdentifier, Rule, + RuleResults, + RuleResultsProperties, + Scan, + ScanProperties, + ScanResult, + ScanResultProperties, ScopeElement, SecureScoreControlDefinitionItem, SecureScoreControlDefinitionSource, @@ -85,10 +123,13 @@ export { SecurityTask, SecurityTaskParameters, SensitivityLabel, + Sensor, ServerVulnerabilityAssessment, ServerVulnerabilityProperties, + ServicePrincipalProperties, Setting, - SettingResource, + Site, + Software, SqlServerVulnerabilityProperties, SubAssessmentStatus, SuppressionAlertsScope, @@ -96,6 +137,7 @@ export { TimeWindowCustomAlertRule, TwinUpdatesNotInAllowedRange, UnauthorizedOperationsNotInAllowedRange, + VaRule, VendorReference, WorkspaceSetting, WorkspaceSettingList diff --git a/sdk/security/arm-security/src/operations/adaptiveApplicationControls.ts b/sdk/security/arm-security/src/operations/adaptiveApplicationControls.ts index 8260930d328a..14a11210a0fc 100644 --- a/sdk/security/arm-security/src/operations/adaptiveApplicationControls.ts +++ b/sdk/security/arm-security/src/operations/adaptiveApplicationControls.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -27,7 +26,7 @@ export class AdaptiveApplicationControls { } /** - * Gets a list of application control VM/server groups for the subscription. + * Gets a list of application control machine groups for the subscription. * @param [options] The optional parameters * @returns Promise */ @@ -35,13 +34,13 @@ export class AdaptiveApplicationControls { /** * @param callback The callback */ - list(callback: msRest.ServiceCallback): void; + list(callback: msRest.ServiceCallback): void; /** * @param options The optional parameters * @param callback The callback */ - list(options: Models.AdaptiveApplicationControlsListOptionalParams, callback: msRest.ServiceCallback): void; - list(options?: Models.AdaptiveApplicationControlsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + list(options: Models.AdaptiveApplicationControlsListOptionalParams, callback: msRest.ServiceCallback): void; + list(options?: Models.AdaptiveApplicationControlsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { options @@ -52,23 +51,23 @@ export class AdaptiveApplicationControls { /** * Gets an application control VM/server group. - * @param groupName Name of an application control VM/server group + * @param groupName Name of an application control machine group * @param [options] The optional parameters * @returns Promise */ get(groupName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param groupName Name of an application control VM/server group + * @param groupName Name of an application control machine group * @param callback The callback */ - get(groupName: string, callback: msRest.ServiceCallback): void; + get(groupName: string, callback: msRest.ServiceCallback): void; /** - * @param groupName Name of an application control VM/server group + * @param groupName Name of an application control machine group * @param options The optional parameters * @param callback The callback */ - get(groupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(groupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get(groupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(groupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { groupName, @@ -79,27 +78,27 @@ export class AdaptiveApplicationControls { } /** - * Update an application control VM/server group - * @param groupName Name of an application control VM/server group + * Update an application control machine group + * @param groupName Name of an application control machine group * @param body * @param [options] The optional parameters * @returns Promise */ - put(groupName: string, body: Models.AppWhitelistingGroup, options?: msRest.RequestOptionsBase): Promise; + put(groupName: string, body: Models.AdaptiveApplicationControlGroup, options?: msRest.RequestOptionsBase): Promise; /** - * @param groupName Name of an application control VM/server group + * @param groupName Name of an application control machine group * @param body * @param callback The callback */ - put(groupName: string, body: Models.AppWhitelistingGroup, callback: msRest.ServiceCallback): void; + put(groupName: string, body: Models.AdaptiveApplicationControlGroup, callback: msRest.ServiceCallback): void; /** - * @param groupName Name of an application control VM/server group + * @param groupName Name of an application control machine group * @param body * @param options The optional parameters * @param callback The callback */ - put(groupName: string, body: Models.AppWhitelistingGroup, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - put(groupName: string, body: Models.AppWhitelistingGroup, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + put(groupName: string, body: Models.AdaptiveApplicationControlGroup, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + put(groupName: string, body: Models.AdaptiveApplicationControlGroup, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { groupName, @@ -111,19 +110,19 @@ export class AdaptiveApplicationControls { } /** - * Delete an application control VM/server group - * @param groupName Name of an application control VM/server group + * Delete an application control machine group + * @param groupName Name of an application control machine group * @param [options] The optional parameters * @returns Promise */ deleteMethod(groupName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param groupName Name of an application control VM/server group + * @param groupName Name of an application control machine group * @param callback The callback */ deleteMethod(groupName: string, callback: msRest.ServiceCallback): void; /** - * @param groupName Name of an application control VM/server group + * @param groupName Name of an application control machine group * @param options The optional parameters * @param callback The callback */ @@ -157,7 +156,7 @@ const listOperationSpec: msRest.OperationSpec = { ], responses: { 200: { - bodyMapper: Mappers.AppWhitelistingGroups + bodyMapper: Mappers.AdaptiveApplicationControlGroups }, default: { bodyMapper: Mappers.CloudError @@ -182,7 +181,7 @@ const getOperationSpec: msRest.OperationSpec = { ], responses: { 200: { - bodyMapper: Mappers.AppWhitelistingGroup + bodyMapper: Mappers.AdaptiveApplicationControlGroup }, default: { bodyMapper: Mappers.CloudError @@ -208,13 +207,13 @@ const putOperationSpec: msRest.OperationSpec = { requestBody: { parameterPath: "body", mapper: { - ...Mappers.AppWhitelistingGroup, + ...Mappers.AdaptiveApplicationControlGroup, required: true } }, responses: { 200: { - bodyMapper: Mappers.AppWhitelistingGroup + bodyMapper: Mappers.AdaptiveApplicationControlGroup }, default: { bodyMapper: Mappers.CloudError diff --git a/sdk/security/arm-security/src/operations/adaptiveNetworkHardenings.ts b/sdk/security/arm-security/src/operations/adaptiveNetworkHardenings.ts index c46277aaafee..c4878b87fbf7 100644 --- a/sdk/security/arm-security/src/operations/adaptiveNetworkHardenings.ts +++ b/sdk/security/arm-security/src/operations/adaptiveNetworkHardenings.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -289,6 +288,9 @@ const listByExtendedResourceNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion7 + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/security/arm-security/src/operations/advancedThreatProtection.ts b/sdk/security/arm-security/src/operations/advancedThreatProtection.ts index e46de5f02a25..085123332b48 100644 --- a/sdk/security/arm-security/src/operations/advancedThreatProtection.ts +++ b/sdk/security/arm-security/src/operations/advancedThreatProtection.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -94,7 +93,7 @@ const getOperationSpec: msRest.OperationSpec = { path: "{resourceId}/providers/Microsoft.Security/advancedThreatProtectionSettings/{settingName}", urlParameters: [ Parameters.resourceId, - Parameters.settingName1 + Parameters.settingName0 ], queryParameters: [ Parameters.apiVersion2 @@ -118,7 +117,7 @@ const createOperationSpec: msRest.OperationSpec = { path: "{resourceId}/providers/Microsoft.Security/advancedThreatProtectionSettings/{settingName}", urlParameters: [ Parameters.resourceId, - Parameters.settingName1 + Parameters.settingName0 ], queryParameters: [ Parameters.apiVersion2 diff --git a/sdk/security/arm-security/src/operations/alerts.ts b/sdk/security/arm-security/src/operations/alerts.ts index cff6bc8b0bd5..12abd12e522a 100644 --- a/sdk/security/arm-security/src/operations/alerts.ts +++ b/sdk/security/arm-security/src/operations/alerts.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -9,6 +8,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; import * as Models from "../models"; import * as Mappers from "../models/alertsMappers"; import * as Parameters from "../models/parameters"; @@ -31,7 +31,7 @@ export class Alerts { * @param [options] The optional parameters * @returns Promise */ - list(options?: Models.AlertsListOptionalParams): Promise; + list(options?: msRest.RequestOptionsBase): Promise; /** * @param callback The callback */ @@ -40,8 +40,8 @@ export class Alerts { * @param options The optional parameters * @param callback The callback */ - list(options: Models.AlertsListOptionalParams, callback: msRest.ServiceCallback): void; - list(options?: Models.AlertsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { options @@ -57,7 +57,7 @@ export class Alerts { * @param [options] The optional parameters * @returns Promise */ - listByResourceGroup(resourceGroupName: string, options?: Models.AlertsListByResourceGroupOptionalParams): Promise; + listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName The name of the resource group within the user's subscription. The name * is case insensitive. @@ -70,8 +70,8 @@ export class Alerts { * @param options The optional parameters * @param callback The callback */ - listByResourceGroup(resourceGroupName: string, options: Models.AlertsListByResourceGroupOptionalParams, callback: msRest.ServiceCallback): void; - listByResourceGroup(resourceGroupName: string, options?: Models.AlertsListByResourceGroupOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listByResourceGroup(resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, @@ -85,25 +85,25 @@ export class Alerts { * List all the alerts that are associated with the subscription that are stored in a specific * location * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - listSubscriptionLevelAlertsByRegion(options?: Models.AlertsListSubscriptionLevelAlertsByRegionOptionalParams): Promise; + listSubscriptionLevelByRegion(options?: msRest.RequestOptionsBase): Promise; /** * @param callback The callback */ - listSubscriptionLevelAlertsByRegion(callback: msRest.ServiceCallback): void; + listSubscriptionLevelByRegion(callback: msRest.ServiceCallback): void; /** * @param options The optional parameters * @param callback The callback */ - listSubscriptionLevelAlertsByRegion(options: Models.AlertsListSubscriptionLevelAlertsByRegionOptionalParams, callback: msRest.ServiceCallback): void; - listSubscriptionLevelAlertsByRegion(options?: Models.AlertsListSubscriptionLevelAlertsByRegionOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listSubscriptionLevelByRegion(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listSubscriptionLevelByRegion(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { options }, - listSubscriptionLevelAlertsByRegionOperationSpec, - callback) as Promise; + listSubscriptionLevelByRegionOperationSpec, + callback) as Promise; } /** @@ -112,58 +112,58 @@ export class Alerts { * @param resourceGroupName The name of the resource group within the user's subscription. The name * is case insensitive. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - listResourceGroupLevelAlertsByRegion(resourceGroupName: string, options?: Models.AlertsListResourceGroupLevelAlertsByRegionOptionalParams): Promise; + listResourceGroupLevelByRegion(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName The name of the resource group within the user's subscription. The name * is case insensitive. * @param callback The callback */ - listResourceGroupLevelAlertsByRegion(resourceGroupName: string, callback: msRest.ServiceCallback): void; + listResourceGroupLevelByRegion(resourceGroupName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The name of the resource group within the user's subscription. The name * is case insensitive. * @param options The optional parameters * @param callback The callback */ - listResourceGroupLevelAlertsByRegion(resourceGroupName: string, options: Models.AlertsListResourceGroupLevelAlertsByRegionOptionalParams, callback: msRest.ServiceCallback): void; - listResourceGroupLevelAlertsByRegion(resourceGroupName: string, options?: Models.AlertsListResourceGroupLevelAlertsByRegionOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listResourceGroupLevelByRegion(resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listResourceGroupLevelByRegion(resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, options }, - listResourceGroupLevelAlertsByRegionOperationSpec, - callback) as Promise; + listResourceGroupLevelByRegionOperationSpec, + callback) as Promise; } /** * Get an alert that is associated with a subscription * @param alertName Name of the alert object * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - getSubscriptionLevelAlert(alertName: string, options?: msRest.RequestOptionsBase): Promise; + getSubscriptionLevel(alertName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param alertName Name of the alert object * @param callback The callback */ - getSubscriptionLevelAlert(alertName: string, callback: msRest.ServiceCallback): void; + getSubscriptionLevel(alertName: string, callback: msRest.ServiceCallback): void; /** * @param alertName Name of the alert object * @param options The optional parameters * @param callback The callback */ - getSubscriptionLevelAlert(alertName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getSubscriptionLevelAlert(alertName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + getSubscriptionLevel(alertName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getSubscriptionLevel(alertName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { alertName, options }, - getSubscriptionLevelAlertOperationSpec, - callback) as Promise; + getSubscriptionLevelOperationSpec, + callback) as Promise; } /** @@ -172,16 +172,16 @@ export class Alerts { * @param resourceGroupName The name of the resource group within the user's subscription. The name * is case insensitive. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - getResourceGroupLevelAlerts(alertName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; + getResourceGroupLevel(alertName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param alertName Name of the alert object * @param resourceGroupName The name of the resource group within the user's subscription. The name * is case insensitive. * @param callback The callback */ - getResourceGroupLevelAlerts(alertName: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; + getResourceGroupLevel(alertName: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; /** * @param alertName Name of the alert object * @param resourceGroupName The name of the resource group within the user's subscription. The name @@ -189,16 +189,16 @@ export class Alerts { * @param options The optional parameters * @param callback The callback */ - getResourceGroupLevelAlerts(alertName: string, resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getResourceGroupLevelAlerts(alertName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + getResourceGroupLevel(alertName: string, resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getResourceGroupLevel(alertName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { alertName, resourceGroupName, options }, - getResourceGroupLevelAlertsOperationSpec, - callback) as Promise; + getResourceGroupLevelOperationSpec, + callback) as Promise; } /** @@ -207,25 +207,25 @@ export class Alerts { * @param [options] The optional parameters * @returns Promise */ - updateSubscriptionLevelAlertStateToDismiss(alertName: string, options?: msRest.RequestOptionsBase): Promise; + updateSubscriptionLevelStateToDismiss(alertName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param alertName Name of the alert object * @param callback The callback */ - updateSubscriptionLevelAlertStateToDismiss(alertName: string, callback: msRest.ServiceCallback): void; + updateSubscriptionLevelStateToDismiss(alertName: string, callback: msRest.ServiceCallback): void; /** * @param alertName Name of the alert object * @param options The optional parameters * @param callback The callback */ - updateSubscriptionLevelAlertStateToDismiss(alertName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - updateSubscriptionLevelAlertStateToDismiss(alertName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + updateSubscriptionLevelStateToDismiss(alertName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + updateSubscriptionLevelStateToDismiss(alertName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { alertName, options }, - updateSubscriptionLevelAlertStateToDismissOperationSpec, + updateSubscriptionLevelStateToDismissOperationSpec, callback); } @@ -235,25 +235,88 @@ export class Alerts { * @param [options] The optional parameters * @returns Promise */ - updateSubscriptionLevelAlertStateToReactivate(alertName: string, options?: msRest.RequestOptionsBase): Promise; + updateSubscriptionLevelStateToResolve(alertName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param alertName Name of the alert object * @param callback The callback */ - updateSubscriptionLevelAlertStateToReactivate(alertName: string, callback: msRest.ServiceCallback): void; + updateSubscriptionLevelStateToResolve(alertName: string, callback: msRest.ServiceCallback): void; /** * @param alertName Name of the alert object * @param options The optional parameters * @param callback The callback */ - updateSubscriptionLevelAlertStateToReactivate(alertName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - updateSubscriptionLevelAlertStateToReactivate(alertName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + updateSubscriptionLevelStateToResolve(alertName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + updateSubscriptionLevelStateToResolve(alertName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { alertName, options }, - updateSubscriptionLevelAlertStateToReactivateOperationSpec, + updateSubscriptionLevelStateToResolveOperationSpec, + callback); + } + + /** + * Update the alert's state + * @param alertName Name of the alert object + * @param [options] The optional parameters + * @returns Promise + */ + updateSubscriptionLevelStateToActivate(alertName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param alertName Name of the alert object + * @param callback The callback + */ + updateSubscriptionLevelStateToActivate(alertName: string, callback: msRest.ServiceCallback): void; + /** + * @param alertName Name of the alert object + * @param options The optional parameters + * @param callback The callback + */ + updateSubscriptionLevelStateToActivate(alertName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + updateSubscriptionLevelStateToActivate(alertName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + alertName, + options + }, + updateSubscriptionLevelStateToActivateOperationSpec, + callback); + } + + /** + * Update the alert's state + * @param alertName Name of the alert object + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param [options] The optional parameters + * @returns Promise + */ + updateResourceGroupLevelStateToResolve(alertName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param alertName Name of the alert object + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param callback The callback + */ + updateResourceGroupLevelStateToResolve(alertName: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param alertName Name of the alert object + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param options The optional parameters + * @param callback The callback + */ + updateResourceGroupLevelStateToResolve(alertName: string, resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + updateResourceGroupLevelStateToResolve(alertName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + alertName, + resourceGroupName, + options + }, + updateResourceGroupLevelStateToResolveOperationSpec, callback); } @@ -265,14 +328,14 @@ export class Alerts { * @param [options] The optional parameters * @returns Promise */ - updateResourceGroupLevelAlertStateToDismiss(alertName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; + updateResourceGroupLevelStateToDismiss(alertName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param alertName Name of the alert object * @param resourceGroupName The name of the resource group within the user's subscription. The name * is case insensitive. * @param callback The callback */ - updateResourceGroupLevelAlertStateToDismiss(alertName: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; + updateResourceGroupLevelStateToDismiss(alertName: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; /** * @param alertName Name of the alert object * @param resourceGroupName The name of the resource group within the user's subscription. The name @@ -280,15 +343,15 @@ export class Alerts { * @param options The optional parameters * @param callback The callback */ - updateResourceGroupLevelAlertStateToDismiss(alertName: string, resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - updateResourceGroupLevelAlertStateToDismiss(alertName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + updateResourceGroupLevelStateToDismiss(alertName: string, resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + updateResourceGroupLevelStateToDismiss(alertName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { alertName, resourceGroupName, options }, - updateResourceGroupLevelAlertStateToDismissOperationSpec, + updateResourceGroupLevelStateToDismissOperationSpec, callback); } @@ -300,14 +363,14 @@ export class Alerts { * @param [options] The optional parameters * @returns Promise */ - updateResourceGroupLevelAlertStateToReactivate(alertName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; + updateResourceGroupLevelStateToActivate(alertName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param alertName Name of the alert object * @param resourceGroupName The name of the resource group within the user's subscription. The name * is case insensitive. * @param callback The callback */ - updateResourceGroupLevelAlertStateToReactivate(alertName: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; + updateResourceGroupLevelStateToActivate(alertName: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; /** * @param alertName Name of the alert object * @param resourceGroupName The name of the resource group within the user's subscription. The name @@ -315,18 +378,45 @@ export class Alerts { * @param options The optional parameters * @param callback The callback */ - updateResourceGroupLevelAlertStateToReactivate(alertName: string, resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - updateResourceGroupLevelAlertStateToReactivate(alertName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + updateResourceGroupLevelStateToActivate(alertName: string, resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + updateResourceGroupLevelStateToActivate(alertName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { alertName, resourceGroupName, options }, - updateResourceGroupLevelAlertStateToReactivateOperationSpec, + updateResourceGroupLevelStateToActivateOperationSpec, callback); } + /** + * Simulate security alerts + * @param alertSimulatorRequestBody Alert Simulator Request Properties + * @param [options] The optional parameters + * @returns Promise + */ + simulate(alertSimulatorRequestBody: Models.AlertSimulatorRequestBody, options?: msRest.RequestOptionsBase): Promise { + return this.beginSimulate(alertSimulatorRequestBody,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Simulate security alerts + * @param alertSimulatorRequestBody Alert Simulator Request Properties + * @param [options] The optional parameters + * @returns Promise + */ + beginSimulate(alertSimulatorRequestBody: Models.AlertSimulatorRequestBody, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + alertSimulatorRequestBody, + options + }, + beginSimulateOperationSpec, + options); + } + /** * List all the alerts that are associated with the subscription * @param nextPageLink The NextLink from the previous successful call to List operation. @@ -388,28 +478,28 @@ export class Alerts { * location * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - listSubscriptionLevelAlertsByRegionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listSubscriptionLevelByRegionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - listSubscriptionLevelAlertsByRegionNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + listSubscriptionLevelByRegionNext(nextPageLink: string, callback: msRest.ServiceCallback): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param options The optional parameters * @param callback The callback */ - listSubscriptionLevelAlertsByRegionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listSubscriptionLevelAlertsByRegionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listSubscriptionLevelByRegionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listSubscriptionLevelByRegionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, - listSubscriptionLevelAlertsByRegionNextOperationSpec, - callback) as Promise; + listSubscriptionLevelByRegionNextOperationSpec, + callback) as Promise; } /** @@ -417,28 +507,28 @@ export class Alerts { * location * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - listResourceGroupLevelAlertsByRegionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listResourceGroupLevelByRegionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - listResourceGroupLevelAlertsByRegionNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + listResourceGroupLevelByRegionNext(nextPageLink: string, callback: msRest.ServiceCallback): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param options The optional parameters * @param callback The callback */ - listResourceGroupLevelAlertsByRegionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listResourceGroupLevelAlertsByRegionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listResourceGroupLevelByRegionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listResourceGroupLevelByRegionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, - listResourceGroupLevelAlertsByRegionNextOperationSpec, - callback) as Promise; + listResourceGroupLevelByRegionNextOperationSpec, + callback) as Promise; } } @@ -451,11 +541,7 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion2, - Parameters.filter, - Parameters.select, - Parameters.expand, - Parameters.autoDismissRuleName + Parameters.apiVersion11 ], headerParameters: [ Parameters.acceptLanguage @@ -479,11 +565,7 @@ const listByResourceGroupOperationSpec: msRest.OperationSpec = { Parameters.resourceGroupName ], queryParameters: [ - Parameters.apiVersion2, - Parameters.filter, - Parameters.select, - Parameters.expand, - Parameters.autoDismissRuleName + Parameters.apiVersion11 ], headerParameters: [ Parameters.acceptLanguage @@ -499,7 +581,7 @@ const listByResourceGroupOperationSpec: msRest.OperationSpec = { serializer }; -const listSubscriptionLevelAlertsByRegionOperationSpec: msRest.OperationSpec = { +const listSubscriptionLevelByRegionOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/alerts", urlParameters: [ @@ -507,11 +589,7 @@ const listSubscriptionLevelAlertsByRegionOperationSpec: msRest.OperationSpec = { Parameters.ascLocation ], queryParameters: [ - Parameters.apiVersion2, - Parameters.filter, - Parameters.select, - Parameters.expand, - Parameters.autoDismissRuleName + Parameters.apiVersion11 ], headerParameters: [ Parameters.acceptLanguage @@ -527,7 +605,7 @@ const listSubscriptionLevelAlertsByRegionOperationSpec: msRest.OperationSpec = { serializer }; -const listResourceGroupLevelAlertsByRegionOperationSpec: msRest.OperationSpec = { +const listResourceGroupLevelByRegionOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/alerts", urlParameters: [ @@ -536,11 +614,7 @@ const listResourceGroupLevelAlertsByRegionOperationSpec: msRest.OperationSpec = Parameters.resourceGroupName ], queryParameters: [ - Parameters.apiVersion2, - Parameters.filter, - Parameters.select, - Parameters.expand, - Parameters.autoDismissRuleName + Parameters.apiVersion11 ], headerParameters: [ Parameters.acceptLanguage @@ -556,7 +630,7 @@ const listResourceGroupLevelAlertsByRegionOperationSpec: msRest.OperationSpec = serializer }; -const getSubscriptionLevelAlertOperationSpec: msRest.OperationSpec = { +const getSubscriptionLevelOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}", urlParameters: [ @@ -565,7 +639,7 @@ const getSubscriptionLevelAlertOperationSpec: msRest.OperationSpec = { Parameters.alertName ], queryParameters: [ - Parameters.apiVersion2 + Parameters.apiVersion11 ], headerParameters: [ Parameters.acceptLanguage @@ -581,7 +655,7 @@ const getSubscriptionLevelAlertOperationSpec: msRest.OperationSpec = { serializer }; -const getResourceGroupLevelAlertsOperationSpec: msRest.OperationSpec = { +const getResourceGroupLevelOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}", urlParameters: [ @@ -591,7 +665,7 @@ const getResourceGroupLevelAlertsOperationSpec: msRest.OperationSpec = { Parameters.resourceGroupName ], queryParameters: [ - Parameters.apiVersion2 + Parameters.apiVersion11 ], headerParameters: [ Parameters.acceptLanguage @@ -607,7 +681,7 @@ const getResourceGroupLevelAlertsOperationSpec: msRest.OperationSpec = { serializer }; -const updateSubscriptionLevelAlertStateToDismissOperationSpec: msRest.OperationSpec = { +const updateSubscriptionLevelStateToDismissOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/dismiss", urlParameters: [ @@ -616,7 +690,30 @@ const updateSubscriptionLevelAlertStateToDismissOperationSpec: msRest.OperationS Parameters.alertName ], queryParameters: [ - Parameters.apiVersion2 + Parameters.apiVersion11 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const updateSubscriptionLevelStateToResolveOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/resolve", + urlParameters: [ + Parameters.subscriptionId, + Parameters.ascLocation, + Parameters.alertName + ], + queryParameters: [ + Parameters.apiVersion11 ], headerParameters: [ Parameters.acceptLanguage @@ -630,16 +727,40 @@ const updateSubscriptionLevelAlertStateToDismissOperationSpec: msRest.OperationS serializer }; -const updateSubscriptionLevelAlertStateToReactivateOperationSpec: msRest.OperationSpec = { +const updateSubscriptionLevelStateToActivateOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/reactivate", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/activate", urlParameters: [ Parameters.subscriptionId, Parameters.ascLocation, Parameters.alertName ], queryParameters: [ - Parameters.apiVersion2 + Parameters.apiVersion11 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const updateResourceGroupLevelStateToResolveOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/resolve", + urlParameters: [ + Parameters.subscriptionId, + Parameters.ascLocation, + Parameters.alertName, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion11 ], headerParameters: [ Parameters.acceptLanguage @@ -653,7 +774,7 @@ const updateSubscriptionLevelAlertStateToReactivateOperationSpec: msRest.Operati serializer }; -const updateResourceGroupLevelAlertStateToDismissOperationSpec: msRest.OperationSpec = { +const updateResourceGroupLevelStateToDismissOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/dismiss", urlParameters: [ @@ -663,7 +784,7 @@ const updateResourceGroupLevelAlertStateToDismissOperationSpec: msRest.Operation Parameters.resourceGroupName ], queryParameters: [ - Parameters.apiVersion2 + Parameters.apiVersion11 ], headerParameters: [ Parameters.acceptLanguage @@ -677,9 +798,9 @@ const updateResourceGroupLevelAlertStateToDismissOperationSpec: msRest.Operation serializer }; -const updateResourceGroupLevelAlertStateToReactivateOperationSpec: msRest.OperationSpec = { +const updateResourceGroupLevelStateToActivateOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/reactivate", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/activate", urlParameters: [ Parameters.subscriptionId, Parameters.ascLocation, @@ -687,7 +808,7 @@ const updateResourceGroupLevelAlertStateToReactivateOperationSpec: msRest.Operat Parameters.resourceGroupName ], queryParameters: [ - Parameters.apiVersion2 + Parameters.apiVersion11 ], headerParameters: [ Parameters.acceptLanguage @@ -701,6 +822,35 @@ const updateResourceGroupLevelAlertStateToReactivateOperationSpec: msRest.Operat serializer }; +const beginSimulateOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/alerts/default/simulate", + urlParameters: [ + Parameters.subscriptionId, + Parameters.ascLocation + ], + queryParameters: [ + Parameters.apiVersion11 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "alertSimulatorRequestBody", + mapper: { + ...Mappers.AlertSimulatorRequestBody, + required: true + } + }, + responses: { + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + const listNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", @@ -708,6 +858,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion11 + ], headerParameters: [ Parameters.acceptLanguage ], @@ -729,6 +882,9 @@ const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion11 + ], headerParameters: [ Parameters.acceptLanguage ], @@ -743,13 +899,16 @@ const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { serializer }; -const listSubscriptionLevelAlertsByRegionNextOperationSpec: msRest.OperationSpec = { +const listSubscriptionLevelByRegionNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion11 + ], headerParameters: [ Parameters.acceptLanguage ], @@ -764,13 +923,16 @@ const listSubscriptionLevelAlertsByRegionNextOperationSpec: msRest.OperationSpec serializer }; -const listResourceGroupLevelAlertsByRegionNextOperationSpec: msRest.OperationSpec = { +const listResourceGroupLevelByRegionNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion11 + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/security/arm-security/src/operations/alertsSuppressionRules.ts b/sdk/security/arm-security/src/operations/alertsSuppressionRules.ts index edd98341ab97..ddf94725c6ab 100644 --- a/sdk/security/arm-security/src/operations/alertsSuppressionRules.ts +++ b/sdk/security/arm-security/src/operations/alertsSuppressionRules.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -144,7 +143,7 @@ export class AlertsSuppressionRules { * @param [options] The optional parameters * @returns Promise */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listNext(nextPageLink: string, options?: Models.AlertsSuppressionRulesListNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback @@ -155,8 +154,8 @@ export class AlertsSuppressionRules { * @param options The optional parameters * @param callback The callback */ - listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listNext(nextPageLink: string, options: Models.AlertsSuppressionRulesListNextOptionalParams, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: Models.AlertsSuppressionRulesListNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, @@ -177,7 +176,7 @@ const listOperationSpec: msRest.OperationSpec = { ], queryParameters: [ Parameters.apiVersion6, - Parameters.alertType + Parameters.alertType0 ], headerParameters: [ Parameters.acceptLanguage @@ -277,6 +276,10 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion6, + Parameters.alertType0 + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/security/arm-security/src/operations/allowedConnections.ts b/sdk/security/arm-security/src/operations/allowedConnections.ts index 3c24f44ef537..8fdcb9047656 100644 --- a/sdk/security/arm-security/src/operations/allowedConnections.ts +++ b/sdk/security/arm-security/src/operations/allowedConnections.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -252,6 +251,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion7 + ], headerParameters: [ Parameters.acceptLanguage ], @@ -273,6 +275,9 @@ const listByHomeRegionNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion7 + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/security/arm-security/src/operations/assessments.ts b/sdk/security/arm-security/src/operations/assessments.ts index f189faf56043..fc98748d377d 100644 --- a/sdk/security/arm-security/src/operations/assessments.ts +++ b/sdk/security/arm-security/src/operations/assessments.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -305,6 +304,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion7 + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/security/arm-security/src/operations/assessmentsMetadata.ts b/sdk/security/arm-security/src/operations/assessmentsMetadata.ts index 2413fa98e36f..94c0216a7bbc 100644 --- a/sdk/security/arm-security/src/operations/assessmentsMetadata.ts +++ b/sdk/security/arm-security/src/operations/assessmentsMetadata.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -400,6 +399,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion7 + ], headerParameters: [ Parameters.acceptLanguage ], @@ -421,6 +423,9 @@ const listBySubscriptionNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion7 + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/security/arm-security/src/operations/autoProvisioningSettings.ts b/sdk/security/arm-security/src/operations/autoProvisioningSettings.ts index 352f1989c6d3..4047123752c2 100644 --- a/sdk/security/arm-security/src/operations/autoProvisioningSettings.ts +++ b/sdk/security/arm-security/src/operations/autoProvisioningSettings.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -169,7 +168,7 @@ const getOperationSpec: msRest.OperationSpec = { path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/autoProvisioningSettings/{settingName}", urlParameters: [ Parameters.subscriptionId, - Parameters.settingName0 + Parameters.settingName1 ], queryParameters: [ Parameters.apiVersion5 @@ -193,7 +192,7 @@ const createOperationSpec: msRest.OperationSpec = { path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/autoProvisioningSettings/{settingName}", urlParameters: [ Parameters.subscriptionId, - Parameters.settingName0 + Parameters.settingName1 ], queryParameters: [ Parameters.apiVersion5 @@ -226,6 +225,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion5 + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/security/arm-security/src/operations/automations.ts b/sdk/security/arm-security/src/operations/automations.ts index 087e3abb5def..7efe058ef121 100644 --- a/sdk/security/arm-security/src/operations/automations.ts +++ b/sdk/security/arm-security/src/operations/automations.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -463,6 +462,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion6 + ], headerParameters: [ Parameters.acceptLanguage ], @@ -484,6 +486,9 @@ const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion6 + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/security/arm-security/src/operations/complianceResults.ts b/sdk/security/arm-security/src/operations/complianceResults.ts index 66c2d16295d4..66b2c70beaf6 100644 --- a/sdk/security/arm-security/src/operations/complianceResults.ts +++ b/sdk/security/arm-security/src/operations/complianceResults.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -177,6 +176,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion0 + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/security/arm-security/src/operations/compliances.ts b/sdk/security/arm-security/src/operations/compliances.ts index 951f8b8f7abb..03142366fd78 100644 --- a/sdk/security/arm-security/src/operations/compliances.ts +++ b/sdk/security/arm-security/src/operations/compliances.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -183,6 +182,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion5 + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/security/arm-security/src/operations/connectors.ts b/sdk/security/arm-security/src/operations/connectors.ts new file mode 100644 index 000000000000..c54625cfcef6 --- /dev/null +++ b/sdk/security/arm-security/src/operations/connectors.ts @@ -0,0 +1,296 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/connectorsMappers"; +import * as Parameters from "../models/parameters"; +import { SecurityCenterContext } from "../securityCenterContext"; + +/** Class representing a Connectors. */ +export class Connectors { + private readonly client: SecurityCenterContext; + + /** + * Create a Connectors. + * @param {SecurityCenterContext} client Reference to the service client. + */ + constructor(client: SecurityCenterContext) { + this.client = client; + } + + /** + * Cloud accounts connectors of a subscription + * @param [options] The optional parameters + * @returns Promise + */ + list(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + list(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Details of a specific cloud account connector + * @param connectorName Name of the cloud account connector + * @param [options] The optional parameters + * @returns Promise + */ + get(connectorName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param connectorName Name of the cloud account connector + * @param callback The callback + */ + get(connectorName: string, callback: msRest.ServiceCallback): void; + /** + * @param connectorName Name of the cloud account connector + * @param options The optional parameters + * @param callback The callback + */ + get(connectorName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(connectorName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + connectorName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Create a cloud account connector or update an existing one. Connect to your cloud account. For + * AWS, use either account credentials or role-based authentication. For GCP, use account + * organization credentials. + * @param connectorName Name of the cloud account connector + * @param connectorSetting Settings for the cloud account connector + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(connectorName: string, connectorSetting: Models.ConnectorSetting, options?: msRest.RequestOptionsBase): Promise; + /** + * @param connectorName Name of the cloud account connector + * @param connectorSetting Settings for the cloud account connector + * @param callback The callback + */ + createOrUpdate(connectorName: string, connectorSetting: Models.ConnectorSetting, callback: msRest.ServiceCallback): void; + /** + * @param connectorName Name of the cloud account connector + * @param connectorSetting Settings for the cloud account connector + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdate(connectorName: string, connectorSetting: Models.ConnectorSetting, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(connectorName: string, connectorSetting: Models.ConnectorSetting, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + connectorName, + connectorSetting, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; + } + + /** + * Delete a cloud account connector from a subscription + * @param connectorName Name of the cloud account connector + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(connectorName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param connectorName Name of the cloud account connector + * @param callback The callback + */ + deleteMethod(connectorName: string, callback: msRest.ServiceCallback): void; + /** + * @param connectorName Name of the cloud account connector + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(connectorName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(connectorName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + connectorName, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * Cloud accounts connectors of a subscription + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/connectors", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion8 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ConnectorSettingList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/connectors/{connectorName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.connectorName + ], + queryParameters: [ + Parameters.apiVersion8 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ConnectorSetting + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/connectors/{connectorName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.connectorName + ], + queryParameters: [ + Parameters.apiVersion8 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "connectorSetting", + mapper: { + ...Mappers.ConnectorSetting, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ConnectorSetting + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/connectors/{connectorName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.connectorName + ], + queryParameters: [ + Parameters.apiVersion8 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion8 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ConnectorSettingList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/security/arm-security/src/operations/deviceOperations.ts b/sdk/security/arm-security/src/operations/deviceOperations.ts new file mode 100644 index 000000000000..d0bb106a779a --- /dev/null +++ b/sdk/security/arm-security/src/operations/deviceOperations.ts @@ -0,0 +1,85 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/deviceOperationsMappers"; +import * as Parameters from "../models/parameters"; +import { SecurityCenterContext } from "../securityCenterContext"; + +/** Class representing a DeviceOperations. */ +export class DeviceOperations { + private readonly client: SecurityCenterContext; + + /** + * Create a DeviceOperations. + * @param {SecurityCenterContext} client Reference to the service client. + */ + constructor(client: SecurityCenterContext) { + this.client = client; + } + + /** + * Get device. + * @param resourceId The identifier of the resource. + * @param deviceId Identifier of the device. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceId: string, deviceId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceId The identifier of the resource. + * @param deviceId Identifier of the device. + * @param callback The callback + */ + get(resourceId: string, deviceId: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceId The identifier of the resource. + * @param deviceId Identifier of the device. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceId: string, deviceId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceId: string, deviceId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceId, + deviceId, + options + }, + getOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "{resourceId}/providers/Microsoft.Security/devices/{deviceId}", + urlParameters: [ + Parameters.resourceId, + Parameters.deviceId0 + ], + queryParameters: [ + Parameters.apiVersion10 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Device + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/security/arm-security/src/operations/deviceSecurityGroups.ts b/sdk/security/arm-security/src/operations/deviceSecurityGroups.ts index 8906c9565522..d4260ab33cdd 100644 --- a/sdk/security/arm-security/src/operations/deviceSecurityGroups.ts +++ b/sdk/security/arm-security/src/operations/deviceSecurityGroups.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -305,6 +304,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion3 + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/security/arm-security/src/operations/devicesForHub.ts b/sdk/security/arm-security/src/operations/devicesForHub.ts new file mode 100644 index 000000000000..d065ae684345 --- /dev/null +++ b/sdk/security/arm-security/src/operations/devicesForHub.ts @@ -0,0 +1,138 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/devicesForHubMappers"; +import * as Parameters from "../models/parameters"; +import { SecurityCenterContext } from "../securityCenterContext"; + +/** Class representing a DevicesForHub. */ +export class DevicesForHub { + private readonly client: SecurityCenterContext; + + /** + * Create a DevicesForHub. + * @param {SecurityCenterContext} client Reference to the service client. + */ + constructor(client: SecurityCenterContext) { + this.client = client; + } + + /** + * Get list of the devices for the specified IoT Hub resource. + * @param resourceId The identifier of the resource. + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceId: string, options?: Models.DevicesForHubListOptionalParams): Promise; + /** + * @param resourceId The identifier of the resource. + * @param callback The callback + */ + list(resourceId: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceId The identifier of the resource. + * @param options The optional parameters + * @param callback The callback + */ + list(resourceId: string, options: Models.DevicesForHubListOptionalParams, callback: msRest.ServiceCallback): void; + list(resourceId: string, options?: Models.DevicesForHubListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceId, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Get list of the devices for the specified IoT Hub resource. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: Models.DevicesForHubListNextOptionalParams): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: Models.DevicesForHubListNextOptionalParams, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: Models.DevicesForHubListNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "{resourceId}/providers/Microsoft.Security/devices", + urlParameters: [ + Parameters.resourceId + ], + queryParameters: [ + Parameters.apiVersion10, + Parameters.limit, + Parameters.skipToken, + Parameters.deviceManagementType + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DeviceList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion10, + Parameters.limit, + Parameters.skipToken, + Parameters.deviceManagementType + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DeviceList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/security/arm-security/src/operations/devicesForSubscription.ts b/sdk/security/arm-security/src/operations/devicesForSubscription.ts new file mode 100644 index 000000000000..171c91d18082 --- /dev/null +++ b/sdk/security/arm-security/src/operations/devicesForSubscription.ts @@ -0,0 +1,134 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/devicesForSubscriptionMappers"; +import * as Parameters from "../models/parameters"; +import { SecurityCenterContext } from "../securityCenterContext"; + +/** Class representing a DevicesForSubscription. */ +export class DevicesForSubscription { + private readonly client: SecurityCenterContext; + + /** + * Create a DevicesForSubscription. + * @param {SecurityCenterContext} client Reference to the service client. + */ + constructor(client: SecurityCenterContext) { + this.client = client; + } + + /** + * Get list of the devices by their subscription. + * @param [options] The optional parameters + * @returns Promise + */ + list(options?: Models.DevicesForSubscriptionListOptionalParams): Promise; + /** + * @param callback The callback + */ + list(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + list(options: Models.DevicesForSubscriptionListOptionalParams, callback: msRest.ServiceCallback): void; + list(options?: Models.DevicesForSubscriptionListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Get list of the devices by their subscription. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: Models.DevicesForSubscriptionListNextOptionalParams): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: Models.DevicesForSubscriptionListNextOptionalParams, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: Models.DevicesForSubscriptionListNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/devices", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion10, + Parameters.limit, + Parameters.skipToken, + Parameters.deviceManagementType + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DeviceList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion10, + Parameters.limit, + Parameters.skipToken, + Parameters.deviceManagementType + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DeviceList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/security/arm-security/src/operations/discoveredSecuritySolutions.ts b/sdk/security/arm-security/src/operations/discoveredSecuritySolutions.ts index fee408b7fe91..12b10b2963b5 100644 --- a/sdk/security/arm-security/src/operations/discoveredSecuritySolutions.ts +++ b/sdk/security/arm-security/src/operations/discoveredSecuritySolutions.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -248,6 +247,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion7 + ], headerParameters: [ Parameters.acceptLanguage ], @@ -269,6 +271,9 @@ const listByHomeRegionNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion7 + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/security/arm-security/src/operations/externalSecuritySolutions.ts b/sdk/security/arm-security/src/operations/externalSecuritySolutions.ts index dcf849fd1092..b6b9b9bd6de1 100644 --- a/sdk/security/arm-security/src/operations/externalSecuritySolutions.ts +++ b/sdk/security/arm-security/src/operations/externalSecuritySolutions.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -248,6 +247,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion7 + ], headerParameters: [ Parameters.acceptLanguage ], @@ -269,6 +271,9 @@ const listByHomeRegionNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion7 + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/security/arm-security/src/operations/index.ts b/sdk/security/arm-security/src/operations/index.ts index 49b74e193742..68ed9bed7f43 100644 --- a/sdk/security/arm-security/src/operations/index.ts +++ b/sdk/security/arm-security/src/operations/index.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -10,8 +9,6 @@ export * from "./complianceResults"; export * from "./pricings"; -export * from "./alerts"; -export * from "./settings"; export * from "./advancedThreatProtection"; export * from "./deviceSecurityGroups"; export * from "./iotSecuritySolution"; @@ -29,10 +26,10 @@ export * from "./workspaceSettings"; export * from "./regulatoryComplianceStandards"; export * from "./regulatoryComplianceControls"; export * from "./regulatoryComplianceAssessments"; -export * from "./serverVulnerabilityAssessmentOperations"; export * from "./subAssessments"; export * from "./automations"; export * from "./alertsSuppressionRules"; +export * from "./serverVulnerabilityAssessmentOperations"; export * from "./assessmentsMetadata"; export * from "./assessments"; export * from "./adaptiveApplicationControls"; @@ -41,7 +38,28 @@ export * from "./allowedConnections"; export * from "./topology"; export * from "./jitNetworkAccessPolicies"; export * from "./discoveredSecuritySolutions"; +export * from "./securitySolutionsReferenceDataOperations"; export * from "./externalSecuritySolutions"; export * from "./secureScores"; export * from "./secureScoreControls"; export * from "./secureScoreControlDefinitions"; +export * from "./securitySolutions"; +export * from "./connectors"; +export * from "./sqlVulnerabilityAssessmentScans"; +export * from "./sqlVulnerabilityAssessmentScanResults"; +export * from "./sqlVulnerabilityAssessmentBaselineRules"; +export * from "./iotDefenderSettings"; +export * from "./iotSensors"; +export * from "./devicesForSubscription"; +export * from "./devicesForHub"; +export * from "./deviceOperations"; +export * from "./onPremiseIotSensors"; +export * from "./iotSites"; +export * from "./iotAlerts"; +export * from "./iotAlertTypes"; +export * from "./iotRecommendations"; +export * from "./iotRecommendationTypes"; +export * from "./alerts"; +export * from "./settings"; +export * from "./ingestionSettings"; +export * from "./softwareInventories"; diff --git a/sdk/security/arm-security/src/operations/informationProtectionPolicies.ts b/sdk/security/arm-security/src/operations/informationProtectionPolicies.ts index 4bcf11236eda..5c5cf260383a 100644 --- a/sdk/security/arm-security/src/operations/informationProtectionPolicies.ts +++ b/sdk/security/arm-security/src/operations/informationProtectionPolicies.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -265,6 +264,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion5 + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/security/arm-security/src/operations/ingestionSettings.ts b/sdk/security/arm-security/src/operations/ingestionSettings.ts new file mode 100644 index 000000000000..a4d734204199 --- /dev/null +++ b/sdk/security/arm-security/src/operations/ingestionSettings.ts @@ -0,0 +1,403 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/ingestionSettingsMappers"; +import * as Parameters from "../models/parameters"; +import { SecurityCenterContext } from "../securityCenterContext"; + +/** Class representing a IngestionSettings. */ +export class IngestionSettings { + private readonly client: SecurityCenterContext; + + /** + * Create a IngestionSettings. + * @param {SecurityCenterContext} client Reference to the service client. + */ + constructor(client: SecurityCenterContext) { + this.client = client; + } + + /** + * Settings for ingesting security data and logs to correlate with resources associated with the + * subscription. + * @param [options] The optional parameters + * @returns Promise + */ + list(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + list(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Settings for ingesting security data and logs to correlate with resources associated with the + * subscription. + * @param ingestionSettingName Name of the ingestion setting + * @param [options] The optional parameters + * @returns Promise + */ + get(ingestionSettingName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param ingestionSettingName Name of the ingestion setting + * @param callback The callback + */ + get(ingestionSettingName: string, callback: msRest.ServiceCallback): void; + /** + * @param ingestionSettingName Name of the ingestion setting + * @param options The optional parameters + * @param callback The callback + */ + get(ingestionSettingName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(ingestionSettingName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + ingestionSettingName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Create setting for ingesting security data and logs to correlate with resources associated with + * the subscription. + * @param ingestionSettingName Name of the ingestion setting + * @param ingestionSetting Ingestion setting object + * @param [options] The optional parameters + * @returns Promise + */ + create(ingestionSettingName: string, ingestionSetting: Models.IngestionSetting, options?: msRest.RequestOptionsBase): Promise; + /** + * @param ingestionSettingName Name of the ingestion setting + * @param ingestionSetting Ingestion setting object + * @param callback The callback + */ + create(ingestionSettingName: string, ingestionSetting: Models.IngestionSetting, callback: msRest.ServiceCallback): void; + /** + * @param ingestionSettingName Name of the ingestion setting + * @param ingestionSetting Ingestion setting object + * @param options The optional parameters + * @param callback The callback + */ + create(ingestionSettingName: string, ingestionSetting: Models.IngestionSetting, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + create(ingestionSettingName: string, ingestionSetting: Models.IngestionSetting, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + ingestionSettingName, + ingestionSetting, + options + }, + createOperationSpec, + callback) as Promise; + } + + /** + * Deletes the ingestion settings for this subscription. + * @param ingestionSettingName Name of the ingestion setting + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(ingestionSettingName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param ingestionSettingName Name of the ingestion setting + * @param callback The callback + */ + deleteMethod(ingestionSettingName: string, callback: msRest.ServiceCallback): void; + /** + * @param ingestionSettingName Name of the ingestion setting + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(ingestionSettingName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(ingestionSettingName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + ingestionSettingName, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * Returns the token that is used for correlating ingested telemetry with the resources in the + * subscription. + * @param ingestionSettingName Name of the ingestion setting + * @param [options] The optional parameters + * @returns Promise + */ + listTokens(ingestionSettingName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param ingestionSettingName Name of the ingestion setting + * @param callback The callback + */ + listTokens(ingestionSettingName: string, callback: msRest.ServiceCallback): void; + /** + * @param ingestionSettingName Name of the ingestion setting + * @param options The optional parameters + * @param callback The callback + */ + listTokens(ingestionSettingName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listTokens(ingestionSettingName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + ingestionSettingName, + options + }, + listTokensOperationSpec, + callback) as Promise; + } + + /** + * Connection strings for ingesting security scan logs and data. + * @param ingestionSettingName Name of the ingestion setting + * @param [options] The optional parameters + * @returns Promise + */ + listConnectionStrings(ingestionSettingName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param ingestionSettingName Name of the ingestion setting + * @param callback The callback + */ + listConnectionStrings(ingestionSettingName: string, callback: msRest.ServiceCallback): void; + /** + * @param ingestionSettingName Name of the ingestion setting + * @param options The optional parameters + * @param callback The callback + */ + listConnectionStrings(ingestionSettingName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listConnectionStrings(ingestionSettingName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + ingestionSettingName, + options + }, + listConnectionStringsOperationSpec, + callback) as Promise; + } + + /** + * Settings for ingesting security data and logs to correlate with resources associated with the + * subscription. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/ingestionSettings", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion13 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.IngestionSettingList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/ingestionSettings/{ingestionSettingName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.ingestionSettingName + ], + queryParameters: [ + Parameters.apiVersion13 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.IngestionSetting + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const createOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/ingestionSettings/{ingestionSettingName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.ingestionSettingName + ], + queryParameters: [ + Parameters.apiVersion13 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "ingestionSetting", + mapper: { + ...Mappers.IngestionSetting, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.IngestionSetting + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/ingestionSettings/{ingestionSettingName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.ingestionSettingName + ], + queryParameters: [ + Parameters.apiVersion13 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listTokensOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/ingestionSettings/{ingestionSettingName}/listTokens", + urlParameters: [ + Parameters.subscriptionId, + Parameters.ingestionSettingName + ], + queryParameters: [ + Parameters.apiVersion13 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.IngestionSettingToken + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listConnectionStringsOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/ingestionSettings/{ingestionSettingName}/listConnectionStrings", + urlParameters: [ + Parameters.subscriptionId, + Parameters.ingestionSettingName + ], + queryParameters: [ + Parameters.apiVersion13 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ConnectionStrings + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion13 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.IngestionSettingList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/security/arm-security/src/operations/iotAlertTypes.ts b/sdk/security/arm-security/src/operations/iotAlertTypes.ts new file mode 100644 index 000000000000..9ceecb1b073f --- /dev/null +++ b/sdk/security/arm-security/src/operations/iotAlertTypes.ts @@ -0,0 +1,128 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/iotAlertTypesMappers"; +import * as Parameters from "../models/parameters"; +import { SecurityCenterContext } from "../securityCenterContext"; + +/** Class representing a IotAlertTypes. */ +export class IotAlertTypes { + private readonly client: SecurityCenterContext; + + /** + * Create a IotAlertTypes. + * @param {SecurityCenterContext} client Reference to the service client. + */ + constructor(client: SecurityCenterContext) { + this.client = client; + } + + /** + * List IoT alert types + * @param [options] The optional parameters + * @returns Promise + */ + list(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + list(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Get IoT alert type + * @param iotAlertTypeName Name of the alert type + * @param [options] The optional parameters + * @returns Promise + */ + get(iotAlertTypeName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param iotAlertTypeName Name of the alert type + * @param callback The callback + */ + get(iotAlertTypeName: string, callback: msRest.ServiceCallback): void; + /** + * @param iotAlertTypeName Name of the alert type + * @param options The optional parameters + * @param callback The callback + */ + get(iotAlertTypeName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(iotAlertTypeName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + iotAlertTypeName, + options + }, + getOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/iotAlertTypes", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion10 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.IotAlertTypeList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/iotAlertTypes/{iotAlertTypeName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.iotAlertTypeName + ], + queryParameters: [ + Parameters.apiVersion10 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.IotAlertType + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/security/arm-security/src/operations/iotAlerts.ts b/sdk/security/arm-security/src/operations/iotAlerts.ts new file mode 100644 index 000000000000..16d9fddfdb19 --- /dev/null +++ b/sdk/security/arm-security/src/operations/iotAlerts.ts @@ -0,0 +1,214 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/iotAlertsMappers"; +import * as Parameters from "../models/parameters"; +import { SecurityCenterContext } from "../securityCenterContext"; + +/** Class representing a IotAlerts. */ +export class IotAlerts { + private readonly client: SecurityCenterContext; + + /** + * Create a IotAlerts. + * @param {SecurityCenterContext} client Reference to the service client. + */ + constructor(client: SecurityCenterContext) { + this.client = client; + } + + /** + * List IoT alerts + * @param scope Scope of the query: Subscription (i.e. /subscriptions/{subscriptionId}) or IoT Hub + * (i.e. + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Devices/iotHubs/{iotHubName}) + * @param [options] The optional parameters + * @returns Promise + */ + list(scope: string, options?: Models.IotAlertsListOptionalParams): Promise; + /** + * @param scope Scope of the query: Subscription (i.e. /subscriptions/{subscriptionId}) or IoT Hub + * (i.e. + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Devices/iotHubs/{iotHubName}) + * @param callback The callback + */ + list(scope: string, callback: msRest.ServiceCallback): void; + /** + * @param scope Scope of the query: Subscription (i.e. /subscriptions/{subscriptionId}) or IoT Hub + * (i.e. + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Devices/iotHubs/{iotHubName}) + * @param options The optional parameters + * @param callback The callback + */ + list(scope: string, options: Models.IotAlertsListOptionalParams, callback: msRest.ServiceCallback): void; + list(scope: string, options?: Models.IotAlertsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scope, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Get IoT alert + * @param scope Scope of the query: Subscription (i.e. /subscriptions/{subscriptionId}) or IoT Hub + * (i.e. + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Devices/iotHubs/{iotHubName}) + * @param iotAlertId Id of the alert + * @param [options] The optional parameters + * @returns Promise + */ + get(scope: string, iotAlertId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param scope Scope of the query: Subscription (i.e. /subscriptions/{subscriptionId}) or IoT Hub + * (i.e. + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Devices/iotHubs/{iotHubName}) + * @param iotAlertId Id of the alert + * @param callback The callback + */ + get(scope: string, iotAlertId: string, callback: msRest.ServiceCallback): void; + /** + * @param scope Scope of the query: Subscription (i.e. /subscriptions/{subscriptionId}) or IoT Hub + * (i.e. + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Devices/iotHubs/{iotHubName}) + * @param iotAlertId Id of the alert + * @param options The optional parameters + * @param callback The callback + */ + get(scope: string, iotAlertId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(scope: string, iotAlertId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scope, + iotAlertId, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * List IoT alerts + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: Models.IotAlertsListNextOptionalParams): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: Models.IotAlertsListNextOptionalParams, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: Models.IotAlertsListNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "{scope}/providers/Microsoft.Security/iotAlerts", + urlParameters: [ + Parameters.scope + ], + queryParameters: [ + Parameters.apiVersion10, + Parameters.minStartTimeUtc, + Parameters.maxStartTimeUtc, + Parameters.alertType1, + Parameters.deviceManagementType, + Parameters.compromisedEntity, + Parameters.limit, + Parameters.skipToken + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.IotAlertListModel + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "{scope}/providers/Microsoft.Security/iotAlerts/{iotAlertId}", + urlParameters: [ + Parameters.scope, + Parameters.iotAlertId + ], + queryParameters: [ + Parameters.apiVersion10 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.IotAlertModel + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion10, + Parameters.minStartTimeUtc, + Parameters.maxStartTimeUtc, + Parameters.alertType1, + Parameters.deviceManagementType, + Parameters.compromisedEntity, + Parameters.limit, + Parameters.skipToken + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.IotAlertListModel + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/security/arm-security/src/operations/iotDefenderSettings.ts b/sdk/security/arm-security/src/operations/iotDefenderSettings.ts new file mode 100644 index 000000000000..6cb21509dddd --- /dev/null +++ b/sdk/security/arm-security/src/operations/iotDefenderSettings.ts @@ -0,0 +1,329 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/iotDefenderSettingsMappers"; +import * as Parameters from "../models/parameters"; +import { SecurityCenterContext } from "../securityCenterContext"; + +/** Class representing a IotDefenderSettings. */ +export class IotDefenderSettings { + private readonly client: SecurityCenterContext; + + /** + * Create a IotDefenderSettings. + * @param {SecurityCenterContext} client Reference to the service client. + */ + constructor(client: SecurityCenterContext) { + this.client = client; + } + + /** + * List IoT Defender Settings + * @param [options] The optional parameters + * @returns Promise + */ + list(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + list(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Get IoT Defender Settings + * @param [options] The optional parameters + * @returns Promise + */ + get(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + get(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + get(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Create or update IoT Defender settings + * @param iotDefenderSettingsModel The IoT defender settings model + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(iotDefenderSettingsModel: Models.IotDefenderSettingsModel, options?: msRest.RequestOptionsBase): Promise; + /** + * @param iotDefenderSettingsModel The IoT defender settings model + * @param callback The callback + */ + createOrUpdate(iotDefenderSettingsModel: Models.IotDefenderSettingsModel, callback: msRest.ServiceCallback): void; + /** + * @param iotDefenderSettingsModel The IoT defender settings model + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdate(iotDefenderSettingsModel: Models.IotDefenderSettingsModel, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(iotDefenderSettingsModel: Models.IotDefenderSettingsModel, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + iotDefenderSettingsModel, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; + } + + /** + * Delete IoT Defender settings + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + deleteMethod(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * Information about downloadable packages + * @param [options] The optional parameters + * @returns Promise + */ + packageDownloadsMethod(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + packageDownloadsMethod(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + packageDownloadsMethod(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + packageDownloadsMethod(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + packageDownloadsMethodOperationSpec, + callback) as Promise; + } + + /** + * Download manager activation data defined for this subscription + * @param [options] The optional parameters + * @returns Promise + */ + downloadManagerActivation(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + downloadManagerActivation(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + downloadManagerActivation(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + downloadManagerActivation(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + downloadManagerActivationOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/iotDefenderSettings", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion10 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.IotDefenderSettingsList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/iotDefenderSettings/default", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion10 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.IotDefenderSettingsModel + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/iotDefenderSettings/default", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion10 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "iotDefenderSettingsModel", + mapper: { + ...Mappers.IotDefenderSettingsModel, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.IotDefenderSettingsModel + }, + 201: { + bodyMapper: Mappers.IotDefenderSettingsModel + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/iotDefenderSettings/default", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion10 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const packageDownloadsMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/iotDefenderSettings/default/packageDownloads", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion10 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PackageDownloads + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const downloadManagerActivationOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/iotDefenderSettings/default/downloadManagerActivation", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion10 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: { + serializedName: "parsedResponse", + type: { + name: "Stream" + } + } + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/security/arm-security/src/operations/iotRecommendationTypes.ts b/sdk/security/arm-security/src/operations/iotRecommendationTypes.ts new file mode 100644 index 000000000000..74b977b0a508 --- /dev/null +++ b/sdk/security/arm-security/src/operations/iotRecommendationTypes.ts @@ -0,0 +1,128 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/iotRecommendationTypesMappers"; +import * as Parameters from "../models/parameters"; +import { SecurityCenterContext } from "../securityCenterContext"; + +/** Class representing a IotRecommendationTypes. */ +export class IotRecommendationTypes { + private readonly client: SecurityCenterContext; + + /** + * Create a IotRecommendationTypes. + * @param {SecurityCenterContext} client Reference to the service client. + */ + constructor(client: SecurityCenterContext) { + this.client = client; + } + + /** + * List IoT recommendation types + * @param [options] The optional parameters + * @returns Promise + */ + list(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + list(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Get IoT recommendation type + * @param iotRecommendationTypeName Name of the recommendation type + * @param [options] The optional parameters + * @returns Promise + */ + get(iotRecommendationTypeName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param iotRecommendationTypeName Name of the recommendation type + * @param callback The callback + */ + get(iotRecommendationTypeName: string, callback: msRest.ServiceCallback): void; + /** + * @param iotRecommendationTypeName Name of the recommendation type + * @param options The optional parameters + * @param callback The callback + */ + get(iotRecommendationTypeName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(iotRecommendationTypeName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + iotRecommendationTypeName, + options + }, + getOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/iotRecommendationTypes", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion10 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.IotRecommendationTypeList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/iotRecommendationTypes/{iotRecommendationTypeName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.iotRecommendationTypeName + ], + queryParameters: [ + Parameters.apiVersion10 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.IotRecommendationType + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/security/arm-security/src/operations/iotRecommendations.ts b/sdk/security/arm-security/src/operations/iotRecommendations.ts new file mode 100644 index 000000000000..dd5889cf0b89 --- /dev/null +++ b/sdk/security/arm-security/src/operations/iotRecommendations.ts @@ -0,0 +1,208 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/iotRecommendationsMappers"; +import * as Parameters from "../models/parameters"; +import { SecurityCenterContext } from "../securityCenterContext"; + +/** Class representing a IotRecommendations. */ +export class IotRecommendations { + private readonly client: SecurityCenterContext; + + /** + * Create a IotRecommendations. + * @param {SecurityCenterContext} client Reference to the service client. + */ + constructor(client: SecurityCenterContext) { + this.client = client; + } + + /** + * List IoT recommendations + * @param scope Scope of the query: Subscription (i.e. /subscriptions/{subscriptionId}) or IoT Hub + * (i.e. + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Devices/iotHubs/{iotHubName}) + * @param [options] The optional parameters + * @returns Promise + */ + list(scope: string, options?: Models.IotRecommendationsListOptionalParams): Promise; + /** + * @param scope Scope of the query: Subscription (i.e. /subscriptions/{subscriptionId}) or IoT Hub + * (i.e. + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Devices/iotHubs/{iotHubName}) + * @param callback The callback + */ + list(scope: string, callback: msRest.ServiceCallback): void; + /** + * @param scope Scope of the query: Subscription (i.e. /subscriptions/{subscriptionId}) or IoT Hub + * (i.e. + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Devices/iotHubs/{iotHubName}) + * @param options The optional parameters + * @param callback The callback + */ + list(scope: string, options: Models.IotRecommendationsListOptionalParams, callback: msRest.ServiceCallback): void; + list(scope: string, options?: Models.IotRecommendationsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scope, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Get IoT recommendation + * @param scope Scope of the query: Subscription (i.e. /subscriptions/{subscriptionId}) or IoT Hub + * (i.e. + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Devices/iotHubs/{iotHubName}) + * @param iotRecommendationId Id of the recommendation + * @param [options] The optional parameters + * @returns Promise + */ + get(scope: string, iotRecommendationId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param scope Scope of the query: Subscription (i.e. /subscriptions/{subscriptionId}) or IoT Hub + * (i.e. + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Devices/iotHubs/{iotHubName}) + * @param iotRecommendationId Id of the recommendation + * @param callback The callback + */ + get(scope: string, iotRecommendationId: string, callback: msRest.ServiceCallback): void; + /** + * @param scope Scope of the query: Subscription (i.e. /subscriptions/{subscriptionId}) or IoT Hub + * (i.e. + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Devices/iotHubs/{iotHubName}) + * @param iotRecommendationId Id of the recommendation + * @param options The optional parameters + * @param callback The callback + */ + get(scope: string, iotRecommendationId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(scope: string, iotRecommendationId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scope, + iotRecommendationId, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * List IoT recommendations + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: Models.IotRecommendationsListNextOptionalParams): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: Models.IotRecommendationsListNextOptionalParams, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: Models.IotRecommendationsListNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "{scope}/providers/Microsoft.Security/iotRecommendations", + urlParameters: [ + Parameters.scope + ], + queryParameters: [ + Parameters.apiVersion10, + Parameters.recommendationType, + Parameters.deviceId1, + Parameters.limit, + Parameters.skipToken + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.IotRecommendationListModel + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "{scope}/providers/Microsoft.Security/iotRecommendations/{iotRecommendationId}", + urlParameters: [ + Parameters.scope, + Parameters.iotRecommendationId + ], + queryParameters: [ + Parameters.apiVersion10 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.IotRecommendationModel + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion10, + Parameters.recommendationType, + Parameters.deviceId1, + Parameters.limit, + Parameters.skipToken + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.IotRecommendationListModel + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/security/arm-security/src/operations/iotSecuritySolution.ts b/sdk/security/arm-security/src/operations/iotSecuritySolution.ts index 8584de5ac36e..518f7a04a3d4 100644 --- a/sdk/security/arm-security/src/operations/iotSecuritySolution.ts +++ b/sdk/security/arm-security/src/operations/iotSecuritySolution.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -236,7 +235,7 @@ export class IotSecuritySolution { * @param [options] The optional parameters * @returns Promise */ - listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listBySubscriptionNext(nextPageLink: string, options?: Models.IotSecuritySolutionListBySubscriptionNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback @@ -247,8 +246,8 @@ export class IotSecuritySolution { * @param options The optional parameters * @param callback The callback */ - listBySubscriptionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listBySubscriptionNext(nextPageLink: string, options: Models.IotSecuritySolutionListBySubscriptionNextOptionalParams, callback: msRest.ServiceCallback): void; + listBySubscriptionNext(nextPageLink: string, options?: Models.IotSecuritySolutionListBySubscriptionNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, @@ -264,7 +263,7 @@ export class IotSecuritySolution { * @param [options] The optional parameters * @returns Promise */ - listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listByResourceGroupNext(nextPageLink: string, options?: Models.IotSecuritySolutionListByResourceGroupNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback @@ -275,8 +274,8 @@ export class IotSecuritySolution { * @param options The optional parameters * @param callback The callback */ - listByResourceGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listByResourceGroupNext(nextPageLink: string, options: Models.IotSecuritySolutionListByResourceGroupNextOptionalParams, callback: msRest.ServiceCallback): void; + listByResourceGroupNext(nextPageLink: string, options?: Models.IotSecuritySolutionListByResourceGroupNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, @@ -461,6 +460,10 @@ const listBySubscriptionNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion3, + Parameters.filter + ], headerParameters: [ Parameters.acceptLanguage ], @@ -482,6 +485,10 @@ const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion3, + Parameters.filter + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/security/arm-security/src/operations/iotSecuritySolutionAnalytics.ts b/sdk/security/arm-security/src/operations/iotSecuritySolutionAnalytics.ts index e66f18882294..cbf20304731d 100644 --- a/sdk/security/arm-security/src/operations/iotSecuritySolutionAnalytics.ts +++ b/sdk/security/arm-security/src/operations/iotSecuritySolutionAnalytics.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is diff --git a/sdk/security/arm-security/src/operations/iotSecuritySolutionsAnalyticsAggregatedAlert.ts b/sdk/security/arm-security/src/operations/iotSecuritySolutionsAnalyticsAggregatedAlert.ts index 914c656d760d..b1b6e7eb8ed4 100644 --- a/sdk/security/arm-security/src/operations/iotSecuritySolutionsAnalyticsAggregatedAlert.ts +++ b/sdk/security/arm-security/src/operations/iotSecuritySolutionsAnalyticsAggregatedAlert.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -146,7 +145,7 @@ export class IotSecuritySolutionsAnalyticsAggregatedAlert { * @param [options] The optional parameters * @returns Promise */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listNext(nextPageLink: string, options?: Models.IotSecuritySolutionsAnalyticsAggregatedAlertListNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback @@ -157,8 +156,8 @@ export class IotSecuritySolutionsAnalyticsAggregatedAlert { * @param options The optional parameters * @param callback The callback */ - listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listNext(nextPageLink: string, options: Models.IotSecuritySolutionsAnalyticsAggregatedAlertListNextOptionalParams, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: Models.IotSecuritySolutionsAnalyticsAggregatedAlertListNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, @@ -254,6 +253,10 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion3, + Parameters.top + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/security/arm-security/src/operations/iotSecuritySolutionsAnalyticsRecommendation.ts b/sdk/security/arm-security/src/operations/iotSecuritySolutionsAnalyticsRecommendation.ts index 2801c7369e88..ca0efaadd443 100644 --- a/sdk/security/arm-security/src/operations/iotSecuritySolutionsAnalyticsRecommendation.ts +++ b/sdk/security/arm-security/src/operations/iotSecuritySolutionsAnalyticsRecommendation.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -109,7 +108,7 @@ export class IotSecuritySolutionsAnalyticsRecommendation { * @param [options] The optional parameters * @returns Promise */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listNext(nextPageLink: string, options?: Models.IotSecuritySolutionsAnalyticsRecommendationListNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback @@ -120,8 +119,8 @@ export class IotSecuritySolutionsAnalyticsRecommendation { * @param options The optional parameters * @param callback The callback */ - listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listNext(nextPageLink: string, options: Models.IotSecuritySolutionsAnalyticsRecommendationListNextOptionalParams, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: Models.IotSecuritySolutionsAnalyticsRecommendationListNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, @@ -193,6 +192,10 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion3, + Parameters.top + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/security/arm-security/src/operations/iotSensors.ts b/sdk/security/arm-security/src/operations/iotSensors.ts new file mode 100644 index 000000000000..c53e96964ac8 --- /dev/null +++ b/sdk/security/arm-security/src/operations/iotSensors.ts @@ -0,0 +1,448 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/iotSensorsMappers"; +import * as Parameters from "../models/parameters"; +import { SecurityCenterContext } from "../securityCenterContext"; + +/** Class representing a IotSensors. */ +export class IotSensors { + private readonly client: SecurityCenterContext; + + /** + * Create a IotSensors. + * @param {SecurityCenterContext} client Reference to the service client. + */ + constructor(client: SecurityCenterContext) { + this.client = client; + } + + /** + * List IoT sensors + * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub) + * @param [options] The optional parameters + * @returns Promise + */ + list(scope: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub) + * @param callback The callback + */ + list(scope: string, callback: msRest.ServiceCallback): void; + /** + * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub) + * @param options The optional parameters + * @param callback The callback + */ + list(scope: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(scope: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scope, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Get IoT sensor + * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub) + * @param iotSensorName Name of the IoT sensor + * @param [options] The optional parameters + * @returns Promise + */ + get(scope: string, iotSensorName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub) + * @param iotSensorName Name of the IoT sensor + * @param callback The callback + */ + get(scope: string, iotSensorName: string, callback: msRest.ServiceCallback): void; + /** + * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub) + * @param iotSensorName Name of the IoT sensor + * @param options The optional parameters + * @param callback The callback + */ + get(scope: string, iotSensorName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(scope: string, iotSensorName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scope, + iotSensorName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Create or update IoT sensor + * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub) + * @param iotSensorName Name of the IoT sensor + * @param iotSensorsModel The IoT sensor model + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(scope: string, iotSensorName: string, iotSensorsModel: Models.IotSensorsModel, options?: msRest.RequestOptionsBase): Promise; + /** + * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub) + * @param iotSensorName Name of the IoT sensor + * @param iotSensorsModel The IoT sensor model + * @param callback The callback + */ + createOrUpdate(scope: string, iotSensorName: string, iotSensorsModel: Models.IotSensorsModel, callback: msRest.ServiceCallback): void; + /** + * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub) + * @param iotSensorName Name of the IoT sensor + * @param iotSensorsModel The IoT sensor model + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdate(scope: string, iotSensorName: string, iotSensorsModel: Models.IotSensorsModel, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(scope: string, iotSensorName: string, iotSensorsModel: Models.IotSensorsModel, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scope, + iotSensorName, + iotSensorsModel, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; + } + + /** + * Delete IoT sensor + * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub) + * @param iotSensorName Name of the IoT sensor + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(scope: string, iotSensorName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub) + * @param iotSensorName Name of the IoT sensor + * @param callback The callback + */ + deleteMethod(scope: string, iotSensorName: string, callback: msRest.ServiceCallback): void; + /** + * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub) + * @param iotSensorName Name of the IoT sensor + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(scope: string, iotSensorName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(scope: string, iotSensorName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scope, + iotSensorName, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * Download sensor activation file + * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub) + * @param iotSensorName Name of the IoT sensor + * @param [options] The optional parameters + * @returns Promise + */ + downloadActivation(scope: string, iotSensorName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub) + * @param iotSensorName Name of the IoT sensor + * @param callback The callback + */ + downloadActivation(scope: string, iotSensorName: string, callback: msRest.ServiceCallback): void; + /** + * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub) + * @param iotSensorName Name of the IoT sensor + * @param options The optional parameters + * @param callback The callback + */ + downloadActivation(scope: string, iotSensorName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + downloadActivation(scope: string, iotSensorName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scope, + iotSensorName, + options + }, + downloadActivationOperationSpec, + callback) as Promise; + } + + /** + * Download file for reset password of the sensor + * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub) + * @param iotSensorName Name of the IoT sensor + * @param body The reset password input. + * @param [options] The optional parameters + * @returns Promise + */ + downloadResetPassword(scope: string, iotSensorName: string, body: Models.ResetPasswordInput, options?: msRest.RequestOptionsBase): Promise; + /** + * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub) + * @param iotSensorName Name of the IoT sensor + * @param body The reset password input. + * @param callback The callback + */ + downloadResetPassword(scope: string, iotSensorName: string, body: Models.ResetPasswordInput, callback: msRest.ServiceCallback): void; + /** + * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub) + * @param iotSensorName Name of the IoT sensor + * @param body The reset password input. + * @param options The optional parameters + * @param callback The callback + */ + downloadResetPassword(scope: string, iotSensorName: string, body: Models.ResetPasswordInput, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + downloadResetPassword(scope: string, iotSensorName: string, body: Models.ResetPasswordInput, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scope, + iotSensorName, + body, + options + }, + downloadResetPasswordOperationSpec, + callback) as Promise; + } + + /** + * Trigger threat intelligence package update + * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub) + * @param iotSensorName Name of the IoT sensor + * @param [options] The optional parameters + * @returns Promise + */ + triggerTiPackageUpdate(scope: string, iotSensorName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub) + * @param iotSensorName Name of the IoT sensor + * @param callback The callback + */ + triggerTiPackageUpdate(scope: string, iotSensorName: string, callback: msRest.ServiceCallback): void; + /** + * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub) + * @param iotSensorName Name of the IoT sensor + * @param options The optional parameters + * @param callback The callback + */ + triggerTiPackageUpdate(scope: string, iotSensorName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + triggerTiPackageUpdate(scope: string, iotSensorName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scope, + iotSensorName, + options + }, + triggerTiPackageUpdateOperationSpec, + callback); + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "{scope}/providers/Microsoft.Security/iotSensors", + urlParameters: [ + Parameters.scope + ], + queryParameters: [ + Parameters.apiVersion10 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.IotSensorsList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "{scope}/providers/Microsoft.Security/iotSensors/{iotSensorName}", + urlParameters: [ + Parameters.scope, + Parameters.iotSensorName + ], + queryParameters: [ + Parameters.apiVersion10 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.IotSensorsModel + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "{scope}/providers/Microsoft.Security/iotSensors/{iotSensorName}", + urlParameters: [ + Parameters.scope, + Parameters.iotSensorName + ], + queryParameters: [ + Parameters.apiVersion10 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "iotSensorsModel", + mapper: { + ...Mappers.IotSensorsModel, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.IotSensorsModel + }, + 201: { + bodyMapper: Mappers.IotSensorsModel + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "{scope}/providers/Microsoft.Security/iotSensors/{iotSensorName}", + urlParameters: [ + Parameters.scope, + Parameters.iotSensorName + ], + queryParameters: [ + Parameters.apiVersion10 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const downloadActivationOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "{scope}/providers/Microsoft.Security/iotSensors/{iotSensorName}/downloadActivation", + urlParameters: [ + Parameters.scope, + Parameters.iotSensorName + ], + queryParameters: [ + Parameters.apiVersion10 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: { + serializedName: "parsedResponse", + type: { + name: "Stream" + } + } + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const downloadResetPasswordOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "{scope}/providers/Microsoft.Security/iotSensors/{iotSensorName}/downloadResetPassword", + urlParameters: [ + Parameters.scope, + Parameters.iotSensorName + ], + queryParameters: [ + Parameters.apiVersion10 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "body", + mapper: { + ...Mappers.ResetPasswordInput, + required: true + } + }, + responses: { + 200: { + bodyMapper: { + serializedName: "parsedResponse", + type: { + name: "Stream" + } + } + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const triggerTiPackageUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "{scope}/providers/Microsoft.Security/iotSensors/{iotSensorName}/triggerTiPackageUpdate", + urlParameters: [ + Parameters.scope, + Parameters.iotSensorName + ], + queryParameters: [ + Parameters.apiVersion10 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/security/arm-security/src/operations/iotSites.ts b/sdk/security/arm-security/src/operations/iotSites.ts new file mode 100644 index 000000000000..de634105c550 --- /dev/null +++ b/sdk/security/arm-security/src/operations/iotSites.ts @@ -0,0 +1,246 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/iotSitesMappers"; +import * as Parameters from "../models/parameters"; +import { SecurityCenterContext } from "../securityCenterContext"; + +/** Class representing a IotSites. */ +export class IotSites { + private readonly client: SecurityCenterContext; + + /** + * Create a IotSites. + * @param {SecurityCenterContext} client Reference to the service client. + */ + constructor(client: SecurityCenterContext) { + this.client = client; + } + + /** + * List IoT sites + * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub) + * @param [options] The optional parameters + * @returns Promise + */ + list(scope: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub) + * @param callback The callback + */ + list(scope: string, callback: msRest.ServiceCallback): void; + /** + * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub) + * @param options The optional parameters + * @param callback The callback + */ + list(scope: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(scope: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scope, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Get IoT site + * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub) + * @param [options] The optional parameters + * @returns Promise + */ + get(scope: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub) + * @param callback The callback + */ + get(scope: string, callback: msRest.ServiceCallback): void; + /** + * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub) + * @param options The optional parameters + * @param callback The callback + */ + get(scope: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(scope: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scope, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Create or update IoT site + * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub) + * @param iotSitesModel The IoT sites model + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(scope: string, iotSitesModel: Models.IotSitesModel, options?: msRest.RequestOptionsBase): Promise; + /** + * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub) + * @param iotSitesModel The IoT sites model + * @param callback The callback + */ + createOrUpdate(scope: string, iotSitesModel: Models.IotSitesModel, callback: msRest.ServiceCallback): void; + /** + * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub) + * @param iotSitesModel The IoT sites model + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdate(scope: string, iotSitesModel: Models.IotSitesModel, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(scope: string, iotSitesModel: Models.IotSitesModel, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scope, + iotSitesModel, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; + } + + /** + * Delete IoT site + * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub) + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(scope: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub) + * @param callback The callback + */ + deleteMethod(scope: string, callback: msRest.ServiceCallback): void; + /** + * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub) + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(scope: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(scope: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scope, + options + }, + deleteMethodOperationSpec, + callback); + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "{scope}/providers/Microsoft.Security/iotSites", + urlParameters: [ + Parameters.scope + ], + queryParameters: [ + Parameters.apiVersion10 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.IotSitesList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "{scope}/providers/Microsoft.Security/iotSites/default", + urlParameters: [ + Parameters.scope + ], + queryParameters: [ + Parameters.apiVersion10 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.IotSitesModel + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "{scope}/providers/Microsoft.Security/iotSites/default", + urlParameters: [ + Parameters.scope + ], + queryParameters: [ + Parameters.apiVersion10 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "iotSitesModel", + mapper: { + ...Mappers.IotSitesModel, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.IotSitesModel + }, + 201: { + bodyMapper: Mappers.IotSitesModel + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "{scope}/providers/Microsoft.Security/iotSites/default", + urlParameters: [ + Parameters.scope + ], + queryParameters: [ + Parameters.apiVersion10 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/security/arm-security/src/operations/jitNetworkAccessPolicies.ts b/sdk/security/arm-security/src/operations/jitNetworkAccessPolicies.ts index 9659d3beb32d..391c6a53858c 100644 --- a/sdk/security/arm-security/src/operations/jitNetworkAccessPolicies.ts +++ b/sdk/security/arm-security/src/operations/jitNetworkAccessPolicies.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -627,6 +626,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion7 + ], headerParameters: [ Parameters.acceptLanguage ], @@ -648,6 +650,9 @@ const listByRegionNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion7 + ], headerParameters: [ Parameters.acceptLanguage ], @@ -669,6 +674,9 @@ const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion7 + ], headerParameters: [ Parameters.acceptLanguage ], @@ -690,6 +698,9 @@ const listByResourceGroupAndRegionNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion7 + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/security/arm-security/src/operations/locations.ts b/sdk/security/arm-security/src/operations/locations.ts index 6fddbae9fa18..a6af884c815b 100644 --- a/sdk/security/arm-security/src/operations/locations.ts +++ b/sdk/security/arm-security/src/operations/locations.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -163,6 +162,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion4 + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/security/arm-security/src/operations/onPremiseIotSensors.ts b/sdk/security/arm-security/src/operations/onPremiseIotSensors.ts new file mode 100644 index 000000000000..16b1b5b901df --- /dev/null +++ b/sdk/security/arm-security/src/operations/onPremiseIotSensors.ts @@ -0,0 +1,359 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/onPremiseIotSensorsMappers"; +import * as Parameters from "../models/parameters"; +import { SecurityCenterContext } from "../securityCenterContext"; + +/** Class representing a OnPremiseIotSensors. */ +export class OnPremiseIotSensors { + private readonly client: SecurityCenterContext; + + /** + * Create a OnPremiseIotSensors. + * @param {SecurityCenterContext} client Reference to the service client. + */ + constructor(client: SecurityCenterContext) { + this.client = client; + } + + /** + * List on-premise IoT sensors + * @param [options] The optional parameters + * @returns Promise + */ + list(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + list(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Get on-premise IoT sensor + * @param onPremiseIotSensorName Name of the on-premise IoT sensor + * @param [options] The optional parameters + * @returns Promise + */ + get(onPremiseIotSensorName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param onPremiseIotSensorName Name of the on-premise IoT sensor + * @param callback The callback + */ + get(onPremiseIotSensorName: string, callback: msRest.ServiceCallback): void; + /** + * @param onPremiseIotSensorName Name of the on-premise IoT sensor + * @param options The optional parameters + * @param callback The callback + */ + get(onPremiseIotSensorName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(onPremiseIotSensorName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + onPremiseIotSensorName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Create or update on-premise IoT sensor + * @param onPremiseIotSensorName Name of the on-premise IoT sensor + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(onPremiseIotSensorName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param onPremiseIotSensorName Name of the on-premise IoT sensor + * @param callback The callback + */ + createOrUpdate(onPremiseIotSensorName: string, callback: msRest.ServiceCallback): void; + /** + * @param onPremiseIotSensorName Name of the on-premise IoT sensor + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdate(onPremiseIotSensorName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(onPremiseIotSensorName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + onPremiseIotSensorName, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; + } + + /** + * Delete on-premise IoT sensor + * @param onPremiseIotSensorName Name of the on-premise IoT sensor + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(onPremiseIotSensorName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param onPremiseIotSensorName Name of the on-premise IoT sensor + * @param callback The callback + */ + deleteMethod(onPremiseIotSensorName: string, callback: msRest.ServiceCallback): void; + /** + * @param onPremiseIotSensorName Name of the on-premise IoT sensor + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(onPremiseIotSensorName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(onPremiseIotSensorName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + onPremiseIotSensorName, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * Download sensor activation file + * @param onPremiseIotSensorName Name of the on-premise IoT sensor + * @param [options] The optional parameters + * @returns Promise + */ + downloadActivation(onPremiseIotSensorName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param onPremiseIotSensorName Name of the on-premise IoT sensor + * @param callback The callback + */ + downloadActivation(onPremiseIotSensorName: string, callback: msRest.ServiceCallback): void; + /** + * @param onPremiseIotSensorName Name of the on-premise IoT sensor + * @param options The optional parameters + * @param callback The callback + */ + downloadActivation(onPremiseIotSensorName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + downloadActivation(onPremiseIotSensorName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + onPremiseIotSensorName, + options + }, + downloadActivationOperationSpec, + callback) as Promise; + } + + /** + * Download file for reset password of the sensor + * @param onPremiseIotSensorName Name of the on-premise IoT sensor + * @param body Input for reset password. + * @param [options] The optional parameters + * @returns Promise + */ + downloadResetPassword(onPremiseIotSensorName: string, body: Models.ResetPasswordInput, options?: msRest.RequestOptionsBase): Promise; + /** + * @param onPremiseIotSensorName Name of the on-premise IoT sensor + * @param body Input for reset password. + * @param callback The callback + */ + downloadResetPassword(onPremiseIotSensorName: string, body: Models.ResetPasswordInput, callback: msRest.ServiceCallback): void; + /** + * @param onPremiseIotSensorName Name of the on-premise IoT sensor + * @param body Input for reset password. + * @param options The optional parameters + * @param callback The callback + */ + downloadResetPassword(onPremiseIotSensorName: string, body: Models.ResetPasswordInput, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + downloadResetPassword(onPremiseIotSensorName: string, body: Models.ResetPasswordInput, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + onPremiseIotSensorName, + body, + options + }, + downloadResetPasswordOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/onPremiseIotSensors", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion10 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.OnPremiseIotSensorsList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/onPremiseIotSensors/{onPremiseIotSensorName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.onPremiseIotSensorName + ], + queryParameters: [ + Parameters.apiVersion10 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.OnPremiseIotSensor + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/onPremiseIotSensors/{onPremiseIotSensorName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.onPremiseIotSensorName + ], + queryParameters: [ + Parameters.apiVersion10 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.OnPremiseIotSensor + }, + 201: { + bodyMapper: Mappers.OnPremiseIotSensor + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/onPremiseIotSensors/{onPremiseIotSensorName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.onPremiseIotSensorName + ], + queryParameters: [ + Parameters.apiVersion10 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const downloadActivationOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/onPremiseIotSensors/{onPremiseIotSensorName}/downloadActivation", + urlParameters: [ + Parameters.subscriptionId, + Parameters.onPremiseIotSensorName + ], + queryParameters: [ + Parameters.apiVersion10 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: { + serializedName: "parsedResponse", + type: { + name: "Stream" + } + } + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const downloadResetPasswordOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/onPremiseIotSensors/{onPremiseIotSensorName}/downloadResetPassword", + urlParameters: [ + Parameters.subscriptionId, + Parameters.onPremiseIotSensorName + ], + queryParameters: [ + Parameters.apiVersion10 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "body", + mapper: { + ...Mappers.ResetPasswordInput, + required: true + } + }, + responses: { + 200: { + bodyMapper: { + serializedName: "parsedResponse", + type: { + name: "Stream" + } + } + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/security/arm-security/src/operations/operations.ts b/sdk/security/arm-security/src/operations/operations.ts index 15d396b057d3..a1966ba046d4 100644 --- a/sdk/security/arm-security/src/operations/operations.ts +++ b/sdk/security/arm-security/src/operations/operations.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -108,6 +107,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion4 + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/security/arm-security/src/operations/pricings.ts b/sdk/security/arm-security/src/operations/pricings.ts index e604f40d8222..aabe04271f0d 100644 --- a/sdk/security/arm-security/src/operations/pricings.ts +++ b/sdk/security/arm-security/src/operations/pricings.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is diff --git a/sdk/security/arm-security/src/operations/regulatoryComplianceAssessments.ts b/sdk/security/arm-security/src/operations/regulatoryComplianceAssessments.ts index d9e7f429a94d..fed64431d821 100644 --- a/sdk/security/arm-security/src/operations/regulatoryComplianceAssessments.ts +++ b/sdk/security/arm-security/src/operations/regulatoryComplianceAssessments.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -100,7 +99,7 @@ export class RegulatoryComplianceAssessments { * @param [options] The optional parameters * @returns Promise */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listNext(nextPageLink: string, options?: Models.RegulatoryComplianceAssessmentsListNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback @@ -111,8 +110,8 @@ export class RegulatoryComplianceAssessments { * @param options The optional parameters * @param callback The callback */ - listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listNext(nextPageLink: string, options: Models.RegulatoryComplianceAssessmentsListNextOptionalParams, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: Models.RegulatoryComplianceAssessmentsListNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, @@ -184,6 +183,10 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion6, + Parameters.filter + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/security/arm-security/src/operations/regulatoryComplianceControls.ts b/sdk/security/arm-security/src/operations/regulatoryComplianceControls.ts index 5d40b5b0688b..8ee0e81f5f8d 100644 --- a/sdk/security/arm-security/src/operations/regulatoryComplianceControls.ts +++ b/sdk/security/arm-security/src/operations/regulatoryComplianceControls.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -92,7 +91,7 @@ export class RegulatoryComplianceControls { * @param [options] The optional parameters * @returns Promise */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listNext(nextPageLink: string, options?: Models.RegulatoryComplianceControlsListNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback @@ -103,8 +102,8 @@ export class RegulatoryComplianceControls { * @param options The optional parameters * @param callback The callback */ - listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listNext(nextPageLink: string, options: Models.RegulatoryComplianceControlsListNextOptionalParams, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: Models.RegulatoryComplianceControlsListNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, @@ -174,6 +173,10 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion6, + Parameters.filter + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/security/arm-security/src/operations/regulatoryComplianceStandards.ts b/sdk/security/arm-security/src/operations/regulatoryComplianceStandards.ts index 07b2a60f5258..c845ff4b7386 100644 --- a/sdk/security/arm-security/src/operations/regulatoryComplianceStandards.ts +++ b/sdk/security/arm-security/src/operations/regulatoryComplianceStandards.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -84,7 +83,7 @@ export class RegulatoryComplianceStandards { * @param [options] The optional parameters * @returns Promise */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listNext(nextPageLink: string, options?: Models.RegulatoryComplianceStandardsListNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback @@ -95,8 +94,8 @@ export class RegulatoryComplianceStandards { * @param options The optional parameters * @param callback The callback */ - listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listNext(nextPageLink: string, options: Models.RegulatoryComplianceStandardsListNextOptionalParams, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: Models.RegulatoryComplianceStandardsListNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, @@ -164,6 +163,10 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion6, + Parameters.filter + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/security/arm-security/src/operations/secureScoreControlDefinitions.ts b/sdk/security/arm-security/src/operations/secureScoreControlDefinitions.ts index 8f276006fba3..2d91f5faaa02 100644 --- a/sdk/security/arm-security/src/operations/secureScoreControlDefinitions.ts +++ b/sdk/security/arm-security/src/operations/secureScoreControlDefinitions.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -27,7 +26,7 @@ export class SecureScoreControlDefinitions { } /** - * Get definition information on all secure score controls + * List the available security controls, their assessments, and the max score * @param [options] The optional parameters * @returns Promise */ @@ -51,7 +50,8 @@ export class SecureScoreControlDefinitions { } /** - * Get definition information on all secure score controls in subscription level + * For a specified subscription, list the available security controls, their assessments, and the + * max score * @param [options] The optional parameters * @returns Promise */ @@ -75,7 +75,7 @@ export class SecureScoreControlDefinitions { } /** - * Get definition information on all secure score controls + * List the available security controls, their assessments, and the max score * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters * @returns Promise @@ -103,7 +103,8 @@ export class SecureScoreControlDefinitions { } /** - * Get definition information on all secure score controls in subscription level + * For a specified subscription, list the available security controls, their assessments, and the + * max score * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters * @returns Promise @@ -137,7 +138,7 @@ const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "providers/Microsoft.Security/secureScoreControlDefinitions", queryParameters: [ - Parameters.apiVersion8 + Parameters.apiVersion7 ], headerParameters: [ Parameters.acceptLanguage @@ -160,7 +161,7 @@ const listBySubscriptionOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion8 + Parameters.apiVersion7 ], headerParameters: [ Parameters.acceptLanguage @@ -183,6 +184,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion7 + ], headerParameters: [ Parameters.acceptLanguage ], @@ -204,6 +208,9 @@ const listBySubscriptionNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion7 + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/security/arm-security/src/operations/secureScoreControls.ts b/sdk/security/arm-security/src/operations/secureScoreControls.ts index 28c52529053a..de40813934f9 100644 --- a/sdk/security/arm-security/src/operations/secureScoreControls.ts +++ b/sdk/security/arm-security/src/operations/secureScoreControls.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -27,19 +26,22 @@ export class SecureScoreControls { } /** - * Get all secure score controls on specific initiatives inside a scope - * @param secureScoreName The secure score initiative name + * Get all security controls for a specific initiative within a scope + * @param secureScoreName The initiative name. For the ASC Default initiative, use 'ascScore' as in + * the sample request below. * @param [options] The optional parameters * @returns Promise */ listBySecureScore(secureScoreName: string, options?: Models.SecureScoreControlsListBySecureScoreOptionalParams): Promise; /** - * @param secureScoreName The secure score initiative name + * @param secureScoreName The initiative name. For the ASC Default initiative, use 'ascScore' as in + * the sample request below. * @param callback The callback */ listBySecureScore(secureScoreName: string, callback: msRest.ServiceCallback): void; /** - * @param secureScoreName The secure score initiative name + * @param secureScoreName The initiative name. For the ASC Default initiative, use 'ascScore' as in + * the sample request below. * @param options The optional parameters * @param callback The callback */ @@ -55,7 +57,7 @@ export class SecureScoreControls { } /** - * Get all secure score controls on specific initiatives inside a scope + * Get all security controls within a scope * @param [options] The optional parameters * @returns Promise */ @@ -79,12 +81,12 @@ export class SecureScoreControls { } /** - * Get all secure score controls on specific initiatives inside a scope + * Get all security controls for a specific initiative within a scope * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters * @returns Promise */ - listBySecureScoreNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listBySecureScoreNext(nextPageLink: string, options?: Models.SecureScoreControlsListBySecureScoreNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback @@ -95,8 +97,8 @@ export class SecureScoreControls { * @param options The optional parameters * @param callback The callback */ - listBySecureScoreNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listBySecureScoreNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listBySecureScoreNext(nextPageLink: string, options: Models.SecureScoreControlsListBySecureScoreNextOptionalParams, callback: msRest.ServiceCallback): void; + listBySecureScoreNext(nextPageLink: string, options?: Models.SecureScoreControlsListBySecureScoreNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, @@ -107,12 +109,12 @@ export class SecureScoreControls { } /** - * Get all secure score controls on specific initiatives inside a scope + * Get all security controls within a scope * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters * @returns Promise */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listNext(nextPageLink: string, options?: Models.SecureScoreControlsListNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback @@ -123,8 +125,8 @@ export class SecureScoreControls { * @param options The optional parameters * @param callback The callback */ - listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listNext(nextPageLink: string, options: Models.SecureScoreControlsListNextOptionalParams, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: Models.SecureScoreControlsListNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, @@ -145,7 +147,7 @@ const listBySecureScoreOperationSpec: msRest.OperationSpec = { Parameters.secureScoreName ], queryParameters: [ - Parameters.apiVersion8, + Parameters.apiVersion7, Parameters.expand ], headerParameters: [ @@ -169,7 +171,7 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion8, + Parameters.apiVersion7, Parameters.expand ], headerParameters: [ @@ -193,6 +195,10 @@ const listBySecureScoreNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion7, + Parameters.expand + ], headerParameters: [ Parameters.acceptLanguage ], @@ -214,6 +220,10 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion7, + Parameters.expand + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/security/arm-security/src/operations/secureScores.ts b/sdk/security/arm-security/src/operations/secureScores.ts index e873d1617bda..015ea88e0dfb 100644 --- a/sdk/security/arm-security/src/operations/secureScores.ts +++ b/sdk/security/arm-security/src/operations/secureScores.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -27,7 +26,7 @@ export class SecureScores { } /** - * Get secure scores on all your initiatives inside a scope + * List secure scores for all your Security Center initiatives within your current scope. * @param [options] The optional parameters * @returns Promise */ @@ -51,19 +50,23 @@ export class SecureScores { } /** - * Get secure score for a specific initiatives inside a scope - * @param secureScoreName The secure score initiative name + * Get secure score for a specific Security Center initiative within your current scope. For the + * ASC Default initiative, use 'ascScore'. + * @param secureScoreName The initiative name. For the ASC Default initiative, use 'ascScore' as in + * the sample request below. * @param [options] The optional parameters * @returns Promise */ get(secureScoreName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param secureScoreName The secure score initiative name + * @param secureScoreName The initiative name. For the ASC Default initiative, use 'ascScore' as in + * the sample request below. * @param callback The callback */ get(secureScoreName: string, callback: msRest.ServiceCallback): void; /** - * @param secureScoreName The secure score initiative name + * @param secureScoreName The initiative name. For the ASC Default initiative, use 'ascScore' as in + * the sample request below. * @param options The optional parameters * @param callback The callback */ @@ -79,7 +82,7 @@ export class SecureScores { } /** - * Get secure scores on all your initiatives inside a scope + * List secure scores for all your Security Center initiatives within your current scope. * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters * @returns Promise @@ -116,7 +119,7 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion8 + Parameters.apiVersion7 ], headerParameters: [ Parameters.acceptLanguage @@ -140,7 +143,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.secureScoreName ], queryParameters: [ - Parameters.apiVersion8 + Parameters.apiVersion7 ], headerParameters: [ Parameters.acceptLanguage @@ -163,6 +166,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion7 + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/security/arm-security/src/operations/securityContacts.ts b/sdk/security/arm-security/src/operations/securityContacts.ts index e368e7b7cf1f..9a27de7bfaf3 100644 --- a/sdk/security/arm-security/src/operations/securityContacts.ts +++ b/sdk/security/arm-security/src/operations/securityContacts.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -339,6 +338,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion5 + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/security/arm-security/src/operations/securitySolutions.ts b/sdk/security/arm-security/src/operations/securitySolutions.ts new file mode 100644 index 000000000000..4d7313ebbc35 --- /dev/null +++ b/sdk/security/arm-security/src/operations/securitySolutions.ts @@ -0,0 +1,189 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/securitySolutionsMappers"; +import * as Parameters from "../models/parameters"; +import { SecurityCenterContext } from "../securityCenterContext"; + +/** Class representing a SecuritySolutions. */ +export class SecuritySolutions { + private readonly client: SecurityCenterContext; + + /** + * Create a SecuritySolutions. + * @param {SecurityCenterContext} client Reference to the service client. + */ + constructor(client: SecurityCenterContext) { + this.client = client; + } + + /** + * Gets a list of Security Solutions for the subscription. + * @param [options] The optional parameters + * @returns Promise + */ + list(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + list(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Gets a specific Security Solution. + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param securitySolutionName Name of security solution. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, securitySolutionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param securitySolutionName Name of security solution. + * @param callback The callback + */ + get(resourceGroupName: string, securitySolutionName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param securitySolutionName Name of security solution. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, securitySolutionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, securitySolutionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + securitySolutionName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Gets a list of Security Solutions for the subscription. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/securitySolutions", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion7 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SecuritySolutionList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/securitySolutions/{securitySolutionName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.ascLocation, + Parameters.securitySolutionName + ], + queryParameters: [ + Parameters.apiVersion7 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SecuritySolution + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion7 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SecuritySolutionList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/security/arm-security/src/operations/securitySolutionsReferenceDataOperations.ts b/sdk/security/arm-security/src/operations/securitySolutionsReferenceDataOperations.ts new file mode 100644 index 000000000000..04dafd6d92f0 --- /dev/null +++ b/sdk/security/arm-security/src/operations/securitySolutionsReferenceDataOperations.ts @@ -0,0 +1,124 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/securitySolutionsReferenceDataOperationsMappers"; +import * as Parameters from "../models/parameters"; +import { SecurityCenterContext } from "../securityCenterContext"; + +/** Class representing a SecuritySolutionsReferenceDataOperations. */ +export class SecuritySolutionsReferenceDataOperations { + private readonly client: SecurityCenterContext; + + /** + * Create a SecuritySolutionsReferenceDataOperations. + * @param {SecurityCenterContext} client Reference to the service client. + */ + constructor(client: SecurityCenterContext) { + this.client = client; + } + + /** + * Gets a list of all supported Security Solutions for the subscription. + * @param [options] The optional parameters + * @returns Promise + */ + list(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + list(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Gets list of all supported Security Solutions for subscription and location. + * @param [options] The optional parameters + * @returns Promise + */ + listByHomeRegion(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + listByHomeRegion(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + listByHomeRegion(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByHomeRegion(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listByHomeRegionOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/securitySolutionsReferenceData", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion7 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SecuritySolutionsReferenceDataList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByHomeRegionOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/securitySolutionsReferenceData", + urlParameters: [ + Parameters.subscriptionId, + Parameters.ascLocation + ], + queryParameters: [ + Parameters.apiVersion7 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SecuritySolutionsReferenceDataList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/security/arm-security/src/operations/serverVulnerabilityAssessmentOperations.ts b/sdk/security/arm-security/src/operations/serverVulnerabilityAssessmentOperations.ts index 660a35067e2d..9307ec957067 100644 --- a/sdk/security/arm-security/src/operations/serverVulnerabilityAssessmentOperations.ts +++ b/sdk/security/arm-security/src/operations/serverVulnerabilityAssessmentOperations.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -9,6 +8,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; import * as Models from "../models"; import * as Mappers from "../models/serverVulnerabilityAssessmentOperationsMappers"; import * as Parameters from "../models/parameters"; @@ -166,28 +166,23 @@ export class ServerVulnerabilityAssessmentOperations { * @param [options] The optional parameters * @returns Promise */ - deleteMethod(resourceGroupName: string, resourceNamespace: string, resourceType: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group within the user's subscription. The name - * is case insensitive. - * @param resourceNamespace The Namespace of the resource. - * @param resourceType The type of the resource. - * @param resourceName Name of the resource. - * @param callback The callback - */ - deleteMethod(resourceGroupName: string, resourceNamespace: string, resourceType: string, resourceName: string, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, resourceNamespace: string, resourceType: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,resourceNamespace,resourceType,resourceName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + /** + * Removing server vulnerability assessment from a resource. * @param resourceGroupName The name of the resource group within the user's subscription. The name * is case insensitive. * @param resourceNamespace The Namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. - * @param options The optional parameters - * @param callback The callback + * @param [options] The optional parameters + * @returns Promise */ - deleteMethod(resourceGroupName: string, resourceNamespace: string, resourceType: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteMethod(resourceGroupName: string, resourceNamespace: string, resourceType: string, resourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( + beginDeleteMethod(resourceGroupName: string, resourceNamespace: string, resourceType: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( { resourceGroupName, resourceNamespace, @@ -195,8 +190,8 @@ export class ServerVulnerabilityAssessmentOperations { resourceName, options }, - deleteMethodOperationSpec, - callback); + beginDeleteMethodOperationSpec, + options); } } @@ -213,7 +208,7 @@ const listByExtendedResourceOperationSpec: msRest.OperationSpec = { Parameters.resourceName ], queryParameters: [ - Parameters.apiVersion6 + Parameters.apiVersion7 ], headerParameters: [ Parameters.acceptLanguage @@ -241,7 +236,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.serverVulnerabilityAssessment ], queryParameters: [ - Parameters.apiVersion6 + Parameters.apiVersion7 ], headerParameters: [ Parameters.acceptLanguage @@ -269,7 +264,7 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { Parameters.serverVulnerabilityAssessment ], queryParameters: [ - Parameters.apiVersion6 + Parameters.apiVersion7 ], headerParameters: [ Parameters.acceptLanguage @@ -285,7 +280,7 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { serializer }; -const deleteMethodOperationSpec: msRest.OperationSpec = { +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Security/serverVulnerabilityAssessments/{serverVulnerabilityAssessment}", urlParameters: [ @@ -297,13 +292,14 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { Parameters.serverVulnerabilityAssessment ], queryParameters: [ - Parameters.apiVersion6 + Parameters.apiVersion7 ], headerParameters: [ Parameters.acceptLanguage ], responses: { 200: {}, + 202: {}, 204: {}, default: { bodyMapper: Mappers.CloudError diff --git a/sdk/security/arm-security/src/operations/settings.ts b/sdk/security/arm-security/src/operations/settings.ts index dfe07c34cb90..d07565cb45c1 100644 --- a/sdk/security/arm-security/src/operations/settings.ts +++ b/sdk/security/arm-security/src/operations/settings.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -52,18 +51,18 @@ export class Settings { /** * Settings of different configurations in security center - * @param settingName Name of setting: (MCAS/WDATP). Possible values include: 'MCAS', 'WDATP' + * @param settingName The name of the setting. Possible values include: 'MCAS', 'WDATP', 'Sentinel' * @param [options] The optional parameters * @returns Promise */ get(settingName: Models.SettingName, options?: msRest.RequestOptionsBase): Promise; /** - * @param settingName Name of setting: (MCAS/WDATP). Possible values include: 'MCAS', 'WDATP' + * @param settingName The name of the setting. Possible values include: 'MCAS', 'WDATP', 'Sentinel' * @param callback The callback */ get(settingName: Models.SettingName, callback: msRest.ServiceCallback): void; /** - * @param settingName Name of setting: (MCAS/WDATP). Possible values include: 'MCAS', 'WDATP' + * @param settingName The name of the setting. Possible values include: 'MCAS', 'WDATP', 'Sentinel' * @param options The optional parameters * @param callback The callback */ @@ -80,20 +79,20 @@ export class Settings { /** * updating settings about different configurations in security center - * @param settingName Name of setting: (MCAS/WDATP). Possible values include: 'MCAS', 'WDATP' + * @param settingName The name of the setting. Possible values include: 'MCAS', 'WDATP', 'Sentinel' * @param setting Setting object * @param [options] The optional parameters * @returns Promise */ update(settingName: Models.SettingName1, setting: Models.SettingUnion, options?: msRest.RequestOptionsBase): Promise; /** - * @param settingName Name of setting: (MCAS/WDATP). Possible values include: 'MCAS', 'WDATP' + * @param settingName The name of the setting. Possible values include: 'MCAS', 'WDATP', 'Sentinel' * @param setting Setting object * @param callback The callback */ update(settingName: Models.SettingName1, setting: Models.SettingUnion, callback: msRest.ServiceCallback): void; /** - * @param settingName Name of setting: (MCAS/WDATP). Possible values include: 'MCAS', 'WDATP' + * @param settingName The name of the setting. Possible values include: 'MCAS', 'WDATP', 'Sentinel' * @param setting Setting object * @param options The optional parameters * @param callback The callback @@ -148,7 +147,7 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion2 + Parameters.apiVersion12 ], headerParameters: [ Parameters.acceptLanguage @@ -169,10 +168,10 @@ const getOperationSpec: msRest.OperationSpec = { path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/settings/{settingName}", urlParameters: [ Parameters.subscriptionId, - Parameters.settingName0 + Parameters.settingName1 ], queryParameters: [ - Parameters.apiVersion2 + Parameters.apiVersion12 ], headerParameters: [ Parameters.acceptLanguage @@ -193,10 +192,10 @@ const updateOperationSpec: msRest.OperationSpec = { path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/settings/{settingName}", urlParameters: [ Parameters.subscriptionId, - Parameters.settingName0 + Parameters.settingName1 ], queryParameters: [ - Parameters.apiVersion2 + Parameters.apiVersion12 ], headerParameters: [ Parameters.acceptLanguage @@ -226,6 +225,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion12 + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/security/arm-security/src/operations/softwareInventories.ts b/sdk/security/arm-security/src/operations/softwareInventories.ts new file mode 100644 index 000000000000..e532a81d71dd --- /dev/null +++ b/sdk/security/arm-security/src/operations/softwareInventories.ts @@ -0,0 +1,325 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/softwareInventoriesMappers"; +import * as Parameters from "../models/parameters"; +import { SecurityCenterContext } from "../securityCenterContext"; + +/** Class representing a SoftwareInventories. */ +export class SoftwareInventories { + private readonly client: SecurityCenterContext; + + /** + * Create a SoftwareInventories. + * @param {SecurityCenterContext} client Reference to the service client. + */ + constructor(client: SecurityCenterContext) { + this.client = client; + } + + /** + * Gets the software inventory of the virtual machine. + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param resourceNamespace The namespace of the resource. + * @param resourceType The type of the resource. + * @param resourceName Name of the resource. + * @param [options] The optional parameters + * @returns Promise + */ + listByExtendedResource(resourceGroupName: string, resourceNamespace: string, resourceType: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param resourceNamespace The namespace of the resource. + * @param resourceType The type of the resource. + * @param resourceName Name of the resource. + * @param callback The callback + */ + listByExtendedResource(resourceGroupName: string, resourceNamespace: string, resourceType: string, resourceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param resourceNamespace The namespace of the resource. + * @param resourceType The type of the resource. + * @param resourceName Name of the resource. + * @param options The optional parameters + * @param callback The callback + */ + listByExtendedResource(resourceGroupName: string, resourceNamespace: string, resourceType: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByExtendedResource(resourceGroupName: string, resourceNamespace: string, resourceType: string, resourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceNamespace, + resourceType, + resourceName, + options + }, + listByExtendedResourceOperationSpec, + callback) as Promise; + } + + /** + * Gets the software inventory of all virtual machines in the subscriptions. + * @param [options] The optional parameters + * @returns Promise + */ + listBySubscription(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + listBySubscription(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + listBySubscription(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listBySubscription(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listBySubscriptionOperationSpec, + callback) as Promise; + } + + /** + * Gets a single software data of the virtual machine. + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param resourceNamespace The namespace of the resource. + * @param resourceType The type of the resource. + * @param resourceName Name of the resource. + * @param softwareName Name of the installed software. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, resourceNamespace: string, resourceType: string, resourceName: string, softwareName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param resourceNamespace The namespace of the resource. + * @param resourceType The type of the resource. + * @param resourceName Name of the resource. + * @param softwareName Name of the installed software. + * @param callback The callback + */ + get(resourceGroupName: string, resourceNamespace: string, resourceType: string, resourceName: string, softwareName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param resourceNamespace The namespace of the resource. + * @param resourceType The type of the resource. + * @param resourceName Name of the resource. + * @param softwareName Name of the installed software. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, resourceNamespace: string, resourceType: string, resourceName: string, softwareName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, resourceNamespace: string, resourceType: string, resourceName: string, softwareName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceNamespace, + resourceType, + resourceName, + softwareName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Gets the software inventory of the virtual machine. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByExtendedResourceNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByExtendedResourceNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByExtendedResourceNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByExtendedResourceNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByExtendedResourceNextOperationSpec, + callback) as Promise; + } + + /** + * Gets the software inventory of all virtual machines in the subscriptions. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listBySubscriptionNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listBySubscriptionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listBySubscriptionNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByExtendedResourceOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Security/softwareInventories", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceNamespace, + Parameters.resourceType, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion14 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SoftwaresList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listBySubscriptionOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/softwareInventories", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion14 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SoftwaresList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Security/softwareInventories/{softwareName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceNamespace, + Parameters.resourceType, + Parameters.resourceName, + Parameters.softwareName + ], + queryParameters: [ + Parameters.apiVersion14 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Software + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByExtendedResourceNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion14 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SoftwaresList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listBySubscriptionNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion14 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SoftwaresList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/security/arm-security/src/operations/sqlVulnerabilityAssessmentBaselineRules.ts b/sdk/security/arm-security/src/operations/sqlVulnerabilityAssessmentBaselineRules.ts new file mode 100644 index 000000000000..a2407e00d3f8 --- /dev/null +++ b/sdk/security/arm-security/src/operations/sqlVulnerabilityAssessmentBaselineRules.ts @@ -0,0 +1,359 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/sqlVulnerabilityAssessmentBaselineRulesMappers"; +import * as Parameters from "../models/parameters"; +import { SecurityCenterContext } from "../securityCenterContext"; + +/** Class representing a SqlVulnerabilityAssessmentBaselineRules. */ +export class SqlVulnerabilityAssessmentBaselineRules { + private readonly client: SecurityCenterContext; + + /** + * Create a SqlVulnerabilityAssessmentBaselineRules. + * @param {SecurityCenterContext} client Reference to the service client. + */ + constructor(client: SecurityCenterContext) { + this.client = client; + } + + /** + * @summary Creates a Baseline for a rule in a database. Will overwrite any previously existing + * results. + * @param ruleId The rule Id. + * @param workspaceId The workspace Id. + * @param apiVersion The api version. + * @param resourceId The identifier of the resource. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(ruleId: string, workspaceId: string, apiVersion: string, resourceId: string, options?: Models.SqlVulnerabilityAssessmentBaselineRulesCreateOrUpdateOptionalParams): Promise; + /** + * @param ruleId The rule Id. + * @param workspaceId The workspace Id. + * @param apiVersion The api version. + * @param resourceId The identifier of the resource. + * @param callback The callback + */ + createOrUpdate(ruleId: string, workspaceId: string, apiVersion: string, resourceId: string, callback: msRest.ServiceCallback): void; + /** + * @param ruleId The rule Id. + * @param workspaceId The workspace Id. + * @param apiVersion The api version. + * @param resourceId The identifier of the resource. + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdate(ruleId: string, workspaceId: string, apiVersion: string, resourceId: string, options: Models.SqlVulnerabilityAssessmentBaselineRulesCreateOrUpdateOptionalParams, callback: msRest.ServiceCallback): void; + createOrUpdate(ruleId: string, workspaceId: string, apiVersion: string, resourceId: string, options?: Models.SqlVulnerabilityAssessmentBaselineRulesCreateOrUpdateOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + ruleId, + workspaceId, + apiVersion, + resourceId, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; + } + + /** + * @summary Gets the results for a given rule in the Baseline. + * @param ruleId The rule Id. + * @param workspaceId The workspace Id. + * @param apiVersion The api version. + * @param resourceId The identifier of the resource. + * @param [options] The optional parameters + * @returns Promise + */ + get(ruleId: string, workspaceId: string, apiVersion: string, resourceId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param ruleId The rule Id. + * @param workspaceId The workspace Id. + * @param apiVersion The api version. + * @param resourceId The identifier of the resource. + * @param callback The callback + */ + get(ruleId: string, workspaceId: string, apiVersion: string, resourceId: string, callback: msRest.ServiceCallback): void; + /** + * @param ruleId The rule Id. + * @param workspaceId The workspace Id. + * @param apiVersion The api version. + * @param resourceId The identifier of the resource. + * @param options The optional parameters + * @param callback The callback + */ + get(ruleId: string, workspaceId: string, apiVersion: string, resourceId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(ruleId: string, workspaceId: string, apiVersion: string, resourceId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + ruleId, + workspaceId, + apiVersion, + resourceId, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * @summary Deletes a rule from the Baseline of a given database. + * @param ruleId The rule Id. + * @param workspaceId The workspace Id. + * @param apiVersion The api version. + * @param resourceId The identifier of the resource. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(ruleId: string, workspaceId: string, apiVersion: string, resourceId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param ruleId The rule Id. + * @param workspaceId The workspace Id. + * @param apiVersion The api version. + * @param resourceId The identifier of the resource. + * @param callback The callback + */ + deleteMethod(ruleId: string, workspaceId: string, apiVersion: string, resourceId: string, callback: msRest.ServiceCallback): void; + /** + * @param ruleId The rule Id. + * @param workspaceId The workspace Id. + * @param apiVersion The api version. + * @param resourceId The identifier of the resource. + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(ruleId: string, workspaceId: string, apiVersion: string, resourceId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(ruleId: string, workspaceId: string, apiVersion: string, resourceId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + ruleId, + workspaceId, + apiVersion, + resourceId, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * @summary Gets the results for all rules in the Baseline. + * @param workspaceId The workspace Id. + * @param apiVersion The api version. + * @param resourceId The identifier of the resource. + * @param [options] The optional parameters + * @returns Promise + */ + list(workspaceId: string, apiVersion: string, resourceId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param workspaceId The workspace Id. + * @param apiVersion The api version. + * @param resourceId The identifier of the resource. + * @param callback The callback + */ + list(workspaceId: string, apiVersion: string, resourceId: string, callback: msRest.ServiceCallback): void; + /** + * @param workspaceId The workspace Id. + * @param apiVersion The api version. + * @param resourceId The identifier of the resource. + * @param options The optional parameters + * @param callback The callback + */ + list(workspaceId: string, apiVersion: string, resourceId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(workspaceId: string, apiVersion: string, resourceId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + workspaceId, + apiVersion, + resourceId, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * @summary Add a list of baseline rules. Will overwrite any previously existing results (for all + * rules). + * @param workspaceId The workspace Id. + * @param apiVersion The api version. + * @param resourceId The identifier of the resource. + * @param [options] The optional parameters + * @returns Promise + */ + add(workspaceId: string, apiVersion: string, resourceId: string, options?: Models.SqlVulnerabilityAssessmentBaselineRulesAddOptionalParams): Promise; + /** + * @param workspaceId The workspace Id. + * @param apiVersion The api version. + * @param resourceId The identifier of the resource. + * @param callback The callback + */ + add(workspaceId: string, apiVersion: string, resourceId: string, callback: msRest.ServiceCallback): void; + /** + * @param workspaceId The workspace Id. + * @param apiVersion The api version. + * @param resourceId The identifier of the resource. + * @param options The optional parameters + * @param callback The callback + */ + add(workspaceId: string, apiVersion: string, resourceId: string, options: Models.SqlVulnerabilityAssessmentBaselineRulesAddOptionalParams, callback: msRest.ServiceCallback): void; + add(workspaceId: string, apiVersion: string, resourceId: string, options?: Models.SqlVulnerabilityAssessmentBaselineRulesAddOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + workspaceId, + apiVersion, + resourceId, + options + }, + addOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "{resourceId}/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/baselineRules/{ruleId}", + urlParameters: [ + Parameters.ruleId, + Parameters.resourceId + ], + queryParameters: [ + Parameters.workspaceId, + Parameters.apiVersion9 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: [ + "options", + "body" + ], + mapper: Mappers.RuleResultsInput + }, + responses: { + 200: { + bodyMapper: Mappers.RuleResults + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "{resourceId}/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/baselineRules/{ruleId}", + urlParameters: [ + Parameters.ruleId, + Parameters.resourceId + ], + queryParameters: [ + Parameters.workspaceId, + Parameters.apiVersion9 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RuleResults + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "{resourceId}/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/baselineRules/{ruleId}", + urlParameters: [ + Parameters.ruleId, + Parameters.resourceId + ], + queryParameters: [ + Parameters.workspaceId, + Parameters.apiVersion9 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "{resourceId}/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/baselineRules", + urlParameters: [ + Parameters.resourceId + ], + queryParameters: [ + Parameters.workspaceId, + Parameters.apiVersion9 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RulesResults + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const addOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "{resourceId}/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/baselineRules", + urlParameters: [ + Parameters.resourceId + ], + queryParameters: [ + Parameters.workspaceId, + Parameters.apiVersion9 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: [ + "options", + "body" + ], + mapper: Mappers.RulesResultsInput + }, + responses: { + 200: { + bodyMapper: Mappers.RulesResults + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/security/arm-security/src/operations/sqlVulnerabilityAssessmentScanResults.ts b/sdk/security/arm-security/src/operations/sqlVulnerabilityAssessmentScanResults.ts new file mode 100644 index 000000000000..89a736a9a27a --- /dev/null +++ b/sdk/security/arm-security/src/operations/sqlVulnerabilityAssessmentScanResults.ts @@ -0,0 +1,164 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/sqlVulnerabilityAssessmentScanResultsMappers"; +import * as Parameters from "../models/parameters"; +import { SecurityCenterContext } from "../securityCenterContext"; + +/** Class representing a SqlVulnerabilityAssessmentScanResults. */ +export class SqlVulnerabilityAssessmentScanResults { + private readonly client: SecurityCenterContext; + + /** + * Create a SqlVulnerabilityAssessmentScanResults. + * @param {SecurityCenterContext} client Reference to the service client. + */ + constructor(client: SecurityCenterContext) { + this.client = client; + } + + /** + * @summary Gets the scan results of a single rule in a scan record. + * @param scanId The scan Id. Type 'latest' to get the scan results for the latest scan. + * @param scanResultId The rule Id of the results. + * @param workspaceId The workspace Id. + * @param apiVersion The api version. + * @param resourceId The identifier of the resource. + * @param [options] The optional parameters + * @returns Promise + */ + get(scanId: string, scanResultId: string, workspaceId: string, apiVersion: string, resourceId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param scanId The scan Id. Type 'latest' to get the scan results for the latest scan. + * @param scanResultId The rule Id of the results. + * @param workspaceId The workspace Id. + * @param apiVersion The api version. + * @param resourceId The identifier of the resource. + * @param callback The callback + */ + get(scanId: string, scanResultId: string, workspaceId: string, apiVersion: string, resourceId: string, callback: msRest.ServiceCallback): void; + /** + * @param scanId The scan Id. Type 'latest' to get the scan results for the latest scan. + * @param scanResultId The rule Id of the results. + * @param workspaceId The workspace Id. + * @param apiVersion The api version. + * @param resourceId The identifier of the resource. + * @param options The optional parameters + * @param callback The callback + */ + get(scanId: string, scanResultId: string, workspaceId: string, apiVersion: string, resourceId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(scanId: string, scanResultId: string, workspaceId: string, apiVersion: string, resourceId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scanId, + scanResultId, + workspaceId, + apiVersion, + resourceId, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * @summary Gets a list of scan results for a single scan record. + * @param scanId The scan Id. Type 'latest' to get the scan results for the latest scan. + * @param workspaceId The workspace Id. + * @param apiVersion The api version. + * @param resourceId The identifier of the resource. + * @param [options] The optional parameters + * @returns Promise + */ + list(scanId: string, workspaceId: string, apiVersion: string, resourceId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param scanId The scan Id. Type 'latest' to get the scan results for the latest scan. + * @param workspaceId The workspace Id. + * @param apiVersion The api version. + * @param resourceId The identifier of the resource. + * @param callback The callback + */ + list(scanId: string, workspaceId: string, apiVersion: string, resourceId: string, callback: msRest.ServiceCallback): void; + /** + * @param scanId The scan Id. Type 'latest' to get the scan results for the latest scan. + * @param workspaceId The workspace Id. + * @param apiVersion The api version. + * @param resourceId The identifier of the resource. + * @param options The optional parameters + * @param callback The callback + */ + list(scanId: string, workspaceId: string, apiVersion: string, resourceId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(scanId: string, workspaceId: string, apiVersion: string, resourceId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scanId, + workspaceId, + apiVersion, + resourceId, + options + }, + listOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "{resourceId}/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/{scanId}/scanResults/{scanResultId}", + urlParameters: [ + Parameters.scanId, + Parameters.scanResultId, + Parameters.resourceId + ], + queryParameters: [ + Parameters.workspaceId, + Parameters.apiVersion9 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ScanResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "{resourceId}/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/{scanId}/scanResults", + urlParameters: [ + Parameters.scanId, + Parameters.resourceId + ], + queryParameters: [ + Parameters.workspaceId, + Parameters.apiVersion9 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ScanResults + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/security/arm-security/src/operations/sqlVulnerabilityAssessmentScans.ts b/sdk/security/arm-security/src/operations/sqlVulnerabilityAssessmentScans.ts new file mode 100644 index 000000000000..3ea4f5be8f98 --- /dev/null +++ b/sdk/security/arm-security/src/operations/sqlVulnerabilityAssessmentScans.ts @@ -0,0 +1,154 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/sqlVulnerabilityAssessmentScansMappers"; +import * as Parameters from "../models/parameters"; +import { SecurityCenterContext } from "../securityCenterContext"; + +/** Class representing a SqlVulnerabilityAssessmentScans. */ +export class SqlVulnerabilityAssessmentScans { + private readonly client: SecurityCenterContext; + + /** + * Create a SqlVulnerabilityAssessmentScans. + * @param {SecurityCenterContext} client Reference to the service client. + */ + constructor(client: SecurityCenterContext) { + this.client = client; + } + + /** + * @summary Gets the scan details of a single scan record. + * @param scanId The scan Id. Type 'latest' to get the scan record for the latest scan. + * @param workspaceId The workspace Id. + * @param apiVersion The api version. + * @param resourceId The identifier of the resource. + * @param [options] The optional parameters + * @returns Promise + */ + get(scanId: string, workspaceId: string, apiVersion: string, resourceId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param scanId The scan Id. Type 'latest' to get the scan record for the latest scan. + * @param workspaceId The workspace Id. + * @param apiVersion The api version. + * @param resourceId The identifier of the resource. + * @param callback The callback + */ + get(scanId: string, workspaceId: string, apiVersion: string, resourceId: string, callback: msRest.ServiceCallback): void; + /** + * @param scanId The scan Id. Type 'latest' to get the scan record for the latest scan. + * @param workspaceId The workspace Id. + * @param apiVersion The api version. + * @param resourceId The identifier of the resource. + * @param options The optional parameters + * @param callback The callback + */ + get(scanId: string, workspaceId: string, apiVersion: string, resourceId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(scanId: string, workspaceId: string, apiVersion: string, resourceId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scanId, + workspaceId, + apiVersion, + resourceId, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * @summary Gets a list of scan records. + * @param workspaceId The workspace Id. + * @param apiVersion The api version. + * @param resourceId The identifier of the resource. + * @param [options] The optional parameters + * @returns Promise + */ + list(workspaceId: string, apiVersion: string, resourceId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param workspaceId The workspace Id. + * @param apiVersion The api version. + * @param resourceId The identifier of the resource. + * @param callback The callback + */ + list(workspaceId: string, apiVersion: string, resourceId: string, callback: msRest.ServiceCallback): void; + /** + * @param workspaceId The workspace Id. + * @param apiVersion The api version. + * @param resourceId The identifier of the resource. + * @param options The optional parameters + * @param callback The callback + */ + list(workspaceId: string, apiVersion: string, resourceId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(workspaceId: string, apiVersion: string, resourceId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + workspaceId, + apiVersion, + resourceId, + options + }, + listOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "{resourceId}/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/{scanId}", + urlParameters: [ + Parameters.scanId, + Parameters.resourceId + ], + queryParameters: [ + Parameters.workspaceId, + Parameters.apiVersion9 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Scan + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "{resourceId}/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans", + urlParameters: [ + Parameters.resourceId + ], + queryParameters: [ + Parameters.workspaceId, + Parameters.apiVersion9 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Scans + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/security/arm-security/src/operations/subAssessments.ts b/sdk/security/arm-security/src/operations/subAssessments.ts index 64a0fbc45549..fe62009099b6 100644 --- a/sdk/security/arm-security/src/operations/subAssessments.ts +++ b/sdk/security/arm-security/src/operations/subAssessments.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -278,6 +277,9 @@ const listAllNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion6 + ], headerParameters: [ Parameters.acceptLanguage ], @@ -299,6 +301,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion6 + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/security/arm-security/src/operations/tasks.ts b/sdk/security/arm-security/src/operations/tasks.ts index 28712385dcf5..726bc72a067b 100644 --- a/sdk/security/arm-security/src/operations/tasks.ts +++ b/sdk/security/arm-security/src/operations/tasks.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -251,7 +250,7 @@ export class Tasks { * @param [options] The optional parameters * @returns Promise */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listNext(nextPageLink: string, options?: Models.TasksListNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback @@ -262,8 +261,8 @@ export class Tasks { * @param options The optional parameters * @param callback The callback */ - listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listNext(nextPageLink: string, options: Models.TasksListNextOptionalParams, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: Models.TasksListNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, @@ -279,7 +278,7 @@ export class Tasks { * @param [options] The optional parameters * @returns Promise */ - listByHomeRegionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listByHomeRegionNext(nextPageLink: string, options?: Models.TasksListByHomeRegionNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback @@ -290,8 +289,8 @@ export class Tasks { * @param options The optional parameters * @param callback The callback */ - listByHomeRegionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByHomeRegionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listByHomeRegionNext(nextPageLink: string, options: Models.TasksListByHomeRegionNextOptionalParams, callback: msRest.ServiceCallback): void; + listByHomeRegionNext(nextPageLink: string, options?: Models.TasksListByHomeRegionNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, @@ -307,7 +306,7 @@ export class Tasks { * @param [options] The optional parameters * @returns Promise */ - listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listByResourceGroupNext(nextPageLink: string, options?: Models.TasksListByResourceGroupNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback @@ -318,8 +317,8 @@ export class Tasks { * @param options The optional parameters * @param callback The callback */ - listByResourceGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listByResourceGroupNext(nextPageLink: string, options: Models.TasksListByResourceGroupNextOptionalParams, callback: msRest.ServiceCallback): void; + listByResourceGroupNext(nextPageLink: string, options?: Models.TasksListByResourceGroupNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, @@ -514,6 +513,10 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion4, + Parameters.filter + ], headerParameters: [ Parameters.acceptLanguage ], @@ -535,6 +538,10 @@ const listByHomeRegionNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion4, + Parameters.filter + ], headerParameters: [ Parameters.acceptLanguage ], @@ -556,6 +563,10 @@ const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion4, + Parameters.filter + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/security/arm-security/src/operations/topology.ts b/sdk/security/arm-security/src/operations/topology.ts index 05a1723a8999..c41bb2410b82 100644 --- a/sdk/security/arm-security/src/operations/topology.ts +++ b/sdk/security/arm-security/src/operations/topology.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -248,6 +247,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion7 + ], headerParameters: [ Parameters.acceptLanguage ], @@ -269,6 +271,9 @@ const listByHomeRegionNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion7 + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/security/arm-security/src/operations/workspaceSettings.ts b/sdk/security/arm-security/src/operations/workspaceSettings.ts index 242206b5175f..73a69a9bb1a9 100644 --- a/sdk/security/arm-security/src/operations/workspaceSettings.ts +++ b/sdk/security/arm-security/src/operations/workspaceSettings.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -343,6 +342,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion5 + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/security/arm-security/src/securityCenter.ts b/sdk/security/arm-security/src/securityCenter.ts index 5f78c4465490..94a052843133 100644 --- a/sdk/security/arm-security/src/securityCenter.ts +++ b/sdk/security/arm-security/src/securityCenter.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -9,6 +8,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -19,8 +19,6 @@ class SecurityCenter extends SecurityCenterContext { // Operation groups complianceResults: operations.ComplianceResults; pricings: operations.Pricings; - alerts: operations.Alerts; - settings: operations.Settings; advancedThreatProtection: operations.AdvancedThreatProtection; deviceSecurityGroups: operations.DeviceSecurityGroups; iotSecuritySolution: operations.IotSecuritySolution; @@ -38,10 +36,10 @@ class SecurityCenter extends SecurityCenterContext { regulatoryComplianceStandards: operations.RegulatoryComplianceStandards; regulatoryComplianceControls: operations.RegulatoryComplianceControls; regulatoryComplianceAssessments: operations.RegulatoryComplianceAssessments; - serverVulnerabilityAssessment: operations.ServerVulnerabilityAssessmentOperations; subAssessments: operations.SubAssessments; automations: operations.Automations; alertsSuppressionRules: operations.AlertsSuppressionRules; + serverVulnerabilityAssessment: operations.ServerVulnerabilityAssessmentOperations; assessmentsMetadata: operations.AssessmentsMetadata; assessments: operations.Assessments; adaptiveApplicationControls: operations.AdaptiveApplicationControls; @@ -50,25 +48,49 @@ class SecurityCenter extends SecurityCenterContext { topology: operations.Topology; jitNetworkAccessPolicies: operations.JitNetworkAccessPolicies; discoveredSecuritySolutions: operations.DiscoveredSecuritySolutions; + securitySolutionsReferenceData: operations.SecuritySolutionsReferenceDataOperations; externalSecuritySolutions: operations.ExternalSecuritySolutions; secureScores: operations.SecureScores; secureScoreControls: operations.SecureScoreControls; secureScoreControlDefinitions: operations.SecureScoreControlDefinitions; + securitySolutions: operations.SecuritySolutions; + connectors: operations.Connectors; + sqlVulnerabilityAssessmentScans: operations.SqlVulnerabilityAssessmentScans; + sqlVulnerabilityAssessmentScanResults: operations.SqlVulnerabilityAssessmentScanResults; + sqlVulnerabilityAssessmentBaselineRules: operations.SqlVulnerabilityAssessmentBaselineRules; + iotDefenderSettings: operations.IotDefenderSettings; + iotSensors: operations.IotSensors; + devicesForSubscription: operations.DevicesForSubscription; + devicesForHub: operations.DevicesForHub; + device: operations.DeviceOperations; + onPremiseIotSensors: operations.OnPremiseIotSensors; + iotSites: operations.IotSites; + iotAlerts: operations.IotAlerts; + iotAlertTypes: operations.IotAlertTypes; + iotRecommendations: operations.IotRecommendations; + iotRecommendationTypes: operations.IotRecommendationTypes; + alerts: operations.Alerts; + settings: operations.Settings; + ingestionSettings: operations.IngestionSettings; + softwareInventories: operations.SoftwareInventories; /** * Initializes a new instance of the SecurityCenter class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId Azure subscription ID * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved * from Get locations * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, ascLocation: string, options?: Models.SecurityCenterOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, ascLocation: string, options?: Models.SecurityCenterOptions) { super(credentials, subscriptionId, ascLocation, options); this.complianceResults = new operations.ComplianceResults(this); this.pricings = new operations.Pricings(this); - this.alerts = new operations.Alerts(this); - this.settings = new operations.Settings(this); this.advancedThreatProtection = new operations.AdvancedThreatProtection(this); this.deviceSecurityGroups = new operations.DeviceSecurityGroups(this); this.iotSecuritySolution = new operations.IotSecuritySolution(this); @@ -86,10 +108,10 @@ class SecurityCenter extends SecurityCenterContext { this.regulatoryComplianceStandards = new operations.RegulatoryComplianceStandards(this); this.regulatoryComplianceControls = new operations.RegulatoryComplianceControls(this); this.regulatoryComplianceAssessments = new operations.RegulatoryComplianceAssessments(this); - this.serverVulnerabilityAssessment = new operations.ServerVulnerabilityAssessmentOperations(this); this.subAssessments = new operations.SubAssessments(this); this.automations = new operations.Automations(this); this.alertsSuppressionRules = new operations.AlertsSuppressionRules(this); + this.serverVulnerabilityAssessment = new operations.ServerVulnerabilityAssessmentOperations(this); this.assessmentsMetadata = new operations.AssessmentsMetadata(this); this.assessments = new operations.Assessments(this); this.adaptiveApplicationControls = new operations.AdaptiveApplicationControls(this); @@ -98,10 +120,31 @@ class SecurityCenter extends SecurityCenterContext { this.topology = new operations.Topology(this); this.jitNetworkAccessPolicies = new operations.JitNetworkAccessPolicies(this); this.discoveredSecuritySolutions = new operations.DiscoveredSecuritySolutions(this); + this.securitySolutionsReferenceData = new operations.SecuritySolutionsReferenceDataOperations(this); this.externalSecuritySolutions = new operations.ExternalSecuritySolutions(this); this.secureScores = new operations.SecureScores(this); this.secureScoreControls = new operations.SecureScoreControls(this); this.secureScoreControlDefinitions = new operations.SecureScoreControlDefinitions(this); + this.securitySolutions = new operations.SecuritySolutions(this); + this.connectors = new operations.Connectors(this); + this.sqlVulnerabilityAssessmentScans = new operations.SqlVulnerabilityAssessmentScans(this); + this.sqlVulnerabilityAssessmentScanResults = new operations.SqlVulnerabilityAssessmentScanResults(this); + this.sqlVulnerabilityAssessmentBaselineRules = new operations.SqlVulnerabilityAssessmentBaselineRules(this); + this.iotDefenderSettings = new operations.IotDefenderSettings(this); + this.iotSensors = new operations.IotSensors(this); + this.devicesForSubscription = new operations.DevicesForSubscription(this); + this.devicesForHub = new operations.DevicesForHub(this); + this.device = new operations.DeviceOperations(this); + this.onPremiseIotSensors = new operations.OnPremiseIotSensors(this); + this.iotSites = new operations.IotSites(this); + this.iotAlerts = new operations.IotAlerts(this); + this.iotAlertTypes = new operations.IotAlertTypes(this); + this.iotRecommendations = new operations.IotRecommendations(this); + this.iotRecommendationTypes = new operations.IotRecommendationTypes(this); + this.alerts = new operations.Alerts(this); + this.settings = new operations.Settings(this); + this.ingestionSettings = new operations.IngestionSettings(this); + this.softwareInventories = new operations.SoftwareInventories(this); } } diff --git a/sdk/security/arm-security/src/securityCenterContext.ts b/sdk/security/arm-security/src/securityCenterContext.ts index e740963ad836..42fe5c574428 100644 --- a/sdk/security/arm-security/src/securityCenterContext.ts +++ b/sdk/security/arm-security/src/securityCenterContext.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -11,24 +10,30 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; import * as msRestAzure from "@azure/ms-rest-azure-js"; +import { TokenCredential } from "@azure/core-auth"; const packageName = "@azure/arm-security"; -const packageVersion = "2.0.0"; +const packageVersion = "3.0.0"; export class SecurityCenterContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; ascLocation: string; /** * Initializes a new instance of the SecurityCenter class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId Azure subscription ID * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved * from Get locations * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, ascLocation: string, options?: Models.SecurityCenterOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, ascLocation: string, options?: Models.SecurityCenterOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } @@ -42,7 +47,7 @@ export class SecurityCenterContext extends msRestAzure.AzureServiceClient { if (!options) { options = {}; } - if(!options.userAgent) { + if (!options.userAgent) { const defaultUserAgent = msRestAzure.getDefaultUserAgentValue(); options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`; } @@ -57,10 +62,10 @@ export class SecurityCenterContext extends msRestAzure.AzureServiceClient { this.subscriptionId = subscriptionId; this.ascLocation = ascLocation; - if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) { + if (options.acceptLanguage !== null && options.acceptLanguage !== undefined) { this.acceptLanguage = options.acceptLanguage; } - if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { + if (options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout; } } From 9a47f3ddd54640d13afb6e4ec3019b2ba21efb74 Mon Sep 17 00:00:00 2001 From: colawwj <70128817+colawwj@users.noreply.github.com> Date: Mon, 5 Jul 2021 11:14:47 +0800 Subject: [PATCH 03/28] Appconfiguration release (#16190) * arm-appconfiguration-release * arm-appconfiguration-release --- .../arm-appconfiguration/LICENSE.txt | 2 +- .../arm-appconfiguration/README.md | 8 +- .../arm-appconfiguration/package.json | 4 +- .../arm-appconfiguration/rollup.config.js | 4 +- .../src/appConfigurationManagementClient.ts | 7 +- ...appConfigurationManagementClientContext.ts | 11 +- .../src/models/configurationStoresMappers.ts | 13 +- .../arm-appconfiguration/src/models/index.ts | 488 ++++++++++++++++-- .../src/models/keyValuesMappers.ts | 31 ++ .../src/models/mappers.ts | 462 +++++++++++++++-- .../src/models/operationsMappers.ts | 15 +- .../src/models/parameters.ts | 15 +- .../privateEndpointConnectionsMappers.ts | 13 +- .../src/models/privateLinkResourcesMappers.ts | 8 +- .../src/operations/configurationStores.ts | 129 ++--- .../src/operations/index.ts | 6 +- .../src/operations/keyValues.ts | 339 ++++++++++++ .../src/operations/operations.ts | 21 +- .../operations/privateEndpointConnections.ts | 18 +- .../src/operations/privateLinkResources.ts | 14 +- 20 files changed, 1355 insertions(+), 253 deletions(-) create mode 100644 sdk/appconfiguration/arm-appconfiguration/src/models/keyValuesMappers.ts create mode 100644 sdk/appconfiguration/arm-appconfiguration/src/operations/keyValues.ts diff --git a/sdk/appconfiguration/arm-appconfiguration/LICENSE.txt b/sdk/appconfiguration/arm-appconfiguration/LICENSE.txt index ea8fb1516028..2d3163745319 100644 --- a/sdk/appconfiguration/arm-appconfiguration/LICENSE.txt +++ b/sdk/appconfiguration/arm-appconfiguration/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2020 Microsoft +Copyright (c) 2021 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/appconfiguration/arm-appconfiguration/README.md b/sdk/appconfiguration/arm-appconfiguration/README.md index 69b807098b23..a429aeece428 100644 --- a/sdk/appconfiguration/arm-appconfiguration/README.md +++ b/sdk/appconfiguration/arm-appconfiguration/README.md @@ -1,11 +1,11 @@ ## Azure AppConfigurationManagementClient SDK for JavaScript -This package contains an isomorphic SDK (runs both in Node.js and in browsers) for AppConfigurationManagementClient. +This package contains an isomorphic SDK (runs both in node.js and in browsers) for AppConfigurationManagementClient. ### Currently supported environments - [LTS versions of Node.js](https://nodejs.org/about/releases/) -- Latest versions of Safari, Chrome, Edge, and Firefox. +- Latest versions of Safari, Chrome, Edge and Firefox. ### Prerequisites @@ -21,7 +21,6 @@ Install both packages using the below command: ```bash npm install --save @azure/arm-appconfiguration @azure/identity ``` - > **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. @@ -37,7 +36,6 @@ If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/ In the below samples, we pass the credential and the Azure subscription id to instantiate the client. Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. - #### nodejs - Authentication, client creation, and list configurationStores as an example written in JavaScript. ##### Sample code @@ -86,7 +84,7 @@ In browser applications, we recommend using the `InteractiveBrowserCredential` t const credential = new InteractiveBrowserCredential( { clientId: "", - tenantId: "" + tenant: "" }); const client = new Azure.ArmAppconfiguration.AppConfigurationManagementClient(creds, subscriptionId); const skipToken = "testskipToken"; diff --git a/sdk/appconfiguration/arm-appconfiguration/package.json b/sdk/appconfiguration/arm-appconfiguration/package.json index b7c97791c578..f88d369c650f 100644 --- a/sdk/appconfiguration/arm-appconfiguration/package.json +++ b/sdk/appconfiguration/arm-appconfiguration/package.json @@ -2,7 +2,7 @@ "name": "@azure/arm-appconfiguration", "author": "Microsoft Corporation", "description": "AppConfigurationManagementClient Library with typescript type definitions for node.js and browser.", - "version": "1.4.0", + "version": "2.0.0", "dependencies": { "@azure/ms-rest-azure-js": "^2.1.0", "@azure/ms-rest-js": "^2.2.0", @@ -27,7 +27,7 @@ "rollup-plugin-sourcemaps": "^0.4.2", "uglify-js": "^3.6.0" }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/appconfiguration/arm-appconfiguration", + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/feature/v4/sdk/appconfiguration/arm-appconfiguration", "repository": { "type": "git", "url": "https://github.com/Azure/azure-sdk-for-js.git" diff --git a/sdk/appconfiguration/arm-appconfiguration/rollup.config.js b/sdk/appconfiguration/arm-appconfiguration/rollup.config.js index f2f46a79cc4c..7d64489e8bb3 100644 --- a/sdk/appconfiguration/arm-appconfiguration/rollup.config.js +++ b/sdk/appconfiguration/arm-appconfiguration/rollup.config.js @@ -21,8 +21,8 @@ const config = { "@azure/ms-rest-azure-js": "msRestAzure" }, banner: `/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. diff --git a/sdk/appconfiguration/arm-appconfiguration/src/appConfigurationManagementClient.ts b/sdk/appconfiguration/arm-appconfiguration/src/appConfigurationManagementClient.ts index b58eabc6d21f..9af478c242a3 100644 --- a/sdk/appconfiguration/arm-appconfiguration/src/appConfigurationManagementClient.ts +++ b/sdk/appconfiguration/arm-appconfiguration/src/appConfigurationManagementClient.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -22,6 +21,7 @@ class AppConfigurationManagementClient extends AppConfigurationManagementClientC operations: operations.Operations; privateEndpointConnections: operations.PrivateEndpointConnections; privateLinkResources: operations.PrivateLinkResources; + keyValues: operations.KeyValues; /** * Initializes a new instance of the AppConfigurationManagementClient class. @@ -40,6 +40,7 @@ class AppConfigurationManagementClient extends AppConfigurationManagementClientC this.operations = new operations.Operations(this); this.privateEndpointConnections = new operations.PrivateEndpointConnections(this); this.privateLinkResources = new operations.PrivateLinkResources(this); + this.keyValues = new operations.KeyValues(this); } } diff --git a/sdk/appconfiguration/arm-appconfiguration/src/appConfigurationManagementClientContext.ts b/sdk/appconfiguration/arm-appconfiguration/src/appConfigurationManagementClientContext.ts index 72641b89d50e..1da2220ec952 100644 --- a/sdk/appconfiguration/arm-appconfiguration/src/appConfigurationManagementClientContext.ts +++ b/sdk/appconfiguration/arm-appconfiguration/src/appConfigurationManagementClientContext.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -10,11 +9,11 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; -import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; +import { TokenCredential } from "@azure/core-auth"; const packageName = "@azure/arm-appconfiguration"; -const packageVersion = "1.4.0"; +const packageVersion = "2.0.0"; export class AppConfigurationManagementClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials | TokenCredential; @@ -50,7 +49,7 @@ export class AppConfigurationManagementClientContext extends msRestAzure.AzureSe super(credentials, options); - this.apiVersion = '2020-06-01'; + this.apiVersion = '2021-03-01-preview'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; diff --git a/sdk/appconfiguration/arm-appconfiguration/src/models/configurationStoresMappers.ts b/sdk/appconfiguration/arm-appconfiguration/src/models/configurationStoresMappers.ts index d882c951bb98..332c2d807387 100644 --- a/sdk/appconfiguration/arm-appconfiguration/src/models/configurationStoresMappers.ts +++ b/sdk/appconfiguration/arm-appconfiguration/src/models/configurationStoresMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -9,22 +9,27 @@ export { ApiKey, ApiKeyListResult, + AzureEntityResource, BaseResource, ConfigurationStore, ConfigurationStoreListResult, ConfigurationStoreUpdateParameters, EncryptionProperties, - ErrorModel, + ErrorAdditionalInfo, + ErrorDetails, + ErrorResponse, KeyValue, KeyVaultProperties, - ListKeyValueParameters, PrivateEndpoint, PrivateEndpointConnection, PrivateEndpointConnectionReference, PrivateLinkServiceConnectionState, + ProxyResource, RegenerateKeyParameters, Resource, ResourceIdentity, Sku, + SystemData, + TrackedResource, UserIdentity } from "../models/mappers"; diff --git a/sdk/appconfiguration/arm-appconfiguration/src/models/index.ts b/sdk/appconfiguration/arm-appconfiguration/src/models/index.ts index abd3af6a199f..7868061599f2 100644 --- a/sdk/appconfiguration/arm-appconfiguration/src/models/index.ts +++ b/sdk/appconfiguration/arm-appconfiguration/src/models/index.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -160,39 +160,82 @@ export interface Sku { } /** - * An Azure resource. + * 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. Possible values include: 'User', + * 'Application', 'ManagedIdentity', 'Key' + */ + 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. Possible values include: 'User', + * 'Application', 'ManagedIdentity', 'Key' + */ + lastModifiedByType?: CreatedByType; + /** + * The timestamp of resource last modification (UTC) + */ + lastModifiedAt?: Date; +} + +/** + * Common fields that are returned in the response for all Azure Resource Manager resources + * @summary Resource */ export interface Resource extends BaseResource { /** - * The resource ID. + * Fully qualified resource ID for the resource. Ex - + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; /** - * The name of the resource. + * The name of the resource * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; /** - * The type of the resource. + * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + * "Microsoft.Storage/storageAccounts" * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly type?: string; +} + +/** + * The resource model definition for an Azure Resource Manager tracked top level resource which has + * 'tags' and a 'location' + * @summary Tracked Resource + */ +export interface TrackedResource extends Resource { /** - * The location of the resource. This cannot be changed after the resource is created. + * Resource tags. */ - location: string; + tags?: { [propertyName: string]: string }; /** - * The tags of the resource. + * The geo-location where the resource lives */ - tags?: { [propertyName: string]: string }; + location: string; } /** * The configuration store along with all resource properties. The Configuration Store will have * all information to begin utilizing it. */ -export interface ConfigurationStore extends Resource { +export interface ConfigurationStore extends TrackedResource { /** * The managed identity information, if configured. */ @@ -227,10 +270,18 @@ export interface ConfigurationStore extends Resource { * is enabled. Possible values include: 'Enabled', 'Disabled' */ publicNetworkAccess?: PublicNetworkAccess; + /** + * Disables all authentication methods other than AAD authentication. + */ + disableLocalAuth?: boolean; /** * The sku of the configuration store. */ sku: Sku; + /** + * Resource system metadata. + */ + systemData?: SystemData; } /** @@ -241,6 +292,10 @@ export interface ConfigurationStoreUpdateParameters { * The encryption settings of the configuration store. */ encryption?: EncryptionProperties; + /** + * Disables all authentication methods other than AAD authentication. + */ + disableLocalAuth?: boolean; /** * Control permission for data plane traffic coming from public networks while private endpoint * is enabled. Possible values include: 'Enabled', 'Disabled' @@ -339,23 +394,24 @@ export interface RegenerateKeyParameters { } /** - * The parameters used to list a configuration store key-value + * The key-value resource along with all resource properties. */ -export interface ListKeyValueParameters { +export interface KeyValue extends BaseResource { /** - * The key to retrieve. + * The resource ID. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - key: string; + readonly id?: string; /** - * The label of the key. + * The name of the resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - label?: string; -} - -/** - * The result of a request to retrieve a key-value from the specified configuration store. - */ -export interface KeyValue { + readonly name?: string; + /** + * The type of the resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; /** * The primary identifier of a key-value. * The key is used in unison with the label to uniquely identify a key-value. @@ -370,16 +426,14 @@ export interface KeyValue { readonly label?: string; /** * The value of the key-value. - * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly value?: string; + value?: string; /** * The content type of the key-value's value. * Providing a proper content-type can enable transformations of values when they are retrieved * by applications. - * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly contentType?: string; + contentType?: string; /** * An ETag indicating the state of a key-value within a configuration store. * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -398,9 +452,8 @@ export interface KeyValue { readonly locked?: boolean; /** * A dictionary of tags that can help identify what a key-value may be applicable for. - * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly tags?: { [propertyName: string]: string }; + tags?: { [propertyName: string]: string }; } /** @@ -426,6 +479,105 @@ export interface OperationDefinitionDisplay { description?: string; } +/** + * Specifications of the Log for Azure Monitoring + */ +export interface LogSpecification { + /** + * Name of the log + */ + name?: string; + /** + * Localized friendly display name of the log + */ + displayName?: string; + /** + * Blob duration of the log + */ + blobDuration?: string; +} + +/** + * Specifications of the Dimension of metrics + */ +export interface MetricDimension { + /** + * Name of the dimension + */ + name?: string; + /** + * Localized friendly display name of the dimension + */ + displayName?: string; + /** + * Internal name of the dimension. + */ + internalName?: string; +} + +/** + * Specifications of the Metrics for Azure Monitoring + */ +export interface MetricSpecification { + /** + * Name of the metric + */ + name?: string; + /** + * Localized friendly display name of the metric + */ + displayName?: string; + /** + * Localized friendly description of the metric + */ + displayDescription?: string; + /** + * Unit that makes sense for the metric + */ + unit?: string; + /** + * Only provide one value for this field. Valid values: Average, Minimum, Maximum, Total, Count. + */ + aggregationType?: string; + /** + * Internal metric name. + */ + internalMetricName?: string; + /** + * Dimensions of the metric + */ + dimensions?: MetricDimension[]; + /** + * Optional. If set to true, then zero will be returned for time duration where no metric is + * emitted/published. + */ + fillGapWithZero?: boolean; +} + +/** + * Service specification payload + */ +export interface ServiceSpecification { + /** + * Specifications of the Log for Azure Monitoring + */ + logSpecifications?: LogSpecification[]; + /** + * Specifications of the Metrics for Azure Monitoring + */ + metricSpecifications?: MetricSpecification[]; +} + +/** + * Extra Operation properties + */ +export interface OperationProperties { + /** + * Service specifications of the operation + */ + serviceSpecification?: ServiceSpecification; +} + /** * The definition of a configuration store operation. */ @@ -434,24 +586,70 @@ export interface OperationDefinition { * Operation name: {provider}/{resource}/{operation}. */ name?: string; + /** + * Indicates whether the operation is a data action + */ + isDataAction?: boolean; /** * The display information for the configuration store operation. */ display?: OperationDefinitionDisplay; + /** + * Origin of the operation + */ + origin?: string; + /** + * Properties of the operation + */ + properties?: OperationProperties; +} + +/** + * The resource management error additional info. + */ +export interface ErrorAdditionalInfo { + /** + * The additional info type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * The additional info. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly info?: any; } /** - * AppConfiguration error object. + * The details of the error. */ -export interface ErrorModel { +export interface ErrorDetails { /** * Error code. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - code?: string; + readonly code?: string; /** - * Error message. + * Error message indicating why the operation failed. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - message?: string; + readonly message?: string; + /** + * The error additional info. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly additionalInfo?: ErrorAdditionalInfo[]; +} + +/** + * Error response indicates that the service is not able to process the incoming request. The + * reason is provided in the error message. + */ +export interface ErrorResponse { + /** + * The details of the error. + */ + error?: ErrorDetails; } /** @@ -526,6 +724,26 @@ export interface PrivateLinkResource { readonly requiredZoneNames?: string[]; } +/** + * The resource model definition for a Azure Resource Manager proxy resource. It will not have tags + * and a location + * @summary Proxy Resource + */ +export interface ProxyResource extends Resource { +} + +/** + * The resource model definition for an Azure Resource Manager resource with an etag. + * @summary Entity Resource + */ +export interface AzureEntityResource extends Resource { + /** + * Resource Etag. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly etag?: string; +} + /** * Optional Parameters. */ @@ -562,6 +780,42 @@ export interface ConfigurationStoresListKeysOptionalParams extends msRest.Reques skipToken?: string; } +/** + * Optional Parameters. + */ +export interface ConfigurationStoresListNextOptionalParams extends msRest.RequestOptionsBase { + /** + * A skip token is used to continue retrieving items after an operation returns a partial result. + * If a previous response contains a nextLink element, the value of the nextLink element will + * include a skipToken parameter that specifies a starting point to use for subsequent calls. + */ + skipToken?: string; +} + +/** + * Optional Parameters. + */ +export interface ConfigurationStoresListByResourceGroupNextOptionalParams extends msRest.RequestOptionsBase { + /** + * A skip token is used to continue retrieving items after an operation returns a partial result. + * If a previous response contains a nextLink element, the value of the nextLink element will + * include a skipToken parameter that specifies a starting point to use for subsequent calls. + */ + skipToken?: string; +} + +/** + * Optional Parameters. + */ +export interface ConfigurationStoresListKeysNextOptionalParams extends msRest.RequestOptionsBase { + /** + * A skip token is used to continue retrieving items after an operation returns a partial result. + * If a previous response contains a nextLink element, the value of the nextLink element will + * include a skipToken parameter that specifies a starting point to use for subsequent calls. + */ + skipToken?: string; +} + /** * Optional Parameters. */ @@ -574,6 +828,52 @@ export interface OperationsListOptionalParams extends msRest.RequestOptionsBase skipToken?: string; } +/** + * Optional Parameters. + */ +export interface OperationsListNextOptionalParams extends msRest.RequestOptionsBase { + /** + * A skip token is used to continue retrieving items after an operation returns a partial result. + * If a previous response contains a nextLink element, the value of the nextLink element will + * include a skipToken parameter that specifies a starting point to use for subsequent calls. + */ + skipToken?: string; +} + +/** + * Optional Parameters. + */ +export interface KeyValuesListByConfigurationStoreOptionalParams extends msRest.RequestOptionsBase { + /** + * A skip token is used to continue retrieving items after an operation returns a partial result. + * If a previous response contains a nextLink element, the value of the nextLink element will + * include a skipToken parameter that specifies a starting point to use for subsequent calls. + */ + skipToken?: string; +} + +/** + * Optional Parameters. + */ +export interface KeyValuesCreateOrUpdateOptionalParams extends msRest.RequestOptionsBase { + /** + * The parameters for creating a key-value. + */ + keyValueParameters?: KeyValue; +} + +/** + * Optional Parameters. + */ +export interface KeyValuesListByConfigurationStoreNextOptionalParams extends msRest.RequestOptionsBase { + /** + * A skip token is used to continue retrieving items after an operation returns a partial result. + * If a previous response contains a nextLink element, the value of the nextLink element will + * include a skipToken parameter that specifies a starting point to use for subsequent calls. + */ + skipToken?: string; +} + /** * An interface representing AppConfigurationManagementClientOptions. */ @@ -641,6 +941,18 @@ export interface PrivateLinkResourceListResult extends Array + */ +export interface KeyValueListResult extends Array { + /** + * The URI that can be used to request the next set of paged results. + */ + nextLink?: string; +} + /** * Defines values for IdentityType. * Possible values include: 'None', 'SystemAssigned', 'UserAssigned', 'SystemAssigned, @@ -682,6 +994,14 @@ export type ActionsRequired = 'None' | 'Recreate'; */ export type PublicNetworkAccess = 'Enabled' | 'Disabled'; +/** + * Defines values for CreatedByType. + * Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' + * @readonly + * @enum {string} + */ +export type CreatedByType = 'User' | 'Application' | 'ManagedIdentity' | 'Key'; + /** * Contains response data for the list operation. */ @@ -822,26 +1142,6 @@ export type ConfigurationStoresRegenerateKeyResponse = ApiKey & { }; }; -/** - * Contains response data for the listKeyValue operation. - */ -export type ConfigurationStoresListKeyValueResponse = KeyValue & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: KeyValue; - }; -}; - /** * Contains response data for the beginCreate operation. */ @@ -1161,3 +1461,83 @@ export type PrivateLinkResourcesListByConfigurationStoreNextResponse = PrivateLi parsedBody: PrivateLinkResourceListResult; }; }; + +/** + * Contains response data for the listByConfigurationStore operation. + */ +export type KeyValuesListByConfigurationStoreResponse = KeyValueListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: KeyValueListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type KeyValuesGetResponse = KeyValue & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: KeyValue; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type KeyValuesCreateOrUpdateResponse = KeyValue & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: KeyValue; + }; +}; + +/** + * Contains response data for the listByConfigurationStoreNext operation. + */ +export type KeyValuesListByConfigurationStoreNextResponse = KeyValueListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: KeyValueListResult; + }; +}; diff --git a/sdk/appconfiguration/arm-appconfiguration/src/models/keyValuesMappers.ts b/sdk/appconfiguration/arm-appconfiguration/src/models/keyValuesMappers.ts new file mode 100644 index 000000000000..db715a439cc4 --- /dev/null +++ b/sdk/appconfiguration/arm-appconfiguration/src/models/keyValuesMappers.ts @@ -0,0 +1,31 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + AzureEntityResource, + BaseResource, + ConfigurationStore, + EncryptionProperties, + ErrorAdditionalInfo, + ErrorDetails, + ErrorResponse, + KeyValue, + KeyValueListResult, + KeyVaultProperties, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateEndpointConnectionReference, + PrivateLinkServiceConnectionState, + ProxyResource, + Resource, + ResourceIdentity, + Sku, + SystemData, + TrackedResource, + UserIdentity +} from "../models/mappers"; diff --git a/sdk/appconfiguration/arm-appconfiguration/src/models/mappers.ts b/sdk/appconfiguration/arm-appconfiguration/src/models/mappers.ts index 0cfebe6dbc46..bbbb2e1cc699 100644 --- a/sdk/appconfiguration/arm-appconfiguration/src/models/mappers.ts +++ b/sdk/appconfiguration/arm-appconfiguration/src/models/mappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -232,6 +232,52 @@ export const Sku: msRest.CompositeMapper = { } }; +export const SystemData: msRest.CompositeMapper = { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData", + modelProperties: { + createdBy: { + serializedName: "createdBy", + type: { + name: "String" + } + }, + createdByType: { + serializedName: "createdByType", + type: { + name: "String" + } + }, + createdAt: { + serializedName: "createdAt", + type: { + name: "DateTime" + } + }, + lastModifiedBy: { + serializedName: "lastModifiedBy", + type: { + name: "String" + } + }, + lastModifiedByType: { + serializedName: "lastModifiedByType", + type: { + name: "String" + } + }, + lastModifiedAt: { + serializedName: "lastModifiedAt", + type: { + name: "DateTime" + } + } + } + } +}; + export const Resource: msRest.CompositeMapper = { serializedName: "Resource", type: { @@ -258,14 +304,18 @@ export const Resource: msRest.CompositeMapper = { type: { name: "String" } - }, - location: { - required: true, - serializedName: "location", - type: { - name: "String" - } - }, + } + } + } +}; + +export const TrackedResource: msRest.CompositeMapper = { + serializedName: "TrackedResource", + type: { + name: "Composite", + className: "TrackedResource", + modelProperties: { + ...Resource.type.modelProperties, tags: { serializedName: "tags", type: { @@ -276,6 +326,13 @@ export const Resource: msRest.CompositeMapper = { } } } + }, + location: { + required: true, + serializedName: "location", + type: { + name: "String" + } } } } @@ -287,7 +344,7 @@ export const ConfigurationStore: msRest.CompositeMapper = { name: "Composite", className: "ConfigurationStore", modelProperties: { - ...Resource.type.modelProperties, + ...TrackedResource.type.modelProperties, identity: { serializedName: "identity", type: { @@ -342,6 +399,12 @@ export const ConfigurationStore: msRest.CompositeMapper = { name: "String" } }, + disableLocalAuth: { + serializedName: "properties.disableLocalAuth", + type: { + name: "Boolean" + } + }, sku: { required: true, serializedName: "sku", @@ -349,6 +412,13 @@ export const ConfigurationStore: msRest.CompositeMapper = { name: "Composite", className: "Sku" } + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } } } } @@ -367,6 +437,12 @@ export const ConfigurationStoreUpdateParameters: msRest.CompositeMapper = { className: "EncryptionProperties" } }, + disableLocalAuth: { + serializedName: "properties.disableLocalAuth", + type: { + name: "Boolean" + } + }, publicNetworkAccess: { serializedName: "properties.publicNetworkAccess", type: { @@ -527,87 +603,82 @@ export const RegenerateKeyParameters: msRest.CompositeMapper = { } }; -export const ListKeyValueParameters: msRest.CompositeMapper = { - serializedName: "ListKeyValueParameters", +export const KeyValue: msRest.CompositeMapper = { + serializedName: "KeyValue", type: { name: "Composite", - className: "ListKeyValueParameters", + className: "KeyValue", modelProperties: { - key: { - required: true, - serializedName: "key", + id: { + readOnly: true, + serializedName: "id", type: { name: "String" } }, - label: { - serializedName: "label", + name: { + readOnly: true, + serializedName: "name", type: { name: "String" } - } - } - } -}; - -export const KeyValue: msRest.CompositeMapper = { - serializedName: "KeyValue", - type: { - name: "Composite", - className: "KeyValue", - modelProperties: { + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, key: { readOnly: true, - serializedName: "key", + serializedName: "properties.key", type: { name: "String" } }, label: { readOnly: true, - serializedName: "label", + serializedName: "properties.label", type: { name: "String" } }, value: { - readOnly: true, - serializedName: "value", + serializedName: "properties.value", type: { name: "String" } }, contentType: { - readOnly: true, - serializedName: "contentType", + serializedName: "properties.contentType", type: { name: "String" } }, eTag: { readOnly: true, - serializedName: "eTag", + serializedName: "properties.eTag", type: { name: "String" } }, lastModified: { readOnly: true, - serializedName: "lastModified", + serializedName: "properties.lastModified", type: { name: "DateTime" } }, locked: { readOnly: true, - serializedName: "locked", + serializedName: "properties.locked", type: { name: "Boolean" } }, tags: { - readOnly: true, - serializedName: "tags", + serializedName: "properties.tags", type: { name: "Dictionary", value: { @@ -656,6 +727,177 @@ export const OperationDefinitionDisplay: msRest.CompositeMapper = { } }; +export const LogSpecification: msRest.CompositeMapper = { + serializedName: "LogSpecification", + type: { + name: "Composite", + className: "LogSpecification", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + displayName: { + serializedName: "displayName", + type: { + name: "String" + } + }, + blobDuration: { + serializedName: "blobDuration", + type: { + name: "String" + } + } + } + } +}; + +export const MetricDimension: msRest.CompositeMapper = { + serializedName: "MetricDimension", + type: { + name: "Composite", + className: "MetricDimension", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + displayName: { + serializedName: "displayName", + type: { + name: "String" + } + }, + internalName: { + serializedName: "internalName", + type: { + name: "String" + } + } + } + } +}; + +export const MetricSpecification: msRest.CompositeMapper = { + serializedName: "MetricSpecification", + type: { + name: "Composite", + className: "MetricSpecification", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + displayName: { + serializedName: "displayName", + type: { + name: "String" + } + }, + displayDescription: { + serializedName: "displayDescription", + type: { + name: "String" + } + }, + unit: { + serializedName: "unit", + type: { + name: "String" + } + }, + aggregationType: { + serializedName: "aggregationType", + type: { + name: "String" + } + }, + internalMetricName: { + serializedName: "internalMetricName", + type: { + name: "String" + } + }, + dimensions: { + serializedName: "dimensions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MetricDimension" + } + } + } + }, + fillGapWithZero: { + serializedName: "fillGapWithZero", + type: { + name: "Boolean" + } + } + } + } +}; + +export const ServiceSpecification: msRest.CompositeMapper = { + serializedName: "ServiceSpecification", + type: { + name: "Composite", + className: "ServiceSpecification", + modelProperties: { + logSpecifications: { + serializedName: "logSpecifications", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "LogSpecification" + } + } + } + }, + metricSpecifications: { + serializedName: "metricSpecifications", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MetricSpecification" + } + } + } + } + } + } +}; + +export const OperationProperties: msRest.CompositeMapper = { + serializedName: "OperationProperties", + type: { + name: "Composite", + className: "OperationProperties", + modelProperties: { + serviceSpecification: { + serializedName: "serviceSpecification", + type: { + name: "Composite", + className: "ServiceSpecification" + } + } + } + } +}; + export const OperationDefinition: msRest.CompositeMapper = { serializedName: "OperationDefinition", type: { @@ -668,34 +910,109 @@ export const OperationDefinition: msRest.CompositeMapper = { name: "String" } }, + isDataAction: { + serializedName: "isDataAction", + type: { + name: "Boolean" + } + }, display: { serializedName: "display", type: { name: "Composite", className: "OperationDefinitionDisplay" } + }, + origin: { + serializedName: "origin", + type: { + name: "String" + } + }, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "OperationProperties" + } } } } }; -export const ErrorModel: msRest.CompositeMapper = { - serializedName: "Error", +export const ErrorAdditionalInfo: msRest.CompositeMapper = { + serializedName: "ErrorAdditionalInfo", type: { name: "Composite", - className: "ErrorModel", + className: "ErrorAdditionalInfo", + modelProperties: { + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + info: { + readOnly: true, + serializedName: "info", + type: { + name: "Object" + } + } + } + } +}; + +export const ErrorDetails: msRest.CompositeMapper = { + serializedName: "ErrorDetails", + type: { + name: "Composite", + className: "ErrorDetails", modelProperties: { code: { + readOnly: true, serializedName: "code", type: { name: "String" } }, message: { + readOnly: true, serializedName: "message", type: { name: "String" } + }, + additionalInfo: { + readOnly: true, + serializedName: "additionalInfo", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorAdditionalInfo" + } + } + } + } + } + } +}; + +export const ErrorResponse: msRest.CompositeMapper = { + serializedName: "ErrorResponse", + type: { + name: "Composite", + className: "ErrorResponse", + modelProperties: { + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorDetails" + } } } } @@ -816,6 +1133,35 @@ export const PrivateLinkResource: msRest.CompositeMapper = { } }; +export const ProxyResource: msRest.CompositeMapper = { + serializedName: "ProxyResource", + type: { + name: "Composite", + className: "ProxyResource", + modelProperties: { + ...Resource.type.modelProperties + } + } +}; + +export const AzureEntityResource: msRest.CompositeMapper = { + serializedName: "AzureEntityResource", + type: { + name: "Composite", + className: "AzureEntityResource", + modelProperties: { + ...Resource.type.modelProperties, + etag: { + readOnly: true, + serializedName: "etag", + type: { + name: "String" + } + } + } + } +}; + export const ConfigurationStoreListResult: msRest.CompositeMapper = { serializedName: "ConfigurationStoreListResult", type: { @@ -955,3 +1301,31 @@ export const PrivateLinkResourceListResult: msRest.CompositeMapper = { } } }; + +export const KeyValueListResult: msRest.CompositeMapper = { + serializedName: "KeyValueListResult", + type: { + name: "Composite", + className: "KeyValueListResult", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "KeyValue" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; diff --git a/sdk/appconfiguration/arm-appconfiguration/src/models/operationsMappers.ts b/sdk/appconfiguration/arm-appconfiguration/src/models/operationsMappers.ts index 0c4c87228850..ecfb8d258472 100644 --- a/sdk/appconfiguration/arm-appconfiguration/src/models/operationsMappers.ts +++ b/sdk/appconfiguration/arm-appconfiguration/src/models/operationsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -8,9 +8,16 @@ export { CheckNameAvailabilityParameters, - ErrorModel, + ErrorAdditionalInfo, + ErrorDetails, + ErrorResponse, + LogSpecification, + MetricDimension, + MetricSpecification, NameAvailabilityStatus, OperationDefinition, OperationDefinitionDisplay, - OperationDefinitionListResult + OperationDefinitionListResult, + OperationProperties, + ServiceSpecification } from "../models/mappers"; diff --git a/sdk/appconfiguration/arm-appconfiguration/src/models/parameters.ts b/sdk/appconfiguration/arm-appconfiguration/src/models/parameters.ts index d098b569c352..56be9fbd1210 100644 --- a/sdk/appconfiguration/arm-appconfiguration/src/models/parameters.ts +++ b/sdk/appconfiguration/arm-appconfiguration/src/models/parameters.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -55,6 +54,16 @@ export const groupName: msRest.OperationURLParameter = { } } }; +export const keyValueName: msRest.OperationURLParameter = { + parameterPath: "keyValueName", + mapper: { + required: true, + serializedName: "keyValueName", + type: { + name: "String" + } + } +}; export const nextPageLink: msRest.OperationURLParameter = { parameterPath: "nextPageLink", mapper: { diff --git a/sdk/appconfiguration/arm-appconfiguration/src/models/privateEndpointConnectionsMappers.ts b/sdk/appconfiguration/arm-appconfiguration/src/models/privateEndpointConnectionsMappers.ts index 1f38807af79d..64a38f22a5ff 100644 --- a/sdk/appconfiguration/arm-appconfiguration/src/models/privateEndpointConnectionsMappers.ts +++ b/sdk/appconfiguration/arm-appconfiguration/src/models/privateEndpointConnectionsMappers.ts @@ -1,24 +1,31 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { + AzureEntityResource, BaseResource, ConfigurationStore, EncryptionProperties, - ErrorModel, + ErrorAdditionalInfo, + ErrorDetails, + ErrorResponse, + KeyValue, KeyVaultProperties, PrivateEndpoint, PrivateEndpointConnection, PrivateEndpointConnectionListResult, PrivateEndpointConnectionReference, PrivateLinkServiceConnectionState, + ProxyResource, Resource, ResourceIdentity, Sku, + SystemData, + TrackedResource, UserIdentity } from "../models/mappers"; diff --git a/sdk/appconfiguration/arm-appconfiguration/src/models/privateLinkResourcesMappers.ts b/sdk/appconfiguration/arm-appconfiguration/src/models/privateLinkResourcesMappers.ts index 618676a35470..e97da441aa19 100644 --- a/sdk/appconfiguration/arm-appconfiguration/src/models/privateLinkResourcesMappers.ts +++ b/sdk/appconfiguration/arm-appconfiguration/src/models/privateLinkResourcesMappers.ts @@ -1,13 +1,15 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - ErrorModel, + ErrorAdditionalInfo, + ErrorDetails, + ErrorResponse, PrivateLinkResource, PrivateLinkResourceListResult } from "../models/mappers"; diff --git a/sdk/appconfiguration/arm-appconfiguration/src/operations/configurationStores.ts b/sdk/appconfiguration/arm-appconfiguration/src/operations/configurationStores.ts index 668188671197..0b448b6c12c8 100644 --- a/sdk/appconfiguration/arm-appconfiguration/src/operations/configurationStores.ts +++ b/sdk/appconfiguration/arm-appconfiguration/src/operations/configurationStores.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -217,42 +216,6 @@ export class ConfigurationStores { callback) as Promise; } - /** - * Lists a configuration store key-value. - * @param resourceGroupName The name of the resource group to which the container registry belongs. - * @param configStoreName The name of the configuration store. - * @param listKeyValueParameters The parameters for retrieving a key-value. - * @param [options] The optional parameters - * @returns Promise - */ - listKeyValue(resourceGroupName: string, configStoreName: string, listKeyValueParameters: Models.ListKeyValueParameters, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group to which the container registry belongs. - * @param configStoreName The name of the configuration store. - * @param listKeyValueParameters The parameters for retrieving a key-value. - * @param callback The callback - */ - listKeyValue(resourceGroupName: string, configStoreName: string, listKeyValueParameters: Models.ListKeyValueParameters, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group to which the container registry belongs. - * @param configStoreName The name of the configuration store. - * @param listKeyValueParameters The parameters for retrieving a key-value. - * @param options The optional parameters - * @param callback The callback - */ - listKeyValue(resourceGroupName: string, configStoreName: string, listKeyValueParameters: Models.ListKeyValueParameters, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listKeyValue(resourceGroupName: string, configStoreName: string, listKeyValueParameters: Models.ListKeyValueParameters, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - configStoreName, - listKeyValueParameters, - options - }, - listKeyValueOperationSpec, - callback) as Promise; - } - /** * Creates a configuration store with the specified parameters. * @param resourceGroupName The name of the resource group to which the container registry belongs. @@ -317,7 +280,7 @@ export class ConfigurationStores { * @param [options] The optional parameters * @returns Promise */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listNext(nextPageLink: string, options?: Models.ConfigurationStoresListNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback @@ -328,8 +291,8 @@ export class ConfigurationStores { * @param options The optional parameters * @param callback The callback */ - listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listNext(nextPageLink: string, options: Models.ConfigurationStoresListNextOptionalParams, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: Models.ConfigurationStoresListNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, @@ -345,7 +308,7 @@ export class ConfigurationStores { * @param [options] The optional parameters * @returns Promise */ - listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listByResourceGroupNext(nextPageLink: string, options?: Models.ConfigurationStoresListByResourceGroupNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback @@ -356,8 +319,8 @@ export class ConfigurationStores { * @param options The optional parameters * @param callback The callback */ - listByResourceGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listByResourceGroupNext(nextPageLink: string, options: Models.ConfigurationStoresListByResourceGroupNextOptionalParams, callback: msRest.ServiceCallback): void; + listByResourceGroupNext(nextPageLink: string, options?: Models.ConfigurationStoresListByResourceGroupNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, @@ -373,7 +336,7 @@ export class ConfigurationStores { * @param [options] The optional parameters * @returns Promise */ - listKeysNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listKeysNext(nextPageLink: string, options?: Models.ConfigurationStoresListKeysNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback @@ -384,8 +347,8 @@ export class ConfigurationStores { * @param options The optional parameters * @param callback The callback */ - listKeysNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listKeysNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listKeysNext(nextPageLink: string, options: Models.ConfigurationStoresListKeysNextOptionalParams, callback: msRest.ServiceCallback): void; + listKeysNext(nextPageLink: string, options?: Models.ConfigurationStoresListKeysNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, @@ -416,7 +379,7 @@ const listOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.ConfigurationStoreListResult }, default: { - bodyMapper: Mappers.ErrorModel + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -441,7 +404,7 @@ const listByResourceGroupOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.ConfigurationStoreListResult }, default: { - bodyMapper: Mappers.ErrorModel + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -466,7 +429,7 @@ const getOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.ConfigurationStore }, default: { - bodyMapper: Mappers.ErrorModel + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -474,7 +437,7 @@ const getOperationSpec: msRest.OperationSpec = { const listKeysOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/ListKeys", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/listKeys", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -492,7 +455,7 @@ const listKeysOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.ApiKeyListResult }, default: { - bodyMapper: Mappers.ErrorModel + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -500,7 +463,7 @@ const listKeysOperationSpec: msRest.OperationSpec = { const regenerateKeyOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/RegenerateKey", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/regenerateKey", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -524,39 +487,7 @@ const regenerateKeyOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.ApiKey }, default: { - bodyMapper: Mappers.ErrorModel - } - }, - serializer -}; - -const listKeyValueOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/listKeyValue", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.configStoreName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "listKeyValueParameters", - mapper: { - ...Mappers.ListKeyValueParameters, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.KeyValue - }, - default: { - bodyMapper: Mappers.ErrorModel + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -591,7 +522,7 @@ const beginCreateOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.ConfigurationStore }, default: { - bodyMapper: Mappers.ErrorModel + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -616,7 +547,7 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { 202: {}, 204: {}, default: { - bodyMapper: Mappers.ErrorModel + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -651,7 +582,7 @@ const beginUpdateOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.ConfigurationStore }, default: { - bodyMapper: Mappers.ErrorModel + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -664,6 +595,10 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion, + Parameters.skipToken + ], headerParameters: [ Parameters.acceptLanguage ], @@ -672,7 +607,7 @@ const listNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.ConfigurationStoreListResult }, default: { - bodyMapper: Mappers.ErrorModel + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -685,6 +620,10 @@ const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion, + Parameters.skipToken + ], headerParameters: [ Parameters.acceptLanguage ], @@ -693,7 +632,7 @@ const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.ConfigurationStoreListResult }, default: { - bodyMapper: Mappers.ErrorModel + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -706,6 +645,10 @@ const listKeysNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion, + Parameters.skipToken + ], headerParameters: [ Parameters.acceptLanguage ], @@ -714,7 +657,7 @@ const listKeysNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.ApiKeyListResult }, default: { - bodyMapper: Mappers.ErrorModel + bodyMapper: Mappers.ErrorResponse } }, serializer diff --git a/sdk/appconfiguration/arm-appconfiguration/src/operations/index.ts b/sdk/appconfiguration/arm-appconfiguration/src/operations/index.ts index f578b9c95302..c4b4fff227d1 100644 --- a/sdk/appconfiguration/arm-appconfiguration/src/operations/index.ts +++ b/sdk/appconfiguration/arm-appconfiguration/src/operations/index.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -12,3 +11,4 @@ export * from "./configurationStores"; export * from "./operations"; export * from "./privateEndpointConnections"; export * from "./privateLinkResources"; +export * from "./keyValues"; diff --git a/sdk/appconfiguration/arm-appconfiguration/src/operations/keyValues.ts b/sdk/appconfiguration/arm-appconfiguration/src/operations/keyValues.ts new file mode 100644 index 000000000000..2550d0fe5650 --- /dev/null +++ b/sdk/appconfiguration/arm-appconfiguration/src/operations/keyValues.ts @@ -0,0 +1,339 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/keyValuesMappers"; +import * as Parameters from "../models/parameters"; +import { AppConfigurationManagementClientContext } from "../appConfigurationManagementClientContext"; + +/** Class representing a KeyValues. */ +export class KeyValues { + private readonly client: AppConfigurationManagementClientContext; + + /** + * Create a KeyValues. + * @param {AppConfigurationManagementClientContext} client Reference to the service client. + */ + constructor(client: AppConfigurationManagementClientContext) { + this.client = client; + } + + /** + * Lists the key-values for a given configuration store. + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param configStoreName The name of the configuration store. + * @param [options] The optional parameters + * @returns Promise + */ + listByConfigurationStore(resourceGroupName: string, configStoreName: string, options?: Models.KeyValuesListByConfigurationStoreOptionalParams): Promise; + /** + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param configStoreName The name of the configuration store. + * @param callback The callback + */ + listByConfigurationStore(resourceGroupName: string, configStoreName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param configStoreName The name of the configuration store. + * @param options The optional parameters + * @param callback The callback + */ + listByConfigurationStore(resourceGroupName: string, configStoreName: string, options: Models.KeyValuesListByConfigurationStoreOptionalParams, callback: msRest.ServiceCallback): void; + listByConfigurationStore(resourceGroupName: string, configStoreName: string, options?: Models.KeyValuesListByConfigurationStoreOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + configStoreName, + options + }, + listByConfigurationStoreOperationSpec, + callback) as Promise; + } + + /** + * Gets the properties of the specified key-value. + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param configStoreName The name of the configuration store. + * @param keyValueName Identifier of key and label combination. Key and label are joined by $ + * character. Label is optional. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, configStoreName: string, keyValueName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param configStoreName The name of the configuration store. + * @param keyValueName Identifier of key and label combination. Key and label are joined by $ + * character. Label is optional. + * @param callback The callback + */ + get(resourceGroupName: string, configStoreName: string, keyValueName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param configStoreName The name of the configuration store. + * @param keyValueName Identifier of key and label combination. Key and label are joined by $ + * character. Label is optional. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, configStoreName: string, keyValueName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, configStoreName: string, keyValueName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + configStoreName, + keyValueName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates a key-value. + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param configStoreName The name of the configuration store. + * @param keyValueName Identifier of key and label combination. Key and label are joined by $ + * character. Label is optional. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, configStoreName: string, keyValueName: string, options?: Models.KeyValuesCreateOrUpdateOptionalParams): Promise; + /** + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param configStoreName The name of the configuration store. + * @param keyValueName Identifier of key and label combination. Key and label are joined by $ + * character. Label is optional. + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, configStoreName: string, keyValueName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param configStoreName The name of the configuration store. + * @param keyValueName Identifier of key and label combination. Key and label are joined by $ + * character. Label is optional. + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, configStoreName: string, keyValueName: string, options: Models.KeyValuesCreateOrUpdateOptionalParams, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, configStoreName: string, keyValueName: string, options?: Models.KeyValuesCreateOrUpdateOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + configStoreName, + keyValueName, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; + } + + /** + * Deletes a key-value. + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param configStoreName The name of the configuration store. + * @param keyValueName Identifier of key and label combination. Key and label are joined by $ + * character. Label is optional. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, configStoreName: string, keyValueName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,configStoreName,keyValueName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Deletes a key-value. + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param configStoreName The name of the configuration store. + * @param keyValueName Identifier of key and label combination. Key and label are joined by $ + * character. Label is optional. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, configStoreName: string, keyValueName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + configStoreName, + keyValueName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Lists the key-values for a given configuration store. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByConfigurationStoreNext(nextPageLink: string, options?: Models.KeyValuesListByConfigurationStoreNextOptionalParams): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByConfigurationStoreNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByConfigurationStoreNext(nextPageLink: string, options: Models.KeyValuesListByConfigurationStoreNextOptionalParams, callback: msRest.ServiceCallback): void; + listByConfigurationStoreNext(nextPageLink: string, options?: Models.KeyValuesListByConfigurationStoreNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByConfigurationStoreNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByConfigurationStoreOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/keyValues", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.configStoreName + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.skipToken + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.KeyValueListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/keyValues/{keyValueName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.configStoreName, + Parameters.keyValueName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.KeyValue + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/keyValues/{keyValueName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.configStoreName, + Parameters.keyValueName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: [ + "options", + "keyValueParameters" + ], + mapper: Mappers.KeyValue + }, + responses: { + 200: { + bodyMapper: Mappers.KeyValue + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/keyValues/{keyValueName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.configStoreName, + Parameters.keyValueName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByConfigurationStoreNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.skipToken + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.KeyValueListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/appconfiguration/arm-appconfiguration/src/operations/operations.ts b/sdk/appconfiguration/arm-appconfiguration/src/operations/operations.ts index 725134a5871b..72dab969b316 100644 --- a/sdk/appconfiguration/arm-appconfiguration/src/operations/operations.ts +++ b/sdk/appconfiguration/arm-appconfiguration/src/operations/operations.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -87,7 +86,7 @@ export class Operations { * @param [options] The optional parameters * @returns Promise */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listNext(nextPageLink: string, options?: Models.OperationsListNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback @@ -98,8 +97,8 @@ export class Operations { * @param options The optional parameters * @param callback The callback */ - listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listNext(nextPageLink: string, options: Models.OperationsListNextOptionalParams, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: Models.OperationsListNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, @@ -136,7 +135,7 @@ const checkNameAvailabilityOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.NameAvailabilityStatus }, default: { - bodyMapper: Mappers.ErrorModel + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -157,7 +156,7 @@ const listOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.OperationDefinitionListResult }, default: { - bodyMapper: Mappers.ErrorModel + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -170,6 +169,10 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion, + Parameters.skipToken + ], headerParameters: [ Parameters.acceptLanguage ], @@ -178,7 +181,7 @@ const listNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.OperationDefinitionListResult }, default: { - bodyMapper: Mappers.ErrorModel + bodyMapper: Mappers.ErrorResponse } }, serializer diff --git a/sdk/appconfiguration/arm-appconfiguration/src/operations/privateEndpointConnections.ts b/sdk/appconfiguration/arm-appconfiguration/src/operations/privateEndpointConnections.ts index 1e14a2cb5512..3f2a7934a20f 100644 --- a/sdk/appconfiguration/arm-appconfiguration/src/operations/privateEndpointConnections.ts +++ b/sdk/appconfiguration/arm-appconfiguration/src/operations/privateEndpointConnections.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -216,7 +215,7 @@ const listByConfigurationStoreOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.PrivateEndpointConnectionListResult }, default: { - bodyMapper: Mappers.ErrorModel + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -242,7 +241,7 @@ const getOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.PrivateEndpointConnection }, default: { - bodyMapper: Mappers.ErrorModel + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -278,7 +277,7 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.PrivateEndpointConnection }, default: { - bodyMapper: Mappers.ErrorModel + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -304,7 +303,7 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { 202: {}, 204: {}, default: { - bodyMapper: Mappers.ErrorModel + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -317,6 +316,9 @@ const listByConfigurationStoreNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], @@ -325,7 +327,7 @@ const listByConfigurationStoreNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.PrivateEndpointConnectionListResult }, default: { - bodyMapper: Mappers.ErrorModel + bodyMapper: Mappers.ErrorResponse } }, serializer diff --git a/sdk/appconfiguration/arm-appconfiguration/src/operations/privateLinkResources.ts b/sdk/appconfiguration/arm-appconfiguration/src/operations/privateLinkResources.ts index 190cce104e87..752cc8b81464 100644 --- a/sdk/appconfiguration/arm-appconfiguration/src/operations/privateLinkResources.ts +++ b/sdk/appconfiguration/arm-appconfiguration/src/operations/privateLinkResources.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -144,7 +143,7 @@ const listByConfigurationStoreOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.PrivateLinkResourceListResult }, default: { - bodyMapper: Mappers.ErrorModel + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -170,7 +169,7 @@ const getOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.PrivateLinkResource }, default: { - bodyMapper: Mappers.ErrorModel + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -183,6 +182,9 @@ const listByConfigurationStoreNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], @@ -191,7 +193,7 @@ const listByConfigurationStoreNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.PrivateLinkResourceListResult }, default: { - bodyMapper: Mappers.ErrorModel + bodyMapper: Mappers.ErrorResponse } }, serializer From 785029bdcb27715553189ad5f008187cc400eb86 Mon Sep 17 00:00:00 2001 From: colawwj <70128817+colawwj@users.noreply.github.com> Date: Tue, 6 Jul 2021 15:54:23 +0800 Subject: [PATCH 04/28] arm-postgresql-flexible (#16136) --- eng/pipelines/mgmt-ci.yml | 1 + eng/pipelines/mgmt-pr.yml | 1 + .../arm-postgresql-flexible/README.md | 26 +- .../arm-postgresql-flexible/package.json | 10 +- .../arm-postgresql-flexible/rollup.config.js | 2 +- .../src/models/configurationsMappers.ts | 1 - .../src/models/databasesMappers.ts | 1 - .../src/models/firewallRulesMappers.ts | 1 - .../src/models/index.ts | 561 ++++++++---------- .../src/models/mappers.ts | 513 ++++++++-------- .../src/models/parameters.ts | 9 +- .../src/models/recoverableServersMappers.ts | 34 -- .../src/models/serversMappers.ts | 1 - .../src/operations/checkNameAvailability.ts | 10 +- .../src/operations/configurations.ts | 16 +- .../src/operations/databases.ts | 18 +- .../src/operations/firewallRules.ts | 18 +- .../src/operations/getPrivateDnsZoneSuffix.ts | 10 +- .../src/operations/index.ts | 5 +- .../operations/locationBasedCapabilities.ts | 12 +- .../src/operations/operations.ts | 10 +- .../src/operations/recoverableServers.ts | 86 --- .../src/operations/servers.ts | 30 +- .../operations/virtualNetworkSubnetUsage.ts | 10 +- ...lient.ts => postgreSQLManagementClient.ts} | 26 +- ...s => postgreSQLManagementClientContext.ts} | 8 +- 26 files changed, 590 insertions(+), 830 deletions(-) delete mode 100644 sdk/postgresql/arm-postgresql-flexible/src/models/recoverableServersMappers.ts delete mode 100644 sdk/postgresql/arm-postgresql-flexible/src/operations/recoverableServers.ts rename sdk/postgresql/arm-postgresql-flexible/src/{postgreSQLFlexibleManagementClient.ts => postgreSQLManagementClient.ts} (79%) rename sdk/postgresql/arm-postgresql-flexible/src/{postgreSQLFlexibleManagementClientContext.ts => postgreSQLManagementClientContext.ts} (90%) diff --git a/eng/pipelines/mgmt-ci.yml b/eng/pipelines/mgmt-ci.yml index 3a8b827da29f..a388771ac568 100644 --- a/eng/pipelines/mgmt-ci.yml +++ b/eng/pipelines/mgmt-ci.yml @@ -119,6 +119,7 @@ trigger: - sdk/policy/arm-policy-profile-hybrid-2019-03-01 - sdk/policyinsights/arm-policyinsights - sdk/postgresql/arm-postgresql + - sdk/postgresql/arm-postgresql-flexible - sdk/powerbidedicated/arm-powerbidedicated - sdk/powerbiembedded/arm-powerbiembedded - sdk/privatedns/arm-privatedns diff --git a/eng/pipelines/mgmt-pr.yml b/eng/pipelines/mgmt-pr.yml index 9aa319d8f27f..22ec82033297 100644 --- a/eng/pipelines/mgmt-pr.yml +++ b/eng/pipelines/mgmt-pr.yml @@ -120,6 +120,7 @@ pr: - sdk/policy/arm-policy-profile-hybrid-2019-03-01 - sdk/policyinsights/arm-policyinsights - sdk/postgresql/arm-postgresql + - sdk/postgresql/arm-postgresql-flexible - sdk/powerbidedicated/arm-powerbidedicated - sdk/powerbiembedded/arm-powerbiembedded - sdk/privatedns/arm-privatedns diff --git a/sdk/postgresql/arm-postgresql-flexible/README.md b/sdk/postgresql/arm-postgresql-flexible/README.md index a7a178bd0a19..e6aa6c9a5d5c 100644 --- a/sdk/postgresql/arm-postgresql-flexible/README.md +++ b/sdk/postgresql/arm-postgresql-flexible/README.md @@ -1,11 +1,11 @@ -## Azure PostgreSQLFlexibleManagementClient SDK for JavaScript +## Azure PostgreSQLManagementClient SDK for JavaScript -This package contains an isomorphic SDK (runs both in node.js and in browsers) for PostgreSQLFlexibleManagementClient. +This package contains an isomorphic SDK (runs both in node.js and in browsers) for PostgreSQLManagementClient. ### Currently supported environments -- Node.js version 8.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge and Firefox. ### Prerequisites @@ -36,23 +36,22 @@ If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/ In the below samples, we pass the credential and the Azure subscription id to instantiate the client. Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -#### nodejs - Authentication, client creation, and get databases as an example written in JavaScript. +#### nodejs - Authentication, client creation, and get servers as an example written in JavaScript. ##### Sample code ```javascript const { DefaultAzureCredential } = require("@azure/identity"); -const { PostgreSQLFlexibleManagementClient } = require("@azure/arm-postgresql-flexible"); +const { PostgreSQLManagementClient } = require("@azure/arm-postgresql-flexible"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; // Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples // Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. const creds = new DefaultAzureCredential(); -const client = new PostgreSQLFlexibleManagementClient(creds, subscriptionId); +const client = new PostgreSQLManagementClient(creds, subscriptionId); const resourceGroupName = "testresourceGroupName"; const serverName = "testserverName"; -const databaseName = "testdatabaseName"; -client.databases.get(resourceGroupName, serverName, databaseName).then((result) => { +client.servers.get(resourceGroupName, serverName).then((result) => { console.log("The result is:"); console.log(result); }).catch((err) => { @@ -61,7 +60,7 @@ client.databases.get(resourceGroupName, serverName, databaseName).then((result) }); ``` -#### browser - Authentication, client creation, and get databases as an example written in JavaScript. +#### browser - Authentication, client creation, and get servers as an example written in JavaScript. In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. @@ -88,11 +87,10 @@ In browser applications, we recommend using the `InteractiveBrowserCredential` t clientId: "", tenant: "" }); - const client = new Azure.ArmPostgresql.PostgreSQLFlexibleManagementClient(creds, subscriptionId); + const client = new Azure.ArmPostgresqlFlexible.PostgreSQLManagementClient(creds, subscriptionId); const resourceGroupName = "testresourceGroupName"; const serverName = "testserverName"; - const databaseName = "testdatabaseName"; - client.databases.get(resourceGroupName, serverName, databaseName).then((result) => { + client.servers.get(resourceGroupName, serverName).then((result) => { console.log("The result is:"); console.log(result); }).catch((err) => { @@ -109,4 +107,4 @@ In browser applications, we recommend using the `InteractiveBrowserCredential` t - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/README.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/postgresql/arm-postgresql-flexible//README.png) diff --git a/sdk/postgresql/arm-postgresql-flexible/package.json b/sdk/postgresql/arm-postgresql-flexible/package.json index fb1da03042de..0f5129a384a6 100644 --- a/sdk/postgresql/arm-postgresql-flexible/package.json +++ b/sdk/postgresql/arm-postgresql-flexible/package.json @@ -1,8 +1,8 @@ { "name": "@azure/arm-postgresql-flexible", "author": "Microsoft Corporation", - "description": "PostgreSQLFlexibleManagementClient Library with typescript type definitions for node.js and browser.", - "version": "1.0.0", + "description": "PostgreSQLManagementClient Library with typescript type definitions for node.js and browser.", + "version": "2.0.0", "dependencies": { "@azure/ms-rest-azure-js": "^2.1.0", "@azure/ms-rest-js": "^2.2.0", @@ -18,8 +18,8 @@ ], "license": "MIT", "main": "./dist/arm-postgresql-flexible.js", - "module": "./esm/postgreSQLFlexibleManagementClient.js", - "types": "./esm/postgreSQLFlexibleManagementClient.d.ts", + "module": "./esm/postgreSQLManagementClient.js", + "types": "./esm/postgreSQLManagementClient.d.ts", "devDependencies": { "typescript": "^3.6.0", "rollup": "^1.18.0", @@ -27,7 +27,7 @@ "rollup-plugin-sourcemaps": "^0.4.2", "uglify-js": "^3.6.0" }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/postgresql/arm-postgresql-flexible", + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/feature/v4/sdk/postgresql/arm-postgresql-flexible/", "repository": { "type": "git", "url": "https://github.com/Azure/azure-sdk-for-js.git" diff --git a/sdk/postgresql/arm-postgresql-flexible/rollup.config.js b/sdk/postgresql/arm-postgresql-flexible/rollup.config.js index d522032c4e23..b71f63ce341d 100644 --- a/sdk/postgresql/arm-postgresql-flexible/rollup.config.js +++ b/sdk/postgresql/arm-postgresql-flexible/rollup.config.js @@ -6,7 +6,7 @@ import sourcemaps from "rollup-plugin-sourcemaps"; * @type {rollup.RollupFileOptions} */ const config = { - input: "./esm/postgreSQLFlexibleManagementClient.js", + input: "./esm/postgreSQLManagementClient.js", external: [ "@azure/ms-rest-js", "@azure/ms-rest-azure-js" diff --git a/sdk/postgresql/arm-postgresql-flexible/src/models/configurationsMappers.ts b/sdk/postgresql/arm-postgresql-flexible/src/models/configurationsMappers.ts index f3b49032720a..acac8c76e960 100644 --- a/sdk/postgresql/arm-postgresql-flexible/src/models/configurationsMappers.ts +++ b/sdk/postgresql/arm-postgresql-flexible/src/models/configurationsMappers.ts @@ -20,7 +20,6 @@ export { MaintenanceWindow, Plan, ProxyResource, - RecoverableServerResource, Resource, ResourceModelWithAllowedPropertySet, ResourceModelWithAllowedPropertySetIdentity, diff --git a/sdk/postgresql/arm-postgresql-flexible/src/models/databasesMappers.ts b/sdk/postgresql/arm-postgresql-flexible/src/models/databasesMappers.ts index 7df3290b5d68..f519c40fac30 100644 --- a/sdk/postgresql/arm-postgresql-flexible/src/models/databasesMappers.ts +++ b/sdk/postgresql/arm-postgresql-flexible/src/models/databasesMappers.ts @@ -20,7 +20,6 @@ export { MaintenanceWindow, Plan, ProxyResource, - RecoverableServerResource, Resource, ResourceModelWithAllowedPropertySet, ResourceModelWithAllowedPropertySetIdentity, diff --git a/sdk/postgresql/arm-postgresql-flexible/src/models/firewallRulesMappers.ts b/sdk/postgresql/arm-postgresql-flexible/src/models/firewallRulesMappers.ts index 280cb8bdd0ea..b60c3edd80c1 100644 --- a/sdk/postgresql/arm-postgresql-flexible/src/models/firewallRulesMappers.ts +++ b/sdk/postgresql/arm-postgresql-flexible/src/models/firewallRulesMappers.ts @@ -20,7 +20,6 @@ export { MaintenanceWindow, Plan, ProxyResource, - RecoverableServerResource, Resource, ResourceModelWithAllowedPropertySet, ResourceModelWithAllowedPropertySetIdentity, diff --git a/sdk/postgresql/arm-postgresql-flexible/src/models/index.ts b/sdk/postgresql/arm-postgresql-flexible/src/models/index.ts index c4f0485be563..f38a69ae811e 100644 --- a/sdk/postgresql/arm-postgresql-flexible/src/models/index.ts +++ b/sdk/postgresql/arm-postgresql-flexible/src/models/index.ts @@ -11,173 +11,6 @@ import * as msRest from "@azure/ms-rest-js"; export { BaseResource, CloudError }; -/** - * Common fields that are returned in the response for all Azure Resource Manager resources - * @summary Resource - */ -export interface Resource extends BaseResource { - /** - * Fully qualified resource ID for the resource. Ex - - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly id?: string; - /** - * The name of the resource - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly name?: string; - /** - * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - * "Microsoft.Storage/storageAccounts" - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly type?: string; -} - -/** - * The resource model definition for a Azure Resource Manager proxy resource. It will not have tags - * and a location - * @summary Proxy Resource - */ -export interface ProxyResource extends Resource { -} - -/** - * Represents a Database. - */ -export interface Database extends ProxyResource { - /** - * The charset of the database. - */ - charset?: string; - /** - * The collation of the database. - */ - collation?: string; -} - -/** - * The resource management error additional info. - */ -export interface ErrorAdditionalInfo { - /** - * The additional info type. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly type?: string; - /** - * The additional info. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly info?: any; -} - -/** - * Common error response for all Azure Resource Manager APIs to return error details for failed - * operations. (This also follows the OData error response format.) - * @summary Error Response - */ -export interface ErrorResponse { - /** - * The error code. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly code?: string; - /** - * The error message. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly message?: string; - /** - * The error target. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly target?: string; - /** - * The error details. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly details?: ErrorResponse[]; - /** - * The error additional info. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly additionalInfo?: ErrorAdditionalInfo[]; -} - -/** - * The resource model definition for an Azure Resource Manager tracked top level resource which has - * 'tags' and a 'location' - * @summary Tracked Resource - */ -export interface TrackedResource extends Resource { - /** - * Resource tags. - */ - tags?: { [propertyName: string]: string }; - /** - * The geo-location where the resource lives - */ - location: string; -} - -/** - * The resource model definition for an Azure Resource Manager resource with an etag. - * @summary Entity Resource - */ -export interface AzureEntityResource extends Resource { - /** - * Resource Etag. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly etag?: string; -} - -/** - * Sku information related properties of a server. - */ -export interface Sku { - /** - * The name of the sku, typically, tier + family + cores, e.g. Standard_D4s_v3. - */ - name: string; - /** - * The tier of the particular SKU, e.g. Burstable. Possible values include: 'Burstable', - * 'GeneralPurpose', 'MemoryOptimized' - */ - tier: SkuTier; -} - -/** - * Represents a recoverable server resource. - */ -export interface RecoverableServerResource extends ProxyResource { - /** - * The SKU (pricing tier) of the server. - */ - sku?: Sku; - /** - * The location the resource resides in. - */ - location?: string; - /** - * Availability zone of the server - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly availabilityZone?: string; - /** - * Edition of the performance tier. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly serverEdition?: string; - /** - * The PostgreSQL version - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly version?: string; -} - /** * Virtual network subnet usage parameter */ @@ -337,10 +170,6 @@ export interface StorageProfile { * Max storage allowed for a server. */ storageMB?: number; - /** - * Geo Backup redundancy option. Possible values include: 'Enabled', 'Disabled' - */ - geoRedundantBackup?: GeoRedundantBackupOption; } /** @@ -405,6 +234,61 @@ export interface Identity { type?: ResourceIdentityType; } +/** + * Sku information related properties of a server. + */ +export interface Sku { + /** + * The name of the sku, typically, tier + family + cores, e.g. Standard_D4s_v3. + */ + name: string; + /** + * The tier of the particular SKU, e.g. Burstable. Possible values include: 'Burstable', + * 'GeneralPurpose', 'MemoryOptimized' + */ + tier: SkuTier; +} + +/** + * Common fields that are returned in the response for all Azure Resource Manager resources + * @summary Resource + */ +export interface Resource extends BaseResource { + /** + * Fully qualified resource ID for the resource. Ex - + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * The name of the resource + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + * "Microsoft.Storage/storageAccounts" + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; +} + +/** + * The resource model definition for an Azure Resource Manager tracked top level resource which has + * 'tags' and a 'location' + * @summary Tracked Resource + */ +export interface TrackedResource extends Resource { + /** + * Resource tags. + */ + tags?: { [propertyName: string]: string }; + /** + * The geo-location where the resource lives + */ + location: string; +} + /** * Represents a server. */ @@ -474,11 +358,11 @@ export interface Server extends TrackedResource { */ sourceServerName?: string; /** - * The subscription id of source PostgreSQL server name to restore from. + * The subscription id of source serve PostgreSQL server name to restore from. */ sourceSubscriptionId?: string; /** - * The resource group name of source PostgreSQL server name to restore from. + * The resource group name of source serve PostgreSQL server name to restore from. */ sourceResourceGroupName?: string; /** @@ -503,7 +387,7 @@ export interface Server extends TrackedResource { privateDnsZoneArguments?: ServerPropertiesPrivateDnsZoneArguments; /** * The mode to create a new PostgreSQL server. Possible values include: 'Default', - * 'PointInTimeRestore', 'GeoRestore' + * 'PointInTimeRestore' */ createMode?: CreateMode; /** @@ -547,6 +431,14 @@ export interface ServerForUpdate { tags?: { [propertyName: string]: string }; } +/** + * The resource model definition for a Azure Resource Manager proxy resource. It will not have tags + * and a location + * @summary Proxy Resource + */ +export interface ProxyResource extends Resource { +} + /** * Represents a server firewall rule. */ @@ -699,9 +591,70 @@ export interface NameAvailability { */ name?: string; /** - * type of the server + * type of the server + */ + type?: string; +} + +/** + * The resource management error additional info. + */ +export interface ErrorAdditionalInfo { + /** + * The additional info type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * The additional info. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly info?: any; +} + +/** + * Common error response for all Azure Resource Manager APIs to return error details for failed + * operations. (This also follows the OData error response format.) + * @summary Error Response + */ +export interface ErrorResponse { + /** + * The error code. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly code?: string; + /** + * The error message. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly message?: string; + /** + * The error target. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly target?: string; + /** + * The error details. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly details?: ErrorResponse[]; + /** + * The error additional info. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly additionalInfo?: ErrorAdditionalInfo[]; +} + +/** + * The resource model definition for an Azure Resource Manager resource with an etag. + * @summary Entity Resource + */ +export interface AzureEntityResource extends Resource { + /** + * Resource Etag. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - type?: string; + readonly etag?: string; } /** @@ -808,22 +761,24 @@ export interface ResourceModelWithAllowedPropertySet extends BaseResource { } /** - * An interface representing PostgreSQLFlexibleManagementClientOptions. + * Represents a Database. */ -export interface PostgreSQLFlexibleManagementClientOptions extends AzureServiceClientOptions { - baseUri?: string; +export interface Database extends ProxyResource { + /** + * The charset of the database. + */ + charset?: string; + /** + * The collation of the database. + */ + collation?: string; } /** - * @interface - * A List of databases. - * @extends Array + * An interface representing PostgreSQLManagementClientOptions. */ -export interface DatabaseListResult extends Array { - /** - * The link used to get the next page of databases. - */ - nextLink?: string; +export interface PostgreSQLManagementClientOptions extends AzureServiceClientOptions { + baseUri?: string; } /** @@ -876,12 +831,16 @@ export interface CapabilitiesListResult extends Array { } /** - * Defines values for SkuTier. - * Possible values include: 'Burstable', 'GeneralPurpose', 'MemoryOptimized' - * @readonly - * @enum {string} + * @interface + * A List of databases. + * @extends Array */ -export type SkuTier = 'Burstable' | 'GeneralPurpose' | 'MemoryOptimized'; +export interface DatabaseListResult extends Array { + /** + * The link used to get the next page of databases. + */ + nextLink?: string; +} /** * Defines values for ServerVersion. @@ -909,14 +868,6 @@ export type ServerState = 'Ready' | 'Dropping' | 'Disabled' | 'Starting' | 'Stop */ export type ServerHAState = 'NotEnabled' | 'CreatingStandby' | 'ReplicatingData' | 'FailingOver' | 'Healthy' | 'RemovingStandby'; -/** - * Defines values for GeoRedundantBackupOption. - * Possible values include: 'Enabled', 'Disabled' - * @readonly - * @enum {string} - */ -export type GeoRedundantBackupOption = 'Enabled' | 'Disabled'; - /** * Defines values for ServerPublicNetworkAccessState. * Possible values include: 'Enabled', 'Disabled' @@ -935,11 +886,11 @@ export type HAEnabledEnum = 'Enabled' | 'Disabled'; /** * Defines values for CreateMode. - * Possible values include: 'Default', 'PointInTimeRestore', 'GeoRestore' + * Possible values include: 'Default', 'PointInTimeRestore' * @readonly * @enum {string} */ -export type CreateMode = 'Default' | 'PointInTimeRestore' | 'GeoRestore'; +export type CreateMode = 'Default' | 'PointInTimeRestore'; /** * Defines values for ResourceIdentityType. @@ -949,6 +900,14 @@ export type CreateMode = 'Default' | 'PointInTimeRestore' | 'GeoRestore'; */ export type ResourceIdentityType = 'SystemAssigned'; +/** + * Defines values for SkuTier. + * Possible values include: 'Burstable', 'GeneralPurpose', 'MemoryOptimized' + * @readonly + * @enum {string} + */ +export type SkuTier = 'Burstable' | 'GeneralPurpose' | 'MemoryOptimized'; + /** * Defines values for ConfigurationDataType. * Possible values include: 'Boolean', 'Numeric', 'Integer', 'Enumeration' @@ -976,27 +935,7 @@ export type Body = 'PostgreSQL' | 'PostgreSQLCitus' | 'MySQL' | 'MariaDb' | 'Ora /** * Contains response data for the create operation. */ -export type DatabasesCreateResponse = Database & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: Database; - }; -}; - -/** - * Contains response data for the get operation. - */ -export type DatabasesGetResponse = Database & { +export type ServersCreateResponse = Server & { /** * The underlying HTTP response. */ @@ -1009,14 +948,14 @@ export type DatabasesGetResponse = Database & { /** * The response body as parsed JSON or XML */ - parsedBody: Database; + parsedBody: Server; }; }; /** - * Contains response data for the listByServer operation. + * Contains response data for the update operation. */ -export type DatabasesListByServerResponse = DatabaseListResult & { +export type ServersUpdateResponse = Server & { /** * The underlying HTTP response. */ @@ -1029,14 +968,14 @@ export type DatabasesListByServerResponse = DatabaseListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: DatabaseListResult; + parsedBody: Server; }; }; /** - * Contains response data for the beginCreate operation. + * Contains response data for the get operation. */ -export type DatabasesBeginCreateResponse = Database & { +export type ServersGetResponse = Server & { /** * The underlying HTTP response. */ @@ -1049,14 +988,14 @@ export type DatabasesBeginCreateResponse = Database & { /** * The response body as parsed JSON or XML */ - parsedBody: Database; + parsedBody: Server; }; }; /** - * Contains response data for the listByServerNext operation. + * Contains response data for the listByResourceGroup operation. */ -export type DatabasesListByServerNextResponse = DatabaseListResult & { +export type ServersListByResourceGroupResponse = ServerListResult & { /** * The underlying HTTP response. */ @@ -1069,19 +1008,14 @@ export type DatabasesListByServerNextResponse = DatabaseListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: DatabaseListResult; + parsedBody: ServerListResult; }; }; /** - * Contains response data for the execute operation. + * Contains response data for the list operation. */ -export type GetPrivateDnsZoneSuffixExecuteResponse = { - /** - * The parsed response body. - */ - body: string; - +export type ServersListResponse = ServerListResult & { /** * The underlying HTTP response. */ @@ -1094,14 +1028,14 @@ export type GetPrivateDnsZoneSuffixExecuteResponse = { /** * The response body as parsed JSON or XML */ - parsedBody: string; + parsedBody: ServerListResult; }; }; /** - * Contains response data for the create operation. + * Contains response data for the beginCreate operation. */ -export type ServersCreateResponse = Server & { +export type ServersBeginCreateResponse = Server & { /** * The underlying HTTP response. */ @@ -1119,9 +1053,9 @@ export type ServersCreateResponse = Server & { }; /** - * Contains response data for the update operation. + * Contains response data for the beginUpdate operation. */ -export type ServersUpdateResponse = Server & { +export type ServersBeginUpdateResponse = Server & { /** * The underlying HTTP response. */ @@ -1139,9 +1073,9 @@ export type ServersUpdateResponse = Server & { }; /** - * Contains response data for the get operation. + * Contains response data for the listByResourceGroupNext operation. */ -export type ServersGetResponse = Server & { +export type ServersListByResourceGroupNextResponse = ServerListResult & { /** * The underlying HTTP response. */ @@ -1154,14 +1088,14 @@ export type ServersGetResponse = Server & { /** * The response body as parsed JSON or XML */ - parsedBody: Server; + parsedBody: ServerListResult; }; }; /** - * Contains response data for the listByResourceGroup operation. + * Contains response data for the listNext operation. */ -export type ServersListByResourceGroupResponse = ServerListResult & { +export type ServersListNextResponse = ServerListResult & { /** * The underlying HTTP response. */ @@ -1179,9 +1113,9 @@ export type ServersListByResourceGroupResponse = ServerListResult & { }; /** - * Contains response data for the list operation. + * Contains response data for the createOrUpdate operation. */ -export type ServersListResponse = ServerListResult & { +export type FirewallRulesCreateOrUpdateResponse = FirewallRule & { /** * The underlying HTTP response. */ @@ -1194,14 +1128,14 @@ export type ServersListResponse = ServerListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: ServerListResult; + parsedBody: FirewallRule; }; }; /** - * Contains response data for the beginCreate operation. + * Contains response data for the get operation. */ -export type ServersBeginCreateResponse = Server & { +export type FirewallRulesGetResponse = FirewallRule & { /** * The underlying HTTP response. */ @@ -1214,14 +1148,14 @@ export type ServersBeginCreateResponse = Server & { /** * The response body as parsed JSON or XML */ - parsedBody: Server; + parsedBody: FirewallRule; }; }; /** - * Contains response data for the beginUpdate operation. + * Contains response data for the listByServer operation. */ -export type ServersBeginUpdateResponse = Server & { +export type FirewallRulesListByServerResponse = FirewallRuleListResult & { /** * The underlying HTTP response. */ @@ -1234,14 +1168,14 @@ export type ServersBeginUpdateResponse = Server & { /** * The response body as parsed JSON or XML */ - parsedBody: Server; + parsedBody: FirewallRuleListResult; }; }; /** - * Contains response data for the listByResourceGroupNext operation. + * Contains response data for the beginCreateOrUpdate operation. */ -export type ServersListByResourceGroupNextResponse = ServerListResult & { +export type FirewallRulesBeginCreateOrUpdateResponse = FirewallRule & { /** * The underlying HTTP response. */ @@ -1254,14 +1188,14 @@ export type ServersListByResourceGroupNextResponse = ServerListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: ServerListResult; + parsedBody: FirewallRule; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the listByServerNext operation. */ -export type ServersListNextResponse = ServerListResult & { +export type FirewallRulesListByServerNextResponse = FirewallRuleListResult & { /** * The underlying HTTP response. */ @@ -1274,14 +1208,14 @@ export type ServersListNextResponse = ServerListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: ServerListResult; + parsedBody: FirewallRuleListResult; }; }; /** - * Contains response data for the createOrUpdate operation. + * Contains response data for the listByServer operation. */ -export type FirewallRulesCreateOrUpdateResponse = FirewallRule & { +export type ConfigurationsListByServerResponse = ConfigurationListResult & { /** * The underlying HTTP response. */ @@ -1294,14 +1228,14 @@ export type FirewallRulesCreateOrUpdateResponse = FirewallRule & { /** * The response body as parsed JSON or XML */ - parsedBody: FirewallRule; + parsedBody: ConfigurationListResult; }; }; /** * Contains response data for the get operation. */ -export type FirewallRulesGetResponse = FirewallRule & { +export type ConfigurationsGetResponse = Configuration & { /** * The underlying HTTP response. */ @@ -1314,14 +1248,14 @@ export type FirewallRulesGetResponse = FirewallRule & { /** * The response body as parsed JSON or XML */ - parsedBody: FirewallRule; + parsedBody: Configuration; }; }; /** - * Contains response data for the listByServer operation. + * Contains response data for the update operation. */ -export type FirewallRulesListByServerResponse = FirewallRuleListResult & { +export type ConfigurationsUpdateResponse = Configuration & { /** * The underlying HTTP response. */ @@ -1334,14 +1268,14 @@ export type FirewallRulesListByServerResponse = FirewallRuleListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: FirewallRuleListResult; + parsedBody: Configuration; }; }; /** - * Contains response data for the beginCreateOrUpdate operation. + * Contains response data for the beginUpdate operation. */ -export type FirewallRulesBeginCreateOrUpdateResponse = FirewallRule & { +export type ConfigurationsBeginUpdateResponse = Configuration & { /** * The underlying HTTP response. */ @@ -1354,14 +1288,14 @@ export type FirewallRulesBeginCreateOrUpdateResponse = FirewallRule & { /** * The response body as parsed JSON or XML */ - parsedBody: FirewallRule; + parsedBody: Configuration; }; }; /** * Contains response data for the listByServerNext operation. */ -export type FirewallRulesListByServerNextResponse = FirewallRuleListResult & { +export type ConfigurationsListByServerNextResponse = ConfigurationListResult & { /** * The underlying HTTP response. */ @@ -1374,14 +1308,14 @@ export type FirewallRulesListByServerNextResponse = FirewallRuleListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: FirewallRuleListResult; + parsedBody: ConfigurationListResult; }; }; /** - * Contains response data for the listByServer operation. + * Contains response data for the execute operation. */ -export type ConfigurationsListByServerResponse = ConfigurationListResult & { +export type CheckNameAvailabilityExecuteResponse = NameAvailability & { /** * The underlying HTTP response. */ @@ -1394,14 +1328,14 @@ export type ConfigurationsListByServerResponse = ConfigurationListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: ConfigurationListResult; + parsedBody: NameAvailability; }; }; /** - * Contains response data for the get operation. + * Contains response data for the execute operation. */ -export type ConfigurationsGetResponse = Configuration & { +export type LocationBasedCapabilitiesExecuteResponse = CapabilitiesListResult & { /** * The underlying HTTP response. */ @@ -1414,14 +1348,14 @@ export type ConfigurationsGetResponse = Configuration & { /** * The response body as parsed JSON or XML */ - parsedBody: Configuration; + parsedBody: CapabilitiesListResult; }; }; /** - * Contains response data for the update operation. + * Contains response data for the executeNext operation. */ -export type ConfigurationsUpdateResponse = Configuration & { +export type LocationBasedCapabilitiesExecuteNextResponse = CapabilitiesListResult & { /** * The underlying HTTP response. */ @@ -1434,14 +1368,14 @@ export type ConfigurationsUpdateResponse = Configuration & { /** * The response body as parsed JSON or XML */ - parsedBody: Configuration; + parsedBody: CapabilitiesListResult; }; }; /** - * Contains response data for the beginUpdate operation. + * Contains response data for the execute operation. */ -export type ConfigurationsBeginUpdateResponse = Configuration & { +export type VirtualNetworkSubnetUsageExecuteResponse = VirtualNetworkSubnetUsageResult & { /** * The underlying HTTP response. */ @@ -1454,14 +1388,14 @@ export type ConfigurationsBeginUpdateResponse = Configuration & { /** * The response body as parsed JSON or XML */ - parsedBody: Configuration; + parsedBody: VirtualNetworkSubnetUsageResult; }; }; /** - * Contains response data for the listByServerNext operation. + * Contains response data for the list operation. */ -export type ConfigurationsListByServerNextResponse = ConfigurationListResult & { +export type OperationsListResponse = OperationListResult & { /** * The underlying HTTP response. */ @@ -1474,14 +1408,14 @@ export type ConfigurationsListByServerNextResponse = ConfigurationListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: ConfigurationListResult; + parsedBody: OperationListResult; }; }; /** - * Contains response data for the execute operation. + * Contains response data for the create operation. */ -export type CheckNameAvailabilityExecuteResponse = NameAvailability & { +export type DatabasesCreateResponse = Database & { /** * The underlying HTTP response. */ @@ -1494,14 +1428,14 @@ export type CheckNameAvailabilityExecuteResponse = NameAvailability & { /** * The response body as parsed JSON or XML */ - parsedBody: NameAvailability; + parsedBody: Database; }; }; /** - * Contains response data for the execute operation. + * Contains response data for the get operation. */ -export type LocationBasedCapabilitiesExecuteResponse = CapabilitiesListResult & { +export type DatabasesGetResponse = Database & { /** * The underlying HTTP response. */ @@ -1514,14 +1448,14 @@ export type LocationBasedCapabilitiesExecuteResponse = CapabilitiesListResult & /** * The response body as parsed JSON or XML */ - parsedBody: CapabilitiesListResult; + parsedBody: Database; }; }; /** - * Contains response data for the executeNext operation. + * Contains response data for the listByServer operation. */ -export type LocationBasedCapabilitiesExecuteNextResponse = CapabilitiesListResult & { +export type DatabasesListByServerResponse = DatabaseListResult & { /** * The underlying HTTP response. */ @@ -1534,14 +1468,14 @@ export type LocationBasedCapabilitiesExecuteNextResponse = CapabilitiesListResul /** * The response body as parsed JSON or XML */ - parsedBody: CapabilitiesListResult; + parsedBody: DatabaseListResult; }; }; /** - * Contains response data for the execute operation. + * Contains response data for the beginCreate operation. */ -export type VirtualNetworkSubnetUsageExecuteResponse = VirtualNetworkSubnetUsageResult & { +export type DatabasesBeginCreateResponse = Database & { /** * The underlying HTTP response. */ @@ -1554,14 +1488,14 @@ export type VirtualNetworkSubnetUsageExecuteResponse = VirtualNetworkSubnetUsage /** * The response body as parsed JSON or XML */ - parsedBody: VirtualNetworkSubnetUsageResult; + parsedBody: Database; }; }; /** - * Contains response data for the get operation. + * Contains response data for the listByServerNext operation. */ -export type RecoverableServersGetResponse = RecoverableServerResource & { +export type DatabasesListByServerNextResponse = DatabaseListResult & { /** * The underlying HTTP response. */ @@ -1574,14 +1508,19 @@ export type RecoverableServersGetResponse = RecoverableServerResource & { /** * The response body as parsed JSON or XML */ - parsedBody: RecoverableServerResource; + parsedBody: DatabaseListResult; }; }; /** - * Contains response data for the list operation. + * Contains response data for the execute operation. */ -export type OperationsListResponse = OperationListResult & { +export type GetPrivateDnsZoneSuffixExecuteResponse = { + /** + * The parsed response body. + */ + body: string; + /** * The underlying HTTP response. */ @@ -1594,6 +1533,6 @@ export type OperationsListResponse = OperationListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: OperationListResult; + parsedBody: string; }; }; diff --git a/sdk/postgresql/arm-postgresql-flexible/src/models/mappers.ts b/sdk/postgresql/arm-postgresql-flexible/src/models/mappers.ts index b1e27facb697..0f33f76e46ce 100644 --- a/sdk/postgresql/arm-postgresql-flexible/src/models/mappers.ts +++ b/sdk/postgresql/arm-postgresql-flexible/src/models/mappers.ts @@ -12,268 +12,6 @@ import * as msRest from "@azure/ms-rest-js"; export const CloudError = CloudErrorMapper; export const BaseResource = BaseResourceMapper; -export const Resource: msRest.CompositeMapper = { - serializedName: "Resource", - type: { - name: "Composite", - className: "Resource", - modelProperties: { - id: { - readOnly: true, - serializedName: "id", - type: { - name: "String" - } - }, - name: { - readOnly: true, - serializedName: "name", - type: { - name: "String" - } - }, - type: { - readOnly: true, - serializedName: "type", - type: { - name: "String" - } - } - } - } -}; - -export const ProxyResource: msRest.CompositeMapper = { - serializedName: "ProxyResource", - type: { - name: "Composite", - className: "ProxyResource", - modelProperties: { - ...Resource.type.modelProperties - } - } -}; - -export const Database: msRest.CompositeMapper = { - serializedName: "Database", - type: { - name: "Composite", - className: "Database", - modelProperties: { - ...ProxyResource.type.modelProperties, - charset: { - serializedName: "properties.charset", - type: { - name: "String" - } - }, - collation: { - serializedName: "properties.collation", - type: { - name: "String" - } - } - } - } -}; - -export const ErrorAdditionalInfo: msRest.CompositeMapper = { - serializedName: "ErrorAdditionalInfo", - type: { - name: "Composite", - className: "ErrorAdditionalInfo", - modelProperties: { - type: { - readOnly: true, - serializedName: "type", - type: { - name: "String" - } - }, - info: { - readOnly: true, - serializedName: "info", - type: { - name: "Object" - } - } - } - } -}; - -export const ErrorResponse: msRest.CompositeMapper = { - serializedName: "ErrorResponse", - type: { - name: "Composite", - className: "ErrorResponse", - modelProperties: { - code: { - readOnly: true, - serializedName: "code", - type: { - name: "String" - } - }, - message: { - readOnly: true, - serializedName: "message", - type: { - name: "String" - } - }, - target: { - readOnly: true, - serializedName: "target", - type: { - name: "String" - } - }, - details: { - readOnly: true, - serializedName: "details", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ErrorResponse" - } - } - } - }, - additionalInfo: { - readOnly: true, - serializedName: "additionalInfo", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ErrorAdditionalInfo" - } - } - } - } - } - } -}; - -export const TrackedResource: msRest.CompositeMapper = { - serializedName: "TrackedResource", - type: { - name: "Composite", - className: "TrackedResource", - modelProperties: { - ...Resource.type.modelProperties, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - }, - location: { - required: true, - serializedName: "location", - type: { - name: "String" - } - } - } - } -}; - -export const AzureEntityResource: msRest.CompositeMapper = { - serializedName: "AzureEntityResource", - type: { - name: "Composite", - className: "AzureEntityResource", - modelProperties: { - ...Resource.type.modelProperties, - etag: { - readOnly: true, - serializedName: "etag", - type: { - name: "String" - } - } - } - } -}; - -export const Sku: msRest.CompositeMapper = { - serializedName: "Sku", - type: { - name: "Composite", - className: "Sku", - modelProperties: { - name: { - required: true, - serializedName: "name", - type: { - name: "String" - } - }, - tier: { - required: true, - serializedName: "tier", - type: { - name: "String" - } - } - } - } -}; - -export const RecoverableServerResource: msRest.CompositeMapper = { - serializedName: "RecoverableServerResource", - type: { - name: "Composite", - className: "RecoverableServerResource", - modelProperties: { - ...ProxyResource.type.modelProperties, - sku: { - serializedName: "sku", - type: { - name: "Composite", - className: "Sku" - } - }, - location: { - serializedName: "location", - type: { - name: "String" - } - }, - availabilityZone: { - readOnly: true, - serializedName: "properties.availabilityZone", - type: { - name: "String" - } - }, - serverEdition: { - readOnly: true, - serializedName: "properties.serverEdition", - type: { - name: "String" - } - }, - version: { - readOnly: true, - serializedName: "properties.version", - type: { - name: "String" - } - } - } - } -}; - export const VirtualNetworkSubnetUsageParameter: msRest.CompositeMapper = { serializedName: "VirtualNetworkSubnetUsageParameter", type: { @@ -556,12 +294,6 @@ export const StorageProfile: msRest.CompositeMapper = { type: { name: "Number" } - }, - geoRedundantBackup: { - serializedName: "geoRedundantBackup", - type: { - name: "String" - } } } } @@ -666,6 +398,90 @@ export const Identity: msRest.CompositeMapper = { } }; +export const Sku: msRest.CompositeMapper = { + serializedName: "Sku", + type: { + name: "Composite", + className: "Sku", + modelProperties: { + name: { + required: true, + serializedName: "name", + type: { + name: "String" + } + }, + tier: { + required: true, + serializedName: "tier", + type: { + name: "String" + } + } + } + } +}; + +export const Resource: msRest.CompositeMapper = { + serializedName: "Resource", + type: { + name: "Composite", + className: "Resource", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const TrackedResource: msRest.CompositeMapper = { + serializedName: "TrackedResource", + type: { + name: "Composite", + className: "TrackedResource", + modelProperties: { + ...Resource.type.modelProperties, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + location: { + required: true, + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + export const Server: msRest.CompositeMapper = { serializedName: "Server", type: { @@ -906,6 +722,17 @@ export const ServerForUpdate: msRest.CompositeMapper = { } }; +export const ProxyResource: msRest.CompositeMapper = { + serializedName: "ProxyResource", + type: { + name: "Composite", + className: "ProxyResource", + modelProperties: { + ...Resource.type.modelProperties + } + } +}; + export const FirewallRule: msRest.CompositeMapper = { serializedName: "FirewallRule", type: { @@ -1161,6 +988,105 @@ export const NameAvailability: msRest.CompositeMapper = { } }; +export const ErrorAdditionalInfo: msRest.CompositeMapper = { + serializedName: "ErrorAdditionalInfo", + type: { + name: "Composite", + className: "ErrorAdditionalInfo", + modelProperties: { + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + info: { + readOnly: true, + serializedName: "info", + type: { + name: "Object" + } + } + } + } +}; + +export const ErrorResponse: msRest.CompositeMapper = { + serializedName: "ErrorResponse", + type: { + name: "Composite", + className: "ErrorResponse", + modelProperties: { + code: { + readOnly: true, + serializedName: "code", + type: { + name: "String" + } + }, + message: { + readOnly: true, + serializedName: "message", + type: { + name: "String" + } + }, + target: { + readOnly: true, + serializedName: "target", + type: { + name: "String" + } + }, + details: { + readOnly: true, + serializedName: "details", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorResponse" + } + } + } + }, + additionalInfo: { + readOnly: true, + serializedName: "additionalInfo", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorAdditionalInfo" + } + } + } + } + } + } +}; + +export const AzureEntityResource: msRest.CompositeMapper = { + serializedName: "AzureEntityResource", + type: { + name: "Composite", + className: "AzureEntityResource", + modelProperties: { + ...Resource.type.modelProperties, + etag: { + readOnly: true, + serializedName: "etag", + type: { + name: "String" + } + } + } + } +}; + export const ResourceModelWithAllowedPropertySetIdentity: msRest.CompositeMapper = { serializedName: "ResourceModelWithAllowedPropertySet_identity", type: { @@ -1328,26 +1254,21 @@ export const ResourceModelWithAllowedPropertySet: msRest.CompositeMapper = { } }; -export const DatabaseListResult: msRest.CompositeMapper = { - serializedName: "DatabaseListResult", +export const Database: msRest.CompositeMapper = { + serializedName: "Database", type: { name: "Composite", - className: "DatabaseListResult", + className: "Database", modelProperties: { - value: { - serializedName: "", + ...ProxyResource.type.modelProperties, + charset: { + serializedName: "properties.charset", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Database" - } - } + name: "String" } }, - nextLink: { - serializedName: "nextLink", + collation: { + serializedName: "properties.collation", type: { name: "String" } @@ -1469,3 +1390,31 @@ export const CapabilitiesListResult: msRest.CompositeMapper = { } } }; + +export const DatabaseListResult: msRest.CompositeMapper = { + serializedName: "DatabaseListResult", + type: { + name: "Composite", + className: "DatabaseListResult", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Database" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; diff --git a/sdk/postgresql/arm-postgresql-flexible/src/models/parameters.ts b/sdk/postgresql/arm-postgresql-flexible/src/models/parameters.ts index c8fe4a8e2b16..57a1ec746a91 100644 --- a/sdk/postgresql/arm-postgresql-flexible/src/models/parameters.ts +++ b/sdk/postgresql/arm-postgresql-flexible/src/models/parameters.ts @@ -25,7 +25,7 @@ export const apiVersion0: msRest.OperationQueryParameter = { required: true, isConstant: true, serializedName: "api-version", - defaultValue: '2020-11-05-preview', + defaultValue: '2020-02-14-preview', constraints: { MinLength: 1 }, @@ -40,7 +40,7 @@ export const apiVersion1: msRest.OperationQueryParameter = { required: true, isConstant: true, serializedName: "api-version", - defaultValue: '2021-03-31-privatepreview', + defaultValue: '2020-11-05-preview', constraints: { MinLength: 1 }, @@ -55,7 +55,7 @@ export const apiVersion2: msRest.OperationQueryParameter = { required: true, isConstant: true, serializedName: "api-version", - defaultValue: '2021-04-10-privatepreview', + defaultValue: '2021-03-31-privatepreview', constraints: { MinLength: 1 }, @@ -122,8 +122,7 @@ export const resourceGroupName: msRest.OperationURLParameter = { serializedName: "resourceGroupName", constraints: { MaxLength: 90, - MinLength: 1, - Pattern: /^[-\w\._\(\)]+$/ + MinLength: 1 }, type: { name: "String" diff --git a/sdk/postgresql/arm-postgresql-flexible/src/models/recoverableServersMappers.ts b/sdk/postgresql/arm-postgresql-flexible/src/models/recoverableServersMappers.ts deleted file mode 100644 index 217f16cfbb31..000000000000 --- a/sdk/postgresql/arm-postgresql-flexible/src/models/recoverableServersMappers.ts +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -export { - AzureEntityResource, - BaseResource, - CloudError, - Configuration, - Database, - ErrorAdditionalInfo, - ErrorResponse, - FirewallRule, - Identity, - MaintenanceWindow, - Plan, - ProxyResource, - RecoverableServerResource, - Resource, - ResourceModelWithAllowedPropertySet, - ResourceModelWithAllowedPropertySetIdentity, - ResourceModelWithAllowedPropertySetPlan, - ResourceModelWithAllowedPropertySetSku, - Server, - ServerPropertiesDelegatedSubnetArguments, - ServerPropertiesPrivateDnsZoneArguments, - Sku, - StorageProfile, - TrackedResource -} from "../models/mappers"; diff --git a/sdk/postgresql/arm-postgresql-flexible/src/models/serversMappers.ts b/sdk/postgresql/arm-postgresql-flexible/src/models/serversMappers.ts index c9df4ef13453..980b29e943e4 100644 --- a/sdk/postgresql/arm-postgresql-flexible/src/models/serversMappers.ts +++ b/sdk/postgresql/arm-postgresql-flexible/src/models/serversMappers.ts @@ -19,7 +19,6 @@ export { MaintenanceWindow, Plan, ProxyResource, - RecoverableServerResource, Resource, ResourceModelWithAllowedPropertySet, ResourceModelWithAllowedPropertySetIdentity, diff --git a/sdk/postgresql/arm-postgresql-flexible/src/operations/checkNameAvailability.ts b/sdk/postgresql/arm-postgresql-flexible/src/operations/checkNameAvailability.ts index 71b920982dc2..8d21d47efba5 100644 --- a/sdk/postgresql/arm-postgresql-flexible/src/operations/checkNameAvailability.ts +++ b/sdk/postgresql/arm-postgresql-flexible/src/operations/checkNameAvailability.ts @@ -11,17 +11,17 @@ import * as msRest from "@azure/ms-rest-js"; import * as Models from "../models"; import * as Mappers from "../models/checkNameAvailabilityMappers"; import * as Parameters from "../models/parameters"; -import { PostgreSQLFlexibleManagementClientContext } from "../postgreSQLFlexibleManagementClientContext"; +import { PostgreSQLManagementClientContext } from "../postgreSQLManagementClientContext"; /** Class representing a CheckNameAvailability. */ export class CheckNameAvailability { - private readonly client: PostgreSQLFlexibleManagementClientContext; + private readonly client: PostgreSQLManagementClientContext; /** * Create a CheckNameAvailability. - * @param {PostgreSQLFlexibleManagementClientContext} client Reference to the service client. + * @param {PostgreSQLManagementClientContext} client Reference to the service client. */ - constructor(client: PostgreSQLFlexibleManagementClientContext) { + constructor(client: PostgreSQLManagementClientContext) { this.client = client; } @@ -66,7 +66,7 @@ const executeOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion2 + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/postgresql/arm-postgresql-flexible/src/operations/configurations.ts b/sdk/postgresql/arm-postgresql-flexible/src/operations/configurations.ts index 261b32a55323..b8464f046acb 100644 --- a/sdk/postgresql/arm-postgresql-flexible/src/operations/configurations.ts +++ b/sdk/postgresql/arm-postgresql-flexible/src/operations/configurations.ts @@ -12,17 +12,17 @@ import * as msRestAzure from "@azure/ms-rest-azure-js"; import * as Models from "../models"; import * as Mappers from "../models/configurationsMappers"; import * as Parameters from "../models/parameters"; -import { PostgreSQLFlexibleManagementClientContext } from "../postgreSQLFlexibleManagementClientContext"; +import { PostgreSQLManagementClientContext } from "../postgreSQLManagementClientContext"; /** Class representing a Configurations. */ export class Configurations { - private readonly client: PostgreSQLFlexibleManagementClientContext; + private readonly client: PostgreSQLManagementClientContext; /** * Create a Configurations. - * @param {PostgreSQLFlexibleManagementClientContext} client Reference to the service client. + * @param {PostgreSQLManagementClientContext} client Reference to the service client. */ - constructor(client: PostgreSQLFlexibleManagementClientContext) { + constructor(client: PostgreSQLManagementClientContext) { this.client = client; } @@ -170,7 +170,7 @@ const listByServerOperationSpec: msRest.OperationSpec = { Parameters.serverName ], queryParameters: [ - Parameters.apiVersion2 + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -196,7 +196,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.configurationName ], queryParameters: [ - Parameters.apiVersion2 + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -222,7 +222,7 @@ const beginUpdateOperationSpec: msRest.OperationSpec = { Parameters.configurationName ], queryParameters: [ - Parameters.apiVersion2 + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -254,7 +254,7 @@ const listByServerNextOperationSpec: msRest.OperationSpec = { Parameters.nextPageLink ], queryParameters: [ - Parameters.apiVersion2 + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/postgresql/arm-postgresql-flexible/src/operations/databases.ts b/sdk/postgresql/arm-postgresql-flexible/src/operations/databases.ts index b9da26173ca5..2ac841ead905 100644 --- a/sdk/postgresql/arm-postgresql-flexible/src/operations/databases.ts +++ b/sdk/postgresql/arm-postgresql-flexible/src/operations/databases.ts @@ -12,17 +12,17 @@ import * as msRestAzure from "@azure/ms-rest-azure-js"; import * as Models from "../models"; import * as Mappers from "../models/databasesMappers"; import * as Parameters from "../models/parameters"; -import { PostgreSQLFlexibleManagementClientContext } from "../postgreSQLFlexibleManagementClientContext"; +import { PostgreSQLManagementClientContext } from "../postgreSQLManagementClientContext"; /** Class representing a Databases. */ export class Databases { - private readonly client: PostgreSQLFlexibleManagementClientContext; + private readonly client: PostgreSQLManagementClientContext; /** * Create a Databases. - * @param {PostgreSQLFlexibleManagementClientContext} client Reference to the service client. + * @param {PostgreSQLManagementClientContext} client Reference to the service client. */ - constructor(client: PostgreSQLFlexibleManagementClientContext) { + constructor(client: PostgreSQLManagementClientContext) { this.client = client; } @@ -204,7 +204,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.databaseName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage @@ -229,7 +229,7 @@ const listByServerOperationSpec: msRest.OperationSpec = { Parameters.serverName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage @@ -255,7 +255,7 @@ const beginCreateOperationSpec: msRest.OperationSpec = { Parameters.databaseName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage @@ -292,7 +292,7 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { Parameters.databaseName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage @@ -316,7 +316,7 @@ const listByServerNextOperationSpec: msRest.OperationSpec = { Parameters.nextPageLink ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/postgresql/arm-postgresql-flexible/src/operations/firewallRules.ts b/sdk/postgresql/arm-postgresql-flexible/src/operations/firewallRules.ts index a6496e4ba501..c643e1f139a2 100644 --- a/sdk/postgresql/arm-postgresql-flexible/src/operations/firewallRules.ts +++ b/sdk/postgresql/arm-postgresql-flexible/src/operations/firewallRules.ts @@ -12,17 +12,17 @@ import * as msRestAzure from "@azure/ms-rest-azure-js"; import * as Models from "../models"; import * as Mappers from "../models/firewallRulesMappers"; import * as Parameters from "../models/parameters"; -import { PostgreSQLFlexibleManagementClientContext } from "../postgreSQLFlexibleManagementClientContext"; +import { PostgreSQLManagementClientContext } from "../postgreSQLManagementClientContext"; /** Class representing a FirewallRules. */ export class FirewallRules { - private readonly client: PostgreSQLFlexibleManagementClientContext; + private readonly client: PostgreSQLManagementClientContext; /** * Create a FirewallRules. - * @param {PostgreSQLFlexibleManagementClientContext} client Reference to the service client. + * @param {PostgreSQLManagementClientContext} client Reference to the service client. */ - constructor(client: PostgreSQLFlexibleManagementClientContext) { + constructor(client: PostgreSQLManagementClientContext) { this.client = client; } @@ -204,7 +204,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.firewallRuleName ], queryParameters: [ - Parameters.apiVersion2 + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -229,7 +229,7 @@ const listByServerOperationSpec: msRest.OperationSpec = { Parameters.serverName ], queryParameters: [ - Parameters.apiVersion2 + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -255,7 +255,7 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { Parameters.firewallRuleName ], queryParameters: [ - Parameters.apiVersion2 + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -292,7 +292,7 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { Parameters.firewallRuleName ], queryParameters: [ - Parameters.apiVersion2 + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -316,7 +316,7 @@ const listByServerNextOperationSpec: msRest.OperationSpec = { Parameters.nextPageLink ], queryParameters: [ - Parameters.apiVersion2 + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/postgresql/arm-postgresql-flexible/src/operations/getPrivateDnsZoneSuffix.ts b/sdk/postgresql/arm-postgresql-flexible/src/operations/getPrivateDnsZoneSuffix.ts index 9bcd159b7cd9..59a5549084b4 100644 --- a/sdk/postgresql/arm-postgresql-flexible/src/operations/getPrivateDnsZoneSuffix.ts +++ b/sdk/postgresql/arm-postgresql-flexible/src/operations/getPrivateDnsZoneSuffix.ts @@ -11,17 +11,17 @@ import * as msRest from "@azure/ms-rest-js"; import * as Models from "../models"; import * as Mappers from "../models/getPrivateDnsZoneSuffixMappers"; import * as Parameters from "../models/parameters"; -import { PostgreSQLFlexibleManagementClientContext } from "../postgreSQLFlexibleManagementClientContext"; +import { PostgreSQLManagementClientContext } from "../postgreSQLManagementClientContext"; /** Class representing a GetPrivateDnsZoneSuffix. */ export class GetPrivateDnsZoneSuffix { - private readonly client: PostgreSQLFlexibleManagementClientContext; + private readonly client: PostgreSQLManagementClientContext; /** * Create a GetPrivateDnsZoneSuffix. - * @param {PostgreSQLFlexibleManagementClientContext} client Reference to the service client. + * @param {PostgreSQLManagementClientContext} client Reference to the service client. */ - constructor(client: PostgreSQLFlexibleManagementClientContext) { + constructor(client: PostgreSQLManagementClientContext) { this.client = client; } @@ -66,7 +66,7 @@ const executeOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion2 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/postgresql/arm-postgresql-flexible/src/operations/index.ts b/sdk/postgresql/arm-postgresql-flexible/src/operations/index.ts index 5054eefb8e76..7f293c100d11 100644 --- a/sdk/postgresql/arm-postgresql-flexible/src/operations/index.ts +++ b/sdk/postgresql/arm-postgresql-flexible/src/operations/index.ts @@ -7,13 +7,12 @@ * regenerated. */ -export * from "./databases"; -export * from "./getPrivateDnsZoneSuffix"; export * from "./servers"; export * from "./firewallRules"; export * from "./configurations"; export * from "./checkNameAvailability"; export * from "./locationBasedCapabilities"; export * from "./virtualNetworkSubnetUsage"; -export * from "./recoverableServers"; export * from "./operations"; +export * from "./databases"; +export * from "./getPrivateDnsZoneSuffix"; diff --git a/sdk/postgresql/arm-postgresql-flexible/src/operations/locationBasedCapabilities.ts b/sdk/postgresql/arm-postgresql-flexible/src/operations/locationBasedCapabilities.ts index c49fae36be76..4c5cb150cb80 100644 --- a/sdk/postgresql/arm-postgresql-flexible/src/operations/locationBasedCapabilities.ts +++ b/sdk/postgresql/arm-postgresql-flexible/src/operations/locationBasedCapabilities.ts @@ -11,17 +11,17 @@ import * as msRest from "@azure/ms-rest-js"; import * as Models from "../models"; import * as Mappers from "../models/locationBasedCapabilitiesMappers"; import * as Parameters from "../models/parameters"; -import { PostgreSQLFlexibleManagementClientContext } from "../postgreSQLFlexibleManagementClientContext"; +import { PostgreSQLManagementClientContext } from "../postgreSQLManagementClientContext"; /** Class representing a LocationBasedCapabilities. */ export class LocationBasedCapabilities { - private readonly client: PostgreSQLFlexibleManagementClientContext; + private readonly client: PostgreSQLManagementClientContext; /** * Create a LocationBasedCapabilities. - * @param {PostgreSQLFlexibleManagementClientContext} client Reference to the service client. + * @param {PostgreSQLManagementClientContext} client Reference to the service client. */ - constructor(client: PostgreSQLFlexibleManagementClientContext) { + constructor(client: PostgreSQLManagementClientContext) { this.client = client; } @@ -92,7 +92,7 @@ const executeOperationSpec: msRest.OperationSpec = { Parameters.locationName ], queryParameters: [ - Parameters.apiVersion2 + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -116,7 +116,7 @@ const executeNextOperationSpec: msRest.OperationSpec = { Parameters.nextPageLink ], queryParameters: [ - Parameters.apiVersion2 + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/postgresql/arm-postgresql-flexible/src/operations/operations.ts b/sdk/postgresql/arm-postgresql-flexible/src/operations/operations.ts index 18a4e9afcf7a..079d53b2dd21 100644 --- a/sdk/postgresql/arm-postgresql-flexible/src/operations/operations.ts +++ b/sdk/postgresql/arm-postgresql-flexible/src/operations/operations.ts @@ -11,17 +11,17 @@ import * as msRest from "@azure/ms-rest-js"; import * as Models from "../models"; import * as Mappers from "../models/operationsMappers"; import * as Parameters from "../models/parameters"; -import { PostgreSQLFlexibleManagementClientContext } from "../postgreSQLFlexibleManagementClientContext"; +import { PostgreSQLManagementClientContext } from "../postgreSQLManagementClientContext"; /** Class representing a Operations. */ export class Operations { - private readonly client: PostgreSQLFlexibleManagementClientContext; + private readonly client: PostgreSQLManagementClientContext; /** * Create a Operations. - * @param {PostgreSQLFlexibleManagementClientContext} client Reference to the service client. + * @param {PostgreSQLManagementClientContext} client Reference to the service client. */ - constructor(client: PostgreSQLFlexibleManagementClientContext) { + constructor(client: PostgreSQLManagementClientContext) { this.client = client; } @@ -56,7 +56,7 @@ const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "providers/Microsoft.DBForPostgreSql/operations", queryParameters: [ - Parameters.apiVersion2 + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/postgresql/arm-postgresql-flexible/src/operations/recoverableServers.ts b/sdk/postgresql/arm-postgresql-flexible/src/operations/recoverableServers.ts deleted file mode 100644 index c16fbcd8f046..000000000000 --- a/sdk/postgresql/arm-postgresql-flexible/src/operations/recoverableServers.ts +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -import * as msRest from "@azure/ms-rest-js"; -import * as Models from "../models"; -import * as Mappers from "../models/recoverableServersMappers"; -import * as Parameters from "../models/parameters"; -import { PostgreSQLFlexibleManagementClientContext } from "../postgreSQLFlexibleManagementClientContext"; - -/** Class representing a RecoverableServers. */ -export class RecoverableServers { - private readonly client: PostgreSQLFlexibleManagementClientContext; - - /** - * Create a RecoverableServers. - * @param {PostgreSQLFlexibleManagementClientContext} client Reference to the service client. - */ - constructor(client: PostgreSQLFlexibleManagementClientContext) { - this.client = client; - } - - /** - * Gets a recoverable PostgreSQL Server. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param [options] The optional parameters - * @returns Promise - */ - get(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param callback The callback - */ - get(resourceGroupName: string, serverName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param options The optional parameters - * @param callback The callback - */ - get(resourceGroupName: string, serverName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serverName, - options - }, - getOperationSpec, - callback) as Promise; - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/servers/{serverName}/recoverableServers", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.serverName - ], - queryParameters: [ - Parameters.apiVersion2 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.RecoverableServerResource - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; diff --git a/sdk/postgresql/arm-postgresql-flexible/src/operations/servers.ts b/sdk/postgresql/arm-postgresql-flexible/src/operations/servers.ts index 543bbb2695ba..8f552abd68e6 100644 --- a/sdk/postgresql/arm-postgresql-flexible/src/operations/servers.ts +++ b/sdk/postgresql/arm-postgresql-flexible/src/operations/servers.ts @@ -12,17 +12,17 @@ import * as msRestAzure from "@azure/ms-rest-azure-js"; import * as Models from "../models"; import * as Mappers from "../models/serversMappers"; import * as Parameters from "../models/parameters"; -import { PostgreSQLFlexibleManagementClientContext } from "../postgreSQLFlexibleManagementClientContext"; +import { PostgreSQLManagementClientContext } from "../postgreSQLManagementClientContext"; /** Class representing a Servers. */ export class Servers { - private readonly client: PostgreSQLFlexibleManagementClientContext; + private readonly client: PostgreSQLManagementClientContext; /** * Create a Servers. - * @param {PostgreSQLFlexibleManagementClientContext} client Reference to the service client. + * @param {PostgreSQLManagementClientContext} client Reference to the service client. */ - constructor(client: PostgreSQLFlexibleManagementClientContext) { + constructor(client: PostgreSQLManagementClientContext) { this.client = client; } @@ -366,7 +366,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.serverName ], queryParameters: [ - Parameters.apiVersion2 + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -390,7 +390,7 @@ const listByResourceGroupOperationSpec: msRest.OperationSpec = { Parameters.resourceGroupName ], queryParameters: [ - Parameters.apiVersion2 + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -413,7 +413,7 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion2 + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -438,7 +438,7 @@ const beginCreateOperationSpec: msRest.OperationSpec = { Parameters.serverName ], queryParameters: [ - Parameters.apiVersion2 + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -474,7 +474,7 @@ const beginUpdateOperationSpec: msRest.OperationSpec = { Parameters.serverName ], queryParameters: [ - Parameters.apiVersion2 + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -507,7 +507,7 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { Parameters.serverName ], queryParameters: [ - Parameters.apiVersion2 + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -532,7 +532,7 @@ const beginRestartOperationSpec: msRest.OperationSpec = { Parameters.serverName ], queryParameters: [ - Parameters.apiVersion2 + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -556,7 +556,7 @@ const beginStartOperationSpec: msRest.OperationSpec = { Parameters.serverName ], queryParameters: [ - Parameters.apiVersion2 + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -580,7 +580,7 @@ const beginStopOperationSpec: msRest.OperationSpec = { Parameters.serverName ], queryParameters: [ - Parameters.apiVersion2 + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -603,7 +603,7 @@ const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { Parameters.nextPageLink ], queryParameters: [ - Parameters.apiVersion2 + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -627,7 +627,7 @@ const listNextOperationSpec: msRest.OperationSpec = { Parameters.nextPageLink ], queryParameters: [ - Parameters.apiVersion2 + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/postgresql/arm-postgresql-flexible/src/operations/virtualNetworkSubnetUsage.ts b/sdk/postgresql/arm-postgresql-flexible/src/operations/virtualNetworkSubnetUsage.ts index 3e8948a2ef7c..7132c84f1eaf 100644 --- a/sdk/postgresql/arm-postgresql-flexible/src/operations/virtualNetworkSubnetUsage.ts +++ b/sdk/postgresql/arm-postgresql-flexible/src/operations/virtualNetworkSubnetUsage.ts @@ -11,17 +11,17 @@ import * as msRest from "@azure/ms-rest-js"; import * as Models from "../models"; import * as Mappers from "../models/virtualNetworkSubnetUsageMappers"; import * as Parameters from "../models/parameters"; -import { PostgreSQLFlexibleManagementClientContext } from "../postgreSQLFlexibleManagementClientContext"; +import { PostgreSQLManagementClientContext } from "../postgreSQLManagementClientContext"; /** Class representing a VirtualNetworkSubnetUsage. */ export class VirtualNetworkSubnetUsage { - private readonly client: PostgreSQLFlexibleManagementClientContext; + private readonly client: PostgreSQLManagementClientContext; /** * Create a VirtualNetworkSubnetUsage. - * @param {PostgreSQLFlexibleManagementClientContext} client Reference to the service client. + * @param {PostgreSQLManagementClientContext} client Reference to the service client. */ - constructor(client: PostgreSQLFlexibleManagementClientContext) { + constructor(client: PostgreSQLManagementClientContext) { this.client = client; } @@ -68,7 +68,7 @@ const executeOperationSpec: msRest.OperationSpec = { Parameters.locationName ], queryParameters: [ - Parameters.apiVersion2 + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/postgresql/arm-postgresql-flexible/src/postgreSQLFlexibleManagementClient.ts b/sdk/postgresql/arm-postgresql-flexible/src/postgreSQLManagementClient.ts similarity index 79% rename from sdk/postgresql/arm-postgresql-flexible/src/postgreSQLFlexibleManagementClient.ts rename to sdk/postgresql/arm-postgresql-flexible/src/postgreSQLManagementClient.ts index 529b1972dc75..15926bf7b757 100644 --- a/sdk/postgresql/arm-postgresql-flexible/src/postgreSQLFlexibleManagementClient.ts +++ b/sdk/postgresql/arm-postgresql-flexible/src/postgreSQLManagementClient.ts @@ -12,24 +12,23 @@ import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; -import { PostgreSQLFlexibleManagementClientContext } from "./postgreSQLFlexibleManagementClientContext"; +import { PostgreSQLManagementClientContext } from "./postgreSQLManagementClientContext"; -class PostgreSQLFlexibleManagementClient extends PostgreSQLFlexibleManagementClientContext { +class PostgreSQLManagementClient extends PostgreSQLManagementClientContext { // Operation groups - databases: operations.Databases; - getPrivateDnsZoneSuffix: operations.GetPrivateDnsZoneSuffix; servers: operations.Servers; firewallRules: operations.FirewallRules; configurations: operations.Configurations; checkNameAvailability: operations.CheckNameAvailability; locationBasedCapabilities: operations.LocationBasedCapabilities; virtualNetworkSubnetUsage: operations.VirtualNetworkSubnetUsage; - recoverableServers: operations.RecoverableServers; operations: operations.Operations; + databases: operations.Databases; + getPrivateDnsZoneSuffix: operations.GetPrivateDnsZoneSuffix; /** - * Initializes a new instance of the PostgreSQLFlexibleManagementClient class. + * Initializes a new instance of the PostgreSQLManagementClient class. * @param credentials Credentials needed for the client to connect to Azure. Credentials * implementing the TokenCredential interface from the @azure/identity package are recommended. For * more information about these credentials, see @@ -39,27 +38,26 @@ class PostgreSQLFlexibleManagementClient extends PostgreSQLFlexibleManagementCli * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.PostgreSQLFlexibleManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.PostgreSQLManagementClientOptions) { super(credentials, subscriptionId, options); - this.databases = new operations.Databases(this); - this.getPrivateDnsZoneSuffix = new operations.GetPrivateDnsZoneSuffix(this); this.servers = new operations.Servers(this); this.firewallRules = new operations.FirewallRules(this); this.configurations = new operations.Configurations(this); this.checkNameAvailability = new operations.CheckNameAvailability(this); this.locationBasedCapabilities = new operations.LocationBasedCapabilities(this); this.virtualNetworkSubnetUsage = new operations.VirtualNetworkSubnetUsage(this); - this.recoverableServers = new operations.RecoverableServers(this); this.operations = new operations.Operations(this); + this.databases = new operations.Databases(this); + this.getPrivateDnsZoneSuffix = new operations.GetPrivateDnsZoneSuffix(this); } } // Operation Specifications export { - PostgreSQLFlexibleManagementClient, - PostgreSQLFlexibleManagementClientContext, - Models as PostgreSQLFlexibleManagementModels, - Mappers as PostgreSQLFlexibleManagementMappers + PostgreSQLManagementClient, + PostgreSQLManagementClientContext, + Models as PostgreSQLManagementModels, + Mappers as PostgreSQLManagementMappers }; export * from "./operations"; diff --git a/sdk/postgresql/arm-postgresql-flexible/src/postgreSQLFlexibleManagementClientContext.ts b/sdk/postgresql/arm-postgresql-flexible/src/postgreSQLManagementClientContext.ts similarity index 90% rename from sdk/postgresql/arm-postgresql-flexible/src/postgreSQLFlexibleManagementClientContext.ts rename to sdk/postgresql/arm-postgresql-flexible/src/postgreSQLManagementClientContext.ts index b68ccae65c85..1b12aa2e9d10 100644 --- a/sdk/postgresql/arm-postgresql-flexible/src/postgreSQLFlexibleManagementClientContext.ts +++ b/sdk/postgresql/arm-postgresql-flexible/src/postgreSQLManagementClientContext.ts @@ -13,14 +13,14 @@ import * as msRestAzure from "@azure/ms-rest-azure-js"; import { TokenCredential } from "@azure/core-auth"; const packageName = "@azure/arm-postgresql-flexible"; -const packageVersion = "1.0.0"; +const packageVersion = "2.0.0"; -export class PostgreSQLFlexibleManagementClientContext extends msRestAzure.AzureServiceClient { +export class PostgreSQLManagementClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; /** - * Initializes a new instance of the PostgreSQLFlexibleManagementClient class. + * Initializes a new instance of the PostgreSQLManagementClient class. * @param credentials Credentials needed for the client to connect to Azure. Credentials * implementing the TokenCredential interface from the @azure/identity package are recommended. For * more information about these credentials, see @@ -30,7 +30,7 @@ export class PostgreSQLFlexibleManagementClientContext extends msRestAzure.Azure * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.PostgreSQLFlexibleManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.PostgreSQLManagementClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } From 52ad992bdfccbd55804e5eab8f72bb8949716deb Mon Sep 17 00:00:00 2001 From: colawwj <70128817+colawwj@users.noreply.github.com> Date: Thu, 8 Jul 2021 09:06:31 +0800 Subject: [PATCH 05/28] ten identity (#16252) --- .../arm-hybridkubernetes/README.md | 108 +++++++++------- .../arm-hybridkubernetes/package.json | 9 +- .../src/connectedKubernetesClient.ts | 10 +- .../src/connectedKubernetesClientContext.ts | 14 +- sdk/iotcentral/arm-iotcentral/README.md | 108 +++++++++------- sdk/iotcentral/arm-iotcentral/package.json | 9 +- .../arm-iotcentral/src/iotCentralClient.ts | 10 +- .../src/iotCentralClientContext.ts | 14 +- .../README.md | 104 ++++++++------- .../package.json | 9 +- .../src/iotHubClient.ts | 10 +- .../src/iotHubClientContext.ts | 14 +- sdk/iothub/arm-iothub/README.md | 114 +++++++++-------- sdk/iothub/arm-iothub/package.json | 9 +- sdk/iothub/arm-iothub/src/iotHubClient.ts | 10 +- .../arm-iothub/src/iotHubClientContext.ts | 14 +- sdk/iotspaces/arm-iotspaces/README.md | 115 +++++++++-------- sdk/iotspaces/arm-iotspaces/package.json | 9 +- .../arm-iotspaces/src/ioTSpacesClient.ts | 10 +- .../src/ioTSpacesClientContext.ts | 14 +- .../README.md | 106 ++++++++------- .../package.json | 9 +- .../src/keyVaultManagementClient.ts | 10 +- .../src/keyVaultManagementClientContext.ts | 14 +- .../README.md | 111 ++++++++-------- .../package.json | 9 +- .../src/keyVaultManagementClient.ts | 10 +- .../src/keyVaultManagementClientContext.ts | 14 +- .../arm-kubernetesconfiguration/README.md | 120 +++++++++-------- .../arm-kubernetesconfiguration/package.json | 9 +- .../src/sourceControlConfigurationClient.ts | 10 +- ...sourceControlConfigurationClientContext.ts | 14 +- sdk/kusto/arm-kusto/README.md | 121 +++++++++--------- sdk/kusto/arm-kusto/package.json | 9 +- .../arm-kusto/src/kustoManagementClient.ts | 10 +- .../src/kustoManagementClientContext.ts | 14 +- sdk/labservices/arm-labservices/README.md | 106 ++++++++------- sdk/labservices/arm-labservices/package.json | 9 +- .../arm-labservices/src/managedLabsClient.ts | 10 +- .../src/managedLabsClientContext.ts | 14 +- 40 files changed, 827 insertions(+), 616 deletions(-) diff --git a/sdk/hybridkubernetes/arm-hybridkubernetes/README.md b/sdk/hybridkubernetes/arm-hybridkubernetes/README.md index a0c8d66fe7c2..25de805c58a1 100644 --- a/sdk/hybridkubernetes/arm-hybridkubernetes/README.md +++ b/sdk/hybridkubernetes/arm-hybridkubernetes/README.md @@ -1,93 +1,103 @@ ## Azure ConnectedKubernetesClient SDK for JavaScript -This package contains an isomorphic SDK for ConnectedKubernetesClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for ConnectedKubernetesClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-hybridkubernetes` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: ```bash -npm install @azure/arm-hybridkubernetes +npm install --save @azure/arm-hybridkubernetes @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - client creation and get connectedCluster as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. -```bash -npm install @azure/ms-rest-nodeauth@"^3.0.0" -``` +#### nodejs - Authentication, client creation, and get connectedCluster as an example written in JavaScript. ##### Sample code -While the below sample uses the interactive login, other authentication options can be found in the [README.md file of @azure/ms-rest-nodeauth](https://www.npmjs.com/package/@azure/ms-rest-nodeauth) package -```typescript -const msRestNodeAuth = require("@azure/ms-rest-nodeauth"); +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); const { ConnectedKubernetesClient } = require("@azure/arm-hybridkubernetes"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new ConnectedKubernetesClient(creds, subscriptionId); - const resourceGroupName = "testresourceGroupName"; - const clusterName = "testclusterName"; - client.connectedCluster.get(resourceGroupName, clusterName).then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new ConnectedKubernetesClient(creds, subscriptionId); +const resourceGroupName = "testresourceGroupName"; +const clusterName = "testclusterName"; +client.connectedCluster.get(resourceGroupName, clusterName).then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and get connectedCluster as an example written in JavaScript. +#### browser - Authentication, client creation, and get connectedCluster as an example written in JavaScript. -##### Install @azure/ms-rest-browserauth - -```bash -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-hybridkubernetes sample - - + diff --git a/sdk/hybridkubernetes/arm-hybridkubernetes/package.json b/sdk/hybridkubernetes/arm-hybridkubernetes/package.json index b3cdcdcf0e86..7f3cb14cdc47 100644 --- a/sdk/hybridkubernetes/arm-hybridkubernetes/package.json +++ b/sdk/hybridkubernetes/arm-hybridkubernetes/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-hybridkubernetes", "author": "Microsoft Corporation", "description": "ConnectedKubernetesClient Library with typescript type definitions for node.js and browser.", - "version": "1.0.0", + "version": "1.1.0", "dependencies": { - "@azure/ms-rest-azure-js": "^2.0.1", - "@azure/ms-rest-js": "^2.0.4", + "@azure/ms-rest-azure-js": "^2.1.0", + "@azure/ms-rest-js": "^2.2.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.10.0" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/connectedKubernetesClient.js", "types": "./esm/connectedKubernetesClient.d.ts", "devDependencies": { - "typescript": "^3.5.3", + "typescript": "^3.6.0", "rollup": "^1.18.0", "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", diff --git a/sdk/hybridkubernetes/arm-hybridkubernetes/src/connectedKubernetesClient.ts b/sdk/hybridkubernetes/arm-hybridkubernetes/src/connectedKubernetesClient.ts index 699b1bcf8ac4..678e78cab33d 100644 --- a/sdk/hybridkubernetes/arm-hybridkubernetes/src/connectedKubernetesClient.ts +++ b/sdk/hybridkubernetes/arm-hybridkubernetes/src/connectedKubernetesClient.ts @@ -8,6 +8,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -21,11 +22,16 @@ class ConnectedKubernetesClient extends ConnectedKubernetesClientContext { /** * Initializes a new instance of the ConnectedKubernetesClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.ConnectedKubernetesClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.ConnectedKubernetesClientOptions) { super(credentials, subscriptionId, options); this.connectedCluster = new operations.ConnectedClusterOperations(this); this.operations = new operations.Operations(this); diff --git a/sdk/hybridkubernetes/arm-hybridkubernetes/src/connectedKubernetesClientContext.ts b/sdk/hybridkubernetes/arm-hybridkubernetes/src/connectedKubernetesClientContext.ts index 800f3c42fc37..f1428b943a43 100644 --- a/sdk/hybridkubernetes/arm-hybridkubernetes/src/connectedKubernetesClientContext.ts +++ b/sdk/hybridkubernetes/arm-hybridkubernetes/src/connectedKubernetesClientContext.ts @@ -9,23 +9,29 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-hybridkubernetes"; -const packageVersion = "1.0.0"; +const packageVersion = "1.1.0"; export class ConnectedKubernetesClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; apiVersion?: string; subscriptionId: string; /** * Initializes a new instance of the ConnectedKubernetesClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.ConnectedKubernetesClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.ConnectedKubernetesClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } diff --git a/sdk/iotcentral/arm-iotcentral/README.md b/sdk/iotcentral/arm-iotcentral/README.md index 927c3351386c..da7bc02cc8bc 100644 --- a/sdk/iotcentral/arm-iotcentral/README.md +++ b/sdk/iotcentral/arm-iotcentral/README.md @@ -1,93 +1,103 @@ ## Azure IotCentralClient SDK for JavaScript -This package contains an isomorphic SDK for IotCentralClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for IotCentralClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-iotcentral` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: ```bash -npm install @azure/arm-iotcentral +npm install --save @azure/arm-iotcentral @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - client creation and get apps as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. -```bash -npm install @azure/ms-rest-nodeauth@"^3.0.0" -``` +#### nodejs - Authentication, client creation, and get apps as an example written in JavaScript. ##### Sample code -While the below sample uses the interactive login, other authentication options can be found in the [README.md file of @azure/ms-rest-nodeauth](https://www.npmjs.com/package/@azure/ms-rest-nodeauth) package -```typescript -const msRestNodeAuth = require("@azure/ms-rest-nodeauth"); +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); const { IotCentralClient } = require("@azure/arm-iotcentral"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new IotCentralClient(creds, subscriptionId); - const resourceGroupName = "testresourceGroupName"; - const resourceName = "testresourceName"; - client.apps.get(resourceGroupName, resourceName).then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new IotCentralClient(creds, subscriptionId); +const resourceGroupName = "testresourceGroupName"; +const resourceName = "testresourceName"; +client.apps.get(resourceGroupName, resourceName).then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and get apps as an example written in JavaScript. +#### browser - Authentication, client creation, and get apps as an example written in JavaScript. -##### Install @azure/ms-rest-browserauth - -```bash -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-iotcentral sample - - + diff --git a/sdk/iotcentral/arm-iotcentral/package.json b/sdk/iotcentral/arm-iotcentral/package.json index 395353525347..7cebb5c29b27 100644 --- a/sdk/iotcentral/arm-iotcentral/package.json +++ b/sdk/iotcentral/arm-iotcentral/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-iotcentral", "author": "Microsoft Corporation", "description": "IotCentralClient Library with typescript type definitions for node.js and browser.", - "version": "4.1.0", + "version": "4.2.0", "dependencies": { - "@azure/ms-rest-azure-js": "^2.0.1", - "@azure/ms-rest-js": "^2.0.4", + "@azure/ms-rest-azure-js": "^2.1.0", + "@azure/ms-rest-js": "^2.2.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.10.0" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/iotCentralClient.js", "types": "./esm/iotCentralClient.d.ts", "devDependencies": { - "typescript": "^3.5.3", + "typescript": "^3.6.0", "rollup": "^1.18.0", "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", diff --git a/sdk/iotcentral/arm-iotcentral/src/iotCentralClient.ts b/sdk/iotcentral/arm-iotcentral/src/iotCentralClient.ts index 71f83aaafdb6..d198b5bddd66 100644 --- a/sdk/iotcentral/arm-iotcentral/src/iotCentralClient.ts +++ b/sdk/iotcentral/arm-iotcentral/src/iotCentralClient.ts @@ -8,6 +8,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -21,11 +22,16 @@ class IotCentralClient extends IotCentralClientContext { /** * Initializes a new instance of the IotCentralClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The subscription identifier. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.IotCentralClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.IotCentralClientOptions) { super(credentials, subscriptionId, options); this.apps = new operations.Apps(this); this.operations = new operations.Operations(this); diff --git a/sdk/iotcentral/arm-iotcentral/src/iotCentralClientContext.ts b/sdk/iotcentral/arm-iotcentral/src/iotCentralClientContext.ts index f1963b771d2b..d53f1a843899 100644 --- a/sdk/iotcentral/arm-iotcentral/src/iotCentralClientContext.ts +++ b/sdk/iotcentral/arm-iotcentral/src/iotCentralClientContext.ts @@ -9,23 +9,29 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-iotcentral"; -const packageVersion = "4.1.0"; +const packageVersion = "4.2.0"; export class IotCentralClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; apiVersion?: string; /** * Initializes a new instance of the IotCentralClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The subscription identifier. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.IotCentralClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.IotCentralClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } diff --git a/sdk/iothub/arm-iothub-profile-2020-09-01-hybrid/README.md b/sdk/iothub/arm-iothub-profile-2020-09-01-hybrid/README.md index d5916c2d48d2..95ce07fc5114 100644 --- a/sdk/iothub/arm-iothub-profile-2020-09-01-hybrid/README.md +++ b/sdk/iothub/arm-iothub-profile-2020-09-01-hybrid/README.md @@ -1,90 +1,100 @@ ## Azure IotHubClient SDK for JavaScript -This package contains an isomorphic SDK for IotHubClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for IotHubClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-iothub-profile-2020-09-01-hybrid` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: ```bash -npm install @azure/arm-iothub-profile-2020-09-01-hybrid +npm install --save @azure/arm-iothub-profile-2020-09-01-hybrid @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - Authentication, client creation and list operations as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. -```bash -npm install @azure/ms-rest-nodeauth@"^3.0.0" -``` +#### nodejs - Authentication, client creation, and list operations as an example written in JavaScript. ##### Sample code -```typescript -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { IotHubClient, IotHubModels, IotHubMappers } from "@azure/arm-iothub-profile-2020-09-01-hybrid"; +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { IotHubClient } = require("@azure/arm-iothub-profile-2020-09-01-hybrid"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new IotHubClient(creds, subscriptionId); - client.operations.list().then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new IotHubClient(creds, subscriptionId); + +client.operations.list().then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and list operations as an example written in JavaScript. - -##### Install @azure/ms-rest-browserauth +#### browser - Authentication, client creation, and list operations as an example written in JavaScript. -```bash -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-iothub-profile-2020-09-01-hybrid sample - - + diff --git a/sdk/iothub/arm-iothub-profile-2020-09-01-hybrid/package.json b/sdk/iothub/arm-iothub-profile-2020-09-01-hybrid/package.json index b786b8f407a3..6b25b95203f4 100644 --- a/sdk/iothub/arm-iothub-profile-2020-09-01-hybrid/package.json +++ b/sdk/iothub/arm-iothub-profile-2020-09-01-hybrid/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-iothub-profile-2020-09-01-hybrid", "author": "Microsoft Corporation", "description": "IotHubClient Library with typescript type definitions for node.js and browser.", - "version": "1.0.0", + "version": "1.1.0", "dependencies": { - "@azure/ms-rest-azure-js": "^2.0.1", - "@azure/ms-rest-js": "^2.0.4", + "@azure/ms-rest-azure-js": "^2.1.0", + "@azure/ms-rest-js": "^2.2.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.10.0" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/iotHubClient.js", "types": "./esm/iotHubClient.d.ts", "devDependencies": { - "typescript": "^3.5.3", + "typescript": "^3.6.0", "rollup": "^1.18.0", "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", diff --git a/sdk/iothub/arm-iothub-profile-2020-09-01-hybrid/src/iotHubClient.ts b/sdk/iothub/arm-iothub-profile-2020-09-01-hybrid/src/iotHubClient.ts index acbec4a87d10..36f5e14be98a 100644 --- a/sdk/iothub/arm-iothub-profile-2020-09-01-hybrid/src/iotHubClient.ts +++ b/sdk/iothub/arm-iothub-profile-2020-09-01-hybrid/src/iotHubClient.ts @@ -9,6 +9,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -25,11 +26,16 @@ class IotHubClient extends IotHubClientContext { /** * Initializes a new instance of the IotHubClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The subscription identifier. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.IotHubClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.IotHubClientOptions) { super(credentials, subscriptionId, options); this.operations = new operations.Operations(this); this.iotHubResource = new operations.IotHubResource(this); diff --git a/sdk/iothub/arm-iothub-profile-2020-09-01-hybrid/src/iotHubClientContext.ts b/sdk/iothub/arm-iothub-profile-2020-09-01-hybrid/src/iotHubClientContext.ts index 45b7d0e435bb..8ecef899b237 100644 --- a/sdk/iothub/arm-iothub-profile-2020-09-01-hybrid/src/iotHubClientContext.ts +++ b/sdk/iothub/arm-iothub-profile-2020-09-01-hybrid/src/iotHubClientContext.ts @@ -10,23 +10,29 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-iothub-profile-2020-09-01-hybrid"; -const packageVersion = "1.0.0"; +const packageVersion = "1.1.0"; export class IotHubClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; apiVersion?: string; /** * Initializes a new instance of the IotHubClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The subscription identifier. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.IotHubClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.IotHubClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } diff --git a/sdk/iothub/arm-iothub/README.md b/sdk/iothub/arm-iothub/README.md index ddb6fdb5c5ca..2ca2ced02341 100644 --- a/sdk/iothub/arm-iothub/README.md +++ b/sdk/iothub/arm-iothub/README.md @@ -1,65 +1,74 @@ ## Azure IotHubClient SDK for JavaScript -This package contains an isomorphic SDK for IotHubClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for IotHubClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-iothub` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: ```bash -npm install @azure/arm-iothub +npm install --save @azure/arm-iothub @azure/identity ``` -### How to use +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. -#### nodejs - client creation and list operations as an example written in TypeScript. +### How to use -##### Install @azure/ms-rest-nodeauth +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -```bash -npm install @azure/ms-rest-nodeauth@"^3.0.0" -``` +#### nodejs - Authentication, client creation, and list operations as an example written in JavaScript. ##### Sample code -While the below sample uses the interactive login, other authentication options can be found in the [README.md file of @azure/ms-rest-nodeauth](https://www.npmjs.com/package/@azure/ms-rest-nodeauth) package - -```typescript -const msRestNodeAuth = require("@azure/ms-rest-nodeauth"); +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); const { IotHubClient } = require("@azure/arm-iothub"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth - .interactiveLogin() - .then((creds) => { - const client = new IotHubClient(creds, subscriptionId); - client.operations.list().then((result) => { - console.log("The result is:"); - console.log(result); - }); - }) - .catch((err) => { - console.error(err); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new IotHubClient(creds, subscriptionId); + +client.operations.list().then((result) => { + console.log("The result is:"); + console.log(result); +}).catch((err) => { + console.log("An error occurred:"); + console.error(err); +}); ``` -#### browser - Authentication, client creation and list operations as an example written in JavaScript. - -##### Install @azure/ms-rest-browserauth +#### browser - Authentication, client creation, and list operations as an example written in JavaScript. -```bash -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html ```html @@ -67,32 +76,25 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to @azure/arm-iothub sample - - + diff --git a/sdk/iothub/arm-iothub/package.json b/sdk/iothub/arm-iothub/package.json index 7824a6ad8e67..bb6d2ff7e707 100644 --- a/sdk/iothub/arm-iothub/package.json +++ b/sdk/iothub/arm-iothub/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-iothub", "author": "Microsoft Corporation", "description": "IotHubClient Library with typescript type definitions for node.js and browser.", - "version": "5.0.0", + "version": "5.1.0", "dependencies": { - "@azure/ms-rest-azure-js": "^2.0.1", - "@azure/ms-rest-js": "^2.0.4", + "@azure/ms-rest-azure-js": "^2.1.0", + "@azure/ms-rest-js": "^2.2.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.10.0" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/iotHubClient.js", "types": "./esm/iotHubClient.d.ts", "devDependencies": { - "typescript": "^3.5.3", + "typescript": "^3.6.0", "rollup": "^1.18.0", "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", diff --git a/sdk/iothub/arm-iothub/src/iotHubClient.ts b/sdk/iothub/arm-iothub/src/iotHubClient.ts index a21e31f2cd97..cab2738b2ec9 100644 --- a/sdk/iothub/arm-iothub/src/iotHubClient.ts +++ b/sdk/iothub/arm-iothub/src/iotHubClient.ts @@ -8,6 +8,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -25,12 +26,17 @@ class IotHubClient extends IotHubClientContext { /** * Initializes a new instance of the IotHubClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The subscription identifier. * @param [options] The parameter options */ constructor( - credentials: msRest.ServiceClientCredentials, + credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.IotHubClientOptions ) { diff --git a/sdk/iothub/arm-iothub/src/iotHubClientContext.ts b/sdk/iothub/arm-iothub/src/iotHubClientContext.ts index 22840bd1bf8e..7d65d9a5e4dc 100644 --- a/sdk/iothub/arm-iothub/src/iotHubClientContext.ts +++ b/sdk/iothub/arm-iothub/src/iotHubClientContext.ts @@ -9,24 +9,30 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-iothub"; -const packageVersion = "5.0.0"; +const packageVersion = "5.1.0"; export class IotHubClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; apiVersion?: string; /** * Initializes a new instance of the IotHubClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The subscription identifier. * @param [options] The parameter options */ constructor( - credentials: msRest.ServiceClientCredentials, + credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.IotHubClientOptions ) { diff --git a/sdk/iotspaces/arm-iotspaces/README.md b/sdk/iotspaces/arm-iotspaces/README.md index eda0747a7cb1..5134ca5885f1 100644 --- a/sdk/iotspaces/arm-iotspaces/README.md +++ b/sdk/iotspaces/arm-iotspaces/README.md @@ -1,93 +1,103 @@ ## Azure IoTSpacesClient SDK for JavaScript -This package contains an isomorphic SDK for IoTSpacesClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for IoTSpacesClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites -``` -npm install @azure/arm-iotspaces +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-iotspaces` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: +```bash +npm install --save @azure/arm-iotspaces @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - Authentication, client creation and get ioTSpaces as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -``` -npm install @azure/ms-rest-nodeauth -``` +#### nodejs - Authentication, client creation, and get ioTSpaces as an example written in JavaScript. ##### Sample code -```ts -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { IoTSpacesClient, IoTSpacesModels, IoTSpacesMappers } from "@azure/arm-iotspaces"; +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { IoTSpacesClient } = require("@azure/arm-iotspaces"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new IoTSpacesClient(creds, subscriptionId); - const resourceGroupName = "testresourceGroupName"; - const resourceName = "testresourceName"; - client.ioTSpaces.get(resourceGroupName, resourceName).then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new IoTSpacesClient(creds, subscriptionId); +const resourceGroupName = "testresourceGroupName"; +const resourceName = "testresourceName"; +client.ioTSpaces.get(resourceGroupName, resourceName).then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and get ioTSpaces as an example written in JavaScript. +#### browser - Authentication, client creation, and get ioTSpaces as an example written in JavaScript. -##### Install @azure/ms-rest-browserauth - -``` -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-iotspaces sample - - + @@ -99,5 +109,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fiotspaces%2Farm-iotspaces%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/iotspaces/arm-iotspaces/README.png) diff --git a/sdk/iotspaces/arm-iotspaces/package.json b/sdk/iotspaces/arm-iotspaces/package.json index fa3f916b50db..05928fa12036 100644 --- a/sdk/iotspaces/arm-iotspaces/package.json +++ b/sdk/iotspaces/arm-iotspaces/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-iotspaces", "author": "Microsoft Corporation", "description": "IoTSpacesClient Library with typescript type definitions for node.js and browser.", - "version": "1.1.0", + "version": "1.2.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.1.0", - "@azure/ms-rest-js": "^1.1.0", + "@azure/ms-rest-azure-js": "^1.4.0", + "@azure/ms-rest-js": "^1.11.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.9.3" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/ioTSpacesClient.js", "types": "./esm/ioTSpacesClient.d.ts", "devDependencies": { - "typescript": "^3.1.1", + "typescript": "^3.6.0", "rollup": "^0.66.2", "rollup-plugin-node-resolve": "^3.4.0", "uglify-js": "^3.4.9" diff --git a/sdk/iotspaces/arm-iotspaces/src/ioTSpacesClient.ts b/sdk/iotspaces/arm-iotspaces/src/ioTSpacesClient.ts index 7528df619bbf..6e77832a519f 100644 --- a/sdk/iotspaces/arm-iotspaces/src/ioTSpacesClient.ts +++ b/sdk/iotspaces/arm-iotspaces/src/ioTSpacesClient.ts @@ -9,6 +9,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -22,11 +23,16 @@ class IoTSpacesClient extends IoTSpacesClientContext { /** * Initializes a new instance of the IoTSpacesClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The subscription identifier. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.IoTSpacesClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.IoTSpacesClientOptions) { super(credentials, subscriptionId, options); this.ioTSpaces = new operations.IoTSpaces(this); this.operations = new operations.Operations(this); diff --git a/sdk/iotspaces/arm-iotspaces/src/ioTSpacesClientContext.ts b/sdk/iotspaces/arm-iotspaces/src/ioTSpacesClientContext.ts index ee7fd255ff8a..9829fa09aee2 100644 --- a/sdk/iotspaces/arm-iotspaces/src/ioTSpacesClientContext.ts +++ b/sdk/iotspaces/arm-iotspaces/src/ioTSpacesClientContext.ts @@ -10,23 +10,29 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-iotspaces"; -const packageVersion = "0.1.0"; +const packageVersion = "1.2.0"; export class IoTSpacesClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; apiVersion?: string; /** * Initializes a new instance of the IoTSpacesClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The subscription identifier. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.IoTSpacesClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.IoTSpacesClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } diff --git a/sdk/keyvault/arm-keyvault-profile-2019-03-01-hybrid/README.md b/sdk/keyvault/arm-keyvault-profile-2019-03-01-hybrid/README.md index 7e8b132ef62a..4bb4b303117b 100644 --- a/sdk/keyvault/arm-keyvault-profile-2019-03-01-hybrid/README.md +++ b/sdk/keyvault/arm-keyvault-profile-2019-03-01-hybrid/README.md @@ -1,89 +1,100 @@ ## Azure KeyVaultManagementClient SDK for JavaScript -This package contains an isomorphic SDK for KeyVaultManagementClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for KeyVaultManagementClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-keyvault-profile-2019-03-01-hybrid` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: ```bash -npm install @azure/arm-keyvault-profile-2019-03-01-hybrid +npm install --save @azure/arm-keyvault-profile-2019-03-01-hybrid @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - Authentication, client creation and list operations as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -```bash -npm install @azure/ms-rest-nodeauth -``` +#### nodejs - Authentication, client creation, and list operations as an example written in JavaScript. ##### Sample code -```typescript -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { KeyVaultManagementClient, KeyVaultManagementModels, KeyVaultManagementMappers } from "@azure/arm-keyvault-profile-2019-03-01-hybrid"; +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { KeyVaultManagementClient } = require("@azure/arm-keyvault-profile-2019-03-01-hybrid"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new KeyVaultManagementClient(creds, subscriptionId); - client.operations.list().then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new KeyVaultManagementClient(creds, subscriptionId); + +client.operations.list().then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and list operations as an example written in JavaScript. +#### browser - Authentication, client creation, and list operations as an example written in JavaScript. -##### Install @azure/ms-rest-browserauth - -```bash -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-keyvault-profile-2019-03-01-hybrid sample - - + @@ -95,5 +106,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fkeyvault%2Farm-keyvault-profile-2019-03-01-hybrid%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/keyvault/arm-keyvault-profile-2019-03-01-hybrid/README.png) diff --git a/sdk/keyvault/arm-keyvault-profile-2019-03-01-hybrid/package.json b/sdk/keyvault/arm-keyvault-profile-2019-03-01-hybrid/package.json index 687d0d755e39..b8ca3c18b129 100644 --- a/sdk/keyvault/arm-keyvault-profile-2019-03-01-hybrid/package.json +++ b/sdk/keyvault/arm-keyvault-profile-2019-03-01-hybrid/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-keyvault-profile-2019-03-01-hybrid", "author": "Microsoft Corporation", "description": "KeyVaultManagementClient Library with typescript type definitions for node.js and browser.", - "version": "1.0.0", + "version": "1.1.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.3.2", - "@azure/ms-rest-js": "^1.8.1", + "@azure/ms-rest-azure-js": "^1.4.0", + "@azure/ms-rest-js": "^1.11.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.9.3" }, "keywords": [ @@ -21,7 +22,7 @@ "module": "./esm/keyVaultManagementClient.js", "types": "./esm/keyVaultManagementClient.d.ts", "devDependencies": { - "typescript": "^3.1.1", + "typescript": "^3.6.0", "rollup": "^0.66.2", "rollup-plugin-node-resolve": "^3.4.0", "rollup-plugin-sourcemaps": "^0.4.2", diff --git a/sdk/keyvault/arm-keyvault-profile-2019-03-01-hybrid/src/keyVaultManagementClient.ts b/sdk/keyvault/arm-keyvault-profile-2019-03-01-hybrid/src/keyVaultManagementClient.ts index acc9c9111a85..df0d83dcc5f3 100644 --- a/sdk/keyvault/arm-keyvault-profile-2019-03-01-hybrid/src/keyVaultManagementClient.ts +++ b/sdk/keyvault/arm-keyvault-profile-2019-03-01-hybrid/src/keyVaultManagementClient.ts @@ -9,6 +9,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -23,12 +24,17 @@ class KeyVaultManagementClient extends KeyVaultManagementClientContext { /** * Initializes a new instance of the KeyVaultManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId Subscription credentials which uniquely identify Microsoft Azure * subscription. The subscription ID forms part of the URI for every service call. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.KeyVaultManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.KeyVaultManagementClientOptions) { super(credentials, subscriptionId, options); this.operations = new operations.Operations(this); this.vaults = new operations.Vaults(this); diff --git a/sdk/keyvault/arm-keyvault-profile-2019-03-01-hybrid/src/keyVaultManagementClientContext.ts b/sdk/keyvault/arm-keyvault-profile-2019-03-01-hybrid/src/keyVaultManagementClientContext.ts index 2a5c055c2591..fa3f4a2eda7c 100644 --- a/sdk/keyvault/arm-keyvault-profile-2019-03-01-hybrid/src/keyVaultManagementClientContext.ts +++ b/sdk/keyvault/arm-keyvault-profile-2019-03-01-hybrid/src/keyVaultManagementClientContext.ts @@ -10,24 +10,30 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-keyvault-profile-2019-03-01-hybrid"; -const packageVersion = "1.0.0"; +const packageVersion = "1.1.0"; export class KeyVaultManagementClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; apiVersion?: string; /** * Initializes a new instance of the KeyVaultManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId Subscription credentials which uniquely identify Microsoft Azure * subscription. The subscription ID forms part of the URI for every service call. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.KeyVaultManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.KeyVaultManagementClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } diff --git a/sdk/keyvault/arm-keyvault-profile-2020-09-01-hybrid/README.md b/sdk/keyvault/arm-keyvault-profile-2020-09-01-hybrid/README.md index 9edd6a93ce82..0a94ae76e520 100644 --- a/sdk/keyvault/arm-keyvault-profile-2020-09-01-hybrid/README.md +++ b/sdk/keyvault/arm-keyvault-profile-2020-09-01-hybrid/README.md @@ -1,94 +1,103 @@ ## Azure KeyVaultManagementClient SDK for JavaScript -This package contains an isomorphic SDK for KeyVaultManagementClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for KeyVaultManagementClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-keyvault-profile-2020-09-01-hybrid` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: ```bash -npm install @azure/arm-keyvault-profile-2020-09-01-hybrid +npm install --save @azure/arm-keyvault-profile-2020-09-01-hybrid @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - Authentication, client creation and get vaults as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. -```bash -npm install @azure/ms-rest-nodeauth@"^3.0.0" -``` +#### nodejs - Authentication, client creation, and get vaults as an example written in JavaScript. ##### Sample code -```typescript -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { KeyVaultManagementClient, KeyVaultManagementModels, KeyVaultManagementMappers } from "@azure/arm-keyvault-profile-2020-09-01-hybrid"; +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { KeyVaultManagementClient } = require("@azure/arm-keyvault-profile-2020-09-01-hybrid"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new KeyVaultManagementClient(creds, subscriptionId); - const resourceGroupName = "testresourceGroupName"; - const vaultName = "testvaultName"; - client.vaults.get(resourceGroupName, vaultName).then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new KeyVaultManagementClient(creds, subscriptionId); +const resourceGroupName = "testresourceGroupName"; +const vaultName = "testvaultName"; +client.vaults.get(resourceGroupName, vaultName).then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and get vaults as an example written in JavaScript. +#### browser - Authentication, client creation, and get vaults as an example written in JavaScript. -##### Install @azure/ms-rest-browserauth - -```bash -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-keyvault-profile-2020-09-01-hybrid sample - - + diff --git a/sdk/keyvault/arm-keyvault-profile-2020-09-01-hybrid/package.json b/sdk/keyvault/arm-keyvault-profile-2020-09-01-hybrid/package.json index 95be678bbf1f..8aac7d183a58 100644 --- a/sdk/keyvault/arm-keyvault-profile-2020-09-01-hybrid/package.json +++ b/sdk/keyvault/arm-keyvault-profile-2020-09-01-hybrid/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-keyvault-profile-2020-09-01-hybrid", "author": "Microsoft Corporation", "description": "KeyVaultManagementClient Library with typescript type definitions for node.js and browser.", - "version": "1.0.0", + "version": "1.1.0", "dependencies": { - "@azure/ms-rest-azure-js": "^2.0.1", - "@azure/ms-rest-js": "^2.0.4", + "@azure/ms-rest-azure-js": "^2.1.0", + "@azure/ms-rest-js": "^2.2.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.10.0" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/keyVaultManagementClient.js", "types": "./esm/keyVaultManagementClient.d.ts", "devDependencies": { - "typescript": "^3.5.3", + "typescript": "^3.6.0", "rollup": "^1.18.0", "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", diff --git a/sdk/keyvault/arm-keyvault-profile-2020-09-01-hybrid/src/keyVaultManagementClient.ts b/sdk/keyvault/arm-keyvault-profile-2020-09-01-hybrid/src/keyVaultManagementClient.ts index d3630f0ec0ca..379bb4a40771 100644 --- a/sdk/keyvault/arm-keyvault-profile-2020-09-01-hybrid/src/keyVaultManagementClient.ts +++ b/sdk/keyvault/arm-keyvault-profile-2020-09-01-hybrid/src/keyVaultManagementClient.ts @@ -9,6 +9,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -25,12 +26,17 @@ class KeyVaultManagementClient extends KeyVaultManagementClientContext { /** * Initializes a new instance of the KeyVaultManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId Subscription credentials which uniquely identify Microsoft Azure * subscription. The subscription ID forms part of the URI for every service call. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.KeyVaultManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.KeyVaultManagementClientOptions) { super(credentials, subscriptionId, options); this.vaults = new operations.Vaults(this); this.privateEndpointConnections = new operations.PrivateEndpointConnections(this); diff --git a/sdk/keyvault/arm-keyvault-profile-2020-09-01-hybrid/src/keyVaultManagementClientContext.ts b/sdk/keyvault/arm-keyvault-profile-2020-09-01-hybrid/src/keyVaultManagementClientContext.ts index 114184640c28..559494fadc27 100644 --- a/sdk/keyvault/arm-keyvault-profile-2020-09-01-hybrid/src/keyVaultManagementClientContext.ts +++ b/sdk/keyvault/arm-keyvault-profile-2020-09-01-hybrid/src/keyVaultManagementClientContext.ts @@ -10,24 +10,30 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-keyvault-profile-2020-09-01-hybrid"; -const packageVersion = "1.0.0"; +const packageVersion = "1.1.0"; export class KeyVaultManagementClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; apiVersion?: string; /** * Initializes a new instance of the KeyVaultManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId Subscription credentials which uniquely identify Microsoft Azure * subscription. The subscription ID forms part of the URI for every service call. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.KeyVaultManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.KeyVaultManagementClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } diff --git a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/README.md b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/README.md index b0fcd6f94621..e7579c259462 100644 --- a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/README.md +++ b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/README.md @@ -1,99 +1,109 @@ ## Azure SourceControlConfigurationClient SDK for JavaScript -This package contains an isomorphic SDK for SourceControlConfigurationClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for SourceControlConfigurationClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-kubernetesconfiguration` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: ```bash -npm install @azure/arm-kubernetesconfiguration +npm install --save @azure/arm-kubernetesconfiguration @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - client creation and get sourceControlConfigurations as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. -```bash -npm install @azure/ms-rest-nodeauth@"^3.0.0" -``` +#### nodejs - Authentication, client creation, and get sourceControlConfigurations as an example written in JavaScript. ##### Sample code -While the below sample uses the interactive login, other authentication options can be found in the [README.md file of @azure/ms-rest-nodeauth](https://www.npmjs.com/package/@azure/ms-rest-nodeauth) package -```typescript -const msRestNodeAuth = require("@azure/ms-rest-nodeauth"); +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); const { SourceControlConfigurationClient } = require("@azure/arm-kubernetesconfiguration"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new SourceControlConfigurationClient(creds, subscriptionId); - const resourceGroupName = "testresourceGroupName"; - const clusterRp = "Microsoft.ContainerService"; - const clusterResourceName = "managedClusters"; - const clusterName = "testclusterName"; - const sourceControlConfigurationName = "testsourceControlConfigurationName"; - client.sourceControlConfigurations.get(resourceGroupName, clusterRp, clusterResourceName, clusterName, sourceControlConfigurationName).then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new SourceControlConfigurationClient(creds, subscriptionId); +const resourceGroupName = "testresourceGroupName"; +const clusterRp = "Microsoft.ContainerService"; +const clusterResourceName = "managedClusters"; +const clusterName = "testclusterName"; +const sourceControlConfigurationName = "testsourceControlConfigurationName"; +client.sourceControlConfigurations.get(resourceGroupName, clusterRp, clusterResourceName, clusterName, sourceControlConfigurationName).then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and get sourceControlConfigurations as an example written in JavaScript. +#### browser - Authentication, client creation, and get sourceControlConfigurations as an example written in JavaScript. -##### Install @azure/ms-rest-browserauth - -```bash -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-kubernetesconfiguration sample - - + diff --git a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/package.json b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/package.json index cd2e2545f9ca..ce6a369c9b78 100644 --- a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/package.json +++ b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-kubernetesconfiguration", "author": "Microsoft Corporation", "description": "SourceControlConfigurationClient Library with typescript type definitions for node.js and browser.", - "version": "3.0.0", + "version": "3.1.0", "dependencies": { - "@azure/ms-rest-azure-js": "^2.0.1", - "@azure/ms-rest-js": "^2.0.4", + "@azure/ms-rest-azure-js": "^2.1.0", + "@azure/ms-rest-js": "^2.2.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.10.0" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/sourceControlConfigurationClient.js", "types": "./esm/sourceControlConfigurationClient.d.ts", "devDependencies": { - "typescript": "^3.5.3", + "typescript": "^3.6.0", "rollup": "^1.18.0", "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", diff --git a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/sourceControlConfigurationClient.ts b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/sourceControlConfigurationClient.ts index bd2cc20ebd69..635777cdfb10 100644 --- a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/sourceControlConfigurationClient.ts +++ b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/sourceControlConfigurationClient.ts @@ -8,6 +8,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -21,12 +22,17 @@ class SourceControlConfigurationClient extends SourceControlConfigurationClientC /** * Initializes a new instance of the SourceControlConfigurationClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The Azure subscription ID. This is a GUID-formatted string (e.g. * 00000000-0000-0000-0000-000000000000) * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.SourceControlConfigurationClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.SourceControlConfigurationClientOptions) { super(credentials, subscriptionId, options); this.sourceControlConfigurations = new operations.SourceControlConfigurations(this); this.operations = new operations.Operations(this); diff --git a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/sourceControlConfigurationClientContext.ts b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/sourceControlConfigurationClientContext.ts index 2b240880b2e7..2146341558e2 100644 --- a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/sourceControlConfigurationClientContext.ts +++ b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/sourceControlConfigurationClientContext.ts @@ -9,24 +9,30 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-kubernetesconfiguration"; -const packageVersion = "3.0.0"; +const packageVersion = "3.1.0"; export class SourceControlConfigurationClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; apiVersion?: string; /** * Initializes a new instance of the SourceControlConfigurationClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The Azure subscription ID. This is a GUID-formatted string (e.g. * 00000000-0000-0000-0000-000000000000) * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.SourceControlConfigurationClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.SourceControlConfigurationClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } diff --git a/sdk/kusto/arm-kusto/README.md b/sdk/kusto/arm-kusto/README.md index ecc394710389..8e5edac98482 100644 --- a/sdk/kusto/arm-kusto/README.md +++ b/sdk/kusto/arm-kusto/README.md @@ -1,67 +1,75 @@ ## Azure KustoManagementClient SDK for JavaScript -This package contains an isomorphic SDK for KustoManagementClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for KustoManagementClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-kusto` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: ```bash -npm install @azure/arm-kusto +npm install --save @azure/arm-kusto @azure/identity ``` -### How to use +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. -#### nodejs - client creation and get clusters as an example written in TypeScript. +### How to use -##### Install @azure/ms-rest-nodeauth +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -```bash -npm install @azure/ms-rest-nodeauth@"^3.0.0" -``` +#### nodejs - Authentication, client creation, and get clusters as an example written in JavaScript. ##### Sample code -While the below sample uses the interactive login, other authentication options can be found in the [README.md file of @azure/ms-rest-nodeauth](https://www.npmjs.com/package/@azure/ms-rest-nodeauth) package - -```typescript -const msRestNodeAuth = require("@azure/ms-rest-nodeauth"); +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); const { KustoManagementClient } = require("@azure/arm-kusto"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth - .interactiveLogin() - .then((creds) => { - const client = new KustoManagementClient(creds, subscriptionId); - const resourceGroupName = "testresourceGroupName"; - const clusterName = "testclusterName"; - client.clusters.get(resourceGroupName, clusterName).then((result) => { - console.log("The result is:"); - console.log(result); - }); - }) - .catch((err) => { - console.error(err); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new KustoManagementClient(creds, subscriptionId); +const resourceGroupName = "testresourceGroupName"; +const clusterName = "testclusterName"; +client.clusters.get(resourceGroupName, clusterName).then((result) => { + console.log("The result is:"); + console.log(result); +}).catch((err) => { + console.log("An error occurred:"); + console.error(err); +}); ``` -#### browser - Authentication, client creation and get clusters as an example written in JavaScript. - -##### Install @azure/ms-rest-browserauth +#### browser - Authentication, client creation, and get clusters as an example written in JavaScript. -```bash -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html ```html @@ -69,34 +77,27 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to @azure/arm-kusto sample - - + diff --git a/sdk/kusto/arm-kusto/package.json b/sdk/kusto/arm-kusto/package.json index 5418efffbbc6..bada8a56893c 100644 --- a/sdk/kusto/arm-kusto/package.json +++ b/sdk/kusto/arm-kusto/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-kusto", "author": "Microsoft Corporation", "description": "KustoManagementClient Library with typescript type definitions for node.js and browser.", - "version": "6.1.0", + "version": "6.2.0", "dependencies": { - "@azure/ms-rest-azure-js": "^2.0.1", - "@azure/ms-rest-js": "^2.0.4", + "@azure/ms-rest-azure-js": "^2.1.0", + "@azure/ms-rest-js": "^2.2.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.10.0" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/kustoManagementClient.js", "types": "./esm/kustoManagementClient.d.ts", "devDependencies": { - "typescript": "^3.5.3", + "typescript": "^3.6.0", "rollup": "^1.18.0", "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", diff --git a/sdk/kusto/arm-kusto/src/kustoManagementClient.ts b/sdk/kusto/arm-kusto/src/kustoManagementClient.ts index 9131be10fd4c..4d4c284db056 100644 --- a/sdk/kusto/arm-kusto/src/kustoManagementClient.ts +++ b/sdk/kusto/arm-kusto/src/kustoManagementClient.ts @@ -8,6 +8,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -27,13 +28,18 @@ class KustoManagementClient extends KustoManagementClientContext { /** * Initializes a new instance of the KustoManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId Gets subscription credentials which uniquely identify Microsoft Azure * subscription. The subscription ID forms part of the URI for every service call. * @param [options] The parameter options */ constructor( - credentials: msRest.ServiceClientCredentials, + credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.KustoManagementClientOptions ) { diff --git a/sdk/kusto/arm-kusto/src/kustoManagementClientContext.ts b/sdk/kusto/arm-kusto/src/kustoManagementClientContext.ts index c7cc3b8f0a69..c60aa780b612 100644 --- a/sdk/kusto/arm-kusto/src/kustoManagementClientContext.ts +++ b/sdk/kusto/arm-kusto/src/kustoManagementClientContext.ts @@ -9,25 +9,31 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-kusto"; -const packageVersion = "6.1.0"; +const packageVersion = "6.2.0"; export class KustoManagementClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; apiVersion?: string; /** * Initializes a new instance of the KustoManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId Gets subscription credentials which uniquely identify Microsoft Azure * subscription. The subscription ID forms part of the URI for every service call. * @param [options] The parameter options */ constructor( - credentials: msRest.ServiceClientCredentials, + credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.KustoManagementClientOptions ) { diff --git a/sdk/labservices/arm-labservices/README.md b/sdk/labservices/arm-labservices/README.md index 0ae4beb85ea4..f6d820422be6 100644 --- a/sdk/labservices/arm-labservices/README.md +++ b/sdk/labservices/arm-labservices/README.md @@ -1,89 +1,100 @@ ## Azure ManagedLabsClient SDK for JavaScript -This package contains an isomorphic SDK for ManagedLabsClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for ManagedLabsClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-labservices` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: ```bash -npm install @azure/arm-labservices +npm install --save @azure/arm-labservices @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - Authentication, client creation and list providerOperations as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -```bash -npm install @azure/ms-rest-nodeauth -``` +#### nodejs - Authentication, client creation, and list providerOperations as an example written in JavaScript. ##### Sample code -```typescript -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { ManagedLabsClient, ManagedLabsModels, ManagedLabsMappers } from "@azure/arm-labservices"; +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { ManagedLabsClient } = require("@azure/arm-labservices"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new ManagedLabsClient(creds, subscriptionId); - client.providerOperations.list().then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new ManagedLabsClient(creds, subscriptionId); + +client.providerOperations.list().then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and list providerOperations as an example written in JavaScript. +#### browser - Authentication, client creation, and list providerOperations as an example written in JavaScript. -##### Install @azure/ms-rest-browserauth - -```bash -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-labservices sample - - + @@ -95,5 +106,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Flabservices%2Farm-labservices%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/labservices/arm-labservices/README.png) diff --git a/sdk/labservices/arm-labservices/package.json b/sdk/labservices/arm-labservices/package.json index 9ee0301ddad0..48e62c68d2c6 100644 --- a/sdk/labservices/arm-labservices/package.json +++ b/sdk/labservices/arm-labservices/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-labservices", "author": "Microsoft Corporation", "description": "ManagedLabsClient Library with typescript type definitions for node.js and browser.", - "version": "1.0.0", + "version": "1.1.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.3.1", - "@azure/ms-rest-js": "^1.2.6", + "@azure/ms-rest-azure-js": "^1.4.0", + "@azure/ms-rest-js": "^1.11.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.9.3" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/managedLabsClient.js", "types": "./esm/managedLabsClient.d.ts", "devDependencies": { - "typescript": "^3.1.1", + "typescript": "^3.6.0", "rollup": "^0.66.2", "rollup-plugin-node-resolve": "^3.4.0", "rollup-plugin-sourcemaps": "^0.4.2", diff --git a/sdk/labservices/arm-labservices/src/managedLabsClient.ts b/sdk/labservices/arm-labservices/src/managedLabsClient.ts index 868f64b914bb..be1b5e2c2ca6 100644 --- a/sdk/labservices/arm-labservices/src/managedLabsClient.ts +++ b/sdk/labservices/arm-labservices/src/managedLabsClient.ts @@ -9,6 +9,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -29,11 +30,16 @@ class ManagedLabsClient extends ManagedLabsClientContext { /** * Initializes a new instance of the ManagedLabsClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The subscription ID. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.ManagedLabsClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.ManagedLabsClientOptions) { super(credentials, subscriptionId, options); this.providerOperations = new operations.ProviderOperations(this); this.globalUsers = new operations.GlobalUsers(this); diff --git a/sdk/labservices/arm-labservices/src/managedLabsClientContext.ts b/sdk/labservices/arm-labservices/src/managedLabsClientContext.ts index cc87576b4330..32e6a4383220 100644 --- a/sdk/labservices/arm-labservices/src/managedLabsClientContext.ts +++ b/sdk/labservices/arm-labservices/src/managedLabsClientContext.ts @@ -10,23 +10,29 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-labservices"; -const packageVersion = "1.0.0"; +const packageVersion = "1.1.0"; export class ManagedLabsClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; apiVersion?: string; subscriptionId: string; /** * Initializes a new instance of the ManagedLabsClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The subscription ID. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.ManagedLabsClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.ManagedLabsClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } From b7ed37e5af1f14fbe11735f5ce448ffc40aeea0b Mon Sep 17 00:00:00 2001 From: colawwj <70128817+colawwj@users.noreply.github.com> Date: Thu, 8 Jul 2021 09:06:53 +0800 Subject: [PATCH 06/28] identity support 20 (#16253) --- sdk/links/arm-links/README.md | 105 +++++++++-------- sdk/links/arm-links/package.json | 9 +- .../arm-links/src/managementLinkClient.ts | 10 +- .../src/managementLinkClientContext.ts | 14 ++- .../README.md | 104 ++++++++-------- .../package.json | 9 +- .../src/managementLockClient.ts | 10 +- .../src/managementLockClientContext.ts | 14 ++- .../README.md | 106 +++++++++-------- .../package.json | 9 +- .../src/managementLockClient.ts | 10 +- .../src/managementLockClientContext.ts | 14 ++- sdk/locks/arm-locks/README.md | 105 +++++++++-------- sdk/locks/arm-locks/package.json | 9 +- .../arm-locks/src/managementLockClient.ts | 10 +- .../src/managementLockClientContext.ts | 14 ++- sdk/logic/arm-logic/README.md | 111 ++++++++++-------- sdk/logic/arm-logic/package.json | 9 +- .../arm-logic/src/logicManagementClient.ts | 10 +- .../src/logicManagementClientContext.ts | 14 ++- .../arm-commitmentplans/README.md | 108 +++++++++-------- .../arm-commitmentplans/package.json | 9 +- .../azureMLCommitmentPlansManagementClient.ts | 10 +- ...LCommitmentPlansManagementClientContext.ts | 14 ++- sdk/machinelearning/arm-webservices/README.md | 108 +++++++++-------- .../arm-webservices/package.json | 9 +- .../src/azureMLWebServicesManagementClient.ts | 10 +- ...ureMLWebServicesManagementClientContext.ts | 14 ++- sdk/machinelearning/arm-workspaces/README.md | 108 +++++++++-------- .../arm-workspaces/package.json | 9 +- ...chineLearningWorkspacesManagementClient.ts | 10 +- ...arningWorkspacesManagementClientContext.ts | 14 ++- .../arm-machinelearningcompute/README.md | 108 +++++++++-------- .../arm-machinelearningcompute/package.json | 9 +- .../machineLearningComputeManagementClient.ts | 10 +- ...eLearningComputeManagementClientContext.ts | 14 ++- .../README.md | 108 +++++++++-------- .../package.json | 9 +- .../src/mLTeamAccountManagementClient.ts | 10 +- .../mLTeamAccountManagementClientContext.ts | 14 ++- 40 files changed, 816 insertions(+), 585 deletions(-) diff --git a/sdk/links/arm-links/README.md b/sdk/links/arm-links/README.md index c03709a56234..53f7d981ae63 100644 --- a/sdk/links/arm-links/README.md +++ b/sdk/links/arm-links/README.md @@ -1,89 +1,100 @@ ## Azure ManagementLinkClient SDK for JavaScript -This package contains an isomorphic SDK for ManagementLinkClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for ManagementLinkClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-links` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: ```bash -npm install @azure/arm-links +npm install --save @azure/arm-links @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - Authentication, client creation and list operations as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -```bash -npm install @azure/ms-rest-nodeauth -``` +#### nodejs - Authentication, client creation, and list operations as an example written in JavaScript. ##### Sample code -```typescript -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { ManagementLinkClient, ManagementLinkModels, ManagementLinkMappers } from "@azure/arm-links"; +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { ManagementLinkClient } = require("@azure/arm-links"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new ManagementLinkClient(creds, subscriptionId); - client.operations.list().then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new ManagementLinkClient(creds, subscriptionId); + +client.operations.list().then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and list operations as an example written in JavaScript. - -##### Install @azure/ms-rest-browserauth +#### browser - Authentication, client creation, and list operations as an example written in JavaScript. -```bash -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-links sample - - + @@ -95,4 +106,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Flinks%2Farm-links%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/links/arm-links/README.png) diff --git a/sdk/links/arm-links/package.json b/sdk/links/arm-links/package.json index c75839f25ffd..289d12fb5c30 100644 --- a/sdk/links/arm-links/package.json +++ b/sdk/links/arm-links/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-links", "author": "Microsoft Corporation", "description": "ManagementLinkClient Library with typescript type definitions for node.js and browser.", - "version": "1.0.2", + "version": "1.1.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.3.2", - "@azure/ms-rest-js": "^1.8.1", + "@azure/ms-rest-azure-js": "^1.4.0", + "@azure/ms-rest-js": "^1.11.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.9.3" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/managementLinkClient.js", "types": "./esm/managementLinkClient.d.ts", "devDependencies": { - "typescript": "^3.1.1", + "typescript": "^3.6.0", "rollup": "^0.66.2", "rollup-plugin-node-resolve": "^3.4.0", "rollup-plugin-sourcemaps": "^0.4.2", diff --git a/sdk/links/arm-links/src/managementLinkClient.ts b/sdk/links/arm-links/src/managementLinkClient.ts index e501aa9f38a6..029201584390 100644 --- a/sdk/links/arm-links/src/managementLinkClient.ts +++ b/sdk/links/arm-links/src/managementLinkClient.ts @@ -9,6 +9,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -22,11 +23,16 @@ class ManagementLinkClient extends ManagementLinkClientContext { /** * Initializes a new instance of the ManagementLinkClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.ManagementLinkClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.ManagementLinkClientOptions) { super(credentials, subscriptionId, options); this.operations = new operations.Operations(this); this.resourceLinks = new operations.ResourceLinks(this); diff --git a/sdk/links/arm-links/src/managementLinkClientContext.ts b/sdk/links/arm-links/src/managementLinkClientContext.ts index 429c7805a4f8..82de71b0c6ef 100644 --- a/sdk/links/arm-links/src/managementLinkClientContext.ts +++ b/sdk/links/arm-links/src/managementLinkClientContext.ts @@ -10,23 +10,29 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-links"; -const packageVersion = "1.0.2"; +const packageVersion = "1.1.0"; export class ManagementLinkClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; apiVersion?: string; /** * Initializes a new instance of the ManagementLinkClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.ManagementLinkClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.ManagementLinkClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } diff --git a/sdk/locks/arm-locks-profile-2020-09-01-hybrid/README.md b/sdk/locks/arm-locks-profile-2020-09-01-hybrid/README.md index 5bab253c9b00..10cbf9949462 100644 --- a/sdk/locks/arm-locks-profile-2020-09-01-hybrid/README.md +++ b/sdk/locks/arm-locks-profile-2020-09-01-hybrid/README.md @@ -1,90 +1,100 @@ ## Azure ManagementLockClient SDK for JavaScript -This package contains an isomorphic SDK for ManagementLockClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for ManagementLockClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-locks-profile-2020-09-01-hybrid` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: ```bash -npm install @azure/arm-locks-profile-2020-09-01-hybrid +npm install --save @azure/arm-locks-profile-2020-09-01-hybrid @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - Authentication, client creation and list authorizationOperations as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. -```bash -npm install @azure/ms-rest-nodeauth@"^3.0.0" -``` +#### nodejs - Authentication, client creation, and list authorizationOperations as an example written in JavaScript. ##### Sample code -```typescript -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { ManagementLockClient, ManagementLockModels, ManagementLockMappers } from "@azure/arm-locks-profile-2020-09-01-hybrid"; +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { ManagementLockClient } = require("@azure/arm-locks-profile-2020-09-01-hybrid"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new ManagementLockClient(creds, subscriptionId); - client.authorizationOperations.list().then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new ManagementLockClient(creds, subscriptionId); + +client.authorizationOperations.list().then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and list authorizationOperations as an example written in JavaScript. - -##### Install @azure/ms-rest-browserauth +#### browser - Authentication, client creation, and list authorizationOperations as an example written in JavaScript. -```bash -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-locks-profile-2020-09-01-hybrid sample - - + diff --git a/sdk/locks/arm-locks-profile-2020-09-01-hybrid/package.json b/sdk/locks/arm-locks-profile-2020-09-01-hybrid/package.json index 54633bf79bed..49e77aa33f55 100644 --- a/sdk/locks/arm-locks-profile-2020-09-01-hybrid/package.json +++ b/sdk/locks/arm-locks-profile-2020-09-01-hybrid/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-locks-profile-2020-09-01-hybrid", "author": "Microsoft Corporation", "description": "ManagementLockClient Library with typescript type definitions for node.js and browser.", - "version": "1.0.0", + "version": "1.1.0", "dependencies": { - "@azure/ms-rest-azure-js": "^2.0.1", - "@azure/ms-rest-js": "^2.0.4", + "@azure/ms-rest-azure-js": "^2.1.0", + "@azure/ms-rest-js": "^2.2.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.10.0" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/managementLockClient.js", "types": "./esm/managementLockClient.d.ts", "devDependencies": { - "typescript": "^3.5.3", + "typescript": "^3.6.0", "rollup": "^1.18.0", "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", diff --git a/sdk/locks/arm-locks-profile-2020-09-01-hybrid/src/managementLockClient.ts b/sdk/locks/arm-locks-profile-2020-09-01-hybrid/src/managementLockClient.ts index 8f3ee196f5d8..e732ae6e8de1 100644 --- a/sdk/locks/arm-locks-profile-2020-09-01-hybrid/src/managementLockClient.ts +++ b/sdk/locks/arm-locks-profile-2020-09-01-hybrid/src/managementLockClient.ts @@ -9,6 +9,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -22,11 +23,16 @@ class ManagementLockClient extends ManagementLockClientContext { /** * Initializes a new instance of the ManagementLockClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.ManagementLockClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.ManagementLockClientOptions) { super(credentials, subscriptionId, options); this.authorizationOperations = new operations.AuthorizationOperations(this); this.managementLocks = new operations.ManagementLocks(this); diff --git a/sdk/locks/arm-locks-profile-2020-09-01-hybrid/src/managementLockClientContext.ts b/sdk/locks/arm-locks-profile-2020-09-01-hybrid/src/managementLockClientContext.ts index 166a44ef478f..4a0e6e1d1aad 100644 --- a/sdk/locks/arm-locks-profile-2020-09-01-hybrid/src/managementLockClientContext.ts +++ b/sdk/locks/arm-locks-profile-2020-09-01-hybrid/src/managementLockClientContext.ts @@ -10,23 +10,29 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-locks-profile-2020-09-01-hybrid"; -const packageVersion = "1.0.0"; +const packageVersion = "1.1.0"; export class ManagementLockClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; apiVersion?: string; /** * Initializes a new instance of the ManagementLockClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.ManagementLockClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.ManagementLockClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } diff --git a/sdk/locks/arm-locks-profile-hybrid-2019-03-01/README.md b/sdk/locks/arm-locks-profile-hybrid-2019-03-01/README.md index 6eeb5d2c6f84..ae164358e962 100644 --- a/sdk/locks/arm-locks-profile-hybrid-2019-03-01/README.md +++ b/sdk/locks/arm-locks-profile-hybrid-2019-03-01/README.md @@ -1,89 +1,100 @@ ## Azure ManagementLockClient SDK for JavaScript -This package contains an isomorphic SDK for ManagementLockClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for ManagementLockClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-locks-profile-hybrid-2019-03-01` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: ```bash -npm install @azure/arm-locks-profile-hybrid-2019-03-01 +npm install --save @azure/arm-locks-profile-hybrid-2019-03-01 @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - Authentication, client creation and list authorizationOperations as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -```bash -npm install @azure/ms-rest-nodeauth -``` +#### nodejs - Authentication, client creation, and list authorizationOperations as an example written in JavaScript. ##### Sample code -```typescript -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { ManagementLockClient, ManagementLockModels, ManagementLockMappers } from "@azure/arm-locks-profile-hybrid-2019-03-01"; +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { ManagementLockClient } = require("@azure/arm-locks-profile-hybrid-2019-03-01"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new ManagementLockClient(creds, subscriptionId); - client.authorizationOperations.list().then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new ManagementLockClient(creds, subscriptionId); + +client.authorizationOperations.list().then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and list authorizationOperations as an example written in JavaScript. +#### browser - Authentication, client creation, and list authorizationOperations as an example written in JavaScript. -##### Install @azure/ms-rest-browserauth - -```bash -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-locks-profile-hybrid-2019-03-01 sample - - + @@ -95,5 +106,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Flocks%2Farm-locks-profile-hybrid-2019-03-01%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/locks/arm-locks-profile-hybrid-2019-03-01/README.png) diff --git a/sdk/locks/arm-locks-profile-hybrid-2019-03-01/package.json b/sdk/locks/arm-locks-profile-hybrid-2019-03-01/package.json index 91a8d1492e1e..ba631f273f35 100644 --- a/sdk/locks/arm-locks-profile-hybrid-2019-03-01/package.json +++ b/sdk/locks/arm-locks-profile-hybrid-2019-03-01/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-locks-profile-hybrid-2019-03-01", "author": "Microsoft Corporation", "description": "ManagementLockClient Library with typescript type definitions for node.js and browser.", - "version": "1.0.0", + "version": "1.1.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.3.2", - "@azure/ms-rest-js": "^1.8.1", + "@azure/ms-rest-azure-js": "^1.4.0", + "@azure/ms-rest-js": "^1.11.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.9.3" }, "keywords": [ @@ -21,7 +22,7 @@ "module": "./esm/managementLockClient.js", "types": "./esm/managementLockClient.d.ts", "devDependencies": { - "typescript": "^3.1.1", + "typescript": "^3.6.0", "rollup": "^0.66.2", "rollup-plugin-node-resolve": "^3.4.0", "rollup-plugin-sourcemaps": "^0.4.2", diff --git a/sdk/locks/arm-locks-profile-hybrid-2019-03-01/src/managementLockClient.ts b/sdk/locks/arm-locks-profile-hybrid-2019-03-01/src/managementLockClient.ts index 8f3ee196f5d8..e732ae6e8de1 100644 --- a/sdk/locks/arm-locks-profile-hybrid-2019-03-01/src/managementLockClient.ts +++ b/sdk/locks/arm-locks-profile-hybrid-2019-03-01/src/managementLockClient.ts @@ -9,6 +9,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -22,11 +23,16 @@ class ManagementLockClient extends ManagementLockClientContext { /** * Initializes a new instance of the ManagementLockClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.ManagementLockClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.ManagementLockClientOptions) { super(credentials, subscriptionId, options); this.authorizationOperations = new operations.AuthorizationOperations(this); this.managementLocks = new operations.ManagementLocks(this); diff --git a/sdk/locks/arm-locks-profile-hybrid-2019-03-01/src/managementLockClientContext.ts b/sdk/locks/arm-locks-profile-hybrid-2019-03-01/src/managementLockClientContext.ts index 93df77252b7f..a1356b54c43c 100644 --- a/sdk/locks/arm-locks-profile-hybrid-2019-03-01/src/managementLockClientContext.ts +++ b/sdk/locks/arm-locks-profile-hybrid-2019-03-01/src/managementLockClientContext.ts @@ -10,23 +10,29 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-locks-profile-hybrid-2019-03-01"; -const packageVersion = "1.0.0"; +const packageVersion = "1.1.0"; export class ManagementLockClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; apiVersion?: string; /** * Initializes a new instance of the ManagementLockClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.ManagementLockClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.ManagementLockClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } diff --git a/sdk/locks/arm-locks/README.md b/sdk/locks/arm-locks/README.md index 3d40a1ffb0ee..cb93d1272533 100644 --- a/sdk/locks/arm-locks/README.md +++ b/sdk/locks/arm-locks/README.md @@ -1,89 +1,100 @@ ## Azure ManagementLockClient SDK for JavaScript -This package contains an isomorphic SDK for ManagementLockClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for ManagementLockClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-locks` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: ```bash -npm install @azure/arm-locks +npm install --save @azure/arm-locks @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - Authentication, client creation and list authorizationOperations as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -```bash -npm install @azure/ms-rest-nodeauth -``` +#### nodejs - Authentication, client creation, and list authorizationOperations as an example written in JavaScript. ##### Sample code -```typescript -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { ManagementLockClient, ManagementLockModels, ManagementLockMappers } from "@azure/arm-locks"; +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { ManagementLockClient } = require("@azure/arm-locks"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new ManagementLockClient(creds, subscriptionId); - client.authorizationOperations.list().then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new ManagementLockClient(creds, subscriptionId); + +client.authorizationOperations.list().then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and list authorizationOperations as an example written in JavaScript. - -##### Install @azure/ms-rest-browserauth +#### browser - Authentication, client creation, and list authorizationOperations as an example written in JavaScript. -```bash -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-locks sample - - + @@ -95,4 +106,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Flocks%2Farm-locks%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/locks/arm-locks/README.png) diff --git a/sdk/locks/arm-locks/package.json b/sdk/locks/arm-locks/package.json index 00370cc26347..04b2b5689fe1 100644 --- a/sdk/locks/arm-locks/package.json +++ b/sdk/locks/arm-locks/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-locks", "author": "Microsoft Corporation", "description": "ManagementLockClient Library with typescript type definitions for node.js and browser.", - "version": "1.1.0", + "version": "1.2.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.3.2", - "@azure/ms-rest-js": "^1.8.1", + "@azure/ms-rest-azure-js": "^1.4.0", + "@azure/ms-rest-js": "^1.11.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.9.3" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/managementLockClient.js", "types": "./esm/managementLockClient.d.ts", "devDependencies": { - "typescript": "^3.1.1", + "typescript": "^3.6.0", "rollup": "^0.66.2", "rollup-plugin-node-resolve": "^3.4.0", "rollup-plugin-sourcemaps": "^0.4.2", diff --git a/sdk/locks/arm-locks/src/managementLockClient.ts b/sdk/locks/arm-locks/src/managementLockClient.ts index 8f3ee196f5d8..e732ae6e8de1 100644 --- a/sdk/locks/arm-locks/src/managementLockClient.ts +++ b/sdk/locks/arm-locks/src/managementLockClient.ts @@ -9,6 +9,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -22,11 +23,16 @@ class ManagementLockClient extends ManagementLockClientContext { /** * Initializes a new instance of the ManagementLockClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.ManagementLockClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.ManagementLockClientOptions) { super(credentials, subscriptionId, options); this.authorizationOperations = new operations.AuthorizationOperations(this); this.managementLocks = new operations.ManagementLocks(this); diff --git a/sdk/locks/arm-locks/src/managementLockClientContext.ts b/sdk/locks/arm-locks/src/managementLockClientContext.ts index 1614234fb5b2..49465f512f87 100644 --- a/sdk/locks/arm-locks/src/managementLockClientContext.ts +++ b/sdk/locks/arm-locks/src/managementLockClientContext.ts @@ -10,23 +10,29 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-locks"; -const packageVersion = "1.1.0"; +const packageVersion = "1.2.0"; export class ManagementLockClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; apiVersion?: string; /** * Initializes a new instance of the ManagementLockClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.ManagementLockClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.ManagementLockClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } diff --git a/sdk/logic/arm-logic/README.md b/sdk/logic/arm-logic/README.md index c12bcff569c3..2bfd3599e014 100644 --- a/sdk/logic/arm-logic/README.md +++ b/sdk/logic/arm-logic/README.md @@ -1,94 +1,103 @@ ## Azure LogicManagementClient SDK for JavaScript -This package contains an isomorphic SDK for LogicManagementClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for LogicManagementClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-logic` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: ```bash -npm install @azure/arm-logic +npm install --save @azure/arm-logic @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - Authentication, client creation and listBySubscription workflows as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. -```bash -npm install @azure/ms-rest-nodeauth@"^3.0.0" -``` +#### nodejs - Authentication, client creation, and listBySubscription workflows as an example written in JavaScript. ##### Sample code -```typescript -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { LogicManagementClient, LogicManagementModels, LogicManagementMappers } from "@azure/arm-logic"; +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { LogicManagementClient } = require("@azure/arm-logic"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new LogicManagementClient(creds, subscriptionId); - const top = 1; - const filter = "testfilter"; - client.workflows.listBySubscription(top, filter).then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new LogicManagementClient(creds, subscriptionId); +const top = 1; +const filter = "testfilter"; +client.workflows.listBySubscription(top, filter).then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and listBySubscription workflows as an example written in JavaScript. +#### browser - Authentication, client creation, and listBySubscription workflows as an example written in JavaScript. -##### Install @azure/ms-rest-browserauth - -```bash -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-logic sample - - + diff --git a/sdk/logic/arm-logic/package.json b/sdk/logic/arm-logic/package.json index d562943fe641..90eae7c97aa0 100644 --- a/sdk/logic/arm-logic/package.json +++ b/sdk/logic/arm-logic/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-logic", "author": "Microsoft Corporation", "description": "LogicManagementClient Library with typescript type definitions for node.js and browser.", - "version": "7.0.0", + "version": "7.1.0", "dependencies": { - "@azure/ms-rest-azure-js": "^2.0.1", - "@azure/ms-rest-js": "^2.0.4", + "@azure/ms-rest-azure-js": "^2.1.0", + "@azure/ms-rest-js": "^2.2.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.10.0" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/logicManagementClient.js", "types": "./esm/logicManagementClient.d.ts", "devDependencies": { - "typescript": "^3.5.3", + "typescript": "^3.6.0", "rollup": "^1.18.0", "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", diff --git a/sdk/logic/arm-logic/src/logicManagementClient.ts b/sdk/logic/arm-logic/src/logicManagementClient.ts index 55dca04b4fe1..ce242b941d5e 100644 --- a/sdk/logic/arm-logic/src/logicManagementClient.ts +++ b/sdk/logic/arm-logic/src/logicManagementClient.ts @@ -9,6 +9,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -47,11 +48,16 @@ class LogicManagementClient extends LogicManagementClientContext { /** * Initializes a new instance of the LogicManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The subscription id. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.LogicManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.LogicManagementClientOptions) { super(credentials, subscriptionId, options); this.workflows = new operations.Workflows(this); this.workflowVersions = new operations.WorkflowVersions(this); diff --git a/sdk/logic/arm-logic/src/logicManagementClientContext.ts b/sdk/logic/arm-logic/src/logicManagementClientContext.ts index 0fc08b13b4d0..294f0ae254dd 100644 --- a/sdk/logic/arm-logic/src/logicManagementClientContext.ts +++ b/sdk/logic/arm-logic/src/logicManagementClientContext.ts @@ -10,23 +10,29 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-logic"; -const packageVersion = "7.0.0"; +const packageVersion = "7.1.0"; export class LogicManagementClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; apiVersion?: string; /** * Initializes a new instance of the LogicManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The subscription id. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.LogicManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.LogicManagementClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } diff --git a/sdk/machinelearning/arm-commitmentplans/README.md b/sdk/machinelearning/arm-commitmentplans/README.md index 093fe09dcd50..dcec8cf6c4a6 100644 --- a/sdk/machinelearning/arm-commitmentplans/README.md +++ b/sdk/machinelearning/arm-commitmentplans/README.md @@ -1,89 +1,100 @@ ## Azure AzureMLCommitmentPlansManagementClient SDK for JavaScript -This package contains an isomorphic SDK for AzureMLCommitmentPlansManagementClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for AzureMLCommitmentPlansManagementClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites -``` -npm install @azure/arm-commitmentplans +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-commitmentplans` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: +```bash +npm install --save @azure/arm-commitmentplans @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - Authentication, client creation and list skus as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -``` -npm install @azure/ms-rest-nodeauth -``` +#### nodejs - Authentication, client creation, and list skus as an example written in JavaScript. ##### Sample code -```ts -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { AzureMLCommitmentPlansManagementClient, AzureMLCommitmentPlansManagementModels, AzureMLCommitmentPlansManagementMappers } from "@azure/arm-commitmentplans"; +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { AzureMLCommitmentPlansManagementClient } = require("@azure/arm-commitmentplans"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new AzureMLCommitmentPlansManagementClient(creds, subscriptionId); - client.skus.list().then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new AzureMLCommitmentPlansManagementClient(creds, subscriptionId); + +client.skus.list().then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and list skus as an example written in JavaScript. - -##### Install @azure/ms-rest-browserauth +#### browser - Authentication, client creation, and list skus as an example written in JavaScript. -``` -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-commitmentplans sample - - + @@ -95,5 +106,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fmachinelearning%2Farm-commitmentplans%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/machinelearning/arm-commitmentplans/README.png) diff --git a/sdk/machinelearning/arm-commitmentplans/package.json b/sdk/machinelearning/arm-commitmentplans/package.json index f278f292273b..221f53189aed 100644 --- a/sdk/machinelearning/arm-commitmentplans/package.json +++ b/sdk/machinelearning/arm-commitmentplans/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-commitmentplans", "author": "Microsoft Corporation", "description": "AzureMLCommitmentPlansManagementClient Library with typescript type definitions for node.js and browser.", - "version": "1.2.0", + "version": "1.3.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.1.0", - "@azure/ms-rest-js": "^1.1.0", + "@azure/ms-rest-azure-js": "^1.4.0", + "@azure/ms-rest-js": "^1.11.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.9.3" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/azureMLCommitmentPlansManagementClient.js", "types": "./esm/azureMLCommitmentPlansManagementClient.d.ts", "devDependencies": { - "typescript": "^3.1.1", + "typescript": "^3.6.0", "rollup": "^0.66.2", "rollup-plugin-node-resolve": "^3.4.0", "uglify-js": "^3.4.9" diff --git a/sdk/machinelearning/arm-commitmentplans/src/azureMLCommitmentPlansManagementClient.ts b/sdk/machinelearning/arm-commitmentplans/src/azureMLCommitmentPlansManagementClient.ts index a1fc34d00224..e0f0723ae1d2 100644 --- a/sdk/machinelearning/arm-commitmentplans/src/azureMLCommitmentPlansManagementClient.ts +++ b/sdk/machinelearning/arm-commitmentplans/src/azureMLCommitmentPlansManagementClient.ts @@ -9,6 +9,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -24,11 +25,16 @@ class AzureMLCommitmentPlansManagementClient extends AzureMLCommitmentPlansManag /** * Initializes a new instance of the AzureMLCommitmentPlansManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId Azure Subscription ID. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.AzureMLCommitmentPlansManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.AzureMLCommitmentPlansManagementClientOptions) { super(credentials, subscriptionId, options); this.skus = new operations.Skus(this); this.commitmentAssociations = new operations.CommitmentAssociations(this); diff --git a/sdk/machinelearning/arm-commitmentplans/src/azureMLCommitmentPlansManagementClientContext.ts b/sdk/machinelearning/arm-commitmentplans/src/azureMLCommitmentPlansManagementClientContext.ts index 3293f19add9d..7d8cc7e04338 100644 --- a/sdk/machinelearning/arm-commitmentplans/src/azureMLCommitmentPlansManagementClientContext.ts +++ b/sdk/machinelearning/arm-commitmentplans/src/azureMLCommitmentPlansManagementClientContext.ts @@ -10,23 +10,29 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-commitmentplans"; -const packageVersion = "0.1.0"; +const packageVersion = "1.3.0"; export class AzureMLCommitmentPlansManagementClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; apiVersion?: string; /** * Initializes a new instance of the AzureMLCommitmentPlansManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId Azure Subscription ID. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.AzureMLCommitmentPlansManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.AzureMLCommitmentPlansManagementClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } diff --git a/sdk/machinelearning/arm-webservices/README.md b/sdk/machinelearning/arm-webservices/README.md index d7a620f5e100..4c24e3b16b89 100644 --- a/sdk/machinelearning/arm-webservices/README.md +++ b/sdk/machinelearning/arm-webservices/README.md @@ -1,89 +1,100 @@ ## Azure AzureMLWebServicesManagementClient SDK for JavaScript -This package contains an isomorphic SDK for AzureMLWebServicesManagementClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for AzureMLWebServicesManagementClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites -``` -npm install @azure/arm-webservices +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-webservices` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: +```bash +npm install --save @azure/arm-webservices @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - Authentication, client creation and list operations as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -``` -npm install @azure/ms-rest-nodeauth -``` +#### nodejs - Authentication, client creation, and list operations as an example written in JavaScript. ##### Sample code -```ts -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { AzureMLWebServicesManagementClient, AzureMLWebServicesManagementModels, AzureMLWebServicesManagementMappers } from "@azure/arm-webservices"; +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { AzureMLWebServicesManagementClient } = require("@azure/arm-webservices"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new AzureMLWebServicesManagementClient(creds, subscriptionId); - client.operations.list().then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new AzureMLWebServicesManagementClient(creds, subscriptionId); + +client.operations.list().then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and list operations as an example written in JavaScript. - -##### Install @azure/ms-rest-browserauth +#### browser - Authentication, client creation, and list operations as an example written in JavaScript. -``` -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-webservices sample - - + @@ -95,5 +106,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fmachinelearning%2Farm-webservices%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/machinelearning/arm-webservices/README.png) diff --git a/sdk/machinelearning/arm-webservices/package.json b/sdk/machinelearning/arm-webservices/package.json index 1f105ed79474..d41342037b38 100644 --- a/sdk/machinelearning/arm-webservices/package.json +++ b/sdk/machinelearning/arm-webservices/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-webservices", "author": "Microsoft Corporation", "description": "AzureMLWebServicesManagementClient Library with typescript type definitions for node.js and browser.", - "version": "0.1.1", + "version": "0.2.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.1.0", - "@azure/ms-rest-js": "^1.1.0", + "@azure/ms-rest-azure-js": "^1.4.0", + "@azure/ms-rest-js": "^1.11.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.9.3" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/azureMLWebServicesManagementClient.js", "types": "./esm/azureMLWebServicesManagementClient.d.ts", "devDependencies": { - "typescript": "^3.1.1", + "typescript": "^3.6.0", "rollup": "^0.66.2", "rollup-plugin-node-resolve": "^3.4.0", "uglify-js": "^3.4.9" diff --git a/sdk/machinelearning/arm-webservices/src/azureMLWebServicesManagementClient.ts b/sdk/machinelearning/arm-webservices/src/azureMLWebServicesManagementClient.ts index a90d5d94b74e..b3fe24bbf103 100644 --- a/sdk/machinelearning/arm-webservices/src/azureMLWebServicesManagementClient.ts +++ b/sdk/machinelearning/arm-webservices/src/azureMLWebServicesManagementClient.ts @@ -9,6 +9,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -22,11 +23,16 @@ class AzureMLWebServicesManagementClient extends AzureMLWebServicesManagementCli /** * Initializes a new instance of the AzureMLWebServicesManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The Azure subscription ID. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.AzureMLWebServicesManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.AzureMLWebServicesManagementClientOptions) { super(credentials, subscriptionId, options); this.operations = new operations.Operations(this); this.webServices = new operations.WebServices(this); diff --git a/sdk/machinelearning/arm-webservices/src/azureMLWebServicesManagementClientContext.ts b/sdk/machinelearning/arm-webservices/src/azureMLWebServicesManagementClientContext.ts index f11c651206a2..e4fbc627e6c7 100644 --- a/sdk/machinelearning/arm-webservices/src/azureMLWebServicesManagementClientContext.ts +++ b/sdk/machinelearning/arm-webservices/src/azureMLWebServicesManagementClientContext.ts @@ -10,23 +10,29 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-webservices"; -const packageVersion = "0.1.1"; +const packageVersion = "0.2.0"; export class AzureMLWebServicesManagementClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; apiVersion?: string; /** * Initializes a new instance of the AzureMLWebServicesManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The Azure subscription ID. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.AzureMLWebServicesManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.AzureMLWebServicesManagementClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } diff --git a/sdk/machinelearning/arm-workspaces/README.md b/sdk/machinelearning/arm-workspaces/README.md index 53ffced85a65..d173c0c1138a 100644 --- a/sdk/machinelearning/arm-workspaces/README.md +++ b/sdk/machinelearning/arm-workspaces/README.md @@ -1,89 +1,100 @@ ## Azure MachineLearningWorkspacesManagementClient SDK for JavaScript -This package contains an isomorphic SDK for MachineLearningWorkspacesManagementClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for MachineLearningWorkspacesManagementClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites -``` -npm install @azure/arm-workspaces +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-workspaces` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: +```bash +npm install --save @azure/arm-workspaces @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - Authentication, client creation and list operations as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -``` -npm install @azure/ms-rest-nodeauth -``` +#### nodejs - Authentication, client creation, and list operations as an example written in JavaScript. ##### Sample code -```ts -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { MachineLearningWorkspacesManagementClient, MachineLearningWorkspacesManagementModels, MachineLearningWorkspacesManagementMappers } from "@azure/arm-workspaces"; +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { MachineLearningWorkspacesManagementClient } = require("@azure/arm-workspaces"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new MachineLearningWorkspacesManagementClient(creds, subscriptionId); - client.operations.list().then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new MachineLearningWorkspacesManagementClient(creds, subscriptionId); + +client.operations.list().then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and list operations as an example written in JavaScript. - -##### Install @azure/ms-rest-browserauth +#### browser - Authentication, client creation, and list operations as an example written in JavaScript. -``` -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-workspaces sample - - + @@ -95,5 +106,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fmachinelearning%2Farm-workspaces%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/machinelearning/arm-workspaces/README.png) diff --git a/sdk/machinelearning/arm-workspaces/package.json b/sdk/machinelearning/arm-workspaces/package.json index ed27d7b1f584..138d1119824a 100644 --- a/sdk/machinelearning/arm-workspaces/package.json +++ b/sdk/machinelearning/arm-workspaces/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-workspaces", "author": "Microsoft Corporation", "description": "MachineLearningWorkspacesManagementClient Library with typescript type definitions for node.js and browser.", - "version": "0.1.1", + "version": "0.2.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.1.0", - "@azure/ms-rest-js": "^1.1.0", + "@azure/ms-rest-azure-js": "^1.4.0", + "@azure/ms-rest-js": "^1.11.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.9.3" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/machineLearningWorkspacesManagementClient.js", "types": "./esm/machineLearningWorkspacesManagementClient.d.ts", "devDependencies": { - "typescript": "^3.1.1", + "typescript": "^3.6.0", "rollup": "^0.66.2", "rollup-plugin-node-resolve": "^3.4.0", "uglify-js": "^3.4.9" diff --git a/sdk/machinelearning/arm-workspaces/src/machineLearningWorkspacesManagementClient.ts b/sdk/machinelearning/arm-workspaces/src/machineLearningWorkspacesManagementClient.ts index c058f7d5dc38..e7c54e17b102 100644 --- a/sdk/machinelearning/arm-workspaces/src/machineLearningWorkspacesManagementClient.ts +++ b/sdk/machinelearning/arm-workspaces/src/machineLearningWorkspacesManagementClient.ts @@ -9,6 +9,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -22,11 +23,16 @@ class MachineLearningWorkspacesManagementClient extends MachineLearningWorkspace /** * Initializes a new instance of the MachineLearningWorkspacesManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The Microsoft Azure subscription ID. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.MachineLearningWorkspacesManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.MachineLearningWorkspacesManagementClientOptions) { super(credentials, subscriptionId, options); this.operations = new operations.Operations(this); this.workspaces = new operations.Workspaces(this); diff --git a/sdk/machinelearning/arm-workspaces/src/machineLearningWorkspacesManagementClientContext.ts b/sdk/machinelearning/arm-workspaces/src/machineLearningWorkspacesManagementClientContext.ts index 10b3d8538241..a459ce44e24f 100644 --- a/sdk/machinelearning/arm-workspaces/src/machineLearningWorkspacesManagementClientContext.ts +++ b/sdk/machinelearning/arm-workspaces/src/machineLearningWorkspacesManagementClientContext.ts @@ -10,23 +10,29 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-workspaces"; -const packageVersion = "0.1.1"; +const packageVersion = "0.2.0"; export class MachineLearningWorkspacesManagementClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; apiVersion?: string; /** * Initializes a new instance of the MachineLearningWorkspacesManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The Microsoft Azure subscription ID. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.MachineLearningWorkspacesManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.MachineLearningWorkspacesManagementClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } diff --git a/sdk/machinelearningcompute/arm-machinelearningcompute/README.md b/sdk/machinelearningcompute/arm-machinelearningcompute/README.md index 8a1c8bc5efa1..7c79f923624d 100644 --- a/sdk/machinelearningcompute/arm-machinelearningcompute/README.md +++ b/sdk/machinelearningcompute/arm-machinelearningcompute/README.md @@ -1,93 +1,103 @@ ## Azure MachineLearningComputeManagementClient SDK for JavaScript -This package contains an isomorphic SDK for MachineLearningComputeManagementClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for MachineLearningComputeManagementClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-machinelearningcompute` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: ```bash -npm install @azure/arm-machinelearningcompute +npm install --save @azure/arm-machinelearningcompute @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - client creation and get operationalizationClusters as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. -```bash -npm install @azure/ms-rest-nodeauth@"^3.0.0" -``` +#### nodejs - Authentication, client creation, and get operationalizationClusters as an example written in JavaScript. ##### Sample code -While the below sample uses the interactive login, other authentication options can be found in the [README.md file of @azure/ms-rest-nodeauth](https://www.npmjs.com/package/@azure/ms-rest-nodeauth) package -```typescript -const msRestNodeAuth = require("@azure/ms-rest-nodeauth"); +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); const { MachineLearningComputeManagementClient } = require("@azure/arm-machinelearningcompute"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new MachineLearningComputeManagementClient(creds, subscriptionId); - const resourceGroupName = "testresourceGroupName"; - const clusterName = "testclusterName"; - client.operationalizationClusters.get(resourceGroupName, clusterName).then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new MachineLearningComputeManagementClient(creds, subscriptionId); +const resourceGroupName = "testresourceGroupName"; +const clusterName = "testclusterName"; +client.operationalizationClusters.get(resourceGroupName, clusterName).then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and get operationalizationClusters as an example written in JavaScript. +#### browser - Authentication, client creation, and get operationalizationClusters as an example written in JavaScript. -##### Install @azure/ms-rest-browserauth - -```bash -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-machinelearningcompute sample - - + diff --git a/sdk/machinelearningcompute/arm-machinelearningcompute/package.json b/sdk/machinelearningcompute/arm-machinelearningcompute/package.json index bf49b90c74d0..3078ef0617eb 100644 --- a/sdk/machinelearningcompute/arm-machinelearningcompute/package.json +++ b/sdk/machinelearningcompute/arm-machinelearningcompute/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-machinelearningcompute", "author": "Microsoft Corporation", "description": "MachineLearningComputeManagementClient Library with typescript type definitions for node.js and browser.", - "version": "2.0.0", + "version": "2.1.0", "dependencies": { - "@azure/ms-rest-azure-js": "^2.0.1", - "@azure/ms-rest-js": "^2.0.4", + "@azure/ms-rest-azure-js": "^2.1.0", + "@azure/ms-rest-js": "^2.2.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.10.0" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/machineLearningComputeManagementClient.js", "types": "./esm/machineLearningComputeManagementClient.d.ts", "devDependencies": { - "typescript": "^3.5.3", + "typescript": "^3.6.0", "rollup": "^1.18.0", "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", diff --git a/sdk/machinelearningcompute/arm-machinelearningcompute/src/machineLearningComputeManagementClient.ts b/sdk/machinelearningcompute/arm-machinelearningcompute/src/machineLearningComputeManagementClient.ts index 16b9439a801c..9663696e37d9 100644 --- a/sdk/machinelearningcompute/arm-machinelearningcompute/src/machineLearningComputeManagementClient.ts +++ b/sdk/machinelearningcompute/arm-machinelearningcompute/src/machineLearningComputeManagementClient.ts @@ -8,6 +8,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -21,11 +22,16 @@ class MachineLearningComputeManagementClient extends MachineLearningComputeManag /** * Initializes a new instance of the MachineLearningComputeManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The Azure subscription ID. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.MachineLearningComputeManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.MachineLearningComputeManagementClientOptions) { super(credentials, subscriptionId, options); this.operationalizationClusters = new operations.OperationalizationClusters(this); this.machineLearningCompute = new operations.MachineLearningCompute(this); diff --git a/sdk/machinelearningcompute/arm-machinelearningcompute/src/machineLearningComputeManagementClientContext.ts b/sdk/machinelearningcompute/arm-machinelearningcompute/src/machineLearningComputeManagementClientContext.ts index d914d3831fcf..0ce0e39e3b72 100644 --- a/sdk/machinelearningcompute/arm-machinelearningcompute/src/machineLearningComputeManagementClientContext.ts +++ b/sdk/machinelearningcompute/arm-machinelearningcompute/src/machineLearningComputeManagementClientContext.ts @@ -9,23 +9,29 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-machinelearningcompute"; -const packageVersion = "2.0.0"; +const packageVersion = "2.1.0"; export class MachineLearningComputeManagementClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; apiVersion?: string; /** * Initializes a new instance of the MachineLearningComputeManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The Azure subscription ID. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.MachineLearningComputeManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.MachineLearningComputeManagementClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } diff --git a/sdk/machinelearningexperimentation/arm-machinelearningexperimentation/README.md b/sdk/machinelearningexperimentation/arm-machinelearningexperimentation/README.md index 9b19177c4a80..768e043d08ef 100644 --- a/sdk/machinelearningexperimentation/arm-machinelearningexperimentation/README.md +++ b/sdk/machinelearningexperimentation/arm-machinelearningexperimentation/README.md @@ -1,89 +1,100 @@ ## Azure MLTeamAccountManagementClient SDK for JavaScript -This package contains an isomorphic SDK for MLTeamAccountManagementClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for MLTeamAccountManagementClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites -``` -npm install @azure/arm-machinelearningexperimentation +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-machinelearningexperimentation` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: +```bash +npm install --save @azure/arm-machinelearningexperimentation @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - Authentication, client creation and list operations as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -``` -npm install @azure/ms-rest-nodeauth -``` +#### nodejs - Authentication, client creation, and list operations as an example written in JavaScript. ##### Sample code -```ts -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { MLTeamAccountManagementClient, MLTeamAccountManagementModels, MLTeamAccountManagementMappers } from "@azure/arm-machinelearningexperimentation"; +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { MLTeamAccountManagementClient } = require("@azure/arm-machinelearningexperimentation"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new MLTeamAccountManagementClient(creds, subscriptionId); - client.operations.list().then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new MLTeamAccountManagementClient(creds, subscriptionId); + +client.operations.list().then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and list operations as an example written in JavaScript. - -##### Install @azure/ms-rest-browserauth +#### browser - Authentication, client creation, and list operations as an example written in JavaScript. -``` -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-machinelearningexperimentation sample - - + @@ -95,5 +106,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fmachinelearningexperimentation%2Farm-machinelearningexperimentation%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/machinelearningexperimentation/arm-machinelearningexperimentation/README.png) diff --git a/sdk/machinelearningexperimentation/arm-machinelearningexperimentation/package.json b/sdk/machinelearningexperimentation/arm-machinelearningexperimentation/package.json index 9b6aed6ca161..75f9523c8a81 100644 --- a/sdk/machinelearningexperimentation/arm-machinelearningexperimentation/package.json +++ b/sdk/machinelearningexperimentation/arm-machinelearningexperimentation/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-machinelearningexperimentation", "author": "Microsoft Corporation", "description": "MLTeamAccountManagementClient Library with typescript type definitions for node.js and browser.", - "version": "1.1.0", + "version": "1.2.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.1.0", - "@azure/ms-rest-js": "^1.1.0", + "@azure/ms-rest-azure-js": "^1.4.0", + "@azure/ms-rest-js": "^1.11.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.9.3" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/mLTeamAccountManagementClient.js", "types": "./esm/mLTeamAccountManagementClient.d.ts", "devDependencies": { - "typescript": "^3.1.1", + "typescript": "^3.6.0", "rollup": "^0.66.2", "rollup-plugin-node-resolve": "^3.4.0", "uglify-js": "^3.4.9" diff --git a/sdk/machinelearningexperimentation/arm-machinelearningexperimentation/src/mLTeamAccountManagementClient.ts b/sdk/machinelearningexperimentation/arm-machinelearningexperimentation/src/mLTeamAccountManagementClient.ts index 32fbbae3b408..5f7d61617147 100644 --- a/sdk/machinelearningexperimentation/arm-machinelearningexperimentation/src/mLTeamAccountManagementClient.ts +++ b/sdk/machinelearningexperimentation/arm-machinelearningexperimentation/src/mLTeamAccountManagementClient.ts @@ -9,6 +9,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -24,11 +25,16 @@ class MLTeamAccountManagementClient extends MLTeamAccountManagementClientContext /** * Initializes a new instance of the MLTeamAccountManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The Microsoft Azure subscription ID. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.MLTeamAccountManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.MLTeamAccountManagementClientOptions) { super(credentials, subscriptionId, options); this.operations = new operations.Operations(this); this.accounts = new operations.Accounts(this); diff --git a/sdk/machinelearningexperimentation/arm-machinelearningexperimentation/src/mLTeamAccountManagementClientContext.ts b/sdk/machinelearningexperimentation/arm-machinelearningexperimentation/src/mLTeamAccountManagementClientContext.ts index 8c047305aa14..777433892d85 100644 --- a/sdk/machinelearningexperimentation/arm-machinelearningexperimentation/src/mLTeamAccountManagementClientContext.ts +++ b/sdk/machinelearningexperimentation/arm-machinelearningexperimentation/src/mLTeamAccountManagementClientContext.ts @@ -10,23 +10,29 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-machinelearningexperimentation"; -const packageVersion = "0.1.0"; +const packageVersion = "1.2.0"; export class MLTeamAccountManagementClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; apiVersion?: string; /** * Initializes a new instance of the MLTeamAccountManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The Microsoft Azure subscription ID. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.MLTeamAccountManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.MLTeamAccountManagementClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } From c6fb10731925788b7ee4a9be5d63011ec9595eea Mon Sep 17 00:00:00 2001 From: colawwj <70128817+colawwj@users.noreply.github.com> Date: Thu, 8 Jul 2021 09:07:16 +0800 Subject: [PATCH 07/28] identity support 30 (#16254) --- .../arm-machinelearningservices/README.md | 101 ++++++++------- .../arm-machinelearningservices/package.json | 9 +- .../src/azureMachineLearningWorkspaces.ts | 10 +- .../azureMachineLearningWorkspacesContext.ts | 14 +- .../arm-managedapplications/README.md | 105 ++++++++------- .../arm-managedapplications/package.json | 9 +- .../src/managedApplicationClient.ts | 10 +- .../src/managedApplicationClientContext.ts | 14 +- .../arm-managementgroups/README.md | 115 +++++++++-------- .../arm-managementgroups/package.json | 9 +- .../src/managementGroupsAPI.ts | 10 +- .../src/managementGroupsAPIContext.ts | 14 +- .../arm-managementpartner/README.md | 111 ++++++++-------- .../arm-managementpartner/package.json | 9 +- .../aCEProvisioningManagementPartnerAPI.ts | 10 +- ...ProvisioningManagementPartnerAPIContext.ts | 14 +- sdk/maps/arm-maps/README.md | 121 +++++++++--------- sdk/maps/arm-maps/package.json | 9 +- .../arm-maps/src/azureMapsManagementClient.ts | 10 +- .../src/azureMapsManagementClientContext.ts | 14 +- sdk/mariadb/arm-mariadb/README.md | 112 ++++++++-------- sdk/mariadb/arm-mariadb/package.json | 9 +- .../src/mariaDBManagementClient.ts | 10 +- .../src/mariaDBManagementClientContext.ts | 14 +- .../arm-marketplaceordering/README.md | 115 +++++++++-------- .../arm-marketplaceordering/package.json | 9 +- .../src/marketplaceOrderingAgreements.ts | 10 +- .../marketplaceOrderingAgreementsContext.ts | 14 +- sdk/mediaservices/arm-mediaservices/README.md | 108 +++++++++------- .../arm-mediaservices/package.json | 9 +- .../src/azureMediaServices.ts | 10 +- .../src/azureMediaServicesContext.ts | 14 +- sdk/migrate/arm-migrate/README.md | 111 ++++++++-------- sdk/migrate/arm-migrate/package.json | 9 +- sdk/migrate/arm-migrate/src/azureMigrate.ts | 10 +- .../arm-migrate/src/azureMigrateContext.ts | 14 +- sdk/mixedreality/arm-mixedreality/README.md | 101 ++++++++------- .../arm-mixedreality/package.json | 9 +- .../src/mixedRealityClient.ts | 10 +- .../src/mixedRealityClientContext.ts | 14 +- 40 files changed, 825 insertions(+), 605 deletions(-) diff --git a/sdk/machinelearningservices/arm-machinelearningservices/README.md b/sdk/machinelearningservices/arm-machinelearningservices/README.md index cde11f4dfef7..33d5aa2d1e54 100644 --- a/sdk/machinelearningservices/arm-machinelearningservices/README.md +++ b/sdk/machinelearningservices/arm-machinelearningservices/README.md @@ -1,89 +1,100 @@ ## Azure AzureMachineLearningWorkspaces SDK for JavaScript -This package contains an isomorphic SDK for AzureMachineLearningWorkspaces. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for AzureMachineLearningWorkspaces. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-machinelearningservices` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: ```bash -npm install @azure/arm-machinelearningservices +npm install --save @azure/arm-machinelearningservices @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - client creation and list operations as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. -```bash -npm install @azure/ms-rest-nodeauth@"^3.0.0" -``` +#### nodejs - Authentication, client creation, and list operations as an example written in JavaScript. ##### Sample code -While the below sample uses the interactive login, other authentication options can be found in the [README.md file of @azure/ms-rest-nodeauth](https://www.npmjs.com/package/@azure/ms-rest-nodeauth) package -```typescript -const msRestNodeAuth = require("@azure/ms-rest-nodeauth"); +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); const { AzureMachineLearningWorkspaces } = require("@azure/arm-machinelearningservices"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new AzureMachineLearningWorkspaces(creds, subscriptionId); - client.operations.list().then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new AzureMachineLearningWorkspaces(creds, subscriptionId); + +client.operations.list().then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and list operations as an example written in JavaScript. - -##### Install @azure/ms-rest-browserauth +#### browser - Authentication, client creation, and list operations as an example written in JavaScript. -```bash -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-machinelearningservices sample - - + diff --git a/sdk/machinelearningservices/arm-machinelearningservices/package.json b/sdk/machinelearningservices/arm-machinelearningservices/package.json index 6c9a22e7b32c..058f1d98c45b 100644 --- a/sdk/machinelearningservices/arm-machinelearningservices/package.json +++ b/sdk/machinelearningservices/arm-machinelearningservices/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-machinelearningservices", "author": "Microsoft Corporation", "description": "AzureMachineLearningWorkspaces Library with typescript type definitions for node.js and browser.", - "version": "4.0.0", + "version": "4.1.0", "dependencies": { - "@azure/ms-rest-azure-js": "^2.0.1", - "@azure/ms-rest-js": "^2.0.4", + "@azure/ms-rest-azure-js": "^2.1.0", + "@azure/ms-rest-js": "^2.2.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.10.0" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/azureMachineLearningWorkspaces.js", "types": "./esm/azureMachineLearningWorkspaces.d.ts", "devDependencies": { - "typescript": "^3.5.3", + "typescript": "^3.6.0", "rollup": "^1.18.0", "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", diff --git a/sdk/machinelearningservices/arm-machinelearningservices/src/azureMachineLearningWorkspaces.ts b/sdk/machinelearningservices/arm-machinelearningservices/src/azureMachineLearningWorkspaces.ts index 4cc5d45384af..927e99eb1220 100644 --- a/sdk/machinelearningservices/arm-machinelearningservices/src/azureMachineLearningWorkspaces.ts +++ b/sdk/machinelearningservices/arm-machinelearningservices/src/azureMachineLearningWorkspaces.ts @@ -8,6 +8,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as Parameters from "./models/parameters"; @@ -31,11 +32,16 @@ class AzureMachineLearningWorkspaces extends AzureMachineLearningWorkspacesConte /** * Initializes a new instance of the AzureMachineLearningWorkspaces class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId Azure subscription identifier. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.AzureMachineLearningWorkspacesOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.AzureMachineLearningWorkspacesOptions) { super(credentials, subscriptionId, options); this.operations = new operations.Operations(this); this.workspaces = new operations.Workspaces(this); diff --git a/sdk/machinelearningservices/arm-machinelearningservices/src/azureMachineLearningWorkspacesContext.ts b/sdk/machinelearningservices/arm-machinelearningservices/src/azureMachineLearningWorkspacesContext.ts index 5dfaeebdef9f..4d352d0f53f4 100644 --- a/sdk/machinelearningservices/arm-machinelearningservices/src/azureMachineLearningWorkspacesContext.ts +++ b/sdk/machinelearningservices/arm-machinelearningservices/src/azureMachineLearningWorkspacesContext.ts @@ -9,23 +9,29 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-machinelearningservices"; -const packageVersion = "4.0.0"; +const packageVersion = "4.1.0"; export class AzureMachineLearningWorkspacesContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; apiVersion?: string; /** * Initializes a new instance of the AzureMachineLearningWorkspaces class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId Azure subscription identifier. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.AzureMachineLearningWorkspacesOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.AzureMachineLearningWorkspacesOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } diff --git a/sdk/managedapplications/arm-managedapplications/README.md b/sdk/managedapplications/arm-managedapplications/README.md index 9b9e2851fe5e..974bf97f698f 100644 --- a/sdk/managedapplications/arm-managedapplications/README.md +++ b/sdk/managedapplications/arm-managedapplications/README.md @@ -1,89 +1,100 @@ ## Azure ManagedApplicationClient SDK for JavaScript -This package contains an isomorphic SDK for ManagedApplicationClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for ManagedApplicationClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-managedapplications` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: ```bash -npm install @azure/arm-managedapplications +npm install --save @azure/arm-managedapplications @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - Authentication, client creation and listOperations as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -```bash -npm install @azure/ms-rest-nodeauth -``` +#### nodejs - Authentication, client creation, and listOperations as an example written in JavaScript. ##### Sample code -```typescript -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { ManagedApplicationClient, ManagedApplicationModels, ManagedApplicationMappers } from "@azure/arm-managedapplications"; +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { ManagedApplicationClient } = require("@azure/arm-managedapplications"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new ManagedApplicationClient(creds, subscriptionId); - client.listOperations().then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new ManagedApplicationClient(creds, subscriptionId); + +client.listOperations().then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and listOperations as an example written in JavaScript. - -##### Install @azure/ms-rest-browserauth +#### browser - Authentication, client creation, and listOperations as an example written in JavaScript. -```bash -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-managedapplications sample - - + @@ -95,4 +106,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fmanagedapplications%2Farm-managedapplications%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/managedapplications/arm-managedapplications/README.png) diff --git a/sdk/managedapplications/arm-managedapplications/package.json b/sdk/managedapplications/arm-managedapplications/package.json index 79861c572083..100328248251 100644 --- a/sdk/managedapplications/arm-managedapplications/package.json +++ b/sdk/managedapplications/arm-managedapplications/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-managedapplications", "author": "Microsoft Corporation", "description": "ManagedApplicationClient Library with typescript type definitions for node.js and browser.", - "version": "1.0.2", + "version": "1.1.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.3.2", - "@azure/ms-rest-js": "^1.8.1", + "@azure/ms-rest-azure-js": "^1.4.0", + "@azure/ms-rest-js": "^1.11.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.9.3" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/managedApplicationClient.js", "types": "./esm/managedApplicationClient.d.ts", "devDependencies": { - "typescript": "^3.1.1", + "typescript": "^3.6.0", "rollup": "^0.66.2", "rollup-plugin-node-resolve": "^3.4.0", "rollup-plugin-sourcemaps": "^0.4.2", diff --git a/sdk/managedapplications/arm-managedapplications/src/managedApplicationClient.ts b/sdk/managedapplications/arm-managedapplications/src/managedApplicationClient.ts index 2897a8be4c98..0c6f3320edf5 100644 --- a/sdk/managedapplications/arm-managedapplications/src/managedApplicationClient.ts +++ b/sdk/managedapplications/arm-managedapplications/src/managedApplicationClient.ts @@ -9,6 +9,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as Parameters from "./models/parameters"; @@ -23,11 +24,16 @@ class ManagedApplicationClient extends ManagedApplicationClientContext { /** * Initializes a new instance of the ManagedApplicationClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.ManagedApplicationClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.ManagedApplicationClientOptions) { super(credentials, subscriptionId, options); this.appliances = new operations.Appliances(this); this.applianceDefinitions = new operations.ApplianceDefinitions(this); diff --git a/sdk/managedapplications/arm-managedapplications/src/managedApplicationClientContext.ts b/sdk/managedapplications/arm-managedapplications/src/managedApplicationClientContext.ts index ddcedede9ce8..628f85418d0c 100644 --- a/sdk/managedapplications/arm-managedapplications/src/managedApplicationClientContext.ts +++ b/sdk/managedapplications/arm-managedapplications/src/managedApplicationClientContext.ts @@ -10,23 +10,29 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-managedapplications"; -const packageVersion = "1.0.2"; +const packageVersion = "1.1.0"; export class ManagedApplicationClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; apiVersion?: string; /** * Initializes a new instance of the ManagedApplicationClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.ManagedApplicationClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.ManagedApplicationClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } diff --git a/sdk/managementgroups/arm-managementgroups/README.md b/sdk/managementgroups/arm-managementgroups/README.md index d52fe3295611..cc428f2793f5 100644 --- a/sdk/managementgroups/arm-managementgroups/README.md +++ b/sdk/managementgroups/arm-managementgroups/README.md @@ -1,93 +1,103 @@ ## Azure ManagementGroupsAPI SDK for JavaScript -This package contains an isomorphic SDK for ManagementGroupsAPI. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for ManagementGroupsAPI. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites -``` -npm install @azure/arm-managementgroups +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-managementgroups` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: +```bash +npm install --save @azure/arm-managementgroups @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - Authentication, client creation and list managementGroups as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -``` -npm install @azure/ms-rest-nodeauth -``` +#### nodejs - Authentication, client creation, and list managementGroups as an example written in JavaScript. ##### Sample code -```ts -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { ManagementGroupsAPI, ManagementGroupsAPIModels, ManagementGroupsAPIMappers } from "@azure/arm-managementgroups"; +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { ManagementGroupsAPI } = require("@azure/arm-managementgroups"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new ManagementGroupsAPI(creds, subscriptionId); - const cacheControl = "testcacheControl"; - const skiptoken = "testskiptoken"; - client.managementGroups.list(cacheControl, skiptoken).then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new ManagementGroupsAPI(creds, subscriptionId); +const cacheControl = "testcacheControl"; +const skiptoken = "testskiptoken"; +client.managementGroups.list(cacheControl, skiptoken).then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and list managementGroups as an example written in JavaScript. +#### browser - Authentication, client creation, and list managementGroups as an example written in JavaScript. -##### Install @azure/ms-rest-browserauth - -``` -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-managementgroups sample - - + @@ -99,5 +109,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fmanagementgroups%2Farm-managementgroups%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/managementgroups/arm-managementgroups/README.png) diff --git a/sdk/managementgroups/arm-managementgroups/package.json b/sdk/managementgroups/arm-managementgroups/package.json index be3d9ef7c625..102d351c26a4 100644 --- a/sdk/managementgroups/arm-managementgroups/package.json +++ b/sdk/managementgroups/arm-managementgroups/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-managementgroups", "author": "Microsoft Corporation", "description": "ManagementGroupsAPI Library with typescript type definitions for node.js and browser.", - "version": "1.1.0", + "version": "1.2.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.1.0", - "@azure/ms-rest-js": "^1.1.0", + "@azure/ms-rest-azure-js": "^1.4.0", + "@azure/ms-rest-js": "^1.11.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.9.3" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/managementGroupsAPI.js", "types": "./esm/managementGroupsAPI.d.ts", "devDependencies": { - "typescript": "^3.1.1", + "typescript": "^3.6.0", "rollup": "^0.66.2", "rollup-plugin-node-resolve": "^3.4.0", "uglify-js": "^3.4.9" diff --git a/sdk/managementgroups/arm-managementgroups/src/managementGroupsAPI.ts b/sdk/managementgroups/arm-managementgroups/src/managementGroupsAPI.ts index fb708d943018..e934c83510da 100644 --- a/sdk/managementgroups/arm-managementgroups/src/managementGroupsAPI.ts +++ b/sdk/managementgroups/arm-managementgroups/src/managementGroupsAPI.ts @@ -9,6 +9,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as Parameters from "./models/parameters"; @@ -25,10 +26,15 @@ class ManagementGroupsAPI extends ManagementGroupsAPIContext { /** * Initializes a new instance of the ManagementGroupsAPI class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, options?: Models.ManagementGroupsAPIOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, options?: Models.ManagementGroupsAPIOptions) { super(credentials, options); this.managementGroups = new operations.ManagementGroups(this); this.managementGroupSubscriptions = new operations.ManagementGroupSubscriptions(this); diff --git a/sdk/managementgroups/arm-managementgroups/src/managementGroupsAPIContext.ts b/sdk/managementgroups/arm-managementgroups/src/managementGroupsAPIContext.ts index d50989717ea4..96fa50023af5 100644 --- a/sdk/managementgroups/arm-managementgroups/src/managementGroupsAPIContext.ts +++ b/sdk/managementgroups/arm-managementgroups/src/managementGroupsAPIContext.ts @@ -10,21 +10,27 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-managementgroups"; -const packageVersion = "0.1.0"; +const packageVersion = "1.2.0"; export class ManagementGroupsAPIContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; apiVersion?: string; /** * Initializes a new instance of the ManagementGroupsAPI class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, options?: Models.ManagementGroupsAPIOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, options?: Models.ManagementGroupsAPIOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } diff --git a/sdk/managementpartner/arm-managementpartner/README.md b/sdk/managementpartner/arm-managementpartner/README.md index e9b35016c5f2..4ecea3ef1e7e 100644 --- a/sdk/managementpartner/arm-managementpartner/README.md +++ b/sdk/managementpartner/arm-managementpartner/README.md @@ -1,91 +1,101 @@ ## Azure ACEProvisioningManagementPartnerAPI SDK for JavaScript -This package contains an isomorphic SDK for ACEProvisioningManagementPartnerAPI. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for ACEProvisioningManagementPartnerAPI. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites -``` -npm install @azure/arm-managementpartner +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-managementpartner` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: +```bash +npm install --save @azure/arm-managementpartner @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - Authentication, client creation and get partner as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -``` -npm install @azure/ms-rest-nodeauth -``` +#### nodejs - Authentication, client creation, and get partner as an example written in JavaScript. ##### Sample code -```ts -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { ACEProvisioningManagementPartnerAPI, ACEProvisioningManagementPartnerAPIModels, ACEProvisioningManagementPartnerAPIMappers } from "@azure/arm-managementpartner"; +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { ACEProvisioningManagementPartnerAPI } = require("@azure/arm-managementpartner"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new ACEProvisioningManagementPartnerAPI(creds, subscriptionId); - const partnerId = "testpartnerId"; - client.partner.get(partnerId).then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new ACEProvisioningManagementPartnerAPI(creds, subscriptionId); +const partnerId = "testpartnerId"; +client.partner.get(partnerId).then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and get partner as an example written in JavaScript. +#### browser - Authentication, client creation, and get partner as an example written in JavaScript. -##### Install @azure/ms-rest-browserauth - -``` -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-managementpartner sample - - + @@ -97,5 +107,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fmanagementpartner%2Farm-managementpartner%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/managementpartner/arm-managementpartner/README.png) diff --git a/sdk/managementpartner/arm-managementpartner/package.json b/sdk/managementpartner/arm-managementpartner/package.json index 6c2b42a7f552..87755c6ddcf8 100644 --- a/sdk/managementpartner/arm-managementpartner/package.json +++ b/sdk/managementpartner/arm-managementpartner/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-managementpartner", "author": "Microsoft Corporation", "description": "ACEProvisioningManagementPartnerAPI Library with typescript type definitions for node.js and browser.", - "version": "1.1.0", + "version": "1.2.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.1.0", - "@azure/ms-rest-js": "^1.1.0", + "@azure/ms-rest-azure-js": "^1.4.0", + "@azure/ms-rest-js": "^1.11.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.9.3" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/aCEProvisioningManagementPartnerAPI.js", "types": "./esm/aCEProvisioningManagementPartnerAPI.d.ts", "devDependencies": { - "typescript": "^3.1.1", + "typescript": "^3.6.0", "rollup": "^0.66.2", "rollup-plugin-node-resolve": "^3.4.0", "uglify-js": "^3.4.9" diff --git a/sdk/managementpartner/arm-managementpartner/src/aCEProvisioningManagementPartnerAPI.ts b/sdk/managementpartner/arm-managementpartner/src/aCEProvisioningManagementPartnerAPI.ts index 0fdeb8e0ae10..3c4f0dc0ef4b 100644 --- a/sdk/managementpartner/arm-managementpartner/src/aCEProvisioningManagementPartnerAPI.ts +++ b/sdk/managementpartner/arm-managementpartner/src/aCEProvisioningManagementPartnerAPI.ts @@ -9,6 +9,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -22,10 +23,15 @@ class ACEProvisioningManagementPartnerAPI extends ACEProvisioningManagementPartn /** * Initializes a new instance of the ACEProvisioningManagementPartnerAPI class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, options?: Models.ACEProvisioningManagementPartnerAPIOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, options?: Models.ACEProvisioningManagementPartnerAPIOptions) { super(credentials, options); this.partner = new operations.Partner(this); this.operation = new operations.Operation(this); diff --git a/sdk/managementpartner/arm-managementpartner/src/aCEProvisioningManagementPartnerAPIContext.ts b/sdk/managementpartner/arm-managementpartner/src/aCEProvisioningManagementPartnerAPIContext.ts index 6f295935fd1d..d034c0794f34 100644 --- a/sdk/managementpartner/arm-managementpartner/src/aCEProvisioningManagementPartnerAPIContext.ts +++ b/sdk/managementpartner/arm-managementpartner/src/aCEProvisioningManagementPartnerAPIContext.ts @@ -10,21 +10,27 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-managementpartner"; -const packageVersion = "0.1.0"; +const packageVersion = "1.2.0"; export class ACEProvisioningManagementPartnerAPIContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; apiVersion?: string; /** * Initializes a new instance of the ACEProvisioningManagementPartnerAPI class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, options?: Models.ACEProvisioningManagementPartnerAPIOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, options?: Models.ACEProvisioningManagementPartnerAPIOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } diff --git a/sdk/maps/arm-maps/README.md b/sdk/maps/arm-maps/README.md index b51262189aba..446851722704 100644 --- a/sdk/maps/arm-maps/README.md +++ b/sdk/maps/arm-maps/README.md @@ -1,67 +1,75 @@ ## Azure AzureMapsManagementClient SDK for JavaScript -This package contains an isomorphic SDK for AzureMapsManagementClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for AzureMapsManagementClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-maps` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: ```bash -npm install @azure/arm-maps +npm install --save @azure/arm-maps @azure/identity ``` -### How to use +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. -#### nodejs - client creation and get accounts as an example written in TypeScript. +### How to use -##### Install @azure/ms-rest-nodeauth +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -```bash -npm install @azure/ms-rest-nodeauth@"^3.0.0" -``` +#### nodejs - Authentication, client creation, and get accounts as an example written in JavaScript. ##### Sample code -While the below sample uses the interactive login, other authentication options can be found in the [README.md file of @azure/ms-rest-nodeauth](https://www.npmjs.com/package/@azure/ms-rest-nodeauth) package - -```typescript -const msRestNodeAuth = require("@azure/ms-rest-nodeauth"); +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); const { AzureMapsManagementClient } = require("@azure/arm-maps"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth - .interactiveLogin() - .then((creds) => { - const client = new AzureMapsManagementClient(creds, subscriptionId); - const resourceGroupName = "testresourceGroupName"; - const accountName = "testaccountName"; - client.accounts.get(resourceGroupName, accountName).then((result) => { - console.log("The result is:"); - console.log(result); - }); - }) - .catch((err) => { - console.error(err); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new AzureMapsManagementClient(creds, subscriptionId); +const resourceGroupName = "testresourceGroupName"; +const accountName = "testaccountName"; +client.accounts.get(resourceGroupName, accountName).then((result) => { + console.log("The result is:"); + console.log(result); +}).catch((err) => { + console.log("An error occurred:"); + console.error(err); +}); ``` -#### browser - Authentication, client creation and get accounts as an example written in JavaScript. - -##### Install @azure/ms-rest-browserauth +#### browser - Authentication, client creation, and get accounts as an example written in JavaScript. -```bash -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html ```html @@ -69,34 +77,27 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to @azure/arm-maps sample - - + diff --git a/sdk/maps/arm-maps/package.json b/sdk/maps/arm-maps/package.json index dad087f10ae7..c29a46be1047 100644 --- a/sdk/maps/arm-maps/package.json +++ b/sdk/maps/arm-maps/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-maps", "author": "Microsoft Corporation", "description": "AzureMapsManagementClient Library with typescript type definitions for node.js and browser.", - "version": "2.0.0", + "version": "2.1.0", "dependencies": { - "@azure/ms-rest-azure-js": "^2.0.1", - "@azure/ms-rest-js": "^2.0.4", + "@azure/ms-rest-azure-js": "^2.1.0", + "@azure/ms-rest-js": "^2.2.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.10.0" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/azureMapsManagementClient.js", "types": "./esm/azureMapsManagementClient.d.ts", "devDependencies": { - "typescript": "^3.5.3", + "typescript": "^3.6.0", "rollup": "^1.18.0", "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", diff --git a/sdk/maps/arm-maps/src/azureMapsManagementClient.ts b/sdk/maps/arm-maps/src/azureMapsManagementClient.ts index 57e460bf2f28..b0bdead1332f 100644 --- a/sdk/maps/arm-maps/src/azureMapsManagementClient.ts +++ b/sdk/maps/arm-maps/src/azureMapsManagementClient.ts @@ -8,6 +8,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -21,12 +22,17 @@ class AzureMapsManagementClient extends AzureMapsManagementClientContext { /** * Initializes a new instance of the AzureMapsManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ constructor( - credentials: msRest.ServiceClientCredentials, + credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.AzureMapsManagementClientOptions ) { diff --git a/sdk/maps/arm-maps/src/azureMapsManagementClientContext.ts b/sdk/maps/arm-maps/src/azureMapsManagementClientContext.ts index 38d1304d4cdc..3cdd356d6513 100644 --- a/sdk/maps/arm-maps/src/azureMapsManagementClientContext.ts +++ b/sdk/maps/arm-maps/src/azureMapsManagementClientContext.ts @@ -9,24 +9,30 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-maps"; -const packageVersion = "2.0.0"; +const packageVersion = "2.1.0"; export class AzureMapsManagementClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; apiVersion?: string; /** * Initializes a new instance of the AzureMapsManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ constructor( - credentials: msRest.ServiceClientCredentials, + credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.AzureMapsManagementClientOptions ) { diff --git a/sdk/mariadb/arm-mariadb/README.md b/sdk/mariadb/arm-mariadb/README.md index 7a1dfd50bfe0..b42842e33d35 100644 --- a/sdk/mariadb/arm-mariadb/README.md +++ b/sdk/mariadb/arm-mariadb/README.md @@ -1,93 +1,103 @@ ## Azure MariaDBManagementClient SDK for JavaScript -This package contains an isomorphic SDK for MariaDBManagementClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for MariaDBManagementClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-mariadb` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: ```bash -npm install @azure/arm-mariadb +npm install --save @azure/arm-mariadb @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - Authentication, client creation and get servers as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -```bash -npm install @azure/ms-rest-nodeauth -``` +#### nodejs - Authentication, client creation, and get servers as an example written in JavaScript. ##### Sample code -```typescript -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { MariaDBManagementClient, MariaDBManagementModels, MariaDBManagementMappers } from "@azure/arm-mariadb"; +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { MariaDBManagementClient } = require("@azure/arm-mariadb"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new MariaDBManagementClient(creds, subscriptionId); - const resourceGroupName = "testresourceGroupName"; - const serverName = "testserverName"; - client.servers.get(resourceGroupName, serverName).then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new MariaDBManagementClient(creds, subscriptionId); +const resourceGroupName = "testresourceGroupName"; +const serverName = "testserverName"; +client.servers.get(resourceGroupName, serverName).then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and get servers as an example written in JavaScript. +#### browser - Authentication, client creation, and get servers as an example written in JavaScript. -##### Install @azure/ms-rest-browserauth - -```bash -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-mariadb sample - - + @@ -99,4 +109,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fmariadb%2Farm-mariadb%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/mariadb/arm-mariadb/README.png) diff --git a/sdk/mariadb/arm-mariadb/package.json b/sdk/mariadb/arm-mariadb/package.json index c7d9bf80cc17..a98cd21557d3 100644 --- a/sdk/mariadb/arm-mariadb/package.json +++ b/sdk/mariadb/arm-mariadb/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-mariadb", "author": "Microsoft Corporation", "description": "MariaDBManagementClient Library with typescript type definitions for node.js and browser.", - "version": "1.4.0", + "version": "1.5.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.3.2", - "@azure/ms-rest-js": "^1.8.1", + "@azure/ms-rest-azure-js": "^1.4.0", + "@azure/ms-rest-js": "^1.11.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.9.3" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/mariaDBManagementClient.js", "types": "./esm/mariaDBManagementClient.d.ts", "devDependencies": { - "typescript": "^3.1.1", + "typescript": "^3.6.0", "rollup": "^0.66.2", "rollup-plugin-node-resolve": "^3.4.0", "rollup-plugin-sourcemaps": "^0.4.2", diff --git a/sdk/mariadb/arm-mariadb/src/mariaDBManagementClient.ts b/sdk/mariadb/arm-mariadb/src/mariaDBManagementClient.ts index b88492aa13ab..10062e5341a4 100644 --- a/sdk/mariadb/arm-mariadb/src/mariaDBManagementClient.ts +++ b/sdk/mariadb/arm-mariadb/src/mariaDBManagementClient.ts @@ -9,6 +9,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -31,11 +32,16 @@ class MariaDBManagementClient extends MariaDBManagementClientContext { /** * Initializes a new instance of the MariaDBManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The subscription ID that identifies an Azure subscription. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.MariaDBManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.MariaDBManagementClientOptions) { super(credentials, subscriptionId, options); this.servers = new operations.Servers(this); this.replicas = new operations.Replicas(this); diff --git a/sdk/mariadb/arm-mariadb/src/mariaDBManagementClientContext.ts b/sdk/mariadb/arm-mariadb/src/mariaDBManagementClientContext.ts index 9c249c826287..76f958e26eb0 100644 --- a/sdk/mariadb/arm-mariadb/src/mariaDBManagementClientContext.ts +++ b/sdk/mariadb/arm-mariadb/src/mariaDBManagementClientContext.ts @@ -10,23 +10,29 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-mariadb"; -const packageVersion = "1.4.0"; +const packageVersion = "1.5.0"; export class MariaDBManagementClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; apiVersion?: string; /** * Initializes a new instance of the MariaDBManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The subscription ID that identifies an Azure subscription. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.MariaDBManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.MariaDBManagementClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } diff --git a/sdk/marketplaceordering/arm-marketplaceordering/README.md b/sdk/marketplaceordering/arm-marketplaceordering/README.md index 3a43a4a5cfcb..6ed7902aeec8 100644 --- a/sdk/marketplaceordering/arm-marketplaceordering/README.md +++ b/sdk/marketplaceordering/arm-marketplaceordering/README.md @@ -1,96 +1,105 @@ ## Azure MarketplaceOrderingAgreements SDK for JavaScript -This package contains an isomorphic SDK for MarketplaceOrderingAgreements. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for MarketplaceOrderingAgreements. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-marketplaceordering` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: ```bash -npm install @azure/arm-marketplaceordering +npm install --save @azure/arm-marketplaceordering @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - Authentication, client creation and get marketplaceAgreements as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. -```bash -npm install @azure/ms-rest-nodeauth@"^3.0.0" -``` +#### nodejs - Authentication, client creation, and get marketplaceAgreements as an example written in JavaScript. ##### Sample code -```typescript -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { MarketplaceOrderingAgreements, MarketplaceOrderingAgreementsModels, MarketplaceOrderingAgreementsMappers } from "@azure/arm-marketplaceordering"; +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { MarketplaceOrderingAgreements } = require("@azure/arm-marketplaceordering"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new MarketplaceOrderingAgreements(creds, subscriptionId); - const publisherId = "testpublisherId"; - const offerId = "testofferId"; - const planId = "testplanId"; - client.marketplaceAgreements.get(publisherId, offerId, planId).then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new MarketplaceOrderingAgreements(creds, subscriptionId); +const publisherId = "testpublisherId"; +const offerId = "testofferId"; +const planId = "testplanId"; +client.marketplaceAgreements.get(publisherId, offerId, planId).then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and get marketplaceAgreements as an example written in JavaScript. +#### browser - Authentication, client creation, and get marketplaceAgreements as an example written in JavaScript. -##### Install @azure/ms-rest-browserauth - -```bash -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-marketplaceordering sample - - + diff --git a/sdk/marketplaceordering/arm-marketplaceordering/package.json b/sdk/marketplaceordering/arm-marketplaceordering/package.json index 9a6cb2c9ae33..50a38366448e 100644 --- a/sdk/marketplaceordering/arm-marketplaceordering/package.json +++ b/sdk/marketplaceordering/arm-marketplaceordering/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-marketplaceordering", "author": "Microsoft Corporation", "description": "MarketplaceOrderingAgreements Library with typescript type definitions for node.js and browser.", - "version": "2.0.0", + "version": "2.1.0", "dependencies": { - "@azure/ms-rest-azure-js": "^2.0.1", - "@azure/ms-rest-js": "^2.0.4", + "@azure/ms-rest-azure-js": "^2.1.0", + "@azure/ms-rest-js": "^2.2.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.10.0" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/marketplaceOrderingAgreements.js", "types": "./esm/marketplaceOrderingAgreements.d.ts", "devDependencies": { - "typescript": "^3.5.3", + "typescript": "^3.6.0", "rollup": "^1.18.0", "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", diff --git a/sdk/marketplaceordering/arm-marketplaceordering/src/marketplaceOrderingAgreements.ts b/sdk/marketplaceordering/arm-marketplaceordering/src/marketplaceOrderingAgreements.ts index 3c7a63b3770e..754d16407f50 100644 --- a/sdk/marketplaceordering/arm-marketplaceordering/src/marketplaceOrderingAgreements.ts +++ b/sdk/marketplaceordering/arm-marketplaceordering/src/marketplaceOrderingAgreements.ts @@ -9,6 +9,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -22,11 +23,16 @@ class MarketplaceOrderingAgreements extends MarketplaceOrderingAgreementsContext /** * Initializes a new instance of the MarketplaceOrderingAgreements class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The subscription ID that identifies an Azure subscription. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.MarketplaceOrderingAgreementsOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.MarketplaceOrderingAgreementsOptions) { super(credentials, subscriptionId, options); this.marketplaceAgreements = new operations.MarketplaceAgreements(this); this.operations = new operations.Operations(this); diff --git a/sdk/marketplaceordering/arm-marketplaceordering/src/marketplaceOrderingAgreementsContext.ts b/sdk/marketplaceordering/arm-marketplaceordering/src/marketplaceOrderingAgreementsContext.ts index 75ba980477a6..bf8e240fbe8f 100644 --- a/sdk/marketplaceordering/arm-marketplaceordering/src/marketplaceOrderingAgreementsContext.ts +++ b/sdk/marketplaceordering/arm-marketplaceordering/src/marketplaceOrderingAgreementsContext.ts @@ -10,23 +10,29 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-marketplaceordering"; -const packageVersion = "2.0.0"; +const packageVersion = "2.1.0"; export class MarketplaceOrderingAgreementsContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; apiVersion?: string; /** * Initializes a new instance of the MarketplaceOrderingAgreements class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The subscription ID that identifies an Azure subscription. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.MarketplaceOrderingAgreementsOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.MarketplaceOrderingAgreementsOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } diff --git a/sdk/mediaservices/arm-mediaservices/README.md b/sdk/mediaservices/arm-mediaservices/README.md index ab197cd0e915..3c961aee4d08 100644 --- a/sdk/mediaservices/arm-mediaservices/README.md +++ b/sdk/mediaservices/arm-mediaservices/README.md @@ -1,93 +1,103 @@ ## Azure AzureMediaServices SDK for JavaScript -This package contains an isomorphic SDK for AzureMediaServices. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for AzureMediaServices. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-mediaservices` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: ```bash -npm install @azure/arm-mediaservices +npm install --save @azure/arm-mediaservices @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - client creation and list accountFilters as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. -```bash -npm install @azure/ms-rest-nodeauth@"^3.0.0" -``` +#### nodejs - Authentication, client creation, and list accountFilters as an example written in JavaScript. ##### Sample code -While the below sample uses the interactive login, other authentication options can be found in the [README.md file of @azure/ms-rest-nodeauth](https://www.npmjs.com/package/@azure/ms-rest-nodeauth) package -```typescript -const msRestNodeAuth = require("@azure/ms-rest-nodeauth"); +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); const { AzureMediaServices } = require("@azure/arm-mediaservices"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new AzureMediaServices(creds, subscriptionId); - const resourceGroupName = "testresourceGroupName"; - const accountName = "testaccountName"; - client.accountFilters.list(resourceGroupName, accountName).then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new AzureMediaServices(creds, subscriptionId); +const resourceGroupName = "testresourceGroupName"; +const accountName = "testaccountName"; +client.accountFilters.list(resourceGroupName, accountName).then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and list accountFilters as an example written in JavaScript. +#### browser - Authentication, client creation, and list accountFilters as an example written in JavaScript. -##### Install @azure/ms-rest-browserauth - -```bash -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-mediaservices sample - - + diff --git a/sdk/mediaservices/arm-mediaservices/package.json b/sdk/mediaservices/arm-mediaservices/package.json index ee22ec05d8f3..a419ba2f8db6 100644 --- a/sdk/mediaservices/arm-mediaservices/package.json +++ b/sdk/mediaservices/arm-mediaservices/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-mediaservices", "author": "Microsoft Corporation", "description": "AzureMediaServices Library with typescript type definitions for node.js and browser.", - "version": "8.1.0", + "version": "8.2.0", "dependencies": { - "@azure/ms-rest-azure-js": "^2.0.1", - "@azure/ms-rest-js": "^2.0.4", + "@azure/ms-rest-azure-js": "^2.1.0", + "@azure/ms-rest-js": "^2.2.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.10.0" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/azureMediaServices.js", "types": "./esm/azureMediaServices.d.ts", "devDependencies": { - "typescript": "^3.5.3", + "typescript": "^3.6.0", "rollup": "^1.18.0", "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", diff --git a/sdk/mediaservices/arm-mediaservices/src/azureMediaServices.ts b/sdk/mediaservices/arm-mediaservices/src/azureMediaServices.ts index a901bd17fb3b..126a25b0934f 100644 --- a/sdk/mediaservices/arm-mediaservices/src/azureMediaServices.ts +++ b/sdk/mediaservices/arm-mediaservices/src/azureMediaServices.ts @@ -8,6 +8,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -35,11 +36,16 @@ class AzureMediaServices extends AzureMediaServicesContext { /** * Initializes a new instance of the AzureMediaServices class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The unique identifier for a Microsoft Azure subscription. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.AzureMediaServicesOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.AzureMediaServicesOptions) { super(credentials, subscriptionId, options); this.accountFilters = new operations.AccountFilters(this); this.operations = new operations.Operations(this); diff --git a/sdk/mediaservices/arm-mediaservices/src/azureMediaServicesContext.ts b/sdk/mediaservices/arm-mediaservices/src/azureMediaServicesContext.ts index 02385a759766..2184590a3d49 100644 --- a/sdk/mediaservices/arm-mediaservices/src/azureMediaServicesContext.ts +++ b/sdk/mediaservices/arm-mediaservices/src/azureMediaServicesContext.ts @@ -9,23 +9,29 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-mediaservices"; -const packageVersion = "8.1.0"; +const packageVersion = "8.2.0"; export class AzureMediaServicesContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; apiVersion?: string; /** * Initializes a new instance of the AzureMediaServices class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The unique identifier for a Microsoft Azure subscription. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.AzureMediaServicesOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.AzureMediaServicesOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } diff --git a/sdk/migrate/arm-migrate/README.md b/sdk/migrate/arm-migrate/README.md index 6e9f375c655e..e233b2367ac2 100644 --- a/sdk/migrate/arm-migrate/README.md +++ b/sdk/migrate/arm-migrate/README.md @@ -1,91 +1,101 @@ ## Azure AzureMigrate SDK for JavaScript -This package contains an isomorphic SDK for AzureMigrate. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for AzureMigrate. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites -``` -npm install @azure/arm-migrate +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-migrate` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: +```bash +npm install --save @azure/arm-migrate @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - Authentication, client creation and get assessmentOptions as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -``` -npm install @azure/ms-rest-nodeauth -``` +#### nodejs - Authentication, client creation, and get assessmentOptions as an example written in JavaScript. ##### Sample code -```ts -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { AzureMigrate, AzureMigrateModels, AzureMigrateMappers } from "@azure/arm-migrate"; +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { AzureMigrate } = require("@azure/arm-migrate"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new AzureMigrate(creds, subscriptionId); - const locationName = "testlocationName"; - client.assessmentOptions.get(locationName).then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new AzureMigrate(creds, subscriptionId); +const locationName = "testlocationName"; +client.assessmentOptions.get(locationName).then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and get assessmentOptions as an example written in JavaScript. +#### browser - Authentication, client creation, and get assessmentOptions as an example written in JavaScript. -##### Install @azure/ms-rest-browserauth - -``` -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-migrate sample - - + @@ -97,5 +107,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fmigrate%2Farm-migrate%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/migrate/arm-migrate/README.png) diff --git a/sdk/migrate/arm-migrate/package.json b/sdk/migrate/arm-migrate/package.json index 252b6205c733..68c0cb360621 100644 --- a/sdk/migrate/arm-migrate/package.json +++ b/sdk/migrate/arm-migrate/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-migrate", "author": "Microsoft Corporation", "description": "AzureMigrate Library with typescript type definitions for node.js and browser.", - "version": "1.1.0", + "version": "1.2.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.1.0", - "@azure/ms-rest-js": "^1.1.0", + "@azure/ms-rest-azure-js": "^1.4.0", + "@azure/ms-rest-js": "^1.11.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.9.3" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/azureMigrate.js", "types": "./esm/azureMigrate.d.ts", "devDependencies": { - "typescript": "^3.1.1", + "typescript": "^3.6.0", "rollup": "^0.66.2", "rollup-plugin-node-resolve": "^3.4.0", "uglify-js": "^3.4.9" diff --git a/sdk/migrate/arm-migrate/src/azureMigrate.ts b/sdk/migrate/arm-migrate/src/azureMigrate.ts index 48e178cca807..5f7f42d37bd6 100644 --- a/sdk/migrate/arm-migrate/src/azureMigrate.ts +++ b/sdk/migrate/arm-migrate/src/azureMigrate.ts @@ -9,6 +9,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -28,11 +29,16 @@ class AzureMigrate extends AzureMigrateContext { /** * Initializes a new instance of the AzureMigrate class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId Azure Subscription Id in which project was created. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.AzureMigrateOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.AzureMigrateOptions) { super(credentials, subscriptionId, options); this.location = new operations.Location(this); this.assessmentOptions = new operations.AssessmentOptions(this); diff --git a/sdk/migrate/arm-migrate/src/azureMigrateContext.ts b/sdk/migrate/arm-migrate/src/azureMigrateContext.ts index 72bc3b910a84..4099555561c8 100644 --- a/sdk/migrate/arm-migrate/src/azureMigrateContext.ts +++ b/sdk/migrate/arm-migrate/src/azureMigrateContext.ts @@ -10,23 +10,29 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-migrate"; -const packageVersion = "0.1.0"; +const packageVersion = "1.2.0"; export class AzureMigrateContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; apiVersion?: string; /** * Initializes a new instance of the AzureMigrate class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId Azure Subscription Id in which project was created. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.AzureMigrateOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.AzureMigrateOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } diff --git a/sdk/mixedreality/arm-mixedreality/README.md b/sdk/mixedreality/arm-mixedreality/README.md index e5d65b4492a4..ecdbf28cee8b 100644 --- a/sdk/mixedreality/arm-mixedreality/README.md +++ b/sdk/mixedreality/arm-mixedreality/README.md @@ -1,89 +1,100 @@ ## Azure MixedRealityClient SDK for JavaScript -This package contains an isomorphic SDK for MixedRealityClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for MixedRealityClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-mixedreality` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: ```bash -npm install @azure/arm-mixedreality +npm install --save @azure/arm-mixedreality @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - client creation and list operations as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. -```bash -npm install @azure/ms-rest-nodeauth@"^3.0.0" -``` +#### nodejs - Authentication, client creation, and list operations as an example written in JavaScript. ##### Sample code -While the below sample uses the interactive login, other authentication options can be found in the [README.md file of @azure/ms-rest-nodeauth](https://www.npmjs.com/package/@azure/ms-rest-nodeauth) package -```typescript -const msRestNodeAuth = require("@azure/ms-rest-nodeauth"); +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); const { MixedRealityClient } = require("@azure/arm-mixedreality"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new MixedRealityClient(creds, subscriptionId); - client.operations.list().then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new MixedRealityClient(creds, subscriptionId); + +client.operations.list().then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and list operations as an example written in JavaScript. - -##### Install @azure/ms-rest-browserauth +#### browser - Authentication, client creation, and list operations as an example written in JavaScript. -```bash -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-mixedreality sample - - + diff --git a/sdk/mixedreality/arm-mixedreality/package.json b/sdk/mixedreality/arm-mixedreality/package.json index 55fb6fa9e4e9..a311089dec27 100644 --- a/sdk/mixedreality/arm-mixedreality/package.json +++ b/sdk/mixedreality/arm-mixedreality/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-mixedreality", "author": "Microsoft Corporation", "description": "MixedRealityClient Library with typescript type definitions for node.js and browser.", - "version": "3.0.0", + "version": "3.1.0", "dependencies": { - "@azure/ms-rest-azure-js": "^2.0.1", - "@azure/ms-rest-js": "^2.0.4", + "@azure/ms-rest-azure-js": "^2.1.0", + "@azure/ms-rest-js": "^2.2.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.10.0" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/mixedRealityClient.js", "types": "./esm/mixedRealityClient.d.ts", "devDependencies": { - "typescript": "^3.5.3", + "typescript": "^3.6.0", "rollup": "^1.18.0", "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", diff --git a/sdk/mixedreality/arm-mixedreality/src/mixedRealityClient.ts b/sdk/mixedreality/arm-mixedreality/src/mixedRealityClient.ts index 2983d2d4fd0a..50e339d54004 100644 --- a/sdk/mixedreality/arm-mixedreality/src/mixedRealityClient.ts +++ b/sdk/mixedreality/arm-mixedreality/src/mixedRealityClient.ts @@ -8,6 +8,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as Parameters from "./models/parameters"; @@ -23,12 +24,17 @@ class MixedRealityClient extends MixedRealityClientContext { /** * Initializes a new instance of the MixedRealityClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The Azure subscription ID. This is a GUID-formatted string (e.g. * 00000000-0000-0000-0000-000000000000) * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.MixedRealityClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.MixedRealityClientOptions) { super(credentials, subscriptionId, options); this.operations = new operations.Operations(this); this.spatialAnchorsAccounts = new operations.SpatialAnchorsAccounts(this); diff --git a/sdk/mixedreality/arm-mixedreality/src/mixedRealityClientContext.ts b/sdk/mixedreality/arm-mixedreality/src/mixedRealityClientContext.ts index 16b8190b3d87..2866a422ebf6 100644 --- a/sdk/mixedreality/arm-mixedreality/src/mixedRealityClientContext.ts +++ b/sdk/mixedreality/arm-mixedreality/src/mixedRealityClientContext.ts @@ -9,24 +9,30 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-mixedreality"; -const packageVersion = "3.0.0"; +const packageVersion = "3.1.0"; export class MixedRealityClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; apiVersion?: string; subscriptionId: string; /** * Initializes a new instance of the MixedRealityClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The Azure subscription ID. This is a GUID-formatted string (e.g. * 00000000-0000-0000-0000-000000000000) * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.MixedRealityClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.MixedRealityClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } From 43c5bc43ee49d053c55a38085dd286c588abeecb Mon Sep 17 00:00:00 2001 From: colawwj <70128817+colawwj@users.noreply.github.com> Date: Thu, 8 Jul 2021 09:07:31 +0800 Subject: [PATCH 08/28] identity support 40 (#16255) --- .../README.md | 113 +++++++++-------- .../package.json | 9 +- .../src/monitorManagementClient.ts | 10 +- .../src/monitorManagementClientContext.ts | 14 ++- .../README.md | 111 +++++++++-------- .../package.json | 9 +- .../src/monitorManagementClient.ts | 10 +- .../src/monitorManagementClientContext.ts | 14 ++- sdk/monitor/arm-monitor/README.md | 109 ++++++++-------- sdk/monitor/arm-monitor/package.json | 9 +- .../src/monitorManagementClient.ts | 10 +- .../src/monitorManagementClientContext.ts | 14 ++- sdk/msi/arm-msi/README.md | 108 ++++++++-------- sdk/msi/arm-msi/package.json | 9 +- .../src/managedServiceIdentityClient.ts | 10 +- .../managedServiceIdentityClientContext.ts | 14 ++- sdk/mysql/arm-mysql/README.md | 112 +++++++++-------- sdk/mysql/arm-mysql/package.json | 9 +- .../arm-mysql/src/mySQLManagementClient.ts | 10 +- .../src/mySQLManagementClientContext.ts | 14 ++- .../README.md | 117 ++++++++++-------- .../package.json | 9 +- .../src/networkManagementClient.ts | 10 +- .../src/networkManagementClientContext.ts | 14 ++- .../README.md | 111 +++++++++-------- .../package.json | 9 +- .../src/networkManagementClient.ts | 10 +- .../src/networkManagementClientContext.ts | 14 ++- .../arm-notificationhubs/README.md | 108 ++++++++-------- .../arm-notificationhubs/package.json | 9 +- .../src/notificationHubsManagementClient.ts | 10 +- ...notificationHubsManagementClientContext.ts | 14 ++- .../arm-operationalinsights/README.md | 108 ++++++++-------- .../arm-operationalinsights/package.json | 9 +- .../operationalInsightsManagementClient.ts | 10 +- ...rationalInsightsManagementClientContext.ts | 14 ++- .../arm-operations/README.md | 115 +++++++++-------- .../arm-operations/package.json | 9 +- .../src/operationsManagementClient.ts | 10 +- .../src/operationsManagementClientContext.ts | 14 ++- 40 files changed, 833 insertions(+), 609 deletions(-) diff --git a/sdk/monitor/arm-monitor-profile-2019-03-01-hybrid/README.md b/sdk/monitor/arm-monitor-profile-2019-03-01-hybrid/README.md index 5541c2706873..b0cccb154677 100644 --- a/sdk/monitor/arm-monitor-profile-2019-03-01-hybrid/README.md +++ b/sdk/monitor/arm-monitor-profile-2019-03-01-hybrid/README.md @@ -1,93 +1,103 @@ ## Azure MonitorManagementClient SDK for JavaScript -This package contains an isomorphic SDK for MonitorManagementClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for MonitorManagementClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-monitor-profile-2019-03-01-hybrid` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: ```bash -npm install @azure/arm-monitor-profile-2019-03-01-hybrid +npm install --save @azure/arm-monitor-profile-2019-03-01-hybrid @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - Authentication, client creation and list metricDefinitions as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -```bash -npm install @azure/ms-rest-nodeauth -``` +#### nodejs - Authentication, client creation, and list metricDefinitions as an example written in JavaScript. ##### Sample code -```typescript -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { MonitorManagementClient, MonitorManagementModels, MonitorManagementMappers } from "@azure/arm-monitor-profile-2019-03-01-hybrid"; +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { MonitorManagementClient } = require("@azure/arm-monitor-profile-2019-03-01-hybrid"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new MonitorManagementClient(creds, subscriptionId); - const resourceUri = "testresourceUri"; - const metricnamespace = "testmetricnamespace"; - client.metricDefinitions.list(resourceUri, metricnamespace).then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new MonitorManagementClient(creds, subscriptionId); +const resourceUri = "testresourceUri"; +const metricnamespace = "testmetricnamespace"; +client.metricDefinitions.list(resourceUri, metricnamespace).then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and list metricDefinitions as an example written in JavaScript. +#### browser - Authentication, client creation, and list metricDefinitions as an example written in JavaScript. -##### Install @azure/ms-rest-browserauth - -```bash -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-monitor-profile-2019-03-01-hybrid sample - - + @@ -99,5 +109,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fmonitor%2Farm-monitor-profile-2019-03-01-hybrid%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/monitor/arm-monitor-profile-2019-03-01-hybrid/README.png) diff --git a/sdk/monitor/arm-monitor-profile-2019-03-01-hybrid/package.json b/sdk/monitor/arm-monitor-profile-2019-03-01-hybrid/package.json index d274ca5e8069..fcd2f1eada5d 100644 --- a/sdk/monitor/arm-monitor-profile-2019-03-01-hybrid/package.json +++ b/sdk/monitor/arm-monitor-profile-2019-03-01-hybrid/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-monitor-profile-2019-03-01-hybrid", "author": "Microsoft Corporation", "description": "MonitorManagementClient Library with typescript type definitions for node.js and browser.", - "version": "1.0.0", + "version": "1.1.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.3.2", - "@azure/ms-rest-js": "^1.8.1", + "@azure/ms-rest-azure-js": "^1.4.0", + "@azure/ms-rest-js": "^1.11.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.9.3" }, "keywords": [ @@ -21,7 +22,7 @@ "module": "./esm/monitorManagementClient.js", "types": "./esm/monitorManagementClient.d.ts", "devDependencies": { - "typescript": "^3.1.1", + "typescript": "^3.6.0", "rollup": "^0.66.2", "rollup-plugin-node-resolve": "^3.4.0", "rollup-plugin-sourcemaps": "^0.4.2", diff --git a/sdk/monitor/arm-monitor-profile-2019-03-01-hybrid/src/monitorManagementClient.ts b/sdk/monitor/arm-monitor-profile-2019-03-01-hybrid/src/monitorManagementClient.ts index a84f753e3fe5..0cbf7f67005e 100644 --- a/sdk/monitor/arm-monitor-profile-2019-03-01-hybrid/src/monitorManagementClient.ts +++ b/sdk/monitor/arm-monitor-profile-2019-03-01-hybrid/src/monitorManagementClient.ts @@ -9,6 +9,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -26,10 +27,15 @@ class MonitorManagementClient extends MonitorManagementClientContext { /** * Initializes a new instance of the MonitorManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, options?: Models.MonitorManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, options?: Models.MonitorManagementClientOptions) { super(credentials, options); this.metricDefinitions = new operations.MetricDefinitions(this); this.metrics = new operations.Metrics(this); diff --git a/sdk/monitor/arm-monitor-profile-2019-03-01-hybrid/src/monitorManagementClientContext.ts b/sdk/monitor/arm-monitor-profile-2019-03-01-hybrid/src/monitorManagementClientContext.ts index 72abeb1f8294..e8bec3c05d7d 100644 --- a/sdk/monitor/arm-monitor-profile-2019-03-01-hybrid/src/monitorManagementClientContext.ts +++ b/sdk/monitor/arm-monitor-profile-2019-03-01-hybrid/src/monitorManagementClientContext.ts @@ -10,20 +10,26 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-monitor-profile-2019-03-01-hybrid"; -const packageVersion = "1.0.0"; +const packageVersion = "1.1.0"; export class MonitorManagementClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; /** * Initializes a new instance of the MonitorManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, options?: Models.MonitorManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, options?: Models.MonitorManagementClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } diff --git a/sdk/monitor/arm-monitor-profile-2020-09-01-hybrid/README.md b/sdk/monitor/arm-monitor-profile-2020-09-01-hybrid/README.md index 0ca4713df7df..7d6b556b862f 100644 --- a/sdk/monitor/arm-monitor-profile-2020-09-01-hybrid/README.md +++ b/sdk/monitor/arm-monitor-profile-2020-09-01-hybrid/README.md @@ -1,94 +1,103 @@ ## Azure MonitorManagementClient SDK for JavaScript -This package contains an isomorphic SDK for MonitorManagementClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for MonitorManagementClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-monitor-profile-2020-09-01-hybrid` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: ```bash -npm install @azure/arm-monitor-profile-2020-09-01-hybrid +npm install --save @azure/arm-monitor-profile-2020-09-01-hybrid @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - Authentication, client creation and list metricDefinitions as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. -```bash -npm install @azure/ms-rest-nodeauth@"^3.0.0" -``` +#### nodejs - Authentication, client creation, and list metricDefinitions as an example written in JavaScript. ##### Sample code -```typescript -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { MonitorManagementClient, MonitorManagementModels, MonitorManagementMappers } from "@azure/arm-monitor-profile-2020-09-01-hybrid"; +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { MonitorManagementClient } = require("@azure/arm-monitor-profile-2020-09-01-hybrid"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new MonitorManagementClient(creds, subscriptionId); - const resourceUri = "testresourceUri"; - const metricnamespace = "testmetricnamespace"; - client.metricDefinitions.list(resourceUri, metricnamespace).then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new MonitorManagementClient(creds, subscriptionId); +const resourceUri = "testresourceUri"; +const metricnamespace = "testmetricnamespace"; +client.metricDefinitions.list(resourceUri, metricnamespace).then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and list metricDefinitions as an example written in JavaScript. +#### browser - Authentication, client creation, and list metricDefinitions as an example written in JavaScript. -##### Install @azure/ms-rest-browserauth - -```bash -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-monitor-profile-2020-09-01-hybrid sample - - + diff --git a/sdk/monitor/arm-monitor-profile-2020-09-01-hybrid/package.json b/sdk/monitor/arm-monitor-profile-2020-09-01-hybrid/package.json index d9354f56c467..56a5df5060ad 100644 --- a/sdk/monitor/arm-monitor-profile-2020-09-01-hybrid/package.json +++ b/sdk/monitor/arm-monitor-profile-2020-09-01-hybrid/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-monitor-profile-2020-09-01-hybrid", "author": "Microsoft Corporation", "description": "MonitorManagementClient Library with typescript type definitions for node.js and browser.", - "version": "1.0.0", + "version": "1.1.0", "dependencies": { - "@azure/ms-rest-azure-js": "^2.0.1", - "@azure/ms-rest-js": "^2.0.4", + "@azure/ms-rest-azure-js": "^2.1.0", + "@azure/ms-rest-js": "^2.2.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.10.0" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/monitorManagementClient.js", "types": "./esm/monitorManagementClient.d.ts", "devDependencies": { - "typescript": "^3.5.3", + "typescript": "^3.6.0", "rollup": "^1.18.0", "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", diff --git a/sdk/monitor/arm-monitor-profile-2020-09-01-hybrid/src/monitorManagementClient.ts b/sdk/monitor/arm-monitor-profile-2020-09-01-hybrid/src/monitorManagementClient.ts index a84f753e3fe5..0cbf7f67005e 100644 --- a/sdk/monitor/arm-monitor-profile-2020-09-01-hybrid/src/monitorManagementClient.ts +++ b/sdk/monitor/arm-monitor-profile-2020-09-01-hybrid/src/monitorManagementClient.ts @@ -9,6 +9,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -26,10 +27,15 @@ class MonitorManagementClient extends MonitorManagementClientContext { /** * Initializes a new instance of the MonitorManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, options?: Models.MonitorManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, options?: Models.MonitorManagementClientOptions) { super(credentials, options); this.metricDefinitions = new operations.MetricDefinitions(this); this.metrics = new operations.Metrics(this); diff --git a/sdk/monitor/arm-monitor-profile-2020-09-01-hybrid/src/monitorManagementClientContext.ts b/sdk/monitor/arm-monitor-profile-2020-09-01-hybrid/src/monitorManagementClientContext.ts index 9e357d10e244..c467ad8e9122 100644 --- a/sdk/monitor/arm-monitor-profile-2020-09-01-hybrid/src/monitorManagementClientContext.ts +++ b/sdk/monitor/arm-monitor-profile-2020-09-01-hybrid/src/monitorManagementClientContext.ts @@ -10,20 +10,26 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-monitor-profile-2020-09-01-hybrid"; -const packageVersion = "1.0.0"; +const packageVersion = "1.1.0"; export class MonitorManagementClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; /** * Initializes a new instance of the MonitorManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, options?: Models.MonitorManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, options?: Models.MonitorManagementClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } diff --git a/sdk/monitor/arm-monitor/README.md b/sdk/monitor/arm-monitor/README.md index 04373a170952..34c0456e346b 100644 --- a/sdk/monitor/arm-monitor/README.md +++ b/sdk/monitor/arm-monitor/README.md @@ -1,92 +1,101 @@ ## Azure MonitorManagementClient SDK for JavaScript -This package contains an isomorphic SDK for MonitorManagementClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for MonitorManagementClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-monitor` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: ```bash -npm install @azure/arm-monitor +npm install --save @azure/arm-monitor @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - Authentication, client creation and listByResourceGroup autoscaleSettings as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. -```bash -npm install @azure/ms-rest-nodeauth@"^3.0.0" -``` +#### nodejs - Authentication, client creation, and listByResourceGroup autoscaleSettings as an example written in JavaScript. ##### Sample code -```typescript -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { MonitorManagementClient, MonitorManagementModels, MonitorManagementMappers } from "@azure/arm-monitor"; +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { MonitorManagementClient } = require("@azure/arm-monitor"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new MonitorManagementClient(creds, subscriptionId); - const resourceGroupName = "testresourceGroupName"; - client.autoscaleSettings.listByResourceGroup(resourceGroupName).then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new MonitorManagementClient(creds, subscriptionId); +const resourceGroupName = "testresourceGroupName"; +client.autoscaleSettings.listByResourceGroup(resourceGroupName).then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and listByResourceGroup autoscaleSettings as an example written in JavaScript. +#### browser - Authentication, client creation, and listByResourceGroup autoscaleSettings as an example written in JavaScript. -##### Install @azure/ms-rest-browserauth - -```bash -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-monitor sample - - + @@ -98,4 +107,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fmonitor%2Farm-monitor%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/monitor/arm-monitor/README.png) diff --git a/sdk/monitor/arm-monitor/package.json b/sdk/monitor/arm-monitor/package.json index 2b40038fbd88..aa2917699e69 100644 --- a/sdk/monitor/arm-monitor/package.json +++ b/sdk/monitor/arm-monitor/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-monitor", "author": "Microsoft Corporation", "description": "MonitorManagementClient Library with typescript type definitions for node.js and browser.", - "version": "6.0.0", + "version": "6.1.0", "dependencies": { - "@azure/ms-rest-azure-js": "^2.0.1", - "@azure/ms-rest-js": "^2.0.4", + "@azure/ms-rest-azure-js": "^2.1.0", + "@azure/ms-rest-js": "^2.2.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.10.0" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/monitorManagementClient.js", "types": "./esm/monitorManagementClient.d.ts", "devDependencies": { - "typescript": "^3.5.3", + "typescript": "^3.6.0", "rollup": "^1.18.0", "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", diff --git a/sdk/monitor/arm-monitor/src/monitorManagementClient.ts b/sdk/monitor/arm-monitor/src/monitorManagementClient.ts index a498d7b03d34..8f76eb98ccbb 100644 --- a/sdk/monitor/arm-monitor/src/monitorManagementClient.ts +++ b/sdk/monitor/arm-monitor/src/monitorManagementClient.ts @@ -9,6 +9,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -41,11 +42,16 @@ class MonitorManagementClient extends MonitorManagementClientContext { /** * Initializes a new instance of the MonitorManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The Azure subscription Id. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.MonitorManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.MonitorManagementClientOptions) { super(credentials, subscriptionId, options); this.autoscaleSettings = new operations.AutoscaleSettings(this); this.operations = new operations.Operations(this); diff --git a/sdk/monitor/arm-monitor/src/monitorManagementClientContext.ts b/sdk/monitor/arm-monitor/src/monitorManagementClientContext.ts index aacdc007667d..3212c44711f3 100644 --- a/sdk/monitor/arm-monitor/src/monitorManagementClientContext.ts +++ b/sdk/monitor/arm-monitor/src/monitorManagementClientContext.ts @@ -10,22 +10,28 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-monitor"; -const packageVersion = "5.4.0"; +const packageVersion = "6.1.0"; export class MonitorManagementClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; /** * Initializes a new instance of the MonitorManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The Azure subscription Id. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.MonitorManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.MonitorManagementClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } diff --git a/sdk/msi/arm-msi/README.md b/sdk/msi/arm-msi/README.md index c3f9cb728ff3..f4e16fd5e9a5 100644 --- a/sdk/msi/arm-msi/README.md +++ b/sdk/msi/arm-msi/README.md @@ -1,89 +1,100 @@ ## Azure ManagedServiceIdentityClient SDK for JavaScript -This package contains an isomorphic SDK for ManagedServiceIdentityClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for ManagedServiceIdentityClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites -``` -npm install @azure/arm-msi +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-msi` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: +```bash +npm install --save @azure/arm-msi @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - Authentication, client creation and list operations as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -``` -npm install @azure/ms-rest-nodeauth -``` +#### nodejs - Authentication, client creation, and list operations as an example written in JavaScript. ##### Sample code -```ts -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { ManagedServiceIdentityClient, ManagedServiceIdentityModels, ManagedServiceIdentityMappers } from "@azure/arm-msi"; +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { ManagedServiceIdentityClient } = require("@azure/arm-msi"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new ManagedServiceIdentityClient(creds, subscriptionId); - client.operations.list().then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new ManagedServiceIdentityClient(creds, subscriptionId); + +client.operations.list().then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and list operations as an example written in JavaScript. - -##### Install @azure/ms-rest-browserauth +#### browser - Authentication, client creation, and list operations as an example written in JavaScript. -``` -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-msi sample - - + @@ -95,5 +106,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fmsi%2Farm-msi%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/msi/arm-msi/README.png) diff --git a/sdk/msi/arm-msi/package.json b/sdk/msi/arm-msi/package.json index fde1b3ef62bb..03f9c73d485c 100644 --- a/sdk/msi/arm-msi/package.json +++ b/sdk/msi/arm-msi/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-msi", "author": "Microsoft Corporation", "description": "ManagedServiceIdentityClient Library with typescript type definitions for node.js and browser.", - "version": "1.1.0", + "version": "1.2.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.1.0", - "@azure/ms-rest-js": "^1.1.0", + "@azure/ms-rest-azure-js": "^1.4.0", + "@azure/ms-rest-js": "^1.11.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.9.3" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/managedServiceIdentityClient.js", "types": "./esm/managedServiceIdentityClient.d.ts", "devDependencies": { - "typescript": "^3.1.1", + "typescript": "^3.6.0", "rollup": "^0.66.2", "rollup-plugin-node-resolve": "^3.4.0", "uglify-js": "^3.4.9" diff --git a/sdk/msi/arm-msi/src/managedServiceIdentityClient.ts b/sdk/msi/arm-msi/src/managedServiceIdentityClient.ts index 2360b79199a9..75e4af9098c7 100644 --- a/sdk/msi/arm-msi/src/managedServiceIdentityClient.ts +++ b/sdk/msi/arm-msi/src/managedServiceIdentityClient.ts @@ -9,6 +9,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -22,11 +23,16 @@ class ManagedServiceIdentityClient extends ManagedServiceIdentityClientContext { /** * Initializes a new instance of the ManagedServiceIdentityClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The Id of the Subscription to which the identity belongs. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.ManagedServiceIdentityClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.ManagedServiceIdentityClientOptions) { super(credentials, subscriptionId, options); this.operations = new operations.Operations(this); this.userAssignedIdentities = new operations.UserAssignedIdentities(this); diff --git a/sdk/msi/arm-msi/src/managedServiceIdentityClientContext.ts b/sdk/msi/arm-msi/src/managedServiceIdentityClientContext.ts index f96cd5df3f4a..884230d49329 100644 --- a/sdk/msi/arm-msi/src/managedServiceIdentityClientContext.ts +++ b/sdk/msi/arm-msi/src/managedServiceIdentityClientContext.ts @@ -10,23 +10,29 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-msi"; -const packageVersion = "0.1.0"; +const packageVersion = "1.2.0"; export class ManagedServiceIdentityClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; apiVersion?: string; /** * Initializes a new instance of the ManagedServiceIdentityClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The Id of the Subscription to which the identity belongs. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.ManagedServiceIdentityClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.ManagedServiceIdentityClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } diff --git a/sdk/mysql/arm-mysql/README.md b/sdk/mysql/arm-mysql/README.md index 9c51be4833fe..a2ef706bd607 100644 --- a/sdk/mysql/arm-mysql/README.md +++ b/sdk/mysql/arm-mysql/README.md @@ -1,93 +1,103 @@ ## Azure MySQLManagementClient SDK for JavaScript -This package contains an isomorphic SDK for MySQLManagementClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for MySQLManagementClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-mysql` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: ```bash -npm install @azure/arm-mysql +npm install --save @azure/arm-mysql @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - Authentication, client creation and get servers as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -```bash -npm install @azure/ms-rest-nodeauth -``` +#### nodejs - Authentication, client creation, and get servers as an example written in JavaScript. ##### Sample code -```typescript -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { MySQLManagementClient, MySQLManagementModels, MySQLManagementMappers } from "@azure/arm-mysql"; +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { MySQLManagementClient } = require("@azure/arm-mysql"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new MySQLManagementClient(creds, subscriptionId); - const resourceGroupName = "testresourceGroupName"; - const serverName = "testserverName"; - client.servers.get(resourceGroupName, serverName).then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new MySQLManagementClient(creds, subscriptionId); +const resourceGroupName = "testresourceGroupName"; +const serverName = "testserverName"; +client.servers.get(resourceGroupName, serverName).then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and get servers as an example written in JavaScript. +#### browser - Authentication, client creation, and get servers as an example written in JavaScript. -##### Install @azure/ms-rest-browserauth - -```bash -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-mysql sample - - + @@ -99,4 +109,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fmysql%2Farm-mysql%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/mysql/arm-mysql/README.png) diff --git a/sdk/mysql/arm-mysql/package.json b/sdk/mysql/arm-mysql/package.json index 002baef71cd0..7a74704f28d7 100644 --- a/sdk/mysql/arm-mysql/package.json +++ b/sdk/mysql/arm-mysql/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-mysql", "author": "Microsoft Corporation", "description": "MySQLManagementClient Library with typescript type definitions for node.js and browser.", - "version": "3.3.0", + "version": "3.4.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.3.2", - "@azure/ms-rest-js": "^1.8.1", + "@azure/ms-rest-azure-js": "^1.4.0", + "@azure/ms-rest-js": "^1.11.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.9.3" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/mySQLManagementClient.js", "types": "./esm/mySQLManagementClient.d.ts", "devDependencies": { - "typescript": "^3.1.1", + "typescript": "^3.6.0", "rollup": "^0.66.2", "rollup-plugin-node-resolve": "^3.4.0", "rollup-plugin-sourcemaps": "^0.4.2", diff --git a/sdk/mysql/arm-mysql/src/mySQLManagementClient.ts b/sdk/mysql/arm-mysql/src/mySQLManagementClient.ts index aa67d2e2852d..f128cfad2096 100644 --- a/sdk/mysql/arm-mysql/src/mySQLManagementClient.ts +++ b/sdk/mysql/arm-mysql/src/mySQLManagementClient.ts @@ -9,6 +9,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -31,11 +32,16 @@ class MySQLManagementClient extends MySQLManagementClientContext { /** * Initializes a new instance of the MySQLManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The subscription ID that identifies an Azure subscription. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.MySQLManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.MySQLManagementClientOptions) { super(credentials, subscriptionId, options); this.servers = new operations.Servers(this); this.replicas = new operations.Replicas(this); diff --git a/sdk/mysql/arm-mysql/src/mySQLManagementClientContext.ts b/sdk/mysql/arm-mysql/src/mySQLManagementClientContext.ts index 7171fdfd9303..91c35fd07caf 100644 --- a/sdk/mysql/arm-mysql/src/mySQLManagementClientContext.ts +++ b/sdk/mysql/arm-mysql/src/mySQLManagementClientContext.ts @@ -10,23 +10,29 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-mysql"; -const packageVersion = "3.3.0"; +const packageVersion = "3.4.0"; export class MySQLManagementClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; apiVersion?: string; /** * Initializes a new instance of the MySQLManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The subscription ID that identifies an Azure subscription. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.MySQLManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.MySQLManagementClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } diff --git a/sdk/network/arm-network-profile-2019-03-01-hybrid/README.md b/sdk/network/arm-network-profile-2019-03-01-hybrid/README.md index 076cfd4d120d..492ae995e13c 100644 --- a/sdk/network/arm-network-profile-2019-03-01-hybrid/README.md +++ b/sdk/network/arm-network-profile-2019-03-01-hybrid/README.md @@ -1,95 +1,105 @@ ## Azure NetworkManagementClient SDK for JavaScript -This package contains an isomorphic SDK for NetworkManagementClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for NetworkManagementClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-network-profile-2019-03-01-hybrid` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: ```bash -npm install @azure/arm-network-profile-2019-03-01-hybrid +npm install --save @azure/arm-network-profile-2019-03-01-hybrid @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - Authentication, client creation and get loadBalancers as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -```bash -npm install @azure/ms-rest-nodeauth -``` +#### nodejs - Authentication, client creation, and get loadBalancers as an example written in JavaScript. ##### Sample code -```typescript -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { NetworkManagementClient, NetworkManagementModels, NetworkManagementMappers } from "@azure/arm-network-profile-2019-03-01-hybrid"; +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { NetworkManagementClient } = require("@azure/arm-network-profile-2019-03-01-hybrid"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new NetworkManagementClient(creds, subscriptionId); - const resourceGroupName = "testresourceGroupName"; - const loadBalancerName = "testloadBalancerName"; - const expand = "testexpand"; - client.loadBalancers.get(resourceGroupName, loadBalancerName, expand).then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new NetworkManagementClient(creds, subscriptionId); +const resourceGroupName = "testresourceGroupName"; +const loadBalancerName = "testloadBalancerName"; +const expand = "testexpand"; +client.loadBalancers.get(resourceGroupName, loadBalancerName, expand).then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and get loadBalancers as an example written in JavaScript. +#### browser - Authentication, client creation, and get loadBalancers as an example written in JavaScript. -##### Install @azure/ms-rest-browserauth - -```bash -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-network-profile-2019-03-01-hybrid sample - - + @@ -101,5 +111,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fnetwork%2Farm-network-profile-2019-03-01-hybrid%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/network/arm-network-profile-2019-03-01-hybrid/README.png) diff --git a/sdk/network/arm-network-profile-2019-03-01-hybrid/package.json b/sdk/network/arm-network-profile-2019-03-01-hybrid/package.json index f3f77e93ae7d..d0ad619a9739 100644 --- a/sdk/network/arm-network-profile-2019-03-01-hybrid/package.json +++ b/sdk/network/arm-network-profile-2019-03-01-hybrid/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-network-profile-2019-03-01-hybrid", "author": "Microsoft Corporation", "description": "NetworkManagementClient Library with typescript type definitions for node.js and browser.", - "version": "1.0.0", + "version": "1.1.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.3.2", - "@azure/ms-rest-js": "^1.8.1", + "@azure/ms-rest-azure-js": "^1.4.0", + "@azure/ms-rest-js": "^1.11.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.9.3" }, "keywords": [ @@ -21,7 +22,7 @@ "module": "./esm/networkManagementClient.js", "types": "./esm/networkManagementClient.d.ts", "devDependencies": { - "typescript": "^3.1.1", + "typescript": "^3.6.0", "rollup": "^0.66.2", "rollup-plugin-node-resolve": "^3.4.0", "rollup-plugin-sourcemaps": "^0.4.2", diff --git a/sdk/network/arm-network-profile-2019-03-01-hybrid/src/networkManagementClient.ts b/sdk/network/arm-network-profile-2019-03-01-hybrid/src/networkManagementClient.ts index f9e40168c7d6..4368d1129f55 100644 --- a/sdk/network/arm-network-profile-2019-03-01-hybrid/src/networkManagementClient.ts +++ b/sdk/network/arm-network-profile-2019-03-01-hybrid/src/networkManagementClient.ts @@ -9,6 +9,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -43,12 +44,17 @@ class NetworkManagementClient extends NetworkManagementClientContext { /** * Initializes a new instance of the NetworkManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The subscription credentials which uniquely identify the Microsoft Azure * subscription. The subscription ID forms part of the URI for every service call. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.NetworkManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.NetworkManagementClientOptions) { super(credentials, subscriptionId, options); this.loadBalancers = new operations.LoadBalancers(this); this.loadBalancerBackendAddressPools = new operations.LoadBalancerBackendAddressPools(this); diff --git a/sdk/network/arm-network-profile-2019-03-01-hybrid/src/networkManagementClientContext.ts b/sdk/network/arm-network-profile-2019-03-01-hybrid/src/networkManagementClientContext.ts index ce45aa70b761..40f0985559df 100644 --- a/sdk/network/arm-network-profile-2019-03-01-hybrid/src/networkManagementClientContext.ts +++ b/sdk/network/arm-network-profile-2019-03-01-hybrid/src/networkManagementClientContext.ts @@ -10,24 +10,30 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-network-profile-2019-03-01-hybrid"; -const packageVersion = "1.0.0"; +const packageVersion = "1.1.0"; export class NetworkManagementClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; apiVersion?: string; /** * Initializes a new instance of the NetworkManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The subscription credentials which uniquely identify the Microsoft Azure * subscription. The subscription ID forms part of the URI for every service call. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.NetworkManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.NetworkManagementClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } diff --git a/sdk/network/arm-network-profile-2020-09-01-hybrid/README.md b/sdk/network/arm-network-profile-2020-09-01-hybrid/README.md index 046cb52643b3..e4edc45dbfff 100644 --- a/sdk/network/arm-network-profile-2020-09-01-hybrid/README.md +++ b/sdk/network/arm-network-profile-2020-09-01-hybrid/README.md @@ -1,94 +1,103 @@ ## Azure NetworkManagementClient SDK for JavaScript -This package contains an isomorphic SDK for NetworkManagementClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for NetworkManagementClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-network-profile-2020-09-01-hybrid` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: ```bash -npm install @azure/arm-network-profile-2020-09-01-hybrid +npm install --save @azure/arm-network-profile-2020-09-01-hybrid @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - Authentication, client creation and get virtualNetworkGateways as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. -```bash -npm install @azure/ms-rest-nodeauth@"^3.0.0" -``` +#### nodejs - Authentication, client creation, and get virtualNetworkGateways as an example written in JavaScript. ##### Sample code -```typescript -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { NetworkManagementClient, NetworkManagementModels, NetworkManagementMappers } from "@azure/arm-network-profile-2020-09-01-hybrid"; +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { NetworkManagementClient } = require("@azure/arm-network-profile-2020-09-01-hybrid"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new NetworkManagementClient(creds, subscriptionId); - const resourceGroupName = "testresourceGroupName"; - const virtualNetworkGatewayName = "testvirtualNetworkGatewayName"; - client.virtualNetworkGateways.get(resourceGroupName, virtualNetworkGatewayName).then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new NetworkManagementClient(creds, subscriptionId); +const resourceGroupName = "testresourceGroupName"; +const virtualNetworkGatewayName = "testvirtualNetworkGatewayName"; +client.virtualNetworkGateways.get(resourceGroupName, virtualNetworkGatewayName).then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and get virtualNetworkGateways as an example written in JavaScript. +#### browser - Authentication, client creation, and get virtualNetworkGateways as an example written in JavaScript. -##### Install @azure/ms-rest-browserauth - -```bash -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-network-profile-2020-09-01-hybrid sample - - + diff --git a/sdk/network/arm-network-profile-2020-09-01-hybrid/package.json b/sdk/network/arm-network-profile-2020-09-01-hybrid/package.json index ed79a4aceedc..c0005d66c673 100644 --- a/sdk/network/arm-network-profile-2020-09-01-hybrid/package.json +++ b/sdk/network/arm-network-profile-2020-09-01-hybrid/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-network-profile-2020-09-01-hybrid", "author": "Microsoft Corporation", "description": "NetworkManagementClient Library with typescript type definitions for node.js and browser.", - "version": "1.0.0", + "version": "1.1.0", "dependencies": { - "@azure/ms-rest-azure-js": "^2.0.1", - "@azure/ms-rest-js": "^2.0.4", + "@azure/ms-rest-azure-js": "^2.1.0", + "@azure/ms-rest-js": "^2.2.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.10.0" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/networkManagementClient.js", "types": "./esm/networkManagementClient.d.ts", "devDependencies": { - "typescript": "^3.5.3", + "typescript": "^3.6.0", "rollup": "^1.18.0", "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", diff --git a/sdk/network/arm-network-profile-2020-09-01-hybrid/src/networkManagementClient.ts b/sdk/network/arm-network-profile-2020-09-01-hybrid/src/networkManagementClient.ts index fb64d2a973d9..22f2be411cc0 100644 --- a/sdk/network/arm-network-profile-2020-09-01-hybrid/src/networkManagementClient.ts +++ b/sdk/network/arm-network-profile-2020-09-01-hybrid/src/networkManagementClient.ts @@ -9,6 +9,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -45,12 +46,17 @@ class NetworkManagementClient extends NetworkManagementClientContext { /** * Initializes a new instance of the NetworkManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The subscription credentials which uniquely identify the Microsoft Azure * subscription. The subscription ID forms part of the URI for every service call. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.NetworkManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.NetworkManagementClientOptions) { super(credentials, subscriptionId, options); this.virtualNetworkGateways = new operations.VirtualNetworkGateways(this); this.virtualNetworkGatewayConnections = new operations.VirtualNetworkGatewayConnections(this); diff --git a/sdk/network/arm-network-profile-2020-09-01-hybrid/src/networkManagementClientContext.ts b/sdk/network/arm-network-profile-2020-09-01-hybrid/src/networkManagementClientContext.ts index f5b91c0455e5..01aecafce1fa 100644 --- a/sdk/network/arm-network-profile-2020-09-01-hybrid/src/networkManagementClientContext.ts +++ b/sdk/network/arm-network-profile-2020-09-01-hybrid/src/networkManagementClientContext.ts @@ -10,24 +10,30 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-network-profile-2020-09-01-hybrid"; -const packageVersion = "1.0.0"; +const packageVersion = "1.1.0"; export class NetworkManagementClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; apiVersion?: string; /** * Initializes a new instance of the NetworkManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The subscription credentials which uniquely identify the Microsoft Azure * subscription. The subscription ID forms part of the URI for every service call. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.NetworkManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.NetworkManagementClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } diff --git a/sdk/notificationhubs/arm-notificationhubs/README.md b/sdk/notificationhubs/arm-notificationhubs/README.md index a532f90ee1d2..40aee75f4c3f 100644 --- a/sdk/notificationhubs/arm-notificationhubs/README.md +++ b/sdk/notificationhubs/arm-notificationhubs/README.md @@ -1,89 +1,100 @@ ## Azure NotificationHubsManagementClient SDK for JavaScript -This package contains an isomorphic SDK for NotificationHubsManagementClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for NotificationHubsManagementClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites -``` -npm install @azure/arm-notificationhubs +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-notificationhubs` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: +```bash +npm install --save @azure/arm-notificationhubs @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - Authentication, client creation and list operations as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -``` -npm install @azure/ms-rest-nodeauth -``` +#### nodejs - Authentication, client creation, and list operations as an example written in JavaScript. ##### Sample code -```ts -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { NotificationHubsManagementClient, NotificationHubsManagementModels, NotificationHubsManagementMappers } from "@azure/arm-notificationhubs"; +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { NotificationHubsManagementClient } = require("@azure/arm-notificationhubs"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new NotificationHubsManagementClient(creds, subscriptionId); - client.operations.list().then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new NotificationHubsManagementClient(creds, subscriptionId); + +client.operations.list().then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and list operations as an example written in JavaScript. - -##### Install @azure/ms-rest-browserauth +#### browser - Authentication, client creation, and list operations as an example written in JavaScript. -``` -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-notificationhubs sample - - + @@ -95,5 +106,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fnotificationhubs%2Farm-notificationhubs%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/notificationhubs/arm-notificationhubs/README.png) diff --git a/sdk/notificationhubs/arm-notificationhubs/package.json b/sdk/notificationhubs/arm-notificationhubs/package.json index 0f31c8842534..ee33b14f8407 100644 --- a/sdk/notificationhubs/arm-notificationhubs/package.json +++ b/sdk/notificationhubs/arm-notificationhubs/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-notificationhubs", "author": "Microsoft Corporation", "description": "NotificationHubsManagementClient Library with typescript type definitions for node.js and browser.", - "version": "1.2.0", + "version": "1.3.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.1.0", - "@azure/ms-rest-js": "^1.1.0", + "@azure/ms-rest-azure-js": "^1.4.0", + "@azure/ms-rest-js": "^1.11.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.9.3" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/notificationHubsManagementClient.js", "types": "./esm/notificationHubsManagementClient.d.ts", "devDependencies": { - "typescript": "^3.1.1", + "typescript": "^3.6.0", "rollup": "^0.66.2", "rollup-plugin-node-resolve": "^3.4.0", "uglify-js": "^3.4.9" diff --git a/sdk/notificationhubs/arm-notificationhubs/src/notificationHubsManagementClient.ts b/sdk/notificationhubs/arm-notificationhubs/src/notificationHubsManagementClient.ts index 75528c3e49ed..fe54974b5635 100644 --- a/sdk/notificationhubs/arm-notificationhubs/src/notificationHubsManagementClient.ts +++ b/sdk/notificationhubs/arm-notificationhubs/src/notificationHubsManagementClient.ts @@ -9,6 +9,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -23,12 +24,17 @@ class NotificationHubsManagementClient extends NotificationHubsManagementClientC /** * Initializes a new instance of the NotificationHubsManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId Gets subscription credentials which uniquely identify Microsoft Azure * subscription. The subscription ID forms part of the URI for every service call. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.NotificationHubsManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.NotificationHubsManagementClientOptions) { super(credentials, subscriptionId, options); this.operations = new operations.Operations(this); this.namespaces = new operations.Namespaces(this); diff --git a/sdk/notificationhubs/arm-notificationhubs/src/notificationHubsManagementClientContext.ts b/sdk/notificationhubs/arm-notificationhubs/src/notificationHubsManagementClientContext.ts index 3b6d5b8e08bf..6f05e39cb6bd 100644 --- a/sdk/notificationhubs/arm-notificationhubs/src/notificationHubsManagementClientContext.ts +++ b/sdk/notificationhubs/arm-notificationhubs/src/notificationHubsManagementClientContext.ts @@ -10,24 +10,30 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-notificationhubs"; -const packageVersion = "0.1.0"; +const packageVersion = "1.3.0"; export class NotificationHubsManagementClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; apiVersion?: string; /** * Initializes a new instance of the NotificationHubsManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId Gets subscription credentials which uniquely identify Microsoft Azure * subscription. The subscription ID forms part of the URI for every service call. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.NotificationHubsManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.NotificationHubsManagementClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } diff --git a/sdk/operationalinsights/arm-operationalinsights/README.md b/sdk/operationalinsights/arm-operationalinsights/README.md index bf3a79c85aea..513d0855bfb6 100644 --- a/sdk/operationalinsights/arm-operationalinsights/README.md +++ b/sdk/operationalinsights/arm-operationalinsights/README.md @@ -1,93 +1,103 @@ ## Azure OperationalInsightsManagementClient SDK for JavaScript -This package contains an isomorphic SDK for OperationalInsightsManagementClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for OperationalInsightsManagementClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-operationalinsights` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: ```bash -npm install @azure/arm-operationalinsights +npm install --save @azure/arm-operationalinsights @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - client creation and listByWorkspace dataExports as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. -```bash -npm install @azure/ms-rest-nodeauth@"^3.0.0" -``` +#### nodejs - Authentication, client creation, and listByWorkspace dataExports as an example written in JavaScript. ##### Sample code -While the below sample uses the interactive login, other authentication options can be found in the [README.md file of @azure/ms-rest-nodeauth](https://www.npmjs.com/package/@azure/ms-rest-nodeauth) package -```typescript -const msRestNodeAuth = require("@azure/ms-rest-nodeauth"); +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); const { OperationalInsightsManagementClient } = require("@azure/arm-operationalinsights"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new OperationalInsightsManagementClient(creds, subscriptionId); - const resourceGroupName = "testresourceGroupName"; - const workspaceName = "testworkspaceName"; - client.dataExports.listByWorkspace(resourceGroupName, workspaceName).then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new OperationalInsightsManagementClient(creds, subscriptionId); +const resourceGroupName = "testresourceGroupName"; +const workspaceName = "testworkspaceName"; +client.dataExports.listByWorkspace(resourceGroupName, workspaceName).then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and listByWorkspace dataExports as an example written in JavaScript. +#### browser - Authentication, client creation, and listByWorkspace dataExports as an example written in JavaScript. -##### Install @azure/ms-rest-browserauth - -```bash -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-operationalinsights sample - - + diff --git a/sdk/operationalinsights/arm-operationalinsights/package.json b/sdk/operationalinsights/arm-operationalinsights/package.json index c1c039dcd080..89e2cd8ef7dc 100644 --- a/sdk/operationalinsights/arm-operationalinsights/package.json +++ b/sdk/operationalinsights/arm-operationalinsights/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-operationalinsights", "author": "Microsoft Corporation", "description": "OperationalInsightsManagementClient Library with typescript type definitions for node.js and browser.", - "version": "7.0.0", + "version": "7.1.0", "dependencies": { - "@azure/ms-rest-azure-js": "^2.0.1", - "@azure/ms-rest-js": "^2.0.4", + "@azure/ms-rest-azure-js": "^2.1.0", + "@azure/ms-rest-js": "^2.2.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.10.0" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/operationalInsightsManagementClient.js", "types": "./esm/operationalInsightsManagementClient.d.ts", "devDependencies": { - "typescript": "^3.5.3", + "typescript": "^3.6.0", "rollup": "^1.18.0", "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operationalInsightsManagementClient.ts b/sdk/operationalinsights/arm-operationalinsights/src/operationalInsightsManagementClient.ts index 0d6ac9045e4e..525b04c140bc 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/operationalInsightsManagementClient.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/operationalInsightsManagementClient.ts @@ -8,6 +8,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -39,11 +40,16 @@ class OperationalInsightsManagementClient extends OperationalInsightsManagementC /** * Initializes a new instance of the OperationalInsightsManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.OperationalInsightsManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.OperationalInsightsManagementClientOptions) { super(credentials, subscriptionId, options); this.dataExports = new operations.DataExports(this); this.dataSources = new operations.DataSources(this); diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operationalInsightsManagementClientContext.ts b/sdk/operationalinsights/arm-operationalinsights/src/operationalInsightsManagementClientContext.ts index fda0af09728d..1f39e7a95ac0 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/operationalInsightsManagementClientContext.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/operationalInsightsManagementClientContext.ts @@ -9,23 +9,29 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-operationalinsights"; -const packageVersion = "7.0.0"; +const packageVersion = "7.1.0"; export class OperationalInsightsManagementClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; apiVersion?: string; subscriptionId: string; /** * Initializes a new instance of the OperationalInsightsManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.OperationalInsightsManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.OperationalInsightsManagementClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } diff --git a/sdk/operationsmanagement/arm-operations/README.md b/sdk/operationsmanagement/arm-operations/README.md index b2c9efb3eecc..43f7f84ffe30 100644 --- a/sdk/operationsmanagement/arm-operations/README.md +++ b/sdk/operationsmanagement/arm-operations/README.md @@ -1,93 +1,103 @@ ## Azure OperationsManagementClient SDK for JavaScript -This package contains an isomorphic SDK for OperationsManagementClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for OperationsManagementClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites -``` -npm install @azure/arm-operations +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-operations` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: +```bash +npm install --save @azure/arm-operations @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - Authentication, client creation and get solutions as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -``` -npm install @azure/ms-rest-nodeauth -``` +#### nodejs - Authentication, client creation, and get solutions as an example written in JavaScript. ##### Sample code -```ts -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { OperationsManagementClient, OperationsManagementModels, OperationsManagementMappers } from "@azure/arm-operations"; +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { OperationsManagementClient } = require("@azure/arm-operations"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new OperationsManagementClient(creds, subscriptionId); - const resourceGroupName = "testresourceGroupName"; - const solutionName = "testsolutionName"; - client.solutions.get(resourceGroupName, solutionName).then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new OperationsManagementClient(creds, subscriptionId); +const resourceGroupName = "testresourceGroupName"; +const solutionName = "testsolutionName"; +client.solutions.get(resourceGroupName, solutionName).then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and get solutions as an example written in JavaScript. +#### browser - Authentication, client creation, and get solutions as an example written in JavaScript. -##### Install @azure/ms-rest-browserauth - -``` -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-operations sample - - + @@ -99,5 +109,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Foperationsmanagement%2Farm-operations%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/operationsmanagement/arm-operations/README.png) diff --git a/sdk/operationsmanagement/arm-operations/package.json b/sdk/operationsmanagement/arm-operations/package.json index 56e114a52dd6..b26129943ce8 100644 --- a/sdk/operationsmanagement/arm-operations/package.json +++ b/sdk/operationsmanagement/arm-operations/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-operations", "author": "Microsoft Corporation", "description": "OperationsManagementClient Library with typescript type definitions for node.js and browser.", - "version": "2.1.0", + "version": "2.2.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.1.0", - "@azure/ms-rest-js": "^1.1.0", + "@azure/ms-rest-azure-js": "^1.4.0", + "@azure/ms-rest-js": "^1.11.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.9.3" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/operationsManagementClient.js", "types": "./esm/operationsManagementClient.d.ts", "devDependencies": { - "typescript": "^3.1.1", + "typescript": "^3.6.0", "rollup": "^0.66.2", "rollup-plugin-node-resolve": "^3.4.0", "uglify-js": "^3.4.9" diff --git a/sdk/operationsmanagement/arm-operations/src/operationsManagementClient.ts b/sdk/operationsmanagement/arm-operations/src/operationsManagementClient.ts index cc22a452f329..9097e6a74ebb 100644 --- a/sdk/operationsmanagement/arm-operations/src/operationsManagementClient.ts +++ b/sdk/operationsmanagement/arm-operations/src/operationsManagementClient.ts @@ -9,6 +9,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -24,7 +25,12 @@ class OperationsManagementClient extends OperationsManagementClientContext { /** * Initializes a new instance of the OperationsManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId Gets subscription credentials which uniquely identify Microsoft Azure * subscription. The subscription ID forms part of the URI for every service call. * @param providerName Provider name for the parent resource. @@ -32,7 +38,7 @@ class OperationsManagementClient extends OperationsManagementClientContext { * @param resourceName Parent resource name. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, providerName: string, resourceType: string, resourceName: string, options?: Models.OperationsManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, providerName: string, resourceType: string, resourceName: string, options?: Models.OperationsManagementClientOptions) { super(credentials, subscriptionId, providerName, resourceType, resourceName, options); this.solutions = new operations.Solutions(this); this.managementAssociations = new operations.ManagementAssociations(this); diff --git a/sdk/operationsmanagement/arm-operations/src/operationsManagementClientContext.ts b/sdk/operationsmanagement/arm-operations/src/operationsManagementClientContext.ts index 9902f9b551f6..54f7c62ac6d4 100644 --- a/sdk/operationsmanagement/arm-operations/src/operationsManagementClientContext.ts +++ b/sdk/operationsmanagement/arm-operations/src/operationsManagementClientContext.ts @@ -10,13 +10,14 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-operations"; -const packageVersion = "0.1.0"; +const packageVersion = "2.2.0"; export class OperationsManagementClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; apiVersion?: string; providerName: string; @@ -25,7 +26,12 @@ export class OperationsManagementClientContext extends msRestAzure.AzureServiceC /** * Initializes a new instance of the OperationsManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId Gets subscription credentials which uniquely identify Microsoft Azure * subscription. The subscription ID forms part of the URI for every service call. * @param providerName Provider name for the parent resource. @@ -33,7 +39,7 @@ export class OperationsManagementClientContext extends msRestAzure.AzureServiceC * @param resourceName Parent resource name. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, providerName: string, resourceType: string, resourceName: string, options?: Models.OperationsManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, providerName: string, resourceType: string, resourceName: string, options?: Models.OperationsManagementClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } From b79e5072d253cfee9c5c9f45eb26ffac5d8f96b0 Mon Sep 17 00:00:00 2001 From: colawwj <70128817+colawwj@users.noreply.github.com> Date: Thu, 8 Jul 2021 09:07:42 +0800 Subject: [PATCH 09/28] identity support 50 (#16256) --- sdk/peering/arm-peering/README.md | 113 +++++++++-------- sdk/peering/arm-peering/package.json | 9 +- .../src/peeringManagementClient.ts | 10 +- .../src/peeringManagementClientContext.ts | 14 ++- .../README.md | 107 ++++++++-------- .../package.json | 9 +- .../src/policyClient.ts | 10 +- .../src/policyClientContext.ts | 14 ++- .../README.md | 109 ++++++++-------- .../package.json | 9 +- .../src/policyClient.ts | 10 +- .../src/policyClientContext.ts | 14 ++- sdk/policy/arm-policy/README.md | 117 +++++++++--------- sdk/policy/arm-policy/package.json | 9 +- sdk/policy/arm-policy/src/policyClient.ts | 10 +- .../arm-policy/src/policyClientContext.ts | 14 ++- .../arm-policyinsights/README.md | 112 +++++++++-------- .../arm-policyinsights/package.json | 9 +- .../src/policyInsightsClient.ts | 10 +- .../src/policyInsightsClientContext.ts | 14 ++- sdk/postgresql/arm-postgresql/README.md | 108 ++++++++-------- sdk/postgresql/arm-postgresql/package.json | 9 +- .../src/postgreSQLManagementClient.ts | 10 +- .../src/postgreSQLManagementClientContext.ts | 14 ++- .../arm-powerbidedicated/README.md | 111 +++++++++-------- .../arm-powerbidedicated/package.json | 9 +- .../src/powerBIDedicatedManagementClient.ts | 10 +- ...powerBIDedicatedManagementClientContext.ts | 14 ++- .../arm-powerbiembedded/README.md | 115 +++++++++-------- .../arm-powerbiembedded/package.json | 9 +- .../src/powerBIEmbeddedManagementClient.ts | 10 +- .../powerBIEmbeddedManagementClientContext.ts | 14 ++- sdk/privatedns/arm-privatedns/README.md | 111 +++++++++-------- sdk/privatedns/arm-privatedns/package.json | 9 +- .../src/privateDnsManagementClient.ts | 10 +- .../src/privateDnsManagementClientContext.ts | 14 ++- 36 files changed, 746 insertions(+), 554 deletions(-) diff --git a/sdk/peering/arm-peering/README.md b/sdk/peering/arm-peering/README.md index 8cfb0a190945..6386ca12a1da 100644 --- a/sdk/peering/arm-peering/README.md +++ b/sdk/peering/arm-peering/README.md @@ -1,94 +1,103 @@ ## Azure PeeringManagementClient SDK for JavaScript -This package contains an isomorphic SDK for PeeringManagementClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for PeeringManagementClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-peering` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: ```bash -npm install @azure/arm-peering +npm install --save @azure/arm-peering @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - Authentication, client creation and list legacyPeerings as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. -```bash -npm install @azure/ms-rest-nodeauth@"^3.0.0" -``` +#### nodejs - Authentication, client creation, and list legacyPeerings as an example written in JavaScript. ##### Sample code -```typescript -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { PeeringManagementClient, PeeringManagementModels, PeeringManagementMappers } from "@azure/arm-peering"; +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { PeeringManagementClient } = require("@azure/arm-peering"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new PeeringManagementClient(creds, subscriptionId); - const peeringLocation = "testpeeringLocation"; - const kind = "Direct"; - client.legacyPeerings.list(peeringLocation, kind).then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new PeeringManagementClient(creds, subscriptionId); +const peeringLocation = "testpeeringLocation"; +const kind = "Direct"; +client.legacyPeerings.list(peeringLocation, kind).then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and list legacyPeerings as an example written in JavaScript. +#### browser - Authentication, client creation, and list legacyPeerings as an example written in JavaScript. -##### Install @azure/ms-rest-browserauth - -```bash -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-peering sample - - + @@ -100,4 +109,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fpeering%2Farm-peering%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/peering/arm-peering/README.png) diff --git a/sdk/peering/arm-peering/package.json b/sdk/peering/arm-peering/package.json index c7c2b7e47341..5b286fc9c531 100644 --- a/sdk/peering/arm-peering/package.json +++ b/sdk/peering/arm-peering/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-peering", "author": "Microsoft Corporation", "description": "PeeringManagementClient Library with typescript type definitions for node.js and browser.", - "version": "1.0.0", + "version": "1.1.0", "dependencies": { - "@azure/ms-rest-azure-js": "^2.0.1", - "@azure/ms-rest-js": "^2.0.4", + "@azure/ms-rest-azure-js": "^2.1.0", + "@azure/ms-rest-js": "^2.2.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.10.0" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/peeringManagementClient.js", "types": "./esm/peeringManagementClient.d.ts", "devDependencies": { - "typescript": "^3.5.3", + "typescript": "^3.6.0", "rollup": "^1.18.0", "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", diff --git a/sdk/peering/arm-peering/src/peeringManagementClient.ts b/sdk/peering/arm-peering/src/peeringManagementClient.ts index bacf9dc4aabe..3fa8f9805ac7 100644 --- a/sdk/peering/arm-peering/src/peeringManagementClient.ts +++ b/sdk/peering/arm-peering/src/peeringManagementClient.ts @@ -9,6 +9,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as Parameters from "./models/parameters"; @@ -31,11 +32,16 @@ class PeeringManagementClient extends PeeringManagementClientContext { /** * Initializes a new instance of the PeeringManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The Azure subscription ID. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.PeeringManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.PeeringManagementClientOptions) { super(credentials, subscriptionId, options); this.legacyPeerings = new operations.LegacyPeerings(this); this.operations = new operations.Operations(this); diff --git a/sdk/peering/arm-peering/src/peeringManagementClientContext.ts b/sdk/peering/arm-peering/src/peeringManagementClientContext.ts index 33fd6ae85bd7..ff6b10566b38 100644 --- a/sdk/peering/arm-peering/src/peeringManagementClientContext.ts +++ b/sdk/peering/arm-peering/src/peeringManagementClientContext.ts @@ -10,23 +10,29 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-peering"; -const packageVersion = "1.0.0"; +const packageVersion = "1.1.0"; export class PeeringManagementClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; apiVersion?: string; /** * Initializes a new instance of the PeeringManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The Azure subscription ID. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.PeeringManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.PeeringManagementClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } diff --git a/sdk/policy/arm-policy-profile-2020-09-01-hybrid/README.md b/sdk/policy/arm-policy-profile-2020-09-01-hybrid/README.md index 277e5ca69bd8..d18fc2ab80ea 100644 --- a/sdk/policy/arm-policy-profile-2020-09-01-hybrid/README.md +++ b/sdk/policy/arm-policy-profile-2020-09-01-hybrid/README.md @@ -1,92 +1,101 @@ ## Azure PolicyClient SDK for JavaScript -This package contains an isomorphic SDK for PolicyClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for PolicyClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-policy-profile-2020-09-01-hybrid` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: ```bash -npm install @azure/arm-policy-profile-2020-09-01-hybrid +npm install --save @azure/arm-policy-profile-2020-09-01-hybrid @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - Authentication, client creation and get policyDefinitions as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. -```bash -npm install @azure/ms-rest-nodeauth@"^3.0.0" -``` +#### nodejs - Authentication, client creation, and get policyDefinitions as an example written in JavaScript. ##### Sample code -```typescript -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { PolicyClient, PolicyModels, PolicyMappers } from "@azure/arm-policy-profile-2020-09-01-hybrid"; +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { PolicyClient } = require("@azure/arm-policy-profile-2020-09-01-hybrid"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new PolicyClient(creds, subscriptionId); - const policyDefinitionName = "testpolicyDefinitionName"; - client.policyDefinitions.get(policyDefinitionName).then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new PolicyClient(creds, subscriptionId); +const policyDefinitionName = "testpolicyDefinitionName"; +client.policyDefinitions.get(policyDefinitionName).then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and get policyDefinitions as an example written in JavaScript. +#### browser - Authentication, client creation, and get policyDefinitions as an example written in JavaScript. -##### Install @azure/ms-rest-browserauth - -```bash -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-policy-profile-2020-09-01-hybrid sample - - + diff --git a/sdk/policy/arm-policy-profile-2020-09-01-hybrid/package.json b/sdk/policy/arm-policy-profile-2020-09-01-hybrid/package.json index fe686de1fc7b..b1c67c0499f9 100644 --- a/sdk/policy/arm-policy-profile-2020-09-01-hybrid/package.json +++ b/sdk/policy/arm-policy-profile-2020-09-01-hybrid/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-policy-profile-2020-09-01-hybrid", "author": "Microsoft Corporation", "description": "PolicyClient Library with typescript type definitions for node.js and browser.", - "version": "1.0.0", + "version": "1.1.0", "dependencies": { - "@azure/ms-rest-azure-js": "^2.0.1", - "@azure/ms-rest-js": "^2.0.4", + "@azure/ms-rest-azure-js": "^2.1.0", + "@azure/ms-rest-js": "^2.2.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.10.0" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/policyClient.js", "types": "./esm/policyClient.d.ts", "devDependencies": { - "typescript": "^3.5.3", + "typescript": "^3.6.0", "rollup": "^1.18.0", "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", diff --git a/sdk/policy/arm-policy-profile-2020-09-01-hybrid/src/policyClient.ts b/sdk/policy/arm-policy-profile-2020-09-01-hybrid/src/policyClient.ts index 4a9606c77342..7891583c1cc0 100644 --- a/sdk/policy/arm-policy-profile-2020-09-01-hybrid/src/policyClient.ts +++ b/sdk/policy/arm-policy-profile-2020-09-01-hybrid/src/policyClient.ts @@ -9,6 +9,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -22,11 +23,16 @@ class PolicyClient extends PolicyClientContext { /** * Initializes a new instance of the PolicyClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.PolicyClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.PolicyClientOptions) { super(credentials, subscriptionId, options); this.policyDefinitions = new operations.PolicyDefinitions(this); this.policyAssignments = new operations.PolicyAssignments(this); diff --git a/sdk/policy/arm-policy-profile-2020-09-01-hybrid/src/policyClientContext.ts b/sdk/policy/arm-policy-profile-2020-09-01-hybrid/src/policyClientContext.ts index 1982defbe797..9fe09efcdebd 100644 --- a/sdk/policy/arm-policy-profile-2020-09-01-hybrid/src/policyClientContext.ts +++ b/sdk/policy/arm-policy-profile-2020-09-01-hybrid/src/policyClientContext.ts @@ -10,23 +10,29 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-policy-profile-2020-09-01-hybrid"; -const packageVersion = "1.0.0"; +const packageVersion = "1.1.0"; export class PolicyClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; apiVersion?: string; /** * Initializes a new instance of the PolicyClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.PolicyClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.PolicyClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } diff --git a/sdk/policy/arm-policy-profile-hybrid-2019-03-01/README.md b/sdk/policy/arm-policy-profile-hybrid-2019-03-01/README.md index 59229a76dfa7..88dd09df65aa 100644 --- a/sdk/policy/arm-policy-profile-hybrid-2019-03-01/README.md +++ b/sdk/policy/arm-policy-profile-hybrid-2019-03-01/README.md @@ -1,91 +1,101 @@ ## Azure PolicyClient SDK for JavaScript -This package contains an isomorphic SDK for PolicyClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for PolicyClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-policy-profile-hybrid-2019-03-01` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: ```bash -npm install @azure/arm-policy-profile-hybrid-2019-03-01 +npm install --save @azure/arm-policy-profile-hybrid-2019-03-01 @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - Authentication, client creation and get policyDefinitions as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -```bash -npm install @azure/ms-rest-nodeauth -``` +#### nodejs - Authentication, client creation, and get policyDefinitions as an example written in JavaScript. ##### Sample code -```typescript -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { PolicyClient, PolicyModels, PolicyMappers } from "@azure/arm-policy-profile-hybrid-2019-03-01"; +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { PolicyClient } = require("@azure/arm-policy-profile-hybrid-2019-03-01"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new PolicyClient(creds, subscriptionId); - const policyDefinitionName = "testpolicyDefinitionName"; - client.policyDefinitions.get(policyDefinitionName).then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new PolicyClient(creds, subscriptionId); +const policyDefinitionName = "testpolicyDefinitionName"; +client.policyDefinitions.get(policyDefinitionName).then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and get policyDefinitions as an example written in JavaScript. +#### browser - Authentication, client creation, and get policyDefinitions as an example written in JavaScript. -##### Install @azure/ms-rest-browserauth - -```bash -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-policy-profile-hybrid-2019-03-01 sample - - + @@ -97,5 +107,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fpolicy%2Farm-policy-profile-hybrid-2019-03-01%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/policy/arm-policy-profile-hybrid-2019-03-01/README.png) diff --git a/sdk/policy/arm-policy-profile-hybrid-2019-03-01/package.json b/sdk/policy/arm-policy-profile-hybrid-2019-03-01/package.json index 712ae64221a3..ded049860523 100644 --- a/sdk/policy/arm-policy-profile-hybrid-2019-03-01/package.json +++ b/sdk/policy/arm-policy-profile-hybrid-2019-03-01/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-policy-profile-hybrid-2019-03-01", "author": "Microsoft Corporation", "description": "PolicyClient Library with typescript type definitions for node.js and browser.", - "version": "1.0.0", + "version": "1.1.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.3.2", - "@azure/ms-rest-js": "^1.8.1", + "@azure/ms-rest-azure-js": "^1.4.0", + "@azure/ms-rest-js": "^1.11.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.9.3" }, "keywords": [ @@ -21,7 +22,7 @@ "module": "./esm/policyClient.js", "types": "./esm/policyClient.d.ts", "devDependencies": { - "typescript": "^3.1.1", + "typescript": "^3.6.0", "rollup": "^0.66.2", "rollup-plugin-node-resolve": "^3.4.0", "rollup-plugin-sourcemaps": "^0.4.2", diff --git a/sdk/policy/arm-policy-profile-hybrid-2019-03-01/src/policyClient.ts b/sdk/policy/arm-policy-profile-hybrid-2019-03-01/src/policyClient.ts index 4a9606c77342..7891583c1cc0 100644 --- a/sdk/policy/arm-policy-profile-hybrid-2019-03-01/src/policyClient.ts +++ b/sdk/policy/arm-policy-profile-hybrid-2019-03-01/src/policyClient.ts @@ -9,6 +9,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -22,11 +23,16 @@ class PolicyClient extends PolicyClientContext { /** * Initializes a new instance of the PolicyClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.PolicyClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.PolicyClientOptions) { super(credentials, subscriptionId, options); this.policyDefinitions = new operations.PolicyDefinitions(this); this.policyAssignments = new operations.PolicyAssignments(this); diff --git a/sdk/policy/arm-policy-profile-hybrid-2019-03-01/src/policyClientContext.ts b/sdk/policy/arm-policy-profile-hybrid-2019-03-01/src/policyClientContext.ts index 5e2d978a2a8b..1b8ccc0ee7e9 100644 --- a/sdk/policy/arm-policy-profile-hybrid-2019-03-01/src/policyClientContext.ts +++ b/sdk/policy/arm-policy-profile-hybrid-2019-03-01/src/policyClientContext.ts @@ -10,23 +10,29 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-policy-profile-hybrid-2019-03-01"; -const packageVersion = "1.0.0"; +const packageVersion = "1.1.0"; export class PolicyClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; apiVersion?: string; /** * Initializes a new instance of the PolicyClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.PolicyClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.PolicyClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } diff --git a/sdk/policy/arm-policy/README.md b/sdk/policy/arm-policy/README.md index ff6733dd79fd..e981a8c714fe 100644 --- a/sdk/policy/arm-policy/README.md +++ b/sdk/policy/arm-policy/README.md @@ -1,66 +1,74 @@ ## Azure PolicyClient SDK for JavaScript -This package contains an isomorphic SDK for PolicyClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for PolicyClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-policy` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: ```bash -npm install @azure/arm-policy +npm install --save @azure/arm-policy @azure/identity ``` -### How to use +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. -#### nodejs - client creation and getByPolicyMode dataPolicyManifests as an example written in TypeScript. +### How to use -##### Install @azure/ms-rest-nodeauth +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -```bash -npm install @azure/ms-rest-nodeauth@"^3.0.0" -``` +#### nodejs - Authentication, client creation, and getByPolicyMode dataPolicyManifests as an example written in JavaScript. ##### Sample code -While the below sample uses the interactive login, other authentication options can be found in the [README.md file of @azure/ms-rest-nodeauth](https://www.npmjs.com/package/@azure/ms-rest-nodeauth) package - -```typescript -const msRestNodeAuth = require("@azure/ms-rest-nodeauth"); +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); const { PolicyClient } = require("@azure/arm-policy"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth - .interactiveLogin() - .then((creds) => { - const client = new PolicyClient(creds, subscriptionId); - const policyMode = "testpolicyMode"; - client.dataPolicyManifests.getByPolicyMode(policyMode).then((result) => { - console.log("The result is:"); - console.log(result); - }); - }) - .catch((err) => { - console.error(err); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new PolicyClient(creds, subscriptionId); +const policyMode = "testpolicyMode"; +client.dataPolicyManifests.getByPolicyMode(policyMode).then((result) => { + console.log("The result is:"); + console.log(result); +}).catch((err) => { + console.log("An error occurred:"); + console.error(err); +}); ``` -#### browser - Authentication, client creation and getByPolicyMode dataPolicyManifests as an example written in JavaScript. - -##### Install @azure/ms-rest-browserauth +#### browser - Authentication, client creation, and getByPolicyMode dataPolicyManifests as an example written in JavaScript. -```bash -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html ```html @@ -68,33 +76,26 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to @azure/arm-policy sample - - + diff --git a/sdk/policy/arm-policy/package.json b/sdk/policy/arm-policy/package.json index e6934d947760..a5e321b7a066 100644 --- a/sdk/policy/arm-policy/package.json +++ b/sdk/policy/arm-policy/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-policy", "author": "Microsoft Corporation", "description": "PolicyClient Library with typescript type definitions for node.js and browser.", - "version": "4.0.0", + "version": "4.1.0", "dependencies": { - "@azure/ms-rest-azure-js": "^2.0.1", - "@azure/ms-rest-js": "^2.0.4", + "@azure/ms-rest-azure-js": "^2.1.0", + "@azure/ms-rest-js": "^2.2.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.10.0" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/policyClient.js", "types": "./esm/policyClient.d.ts", "devDependencies": { - "typescript": "^3.5.3", + "typescript": "^3.6.0", "rollup": "^1.18.0", "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", diff --git a/sdk/policy/arm-policy/src/policyClient.ts b/sdk/policy/arm-policy/src/policyClient.ts index 4b800b476a99..32b3a1885e4d 100644 --- a/sdk/policy/arm-policy/src/policyClient.ts +++ b/sdk/policy/arm-policy/src/policyClient.ts @@ -8,6 +8,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -23,12 +24,17 @@ class PolicyClient extends PolicyClientContext { /** * Initializes a new instance of the PolicyClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ constructor( - credentials: msRest.ServiceClientCredentials, + credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.PolicyClientOptions ) { diff --git a/sdk/policy/arm-policy/src/policyClientContext.ts b/sdk/policy/arm-policy/src/policyClientContext.ts index 2b09789e656d..eabd70d6762d 100644 --- a/sdk/policy/arm-policy/src/policyClientContext.ts +++ b/sdk/policy/arm-policy/src/policyClientContext.ts @@ -9,23 +9,29 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-policy"; -const packageVersion = "4.0.0"; +const packageVersion = "4.1.0"; export class PolicyClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; /** * Initializes a new instance of the PolicyClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ constructor( - credentials: msRest.ServiceClientCredentials, + credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.PolicyClientOptions ) { diff --git a/sdk/policyinsights/arm-policyinsights/README.md b/sdk/policyinsights/arm-policyinsights/README.md index 6e4136a878bc..b87eda5db0db 100644 --- a/sdk/policyinsights/arm-policyinsights/README.md +++ b/sdk/policyinsights/arm-policyinsights/README.md @@ -1,95 +1,105 @@ ## Azure PolicyInsightsClient SDK for JavaScript -This package contains an isomorphic SDK for PolicyInsightsClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for PolicyInsightsClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-policyinsights` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: ```bash -npm install @azure/arm-policyinsights +npm install --save @azure/arm-policyinsights @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - client creation and listForManagementGroup remediations as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. -```bash -npm install @azure/ms-rest-nodeauth@"^3.0.0" -``` +#### nodejs - Authentication, client creation, and listForManagementGroup remediations as an example written in JavaScript. ##### Sample code -While the below sample uses the interactive login, other authentication options can be found in the [README.md file of @azure/ms-rest-nodeauth](https://www.npmjs.com/package/@azure/ms-rest-nodeauth) package -```typescript -const msRestNodeAuth = require("@azure/ms-rest-nodeauth"); +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); const { PolicyInsightsClient } = require("@azure/arm-policyinsights"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new PolicyInsightsClient(creds, subscriptionId); - const managementGroupId = "testmanagementGroupId"; - const top = 1; - const filter = "testfilter"; - client.remediations.listForManagementGroup(managementGroupId, top, filter).then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new PolicyInsightsClient(creds, subscriptionId); +const managementGroupId = "testmanagementGroupId"; +const top = 1; +const filter = "testfilter"; +client.remediations.listForManagementGroup(managementGroupId, top, filter).then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and listForManagementGroup remediations as an example written in JavaScript. +#### browser - Authentication, client creation, and listForManagementGroup remediations as an example written in JavaScript. -##### Install @azure/ms-rest-browserauth - -```bash -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-policyinsights sample - - + diff --git a/sdk/policyinsights/arm-policyinsights/package.json b/sdk/policyinsights/arm-policyinsights/package.json index 2d1a254b3b14..1e38d23a0c44 100644 --- a/sdk/policyinsights/arm-policyinsights/package.json +++ b/sdk/policyinsights/arm-policyinsights/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-policyinsights", "author": "Microsoft Corporation", "description": "PolicyInsightsClient Library with typescript type definitions for node.js and browser.", - "version": "4.0.0", + "version": "4.1.0", "dependencies": { - "@azure/ms-rest-azure-js": "^2.0.1", - "@azure/ms-rest-js": "^2.0.4", + "@azure/ms-rest-azure-js": "^2.1.0", + "@azure/ms-rest-js": "^2.2.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.10.0" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/policyInsightsClient.js", "types": "./esm/policyInsightsClient.d.ts", "devDependencies": { - "typescript": "^3.5.3", + "typescript": "^3.6.0", "rollup": "^1.18.0", "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", diff --git a/sdk/policyinsights/arm-policyinsights/src/policyInsightsClient.ts b/sdk/policyinsights/arm-policyinsights/src/policyInsightsClient.ts index 9a6e23996468..436f5db2eacb 100644 --- a/sdk/policyinsights/arm-policyinsights/src/policyInsightsClient.ts +++ b/sdk/policyinsights/arm-policyinsights/src/policyInsightsClient.ts @@ -8,6 +8,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -25,10 +26,15 @@ class PolicyInsightsClient extends PolicyInsightsClientContext { /** * Initializes a new instance of the PolicyInsightsClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, options?: Models.PolicyInsightsClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, options?: Models.PolicyInsightsClientOptions) { super(credentials, options); this.policyTrackedResources = new operations.PolicyTrackedResources(this); this.remediations = new operations.Remediations(this); diff --git a/sdk/policyinsights/arm-policyinsights/src/policyInsightsClientContext.ts b/sdk/policyinsights/arm-policyinsights/src/policyInsightsClientContext.ts index 8598034d32f8..f516548cf64e 100644 --- a/sdk/policyinsights/arm-policyinsights/src/policyInsightsClientContext.ts +++ b/sdk/policyinsights/arm-policyinsights/src/policyInsightsClientContext.ts @@ -9,20 +9,26 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-policyinsights"; -const packageVersion = "4.0.0"; +const packageVersion = "4.1.0"; export class PolicyInsightsClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; /** * Initializes a new instance of the PolicyInsightsClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, options?: Models.PolicyInsightsClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, options?: Models.PolicyInsightsClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } diff --git a/sdk/postgresql/arm-postgresql/README.md b/sdk/postgresql/arm-postgresql/README.md index 4894053e5749..70ce548880f8 100644 --- a/sdk/postgresql/arm-postgresql/README.md +++ b/sdk/postgresql/arm-postgresql/README.md @@ -1,93 +1,103 @@ ## Azure PostgreSQLManagementClient SDK for JavaScript -This package contains an isomorphic SDK for PostgreSQLManagementClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for PostgreSQLManagementClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-postgresql` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: ```bash -npm install @azure/arm-postgresql +npm install --save @azure/arm-postgresql @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - client creation and get servers as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. -```bash -npm install @azure/ms-rest-nodeauth@"^3.0.0" -``` +#### nodejs - Authentication, client creation, and get servers as an example written in JavaScript. ##### Sample code -While the below sample uses the interactive login, other authentication options can be found in the [README.md file of @azure/ms-rest-nodeauth](https://www.npmjs.com/package/@azure/ms-rest-nodeauth) package -```typescript -const msRestNodeAuth = require("@azure/ms-rest-nodeauth"); +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); const { PostgreSQLManagementClient } = require("@azure/arm-postgresql"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new PostgreSQLManagementClient(creds, subscriptionId); - const resourceGroupName = "testresourceGroupName"; - const serverName = "testserverName"; - client.servers.get(resourceGroupName, serverName).then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new PostgreSQLManagementClient(creds, subscriptionId); +const resourceGroupName = "testresourceGroupName"; +const serverName = "testserverName"; +client.servers.get(resourceGroupName, serverName).then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and get servers as an example written in JavaScript. +#### browser - Authentication, client creation, and get servers as an example written in JavaScript. -##### Install @azure/ms-rest-browserauth - -```bash -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-postgresql sample - - + diff --git a/sdk/postgresql/arm-postgresql/package.json b/sdk/postgresql/arm-postgresql/package.json index 985360d5fddb..2d8d44c2fba5 100644 --- a/sdk/postgresql/arm-postgresql/package.json +++ b/sdk/postgresql/arm-postgresql/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-postgresql", "author": "Microsoft Corporation", "description": "PostgreSQLManagementClient Library with typescript type definitions for node.js and browser.", - "version": "5.0.0", + "version": "5.1.0", "dependencies": { - "@azure/ms-rest-azure-js": "^2.0.1", - "@azure/ms-rest-js": "^2.0.4", + "@azure/ms-rest-azure-js": "^2.1.0", + "@azure/ms-rest-js": "^2.2.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.10.0" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/postgreSQLManagementClient.js", "types": "./esm/postgreSQLManagementClient.d.ts", "devDependencies": { - "typescript": "^3.5.3", + "typescript": "^3.6.0", "rollup": "^1.18.0", "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", diff --git a/sdk/postgresql/arm-postgresql/src/postgreSQLManagementClient.ts b/sdk/postgresql/arm-postgresql/src/postgreSQLManagementClient.ts index 3ce93955ee2c..6d38dc58f05b 100644 --- a/sdk/postgresql/arm-postgresql/src/postgreSQLManagementClient.ts +++ b/sdk/postgresql/arm-postgresql/src/postgreSQLManagementClient.ts @@ -8,6 +8,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -37,11 +38,16 @@ class PostgreSQLManagementClient extends PostgreSQLManagementClientContext { /** * Initializes a new instance of the PostgreSQLManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.PostgreSQLManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.PostgreSQLManagementClientOptions) { super(credentials, subscriptionId, options); this.servers = new operations.Servers(this); this.replicas = new operations.Replicas(this); diff --git a/sdk/postgresql/arm-postgresql/src/postgreSQLManagementClientContext.ts b/sdk/postgresql/arm-postgresql/src/postgreSQLManagementClientContext.ts index 7d2c5bb72738..63ae6996dc86 100644 --- a/sdk/postgresql/arm-postgresql/src/postgreSQLManagementClientContext.ts +++ b/sdk/postgresql/arm-postgresql/src/postgreSQLManagementClientContext.ts @@ -9,22 +9,28 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-postgresql"; -const packageVersion = "5.0.0"; +const packageVersion = "5.1.0"; export class PostgreSQLManagementClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; /** * Initializes a new instance of the PostgreSQLManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.PostgreSQLManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.PostgreSQLManagementClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } diff --git a/sdk/powerbidedicated/arm-powerbidedicated/README.md b/sdk/powerbidedicated/arm-powerbidedicated/README.md index e213b7d8b506..350863bc9ba0 100644 --- a/sdk/powerbidedicated/arm-powerbidedicated/README.md +++ b/sdk/powerbidedicated/arm-powerbidedicated/README.md @@ -1,94 +1,103 @@ ## Azure PowerBIDedicatedManagementClient SDK for JavaScript -This package contains an isomorphic SDK for PowerBIDedicatedManagementClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for PowerBIDedicatedManagementClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-powerbidedicated` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: ```bash -npm install @azure/arm-powerbidedicated +npm install --save @azure/arm-powerbidedicated @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - Authentication, client creation and getDetails capacities as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. -```bash -npm install @azure/ms-rest-nodeauth@"^3.0.0" -``` +#### nodejs - Authentication, client creation, and getDetails capacities as an example written in JavaScript. ##### Sample code -```typescript -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { PowerBIDedicatedManagementClient, PowerBIDedicatedManagementModels, PowerBIDedicatedManagementMappers } from "@azure/arm-powerbidedicated"; +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { PowerBIDedicatedManagementClient } = require("@azure/arm-powerbidedicated"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new PowerBIDedicatedManagementClient(creds, subscriptionId); - const resourceGroupName = "testresourceGroupName"; - const dedicatedCapacityName = "testdedicatedCapacityName"; - client.capacities.getDetails(resourceGroupName, dedicatedCapacityName).then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new PowerBIDedicatedManagementClient(creds, subscriptionId); +const resourceGroupName = "testresourceGroupName"; +const dedicatedCapacityName = "testdedicatedCapacityName"; +client.capacities.getDetails(resourceGroupName, dedicatedCapacityName).then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and getDetails capacities as an example written in JavaScript. +#### browser - Authentication, client creation, and getDetails capacities as an example written in JavaScript. -##### Install @azure/ms-rest-browserauth - -```bash -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-powerbidedicated sample - - + diff --git a/sdk/powerbidedicated/arm-powerbidedicated/package.json b/sdk/powerbidedicated/arm-powerbidedicated/package.json index e9e3e8b3365b..4dc75966af4b 100644 --- a/sdk/powerbidedicated/arm-powerbidedicated/package.json +++ b/sdk/powerbidedicated/arm-powerbidedicated/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-powerbidedicated", "author": "Microsoft Corporation", "description": "PowerBIDedicatedManagementClient Library with typescript type definitions for node.js and browser.", - "version": "2.0.0", + "version": "2.1.0", "dependencies": { - "@azure/ms-rest-azure-js": "^2.0.1", - "@azure/ms-rest-js": "^2.0.4", + "@azure/ms-rest-azure-js": "^2.1.0", + "@azure/ms-rest-js": "^2.2.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.10.0" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/powerBIDedicatedManagementClient.js", "types": "./esm/powerBIDedicatedManagementClient.d.ts", "devDependencies": { - "typescript": "^3.5.3", + "typescript": "^3.6.0", "rollup": "^1.18.0", "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", diff --git a/sdk/powerbidedicated/arm-powerbidedicated/src/powerBIDedicatedManagementClient.ts b/sdk/powerbidedicated/arm-powerbidedicated/src/powerBIDedicatedManagementClient.ts index 33c72336bac6..eb7fcf046832 100644 --- a/sdk/powerbidedicated/arm-powerbidedicated/src/powerBIDedicatedManagementClient.ts +++ b/sdk/powerbidedicated/arm-powerbidedicated/src/powerBIDedicatedManagementClient.ts @@ -9,6 +9,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -22,12 +23,17 @@ class PowerBIDedicatedManagementClient extends PowerBIDedicatedManagementClientC /** * Initializes a new instance of the PowerBIDedicatedManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId A unique identifier for a Microsoft Azure subscription. The subscription * ID forms part of the URI for every service call. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.PowerBIDedicatedManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.PowerBIDedicatedManagementClientOptions) { super(credentials, subscriptionId, options); this.capacities = new operations.Capacities(this); this.operations = new operations.Operations(this); diff --git a/sdk/powerbidedicated/arm-powerbidedicated/src/powerBIDedicatedManagementClientContext.ts b/sdk/powerbidedicated/arm-powerbidedicated/src/powerBIDedicatedManagementClientContext.ts index 8c2c324a10d1..0a9f748e5175 100644 --- a/sdk/powerbidedicated/arm-powerbidedicated/src/powerBIDedicatedManagementClientContext.ts +++ b/sdk/powerbidedicated/arm-powerbidedicated/src/powerBIDedicatedManagementClientContext.ts @@ -10,24 +10,30 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-powerbidedicated"; -const packageVersion = "2.0.0"; +const packageVersion = "2.1.0"; export class PowerBIDedicatedManagementClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; apiVersion?: string; /** * Initializes a new instance of the PowerBIDedicatedManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId A unique identifier for a Microsoft Azure subscription. The subscription * ID forms part of the URI for every service call. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.PowerBIDedicatedManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.PowerBIDedicatedManagementClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } diff --git a/sdk/powerbiembedded/arm-powerbiembedded/README.md b/sdk/powerbiembedded/arm-powerbiembedded/README.md index 9213827f768a..ac3cb55a27d4 100644 --- a/sdk/powerbiembedded/arm-powerbiembedded/README.md +++ b/sdk/powerbiembedded/arm-powerbiembedded/README.md @@ -1,93 +1,103 @@ ## Azure PowerBIEmbeddedManagementClient SDK for JavaScript -This package contains an isomorphic SDK for PowerBIEmbeddedManagementClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for PowerBIEmbeddedManagementClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites -``` -npm install @azure/arm-powerbiembedded +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-powerbiembedded` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: +```bash +npm install --save @azure/arm-powerbiembedded @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - Authentication, client creation and getByName workspaceCollections as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -``` -npm install @azure/ms-rest-nodeauth -``` +#### nodejs - Authentication, client creation, and getByName workspaceCollections as an example written in JavaScript. ##### Sample code -```ts -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { PowerBIEmbeddedManagementClient, PowerBIEmbeddedManagementModels, PowerBIEmbeddedManagementMappers } from "@azure/arm-powerbiembedded"; +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { PowerBIEmbeddedManagementClient } = require("@azure/arm-powerbiembedded"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new PowerBIEmbeddedManagementClient(creds, subscriptionId); - const resourceGroupName = "testresourceGroupName"; - const workspaceCollectionName = "testworkspaceCollectionName"; - client.workspaceCollections.getByName(resourceGroupName, workspaceCollectionName).then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new PowerBIEmbeddedManagementClient(creds, subscriptionId); +const resourceGroupName = "testresourceGroupName"; +const workspaceCollectionName = "testworkspaceCollectionName"; +client.workspaceCollections.getByName(resourceGroupName, workspaceCollectionName).then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and getByName workspaceCollections as an example written in JavaScript. +#### browser - Authentication, client creation, and getByName workspaceCollections as an example written in JavaScript. -##### Install @azure/ms-rest-browserauth - -``` -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-powerbiembedded sample - - + @@ -99,5 +109,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fpowerbiembedded%2Farm-powerbiembedded%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/powerbiembedded/arm-powerbiembedded/README.png) diff --git a/sdk/powerbiembedded/arm-powerbiembedded/package.json b/sdk/powerbiembedded/arm-powerbiembedded/package.json index e4ca4e96d3d9..16accacf4be4 100644 --- a/sdk/powerbiembedded/arm-powerbiembedded/package.json +++ b/sdk/powerbiembedded/arm-powerbiembedded/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-powerbiembedded", "author": "Microsoft Corporation", "description": "PowerBIEmbeddedManagementClient Library with typescript type definitions for node.js and browser.", - "version": "1.2.0", + "version": "1.3.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.1.0", - "@azure/ms-rest-js": "^1.1.0", + "@azure/ms-rest-azure-js": "^1.4.0", + "@azure/ms-rest-js": "^1.11.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.9.3" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/powerBIEmbeddedManagementClient.js", "types": "./esm/powerBIEmbeddedManagementClient.d.ts", "devDependencies": { - "typescript": "^3.1.1", + "typescript": "^3.6.0", "rollup": "^0.66.2", "rollup-plugin-node-resolve": "^3.4.0", "uglify-js": "^3.4.9" diff --git a/sdk/powerbiembedded/arm-powerbiembedded/src/powerBIEmbeddedManagementClient.ts b/sdk/powerbiembedded/arm-powerbiembedded/src/powerBIEmbeddedManagementClient.ts index a7d1e269bc37..3865970e8d99 100644 --- a/sdk/powerbiembedded/arm-powerbiembedded/src/powerBIEmbeddedManagementClient.ts +++ b/sdk/powerbiembedded/arm-powerbiembedded/src/powerBIEmbeddedManagementClient.ts @@ -9,6 +9,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as Parameters from "./models/parameters"; @@ -23,12 +24,17 @@ class PowerBIEmbeddedManagementClient extends PowerBIEmbeddedManagementClientCon /** * Initializes a new instance of the PowerBIEmbeddedManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId Gets subscription credentials which uniquely identify a Microsoft Azure * subscription. The subscription ID forms part of the URI for every service call. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.PowerBIEmbeddedManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.PowerBIEmbeddedManagementClientOptions) { super(credentials, subscriptionId, options); this.workspaceCollections = new operations.WorkspaceCollections(this); this.workspaces = new operations.Workspaces(this); diff --git a/sdk/powerbiembedded/arm-powerbiembedded/src/powerBIEmbeddedManagementClientContext.ts b/sdk/powerbiembedded/arm-powerbiembedded/src/powerBIEmbeddedManagementClientContext.ts index d2974390607f..7492af897c70 100644 --- a/sdk/powerbiembedded/arm-powerbiembedded/src/powerBIEmbeddedManagementClientContext.ts +++ b/sdk/powerbiembedded/arm-powerbiembedded/src/powerBIEmbeddedManagementClientContext.ts @@ -10,24 +10,30 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-powerbiembedded"; -const packageVersion = "0.1.0"; +const packageVersion = "1.3.0"; export class PowerBIEmbeddedManagementClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; apiVersion?: string; /** * Initializes a new instance of the PowerBIEmbeddedManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId Gets subscription credentials which uniquely identify a Microsoft Azure * subscription. The subscription ID forms part of the URI for every service call. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.PowerBIEmbeddedManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.PowerBIEmbeddedManagementClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } diff --git a/sdk/privatedns/arm-privatedns/README.md b/sdk/privatedns/arm-privatedns/README.md index 855aceddf7bb..c707eccceb75 100644 --- a/sdk/privatedns/arm-privatedns/README.md +++ b/sdk/privatedns/arm-privatedns/README.md @@ -1,94 +1,103 @@ ## Azure PrivateDnsManagementClient SDK for JavaScript -This package contains an isomorphic SDK for PrivateDnsManagementClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for PrivateDnsManagementClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-privatedns` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: ```bash -npm install @azure/arm-privatedns +npm install --save @azure/arm-privatedns @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - Authentication, client creation and get privateZones as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. -```bash -npm install @azure/ms-rest-nodeauth@"^3.0.0" -``` +#### nodejs - Authentication, client creation, and get privateZones as an example written in JavaScript. ##### Sample code -```typescript -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { PrivateDnsManagementClient, PrivateDnsManagementModels, PrivateDnsManagementMappers } from "@azure/arm-privatedns"; +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { PrivateDnsManagementClient } = require("@azure/arm-privatedns"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new PrivateDnsManagementClient(creds, subscriptionId); - const resourceGroupName = "testresourceGroupName"; - const privateZoneName = "testprivateZoneName"; - client.privateZones.get(resourceGroupName, privateZoneName).then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new PrivateDnsManagementClient(creds, subscriptionId); +const resourceGroupName = "testresourceGroupName"; +const privateZoneName = "testprivateZoneName"; +client.privateZones.get(resourceGroupName, privateZoneName).then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and get privateZones as an example written in JavaScript. +#### browser - Authentication, client creation, and get privateZones as an example written in JavaScript. -##### Install @azure/ms-rest-browserauth - -```bash -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-privatedns sample - - + diff --git a/sdk/privatedns/arm-privatedns/package.json b/sdk/privatedns/arm-privatedns/package.json index ce01d91428f5..adca1240dfb9 100644 --- a/sdk/privatedns/arm-privatedns/package.json +++ b/sdk/privatedns/arm-privatedns/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-privatedns", "author": "Microsoft Corporation", "description": "PrivateDnsManagementClient Library with typescript type definitions for node.js and browser.", - "version": "2.0.0", + "version": "2.1.0", "dependencies": { - "@azure/ms-rest-azure-js": "^2.0.1", - "@azure/ms-rest-js": "^2.0.4", + "@azure/ms-rest-azure-js": "^2.1.0", + "@azure/ms-rest-js": "^2.2.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.10.0" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/privateDnsManagementClient.js", "types": "./esm/privateDnsManagementClient.d.ts", "devDependencies": { - "typescript": "^3.5.3", + "typescript": "^3.6.0", "rollup": "^1.18.0", "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", diff --git a/sdk/privatedns/arm-privatedns/src/privateDnsManagementClient.ts b/sdk/privatedns/arm-privatedns/src/privateDnsManagementClient.ts index 7f3f6ceb4d13..17ca442b2bc3 100644 --- a/sdk/privatedns/arm-privatedns/src/privateDnsManagementClient.ts +++ b/sdk/privatedns/arm-privatedns/src/privateDnsManagementClient.ts @@ -9,6 +9,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -23,12 +24,17 @@ class PrivateDnsManagementClient extends PrivateDnsManagementClientContext { /** * Initializes a new instance of the PrivateDnsManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId Gets subscription credentials which uniquely identify Microsoft Azure * subscription. The subscription ID forms part of the URI for every service call. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.PrivateDnsManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.PrivateDnsManagementClientOptions) { super(credentials, subscriptionId, options); this.privateZones = new operations.PrivateZones(this); this.virtualNetworkLinks = new operations.VirtualNetworkLinks(this); diff --git a/sdk/privatedns/arm-privatedns/src/privateDnsManagementClientContext.ts b/sdk/privatedns/arm-privatedns/src/privateDnsManagementClientContext.ts index 70b7dda90690..353a94c15772 100644 --- a/sdk/privatedns/arm-privatedns/src/privateDnsManagementClientContext.ts +++ b/sdk/privatedns/arm-privatedns/src/privateDnsManagementClientContext.ts @@ -10,24 +10,30 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-privatedns"; -const packageVersion = "2.0.0"; +const packageVersion = "2.1.0"; export class PrivateDnsManagementClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; apiVersion?: string; /** * Initializes a new instance of the PrivateDnsManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId Gets subscription credentials which uniquely identify Microsoft Azure * subscription. The subscription ID forms part of the URI for every service call. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.PrivateDnsManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.PrivateDnsManagementClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } From 3fe4a1c99ae6f5519c617165704a445d0496b572 Mon Sep 17 00:00:00 2001 From: colawwj <70128817+colawwj@users.noreply.github.com> Date: Fri, 9 Jul 2021 08:55:25 +0800 Subject: [PATCH 10/28] 60 rp identity support (#16293) --- .../README.md | 108 ++++++++-------- .../package.json | 9 +- .../src/siteRecoveryManagementClient.ts | 10 +- .../siteRecoveryManagementClientContext.ts | 14 ++- sdk/redis/arm-rediscache/README.md | 104 +++++++++------- sdk/redis/arm-rediscache/package.json | 9 +- .../src/redisManagementClient.ts | 10 +- .../src/redisManagementClientContext.ts | 14 ++- .../arm-redisenterprisecache/README.md | 101 ++++++++------- .../arm-redisenterprisecache/package.json | 9 +- .../src/redisEnterpriseManagementClient.ts | 10 +- .../redisEnterpriseManagementClientContext.ts | 14 ++- sdk/relay/arm-relay/README.md | 108 ++++++++-------- sdk/relay/arm-relay/package.json | 9 +- .../arm-relay/src/relayManagementClient.ts | 10 +- .../src/relayManagementClientContext.ts | 14 ++- sdk/resourcegraph/arm-resourcegraph/README.md | 101 ++++++++------- .../arm-resourcegraph/package.json | 9 +- .../src/resourceGraphClient.ts | 10 +- .../src/resourceGraphClientContext.ts | 14 ++- .../arm-resourcehealth/README.md | 115 ++++++++++-------- .../arm-resourcehealth/package.json | 9 +- .../src/microsoftResourceHealth.ts | 10 +- .../src/microsoftResourceHealthContext.ts | 14 ++- sdk/resourcemover/arm-resourcemover/README.md | 108 ++++++++-------- .../arm-resourcemover/package.json | 9 +- .../src/resourceMoverServiceAPI.ts | 10 +- .../src/resourceMoverServiceAPIContext.ts | 14 ++- .../README.md | 104 +++++++++------- .../package.json | 9 +- .../src/resourceManagementClient.ts | 10 +- .../src/resourceManagementClientContext.ts | 14 ++- .../README.md | 106 ++++++++-------- .../package.json | 9 +- .../src/resourceManagementClient.ts | 10 +- .../src/resourceManagementClientContext.ts | 14 ++- sdk/search/arm-search/README.md | 108 ++++++++-------- sdk/search/arm-search/package.json | 9 +- .../arm-search/src/searchManagementClient.ts | 10 +- .../src/searchManagementClientContext.ts | 14 ++- 40 files changed, 812 insertions(+), 581 deletions(-) diff --git a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/README.md b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/README.md index 330bfc2c296c..3e179cc135b9 100644 --- a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/README.md +++ b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/README.md @@ -1,89 +1,100 @@ ## Azure SiteRecoveryManagementClient SDK for JavaScript -This package contains an isomorphic SDK for SiteRecoveryManagementClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for SiteRecoveryManagementClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites -``` -npm install @azure/arm-recoveryservices-siterecovery +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-recoveryservices-siterecovery` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: +```bash +npm install --save @azure/arm-recoveryservices-siterecovery @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - Authentication, client creation and list operations as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -``` -npm install @azure/ms-rest-nodeauth -``` +#### nodejs - Authentication, client creation, and list operations as an example written in JavaScript. ##### Sample code -```ts -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { SiteRecoveryManagementClient, SiteRecoveryManagementModels, SiteRecoveryManagementMappers } from "@azure/arm-recoveryservices-siterecovery"; +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { SiteRecoveryManagementClient } = require("@azure/arm-recoveryservices-siterecovery"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new SiteRecoveryManagementClient(creds, subscriptionId); - client.operations.list().then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new SiteRecoveryManagementClient(creds, subscriptionId); + +client.operations.list().then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and list operations as an example written in JavaScript. - -##### Install @azure/ms-rest-browserauth +#### browser - Authentication, client creation, and list operations as an example written in JavaScript. -``` -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-recoveryservices-siterecovery sample - - + @@ -95,5 +106,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Frecoveryservicessiterecovery%2Farm-recoveryservices-siterecovery%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/README.png) diff --git a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/package.json b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/package.json index 1376d42c7006..7b0e68bc6d42 100644 --- a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/package.json +++ b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-recoveryservices-siterecovery", "author": "Microsoft Corporation", "description": "SiteRecoveryManagementClient Library with typescript type definitions for node.js and browser.", - "version": "3.2.0", + "version": "3.3.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.1.0", - "@azure/ms-rest-js": "^1.1.0", + "@azure/ms-rest-azure-js": "^1.4.0", + "@azure/ms-rest-js": "^1.11.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.9.3" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/siteRecoveryManagementClient.js", "types": "./esm/siteRecoveryManagementClient.d.ts", "devDependencies": { - "typescript": "^3.1.1", + "typescript": "^3.6.0", "rollup": "^0.66.2", "rollup-plugin-node-resolve": "^3.4.0", "uglify-js": "^3.4.9" diff --git a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/siteRecoveryManagementClient.ts b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/siteRecoveryManagementClient.ts index 8bfa137ac28f..5050254986bd 100644 --- a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/siteRecoveryManagementClient.ts +++ b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/siteRecoveryManagementClient.ts @@ -9,6 +9,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -41,14 +42,19 @@ class SiteRecoveryManagementClient extends SiteRecoveryManagementClientContext { /** * Initializes a new instance of the SiteRecoveryManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The subscription Id. * @param resourceGroupName The name of the resource group where the recovery services vault is * present. * @param resourceName The name of the recovery services vault. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, resourceGroupName: string, resourceName: string, options?: Models.SiteRecoveryManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, resourceGroupName: string, resourceName: string, options?: Models.SiteRecoveryManagementClientOptions) { super(credentials, subscriptionId, resourceGroupName, resourceName, options); this.operations = new operations.Operations(this); this.replicationAlertSettings = new operations.ReplicationAlertSettings(this); diff --git a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/siteRecoveryManagementClientContext.ts b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/siteRecoveryManagementClientContext.ts index 23d375cb660f..7296861ef671 100644 --- a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/siteRecoveryManagementClientContext.ts +++ b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/siteRecoveryManagementClientContext.ts @@ -10,13 +10,14 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-recoveryservices-siterecovery"; -const packageVersion = "0.1.0"; +const packageVersion = "3.3.0"; export class SiteRecoveryManagementClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; resourceGroupName: string; resourceName: string; @@ -24,14 +25,19 @@ export class SiteRecoveryManagementClientContext extends msRestAzure.AzureServic /** * Initializes a new instance of the SiteRecoveryManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The subscription Id. * @param resourceGroupName The name of the resource group where the recovery services vault is * present. * @param resourceName The name of the recovery services vault. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, resourceGroupName: string, resourceName: string, options?: Models.SiteRecoveryManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, resourceGroupName: string, resourceName: string, options?: Models.SiteRecoveryManagementClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } diff --git a/sdk/redis/arm-rediscache/README.md b/sdk/redis/arm-rediscache/README.md index 9fd3b180eb27..fd829f3f5e9c 100644 --- a/sdk/redis/arm-rediscache/README.md +++ b/sdk/redis/arm-rediscache/README.md @@ -1,90 +1,100 @@ ## Azure RedisManagementClient SDK for JavaScript -This package contains an isomorphic SDK for RedisManagementClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for RedisManagementClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-rediscache` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: ```bash -npm install @azure/arm-rediscache +npm install --save @azure/arm-rediscache @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - Authentication, client creation and list operations as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. -```bash -npm install @azure/ms-rest-nodeauth@"^3.0.0" -``` +#### nodejs - Authentication, client creation, and list operations as an example written in JavaScript. ##### Sample code -```typescript -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { RedisManagementClient, RedisManagementModels, RedisManagementMappers } from "@azure/arm-rediscache"; +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { RedisManagementClient } = require("@azure/arm-rediscache"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new RedisManagementClient(creds, subscriptionId); - client.operations.list().then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new RedisManagementClient(creds, subscriptionId); + +client.operations.list().then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and list operations as an example written in JavaScript. - -##### Install @azure/ms-rest-browserauth +#### browser - Authentication, client creation, and list operations as an example written in JavaScript. -```bash -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-rediscache sample - - + diff --git a/sdk/redis/arm-rediscache/package.json b/sdk/redis/arm-rediscache/package.json index 1938144a46ee..8aea4be4babb 100644 --- a/sdk/redis/arm-rediscache/package.json +++ b/sdk/redis/arm-rediscache/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-rediscache", "author": "Microsoft Corporation", "description": "RedisManagementClient Library with typescript type definitions for node.js and browser.", - "version": "4.0.0", + "version": "4.1.0", "dependencies": { - "@azure/ms-rest-azure-js": "^2.0.1", - "@azure/ms-rest-js": "^2.0.4", + "@azure/ms-rest-azure-js": "^2.1.0", + "@azure/ms-rest-js": "^2.2.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.10.0" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/redisManagementClient.js", "types": "./esm/redisManagementClient.d.ts", "devDependencies": { - "typescript": "^3.5.3", + "typescript": "^3.6.0", "rollup": "^1.18.0", "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", diff --git a/sdk/redis/arm-rediscache/src/redisManagementClient.ts b/sdk/redis/arm-rediscache/src/redisManagementClient.ts index cd3b8b9dfe2e..c5f44bc0b291 100644 --- a/sdk/redis/arm-rediscache/src/redisManagementClient.ts +++ b/sdk/redis/arm-rediscache/src/redisManagementClient.ts @@ -9,6 +9,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -25,12 +26,17 @@ class RedisManagementClient extends RedisManagementClientContext { /** * Initializes a new instance of the RedisManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId Gets subscription credentials which uniquely identify the Microsoft Azure * subscription. The subscription ID forms part of the URI for every service call. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.RedisManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.RedisManagementClientOptions) { super(credentials, subscriptionId, options); this.operations = new operations.Operations(this); this.redis = new operations.Redis(this); diff --git a/sdk/redis/arm-rediscache/src/redisManagementClientContext.ts b/sdk/redis/arm-rediscache/src/redisManagementClientContext.ts index 286d06abeb1f..873bdcf1b787 100644 --- a/sdk/redis/arm-rediscache/src/redisManagementClientContext.ts +++ b/sdk/redis/arm-rediscache/src/redisManagementClientContext.ts @@ -10,24 +10,30 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-rediscache"; -const packageVersion = "4.0.0"; +const packageVersion = "4.1.0"; export class RedisManagementClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; apiVersion?: string; /** * Initializes a new instance of the RedisManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId Gets subscription credentials which uniquely identify the Microsoft Azure * subscription. The subscription ID forms part of the URI for every service call. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.RedisManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.RedisManagementClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } diff --git a/sdk/redisenterprise/arm-redisenterprisecache/README.md b/sdk/redisenterprise/arm-redisenterprisecache/README.md index 5281f220eba8..f29210e8558f 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/README.md +++ b/sdk/redisenterprise/arm-redisenterprisecache/README.md @@ -1,89 +1,100 @@ ## Azure RedisEnterpriseManagementClient SDK for JavaScript -This package contains an isomorphic SDK for RedisEnterpriseManagementClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for RedisEnterpriseManagementClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-redisenterprisecache` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: ```bash -npm install @azure/arm-redisenterprisecache +npm install --save @azure/arm-redisenterprisecache @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - client creation and list operations as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. -```bash -npm install @azure/ms-rest-nodeauth@"^3.0.0" -``` +#### nodejs - Authentication, client creation, and list operations as an example written in JavaScript. ##### Sample code -While the below sample uses the interactive login, other authentication options can be found in the [README.md file of @azure/ms-rest-nodeauth](https://www.npmjs.com/package/@azure/ms-rest-nodeauth) package -```typescript -const msRestNodeAuth = require("@azure/ms-rest-nodeauth"); +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); const { RedisEnterpriseManagementClient } = require("@azure/arm-redisenterprisecache"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new RedisEnterpriseManagementClient(creds, subscriptionId); - client.operations.list().then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new RedisEnterpriseManagementClient(creds, subscriptionId); + +client.operations.list().then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and list operations as an example written in JavaScript. - -##### Install @azure/ms-rest-browserauth +#### browser - Authentication, client creation, and list operations as an example written in JavaScript. -```bash -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-redisenterprisecache sample - - + diff --git a/sdk/redisenterprise/arm-redisenterprisecache/package.json b/sdk/redisenterprise/arm-redisenterprisecache/package.json index 016c6da09bcf..1c0617fecd66 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/package.json +++ b/sdk/redisenterprise/arm-redisenterprisecache/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-redisenterprisecache", "author": "Microsoft Corporation", "description": "RedisEnterpriseManagementClient Library with typescript type definitions for node.js and browser.", - "version": "1.0.0", + "version": "1.1.0", "dependencies": { - "@azure/ms-rest-azure-js": "^2.0.1", - "@azure/ms-rest-js": "^2.0.4", + "@azure/ms-rest-azure-js": "^2.1.0", + "@azure/ms-rest-js": "^2.2.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.10.0" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/redisEnterpriseManagementClient.js", "types": "./esm/redisEnterpriseManagementClient.d.ts", "devDependencies": { - "typescript": "^3.5.3", + "typescript": "^3.6.0", "rollup": "^1.18.0", "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", diff --git a/sdk/redisenterprise/arm-redisenterprisecache/src/redisEnterpriseManagementClient.ts b/sdk/redisenterprise/arm-redisenterprisecache/src/redisEnterpriseManagementClient.ts index 39c21aeb4b84..2200130dcf27 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/src/redisEnterpriseManagementClient.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/src/redisEnterpriseManagementClient.ts @@ -8,6 +8,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -25,11 +26,16 @@ class RedisEnterpriseManagementClient extends RedisEnterpriseManagementClientCon /** * Initializes a new instance of the RedisEnterpriseManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.RedisEnterpriseManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.RedisEnterpriseManagementClientOptions) { super(credentials, subscriptionId, options); this.operations = new operations.Operations(this); this.operationsStatus = new operations.OperationsStatus(this); diff --git a/sdk/redisenterprise/arm-redisenterprisecache/src/redisEnterpriseManagementClientContext.ts b/sdk/redisenterprise/arm-redisenterprisecache/src/redisEnterpriseManagementClientContext.ts index 3682ef12303b..cbf5215c0cb7 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/src/redisEnterpriseManagementClientContext.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/src/redisEnterpriseManagementClientContext.ts @@ -9,23 +9,29 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-redisenterprisecache"; -const packageVersion = "1.0.0"; +const packageVersion = "1.1.0"; export class RedisEnterpriseManagementClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; apiVersion?: string; /** * Initializes a new instance of the RedisEnterpriseManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.RedisEnterpriseManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.RedisEnterpriseManagementClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } diff --git a/sdk/relay/arm-relay/README.md b/sdk/relay/arm-relay/README.md index 3a7fb18fcc3d..b7ba05513e99 100644 --- a/sdk/relay/arm-relay/README.md +++ b/sdk/relay/arm-relay/README.md @@ -1,89 +1,100 @@ ## Azure RelayManagementClient SDK for JavaScript -This package contains an isomorphic SDK for RelayManagementClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for RelayManagementClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites -``` -npm install @azure/arm-relay +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-relay` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: +```bash +npm install --save @azure/arm-relay @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - Authentication, client creation and list operations as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -``` -npm install @azure/ms-rest-nodeauth -``` +#### nodejs - Authentication, client creation, and list operations as an example written in JavaScript. ##### Sample code -```ts -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { RelayManagementClient, RelayManagementModels, RelayManagementMappers } from "@azure/arm-relay"; +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { RelayManagementClient } = require("@azure/arm-relay"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new RelayManagementClient(creds, subscriptionId); - client.operations.list().then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new RelayManagementClient(creds, subscriptionId); + +client.operations.list().then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and list operations as an example written in JavaScript. - -##### Install @azure/ms-rest-browserauth +#### browser - Authentication, client creation, and list operations as an example written in JavaScript. -``` -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-relay sample - - + @@ -95,5 +106,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Frelay%2Farm-relay%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/relay/arm-relay/README.png) diff --git a/sdk/relay/arm-relay/package.json b/sdk/relay/arm-relay/package.json index 22d8588356f6..9c424a274b3e 100644 --- a/sdk/relay/arm-relay/package.json +++ b/sdk/relay/arm-relay/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-relay", "author": "Microsoft Corporation", "description": "RelayManagementClient Library with typescript type definitions for node.js and browser.", - "version": "2.1.0", + "version": "2.2.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.1.0", - "@azure/ms-rest-js": "^1.1.0", + "@azure/ms-rest-azure-js": "^1.4.0", + "@azure/ms-rest-js": "^1.11.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.9.3" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/relayManagementClient.js", "types": "./esm/relayManagementClient.d.ts", "devDependencies": { - "typescript": "^3.1.1", + "typescript": "^3.6.0", "rollup": "^0.66.2", "rollup-plugin-node-resolve": "^3.4.0", "uglify-js": "^3.4.9" diff --git a/sdk/relay/arm-relay/src/relayManagementClient.ts b/sdk/relay/arm-relay/src/relayManagementClient.ts index 41bfce598bec..d147eb79ed38 100644 --- a/sdk/relay/arm-relay/src/relayManagementClient.ts +++ b/sdk/relay/arm-relay/src/relayManagementClient.ts @@ -9,6 +9,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -24,12 +25,17 @@ class RelayManagementClient extends RelayManagementClientContext { /** * Initializes a new instance of the RelayManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId Subscription credentials which uniquely identify the Microsoft Azure * subscription. The subscription ID forms part of the URI for every service call. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.RelayManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.RelayManagementClientOptions) { super(credentials, subscriptionId, options); this.operations = new operations.Operations(this); this.namespaces = new operations.Namespaces(this); diff --git a/sdk/relay/arm-relay/src/relayManagementClientContext.ts b/sdk/relay/arm-relay/src/relayManagementClientContext.ts index a00071e51c98..c5b8969552e1 100644 --- a/sdk/relay/arm-relay/src/relayManagementClientContext.ts +++ b/sdk/relay/arm-relay/src/relayManagementClientContext.ts @@ -10,24 +10,30 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-relay"; -const packageVersion = "0.1.0"; +const packageVersion = "2.2.0"; export class RelayManagementClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; apiVersion?: string; /** * Initializes a new instance of the RelayManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId Subscription credentials which uniquely identify the Microsoft Azure * subscription. The subscription ID forms part of the URI for every service call. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.RelayManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.RelayManagementClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } diff --git a/sdk/resourcegraph/arm-resourcegraph/README.md b/sdk/resourcegraph/arm-resourcegraph/README.md index b12be35165b5..8bb4101de629 100644 --- a/sdk/resourcegraph/arm-resourcegraph/README.md +++ b/sdk/resourcegraph/arm-resourcegraph/README.md @@ -1,89 +1,100 @@ ## Azure ResourceGraphClient SDK for JavaScript -This package contains an isomorphic SDK for ResourceGraphClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for ResourceGraphClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-resourcegraph` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: ```bash -npm install @azure/arm-resourcegraph +npm install --save @azure/arm-resourcegraph @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - client creation and list operations as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. -```bash -npm install @azure/ms-rest-nodeauth@"^3.0.0" -``` +#### nodejs - Authentication, client creation, and list operations as an example written in JavaScript. ##### Sample code -While the below sample uses the interactive login, other authentication options can be found in the [README.md file of @azure/ms-rest-nodeauth](https://www.npmjs.com/package/@azure/ms-rest-nodeauth) package -```typescript -const msRestNodeAuth = require("@azure/ms-rest-nodeauth"); +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); const { ResourceGraphClient } = require("@azure/arm-resourcegraph"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new ResourceGraphClient(creds, subscriptionId); - client.operations.list().then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new ResourceGraphClient(creds, subscriptionId); + +client.operations.list().then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and list operations as an example written in JavaScript. - -##### Install @azure/ms-rest-browserauth +#### browser - Authentication, client creation, and list operations as an example written in JavaScript. -```bash -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-resourcegraph sample - - + diff --git a/sdk/resourcegraph/arm-resourcegraph/package.json b/sdk/resourcegraph/arm-resourcegraph/package.json index df62daefb40e..22a8f2d81d68 100644 --- a/sdk/resourcegraph/arm-resourcegraph/package.json +++ b/sdk/resourcegraph/arm-resourcegraph/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-resourcegraph", "author": "Microsoft Corporation", "description": "ResourceGraphClient Library with typescript type definitions for node.js and browser.", - "version": "4.1.0", + "version": "4.2.0", "dependencies": { - "@azure/ms-rest-azure-js": "^2.0.1", - "@azure/ms-rest-js": "^2.0.4", + "@azure/ms-rest-azure-js": "^2.1.0", + "@azure/ms-rest-js": "^2.2.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.10.0" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/resourceGraphClient.js", "types": "./esm/resourceGraphClient.d.ts", "devDependencies": { - "typescript": "^3.5.3", + "typescript": "^3.6.0", "rollup": "^1.18.0", "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", diff --git a/sdk/resourcegraph/arm-resourcegraph/src/resourceGraphClient.ts b/sdk/resourcegraph/arm-resourcegraph/src/resourceGraphClient.ts index c10ca6faa968..ada6b1d910d3 100644 --- a/sdk/resourcegraph/arm-resourcegraph/src/resourceGraphClient.ts +++ b/sdk/resourcegraph/arm-resourcegraph/src/resourceGraphClient.ts @@ -8,6 +8,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as Parameters from "./models/parameters"; @@ -20,11 +21,16 @@ class ResourceGraphClient extends ResourceGraphClientContext { /** * Initializes a new instance of the ResourceGraphClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param [options] The parameter options */ constructor( - credentials: msRest.ServiceClientCredentials, + credentials: msRest.ServiceClientCredentials | TokenCredential, options?: Models.ResourceGraphClientOptions ) { super(credentials, options); diff --git a/sdk/resourcegraph/arm-resourcegraph/src/resourceGraphClientContext.ts b/sdk/resourcegraph/arm-resourcegraph/src/resourceGraphClientContext.ts index 16131061fc42..b27af6121d9d 100644 --- a/sdk/resourcegraph/arm-resourcegraph/src/resourceGraphClientContext.ts +++ b/sdk/resourcegraph/arm-resourcegraph/src/resourceGraphClientContext.ts @@ -9,21 +9,27 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-resourcegraph"; -const packageVersion = "4.1.0"; +const packageVersion = "4.2.0"; export class ResourceGraphClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; /** * Initializes a new instance of the ResourceGraphClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param [options] The parameter options */ constructor( - credentials: msRest.ServiceClientCredentials, + credentials: msRest.ServiceClientCredentials | TokenCredential, options?: Models.ResourceGraphClientOptions ) { if (credentials == undefined) { diff --git a/sdk/resourcehealth/arm-resourcehealth/README.md b/sdk/resourcehealth/arm-resourcehealth/README.md index daefef06fe23..3ca1433748b3 100644 --- a/sdk/resourcehealth/arm-resourcehealth/README.md +++ b/sdk/resourcehealth/arm-resourcehealth/README.md @@ -1,93 +1,103 @@ ## Azure MicrosoftResourceHealth SDK for JavaScript -This package contains an isomorphic SDK for MicrosoftResourceHealth. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for MicrosoftResourceHealth. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites -``` -npm install @azure/arm-resourcehealth +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-resourcehealth` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: +```bash +npm install --save @azure/arm-resourcehealth @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - Authentication, client creation and listBySubscriptionId availabilityStatuses as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -``` -npm install @azure/ms-rest-nodeauth -``` +#### nodejs - Authentication, client creation, and listBySubscriptionId availabilityStatuses as an example written in JavaScript. ##### Sample code -```ts -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { MicrosoftResourceHealth, MicrosoftResourceHealthModels, MicrosoftResourceHealthMappers } from "@azure/arm-resourcehealth"; +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { MicrosoftResourceHealth } = require("@azure/arm-resourcehealth"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new MicrosoftResourceHealth(creds, subscriptionId); - const filter = "testfilter"; - const expand = "testexpand"; - client.availabilityStatuses.listBySubscriptionId(filter, expand).then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new MicrosoftResourceHealth(creds, subscriptionId); +const filter = "testfilter"; +const expand = "testexpand"; +client.availabilityStatuses.listBySubscriptionId(filter, expand).then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and listBySubscriptionId availabilityStatuses as an example written in JavaScript. +#### browser - Authentication, client creation, and listBySubscriptionId availabilityStatuses as an example written in JavaScript. -##### Install @azure/ms-rest-browserauth - -``` -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-resourcehealth sample - - + @@ -99,5 +109,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fresourcehealth%2Farm-resourcehealth%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/resourcehealth/arm-resourcehealth/README.png) diff --git a/sdk/resourcehealth/arm-resourcehealth/package.json b/sdk/resourcehealth/arm-resourcehealth/package.json index c8c350f2f591..c71ce10ab1c7 100644 --- a/sdk/resourcehealth/arm-resourcehealth/package.json +++ b/sdk/resourcehealth/arm-resourcehealth/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-resourcehealth", "author": "Microsoft Corporation", "description": "MicrosoftResourceHealth Library with typescript type definitions for node.js and browser.", - "version": "1.1.0", + "version": "1.2.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.1.0", - "@azure/ms-rest-js": "^1.1.0", + "@azure/ms-rest-azure-js": "^1.4.0", + "@azure/ms-rest-js": "^1.11.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.9.3" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/microsoftResourceHealth.js", "types": "./esm/microsoftResourceHealth.d.ts", "devDependencies": { - "typescript": "^3.1.1", + "typescript": "^3.6.0", "rollup": "^0.66.2", "rollup-plugin-node-resolve": "^3.4.0", "uglify-js": "^3.4.9" diff --git a/sdk/resourcehealth/arm-resourcehealth/src/microsoftResourceHealth.ts b/sdk/resourcehealth/arm-resourcehealth/src/microsoftResourceHealth.ts index 07e66bbf7f91..f90ba11e05e9 100644 --- a/sdk/resourcehealth/arm-resourcehealth/src/microsoftResourceHealth.ts +++ b/sdk/resourcehealth/arm-resourcehealth/src/microsoftResourceHealth.ts @@ -9,6 +9,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -22,12 +23,17 @@ class MicrosoftResourceHealth extends MicrosoftResourceHealthContext { /** * Initializes a new instance of the MicrosoftResourceHealth class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId Subscription credentials which uniquely identify Microsoft Azure * subscription. The subscription ID forms part of the URI for every service call. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.MicrosoftResourceHealthOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.MicrosoftResourceHealthOptions) { super(credentials, subscriptionId, options); this.availabilityStatuses = new operations.AvailabilityStatuses(this); this.operations = new operations.Operations(this); diff --git a/sdk/resourcehealth/arm-resourcehealth/src/microsoftResourceHealthContext.ts b/sdk/resourcehealth/arm-resourcehealth/src/microsoftResourceHealthContext.ts index b5256df762bb..cecd9d155b3f 100644 --- a/sdk/resourcehealth/arm-resourcehealth/src/microsoftResourceHealthContext.ts +++ b/sdk/resourcehealth/arm-resourcehealth/src/microsoftResourceHealthContext.ts @@ -10,24 +10,30 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-resourcehealth"; -const packageVersion = "0.1.0"; +const packageVersion = "1.2.0"; export class MicrosoftResourceHealthContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; apiVersion?: string; /** * Initializes a new instance of the MicrosoftResourceHealth class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId Subscription credentials which uniquely identify Microsoft Azure * subscription. The subscription ID forms part of the URI for every service call. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.MicrosoftResourceHealthOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.MicrosoftResourceHealthOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } diff --git a/sdk/resourcemover/arm-resourcemover/README.md b/sdk/resourcemover/arm-resourcemover/README.md index 8c8f8dae2395..dd5bb7571540 100644 --- a/sdk/resourcemover/arm-resourcemover/README.md +++ b/sdk/resourcemover/arm-resourcemover/README.md @@ -1,93 +1,103 @@ ## Azure ResourceMoverServiceAPI SDK for JavaScript -This package contains an isomorphic SDK for ResourceMoverServiceAPI. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for ResourceMoverServiceAPI. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-resourcemover` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: ```bash -npm install @azure/arm-resourcemover +npm install --save @azure/arm-resourcemover @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - client creation and get moveCollections as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. -```bash -npm install @azure/ms-rest-nodeauth@"^3.0.0" -``` +#### nodejs - Authentication, client creation, and get moveCollections as an example written in JavaScript. ##### Sample code -While the below sample uses the interactive login, other authentication options can be found in the [README.md file of @azure/ms-rest-nodeauth](https://www.npmjs.com/package/@azure/ms-rest-nodeauth) package -```typescript -const msRestNodeAuth = require("@azure/ms-rest-nodeauth"); +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); const { ResourceMoverServiceAPI } = require("@azure/arm-resourcemover"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new ResourceMoverServiceAPI(creds, subscriptionId); - const resourceGroupName = "testresourceGroupName"; - const moveCollectionName = "testmoveCollectionName"; - client.moveCollections.get(resourceGroupName, moveCollectionName).then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new ResourceMoverServiceAPI(creds, subscriptionId); +const resourceGroupName = "testresourceGroupName"; +const moveCollectionName = "testmoveCollectionName"; +client.moveCollections.get(resourceGroupName, moveCollectionName).then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and get moveCollections as an example written in JavaScript. +#### browser - Authentication, client creation, and get moveCollections as an example written in JavaScript. -##### Install @azure/ms-rest-browserauth - -```bash -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-resourcemover sample - - + diff --git a/sdk/resourcemover/arm-resourcemover/package.json b/sdk/resourcemover/arm-resourcemover/package.json index 08acdd8be900..d5e754f45a52 100644 --- a/sdk/resourcemover/arm-resourcemover/package.json +++ b/sdk/resourcemover/arm-resourcemover/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-resourcemover", "author": "Microsoft Corporation", "description": "ResourceMoverServiceAPI Library with typescript type definitions for node.js and browser.", - "version": "1.0.0", + "version": "1.1.0", "dependencies": { - "@azure/ms-rest-azure-js": "^2.0.1", - "@azure/ms-rest-js": "^2.0.4", + "@azure/ms-rest-azure-js": "^2.1.0", + "@azure/ms-rest-js": "^2.2.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.10.0" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/resourceMoverServiceAPI.js", "types": "./esm/resourceMoverServiceAPI.d.ts", "devDependencies": { - "typescript": "^3.5.3", + "typescript": "^3.6.0", "rollup": "^1.18.0", "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", diff --git a/sdk/resourcemover/arm-resourcemover/src/resourceMoverServiceAPI.ts b/sdk/resourcemover/arm-resourcemover/src/resourceMoverServiceAPI.ts index 4733943ad50f..42dc7b8b6bf0 100644 --- a/sdk/resourcemover/arm-resourcemover/src/resourceMoverServiceAPI.ts +++ b/sdk/resourcemover/arm-resourcemover/src/resourceMoverServiceAPI.ts @@ -8,6 +8,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -23,11 +24,16 @@ class ResourceMoverServiceAPI extends ResourceMoverServiceAPIContext { /** * Initializes a new instance of the ResourceMoverServiceAPI class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The Subscription ID. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.ResourceMoverServiceAPIOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.ResourceMoverServiceAPIOptions) { super(credentials, subscriptionId, options); this.moveCollections = new operations.MoveCollections(this); this.moveResources = new operations.MoveResources(this); diff --git a/sdk/resourcemover/arm-resourcemover/src/resourceMoverServiceAPIContext.ts b/sdk/resourcemover/arm-resourcemover/src/resourceMoverServiceAPIContext.ts index 8243af0fc771..72dd8d45bcfe 100644 --- a/sdk/resourcemover/arm-resourcemover/src/resourceMoverServiceAPIContext.ts +++ b/sdk/resourcemover/arm-resourcemover/src/resourceMoverServiceAPIContext.ts @@ -9,23 +9,29 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-resourcemover"; -const packageVersion = "1.0.0"; +const packageVersion = "1.1.0"; export class ResourceMoverServiceAPIContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; apiVersion?: string; /** * Initializes a new instance of the ResourceMoverServiceAPI class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The Subscription ID. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.ResourceMoverServiceAPIOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.ResourceMoverServiceAPIOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } diff --git a/sdk/resources/arm-resources-profile-2020-09-01-hybrid/README.md b/sdk/resources/arm-resources-profile-2020-09-01-hybrid/README.md index a1247d73f7a3..9019594e7ba2 100644 --- a/sdk/resources/arm-resources-profile-2020-09-01-hybrid/README.md +++ b/sdk/resources/arm-resources-profile-2020-09-01-hybrid/README.md @@ -1,90 +1,100 @@ ## Azure ResourceManagementClient SDK for JavaScript -This package contains an isomorphic SDK for ResourceManagementClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for ResourceManagementClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-resources-profile-2020-09-01-hybrid` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: ```bash -npm install @azure/arm-resources-profile-2020-09-01-hybrid +npm install --save @azure/arm-resources-profile-2020-09-01-hybrid @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - Authentication, client creation and list operations as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. -```bash -npm install @azure/ms-rest-nodeauth@"^3.0.0" -``` +#### nodejs - Authentication, client creation, and list operations as an example written in JavaScript. ##### Sample code -```typescript -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { ResourceManagementClient, ResourceManagementModels, ResourceManagementMappers } from "@azure/arm-resources-profile-2020-09-01-hybrid"; +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { ResourceManagementClient } = require("@azure/arm-resources-profile-2020-09-01-hybrid"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new ResourceManagementClient(creds, subscriptionId); - client.operations.list().then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new ResourceManagementClient(creds, subscriptionId); + +client.operations.list().then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and list operations as an example written in JavaScript. - -##### Install @azure/ms-rest-browserauth +#### browser - Authentication, client creation, and list operations as an example written in JavaScript. -```bash -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-resources-profile-2020-09-01-hybrid sample - - + diff --git a/sdk/resources/arm-resources-profile-2020-09-01-hybrid/package.json b/sdk/resources/arm-resources-profile-2020-09-01-hybrid/package.json index 11a1d2d24f63..08049fb65cee 100644 --- a/sdk/resources/arm-resources-profile-2020-09-01-hybrid/package.json +++ b/sdk/resources/arm-resources-profile-2020-09-01-hybrid/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-resources-profile-2020-09-01-hybrid", "author": "Microsoft Corporation", "description": "ResourceManagementClient Library with typescript type definitions for node.js and browser.", - "version": "1.0.0", + "version": "1.1.0", "dependencies": { - "@azure/ms-rest-azure-js": "^2.0.1", - "@azure/ms-rest-js": "^2.0.4", + "@azure/ms-rest-azure-js": "^2.1.0", + "@azure/ms-rest-js": "^2.2.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.10.0" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/resourceManagementClient.js", "types": "./esm/resourceManagementClient.d.ts", "devDependencies": { - "typescript": "^3.5.3", + "typescript": "^3.6.0", "rollup": "^1.18.0", "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", diff --git a/sdk/resources/arm-resources-profile-2020-09-01-hybrid/src/resourceManagementClient.ts b/sdk/resources/arm-resources-profile-2020-09-01-hybrid/src/resourceManagementClient.ts index 535cd08e4b20..1f14526530af 100644 --- a/sdk/resources/arm-resources-profile-2020-09-01-hybrid/src/resourceManagementClient.ts +++ b/sdk/resources/arm-resources-profile-2020-09-01-hybrid/src/resourceManagementClient.ts @@ -9,6 +9,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -27,11 +28,16 @@ class ResourceManagementClient extends ResourceManagementClientContext { /** * Initializes a new instance of the ResourceManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.ResourceManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.ResourceManagementClientOptions) { super(credentials, subscriptionId, options); this.operations = new operations.Operations(this); this.deployments = new operations.Deployments(this); diff --git a/sdk/resources/arm-resources-profile-2020-09-01-hybrid/src/resourceManagementClientContext.ts b/sdk/resources/arm-resources-profile-2020-09-01-hybrid/src/resourceManagementClientContext.ts index d51108b522e1..92ef7b4bcf50 100644 --- a/sdk/resources/arm-resources-profile-2020-09-01-hybrid/src/resourceManagementClientContext.ts +++ b/sdk/resources/arm-resources-profile-2020-09-01-hybrid/src/resourceManagementClientContext.ts @@ -10,23 +10,29 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-resources-profile-2020-09-01-hybrid"; -const packageVersion = "1.0.0"; +const packageVersion = "1.1.0"; export class ResourceManagementClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; apiVersion?: string; /** * Initializes a new instance of the ResourceManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.ResourceManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.ResourceManagementClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } diff --git a/sdk/resources/arm-resources-profile-hybrid-2019-03-01/README.md b/sdk/resources/arm-resources-profile-hybrid-2019-03-01/README.md index 0fdd24721776..9d60302dadf4 100644 --- a/sdk/resources/arm-resources-profile-hybrid-2019-03-01/README.md +++ b/sdk/resources/arm-resources-profile-hybrid-2019-03-01/README.md @@ -1,89 +1,100 @@ ## Azure ResourceManagementClient SDK for JavaScript -This package contains an isomorphic SDK for ResourceManagementClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for ResourceManagementClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-resources-profile-hybrid-2019-03-01` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: ```bash -npm install @azure/arm-resources-profile-hybrid-2019-03-01 +npm install --save @azure/arm-resources-profile-hybrid-2019-03-01 @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - Authentication, client creation and list operations as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -```bash -npm install @azure/ms-rest-nodeauth -``` +#### nodejs - Authentication, client creation, and list operations as an example written in JavaScript. ##### Sample code -```typescript -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { ResourceManagementClient, ResourceManagementModels, ResourceManagementMappers } from "@azure/arm-resources-profile-hybrid-2019-03-01"; +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { ResourceManagementClient } = require("@azure/arm-resources-profile-hybrid-2019-03-01"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new ResourceManagementClient(creds, subscriptionId); - client.operations.list().then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new ResourceManagementClient(creds, subscriptionId); + +client.operations.list().then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and list operations as an example written in JavaScript. +#### browser - Authentication, client creation, and list operations as an example written in JavaScript. -##### Install @azure/ms-rest-browserauth - -```bash -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-resources-profile-hybrid-2019-03-01 sample - - + @@ -95,5 +106,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fresources%2Farm-resources-profile-hybrid-2019-03-01%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/resources/arm-resources-profile-hybrid-2019-03-01/README.png) diff --git a/sdk/resources/arm-resources-profile-hybrid-2019-03-01/package.json b/sdk/resources/arm-resources-profile-hybrid-2019-03-01/package.json index a114ebb9b805..18a300bf6dbb 100644 --- a/sdk/resources/arm-resources-profile-hybrid-2019-03-01/package.json +++ b/sdk/resources/arm-resources-profile-hybrid-2019-03-01/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-resources-profile-hybrid-2019-03-01", "author": "Microsoft Corporation", "description": "ResourceManagementClient Library with typescript type definitions for node.js and browser.", - "version": "1.0.0", + "version": "1.1.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.3.2", - "@azure/ms-rest-js": "^1.8.1", + "@azure/ms-rest-azure-js": "^1.4.0", + "@azure/ms-rest-js": "^1.11.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.9.3" }, "keywords": [ @@ -21,7 +22,7 @@ "module": "./esm/resourceManagementClient.js", "types": "./esm/resourceManagementClient.d.ts", "devDependencies": { - "typescript": "^3.1.1", + "typescript": "^3.6.0", "rollup": "^0.66.2", "rollup-plugin-node-resolve": "^3.4.0", "rollup-plugin-sourcemaps": "^0.4.2", diff --git a/sdk/resources/arm-resources-profile-hybrid-2019-03-01/src/resourceManagementClient.ts b/sdk/resources/arm-resources-profile-hybrid-2019-03-01/src/resourceManagementClient.ts index b712764c2a93..bae69b68006d 100644 --- a/sdk/resources/arm-resources-profile-hybrid-2019-03-01/src/resourceManagementClient.ts +++ b/sdk/resources/arm-resources-profile-hybrid-2019-03-01/src/resourceManagementClient.ts @@ -9,6 +9,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -27,11 +28,16 @@ class ResourceManagementClient extends ResourceManagementClientContext { /** * Initializes a new instance of the ResourceManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.ResourceManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.ResourceManagementClientOptions) { super(credentials, subscriptionId, options); this.operations = new operations.Operations(this); this.deployments = new operations.Deployments(this); diff --git a/sdk/resources/arm-resources-profile-hybrid-2019-03-01/src/resourceManagementClientContext.ts b/sdk/resources/arm-resources-profile-hybrid-2019-03-01/src/resourceManagementClientContext.ts index 4ab26206226d..fc0412712c0a 100644 --- a/sdk/resources/arm-resources-profile-hybrid-2019-03-01/src/resourceManagementClientContext.ts +++ b/sdk/resources/arm-resources-profile-hybrid-2019-03-01/src/resourceManagementClientContext.ts @@ -10,23 +10,29 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-resources-profile-hybrid-2019-03-01"; -const packageVersion = "1.0.0"; +const packageVersion = "1.1.0"; export class ResourceManagementClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; apiVersion?: string; /** * Initializes a new instance of the ResourceManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.ResourceManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.ResourceManagementClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } diff --git a/sdk/search/arm-search/README.md b/sdk/search/arm-search/README.md index 8a1589580eac..159fd0119ef9 100644 --- a/sdk/search/arm-search/README.md +++ b/sdk/search/arm-search/README.md @@ -1,89 +1,100 @@ ## Azure SearchManagementClient SDK for JavaScript -This package contains an isomorphic SDK for SearchManagementClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for SearchManagementClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites -``` -npm install @azure/arm-search +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-search` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: +```bash +npm install --save @azure/arm-search @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - Authentication, client creation and list operations as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -``` -npm install @azure/ms-rest-nodeauth -``` +#### nodejs - Authentication, client creation, and list operations as an example written in JavaScript. ##### Sample code -```ts -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { SearchManagementClient, SearchManagementModels, SearchManagementMappers } from "@azure/arm-search"; +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { SearchManagementClient } = require("@azure/arm-search"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new SearchManagementClient(creds, subscriptionId); - client.operations.list().then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new SearchManagementClient(creds, subscriptionId); + +client.operations.list().then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and list operations as an example written in JavaScript. - -##### Install @azure/ms-rest-browserauth +#### browser - Authentication, client creation, and list operations as an example written in JavaScript. -``` -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-search sample - - + @@ -95,5 +106,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fsearch%2Farm-search%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/search/arm-search/README.png) diff --git a/sdk/search/arm-search/package.json b/sdk/search/arm-search/package.json index e805e27ce74a..fb90a3506f66 100644 --- a/sdk/search/arm-search/package.json +++ b/sdk/search/arm-search/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-search", "author": "Microsoft Corporation", "description": "SearchManagementClient Library with typescript type definitions for node.js and browser.", - "version": "1.3.0", + "version": "1.4.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.1.0", - "@azure/ms-rest-js": "^1.1.0", + "@azure/ms-rest-azure-js": "^1.4.0", + "@azure/ms-rest-js": "^1.11.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.9.3" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/searchManagementClient.js", "types": "./esm/searchManagementClient.d.ts", "devDependencies": { - "typescript": "^3.1.1", + "typescript": "^3.6.0", "rollup": "^0.66.2", "rollup-plugin-node-resolve": "^3.4.0", "uglify-js": "^3.4.9" diff --git a/sdk/search/arm-search/src/searchManagementClient.ts b/sdk/search/arm-search/src/searchManagementClient.ts index bbdfc8a0aa13..f103244dae59 100644 --- a/sdk/search/arm-search/src/searchManagementClient.ts +++ b/sdk/search/arm-search/src/searchManagementClient.ts @@ -9,6 +9,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -24,12 +25,17 @@ class SearchManagementClient extends SearchManagementClientContext { /** * Initializes a new instance of the SearchManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The unique identifier for a Microsoft Azure subscription. You can obtain * this value from the Azure Resource Manager API or the portal. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.SearchManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.SearchManagementClientOptions) { super(credentials, subscriptionId, options); this.operations = new operations.Operations(this); this.adminKeys = new operations.AdminKeys(this); diff --git a/sdk/search/arm-search/src/searchManagementClientContext.ts b/sdk/search/arm-search/src/searchManagementClientContext.ts index ab46edfae202..32e5508eb276 100644 --- a/sdk/search/arm-search/src/searchManagementClientContext.ts +++ b/sdk/search/arm-search/src/searchManagementClientContext.ts @@ -10,24 +10,30 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-search"; -const packageVersion = "0.1.0"; +const packageVersion = "1.4.0"; export class SearchManagementClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; apiVersion?: string; /** * Initializes a new instance of the SearchManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The unique identifier for a Microsoft Azure subscription. You can obtain * this value from the Azure Resource Manager API or the portal. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.SearchManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.SearchManagementClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } From 5565230074f768cd2d67707d67edd3a3dc06743b Mon Sep 17 00:00:00 2001 From: colawwj <70128817+colawwj@users.noreply.github.com> Date: Fri, 9 Jul 2021 08:55:36 +0800 Subject: [PATCH 11/28] 70 rp identity support (#16294) --- .../arm-recoveryservices/README.md | 108 +++++++------- .../arm-recoveryservices/package.json | 9 +- .../src/recoveryServicesClient.ts | 10 +- .../src/recoveryServicesClientContext.ts | 14 +- sdk/serialconsole/arm-serialconsole/README.md | 106 +++++++------- .../arm-serialconsole/package.json | 9 +- .../src/microsoftSerialConsoleClient.ts | 10 +- .../microsoftSerialConsoleClientContext.ts | 14 +- sdk/service-map/arm-servicemap/README.md | 132 ++++++++++-------- sdk/service-map/arm-servicemap/package.json | 9 +- .../src/servicemapManagementClient.ts | 10 +- .../src/servicemapManagementClientContext.ts | 14 +- sdk/servicebus/arm-servicebus/README.md | 104 +++++++------- sdk/servicebus/arm-servicebus/package.json | 9 +- .../src/serviceBusManagementClient.ts | 10 +- .../src/serviceBusManagementClientContext.ts | 14 +- sdk/servicefabric/arm-servicefabric/README.md | 111 ++++++++------- .../arm-servicefabric/package.json | 9 +- .../src/serviceFabricManagementClient.ts | 10 +- .../serviceFabricManagementClientContext.ts | 14 +- .../arm-servicefabricmesh/README.md | 108 +++++++------- .../arm-servicefabricmesh/package.json | 9 +- .../src/serviceFabricMeshManagementClient.ts | 10 +- ...erviceFabricMeshManagementClientContext.ts | 14 +- sdk/signalr/arm-signalr/README.md | 114 +++++++-------- sdk/signalr/arm-signalr/package.json | 9 +- .../src/signalRManagementClient.ts | 10 +- .../src/signalRManagementClientContext.ts | 14 +- .../arm-sqlvirtualmachine/README.md | 115 ++++++++------- .../arm-sqlvirtualmachine/package.json | 9 +- .../src/sqlVirtualMachineManagementClient.ts | 10 +- ...qlVirtualMachineManagementClientContext.ts | 14 +- .../README.md | 106 +++++++------- .../package.json | 9 +- .../src/storageManagementClient.ts | 10 +- .../src/storageManagementClientContext.ts | 14 +- sdk/storage/arm-storage/README.md | 101 ++++++++------ sdk/storage/arm-storage/package.json | 9 +- .../src/storageManagementClient.ts | 10 +- .../src/storageManagementClientContext.ts | 14 +- 40 files changed, 828 insertions(+), 607 deletions(-) diff --git a/sdk/recoveryservices/arm-recoveryservices/README.md b/sdk/recoveryservices/arm-recoveryservices/README.md index 54336c35cd94..ab315519a42c 100644 --- a/sdk/recoveryservices/arm-recoveryservices/README.md +++ b/sdk/recoveryservices/arm-recoveryservices/README.md @@ -1,93 +1,103 @@ ## Azure RecoveryServicesClient SDK for JavaScript -This package contains an isomorphic SDK for RecoveryServicesClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for RecoveryServicesClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-recoveryservices` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: ```bash -npm install @azure/arm-recoveryservices +npm install --save @azure/arm-recoveryservices @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - client creation and list replicationUsages as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. -```bash -npm install @azure/ms-rest-nodeauth@"^3.0.0" -``` +#### nodejs - Authentication, client creation, and list replicationUsages as an example written in JavaScript. ##### Sample code -While the below sample uses the interactive login, other authentication options can be found in the [README.md file of @azure/ms-rest-nodeauth](https://www.npmjs.com/package/@azure/ms-rest-nodeauth) package -```typescript -const msRestNodeAuth = require("@azure/ms-rest-nodeauth"); +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); const { RecoveryServicesClient } = require("@azure/arm-recoveryservices"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new RecoveryServicesClient(creds, subscriptionId); - const resourceGroupName = "testresourceGroupName"; - const vaultName = "testvaultName"; - client.replicationUsages.list(resourceGroupName, vaultName).then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new RecoveryServicesClient(creds, subscriptionId); +const resourceGroupName = "testresourceGroupName"; +const vaultName = "testvaultName"; +client.replicationUsages.list(resourceGroupName, vaultName).then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and list replicationUsages as an example written in JavaScript. +#### browser - Authentication, client creation, and list replicationUsages as an example written in JavaScript. -##### Install @azure/ms-rest-browserauth - -```bash -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-recoveryservices sample - - + diff --git a/sdk/recoveryservices/arm-recoveryservices/package.json b/sdk/recoveryservices/arm-recoveryservices/package.json index 20376606d69b..1ecba9962174 100644 --- a/sdk/recoveryservices/arm-recoveryservices/package.json +++ b/sdk/recoveryservices/arm-recoveryservices/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-recoveryservices", "author": "Microsoft Corporation", "description": "RecoveryServicesClient Library with typescript type definitions for node.js and browser.", - "version": "4.1.0", + "version": "4.2.0", "dependencies": { - "@azure/ms-rest-azure-js": "^2.0.1", - "@azure/ms-rest-js": "^2.0.4", + "@azure/ms-rest-azure-js": "^2.1.0", + "@azure/ms-rest-js": "^2.2.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.10.0" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/recoveryServicesClient.js", "types": "./esm/recoveryServicesClient.d.ts", "devDependencies": { - "typescript": "^3.5.3", + "typescript": "^3.6.0", "rollup": "^1.18.0", "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", diff --git a/sdk/recoveryservices/arm-recoveryservices/src/recoveryServicesClient.ts b/sdk/recoveryservices/arm-recoveryservices/src/recoveryServicesClient.ts index 7e1df780c2ed..d15c270d9e32 100644 --- a/sdk/recoveryservices/arm-recoveryservices/src/recoveryServicesClient.ts +++ b/sdk/recoveryservices/arm-recoveryservices/src/recoveryServicesClient.ts @@ -8,6 +8,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -28,11 +29,16 @@ class RecoveryServicesClient extends RecoveryServicesClientContext { /** * Initializes a new instance of the RecoveryServicesClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The subscription Id. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.RecoveryServicesClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.RecoveryServicesClientOptions) { super(credentials, subscriptionId, options); this.vaultCertificates = new operations.VaultCertificates(this); this.registeredIdentities = new operations.RegisteredIdentities(this); diff --git a/sdk/recoveryservices/arm-recoveryservices/src/recoveryServicesClientContext.ts b/sdk/recoveryservices/arm-recoveryservices/src/recoveryServicesClientContext.ts index 01afef1bd386..9d0b92a7d8d7 100644 --- a/sdk/recoveryservices/arm-recoveryservices/src/recoveryServicesClientContext.ts +++ b/sdk/recoveryservices/arm-recoveryservices/src/recoveryServicesClientContext.ts @@ -9,23 +9,29 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-recoveryservices"; -const packageVersion = "4.1.0"; +const packageVersion = "4.2.0"; export class RecoveryServicesClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; apiVersion?: string; /** * Initializes a new instance of the RecoveryServicesClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The subscription Id. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.RecoveryServicesClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.RecoveryServicesClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } diff --git a/sdk/serialconsole/arm-serialconsole/README.md b/sdk/serialconsole/arm-serialconsole/README.md index 8fcae878eebe..f82477f8a106 100644 --- a/sdk/serialconsole/arm-serialconsole/README.md +++ b/sdk/serialconsole/arm-serialconsole/README.md @@ -1,89 +1,100 @@ ## Azure MicrosoftSerialConsoleClient SDK for JavaScript -This package contains an isomorphic SDK for MicrosoftSerialConsoleClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for MicrosoftSerialConsoleClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-serialconsole` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: ```bash -npm install @azure/arm-serialconsole +npm install --save @azure/arm-serialconsole @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - Authentication, client creation and operations list as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -```bash -npm install @azure/ms-rest-nodeauth -``` +#### nodejs - Authentication, client creation, and operations list as an example written in JavaScript. ##### Sample code -```typescript -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { MicrosoftSerialConsoleClient, MicrosoftSerialConsoleModels, MicrosoftSerialConsoleMappers } from "@azure/arm-serialconsole"; +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { MicrosoftSerialConsoleClient } = require("@azure/arm-serialconsole"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new MicrosoftSerialConsoleClient(creds, subscriptionId); - client.list.operations().then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new MicrosoftSerialConsoleClient(creds, subscriptionId); + +client.list.operations().then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and operations list as an example written in JavaScript. +#### browser - Authentication, client creation, and operations list as an example written in JavaScript. -##### Install @azure/ms-rest-browserauth - -```bash -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-serialconsole sample - - + @@ -95,5 +106,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fserialconsole%2Farm-serialconsole%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/serialconsole/arm-serialconsole/README.png) diff --git a/sdk/serialconsole/arm-serialconsole/package.json b/sdk/serialconsole/arm-serialconsole/package.json index f2093c23c83a..45a0b393d480 100644 --- a/sdk/serialconsole/arm-serialconsole/package.json +++ b/sdk/serialconsole/arm-serialconsole/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-serialconsole", "author": "Microsoft Corporation", "description": "MicrosoftSerialConsoleClient Library with typescript type definitions for node.js and browser.", - "version": "1.0.0", + "version": "1.1.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.3.2", - "@azure/ms-rest-js": "^1.8.1", + "@azure/ms-rest-azure-js": "^1.4.0", + "@azure/ms-rest-js": "^1.11.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.9.3" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/microsoftSerialConsoleClient.js", "types": "./esm/microsoftSerialConsoleClient.d.ts", "devDependencies": { - "typescript": "^3.1.1", + "typescript": "^3.6.0", "rollup": "^0.66.2", "rollup-plugin-node-resolve": "^3.4.0", "rollup-plugin-sourcemaps": "^0.4.2", diff --git a/sdk/serialconsole/arm-serialconsole/src/microsoftSerialConsoleClient.ts b/sdk/serialconsole/arm-serialconsole/src/microsoftSerialConsoleClient.ts index ba521794b237..9735e35a8420 100644 --- a/sdk/serialconsole/arm-serialconsole/src/microsoftSerialConsoleClient.ts +++ b/sdk/serialconsole/arm-serialconsole/src/microsoftSerialConsoleClient.ts @@ -9,6 +9,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -23,11 +24,16 @@ class MicrosoftSerialConsoleClient extends MicrosoftSerialConsoleClientContext { /** * Initializes a new instance of the MicrosoftSerialConsoleClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.MicrosoftSerialConsoleClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.MicrosoftSerialConsoleClientOptions) { super(credentials, subscriptionId, options); this.list = new operations.List(this); this.listConsole = new operations.ListConsole(this); diff --git a/sdk/serialconsole/arm-serialconsole/src/microsoftSerialConsoleClientContext.ts b/sdk/serialconsole/arm-serialconsole/src/microsoftSerialConsoleClientContext.ts index 1478ee9b10b3..2fda18a50afb 100644 --- a/sdk/serialconsole/arm-serialconsole/src/microsoftSerialConsoleClientContext.ts +++ b/sdk/serialconsole/arm-serialconsole/src/microsoftSerialConsoleClientContext.ts @@ -10,23 +10,29 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-serialconsole"; -const packageVersion = "1.0.0"; +const packageVersion = "1.1.0"; export class MicrosoftSerialConsoleClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; apiVersion?: string; /** * Initializes a new instance of the MicrosoftSerialConsoleClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.MicrosoftSerialConsoleClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.MicrosoftSerialConsoleClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } diff --git a/sdk/service-map/arm-servicemap/README.md b/sdk/service-map/arm-servicemap/README.md index fc63791a3f0a..68f74734fbc0 100644 --- a/sdk/service-map/arm-servicemap/README.md +++ b/sdk/service-map/arm-servicemap/README.md @@ -1,103 +1,113 @@ ## Azure ServicemapManagementClient SDK for JavaScript -This package contains an isomorphic SDK for ServicemapManagementClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for ServicemapManagementClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-servicemap` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: ```bash -npm install @azure/arm-servicemap +npm install --save @azure/arm-servicemap @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - Authentication, client creation and listByWorkspace machines as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -```bash -npm install @azure/ms-rest-nodeauth -``` +#### nodejs - Authentication, client creation, and listByWorkspace machines as an example written in JavaScript. ##### Sample code -```typescript -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { ServicemapManagementClient, ServicemapManagementModels, ServicemapManagementMappers } from "@azure/arm-servicemap"; +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { ServicemapManagementClient } = require("@azure/arm-servicemap"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new ServicemapManagementClient(creds, subscriptionId); - const resourceGroupName = "testresourceGroupName"; - const workspaceName = "testworkspaceName"; - const live = true; - const startTime = new Date().toISOString(); - const endTime = new Date().toISOString(); - const timestamp = new Date().toISOString(); - const top = 1; - client.machines.listByWorkspace(resourceGroupName, workspaceName, live, startTime, endTime, timestamp, top).then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new ServicemapManagementClient(creds, subscriptionId); +const resourceGroupName = "testresourceGroupName"; +const workspaceName = "testworkspaceName"; +const live = true; +const startTime = new Date().toISOString(); +const endTime = new Date().toISOString(); +const timestamp = new Date().toISOString(); +const top = 1; +client.machines.listByWorkspace(resourceGroupName, workspaceName, live, startTime, endTime, timestamp, top).then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and listByWorkspace machines as an example written in JavaScript. +#### browser - Authentication, client creation, and listByWorkspace machines as an example written in JavaScript. -##### Install @azure/ms-rest-browserauth - -```bash -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-servicemap sample - - + @@ -109,4 +119,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fservice-map%2Farm-servicemap%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/service-map/arm-servicemap/README.png) diff --git a/sdk/service-map/arm-servicemap/package.json b/sdk/service-map/arm-servicemap/package.json index 0fd1d7250ed8..cfa445d99063 100644 --- a/sdk/service-map/arm-servicemap/package.json +++ b/sdk/service-map/arm-servicemap/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-servicemap", "author": "Microsoft Corporation", "description": "ServicemapManagementClient Library with typescript type definitions for node.js and browser.", - "version": "2.2.0", + "version": "2.3.0", "dependencies": { - "@azure/ms-rest-azure-js": "^2.0.0", - "@azure/ms-rest-js": "^2.0.3", + "@azure/ms-rest-azure-js": "^2.1.0", + "@azure/ms-rest-js": "^2.2.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.10.0" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/servicemapManagementClient.js", "types": "./esm/servicemapManagementClient.d.ts", "devDependencies": { - "typescript": "^3.1.1", + "typescript": "^3.6.0", "rollup": "^0.66.2", "rollup-plugin-node-resolve": "^3.4.0", "rollup-plugin-sourcemaps": "^0.4.2", diff --git a/sdk/service-map/arm-servicemap/src/servicemapManagementClient.ts b/sdk/service-map/arm-servicemap/src/servicemapManagementClient.ts index 22ab164d4ac2..a8725b5b9c85 100644 --- a/sdk/service-map/arm-servicemap/src/servicemapManagementClient.ts +++ b/sdk/service-map/arm-servicemap/src/servicemapManagementClient.ts @@ -9,6 +9,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -27,11 +28,16 @@ class ServicemapManagementClient extends ServicemapManagementClientContext { /** * Initializes a new instance of the ServicemapManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId Azure subscription identifier. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.ServicemapManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.ServicemapManagementClientOptions) { super(credentials, subscriptionId, options); this.machines = new operations.Machines(this); this.processes = new operations.Processes(this); diff --git a/sdk/service-map/arm-servicemap/src/servicemapManagementClientContext.ts b/sdk/service-map/arm-servicemap/src/servicemapManagementClientContext.ts index 782f18140578..ccdb98cfe729 100644 --- a/sdk/service-map/arm-servicemap/src/servicemapManagementClientContext.ts +++ b/sdk/service-map/arm-servicemap/src/servicemapManagementClientContext.ts @@ -10,23 +10,29 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-servicemap"; -const packageVersion = "2.2.0"; +const packageVersion = "2.3.0"; export class ServicemapManagementClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; apiVersion?: string; /** * Initializes a new instance of the ServicemapManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId Azure subscription identifier. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.ServicemapManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.ServicemapManagementClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } diff --git a/sdk/servicebus/arm-servicebus/README.md b/sdk/servicebus/arm-servicebus/README.md index b14c18cc53b8..81020e0cfe26 100644 --- a/sdk/servicebus/arm-servicebus/README.md +++ b/sdk/servicebus/arm-servicebus/README.md @@ -1,90 +1,100 @@ ## Azure ServiceBusManagementClient SDK for JavaScript -This package contains an isomorphic SDK for ServiceBusManagementClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for ServiceBusManagementClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-servicebus` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: ```bash -npm install @azure/arm-servicebus +npm install --save @azure/arm-servicebus @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - Authentication, client creation and list operations as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. -```bash -npm install @azure/ms-rest-nodeauth@"^3.0.0" -``` +#### nodejs - Authentication, client creation, and list operations as an example written in JavaScript. ##### Sample code -```typescript -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { ServiceBusManagementClient, ServiceBusManagementModels, ServiceBusManagementMappers } from "@azure/arm-servicebus"; +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { ServiceBusManagementClient } = require("@azure/arm-servicebus"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new ServiceBusManagementClient(creds, subscriptionId); - client.operations.list().then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new ServiceBusManagementClient(creds, subscriptionId); + +client.operations.list().then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and list operations as an example written in JavaScript. - -##### Install @azure/ms-rest-browserauth +#### browser - Authentication, client creation, and list operations as an example written in JavaScript. -```bash -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-servicebus sample - - + diff --git a/sdk/servicebus/arm-servicebus/package.json b/sdk/servicebus/arm-servicebus/package.json index 4a3e56681e22..fe7310bb84d2 100644 --- a/sdk/servicebus/arm-servicebus/package.json +++ b/sdk/servicebus/arm-servicebus/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-servicebus", "author": "Microsoft Corporation", "description": "ServiceBusManagementClient Library with typescript type definitions for node.js and browser.", - "version": "4.0.0", + "version": "4.1.0", "dependencies": { - "@azure/ms-rest-azure-js": "^2.0.1", - "@azure/ms-rest-js": "^2.0.4", + "@azure/ms-rest-azure-js": "^2.1.0", + "@azure/ms-rest-js": "^2.2.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.10.0" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/serviceBusManagementClient.js", "types": "./esm/serviceBusManagementClient.d.ts", "devDependencies": { - "typescript": "^3.5.3", + "typescript": "^3.6.0", "rollup": "^1.18.0", "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", diff --git a/sdk/servicebus/arm-servicebus/src/serviceBusManagementClient.ts b/sdk/servicebus/arm-servicebus/src/serviceBusManagementClient.ts index d2cb78a62bf5..f289ed461edd 100644 --- a/sdk/servicebus/arm-servicebus/src/serviceBusManagementClient.ts +++ b/sdk/servicebus/arm-servicebus/src/serviceBusManagementClient.ts @@ -9,6 +9,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -31,12 +32,17 @@ class ServiceBusManagementClient extends ServiceBusManagementClientContext { /** * Initializes a new instance of the ServiceBusManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId Subscription credentials that uniquely identify a Microsoft Azure * subscription. The subscription ID forms part of the URI for every service call. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.ServiceBusManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.ServiceBusManagementClientOptions) { super(credentials, subscriptionId, options); this.operations = new operations.Operations(this); this.namespaces = new operations.Namespaces(this); diff --git a/sdk/servicebus/arm-servicebus/src/serviceBusManagementClientContext.ts b/sdk/servicebus/arm-servicebus/src/serviceBusManagementClientContext.ts index 49a30c3cba92..44ffe2155450 100644 --- a/sdk/servicebus/arm-servicebus/src/serviceBusManagementClientContext.ts +++ b/sdk/servicebus/arm-servicebus/src/serviceBusManagementClientContext.ts @@ -10,24 +10,30 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-servicebus"; -const packageVersion = "4.0.0"; +const packageVersion = "4.1.0"; export class ServiceBusManagementClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; apiVersion?: string; /** * Initializes a new instance of the ServiceBusManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId Subscription credentials that uniquely identify a Microsoft Azure * subscription. The subscription ID forms part of the URI for every service call. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.ServiceBusManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.ServiceBusManagementClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } diff --git a/sdk/servicefabric/arm-servicefabric/README.md b/sdk/servicefabric/arm-servicefabric/README.md index 04ec2c7d4bd6..37a16ad25db6 100644 --- a/sdk/servicefabric/arm-servicefabric/README.md +++ b/sdk/servicefabric/arm-servicefabric/README.md @@ -1,94 +1,103 @@ ## Azure ServiceFabricManagementClient SDK for JavaScript -This package contains an isomorphic SDK for ServiceFabricManagementClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for ServiceFabricManagementClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-servicefabric` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: ```bash -npm install @azure/arm-servicefabric +npm install --save @azure/arm-servicefabric @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - Authentication, client creation and get clusters as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. -```bash -npm install @azure/ms-rest-nodeauth@"^3.0.0" -``` +#### nodejs - Authentication, client creation, and get clusters as an example written in JavaScript. ##### Sample code -```typescript -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { ServiceFabricManagementClient, ServiceFabricManagementModels, ServiceFabricManagementMappers } from "@azure/arm-servicefabric"; +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { ServiceFabricManagementClient } = require("@azure/arm-servicefabric"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new ServiceFabricManagementClient(creds, subscriptionId); - const resourceGroupName = "testresourceGroupName"; - const clusterName = "testclusterName"; - client.clusters.get(resourceGroupName, clusterName).then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new ServiceFabricManagementClient(creds, subscriptionId); +const resourceGroupName = "testresourceGroupName"; +const clusterName = "testclusterName"; +client.clusters.get(resourceGroupName, clusterName).then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and get clusters as an example written in JavaScript. +#### browser - Authentication, client creation, and get clusters as an example written in JavaScript. -##### Install @azure/ms-rest-browserauth - -```bash -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-servicefabric sample - - + diff --git a/sdk/servicefabric/arm-servicefabric/package.json b/sdk/servicefabric/arm-servicefabric/package.json index 09e9088903be..98a10ebc21f0 100644 --- a/sdk/servicefabric/arm-servicefabric/package.json +++ b/sdk/servicefabric/arm-servicefabric/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-servicefabric", "author": "Microsoft Corporation", "description": "ServiceFabricManagementClient Library with typescript type definitions for node.js and browser.", - "version": "1.0.0", + "version": "1.1.0", "dependencies": { - "@azure/ms-rest-azure-js": "^2.0.1", - "@azure/ms-rest-js": "^2.0.4", + "@azure/ms-rest-azure-js": "^2.1.0", + "@azure/ms-rest-js": "^2.2.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.10.0" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/serviceFabricManagementClient.js", "types": "./esm/serviceFabricManagementClient.d.ts", "devDependencies": { - "typescript": "^3.5.3", + "typescript": "^3.6.0", "rollup": "^1.18.0", "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", diff --git a/sdk/servicefabric/arm-servicefabric/src/serviceFabricManagementClient.ts b/sdk/servicefabric/arm-servicefabric/src/serviceFabricManagementClient.ts index df9866ea3461..8d396cf11af4 100644 --- a/sdk/servicefabric/arm-servicefabric/src/serviceFabricManagementClient.ts +++ b/sdk/servicefabric/arm-servicefabric/src/serviceFabricManagementClient.ts @@ -9,6 +9,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -30,11 +31,16 @@ class ServiceFabricManagementClient extends ServiceFabricManagementClientContext /** * Initializes a new instance of the ServiceFabricManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The customer subscription identifier. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.ServiceFabricManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.ServiceFabricManagementClientOptions) { super(credentials, subscriptionId, options); this.clusters = new operations.Clusters(this); this.clusterVersions = new operations.ClusterVersions(this); diff --git a/sdk/servicefabric/arm-servicefabric/src/serviceFabricManagementClientContext.ts b/sdk/servicefabric/arm-servicefabric/src/serviceFabricManagementClientContext.ts index b2a44ab3f52f..1b2bd54440af 100644 --- a/sdk/servicefabric/arm-servicefabric/src/serviceFabricManagementClientContext.ts +++ b/sdk/servicefabric/arm-servicefabric/src/serviceFabricManagementClientContext.ts @@ -10,22 +10,28 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-servicefabric"; -const packageVersion = "1.0.0"; +const packageVersion = "1.1.0"; export class ServiceFabricManagementClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; /** * Initializes a new instance of the ServiceFabricManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The customer subscription identifier. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.ServiceFabricManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.ServiceFabricManagementClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } diff --git a/sdk/servicefabricmesh/arm-servicefabricmesh/README.md b/sdk/servicefabricmesh/arm-servicefabricmesh/README.md index 8201d8575194..d1f3156643dd 100644 --- a/sdk/servicefabricmesh/arm-servicefabricmesh/README.md +++ b/sdk/servicefabricmesh/arm-servicefabricmesh/README.md @@ -1,89 +1,100 @@ ## Azure ServiceFabricMeshManagementClient SDK for JavaScript -This package contains an isomorphic SDK for ServiceFabricMeshManagementClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for ServiceFabricMeshManagementClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites -``` -npm install @azure/arm-servicefabricmesh +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-servicefabricmesh` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: +```bash +npm install --save @azure/arm-servicefabricmesh @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - Authentication, client creation and list operations as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -``` -npm install @azure/ms-rest-nodeauth -``` +#### nodejs - Authentication, client creation, and list operations as an example written in JavaScript. ##### Sample code -```ts -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { ServiceFabricMeshManagementClient, ServiceFabricMeshManagementModels, ServiceFabricMeshManagementMappers } from "@azure/arm-servicefabricmesh"; +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { ServiceFabricMeshManagementClient } = require("@azure/arm-servicefabricmesh"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new ServiceFabricMeshManagementClient(creds, subscriptionId); - client.operations.list().then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new ServiceFabricMeshManagementClient(creds, subscriptionId); + +client.operations.list().then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and list operations as an example written in JavaScript. - -##### Install @azure/ms-rest-browserauth +#### browser - Authentication, client creation, and list operations as an example written in JavaScript. -``` -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-servicefabricmesh sample - - + @@ -95,5 +106,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fservicefabricmesh%2Farm-servicefabricmesh%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/servicefabricmesh/arm-servicefabricmesh/README.png) diff --git a/sdk/servicefabricmesh/arm-servicefabricmesh/package.json b/sdk/servicefabricmesh/arm-servicefabricmesh/package.json index fdd1e11017b6..9bc80260c79b 100644 --- a/sdk/servicefabricmesh/arm-servicefabricmesh/package.json +++ b/sdk/servicefabricmesh/arm-servicefabricmesh/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-servicefabricmesh", "author": "Microsoft Corporation", "description": "ServiceFabricMeshManagementClient Library with typescript type definitions for node.js and browser.", - "version": "2.1.0", + "version": "2.2.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.1.0", - "@azure/ms-rest-js": "^1.1.0", + "@azure/ms-rest-azure-js": "^1.4.0", + "@azure/ms-rest-js": "^1.11.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.9.3" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/serviceFabricMeshManagementClient.js", "types": "./esm/serviceFabricMeshManagementClient.d.ts", "devDependencies": { - "typescript": "^3.1.1", + "typescript": "^3.6.0", "rollup": "^0.66.2", "rollup-plugin-node-resolve": "^3.4.0", "uglify-js": "^3.4.9" diff --git a/sdk/servicefabricmesh/arm-servicefabricmesh/src/serviceFabricMeshManagementClient.ts b/sdk/servicefabricmesh/arm-servicefabricmesh/src/serviceFabricMeshManagementClient.ts index d63849585195..f8e97eff4825 100644 --- a/sdk/servicefabricmesh/arm-servicefabricmesh/src/serviceFabricMeshManagementClient.ts +++ b/sdk/servicefabricmesh/arm-servicefabricmesh/src/serviceFabricMeshManagementClient.ts @@ -9,6 +9,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -30,11 +31,16 @@ class ServiceFabricMeshManagementClient extends ServiceFabricMeshManagementClien /** * Initializes a new instance of the ServiceFabricMeshManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The customer subscription identifier * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.ServiceFabricMeshManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.ServiceFabricMeshManagementClientOptions) { super(credentials, subscriptionId, options); this.operations = new operations.Operations(this); this.secret = new operations.Secret(this); diff --git a/sdk/servicefabricmesh/arm-servicefabricmesh/src/serviceFabricMeshManagementClientContext.ts b/sdk/servicefabricmesh/arm-servicefabricmesh/src/serviceFabricMeshManagementClientContext.ts index 2cb5036ab674..b34764aa52c1 100644 --- a/sdk/servicefabricmesh/arm-servicefabricmesh/src/serviceFabricMeshManagementClientContext.ts +++ b/sdk/servicefabricmesh/arm-servicefabricmesh/src/serviceFabricMeshManagementClientContext.ts @@ -10,23 +10,29 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-servicefabricmesh"; -const packageVersion = "0.1.0"; +const packageVersion = "2.2.0"; export class ServiceFabricMeshManagementClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; apiVersion?: string; subscriptionId: string; /** * Initializes a new instance of the ServiceFabricMeshManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The customer subscription identifier * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.ServiceFabricMeshManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.ServiceFabricMeshManagementClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } diff --git a/sdk/signalr/arm-signalr/README.md b/sdk/signalr/arm-signalr/README.md index 7423938c8103..41b5de8f57fa 100644 --- a/sdk/signalr/arm-signalr/README.md +++ b/sdk/signalr/arm-signalr/README.md @@ -1,65 +1,74 @@ ## Azure SignalRManagementClient SDK for JavaScript -This package contains an isomorphic SDK for SignalRManagementClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for SignalRManagementClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-signalr` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: ```bash -npm install @azure/arm-signalr +npm install --save @azure/arm-signalr @azure/identity ``` -### How to use +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. -#### nodejs - client creation and list operations as an example written in TypeScript. +### How to use -##### Install @azure/ms-rest-nodeauth +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -```bash -npm install @azure/ms-rest-nodeauth@"^3.0.0" -``` +#### nodejs - Authentication, client creation, and list operations as an example written in JavaScript. ##### Sample code -While the below sample uses the interactive login, other authentication options can be found in the [README.md file of @azure/ms-rest-nodeauth](https://www.npmjs.com/package/@azure/ms-rest-nodeauth) package - -```typescript -const msRestNodeAuth = require("@azure/ms-rest-nodeauth"); +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); const { SignalRManagementClient } = require("@azure/arm-signalr"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth - .interactiveLogin() - .then((creds) => { - const client = new SignalRManagementClient(creds, subscriptionId); - client.operations.list().then((result) => { - console.log("The result is:"); - console.log(result); - }); - }) - .catch((err) => { - console.error(err); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new SignalRManagementClient(creds, subscriptionId); + +client.operations.list().then((result) => { + console.log("The result is:"); + console.log(result); +}).catch((err) => { + console.log("An error occurred:"); + console.error(err); +}); ``` -#### browser - Authentication, client creation and list operations as an example written in JavaScript. - -##### Install @azure/ms-rest-browserauth +#### browser - Authentication, client creation, and list operations as an example written in JavaScript. -```bash -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html ```html @@ -67,32 +76,25 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to @azure/arm-signalr sample - - + diff --git a/sdk/signalr/arm-signalr/package.json b/sdk/signalr/arm-signalr/package.json index d6e619813daa..3b83e183076c 100644 --- a/sdk/signalr/arm-signalr/package.json +++ b/sdk/signalr/arm-signalr/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-signalr", "author": "Microsoft Corporation", "description": "SignalRManagementClient Library with typescript type definitions for node.js and browser.", - "version": "4.0.0", + "version": "4.1.0", "dependencies": { - "@azure/ms-rest-azure-js": "^2.0.1", - "@azure/ms-rest-js": "^2.0.4", + "@azure/ms-rest-azure-js": "^2.1.0", + "@azure/ms-rest-js": "^2.2.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.10.0" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/signalRManagementClient.js", "types": "./esm/signalRManagementClient.d.ts", "devDependencies": { - "typescript": "^3.5.3", + "typescript": "^3.6.0", "rollup": "^1.18.0", "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", diff --git a/sdk/signalr/arm-signalr/src/signalRManagementClient.ts b/sdk/signalr/arm-signalr/src/signalRManagementClient.ts index f89ba0585838..8d164ba3d84f 100644 --- a/sdk/signalr/arm-signalr/src/signalRManagementClient.ts +++ b/sdk/signalr/arm-signalr/src/signalRManagementClient.ts @@ -8,6 +8,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -24,13 +25,18 @@ class SignalRManagementClient extends SignalRManagementClientContext { /** * Initializes a new instance of the SignalRManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId Gets subscription Id which uniquely identify the Microsoft Azure * subscription. The subscription ID forms part of the URI for every service call. * @param [options] The parameter options */ constructor( - credentials: msRest.ServiceClientCredentials, + credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.SignalRManagementClientOptions ) { diff --git a/sdk/signalr/arm-signalr/src/signalRManagementClientContext.ts b/sdk/signalr/arm-signalr/src/signalRManagementClientContext.ts index 066c749b799a..d087e8bdb6ae 100644 --- a/sdk/signalr/arm-signalr/src/signalRManagementClientContext.ts +++ b/sdk/signalr/arm-signalr/src/signalRManagementClientContext.ts @@ -9,25 +9,31 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-signalr"; -const packageVersion = "4.0.0"; +const packageVersion = "4.1.0"; export class SignalRManagementClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; apiVersion?: string; subscriptionId: string; /** * Initializes a new instance of the SignalRManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId Gets subscription Id which uniquely identify the Microsoft Azure * subscription. The subscription ID forms part of the URI for every service call. * @param [options] The parameter options */ constructor( - credentials: msRest.ServiceClientCredentials, + credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.SignalRManagementClientOptions ) { diff --git a/sdk/sqlvirtualmachine/arm-sqlvirtualmachine/README.md b/sdk/sqlvirtualmachine/arm-sqlvirtualmachine/README.md index ac5fca0a2f2a..33f39830ef60 100644 --- a/sdk/sqlvirtualmachine/arm-sqlvirtualmachine/README.md +++ b/sdk/sqlvirtualmachine/arm-sqlvirtualmachine/README.md @@ -1,96 +1,105 @@ ## Azure SqlVirtualMachineManagementClient SDK for JavaScript -This package contains an isomorphic SDK for SqlVirtualMachineManagementClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for SqlVirtualMachineManagementClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-sqlvirtualmachine` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: ```bash -npm install @azure/arm-sqlvirtualmachine +npm install --save @azure/arm-sqlvirtualmachine @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - Authentication, client creation and get availabilityGroupListeners as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. -```bash -npm install @azure/ms-rest-nodeauth@"^3.0.0" -``` +#### nodejs - Authentication, client creation, and get availabilityGroupListeners as an example written in JavaScript. ##### Sample code -```typescript -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { SqlVirtualMachineManagementClient, SqlVirtualMachineManagementModels, SqlVirtualMachineManagementMappers } from "@azure/arm-sqlvirtualmachine"; +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { SqlVirtualMachineManagementClient } = require("@azure/arm-sqlvirtualmachine"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new SqlVirtualMachineManagementClient(creds, subscriptionId); - const resourceGroupName = "testresourceGroupName"; - const sqlVirtualMachineGroupName = "testsqlVirtualMachineGroupName"; - const availabilityGroupListenerName = "testavailabilityGroupListenerName"; - client.availabilityGroupListeners.get(resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName).then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new SqlVirtualMachineManagementClient(creds, subscriptionId); +const resourceGroupName = "testresourceGroupName"; +const sqlVirtualMachineGroupName = "testsqlVirtualMachineGroupName"; +const availabilityGroupListenerName = "testavailabilityGroupListenerName"; +client.availabilityGroupListeners.get(resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName).then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and get availabilityGroupListeners as an example written in JavaScript. +#### browser - Authentication, client creation, and get availabilityGroupListeners as an example written in JavaScript. -##### Install @azure/ms-rest-browserauth - -```bash -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-sqlvirtualmachine sample - - + diff --git a/sdk/sqlvirtualmachine/arm-sqlvirtualmachine/package.json b/sdk/sqlvirtualmachine/arm-sqlvirtualmachine/package.json index d398e0f6d994..139c5e42f65f 100644 --- a/sdk/sqlvirtualmachine/arm-sqlvirtualmachine/package.json +++ b/sdk/sqlvirtualmachine/arm-sqlvirtualmachine/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-sqlvirtualmachine", "author": "Microsoft Corporation", "description": "SqlVirtualMachineManagementClient Library with typescript type definitions for node.js and browser.", - "version": "4.0.0", + "version": "4.1.0", "dependencies": { - "@azure/ms-rest-azure-js": "^2.0.1", - "@azure/ms-rest-js": "^2.0.4", + "@azure/ms-rest-azure-js": "^2.1.0", + "@azure/ms-rest-js": "^2.2.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.10.0" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/sqlVirtualMachineManagementClient.js", "types": "./esm/sqlVirtualMachineManagementClient.d.ts", "devDependencies": { - "typescript": "^3.5.3", + "typescript": "^3.6.0", "rollup": "^1.18.0", "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", diff --git a/sdk/sqlvirtualmachine/arm-sqlvirtualmachine/src/sqlVirtualMachineManagementClient.ts b/sdk/sqlvirtualmachine/arm-sqlvirtualmachine/src/sqlVirtualMachineManagementClient.ts index 1e7c8b18f037..8605a2c6a825 100644 --- a/sdk/sqlvirtualmachine/arm-sqlvirtualmachine/src/sqlVirtualMachineManagementClient.ts +++ b/sdk/sqlvirtualmachine/arm-sqlvirtualmachine/src/sqlVirtualMachineManagementClient.ts @@ -9,6 +9,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -24,11 +25,16 @@ class SqlVirtualMachineManagementClient extends SqlVirtualMachineManagementClien /** * Initializes a new instance of the SqlVirtualMachineManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId Subscription ID that identifies an Azure subscription. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.SqlVirtualMachineManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.SqlVirtualMachineManagementClientOptions) { super(credentials, subscriptionId, options); this.availabilityGroupListeners = new operations.AvailabilityGroupListeners(this); this.operations = new operations.Operations(this); diff --git a/sdk/sqlvirtualmachine/arm-sqlvirtualmachine/src/sqlVirtualMachineManagementClientContext.ts b/sdk/sqlvirtualmachine/arm-sqlvirtualmachine/src/sqlVirtualMachineManagementClientContext.ts index fd4e2c8469cf..f72063e4112d 100644 --- a/sdk/sqlvirtualmachine/arm-sqlvirtualmachine/src/sqlVirtualMachineManagementClientContext.ts +++ b/sdk/sqlvirtualmachine/arm-sqlvirtualmachine/src/sqlVirtualMachineManagementClientContext.ts @@ -10,23 +10,29 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-sqlvirtualmachine"; -const packageVersion = "4.0.0"; +const packageVersion = "4.1.0"; export class SqlVirtualMachineManagementClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; apiVersion?: string; /** * Initializes a new instance of the SqlVirtualMachineManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId Subscription ID that identifies an Azure subscription. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.SqlVirtualMachineManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.SqlVirtualMachineManagementClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } diff --git a/sdk/storage/arm-storage-profile-2019-03-01-hybrid/README.md b/sdk/storage/arm-storage-profile-2019-03-01-hybrid/README.md index 970386f1d2f2..433fac8b794e 100644 --- a/sdk/storage/arm-storage-profile-2019-03-01-hybrid/README.md +++ b/sdk/storage/arm-storage-profile-2019-03-01-hybrid/README.md @@ -1,89 +1,100 @@ ## Azure StorageManagementClient SDK for JavaScript -This package contains an isomorphic SDK for StorageManagementClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for StorageManagementClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-storage-profile-2019-03-01-hybrid` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: ```bash -npm install @azure/arm-storage-profile-2019-03-01-hybrid +npm install --save @azure/arm-storage-profile-2019-03-01-hybrid @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - Authentication, client creation and list operations as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -```bash -npm install @azure/ms-rest-nodeauth -``` +#### nodejs - Authentication, client creation, and list operations as an example written in JavaScript. ##### Sample code -```typescript -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { StorageManagementClient, StorageManagementModels, StorageManagementMappers } from "@azure/arm-storage-profile-2019-03-01-hybrid"; +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { StorageManagementClient } = require("@azure/arm-storage-profile-2019-03-01-hybrid"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new StorageManagementClient(creds, subscriptionId); - client.operations.list().then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new StorageManagementClient(creds, subscriptionId); + +client.operations.list().then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and list operations as an example written in JavaScript. +#### browser - Authentication, client creation, and list operations as an example written in JavaScript. -##### Install @azure/ms-rest-browserauth - -```bash -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-storage-profile-2019-03-01-hybrid sample - - + @@ -95,5 +106,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fstorage%2Farm-storage-profile-2019-03-01-hybrid%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/storage/arm-storage-profile-2019-03-01-hybrid/README.png) diff --git a/sdk/storage/arm-storage-profile-2019-03-01-hybrid/package.json b/sdk/storage/arm-storage-profile-2019-03-01-hybrid/package.json index 74c912b34582..c731499aa5b8 100644 --- a/sdk/storage/arm-storage-profile-2019-03-01-hybrid/package.json +++ b/sdk/storage/arm-storage-profile-2019-03-01-hybrid/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-storage-profile-2019-03-01-hybrid", "author": "Microsoft Corporation", "description": "StorageManagementClient Library with typescript type definitions for node.js and browser.", - "version": "1.0.0", + "version": "1.1.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.3.2", - "@azure/ms-rest-js": "^1.8.1", + "@azure/ms-rest-azure-js": "^1.4.0", + "@azure/ms-rest-js": "^1.11.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.9.3" }, "keywords": [ @@ -21,7 +22,7 @@ "module": "./esm/storageManagementClient.js", "types": "./esm/storageManagementClient.d.ts", "devDependencies": { - "typescript": "^3.1.1", + "typescript": "^3.6.0", "rollup": "^0.66.2", "rollup-plugin-node-resolve": "^3.4.0", "rollup-plugin-sourcemaps": "^0.4.2", diff --git a/sdk/storage/arm-storage-profile-2019-03-01-hybrid/src/storageManagementClient.ts b/sdk/storage/arm-storage-profile-2019-03-01-hybrid/src/storageManagementClient.ts index c14b7f11a76f..61b48769f0e3 100644 --- a/sdk/storage/arm-storage-profile-2019-03-01-hybrid/src/storageManagementClient.ts +++ b/sdk/storage/arm-storage-profile-2019-03-01-hybrid/src/storageManagementClient.ts @@ -9,6 +9,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -24,12 +25,17 @@ class StorageManagementClient extends StorageManagementClientContext { /** * Initializes a new instance of the StorageManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId Gets subscription credentials which uniquely identify the Microsoft Azure * subscription. The subscription ID forms part of the URI for every service call. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.StorageManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.StorageManagementClientOptions) { super(credentials, subscriptionId, options); this.operations = new operations.Operations(this); this.skus = new operations.Skus(this); diff --git a/sdk/storage/arm-storage-profile-2019-03-01-hybrid/src/storageManagementClientContext.ts b/sdk/storage/arm-storage-profile-2019-03-01-hybrid/src/storageManagementClientContext.ts index 0dc8e6064c1a..dcd6e04a2a9d 100644 --- a/sdk/storage/arm-storage-profile-2019-03-01-hybrid/src/storageManagementClientContext.ts +++ b/sdk/storage/arm-storage-profile-2019-03-01-hybrid/src/storageManagementClientContext.ts @@ -10,24 +10,30 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-storage-profile-2019-03-01-hybrid"; -const packageVersion = "1.0.0"; +const packageVersion = "1.1.0"; export class StorageManagementClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; apiVersion?: string; /** * Initializes a new instance of the StorageManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId Gets subscription credentials which uniquely identify the Microsoft Azure * subscription. The subscription ID forms part of the URI for every service call. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.StorageManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.StorageManagementClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } diff --git a/sdk/storage/arm-storage/README.md b/sdk/storage/arm-storage/README.md index d95b62a15586..71fc9ecbee4a 100644 --- a/sdk/storage/arm-storage/README.md +++ b/sdk/storage/arm-storage/README.md @@ -1,89 +1,100 @@ ## Azure StorageManagementClient SDK for JavaScript -This package contains an isomorphic SDK for StorageManagementClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for StorageManagementClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-storage` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: ```bash -npm install @azure/arm-storage +npm install --save @azure/arm-storage @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - client creation and list operations as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. -```bash -npm install @azure/ms-rest-nodeauth@"^3.0.0" -``` +#### nodejs - Authentication, client creation, and list operations as an example written in JavaScript. ##### Sample code -While the below sample uses the interactive login, other authentication options can be found in the [README.md file of @azure/ms-rest-nodeauth](https://www.npmjs.com/package/@azure/ms-rest-nodeauth) package -```typescript -const msRestNodeAuth = require("@azure/ms-rest-nodeauth"); +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); const { StorageManagementClient } = require("@azure/arm-storage"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new StorageManagementClient(creds, subscriptionId); - client.operations.list().then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new StorageManagementClient(creds, subscriptionId); + +client.operations.list().then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and list operations as an example written in JavaScript. - -##### Install @azure/ms-rest-browserauth +#### browser - Authentication, client creation, and list operations as an example written in JavaScript. -```bash -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-storage sample - - + diff --git a/sdk/storage/arm-storage/package.json b/sdk/storage/arm-storage/package.json index f1ec9c4fe09c..e9dfee4fe9e6 100644 --- a/sdk/storage/arm-storage/package.json +++ b/sdk/storage/arm-storage/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-storage", "author": "Microsoft Corporation", "description": "StorageManagementClient Library with typescript type definitions for node.js and browser.", - "version": "16.0.0", + "version": "16.1.0", "dependencies": { - "@azure/ms-rest-azure-js": "^2.0.1", - "@azure/ms-rest-js": "^2.0.4", + "@azure/ms-rest-azure-js": "^2.1.0", + "@azure/ms-rest-js": "^2.2.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.10.0" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/storageManagementClient.js", "types": "./esm/storageManagementClient.d.ts", "devDependencies": { - "typescript": "^3.5.3", + "typescript": "^3.6.0", "rollup": "^1.18.0", "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", diff --git a/sdk/storage/arm-storage/src/storageManagementClient.ts b/sdk/storage/arm-storage/src/storageManagementClient.ts index 243688c40ba2..49219deb5668 100644 --- a/sdk/storage/arm-storage/src/storageManagementClient.ts +++ b/sdk/storage/arm-storage/src/storageManagementClient.ts @@ -8,6 +8,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -38,11 +39,16 @@ class StorageManagementClient extends StorageManagementClientContext { /** * Initializes a new instance of the StorageManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.StorageManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.StorageManagementClientOptions) { super(credentials, subscriptionId, options); this.operations = new operations.Operations(this); this.skus = new operations.Skus(this); diff --git a/sdk/storage/arm-storage/src/storageManagementClientContext.ts b/sdk/storage/arm-storage/src/storageManagementClientContext.ts index 6e9d9eefca84..59f62b7b557a 100644 --- a/sdk/storage/arm-storage/src/storageManagementClientContext.ts +++ b/sdk/storage/arm-storage/src/storageManagementClientContext.ts @@ -9,24 +9,30 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-storage"; -const packageVersion = "16.0.0"; +const packageVersion = "16.1.0"; export class StorageManagementClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; apiVersion?: string; /** * Initializes a new instance of the StorageManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ constructor( - credentials: msRest.ServiceClientCredentials, + credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.StorageManagementClientOptions ) { From 4dbf0547dee26e3a936383df0fd5134572d98d03 Mon Sep 17 00:00:00 2001 From: colawwj <70128817+colawwj@users.noreply.github.com> Date: Fri, 9 Jul 2021 08:55:45 +0800 Subject: [PATCH 12/28] 80 rp support identity (#16295) --- .../README.md | 104 ++++++++-------- .../package.json | 9 +- .../src/storageManagementClient.ts | 10 +- .../src/storageManagementClientContext.ts | 14 ++- sdk/storagecache/arm-storagecache/README.md | 101 +++++++++------- .../arm-storagecache/package.json | 9 +- .../src/storageCacheManagementClient.ts | 10 +- .../storageCacheManagementClientContext.ts | 14 ++- .../arm-storageimportexport/README.md | 108 +++++++++-------- .../arm-storageimportexport/package.json | 9 +- .../storageImportExportManagementClient.ts | 10 +- ...rageImportExportManagementClientContext.ts | 14 ++- sdk/storagesync/arm-storagesync/README.md | 104 ++++++++-------- sdk/storagesync/arm-storagesync/package.json | 9 +- .../src/storageSyncManagementClient.ts | 10 +- .../src/storageSyncManagementClientContext.ts | 14 ++- .../arm-storsimple1200series/README.md | 108 +++++++++-------- .../arm-storsimple1200series/package.json | 9 +- .../src/storSimpleManagementClient.ts | 10 +- .../src/storSimpleManagementClientContext.ts | 14 ++- .../arm-storsimple8000series/README.md | 108 +++++++++-------- .../arm-storsimple8000series/package.json | 9 +- .../storSimple8000SeriesManagementClient.ts | 10 +- ...Simple8000SeriesManagementClientContext.ts | 14 ++- .../arm-streamanalytics/README.md | 112 ++++++++++-------- .../arm-streamanalytics/package.json | 9 +- .../src/streamAnalyticsManagementClient.ts | 10 +- .../streamAnalyticsManagementClientContext.ts | 14 ++- .../README.md | 104 ++++++++-------- .../package.json | 9 +- .../src/subscriptionClient.ts | 10 +- .../src/subscriptionClientContext.ts | 14 ++- .../README.md | 106 +++++++++-------- .../package.json | 9 +- .../src/subscriptionClient.ts | 10 +- .../src/subscriptionClientContext.ts | 14 ++- sdk/support/arm-support/README.md | 104 ++++++++-------- sdk/support/arm-support/package.json | 9 +- .../arm-support/src/microsoftSupport.ts | 10 +- .../src/microsoftSupportContext.ts | 14 ++- 40 files changed, 810 insertions(+), 579 deletions(-) diff --git a/sdk/storage/arm-storage-profile-2020-09-01-hybrid/README.md b/sdk/storage/arm-storage-profile-2020-09-01-hybrid/README.md index af77a5cd2cfa..05785727ec1b 100644 --- a/sdk/storage/arm-storage-profile-2020-09-01-hybrid/README.md +++ b/sdk/storage/arm-storage-profile-2020-09-01-hybrid/README.md @@ -1,90 +1,100 @@ ## Azure StorageManagementClient SDK for JavaScript -This package contains an isomorphic SDK for StorageManagementClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for StorageManagementClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-storage-profile-2020-09-01-hybrid` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: ```bash -npm install @azure/arm-storage-profile-2020-09-01-hybrid +npm install --save @azure/arm-storage-profile-2020-09-01-hybrid @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - Authentication, client creation and list operations as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. -```bash -npm install @azure/ms-rest-nodeauth@"^3.0.0" -``` +#### nodejs - Authentication, client creation, and list operations as an example written in JavaScript. ##### Sample code -```typescript -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { StorageManagementClient, StorageManagementModels, StorageManagementMappers } from "@azure/arm-storage-profile-2020-09-01-hybrid"; +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { StorageManagementClient } = require("@azure/arm-storage-profile-2020-09-01-hybrid"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new StorageManagementClient(creds, subscriptionId); - client.operations.list().then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new StorageManagementClient(creds, subscriptionId); + +client.operations.list().then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and list operations as an example written in JavaScript. - -##### Install @azure/ms-rest-browserauth +#### browser - Authentication, client creation, and list operations as an example written in JavaScript. -```bash -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-storage-profile-2020-09-01-hybrid sample - - + diff --git a/sdk/storage/arm-storage-profile-2020-09-01-hybrid/package.json b/sdk/storage/arm-storage-profile-2020-09-01-hybrid/package.json index a01053038129..470e73450200 100644 --- a/sdk/storage/arm-storage-profile-2020-09-01-hybrid/package.json +++ b/sdk/storage/arm-storage-profile-2020-09-01-hybrid/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-storage-profile-2020-09-01-hybrid", "author": "Microsoft Corporation", "description": "StorageManagementClient Library with typescript type definitions for node.js and browser.", - "version": "1.0.0", + "version": "1.1.0", "dependencies": { - "@azure/ms-rest-azure-js": "^2.0.1", - "@azure/ms-rest-js": "^2.0.4", + "@azure/ms-rest-azure-js": "^2.1.0", + "@azure/ms-rest-js": "^2.2.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.10.0" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/storageManagementClient.js", "types": "./esm/storageManagementClient.d.ts", "devDependencies": { - "typescript": "^3.5.3", + "typescript": "^3.6.0", "rollup": "^1.18.0", "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", diff --git a/sdk/storage/arm-storage-profile-2020-09-01-hybrid/src/storageManagementClient.ts b/sdk/storage/arm-storage-profile-2020-09-01-hybrid/src/storageManagementClient.ts index 78d85210f6cf..68af8489b41e 100644 --- a/sdk/storage/arm-storage-profile-2020-09-01-hybrid/src/storageManagementClient.ts +++ b/sdk/storage/arm-storage-profile-2020-09-01-hybrid/src/storageManagementClient.ts @@ -9,6 +9,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -29,11 +30,16 @@ class StorageManagementClient extends StorageManagementClientContext { /** * Initializes a new instance of the StorageManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.StorageManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.StorageManagementClientOptions) { super(credentials, subscriptionId, options); this.operations = new operations.Operations(this); this.skus = new operations.Skus(this); diff --git a/sdk/storage/arm-storage-profile-2020-09-01-hybrid/src/storageManagementClientContext.ts b/sdk/storage/arm-storage-profile-2020-09-01-hybrid/src/storageManagementClientContext.ts index 91e12eeb1319..9492f44e1359 100644 --- a/sdk/storage/arm-storage-profile-2020-09-01-hybrid/src/storageManagementClientContext.ts +++ b/sdk/storage/arm-storage-profile-2020-09-01-hybrid/src/storageManagementClientContext.ts @@ -10,23 +10,29 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-storage-profile-2020-09-01-hybrid"; -const packageVersion = "1.0.0"; +const packageVersion = "1.1.0"; export class StorageManagementClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; apiVersion?: string; /** * Initializes a new instance of the StorageManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.StorageManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.StorageManagementClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } diff --git a/sdk/storagecache/arm-storagecache/README.md b/sdk/storagecache/arm-storagecache/README.md index d42f43290e2c..1982b3cbc515 100644 --- a/sdk/storagecache/arm-storagecache/README.md +++ b/sdk/storagecache/arm-storagecache/README.md @@ -1,89 +1,100 @@ ## Azure StorageCacheManagementClient SDK for JavaScript -This package contains an isomorphic SDK for StorageCacheManagementClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for StorageCacheManagementClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-storagecache` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: ```bash -npm install @azure/arm-storagecache +npm install --save @azure/arm-storagecache @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - client creation and list operations as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. -```bash -npm install @azure/ms-rest-nodeauth@"^3.0.0" -``` +#### nodejs - Authentication, client creation, and list operations as an example written in JavaScript. ##### Sample code -While the below sample uses the interactive login, other authentication options can be found in the [README.md file of @azure/ms-rest-nodeauth](https://www.npmjs.com/package/@azure/ms-rest-nodeauth) package -```typescript -const msRestNodeAuth = require("@azure/ms-rest-nodeauth"); +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); const { StorageCacheManagementClient } = require("@azure/arm-storagecache"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new StorageCacheManagementClient(creds, subscriptionId); - client.operations.list().then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new StorageCacheManagementClient(creds, subscriptionId); + +client.operations.list().then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and list operations as an example written in JavaScript. - -##### Install @azure/ms-rest-browserauth +#### browser - Authentication, client creation, and list operations as an example written in JavaScript. -```bash -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-storagecache sample - - + diff --git a/sdk/storagecache/arm-storagecache/package.json b/sdk/storagecache/arm-storagecache/package.json index be9abbe053c5..ed330acbca45 100644 --- a/sdk/storagecache/arm-storagecache/package.json +++ b/sdk/storagecache/arm-storagecache/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-storagecache", "author": "Microsoft Corporation", "description": "StorageCacheManagementClient Library with typescript type definitions for node.js and browser.", - "version": "4.0.0", + "version": "4.1.0", "dependencies": { - "@azure/ms-rest-azure-js": "^2.0.1", - "@azure/ms-rest-js": "^2.0.4", + "@azure/ms-rest-azure-js": "^2.1.0", + "@azure/ms-rest-js": "^2.2.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.10.0" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/storageCacheManagementClient.js", "types": "./esm/storageCacheManagementClient.d.ts", "devDependencies": { - "typescript": "^3.5.3", + "typescript": "^3.6.0", "rollup": "^1.18.0", "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", diff --git a/sdk/storagecache/arm-storagecache/src/storageCacheManagementClient.ts b/sdk/storagecache/arm-storagecache/src/storageCacheManagementClient.ts index cb15178503bf..c57bfac9ce88 100644 --- a/sdk/storagecache/arm-storagecache/src/storageCacheManagementClient.ts +++ b/sdk/storagecache/arm-storagecache/src/storageCacheManagementClient.ts @@ -8,6 +8,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -25,12 +26,17 @@ class StorageCacheManagementClient extends StorageCacheManagementClientContext { /** * Initializes a new instance of the StorageCacheManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId Subscription credentials which uniquely identify Microsoft Azure * subscription. The subscription ID forms part of the URI for every service call. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.StorageCacheManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.StorageCacheManagementClientOptions) { super(credentials, subscriptionId, options); this.operations = new operations.Operations(this); this.skus = new operations.Skus(this); diff --git a/sdk/storagecache/arm-storagecache/src/storageCacheManagementClientContext.ts b/sdk/storagecache/arm-storagecache/src/storageCacheManagementClientContext.ts index 563563daa716..9c2eac11305d 100644 --- a/sdk/storagecache/arm-storagecache/src/storageCacheManagementClientContext.ts +++ b/sdk/storagecache/arm-storagecache/src/storageCacheManagementClientContext.ts @@ -9,24 +9,30 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-storagecache"; -const packageVersion = "4.0.0"; +const packageVersion = "4.1.0"; export class StorageCacheManagementClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; apiVersion?: string; /** * Initializes a new instance of the StorageCacheManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId Subscription credentials which uniquely identify Microsoft Azure * subscription. The subscription ID forms part of the URI for every service call. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.StorageCacheManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.StorageCacheManagementClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } diff --git a/sdk/storageimportexport/arm-storageimportexport/README.md b/sdk/storageimportexport/arm-storageimportexport/README.md index cb45c729d669..cce2a48b974c 100644 --- a/sdk/storageimportexport/arm-storageimportexport/README.md +++ b/sdk/storageimportexport/arm-storageimportexport/README.md @@ -1,89 +1,100 @@ ## Azure StorageImportExportManagementClient SDK for JavaScript -This package contains an isomorphic SDK for StorageImportExportManagementClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for StorageImportExportManagementClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites -``` -npm install @azure/arm-storageimportexport +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-storageimportexport` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: +```bash +npm install --save @azure/arm-storageimportexport @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - Authentication, client creation and list locations as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -``` -npm install @azure/ms-rest-nodeauth -``` +#### nodejs - Authentication, client creation, and list locations as an example written in JavaScript. ##### Sample code -```ts -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { StorageImportExportManagementClient, StorageImportExportManagementModels, StorageImportExportManagementMappers } from "@azure/arm-storageimportexport"; +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { StorageImportExportManagementClient } = require("@azure/arm-storageimportexport"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new StorageImportExportManagementClient(creds, subscriptionId); - client.locations.list().then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new StorageImportExportManagementClient(creds, subscriptionId); + +client.locations.list().then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and list locations as an example written in JavaScript. - -##### Install @azure/ms-rest-browserauth +#### browser - Authentication, client creation, and list locations as an example written in JavaScript. -``` -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-storageimportexport sample - - + @@ -95,5 +106,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fstorageimportexport%2Farm-storageimportexport%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/storageimportexport/arm-storageimportexport/README.png) diff --git a/sdk/storageimportexport/arm-storageimportexport/package.json b/sdk/storageimportexport/arm-storageimportexport/package.json index 9a79781b78a0..010046dba505 100644 --- a/sdk/storageimportexport/arm-storageimportexport/package.json +++ b/sdk/storageimportexport/arm-storageimportexport/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-storageimportexport", "author": "Microsoft Corporation", "description": "StorageImportExportManagementClient Library with typescript type definitions for node.js and browser.", - "version": "1.2.0", + "version": "1.3.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.1.0", - "@azure/ms-rest-js": "^1.1.0", + "@azure/ms-rest-azure-js": "^1.4.0", + "@azure/ms-rest-js": "^1.11.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.9.3" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/storageImportExportManagementClient.js", "types": "./esm/storageImportExportManagementClient.d.ts", "devDependencies": { - "typescript": "^3.1.1", + "typescript": "^3.6.0", "rollup": "^0.66.2", "rollup-plugin-node-resolve": "^3.4.0", "uglify-js": "^3.4.9" diff --git a/sdk/storageimportexport/arm-storageimportexport/src/storageImportExportManagementClient.ts b/sdk/storageimportexport/arm-storageimportexport/src/storageImportExportManagementClient.ts index fdc10047f102..2690f8c348dd 100644 --- a/sdk/storageimportexport/arm-storageimportexport/src/storageImportExportManagementClient.ts +++ b/sdk/storageimportexport/arm-storageimportexport/src/storageImportExportManagementClient.ts @@ -9,6 +9,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -24,11 +25,16 @@ class StorageImportExportManagementClient extends StorageImportExportManagementC /** * Initializes a new instance of the StorageImportExportManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The subscription ID for the Azure user. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.StorageImportExportManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.StorageImportExportManagementClientOptions) { super(credentials, subscriptionId, options); this.locations = new operations.Locations(this); this.jobs = new operations.Jobs(this); diff --git a/sdk/storageimportexport/arm-storageimportexport/src/storageImportExportManagementClientContext.ts b/sdk/storageimportexport/arm-storageimportexport/src/storageImportExportManagementClientContext.ts index 08a5786a8d6a..26b4751baeac 100644 --- a/sdk/storageimportexport/arm-storageimportexport/src/storageImportExportManagementClientContext.ts +++ b/sdk/storageimportexport/arm-storageimportexport/src/storageImportExportManagementClientContext.ts @@ -10,23 +10,29 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-storageimportexport"; -const packageVersion = "0.1.0"; +const packageVersion = "1.3.0"; export class StorageImportExportManagementClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; apiVersion?: string; subscriptionId: string; /** * Initializes a new instance of the StorageImportExportManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The subscription ID for the Azure user. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.StorageImportExportManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.StorageImportExportManagementClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } diff --git a/sdk/storagesync/arm-storagesync/README.md b/sdk/storagesync/arm-storagesync/README.md index 09b380bd29de..94c95f784e04 100644 --- a/sdk/storagesync/arm-storagesync/README.md +++ b/sdk/storagesync/arm-storagesync/README.md @@ -1,90 +1,100 @@ ## Azure StorageSyncManagementClient SDK for JavaScript -This package contains an isomorphic SDK for StorageSyncManagementClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for StorageSyncManagementClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-storagesync` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: ```bash -npm install @azure/arm-storagesync +npm install --save @azure/arm-storagesync @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - Authentication, client creation and list operations as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. -```bash -npm install @azure/ms-rest-nodeauth@"^3.0.0" -``` +#### nodejs - Authentication, client creation, and list operations as an example written in JavaScript. ##### Sample code -```typescript -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { StorageSyncManagementClient, StorageSyncManagementModels, StorageSyncManagementMappers } from "@azure/arm-storagesync"; +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { StorageSyncManagementClient } = require("@azure/arm-storagesync"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new StorageSyncManagementClient(creds, subscriptionId); - client.operations.list().then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new StorageSyncManagementClient(creds, subscriptionId); + +client.operations.list().then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and list operations as an example written in JavaScript. - -##### Install @azure/ms-rest-browserauth +#### browser - Authentication, client creation, and list operations as an example written in JavaScript. -```bash -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-storagesync sample - - + diff --git a/sdk/storagesync/arm-storagesync/package.json b/sdk/storagesync/arm-storagesync/package.json index 29b8ef52098c..b9e48bc76811 100644 --- a/sdk/storagesync/arm-storagesync/package.json +++ b/sdk/storagesync/arm-storagesync/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-storagesync", "author": "Microsoft Corporation", "description": "StorageSyncManagementClient Library with typescript type definitions for node.js and browser.", - "version": "8.0.0", + "version": "8.1.0", "dependencies": { - "@azure/ms-rest-azure-js": "^2.0.1", - "@azure/ms-rest-js": "^2.0.4", + "@azure/ms-rest-azure-js": "^2.1.0", + "@azure/ms-rest-js": "^2.2.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.10.0" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/storageSyncManagementClient.js", "types": "./esm/storageSyncManagementClient.d.ts", "devDependencies": { - "typescript": "^3.5.3", + "typescript": "^3.6.0", "rollup": "^1.18.0", "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", diff --git a/sdk/storagesync/arm-storagesync/src/storageSyncManagementClient.ts b/sdk/storagesync/arm-storagesync/src/storageSyncManagementClient.ts index e8507d474340..9197adff1266 100644 --- a/sdk/storagesync/arm-storagesync/src/storageSyncManagementClient.ts +++ b/sdk/storagesync/arm-storagesync/src/storageSyncManagementClient.ts @@ -9,6 +9,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -28,11 +29,16 @@ class StorageSyncManagementClient extends StorageSyncManagementClientContext { /** * Initializes a new instance of the StorageSyncManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.StorageSyncManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.StorageSyncManagementClientOptions) { super(credentials, subscriptionId, options); this.operations = new operations.Operations(this); this.storageSyncServices = new operations.StorageSyncServices(this); diff --git a/sdk/storagesync/arm-storagesync/src/storageSyncManagementClientContext.ts b/sdk/storagesync/arm-storagesync/src/storageSyncManagementClientContext.ts index ef8da155c09f..8361453ab16c 100644 --- a/sdk/storagesync/arm-storagesync/src/storageSyncManagementClientContext.ts +++ b/sdk/storagesync/arm-storagesync/src/storageSyncManagementClientContext.ts @@ -10,23 +10,29 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-storagesync"; -const packageVersion = "8.0.0"; +const packageVersion = "8.1.0"; export class StorageSyncManagementClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; apiVersion?: string; subscriptionId: string; /** * Initializes a new instance of the StorageSyncManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.StorageSyncManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.StorageSyncManagementClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } diff --git a/sdk/storsimple1200series/arm-storsimple1200series/README.md b/sdk/storsimple1200series/arm-storsimple1200series/README.md index 20eccc8968fe..c877b2307124 100644 --- a/sdk/storsimple1200series/arm-storsimple1200series/README.md +++ b/sdk/storsimple1200series/arm-storsimple1200series/README.md @@ -1,89 +1,100 @@ ## Azure StorSimpleManagementClient SDK for JavaScript -This package contains an isomorphic SDK for StorSimpleManagementClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for StorSimpleManagementClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites -``` -npm install @azure/arm-storsimple1200series +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-storsimple1200series` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: +```bash +npm install --save @azure/arm-storsimple1200series @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - Authentication, client creation and list managers as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -``` -npm install @azure/ms-rest-nodeauth -``` +#### nodejs - Authentication, client creation, and list managers as an example written in JavaScript. ##### Sample code -```ts -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { StorSimpleManagementClient, StorSimpleManagementModels, StorSimpleManagementMappers } from "@azure/arm-storsimple1200series"; +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { StorSimpleManagementClient } = require("@azure/arm-storsimple1200series"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new StorSimpleManagementClient(creds, subscriptionId); - client.managers.list().then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new StorSimpleManagementClient(creds, subscriptionId); + +client.managers.list().then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and list managers as an example written in JavaScript. - -##### Install @azure/ms-rest-browserauth +#### browser - Authentication, client creation, and list managers as an example written in JavaScript. -``` -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-storsimple1200series sample - - + @@ -95,5 +106,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fstorsimple1200series%2Farm-storsimple1200series%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/storsimple1200series/arm-storsimple1200series/README.png) diff --git a/sdk/storsimple1200series/arm-storsimple1200series/package.json b/sdk/storsimple1200series/arm-storsimple1200series/package.json index 9a197dea0fdb..db28102f38dd 100644 --- a/sdk/storsimple1200series/arm-storsimple1200series/package.json +++ b/sdk/storsimple1200series/arm-storsimple1200series/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-storsimple1200series", "author": "Microsoft Corporation", "description": "StorSimpleManagementClient Library with typescript type definitions for node.js and browser.", - "version": "1.1.0", + "version": "1.2.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.1.0", - "@azure/ms-rest-js": "^1.1.0", + "@azure/ms-rest-azure-js": "^1.4.0", + "@azure/ms-rest-js": "^1.11.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.9.3" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/storSimpleManagementClient.js", "types": "./esm/storSimpleManagementClient.d.ts", "devDependencies": { - "typescript": "^3.1.1", + "typescript": "^3.6.0", "rollup": "^0.66.2", "rollup-plugin-node-resolve": "^3.4.0", "uglify-js": "^3.4.9" diff --git a/sdk/storsimple1200series/arm-storsimple1200series/src/storSimpleManagementClient.ts b/sdk/storsimple1200series/arm-storsimple1200series/src/storSimpleManagementClient.ts index 142f5f4dd5e2..287f8a1c3a16 100644 --- a/sdk/storsimple1200series/arm-storsimple1200series/src/storSimpleManagementClient.ts +++ b/sdk/storsimple1200series/arm-storsimple1200series/src/storSimpleManagementClient.ts @@ -9,6 +9,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -35,11 +36,16 @@ class StorSimpleManagementClient extends StorSimpleManagementClientContext { /** * Initializes a new instance of the StorSimpleManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The subscription id * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.StorSimpleManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.StorSimpleManagementClientOptions) { super(credentials, subscriptionId, options); this.managers = new operations.Managers(this); this.availableProviderOperations = new operations.AvailableProviderOperationsOperations(this); diff --git a/sdk/storsimple1200series/arm-storsimple1200series/src/storSimpleManagementClientContext.ts b/sdk/storsimple1200series/arm-storsimple1200series/src/storSimpleManagementClientContext.ts index 4d4df0919526..f3963c937b05 100644 --- a/sdk/storsimple1200series/arm-storsimple1200series/src/storSimpleManagementClientContext.ts +++ b/sdk/storsimple1200series/arm-storsimple1200series/src/storSimpleManagementClientContext.ts @@ -10,23 +10,29 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-storsimple1200series"; -const packageVersion = "0.1.0"; +const packageVersion = "1.2.0"; export class StorSimpleManagementClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; apiVersion?: string; subscriptionId: string; /** * Initializes a new instance of the StorSimpleManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The subscription id * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.StorSimpleManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.StorSimpleManagementClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } diff --git a/sdk/storsimple8000series/arm-storsimple8000series/README.md b/sdk/storsimple8000series/arm-storsimple8000series/README.md index 6b8d3c897e52..25fcbbb75913 100644 --- a/sdk/storsimple8000series/arm-storsimple8000series/README.md +++ b/sdk/storsimple8000series/arm-storsimple8000series/README.md @@ -1,89 +1,100 @@ ## Azure StorSimple8000SeriesManagementClient SDK for JavaScript -This package contains an isomorphic SDK for StorSimple8000SeriesManagementClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for StorSimple8000SeriesManagementClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites -``` -npm install @azure/arm-storsimple8000series +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-storsimple8000series` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: +```bash +npm install --save @azure/arm-storsimple8000series @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - Authentication, client creation and list operations as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -``` -npm install @azure/ms-rest-nodeauth -``` +#### nodejs - Authentication, client creation, and list operations as an example written in JavaScript. ##### Sample code -```ts -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { StorSimple8000SeriesManagementClient, StorSimple8000SeriesManagementModels, StorSimple8000SeriesManagementMappers } from "@azure/arm-storsimple8000series"; +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { StorSimple8000SeriesManagementClient } = require("@azure/arm-storsimple8000series"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new StorSimple8000SeriesManagementClient(creds, subscriptionId); - client.operations.list().then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new StorSimple8000SeriesManagementClient(creds, subscriptionId); + +client.operations.list().then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and list operations as an example written in JavaScript. - -##### Install @azure/ms-rest-browserauth +#### browser - Authentication, client creation, and list operations as an example written in JavaScript. -``` -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-storsimple8000series sample - - + @@ -95,5 +106,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fstorsimple8000series%2Farm-storsimple8000series%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/storsimple8000series/arm-storsimple8000series/README.png) diff --git a/sdk/storsimple8000series/arm-storsimple8000series/package.json b/sdk/storsimple8000series/arm-storsimple8000series/package.json index 192caba6625a..2e099d5968bf 100644 --- a/sdk/storsimple8000series/arm-storsimple8000series/package.json +++ b/sdk/storsimple8000series/arm-storsimple8000series/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-storsimple8000series", "author": "Microsoft Corporation", "description": "StorSimple8000SeriesManagementClient Library with typescript type definitions for node.js and browser.", - "version": "1.1.0", + "version": "1.2.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.1.0", - "@azure/ms-rest-js": "^1.1.0", + "@azure/ms-rest-azure-js": "^1.4.0", + "@azure/ms-rest-js": "^1.11.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.9.3" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/storSimple8000SeriesManagementClient.js", "types": "./esm/storSimple8000SeriesManagementClient.d.ts", "devDependencies": { - "typescript": "^3.1.1", + "typescript": "^3.6.0", "rollup": "^0.66.2", "rollup-plugin-node-resolve": "^3.4.0", "uglify-js": "^3.4.9" diff --git a/sdk/storsimple8000series/arm-storsimple8000series/src/storSimple8000SeriesManagementClient.ts b/sdk/storsimple8000series/arm-storsimple8000series/src/storSimple8000SeriesManagementClient.ts index abe8192f1fff..fa637e5d592a 100644 --- a/sdk/storsimple8000series/arm-storsimple8000series/src/storSimple8000SeriesManagementClient.ts +++ b/sdk/storsimple8000series/arm-storsimple8000series/src/storSimple8000SeriesManagementClient.ts @@ -9,6 +9,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -36,11 +37,16 @@ class StorSimple8000SeriesManagementClient extends StorSimple8000SeriesManagemen /** * Initializes a new instance of the StorSimple8000SeriesManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The subscription id * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.StorSimple8000SeriesManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.StorSimple8000SeriesManagementClientOptions) { super(credentials, subscriptionId, options); this.operations = new operations.Operations(this); this.managers = new operations.Managers(this); diff --git a/sdk/storsimple8000series/arm-storsimple8000series/src/storSimple8000SeriesManagementClientContext.ts b/sdk/storsimple8000series/arm-storsimple8000series/src/storSimple8000SeriesManagementClientContext.ts index 3839ad510595..d85dbba90b3e 100644 --- a/sdk/storsimple8000series/arm-storsimple8000series/src/storSimple8000SeriesManagementClientContext.ts +++ b/sdk/storsimple8000series/arm-storsimple8000series/src/storSimple8000SeriesManagementClientContext.ts @@ -10,23 +10,29 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-storsimple8000series"; -const packageVersion = "0.1.0"; +const packageVersion = "1.2.0"; export class StorSimple8000SeriesManagementClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; apiVersion?: string; subscriptionId: string; /** * Initializes a new instance of the StorSimple8000SeriesManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The subscription id * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.StorSimple8000SeriesManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.StorSimple8000SeriesManagementClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } diff --git a/sdk/streamanalytics/arm-streamanalytics/README.md b/sdk/streamanalytics/arm-streamanalytics/README.md index 9a7ba43bf422..512d5b856076 100644 --- a/sdk/streamanalytics/arm-streamanalytics/README.md +++ b/sdk/streamanalytics/arm-streamanalytics/README.md @@ -1,95 +1,105 @@ ## Azure StreamAnalyticsManagementClient SDK for JavaScript -This package contains an isomorphic SDK for StreamAnalyticsManagementClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for StreamAnalyticsManagementClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-streamanalytics` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: ```bash -npm install @azure/arm-streamanalytics +npm install --save @azure/arm-streamanalytics @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - client creation and get functions as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. -```bash -npm install @azure/ms-rest-nodeauth@"^3.0.0" -``` +#### nodejs - Authentication, client creation, and get functions as an example written in JavaScript. ##### Sample code -While the below sample uses the interactive login, other authentication options can be found in the [README.md file of @azure/ms-rest-nodeauth](https://www.npmjs.com/package/@azure/ms-rest-nodeauth) package -```typescript -const msRestNodeAuth = require("@azure/ms-rest-nodeauth"); +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); const { StreamAnalyticsManagementClient } = require("@azure/arm-streamanalytics"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new StreamAnalyticsManagementClient(creds, subscriptionId); - const resourceGroupName = "testresourceGroupName"; - const jobName = "testjobName"; - const functionName = "testfunctionName"; - client.functions.get(resourceGroupName, jobName, functionName).then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new StreamAnalyticsManagementClient(creds, subscriptionId); +const resourceGroupName = "testresourceGroupName"; +const jobName = "testjobName"; +const functionName = "testfunctionName"; +client.functions.get(resourceGroupName, jobName, functionName).then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and get functions as an example written in JavaScript. +#### browser - Authentication, client creation, and get functions as an example written in JavaScript. -##### Install @azure/ms-rest-browserauth - -```bash -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-streamanalytics sample - - + diff --git a/sdk/streamanalytics/arm-streamanalytics/package.json b/sdk/streamanalytics/arm-streamanalytics/package.json index e5246c121745..68082d5df897 100644 --- a/sdk/streamanalytics/arm-streamanalytics/package.json +++ b/sdk/streamanalytics/arm-streamanalytics/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-streamanalytics", "author": "Microsoft Corporation", "description": "StreamAnalyticsManagementClient Library with typescript type definitions for node.js and browser.", - "version": "2.0.0", + "version": "2.1.0", "dependencies": { - "@azure/ms-rest-azure-js": "^2.0.1", - "@azure/ms-rest-js": "^2.0.4", + "@azure/ms-rest-azure-js": "^2.1.0", + "@azure/ms-rest-js": "^2.2.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.10.0" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/streamAnalyticsManagementClient.js", "types": "./esm/streamAnalyticsManagementClient.d.ts", "devDependencies": { - "typescript": "^3.5.3", + "typescript": "^3.6.0", "rollup": "^1.18.0", "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", diff --git a/sdk/streamanalytics/arm-streamanalytics/src/streamAnalyticsManagementClient.ts b/sdk/streamanalytics/arm-streamanalytics/src/streamAnalyticsManagementClient.ts index 64d4307d04e4..38328160afb4 100644 --- a/sdk/streamanalytics/arm-streamanalytics/src/streamAnalyticsManagementClient.ts +++ b/sdk/streamanalytics/arm-streamanalytics/src/streamAnalyticsManagementClient.ts @@ -8,6 +8,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -28,11 +29,16 @@ class StreamAnalyticsManagementClient extends StreamAnalyticsManagementClientCon /** * Initializes a new instance of the StreamAnalyticsManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.StreamAnalyticsManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.StreamAnalyticsManagementClientOptions) { super(credentials, subscriptionId, options); this.functions = new operations.Functions(this); this.inputs = new operations.Inputs(this); diff --git a/sdk/streamanalytics/arm-streamanalytics/src/streamAnalyticsManagementClientContext.ts b/sdk/streamanalytics/arm-streamanalytics/src/streamAnalyticsManagementClientContext.ts index 752d8b339deb..cf3c3070ca7d 100644 --- a/sdk/streamanalytics/arm-streamanalytics/src/streamAnalyticsManagementClientContext.ts +++ b/sdk/streamanalytics/arm-streamanalytics/src/streamAnalyticsManagementClientContext.ts @@ -9,22 +9,28 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-streamanalytics"; -const packageVersion = "2.0.0"; +const packageVersion = "2.1.0"; export class StreamAnalyticsManagementClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; /** * Initializes a new instance of the StreamAnalyticsManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.StreamAnalyticsManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.StreamAnalyticsManagementClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } diff --git a/sdk/subscription/arm-subscriptions-profile-2020-09-01-hybrid/README.md b/sdk/subscription/arm-subscriptions-profile-2020-09-01-hybrid/README.md index 6b4a8ef48d90..9c81510dbe11 100644 --- a/sdk/subscription/arm-subscriptions-profile-2020-09-01-hybrid/README.md +++ b/sdk/subscription/arm-subscriptions-profile-2020-09-01-hybrid/README.md @@ -1,90 +1,100 @@ ## Azure SubscriptionClient SDK for JavaScript -This package contains an isomorphic SDK for SubscriptionClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for SubscriptionClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-subscriptions-profile-2020-09-01-hybrid` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: ```bash -npm install @azure/arm-subscriptions-profile-2020-09-01-hybrid +npm install --save @azure/arm-subscriptions-profile-2020-09-01-hybrid @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - Authentication, client creation and list operations as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. -```bash -npm install @azure/ms-rest-nodeauth@"^3.0.0" -``` +#### nodejs - Authentication, client creation, and list operations as an example written in JavaScript. ##### Sample code -```typescript -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { SubscriptionClient, SubscriptionModels, SubscriptionMappers } from "@azure/arm-subscriptions-profile-2020-09-01-hybrid"; +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { SubscriptionClient } = require("@azure/arm-subscriptions-profile-2020-09-01-hybrid"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new SubscriptionClient(creds, subscriptionId); - client.operations.list().then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new SubscriptionClient(creds, subscriptionId); + +client.operations.list().then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and list operations as an example written in JavaScript. - -##### Install @azure/ms-rest-browserauth +#### browser - Authentication, client creation, and list operations as an example written in JavaScript. -```bash -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-subscriptions-profile-2020-09-01-hybrid sample - - + diff --git a/sdk/subscription/arm-subscriptions-profile-2020-09-01-hybrid/package.json b/sdk/subscription/arm-subscriptions-profile-2020-09-01-hybrid/package.json index 7b5d90e547fa..4b20151cb221 100644 --- a/sdk/subscription/arm-subscriptions-profile-2020-09-01-hybrid/package.json +++ b/sdk/subscription/arm-subscriptions-profile-2020-09-01-hybrid/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-subscriptions-profile-2020-09-01-hybrid", "author": "Microsoft Corporation", "description": "SubscriptionClient Library with typescript type definitions for node.js and browser.", - "version": "1.0.0", + "version": "1.1.0", "dependencies": { - "@azure/ms-rest-azure-js": "^2.0.1", - "@azure/ms-rest-js": "^2.0.4", + "@azure/ms-rest-azure-js": "^2.1.0", + "@azure/ms-rest-js": "^2.2.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.10.0" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/subscriptionClient.js", "types": "./esm/subscriptionClient.d.ts", "devDependencies": { - "typescript": "^3.5.3", + "typescript": "^3.6.0", "rollup": "^1.18.0", "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", diff --git a/sdk/subscription/arm-subscriptions-profile-2020-09-01-hybrid/src/subscriptionClient.ts b/sdk/subscription/arm-subscriptions-profile-2020-09-01-hybrid/src/subscriptionClient.ts index 431b90d98a38..8141c14175c2 100644 --- a/sdk/subscription/arm-subscriptions-profile-2020-09-01-hybrid/src/subscriptionClient.ts +++ b/sdk/subscription/arm-subscriptions-profile-2020-09-01-hybrid/src/subscriptionClient.ts @@ -9,6 +9,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as Parameters from "./models/parameters"; @@ -24,10 +25,15 @@ class SubscriptionClient extends SubscriptionClientContext { /** * Initializes a new instance of the SubscriptionClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, options?: Models.SubscriptionClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, options?: Models.SubscriptionClientOptions) { super(credentials, options); this.operations = new operations.Operations(this); this.subscriptions = new operations.Subscriptions(this); diff --git a/sdk/subscription/arm-subscriptions-profile-2020-09-01-hybrid/src/subscriptionClientContext.ts b/sdk/subscription/arm-subscriptions-profile-2020-09-01-hybrid/src/subscriptionClientContext.ts index bcef1cc8ac0b..52dafc913ef9 100644 --- a/sdk/subscription/arm-subscriptions-profile-2020-09-01-hybrid/src/subscriptionClientContext.ts +++ b/sdk/subscription/arm-subscriptions-profile-2020-09-01-hybrid/src/subscriptionClientContext.ts @@ -10,21 +10,27 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-subscriptions-profile-2020-09-01-hybrid"; -const packageVersion = "1.0.0"; +const packageVersion = "1.1.0"; export class SubscriptionClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; apiVersion?: string; /** * Initializes a new instance of the SubscriptionClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, options?: Models.SubscriptionClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, options?: Models.SubscriptionClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } diff --git a/sdk/subscription/arm-subscriptions-profile-hybrid-2019-03-01/README.md b/sdk/subscription/arm-subscriptions-profile-hybrid-2019-03-01/README.md index 5996256d2f2a..584920a5b6c1 100644 --- a/sdk/subscription/arm-subscriptions-profile-hybrid-2019-03-01/README.md +++ b/sdk/subscription/arm-subscriptions-profile-hybrid-2019-03-01/README.md @@ -1,89 +1,100 @@ ## Azure SubscriptionClient SDK for JavaScript -This package contains an isomorphic SDK for SubscriptionClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for SubscriptionClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-subscriptions-profile-hybrid-2019-03-01` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: ```bash -npm install @azure/arm-subscriptions-profile-hybrid-2019-03-01 +npm install --save @azure/arm-subscriptions-profile-hybrid-2019-03-01 @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - Authentication, client creation and list operations as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -```bash -npm install @azure/ms-rest-nodeauth -``` +#### nodejs - Authentication, client creation, and list operations as an example written in JavaScript. ##### Sample code -```typescript -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { SubscriptionClient, SubscriptionModels, SubscriptionMappers } from "@azure/arm-subscriptions-profile-hybrid-2019-03-01"; +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { SubscriptionClient } = require("@azure/arm-subscriptions-profile-hybrid-2019-03-01"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new SubscriptionClient(creds, subscriptionId); - client.operations.list().then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new SubscriptionClient(creds, subscriptionId); + +client.operations.list().then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and list operations as an example written in JavaScript. +#### browser - Authentication, client creation, and list operations as an example written in JavaScript. -##### Install @azure/ms-rest-browserauth - -```bash -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-subscriptions-profile-hybrid-2019-03-01 sample - - + @@ -95,5 +106,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fsubscription%2Farm-subscriptions-profile-hybrid-2019-03-01%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/subscription/arm-subscriptions-profile-hybrid-2019-03-01/README.png) diff --git a/sdk/subscription/arm-subscriptions-profile-hybrid-2019-03-01/package.json b/sdk/subscription/arm-subscriptions-profile-hybrid-2019-03-01/package.json index 41779db9b83e..3328bf47c719 100644 --- a/sdk/subscription/arm-subscriptions-profile-hybrid-2019-03-01/package.json +++ b/sdk/subscription/arm-subscriptions-profile-hybrid-2019-03-01/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-subscriptions-profile-hybrid-2019-03-01", "author": "Microsoft Corporation", "description": "SubscriptionClient Library with typescript type definitions for node.js and browser.", - "version": "1.0.0", + "version": "1.1.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.3.2", - "@azure/ms-rest-js": "^1.8.1", + "@azure/ms-rest-azure-js": "^1.4.0", + "@azure/ms-rest-js": "^1.11.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.9.3" }, "keywords": [ @@ -21,7 +22,7 @@ "module": "./esm/subscriptionClient.js", "types": "./esm/subscriptionClient.d.ts", "devDependencies": { - "typescript": "^3.1.1", + "typescript": "^3.6.0", "rollup": "^0.66.2", "rollup-plugin-node-resolve": "^3.4.0", "rollup-plugin-sourcemaps": "^0.4.2", diff --git a/sdk/subscription/arm-subscriptions-profile-hybrid-2019-03-01/src/subscriptionClient.ts b/sdk/subscription/arm-subscriptions-profile-hybrid-2019-03-01/src/subscriptionClient.ts index 188113792eb6..26798d65c839 100644 --- a/sdk/subscription/arm-subscriptions-profile-hybrid-2019-03-01/src/subscriptionClient.ts +++ b/sdk/subscription/arm-subscriptions-profile-hybrid-2019-03-01/src/subscriptionClient.ts @@ -9,6 +9,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -23,10 +24,15 @@ class SubscriptionClient extends SubscriptionClientContext { /** * Initializes a new instance of the SubscriptionClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, options?: Models.SubscriptionClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, options?: Models.SubscriptionClientOptions) { super(credentials, options); this.operations = new operations.Operations(this); this.subscriptions = new operations.Subscriptions(this); diff --git a/sdk/subscription/arm-subscriptions-profile-hybrid-2019-03-01/src/subscriptionClientContext.ts b/sdk/subscription/arm-subscriptions-profile-hybrid-2019-03-01/src/subscriptionClientContext.ts index 112d5311b639..36f21676a48c 100644 --- a/sdk/subscription/arm-subscriptions-profile-hybrid-2019-03-01/src/subscriptionClientContext.ts +++ b/sdk/subscription/arm-subscriptions-profile-hybrid-2019-03-01/src/subscriptionClientContext.ts @@ -10,21 +10,27 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-subscriptions-profile-hybrid-2019-03-01"; -const packageVersion = "1.0.0"; +const packageVersion = "1.1.0"; export class SubscriptionClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; apiVersion?: string; /** * Initializes a new instance of the SubscriptionClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, options?: Models.SubscriptionClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, options?: Models.SubscriptionClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } diff --git a/sdk/support/arm-support/README.md b/sdk/support/arm-support/README.md index 967c7b23d6d9..38122e7912e5 100644 --- a/sdk/support/arm-support/README.md +++ b/sdk/support/arm-support/README.md @@ -1,90 +1,100 @@ ## Azure MicrosoftSupport SDK for JavaScript -This package contains an isomorphic SDK for MicrosoftSupport. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for MicrosoftSupport. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-support` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: ```bash -npm install @azure/arm-support +npm install --save @azure/arm-support @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - Authentication, client creation and list operations as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. -```bash -npm install @azure/ms-rest-nodeauth@"^3.0.0" -``` +#### nodejs - Authentication, client creation, and list operations as an example written in JavaScript. ##### Sample code -```typescript -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { MicrosoftSupport, MicrosoftSupportModels, MicrosoftSupportMappers } from "@azure/arm-support"; +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { MicrosoftSupport } = require("@azure/arm-support"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new MicrosoftSupport(creds, subscriptionId); - client.operations.list().then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new MicrosoftSupport(creds, subscriptionId); + +client.operations.list().then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and list operations as an example written in JavaScript. - -##### Install @azure/ms-rest-browserauth +#### browser - Authentication, client creation, and list operations as an example written in JavaScript. -```bash -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-support sample - - + diff --git a/sdk/support/arm-support/package.json b/sdk/support/arm-support/package.json index 275ea5195a21..de53022cc98d 100644 --- a/sdk/support/arm-support/package.json +++ b/sdk/support/arm-support/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-support", "author": "Microsoft Corporation", "description": "MicrosoftSupport Library with typescript type definitions for node.js and browser.", - "version": "1.0.0", + "version": "1.1.0", "dependencies": { - "@azure/ms-rest-azure-js": "^2.0.1", - "@azure/ms-rest-js": "^2.0.4", + "@azure/ms-rest-azure-js": "^2.1.0", + "@azure/ms-rest-js": "^2.2.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.10.0" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/microsoftSupport.js", "types": "./esm/microsoftSupport.d.ts", "devDependencies": { - "typescript": "^3.5.3", + "typescript": "^3.6.0", "rollup": "^1.18.0", "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", diff --git a/sdk/support/arm-support/src/microsoftSupport.ts b/sdk/support/arm-support/src/microsoftSupport.ts index 4b52aeb0dd1e..8395932926de 100644 --- a/sdk/support/arm-support/src/microsoftSupport.ts +++ b/sdk/support/arm-support/src/microsoftSupport.ts @@ -9,6 +9,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -25,11 +26,16 @@ class MicrosoftSupport extends MicrosoftSupportContext { /** * Initializes a new instance of the MicrosoftSupport class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId Azure subscription Id. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.MicrosoftSupportOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.MicrosoftSupportOptions) { super(credentials, subscriptionId, options); this.operations = new operations.Operations(this); this.services = new operations.Services(this); diff --git a/sdk/support/arm-support/src/microsoftSupportContext.ts b/sdk/support/arm-support/src/microsoftSupportContext.ts index 2ba89d1d59f5..c1d8a884823a 100644 --- a/sdk/support/arm-support/src/microsoftSupportContext.ts +++ b/sdk/support/arm-support/src/microsoftSupportContext.ts @@ -10,23 +10,29 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-support"; -const packageVersion = "1.0.0"; +const packageVersion = "1.1.0"; export class MicrosoftSupportContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; apiVersion?: string; /** * Initializes a new instance of the MicrosoftSupport class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId Azure subscription Id. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.MicrosoftSupportOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.MicrosoftSupportOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } From 719cb86b3cd6d280849047b4c6e9835de0093910 Mon Sep 17 00:00:00 2001 From: colawwj <70128817+colawwj@users.noreply.github.com> Date: Fri, 9 Jul 2021 08:55:54 +0800 Subject: [PATCH 13/28] 90 rp identity support (#16296) --- sdk/synapse/arm-synapse/README.md | 112 ++++++++++-------- sdk/synapse/arm-synapse/package.json | 9 +- .../src/synapseManagementClient.ts | 10 +- .../src/synapseManagementClientContext.ts | 14 ++- .../arm-timeseriesinsights/README.md | 104 ++++++++-------- .../arm-timeseriesinsights/package.json | 9 +- .../src/timeSeriesInsightsClient.ts | 10 +- .../src/timeSeriesInsightsClientContext.ts | 14 ++- sdk/visualstudio/arm-visualstudio/README.md | 108 +++++++++-------- .../arm-visualstudio/package.json | 9 +- .../src/visualStudioResourceProviderClient.ts | 10 +- ...sualStudioResourceProviderClientContext.ts | 14 ++- .../arm-vmwarecloudsimple/README.md | 106 +++++++++-------- .../arm-vmwarecloudsimple/package.json | 9 +- .../src/vMwareCloudSimpleClient.ts | 10 +- .../src/vMwareCloudSimpleClientContext.ts | 14 ++- 16 files changed, 327 insertions(+), 235 deletions(-) diff --git a/sdk/synapse/arm-synapse/README.md b/sdk/synapse/arm-synapse/README.md index 1bda5ed3936c..f7c40f51a535 100644 --- a/sdk/synapse/arm-synapse/README.md +++ b/sdk/synapse/arm-synapse/README.md @@ -1,95 +1,105 @@ ## Azure SynapseManagementClient SDK for JavaScript -This package contains an isomorphic SDK for SynapseManagementClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for SynapseManagementClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-synapse` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: ```bash -npm install @azure/arm-synapse +npm install --save @azure/arm-synapse @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - client creation and get bigDataPools as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. -```bash -npm install @azure/ms-rest-nodeauth@"^3.0.0" -``` +#### nodejs - Authentication, client creation, and get bigDataPools as an example written in JavaScript. ##### Sample code -While the below sample uses the interactive login, other authentication options can be found in the [README.md file of @azure/ms-rest-nodeauth](https://www.npmjs.com/package/@azure/ms-rest-nodeauth) package -```typescript -const msRestNodeAuth = require("@azure/ms-rest-nodeauth"); +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); const { SynapseManagementClient } = require("@azure/arm-synapse"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new SynapseManagementClient(creds, subscriptionId); - const resourceGroupName = "testresourceGroupName"; - const workspaceName = "testworkspaceName"; - const bigDataPoolName = "testbigDataPoolName"; - client.bigDataPools.get(resourceGroupName, workspaceName, bigDataPoolName).then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new SynapseManagementClient(creds, subscriptionId); +const resourceGroupName = "testresourceGroupName"; +const workspaceName = "testworkspaceName"; +const bigDataPoolName = "testbigDataPoolName"; +client.bigDataPools.get(resourceGroupName, workspaceName, bigDataPoolName).then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and get bigDataPools as an example written in JavaScript. +#### browser - Authentication, client creation, and get bigDataPools as an example written in JavaScript. -##### Install @azure/ms-rest-browserauth - -```bash -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-synapse sample - - + diff --git a/sdk/synapse/arm-synapse/package.json b/sdk/synapse/arm-synapse/package.json index c01cf1d6f7d6..22336c8f5773 100644 --- a/sdk/synapse/arm-synapse/package.json +++ b/sdk/synapse/arm-synapse/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-synapse", "author": "Microsoft Corporation", "description": "SynapseManagementClient Library with typescript type definitions for node.js and browser.", - "version": "5.1.0", + "version": "5.2.0", "dependencies": { - "@azure/ms-rest-azure-js": "^2.0.1", - "@azure/ms-rest-js": "^2.0.4", + "@azure/ms-rest-azure-js": "^2.1.0", + "@azure/ms-rest-js": "^2.2.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.10.0" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/synapseManagementClient.js", "types": "./esm/synapseManagementClient.d.ts", "devDependencies": { - "typescript": "^3.5.3", + "typescript": "^3.6.0", "rollup": "^1.18.0", "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", diff --git a/sdk/synapse/arm-synapse/src/synapseManagementClient.ts b/sdk/synapse/arm-synapse/src/synapseManagementClient.ts index b2adedb6fd50..1c289b9a605d 100644 --- a/sdk/synapse/arm-synapse/src/synapseManagementClient.ts +++ b/sdk/synapse/arm-synapse/src/synapseManagementClient.ts @@ -8,6 +8,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -80,11 +81,16 @@ class SynapseManagementClient extends SynapseManagementClientContext { /** * Initializes a new instance of the SynapseManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.SynapseManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.SynapseManagementClientOptions) { super(credentials, subscriptionId, options); this.bigDataPools = new operations.BigDataPools(this); this.operations = new operations.Operations(this); diff --git a/sdk/synapse/arm-synapse/src/synapseManagementClientContext.ts b/sdk/synapse/arm-synapse/src/synapseManagementClientContext.ts index 5e44f5084cde..9274fc474b11 100644 --- a/sdk/synapse/arm-synapse/src/synapseManagementClientContext.ts +++ b/sdk/synapse/arm-synapse/src/synapseManagementClientContext.ts @@ -9,23 +9,29 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-synapse"; -const packageVersion = "5.1.0"; +const packageVersion = "5.2.0"; export class SynapseManagementClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; apiVersion?: string; /** * Initializes a new instance of the SynapseManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.SynapseManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.SynapseManagementClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } diff --git a/sdk/timeseriesinsights/arm-timeseriesinsights/README.md b/sdk/timeseriesinsights/arm-timeseriesinsights/README.md index 06b870353566..6076933bd31b 100644 --- a/sdk/timeseriesinsights/arm-timeseriesinsights/README.md +++ b/sdk/timeseriesinsights/arm-timeseriesinsights/README.md @@ -1,90 +1,100 @@ ## Azure TimeSeriesInsightsClient SDK for JavaScript -This package contains an isomorphic SDK for TimeSeriesInsightsClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for TimeSeriesInsightsClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-timeseriesinsights` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: ```bash -npm install @azure/arm-timeseriesinsights +npm install --save @azure/arm-timeseriesinsights @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - Authentication, client creation and list operations as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. -```bash -npm install @azure/ms-rest-nodeauth@"^3.0.0" -``` +#### nodejs - Authentication, client creation, and list operations as an example written in JavaScript. ##### Sample code -```typescript -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { TimeSeriesInsightsClient, TimeSeriesInsightsModels, TimeSeriesInsightsMappers } from "@azure/arm-timeseriesinsights"; +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { TimeSeriesInsightsClient } = require("@azure/arm-timeseriesinsights"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new TimeSeriesInsightsClient(creds, subscriptionId); - client.operations.list().then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new TimeSeriesInsightsClient(creds, subscriptionId); + +client.operations.list().then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and list operations as an example written in JavaScript. - -##### Install @azure/ms-rest-browserauth +#### browser - Authentication, client creation, and list operations as an example written in JavaScript. -```bash -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-timeseriesinsights sample - - + diff --git a/sdk/timeseriesinsights/arm-timeseriesinsights/package.json b/sdk/timeseriesinsights/arm-timeseriesinsights/package.json index d16181f08035..2d7985567227 100644 --- a/sdk/timeseriesinsights/arm-timeseriesinsights/package.json +++ b/sdk/timeseriesinsights/arm-timeseriesinsights/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-timeseriesinsights", "author": "Microsoft Corporation", "description": "TimeSeriesInsightsClient Library with typescript type definitions for node.js and browser.", - "version": "1.2.1", + "version": "1.3.0", "dependencies": { - "@azure/ms-rest-azure-js": "^2.0.1", - "@azure/ms-rest-js": "^2.0.4", + "@azure/ms-rest-azure-js": "^2.1.0", + "@azure/ms-rest-js": "^2.2.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.10.0" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/timeSeriesInsightsClient.js", "types": "./esm/timeSeriesInsightsClient.d.ts", "devDependencies": { - "typescript": "^3.5.3", + "typescript": "^3.6.0", "rollup": "^1.18.0", "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", diff --git a/sdk/timeseriesinsights/arm-timeseriesinsights/src/timeSeriesInsightsClient.ts b/sdk/timeseriesinsights/arm-timeseriesinsights/src/timeSeriesInsightsClient.ts index e42685b68999..92bd53330bd6 100644 --- a/sdk/timeseriesinsights/arm-timeseriesinsights/src/timeSeriesInsightsClient.ts +++ b/sdk/timeseriesinsights/arm-timeseriesinsights/src/timeSeriesInsightsClient.ts @@ -9,6 +9,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -25,11 +26,16 @@ class TimeSeriesInsightsClient extends TimeSeriesInsightsClientContext { /** * Initializes a new instance of the TimeSeriesInsightsClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId Azure Subscription ID. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.TimeSeriesInsightsClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.TimeSeriesInsightsClientOptions) { super(credentials, subscriptionId, options); this.operations = new operations.Operations(this); this.environments = new operations.Environments(this); diff --git a/sdk/timeseriesinsights/arm-timeseriesinsights/src/timeSeriesInsightsClientContext.ts b/sdk/timeseriesinsights/arm-timeseriesinsights/src/timeSeriesInsightsClientContext.ts index a472e6cfb5f7..7a3cc5a196fb 100644 --- a/sdk/timeseriesinsights/arm-timeseriesinsights/src/timeSeriesInsightsClientContext.ts +++ b/sdk/timeseriesinsights/arm-timeseriesinsights/src/timeSeriesInsightsClientContext.ts @@ -10,23 +10,29 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-timeseriesinsights"; -const packageVersion = "1.2.1"; +const packageVersion = "1.3.0"; export class TimeSeriesInsightsClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; apiVersion?: string; /** * Initializes a new instance of the TimeSeriesInsightsClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId Azure Subscription ID. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.TimeSeriesInsightsClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.TimeSeriesInsightsClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } diff --git a/sdk/visualstudio/arm-visualstudio/README.md b/sdk/visualstudio/arm-visualstudio/README.md index 668b7d702b16..5b43aff9aa0b 100644 --- a/sdk/visualstudio/arm-visualstudio/README.md +++ b/sdk/visualstudio/arm-visualstudio/README.md @@ -1,89 +1,100 @@ ## Azure VisualStudioResourceProviderClient SDK for JavaScript -This package contains an isomorphic SDK for VisualStudioResourceProviderClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for VisualStudioResourceProviderClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites -``` -npm install @azure/arm-visualstudio +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-visualstudio` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: +```bash +npm install --save @azure/arm-visualstudio @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - Authentication, client creation and list operations as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -``` -npm install @azure/ms-rest-nodeauth -``` +#### nodejs - Authentication, client creation, and list operations as an example written in JavaScript. ##### Sample code -```ts -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { VisualStudioResourceProviderClient, VisualStudioResourceProviderModels, VisualStudioResourceProviderMappers } from "@azure/arm-visualstudio"; +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { VisualStudioResourceProviderClient } = require("@azure/arm-visualstudio"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new VisualStudioResourceProviderClient(creds, subscriptionId); - client.operations.list().then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new VisualStudioResourceProviderClient(creds, subscriptionId); + +client.operations.list().then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and list operations as an example written in JavaScript. - -##### Install @azure/ms-rest-browserauth +#### browser - Authentication, client creation, and list operations as an example written in JavaScript. -``` -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-visualstudio sample - - + @@ -95,5 +106,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fvisualstudio%2Farm-visualstudio%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/visualstudio/arm-visualstudio/README.png) diff --git a/sdk/visualstudio/arm-visualstudio/package.json b/sdk/visualstudio/arm-visualstudio/package.json index e5a4f09f2f82..1f69fe3a0500 100644 --- a/sdk/visualstudio/arm-visualstudio/package.json +++ b/sdk/visualstudio/arm-visualstudio/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-visualstudio", "author": "Microsoft Corporation", "description": "VisualStudioResourceProviderClient Library with typescript type definitions for node.js and browser.", - "version": "2.2.0", + "version": "2.3.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.1.0", - "@azure/ms-rest-js": "^1.1.0", + "@azure/ms-rest-azure-js": "^1.4.0", + "@azure/ms-rest-js": "^1.11.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.9.3" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/visualStudioResourceProviderClient.js", "types": "./esm/visualStudioResourceProviderClient.d.ts", "devDependencies": { - "typescript": "^3.1.1", + "typescript": "^3.6.0", "rollup": "^0.66.2", "rollup-plugin-node-resolve": "^3.4.0", "uglify-js": "^3.4.9" diff --git a/sdk/visualstudio/arm-visualstudio/src/visualStudioResourceProviderClient.ts b/sdk/visualstudio/arm-visualstudio/src/visualStudioResourceProviderClient.ts index f96554b8c9e7..0e47cd85f7c0 100644 --- a/sdk/visualstudio/arm-visualstudio/src/visualStudioResourceProviderClient.ts +++ b/sdk/visualstudio/arm-visualstudio/src/visualStudioResourceProviderClient.ts @@ -9,6 +9,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -24,11 +25,16 @@ class VisualStudioResourceProviderClient extends VisualStudioResourceProviderCli /** * Initializes a new instance of the VisualStudioResourceProviderClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The Azure subscription identifier. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.VisualStudioResourceProviderClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.VisualStudioResourceProviderClientOptions) { super(credentials, subscriptionId, options); this.operations = new operations.Operations(this); this.accounts = new operations.Accounts(this); diff --git a/sdk/visualstudio/arm-visualstudio/src/visualStudioResourceProviderClientContext.ts b/sdk/visualstudio/arm-visualstudio/src/visualStudioResourceProviderClientContext.ts index 92491e79696f..736d63d2a3b5 100644 --- a/sdk/visualstudio/arm-visualstudio/src/visualStudioResourceProviderClientContext.ts +++ b/sdk/visualstudio/arm-visualstudio/src/visualStudioResourceProviderClientContext.ts @@ -10,23 +10,29 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-visualstudio"; -const packageVersion = "0.1.0"; +const packageVersion = "2.3.0"; export class VisualStudioResourceProviderClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; apiVersion?: string; /** * Initializes a new instance of the VisualStudioResourceProviderClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The Azure subscription identifier. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.VisualStudioResourceProviderClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.VisualStudioResourceProviderClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } diff --git a/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/README.md b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/README.md index a5d845825218..7fe7e0ea23d6 100644 --- a/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/README.md +++ b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/README.md @@ -1,90 +1,100 @@ ## Azure VMwareCloudSimpleClient SDK for JavaScript -This package contains an isomorphic SDK for VMwareCloudSimpleClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for VMwareCloudSimpleClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-vmwarecloudsimple` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: ```bash -npm install @azure/arm-vmwarecloudsimple +npm install --save @azure/arm-vmwarecloudsimple @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - Authentication, client creation and list operations as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. -```bash -npm install @azure/ms-rest-nodeauth@"^3.0.0" -``` +#### nodejs - Authentication, client creation, and list operations as an example written in JavaScript. ##### Sample code -```typescript -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { VMwareCloudSimpleClient, VMwareCloudSimpleModels, VMwareCloudSimpleMappers } from "@azure/arm-vmwarecloudsimple"; +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { VMwareCloudSimpleClient } = require("@azure/arm-vmwarecloudsimple"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new VMwareCloudSimpleClient(creds, subscriptionId); - client.operations.list().then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new VMwareCloudSimpleClient(creds, subscriptionId); + +client.operations.list().then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and list operations as an example written in JavaScript. - -##### Install @azure/ms-rest-browserauth +#### browser - Authentication, client creation, and list operations as an example written in JavaScript. -```bash -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-vmwarecloudsimple sample - - + @@ -96,4 +106,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fvmwarecloudsimple%2Farm-vmwarecloudsimple%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/README.png) diff --git a/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/package.json b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/package.json index 2c614357cfc1..5ddf8b14ee49 100644 --- a/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/package.json +++ b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-vmwarecloudsimple", "author": "Microsoft Corporation", "description": "VMwareCloudSimpleClient Library with typescript type definitions for node.js and browser.", - "version": "1.0.0", + "version": "1.1.0", "dependencies": { - "@azure/ms-rest-azure-js": "^2.0.1", - "@azure/ms-rest-js": "^2.0.4", + "@azure/ms-rest-azure-js": "^2.1.0", + "@azure/ms-rest-js": "^2.2.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.10.0" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/vMwareCloudSimpleClient.js", "types": "./esm/vMwareCloudSimpleClient.d.ts", "devDependencies": { - "typescript": "^3.5.3", + "typescript": "^3.6.0", "rollup": "^1.18.0", "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", diff --git a/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/vMwareCloudSimpleClient.ts b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/vMwareCloudSimpleClient.ts index dfebce6d20b3..b30d98c95adf 100644 --- a/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/vMwareCloudSimpleClient.ts +++ b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/vMwareCloudSimpleClient.ts @@ -9,6 +9,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -30,12 +31,17 @@ class VMwareCloudSimpleClient extends VMwareCloudSimpleClientContext { /** * Initializes a new instance of the VMwareCloudSimpleClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The subscription ID. * @param referer referer url * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, referer: string, options?: Models.VMwareCloudSimpleClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, referer: string, options?: Models.VMwareCloudSimpleClientOptions) { super(credentials, subscriptionId, referer, options); this.operations = new operations.Operations(this); this.dedicatedCloudNodes = new operations.DedicatedCloudNodes(this); diff --git a/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/vMwareCloudSimpleClientContext.ts b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/vMwareCloudSimpleClientContext.ts index 4110fc980a0a..735cf0f942e7 100644 --- a/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/vMwareCloudSimpleClientContext.ts +++ b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/vMwareCloudSimpleClientContext.ts @@ -10,25 +10,31 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-vmwarecloudsimple"; -const packageVersion = "1.0.0"; +const packageVersion = "1.1.0"; export class VMwareCloudSimpleClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; apiVersion?: string; referer: string; /** * Initializes a new instance of the VMwareCloudSimpleClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The subscription ID. * @param referer referer url * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, referer: string, options?: Models.VMwareCloudSimpleClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, referer: string, options?: Models.VMwareCloudSimpleClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } From 35fc536f443454b23b21bc7d63a86c07a9465369 Mon Sep 17 00:00:00 2001 From: colawwj <70128817+colawwj@users.noreply.github.com> Date: Fri, 9 Jul 2021 14:57:20 +0800 Subject: [PATCH 14/28] arm-databricks-release (#16327) --- sdk/databricks/arm-databricks/LICENSE.txt | 2 +- sdk/databricks/arm-databricks/README.md | 115 +- sdk/databricks/arm-databricks/package.json | 31 +- .../arm-databricks/rollup.config.js | 24 +- .../src/azureDatabricksManagementClient.ts | 55 + ...azureDatabricksManagementClientContext.ts} | 31 +- .../arm-databricks/src/databricksClient.ts | 44 - .../arm-databricks/src/models/index.ts | 1287 ++++++++++++++--- .../arm-databricks/src/models/mappers.ts | 975 ++++++++++++- .../src/models/operationsMappers.ts | 17 +- .../arm-databricks/src/models/parameters.ts | 51 +- .../privateEndpointConnectionsMappers.ts | 43 + .../src/models/privateLinkResourcesMappers.ts | 43 + .../src/models/vNetPeeringMappers.ts | 43 + .../src/models/workspacesMappers.ts | 50 +- .../arm-databricks/src/operations/index.ts | 8 +- .../src/operations/operations.ts | 18 +- .../operations/privateEndpointConnections.ts | 339 +++++ .../src/operations/privateLinkResources.ts | 203 +++ .../src/operations/vNetPeering.ts | 333 +++++ .../src/operations/workspaces.ts | 33 +- sdk/databricks/arm-databricks/tsconfig.json | 2 +- 22 files changed, 3322 insertions(+), 425 deletions(-) create mode 100644 sdk/databricks/arm-databricks/src/azureDatabricksManagementClient.ts rename sdk/databricks/arm-databricks/src/{databricksClientContext.ts => azureDatabricksManagementClientContext.ts} (55%) delete mode 100644 sdk/databricks/arm-databricks/src/databricksClient.ts create mode 100644 sdk/databricks/arm-databricks/src/models/privateEndpointConnectionsMappers.ts create mode 100644 sdk/databricks/arm-databricks/src/models/privateLinkResourcesMappers.ts create mode 100644 sdk/databricks/arm-databricks/src/models/vNetPeeringMappers.ts create mode 100644 sdk/databricks/arm-databricks/src/operations/privateEndpointConnections.ts create mode 100644 sdk/databricks/arm-databricks/src/operations/privateLinkResources.ts create mode 100644 sdk/databricks/arm-databricks/src/operations/vNetPeering.ts diff --git a/sdk/databricks/arm-databricks/LICENSE.txt b/sdk/databricks/arm-databricks/LICENSE.txt index a70e8cf66038..2d3163745319 100644 --- a/sdk/databricks/arm-databricks/LICENSE.txt +++ b/sdk/databricks/arm-databricks/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2018 Microsoft +Copyright (c) 2021 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/databricks/arm-databricks/README.md b/sdk/databricks/arm-databricks/README.md index a98459c8bb4d..b95c4cee0248 100644 --- a/sdk/databricks/arm-databricks/README.md +++ b/sdk/databricks/arm-databricks/README.md @@ -1,93 +1,101 @@ -## Azure DatabricksClient SDK for JavaScript +## Azure AzureDatabricksManagementClient SDK for JavaScript -This package contains an isomorphic SDK for DatabricksClient. +This package contains an isomorphic SDK (runs both in node.js and in browsers) for AzureDatabricksManagementClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge and Firefox. -### How to Install +### Prerequisites +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-databricks` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: +```bash +npm install --save @azure/arm-databricks @azure/identity ``` -npm install @azure/arm-databricks -``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. ### How to use -#### nodejs - Authentication, client creation and get workspaces as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth - -``` -npm install @azure/ms-rest-nodeauth -``` +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. +#### nodejs - Authentication, client creation, and get workspaces as an example written in JavaScript. ##### Sample code -```ts -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { DatabricksClient, DatabricksModels, DatabricksMappers } from "@azure/arm-databricks"; +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { AzureDatabricksManagementClient } = require("@azure/arm-databricks"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new DatabricksClient(creds, subscriptionId); - const resourceGroupName = "testresourceGroupName"; - const workspaceName = "testworkspaceName"; - client.workspaces.get(resourceGroupName, workspaceName).then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new AzureDatabricksManagementClient(creds, subscriptionId); +const resourceGroupName = "testresourceGroupName"; +const workspaceName = "testworkspaceName"; +client.workspaces.get(resourceGroupName, workspaceName).then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and get workspaces as an example written in JavaScript. +#### browser - Authentication, client creation, and get workspaces as an example written in JavaScript. -##### Install @azure/ms-rest-browserauth - -``` -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-databricks sample - - + @@ -99,5 +107,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fdatabricks%2Farm-databricks%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/databricks/arm-databricks/README.png) diff --git a/sdk/databricks/arm-databricks/package.json b/sdk/databricks/arm-databricks/package.json index bf9a5c43a413..050a2526cc69 100644 --- a/sdk/databricks/arm-databricks/package.json +++ b/sdk/databricks/arm-databricks/package.json @@ -1,12 +1,13 @@ { "name": "@azure/arm-databricks", "author": "Microsoft Corporation", - "description": "DatabricksClient Library with typescript type definitions for node.js and browser.", - "version": "1.1.0", + "description": "AzureDatabricksManagementClient Library with typescript type definitions for node.js and browser.", + "version": "2.0.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.1.0", - "@azure/ms-rest-js": "^1.1.0", - "tslib": "^1.9.3" + "@azure/ms-rest-azure-js": "^2.1.0", + "@azure/ms-rest-js": "^2.2.0", + "@azure/core-auth": "^1.1.4", + "tslib": "^1.10.0" }, "keywords": [ "node", @@ -17,21 +18,22 @@ ], "license": "MIT", "main": "./dist/arm-databricks.js", - "module": "./esm/databricksClient.js", - "types": "./esm/databricksClient.d.ts", + "module": "./esm/azureDatabricksManagementClient.js", + "types": "./esm/azureDatabricksManagementClient.d.ts", "devDependencies": { - "typescript": "^3.1.1", - "rollup": "^0.66.2", - "rollup-plugin-node-resolve": "^3.4.0", - "uglify-js": "^3.4.9" + "typescript": "^3.6.0", + "rollup": "^1.18.0", + "rollup-plugin-node-resolve": "^5.2.0", + "rollup-plugin-sourcemaps": "^0.4.2", + "uglify-js": "^3.6.0" }, - "homepage": "https://github.com/azure/azure-sdk-for-js/tree/main/sdk/databricks/arm-databricks", + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/feature/v4/sdk/databricks/arm-databricks", "repository": { "type": "git", - "url": "https://github.com/azure/azure-sdk-for-js.git" + "url": "https://github.com/Azure/azure-sdk-for-js.git" }, "bugs": { - "url": "https://github.com/azure/azure-sdk-for-js/issues" + "url": "https://github.com/Azure/azure-sdk-for-js/issues" }, "files": [ "dist/**/*.js", @@ -43,6 +45,7 @@ "esm/**/*.d.ts", "esm/**/*.d.ts.map", "src/**/*.ts", + "README.md", "rollup.config.js", "tsconfig.json" ], diff --git a/sdk/databricks/arm-databricks/rollup.config.js b/sdk/databricks/arm-databricks/rollup.config.js index 10910c284024..c802420682fb 100644 --- a/sdk/databricks/arm-databricks/rollup.config.js +++ b/sdk/databricks/arm-databricks/rollup.config.js @@ -1,10 +1,16 @@ +import rollup from "rollup"; import nodeResolve from "rollup-plugin-node-resolve"; +import sourcemaps from "rollup-plugin-sourcemaps"; + /** - * @type {import('rollup').RollupFileOptions} + * @type {rollup.RollupFileOptions} */ const config = { - input: './esm/databricksClient.js', - external: ["@azure/ms-rest-js", "@azure/ms-rest-azure-js"], + input: "./esm/azureDatabricksManagementClient.js", + external: [ + "@azure/ms-rest-js", + "@azure/ms-rest-azure-js" + ], output: { file: "./dist/arm-databricks.js", format: "umd", @@ -15,17 +21,17 @@ const config = { "@azure/ms-rest-azure-js": "msRestAzure" }, banner: `/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */` }, plugins: [ - nodeResolve({ module: true }) + nodeResolve({ mainFields: ['module', 'main'] }), + sourcemaps() ] }; + export default config; diff --git a/sdk/databricks/arm-databricks/src/azureDatabricksManagementClient.ts b/sdk/databricks/arm-databricks/src/azureDatabricksManagementClient.ts new file mode 100644 index 000000000000..5d55e69868a9 --- /dev/null +++ b/sdk/databricks/arm-databricks/src/azureDatabricksManagementClient.ts @@ -0,0 +1,55 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; +import * as Models from "./models"; +import * as Mappers from "./models/mappers"; +import * as operations from "./operations"; +import { AzureDatabricksManagementClientContext } from "./azureDatabricksManagementClientContext"; + + +class AzureDatabricksManagementClient extends AzureDatabricksManagementClientContext { + // Operation groups + workspaces: operations.Workspaces; + operations: operations.Operations; + privateLinkResources: operations.PrivateLinkResources; + privateEndpointConnections: operations.PrivateEndpointConnections; + vNetPeering: operations.VNetPeering; + + /** + * Initializes a new instance of the AzureDatabricksManagementClient class. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. + * @param subscriptionId The ID of the target subscription. + * @param [options] The parameter options + */ + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.AzureDatabricksManagementClientOptions) { + super(credentials, subscriptionId, options); + this.workspaces = new operations.Workspaces(this); + this.operations = new operations.Operations(this); + this.privateLinkResources = new operations.PrivateLinkResources(this); + this.privateEndpointConnections = new operations.PrivateEndpointConnections(this); + this.vNetPeering = new operations.VNetPeering(this); + } +} + +// Operation Specifications + +export { + AzureDatabricksManagementClient, + AzureDatabricksManagementClientContext, + Models as AzureDatabricksManagementModels, + Mappers as AzureDatabricksManagementMappers +}; +export * from "./operations"; diff --git a/sdk/databricks/arm-databricks/src/databricksClientContext.ts b/sdk/databricks/arm-databricks/src/azureDatabricksManagementClientContext.ts similarity index 55% rename from sdk/databricks/arm-databricks/src/databricksClientContext.ts rename to sdk/databricks/arm-databricks/src/azureDatabricksManagementClientContext.ts index be3305b83c0f..56998e973ae1 100644 --- a/sdk/databricks/arm-databricks/src/databricksClientContext.ts +++ b/sdk/databricks/arm-databricks/src/azureDatabricksManagementClientContext.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -11,22 +10,27 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; import * as msRestAzure from "@azure/ms-rest-azure-js"; +import { TokenCredential } from "@azure/core-auth"; const packageName = "@azure/arm-databricks"; -const packageVersion = "0.1.0"; +const packageVersion = "2.0.0"; -export class DatabricksClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; +export class AzureDatabricksManagementClientContext extends msRestAzure.AzureServiceClient { + credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; - apiVersion?: string; /** - * Initializes a new instance of the DatabricksClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * Initializes a new instance of the AzureDatabricksManagementClient class. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.DatabricksClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.AzureDatabricksManagementClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } @@ -37,14 +41,13 @@ export class DatabricksClientContext extends msRestAzure.AzureServiceClient { if (!options) { options = {}; } - if(!options.userAgent) { + if (!options.userAgent) { const defaultUserAgent = msRestAzure.getDefaultUserAgentValue(); options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`; } super(credentials, options); - this.apiVersion = '2018-04-01'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; @@ -52,10 +55,10 @@ export class DatabricksClientContext extends msRestAzure.AzureServiceClient { this.credentials = credentials; this.subscriptionId = subscriptionId; - if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) { + if (options.acceptLanguage !== null && options.acceptLanguage !== undefined) { this.acceptLanguage = options.acceptLanguage; } - if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { + if (options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout; } } diff --git a/sdk/databricks/arm-databricks/src/databricksClient.ts b/sdk/databricks/arm-databricks/src/databricksClient.ts deleted file mode 100644 index ef1cc667e629..000000000000 --- a/sdk/databricks/arm-databricks/src/databricksClient.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -import * as msRest from "@azure/ms-rest-js"; -import * as Models from "./models"; -import * as Mappers from "./models/mappers"; -import * as operations from "./operations"; -import { DatabricksClientContext } from "./databricksClientContext"; - - -class DatabricksClient extends DatabricksClientContext { - // Operation groups - workspaces: operations.Workspaces; - operations: operations.Operations; - - /** - * Initializes a new instance of the DatabricksClient class. - * @param credentials Credentials needed for the client to connect to Azure. - * @param subscriptionId The ID of the target subscription. - * @param [options] The parameter options - */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.DatabricksClientOptions) { - super(credentials, subscriptionId, options); - this.workspaces = new operations.Workspaces(this); - this.operations = new operations.Operations(this); - } -} - -// Operation Specifications - -export { - DatabricksClient, - DatabricksClientContext, - Models as DatabricksModels, - Mappers as DatabricksMappers -}; -export * from "./operations"; diff --git a/sdk/databricks/arm-databricks/src/models/index.ts b/sdk/databricks/arm-databricks/src/models/index.ts index 5b622f068da9..356dc9ebbf76 100644 --- a/sdk/databricks/arm-databricks/src/models/index.ts +++ b/sdk/databricks/arm-databricks/src/models/index.ts @@ -1,11 +1,9 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ import { BaseResource, CloudError, AzureServiceClientOptions } from "@azure/ms-rest-azure-js"; @@ -13,307 +11,1153 @@ import * as msRest from "@azure/ms-rest-js"; export { BaseResource, CloudError }; +/** + * The Value. + */ +export interface WorkspaceCustomStringParameter { + /** + * The type of variable that this is. Possible values include: 'Bool', 'Object', 'String' + */ + type?: CustomParameterType; + /** + * The value which should be used for this field. + */ + value: string; +} + +/** + * The value which should be used for this field. + */ +export interface WorkspaceCustomBooleanParameter { + /** + * The type of variable that this is. Possible values include: 'Bool', 'Object', 'String' + */ + type?: CustomParameterType; + /** + * The value which should be used for this field. + */ + value: boolean; +} + +/** + * The object that contains details of encryption used on the workspace. + */ +export interface Encryption { + /** + * The encryption keySource (provider). Possible values (case-insensitive): Default, + * Microsoft.Keyvault. Possible values include: 'Default', 'Microsoft.Keyvault'. Default value: + * 'Default'. + */ + keySource?: KeySource; + /** + * The name of KeyVault key. + */ + keyName?: string; + /** + * The version of KeyVault key. + */ + keyVersion?: string; + /** + * The Uri of KeyVault. + */ + keyVaultUri?: string; +} + +/** + * The object that contains details of encryption used on the workspace. + */ +export interface WorkspaceEncryptionParameter { + /** + * The type of variable that this is. Possible values include: 'Bool', 'Object', 'String' + */ + type?: CustomParameterType; + /** + * The value which should be used for this field. + */ + value?: Encryption; +} + +/** + * The value which should be used for this field. + */ +export interface WorkspaceCustomObjectParameter { + /** + * The type of variable that this is. Possible values include: 'Bool', 'Object', 'String' + */ + type?: CustomParameterType; + /** + * The value which should be used for this field. + */ + value: any; +} + +/** + * Custom Parameters used for Cluster Creation. + */ +export interface WorkspaceCustomParameters { + /** + * The ID of a Azure Machine Learning workspace to link with Databricks workspace + */ + amlWorkspaceId?: WorkspaceCustomStringParameter; + /** + * The ID of a Virtual Network where this Databricks Cluster should be created + */ + customVirtualNetworkId?: WorkspaceCustomStringParameter; + /** + * The name of a Public Subnet within the Virtual Network + */ + customPublicSubnetName?: WorkspaceCustomStringParameter; + /** + * The name of the Private Subnet within the Virtual Network + */ + customPrivateSubnetName?: WorkspaceCustomStringParameter; + /** + * Should the Public IP be Disabled? + */ + enableNoPublicIp?: WorkspaceCustomBooleanParameter; + /** + * Name of the outbound Load Balancer Backend Pool for Secure Cluster Connectivity (No Public + * IP). + */ + loadBalancerBackendPoolName?: WorkspaceCustomStringParameter; + /** + * Resource URI of Outbound Load balancer for Secure Cluster Connectivity (No Public IP) + * workspace. + */ + loadBalancerId?: WorkspaceCustomStringParameter; + /** + * Name of the NAT gateway for Secure Cluster Connectivity (No Public IP) workspace subnets. + */ + natGatewayName?: WorkspaceCustomStringParameter; + /** + * Name of the Public IP for No Public IP workspace with managed vNet. + */ + publicIpName?: WorkspaceCustomStringParameter; + /** + * Prepare the workspace for encryption. Enables the Managed Identity for managed storage + * account. + */ + prepareEncryption?: WorkspaceCustomBooleanParameter; + /** + * Contains the encryption details for Customer-Managed Key (CMK) enabled workspace. + */ + encryption?: WorkspaceEncryptionParameter; + /** + * A boolean indicating whether or not the DBFS root file system will be enabled with secondary + * layer of encryption with platform managed keys for data at rest. + */ + requireInfrastructureEncryption?: WorkspaceCustomBooleanParameter; + /** + * Default DBFS storage account name. + */ + storageAccountName?: WorkspaceCustomStringParameter; + /** + * Storage account SKU name, ex: Standard_GRS, Standard_LRS. Refer https://aka.ms/storageskus for + * valid inputs. + */ + storageAccountSkuName?: WorkspaceCustomStringParameter; + /** + * Address prefix for Managed virtual network. Default value for this input is 10.139. + */ + vnetAddressPrefix?: WorkspaceCustomStringParameter; + /** + * Tags applied to resources under Managed resource group. These can be updated by updating tags + * at workspace level. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly resourceTags?: WorkspaceCustomObjectParameter; +} /** - * @interface - * An interface representing WorkspaceProviderAuthorization. * The workspace provider authorization. - * */ export interface WorkspaceProviderAuthorization { /** - * @member {string} principalId The provider's principal identifier. This is - * the identity that the provider will use to call ARM to manage the - * workspace resources. + * The provider's principal identifier. This is the identity that the provider will use to call + * ARM to manage the workspace resources. */ principalId: string; /** - * @member {string} roleDefinitionId The provider's role definition - * identifier. This role will define all the permissions that the provider - * must have on the workspace's container resource group. This role - * definition cannot have permission to delete the resource group. + * The provider's role definition identifier. This role will define all the permissions that the + * provider must have on the workspace's container resource group. This role definition cannot + * have permission to delete the resource group. */ roleDefinitionId: string; } /** - * @interface - * An interface representing Sku. + * Provides details of the entity that created/updated the workspace. + */ +export interface CreatedBy { + /** + * The Object ID that created the workspace. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly oid?: string; + /** + * The Personal Object ID corresponding to the object ID above + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly puid?: string; + /** + * The application ID of the application that initiated the creation of the workspace. For + * example, Azure Portal. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly applicationId?: string; +} + +/** + * The Managed Identity details for storage account. + */ +export interface ManagedIdentityConfiguration { + /** + * The objectId of the Managed Identity that is linked to the Managed Storage account. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly principalId?: string; + /** + * The tenant Id where the Managed Identity is created. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly tenantId?: string; + /** + * The type of Identity created. It can be either SystemAssigned or UserAssigned. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; +} + +/** + * Key Vault input properties for encryption. + */ +export interface EncryptionV2KeyVaultProperties { + /** + * The Uri of KeyVault. + */ + keyVaultUri: string; + /** + * The name of KeyVault key. + */ + keyName: string; + /** + * The version of KeyVault key. + */ + keyVersion: string; +} + +/** + * The object that contains details of encryption used on the workspace. + */ +export interface EncryptionV2 { + /** + * Key Vault input properties for encryption. + */ + keyVaultProperties?: EncryptionV2KeyVaultProperties; +} + +/** + * Encryption entities for databricks workspace resource. + */ +export interface EncryptionEntitiesDefinition { + /** + * Encryption properties for the databricks managed services. + */ + managedServices?: EncryptionV2; +} + +/** + * Encryption properties for databricks workspace + */ +export interface WorkspacePropertiesEncryption { + /** + * Encryption entities definition for the workspace. + */ + entities: EncryptionEntitiesDefinition; +} + +/** + * The private endpoint property of a private endpoint connection + */ +export interface PrivateEndpoint { + /** + * The resource identifier. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; +} + +/** + * The current state of a private endpoint connection + */ +export interface PrivateLinkServiceConnectionState { + /** + * The status of a private endpoint connection. Possible values include: 'Pending', 'Approved', + * 'Rejected', 'Disconnected' + */ + status: PrivateLinkServiceConnectionStatus; + /** + * The description for the current state of a private endpoint connection + */ + description?: string; + /** + * Actions required for a private endpoint connection + */ + actionRequired?: string; +} + +/** + * The properties of a private endpoint connection + */ +export interface PrivateEndpointConnectionProperties { + /** + * Private endpoint. Private endpoint + */ + privateEndpoint?: PrivateEndpoint; + /** + * Private link service service connection state. Private endpoint connection state + */ + privateLinkServiceConnectionState: PrivateLinkServiceConnectionState; + /** + * Provisioning state of the private endpoint connection. Possible values include: 'Succeeded', + * 'Creating', 'Updating', 'Deleting', 'Failed' + */ + provisioningState?: PrivateEndpointConnectionProvisioningState; +} + +/** + * The private endpoint connection of a workspace + */ +export interface PrivateEndpointConnection extends BaseResource { + /** + * The resource identifier. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * The resource name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * The resource type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * The private endpoint connection properties. + */ + properties: PrivateEndpointConnectionProperties; +} + +/** * SKU for the resource. - * */ export interface Sku { /** - * @member {string} name The SKU name. + * The SKU name. */ name: string; /** - * @member {string} [tier] The SKU tier. + * The SKU tier. */ tier?: string; } /** - * @interface - * An interface representing Resource. + * 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. Possible values include: 'User', + * 'Application', 'ManagedIdentity', 'Key' + */ + 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. Possible values include: 'User', + * 'Application', 'ManagedIdentity', 'Key' + */ + lastModifiedByType?: CreatedByType; + /** + * The timestamp of resource last modification (UTC) + */ + lastModifiedAt?: Date; +} + +/** * The core properties of ARM resources - * - * @extends BaseResource */ export interface Resource extends BaseResource { /** - * @member {string} [id] Fully qualified resource Id for the resource. Ex - + * Fully qualified resource Id for the resource. Ex - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; /** - * @member {string} [name] The name of the resource - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The name of the resource + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; /** - * @member {string} [type] The type of the resource. Ex- - * Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The type of the resource. Ex- Microsoft.Compute/virtualMachines or + * Microsoft.Storage/storageAccounts. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly type?: string; } /** - * @interface - * An interface representing TrackedResource. * The resource model definition for a ARM tracked top level resource - * - * @extends Resource */ export interface TrackedResource extends Resource { /** - * @member {{ [propertyName: string]: string }} [tags] Resource tags. + * Resource tags. */ tags?: { [propertyName: string]: string }; /** - * @member {string} location The geo-location where the resource lives + * The geo-location where the resource lives */ location: string; } /** - * @interface - * An interface representing Workspace. * Information about workspace. - * - * @extends TrackedResource */ export interface Workspace extends TrackedResource { /** - * @member {string} managedResourceGroupId The managed resource group Id. + * The managed resource group Id. */ managedResourceGroupId: string; /** - * @member {any} [parameters] Name and value pairs that define the workspace - * parameters. + * The workspace's custom parameters. */ - parameters?: any; + parameters?: WorkspaceCustomParameters; /** - * @member {ProvisioningState} [provisioningState] The workspace provisioning - * state. Possible values include: 'Accepted', 'Running', 'Ready', - * 'Creating', 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', - * 'Succeeded', 'Updating' - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The workspace provisioning state. Possible values include: 'Accepted', 'Running', 'Ready', + * 'Creating', 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', 'Succeeded', 'Updating' + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly provisioningState?: ProvisioningState; /** - * @member {string} [uiDefinitionUri] The blob URI where the UI definition - * file is located. + * The blob URI where the UI definition file is located. */ uiDefinitionUri?: string; /** - * @member {WorkspaceProviderAuthorization[]} [authorizations] The workspace - * provider authorizations. + * The workspace provider authorizations. */ authorizations?: WorkspaceProviderAuthorization[]; /** - * @member {Sku} [sku] The SKU of the resource. + * Indicates the Object ID, PUID and Application ID of entity that created the workspace. + */ + createdBy?: CreatedBy; + /** + * Indicates the Object ID, PUID and Application ID of entity that last updated the workspace. + */ + updatedBy?: CreatedBy; + /** + * Specifies the date and time when the workspace is created. + */ + createdDateTime?: Date; + /** + * The unique identifier of the databricks workspace in databricks control plane. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly workspaceId?: string; + /** + * The workspace URL which is of the format 'adb-{workspaceId}.{random}.azuredatabricks.net' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly workspaceUrl?: string; + /** + * The details of Managed Identity of Storage Account + */ + storageAccountIdentity?: ManagedIdentityConfiguration; + /** + * Encryption properties for databricks workspace + */ + encryption?: WorkspacePropertiesEncryption; + /** + * Private endpoint connections created on the workspace + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly privateEndpointConnections?: PrivateEndpointConnection[]; + /** + * The network access type for accessing workspace. Set value to disabled to access workspace + * only via private link. Possible values include: 'Enabled', 'Disabled' + */ + publicNetworkAccess?: PublicNetworkAccess; + /** + * Gets or sets a value indicating whether data plane (clusters) to control plane communication + * happen over private endpoint. Supported values are 'AllRules' and 'NoAzureDatabricksRules'. + * 'NoAzureServiceRules' value is for internal use only. Possible values include: 'AllRules', + * 'NoAzureDatabricksRules', 'NoAzureServiceRules' + */ + requiredNsgRules?: RequiredNsgRules; + /** + * The SKU of the resource. */ sku?: Sku; + /** + * The system metadata relating to this resource + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly systemData?: SystemData; +} + +/** + * An update to a workspace. + */ +export interface WorkspaceUpdate { + /** + * Resource tags. + */ + tags?: { [propertyName: string]: string }; +} + +/** + * An interface representing ErrorDetail. + * @summary Error details. + */ +export interface ErrorDetail { + /** + * The error's code. + */ + code: string; + /** + * A human readable error message. + */ + message: string; + /** + * Indicates which property in the request is responsible for the error. + */ + target?: string; } /** - * @interface - * An interface representing WorkspaceUpdate. - * An update to a workspace. - * + * An interface representing ErrorInfo. + * @summary The code and message for an error. + */ +export interface ErrorInfo { + /** + * A machine readable error code. + */ + code: string; + /** + * A human readable error message. + */ + message: string; + /** + * error details. + */ + details?: ErrorDetail[]; + /** + * Inner error details if they exist. + */ + innererror?: string; +} + +/** + * Contains details when the response code indicates an error. + * @summary Error response. + */ +export interface ErrorResponse { + /** + * The error details. + */ + error: ErrorInfo; +} + +/** + * The object that represents the operation. + */ +export interface OperationDisplay { + /** + * Service provider: Microsoft.ResourceProvider + */ + provider?: string; + /** + * Resource on which the operation is performed. + */ + resource?: string; + /** + * Operation type: Read, write, delete, etc. + */ + operation?: string; +} + +/** + * REST API operation + */ +export interface Operation { + /** + * Operation name: {provider}/{resource}/{operation} + */ + name?: string; + /** + * The object that represents the operation. + */ + display?: OperationDisplay; +} + +/** + * The properties for a group information object + */ +export interface GroupIdInformationProperties { + /** + * The group id + */ + groupId?: string; + /** + * The required members for a specific group id + */ + requiredMembers?: string[]; + /** + * The required DNS zones for a specific group id + */ + requiredZoneNames?: string[]; +} + +/** + * The group information for creating a private endpoint on a workspace + */ +export interface GroupIdInformation extends Resource { + /** + * The group id properties. + */ + properties: GroupIdInformationProperties; +} + +/** + * The remote virtual network should be in the same region. See here to learn more + * (https://docs.microsoft.com/en-us/azure/databricks/administration-guide/cloud-configurations/azure/vnet-peering). + */ +export interface VirtualNetworkPeeringPropertiesFormatDatabricksVirtualNetwork { + /** + * The Id of the databricks virtual network. + */ + id?: string; +} + +/** + * AddressSpace contains an array of IP address ranges that can be used by subnets of the virtual + * network. + */ +export interface AddressSpace { + /** + * A list of address blocks reserved for this virtual network in CIDR notation. + */ + addressPrefixes?: string[]; +} + +/** + * The remote virtual network should be in the same region. See here to learn more + * (https://docs.microsoft.com/en-us/azure/databricks/administration-guide/cloud-configurations/azure/vnet-peering). + */ +export interface VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetwork { + /** + * The Id of the remote virtual network. + */ + id?: string; +} + +/** + * Peerings in a VirtualNetwork resource + */ +export interface VirtualNetworkPeering extends BaseResource { + /** + * Whether the VMs in the local virtual network space would be able to access the VMs in remote + * virtual network space. + */ + allowVirtualNetworkAccess?: boolean; + /** + * Whether the forwarded traffic from the VMs in the local virtual network will be + * allowed/disallowed in remote virtual network. + */ + allowForwardedTraffic?: boolean; + /** + * If gateway links can be used in remote virtual networking to link to this virtual network. + */ + allowGatewayTransit?: boolean; + /** + * If remote gateways can be used on this virtual network. If the flag is set to true, and + * allowGatewayTransit on remote peering is also true, virtual network will use gateways of + * remote virtual network for transit. Only one peering can have this flag set to true. This flag + * cannot be set if virtual network already has a gateway. + */ + useRemoteGateways?: boolean; + /** + * The remote virtual network should be in the same region. See here to learn more + * (https://docs.microsoft.com/en-us/azure/databricks/administration-guide/cloud-configurations/azure/vnet-peering). + */ + databricksVirtualNetwork?: VirtualNetworkPeeringPropertiesFormatDatabricksVirtualNetwork; + /** + * The reference to the databricks virtual network address space. + */ + databricksAddressSpace?: AddressSpace; + /** + * The remote virtual network should be in the same region. See here to learn more + * (https://docs.microsoft.com/en-us/azure/databricks/administration-guide/cloud-configurations/azure/vnet-peering). + */ + remoteVirtualNetwork: VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetwork; + /** + * The reference to the remote virtual network address space. + */ + remoteAddressSpace?: AddressSpace; + /** + * The status of the virtual network peering. Possible values include: 'Initiated', 'Connected', + * 'Disconnected' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly peeringState?: PeeringState; + /** + * The provisioning state of the virtual network peering resource. Possible values include: + * 'Succeeded', 'Updating', 'Deleting', 'Failed' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: PeeringProvisioningState; + /** + * Name of the virtual network peering resource + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * Resource ID. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * type of the virtual network peering resource + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; +} + +/** + * An interface representing AzureDatabricksManagementClientOptions. + */ +export interface AzureDatabricksManagementClientOptions extends AzureServiceClientOptions { + baseUri?: string; +} + +/** + * @interface + * List of workspaces. + * @extends Array + */ +export interface WorkspaceListResult extends Array { + /** + * The URL to use for getting the next set of results. + */ + nextLink?: string; +} + +/** + * @interface + * Result of the request to list Resource Provider operations. It contains a list of operations and + * a URL link to get the next set of results. + * @extends Array + */ +export interface OperationListResult extends Array { + /** + * URL to get the next set of operation list results if there are any. + */ + nextLink?: string; +} + +/** + * @interface + * The available private link resources for a workspace + * @extends Array + */ +export interface PrivateLinkResourcesList extends Array { + /** + * The URL to get the next set of private link resources. + */ + nextLink?: string; +} + +/** + * @interface + * List of private link connections. + * @extends Array + */ +export interface PrivateEndpointConnectionsList extends Array { + /** + * The URL to get the next set of endpoint connections. + */ + nextLink?: string; +} + +/** + * @interface + * Gets all virtual network peerings under a workspace. + * @extends Array + */ +export interface VirtualNetworkPeeringList extends Array { + /** + * URL to get the next set of virtual network peering list results if there are any. + */ + nextLink?: string; +} + +/** + * Defines values for CustomParameterType. + * Possible values include: 'Bool', 'Object', 'String' + * @readonly + * @enum {string} + */ +export type CustomParameterType = 'Bool' | 'Object' | 'String'; + +/** + * Defines values for KeySource. + * Possible values include: 'Default', 'Microsoft.Keyvault' + * @readonly + * @enum {string} + */ +export type KeySource = 'Default' | 'Microsoft.Keyvault'; + +/** + * Defines values for ProvisioningState. + * Possible values include: 'Accepted', 'Running', 'Ready', 'Creating', 'Created', 'Deleting', + * 'Deleted', 'Canceled', 'Failed', 'Succeeded', 'Updating' + * @readonly + * @enum {string} + */ +export type ProvisioningState = 'Accepted' | 'Running' | 'Ready' | 'Creating' | 'Created' | 'Deleting' | 'Deleted' | 'Canceled' | 'Failed' | 'Succeeded' | 'Updating'; + +/** + * Defines values for PrivateLinkServiceConnectionStatus. + * Possible values include: 'Pending', 'Approved', 'Rejected', 'Disconnected' + * @readonly + * @enum {string} + */ +export type PrivateLinkServiceConnectionStatus = 'Pending' | 'Approved' | 'Rejected' | 'Disconnected'; + +/** + * Defines values for PrivateEndpointConnectionProvisioningState. + * Possible values include: 'Succeeded', 'Creating', 'Updating', 'Deleting', 'Failed' + * @readonly + * @enum {string} + */ +export type PrivateEndpointConnectionProvisioningState = 'Succeeded' | 'Creating' | 'Updating' | 'Deleting' | 'Failed'; + +/** + * Defines values for PublicNetworkAccess. + * Possible values include: 'Enabled', 'Disabled' + * @readonly + * @enum {string} + */ +export type PublicNetworkAccess = 'Enabled' | 'Disabled'; + +/** + * Defines values for RequiredNsgRules. + * Possible values include: 'AllRules', 'NoAzureDatabricksRules', 'NoAzureServiceRules' + * @readonly + * @enum {string} + */ +export type RequiredNsgRules = 'AllRules' | 'NoAzureDatabricksRules' | 'NoAzureServiceRules'; + +/** + * Defines values for CreatedByType. + * Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' + * @readonly + * @enum {string} + */ +export type CreatedByType = 'User' | 'Application' | 'ManagedIdentity' | 'Key'; + +/** + * Defines values for PeeringProvisioningState. + * Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + * @readonly + * @enum {string} + */ +export type PeeringProvisioningState = 'Succeeded' | 'Updating' | 'Deleting' | 'Failed'; + +/** + * Defines values for PeeringState. + * Possible values include: 'Initiated', 'Connected', 'Disconnected' + * @readonly + * @enum {string} + */ +export type PeeringState = 'Initiated' | 'Connected' | 'Disconnected'; + +/** + * Contains response data for the get operation. + */ +export type WorkspacesGetResponse = Workspace & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Workspace; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type WorkspacesCreateOrUpdateResponse = Workspace & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Workspace; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type WorkspacesUpdateResponse = Workspace & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Workspace; + }; +}; + +/** + * Contains response data for the listByResourceGroup operation. + */ +export type WorkspacesListByResourceGroupResponse = WorkspaceListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WorkspaceListResult; + }; +}; + +/** + * Contains response data for the listBySubscription operation. + */ +export type WorkspacesListBySubscriptionResponse = WorkspaceListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WorkspaceListResult; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. */ -export interface WorkspaceUpdate { +export type WorkspacesBeginCreateOrUpdateResponse = Workspace & { /** - * @member {{ [propertyName: string]: string }} [tags] Resource tags. + * The underlying HTTP response. */ - tags?: { [propertyName: string]: string }; -} + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; -/** - * @interface - * An interface representing ErrorDetail. - * @summary Error details. - * - */ -export interface ErrorDetail { - /** - * @member {string} code The error's code. - */ - code: string; - /** - * @member {string} message A human readable error message. - */ - message: string; - /** - * @member {string} [target] Indicates which property in the request is - * responsible for the error. - */ - target?: string; -} + /** + * The response body as parsed JSON or XML + */ + parsedBody: Workspace; + }; +}; /** - * @interface - * An interface representing ErrorInfo. - * @summary The code and message for an error. - * + * Contains response data for the beginUpdate operation. */ -export interface ErrorInfo { - /** - * @member {string} code A machine readable error code. - */ - code: string; - /** - * @member {string} message A human readable error message. - */ - message: string; - /** - * @member {ErrorDetail[]} [details] error details. - */ - details?: ErrorDetail[]; +export type WorkspacesBeginUpdateResponse = Workspace & { /** - * @member {string} [innererror] Inner error details if they exist. + * The underlying HTTP response. */ - innererror?: string; -} + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Workspace; + }; +}; /** - * @interface - * An interface representing ErrorResponse. - * @summary Error response. - * - * Contains details when the response code indicates an error. - * + * Contains response data for the listByResourceGroupNext operation. */ -export interface ErrorResponse { +export type WorkspacesListByResourceGroupNextResponse = WorkspaceListResult & { /** - * @member {ErrorInfo} error The error details. + * The underlying HTTP response. */ - error: ErrorInfo; -} + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WorkspaceListResult; + }; +}; /** - * @interface - * An interface representing OperationDisplay. - * The object that represents the operation. - * + * Contains response data for the listBySubscriptionNext operation. */ -export interface OperationDisplay { - /** - * @member {string} [provider] Service provider: Microsoft.ResourceProvider - */ - provider?: string; - /** - * @member {string} [resource] Resource on which the operation is performed. - */ - resource?: string; +export type WorkspacesListBySubscriptionNextResponse = WorkspaceListResult & { /** - * @member {string} [operation] Operation type: Read, write, delete, etc. + * The underlying HTTP response. */ - operation?: string; -} + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WorkspaceListResult; + }; +}; /** - * @interface - * An interface representing Operation. - * REST API operation - * + * Contains response data for the list operation. */ -export interface Operation { - /** - * @member {string} [name] Operation name: {provider}/{resource}/{operation} - */ - name?: string; +export type OperationsListResponse = OperationListResult & { /** - * @member {OperationDisplay} [display] The object that represents the - * operation. + * The underlying HTTP response. */ - display?: OperationDisplay; -} + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationListResult; + }; +}; /** - * @interface - * An interface representing DatabricksClientOptions. - * @extends AzureServiceClientOptions + * Contains response data for the listNext operation. */ -export interface DatabricksClientOptions extends AzureServiceClientOptions { +export type OperationsListNextResponse = OperationListResult & { /** - * @member {string} [baseUri] + * The underlying HTTP response. */ - baseUri?: string; -} + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationListResult; + }; +}; /** - * @interface - * An interface representing the WorkspaceListResult. - * List of workspaces. - * - * @extends Array + * Contains response data for the list operation. */ -export interface WorkspaceListResult extends Array { +export type PrivateLinkResourcesListResponse = PrivateLinkResourcesList & { /** - * @member {string} [nextLink] The URL to use for getting the next set of - * results. + * The underlying HTTP response. */ - nextLink?: string; -} + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PrivateLinkResourcesList; + }; +}; /** - * @interface - * An interface representing the OperationListResult. - * Result of the request to list Resource Provider operations. It contains a - * list of operations and a URL link to get the next set of results. - * - * @extends Array + * Contains response data for the get operation. */ -export interface OperationListResult extends Array { +export type PrivateLinkResourcesGetResponse = GroupIdInformation & { /** - * @member {string} [nextLink] URL to get the next set of operation list - * results if there are any. + * The underlying HTTP response. */ - nextLink?: string; -} + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; -/** - * Defines values for ProvisioningState. - * Possible values include: 'Accepted', 'Running', 'Ready', 'Creating', 'Created', 'Deleting', - * 'Deleted', 'Canceled', 'Failed', 'Succeeded', 'Updating' - * @readonly - * @enum {string} - */ -export type ProvisioningState = 'Accepted' | 'Running' | 'Ready' | 'Creating' | 'Created' | 'Deleting' | 'Deleted' | 'Canceled' | 'Failed' | 'Succeeded' | 'Updating'; + /** + * The response body as parsed JSON or XML + */ + parsedBody: GroupIdInformation; + }; +}; /** - * Contains response data for the get operation. + * Contains response data for the listNext operation. */ -export type WorkspacesGetResponse = Workspace & { +export type PrivateLinkResourcesListNextResponse = PrivateLinkResourcesList & { /** * The underlying HTTP response. */ @@ -322,17 +1166,18 @@ export type WorkspacesGetResponse = Workspace & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: Workspace; + parsedBody: PrivateLinkResourcesList; }; }; /** - * Contains response data for the createOrUpdate operation. + * Contains response data for the list operation. */ -export type WorkspacesCreateOrUpdateResponse = Workspace & { +export type PrivateEndpointConnectionsListResponse = PrivateEndpointConnectionsList & { /** * The underlying HTTP response. */ @@ -341,17 +1186,18 @@ export type WorkspacesCreateOrUpdateResponse = Workspace & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: Workspace; + parsedBody: PrivateEndpointConnectionsList; }; }; /** - * Contains response data for the update operation. + * Contains response data for the get operation. */ -export type WorkspacesUpdateResponse = Workspace & { +export type PrivateEndpointConnectionsGetResponse = PrivateEndpointConnection & { /** * The underlying HTTP response. */ @@ -360,17 +1206,18 @@ export type WorkspacesUpdateResponse = Workspace & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: Workspace; + parsedBody: PrivateEndpointConnection; }; }; /** - * Contains response data for the listByResourceGroup operation. + * Contains response data for the create operation. */ -export type WorkspacesListByResourceGroupResponse = WorkspaceListResult & { +export type PrivateEndpointConnectionsCreateResponse = PrivateEndpointConnection & { /** * The underlying HTTP response. */ @@ -379,17 +1226,18 @@ export type WorkspacesListByResourceGroupResponse = WorkspaceListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: WorkspaceListResult; + parsedBody: PrivateEndpointConnection; }; }; /** - * Contains response data for the listBySubscription operation. + * Contains response data for the beginCreate operation. */ -export type WorkspacesListBySubscriptionResponse = WorkspaceListResult & { +export type PrivateEndpointConnectionsBeginCreateResponse = PrivateEndpointConnection & { /** * The underlying HTTP response. */ @@ -398,17 +1246,18 @@ export type WorkspacesListBySubscriptionResponse = WorkspaceListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: WorkspaceListResult; + parsedBody: PrivateEndpointConnection; }; }; /** - * Contains response data for the beginCreateOrUpdate operation. + * Contains response data for the listNext operation. */ -export type WorkspacesBeginCreateOrUpdateResponse = Workspace & { +export type PrivateEndpointConnectionsListNextResponse = PrivateEndpointConnectionsList & { /** * The underlying HTTP response. */ @@ -417,17 +1266,18 @@ export type WorkspacesBeginCreateOrUpdateResponse = Workspace & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: Workspace; + parsedBody: PrivateEndpointConnectionsList; }; }; /** - * Contains response data for the beginUpdate operation. + * Contains response data for the get operation. */ -export type WorkspacesBeginUpdateResponse = Workspace & { +export type VNetPeeringGetResponse = VirtualNetworkPeering & { /** * The underlying HTTP response. */ @@ -436,17 +1286,18 @@ export type WorkspacesBeginUpdateResponse = Workspace & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: Workspace; + parsedBody: VirtualNetworkPeering; }; }; /** - * Contains response data for the listByResourceGroupNext operation. + * Contains response data for the createOrUpdate operation. */ -export type WorkspacesListByResourceGroupNextResponse = WorkspaceListResult & { +export type VNetPeeringCreateOrUpdateResponse = VirtualNetworkPeering & { /** * The underlying HTTP response. */ @@ -455,17 +1306,18 @@ export type WorkspacesListByResourceGroupNextResponse = WorkspaceListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: WorkspaceListResult; + parsedBody: VirtualNetworkPeering; }; }; /** - * Contains response data for the listBySubscriptionNext operation. + * Contains response data for the listByWorkspace operation. */ -export type WorkspacesListBySubscriptionNextResponse = WorkspaceListResult & { +export type VNetPeeringListByWorkspaceResponse = VirtualNetworkPeeringList & { /** * The underlying HTTP response. */ @@ -474,17 +1326,18 @@ export type WorkspacesListBySubscriptionNextResponse = WorkspaceListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: WorkspaceListResult; + parsedBody: VirtualNetworkPeeringList; }; }; /** - * Contains response data for the list operation. + * Contains response data for the beginCreateOrUpdate operation. */ -export type OperationsListResponse = OperationListResult & { +export type VNetPeeringBeginCreateOrUpdateResponse = VirtualNetworkPeering & { /** * The underlying HTTP response. */ @@ -493,17 +1346,18 @@ export type OperationsListResponse = OperationListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: OperationListResult; + parsedBody: VirtualNetworkPeering; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the listByWorkspaceNext operation. */ -export type OperationsListNextResponse = OperationListResult & { +export type VNetPeeringListByWorkspaceNextResponse = VirtualNetworkPeeringList & { /** * The underlying HTTP response. */ @@ -512,9 +1366,10 @@ export type OperationsListNextResponse = OperationListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: OperationListResult; + parsedBody: VirtualNetworkPeeringList; }; }; diff --git a/sdk/databricks/arm-databricks/src/models/mappers.ts b/sdk/databricks/arm-databricks/src/models/mappers.ts index 8d5caa24faef..ccaf8f4e0995 100644 --- a/sdk/databricks/arm-databricks/src/models/mappers.ts +++ b/sdk/databricks/arm-databricks/src/models/mappers.ts @@ -1,11 +1,9 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ import { CloudErrorMapper, BaseResourceMapper } from "@azure/ms-rest-azure-js"; @@ -14,6 +12,256 @@ import * as msRest from "@azure/ms-rest-js"; export const CloudError = CloudErrorMapper; export const BaseResource = BaseResourceMapper; +export const WorkspaceCustomStringParameter: msRest.CompositeMapper = { + serializedName: "WorkspaceCustomStringParameter", + type: { + name: "Composite", + className: "WorkspaceCustomStringParameter", + modelProperties: { + type: { + serializedName: "type", + type: { + name: "String" + } + }, + value: { + required: true, + serializedName: "value", + type: { + name: "String" + } + } + } + } +}; + +export const WorkspaceCustomBooleanParameter: msRest.CompositeMapper = { + serializedName: "WorkspaceCustomBooleanParameter", + type: { + name: "Composite", + className: "WorkspaceCustomBooleanParameter", + modelProperties: { + type: { + serializedName: "type", + type: { + name: "String" + } + }, + value: { + required: true, + serializedName: "value", + type: { + name: "Boolean" + } + } + } + } +}; + +export const Encryption: msRest.CompositeMapper = { + serializedName: "Encryption", + type: { + name: "Composite", + className: "Encryption", + modelProperties: { + keySource: { + serializedName: "keySource", + defaultValue: 'Default', + type: { + name: "String" + } + }, + keyName: { + serializedName: "KeyName", + type: { + name: "String" + } + }, + keyVersion: { + serializedName: "keyversion", + type: { + name: "String" + } + }, + keyVaultUri: { + serializedName: "keyvaulturi", + type: { + name: "String" + } + } + } + } +}; + +export const WorkspaceEncryptionParameter: msRest.CompositeMapper = { + serializedName: "WorkspaceEncryptionParameter", + type: { + name: "Composite", + className: "WorkspaceEncryptionParameter", + modelProperties: { + type: { + serializedName: "type", + type: { + name: "String" + } + }, + value: { + serializedName: "value", + type: { + name: "Composite", + className: "Encryption" + } + } + } + } +}; + +export const WorkspaceCustomObjectParameter: msRest.CompositeMapper = { + serializedName: "WorkspaceCustomObjectParameter", + type: { + name: "Composite", + className: "WorkspaceCustomObjectParameter", + modelProperties: { + type: { + serializedName: "type", + type: { + name: "String" + } + }, + value: { + required: true, + serializedName: "value", + type: { + name: "Object" + } + } + } + } +}; + +export const WorkspaceCustomParameters: msRest.CompositeMapper = { + serializedName: "WorkspaceCustomParameters", + type: { + name: "Composite", + className: "WorkspaceCustomParameters", + modelProperties: { + amlWorkspaceId: { + serializedName: "amlWorkspaceId", + type: { + name: "Composite", + className: "WorkspaceCustomStringParameter" + } + }, + customVirtualNetworkId: { + serializedName: "customVirtualNetworkId", + type: { + name: "Composite", + className: "WorkspaceCustomStringParameter" + } + }, + customPublicSubnetName: { + serializedName: "customPublicSubnetName", + type: { + name: "Composite", + className: "WorkspaceCustomStringParameter" + } + }, + customPrivateSubnetName: { + serializedName: "customPrivateSubnetName", + type: { + name: "Composite", + className: "WorkspaceCustomStringParameter" + } + }, + enableNoPublicIp: { + serializedName: "enableNoPublicIp", + type: { + name: "Composite", + className: "WorkspaceCustomBooleanParameter" + } + }, + loadBalancerBackendPoolName: { + serializedName: "loadBalancerBackendPoolName", + type: { + name: "Composite", + className: "WorkspaceCustomStringParameter" + } + }, + loadBalancerId: { + serializedName: "loadBalancerId", + type: { + name: "Composite", + className: "WorkspaceCustomStringParameter" + } + }, + natGatewayName: { + serializedName: "natGatewayName", + type: { + name: "Composite", + className: "WorkspaceCustomStringParameter" + } + }, + publicIpName: { + serializedName: "publicIpName", + type: { + name: "Composite", + className: "WorkspaceCustomStringParameter" + } + }, + prepareEncryption: { + serializedName: "prepareEncryption", + type: { + name: "Composite", + className: "WorkspaceCustomBooleanParameter" + } + }, + encryption: { + serializedName: "encryption", + type: { + name: "Composite", + className: "WorkspaceEncryptionParameter" + } + }, + requireInfrastructureEncryption: { + serializedName: "requireInfrastructureEncryption", + type: { + name: "Composite", + className: "WorkspaceCustomBooleanParameter" + } + }, + storageAccountName: { + serializedName: "storageAccountName", + type: { + name: "Composite", + className: "WorkspaceCustomStringParameter" + } + }, + storageAccountSkuName: { + serializedName: "storageAccountSkuName", + type: { + name: "Composite", + className: "WorkspaceCustomStringParameter" + } + }, + vnetAddressPrefix: { + serializedName: "vnetAddressPrefix", + type: { + name: "Composite", + className: "WorkspaceCustomStringParameter" + } + }, + resourceTags: { + readOnly: true, + serializedName: "resourceTags", + type: { + name: "Composite", + className: "WorkspaceCustomObjectParameter" + } + } + } + } +}; + export const WorkspaceProviderAuthorization: msRest.CompositeMapper = { serializedName: "WorkspaceProviderAuthorization", type: { @@ -38,6 +286,277 @@ export const WorkspaceProviderAuthorization: msRest.CompositeMapper = { } }; +export const CreatedBy: msRest.CompositeMapper = { + serializedName: "CreatedBy", + type: { + name: "Composite", + className: "CreatedBy", + modelProperties: { + oid: { + readOnly: true, + serializedName: "oid", + type: { + name: "Uuid" + } + }, + puid: { + readOnly: true, + serializedName: "puid", + type: { + name: "String" + } + }, + applicationId: { + readOnly: true, + serializedName: "applicationId", + type: { + name: "Uuid" + } + } + } + } +}; + +export const ManagedIdentityConfiguration: msRest.CompositeMapper = { + serializedName: "ManagedIdentityConfiguration", + type: { + name: "Composite", + className: "ManagedIdentityConfiguration", + modelProperties: { + principalId: { + readOnly: true, + serializedName: "principalId", + type: { + name: "Uuid" + } + }, + tenantId: { + readOnly: true, + serializedName: "tenantId", + type: { + name: "Uuid" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const EncryptionV2KeyVaultProperties: msRest.CompositeMapper = { + serializedName: "EncryptionV2_keyVaultProperties", + type: { + name: "Composite", + className: "EncryptionV2KeyVaultProperties", + modelProperties: { + keyVaultUri: { + required: true, + serializedName: "keyVaultUri", + type: { + name: "String" + } + }, + keyName: { + required: true, + serializedName: "keyName", + type: { + name: "String" + } + }, + keyVersion: { + required: true, + serializedName: "keyVersion", + type: { + name: "String" + } + } + } + } +}; + +export const EncryptionV2: msRest.CompositeMapper = { + serializedName: "EncryptionV2", + type: { + name: "Composite", + className: "EncryptionV2", + modelProperties: { + keySource: { + required: true, + isConstant: true, + serializedName: "keySource", + defaultValue: 'Microsoft.Keyvault', + type: { + name: "String" + } + }, + keyVaultProperties: { + serializedName: "keyVaultProperties", + type: { + name: "Composite", + className: "EncryptionV2KeyVaultProperties" + } + } + } + } +}; + +export const EncryptionEntitiesDefinition: msRest.CompositeMapper = { + serializedName: "EncryptionEntitiesDefinition", + type: { + name: "Composite", + className: "EncryptionEntitiesDefinition", + modelProperties: { + managedServices: { + serializedName: "managedServices", + type: { + name: "Composite", + className: "EncryptionV2" + } + } + } + } +}; + +export const WorkspacePropertiesEncryption: msRest.CompositeMapper = { + serializedName: "WorkspaceProperties_encryption", + type: { + name: "Composite", + className: "WorkspacePropertiesEncryption", + modelProperties: { + entities: { + required: true, + serializedName: "entities", + defaultValue: {}, + type: { + name: "Composite", + className: "EncryptionEntitiesDefinition" + } + } + } + } +}; + +export const PrivateEndpoint: msRest.CompositeMapper = { + serializedName: "PrivateEndpoint", + type: { + name: "Composite", + className: "PrivateEndpoint", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateLinkServiceConnectionState: msRest.CompositeMapper = { + serializedName: "PrivateLinkServiceConnectionState", + type: { + name: "Composite", + className: "PrivateLinkServiceConnectionState", + modelProperties: { + status: { + required: true, + serializedName: "status", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + }, + actionRequired: { + serializedName: "actionRequired", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateEndpointConnectionProperties: msRest.CompositeMapper = { + serializedName: "PrivateEndpointConnectionProperties", + type: { + name: "Composite", + className: "PrivateEndpointConnectionProperties", + modelProperties: { + privateEndpoint: { + serializedName: "privateEndpoint", + type: { + name: "Composite", + className: "PrivateEndpoint" + } + }, + privateLinkServiceConnectionState: { + required: true, + serializedName: "privateLinkServiceConnectionState", + type: { + name: "Composite", + className: "PrivateLinkServiceConnectionState" + } + }, + provisioningState: { + serializedName: "provisioningState", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateEndpointConnection: msRest.CompositeMapper = { + serializedName: "PrivateEndpointConnection", + type: { + name: "Composite", + className: "PrivateEndpointConnection", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + properties: { + required: true, + serializedName: "properties", + type: { + name: "Composite", + className: "PrivateEndpointConnectionProperties" + } + } + } + } +}; + export const Sku: msRest.CompositeMapper = { serializedName: "Sku", type: { @@ -61,6 +580,52 @@ export const Sku: msRest.CompositeMapper = { } }; +export const SystemData: msRest.CompositeMapper = { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData", + modelProperties: { + createdBy: { + serializedName: "createdBy", + type: { + name: "String" + } + }, + createdByType: { + serializedName: "createdByType", + type: { + name: "String" + } + }, + createdAt: { + serializedName: "createdAt", + type: { + name: "DateTime" + } + }, + lastModifiedBy: { + serializedName: "lastModifiedBy", + type: { + name: "String" + } + }, + lastModifiedByType: { + serializedName: "lastModifiedByType", + type: { + name: "String" + } + }, + lastModifiedAt: { + serializedName: "lastModifiedAt", + type: { + name: "DateTime" + } + } + } + } +}; + export const Resource: msRest.CompositeMapper = { serializedName: "Resource", type: { @@ -135,43 +700,125 @@ export const Workspace: msRest.CompositeMapper = { name: "String" } }, - parameters: { - serializedName: "properties.parameters", + parameters: { + serializedName: "properties.parameters", + type: { + name: "Composite", + className: "WorkspaceCustomParameters" + } + }, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + }, + uiDefinitionUri: { + serializedName: "properties.uiDefinitionUri", + type: { + name: "String" + } + }, + authorizations: { + serializedName: "properties.authorizations", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "WorkspaceProviderAuthorization" + } + } + } + }, + createdBy: { + serializedName: "properties.createdBy", + type: { + name: "Composite", + className: "CreatedBy" + } + }, + updatedBy: { + serializedName: "properties.updatedBy", + type: { + name: "Composite", + className: "CreatedBy" + } + }, + createdDateTime: { + serializedName: "properties.createdDateTime", + type: { + name: "DateTime" + } + }, + workspaceId: { + readOnly: true, + serializedName: "properties.workspaceId", + type: { + name: "String" + } + }, + workspaceUrl: { + readOnly: true, + serializedName: "properties.workspaceUrl", type: { - name: "Object" + name: "String" } }, - provisioningState: { - readOnly: true, - serializedName: "properties.provisioningState", + storageAccountIdentity: { + serializedName: "properties.storageAccountIdentity", type: { - name: "String" + name: "Composite", + className: "ManagedIdentityConfiguration" } }, - uiDefinitionUri: { - serializedName: "properties.uiDefinitionUri", + encryption: { + serializedName: "properties.encryption", type: { - name: "String" + name: "Composite", + className: "WorkspacePropertiesEncryption" } }, - authorizations: { - serializedName: "properties.authorizations", + privateEndpointConnections: { + readOnly: true, + serializedName: "properties.privateEndpointConnections", type: { name: "Sequence", element: { type: { name: "Composite", - className: "WorkspaceProviderAuthorization" + className: "PrivateEndpointConnection" } } } }, + publicNetworkAccess: { + serializedName: "properties.publicNetworkAccess", + type: { + name: "String" + } + }, + requiredNsgRules: { + serializedName: "properties.requiredNsgRules", + type: { + name: "String" + } + }, sku: { serializedName: "sku", type: { name: "Composite", className: "Sku" } + }, + systemData: { + readOnly: true, + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } } } } @@ -339,6 +986,214 @@ export const Operation: msRest.CompositeMapper = { } }; +export const GroupIdInformationProperties: msRest.CompositeMapper = { + serializedName: "GroupIdInformationProperties", + type: { + name: "Composite", + className: "GroupIdInformationProperties", + modelProperties: { + groupId: { + serializedName: "groupId", + type: { + name: "String" + } + }, + requiredMembers: { + serializedName: "requiredMembers", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + requiredZoneNames: { + serializedName: "requiredZoneNames", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const GroupIdInformation: msRest.CompositeMapper = { + serializedName: "GroupIdInformation", + type: { + name: "Composite", + className: "GroupIdInformation", + modelProperties: { + ...Resource.type.modelProperties, + properties: { + required: true, + serializedName: "properties", + type: { + name: "Composite", + className: "GroupIdInformationProperties" + } + } + } + } +}; + +export const VirtualNetworkPeeringPropertiesFormatDatabricksVirtualNetwork: msRest.CompositeMapper = { + serializedName: "VirtualNetworkPeeringPropertiesFormat_databricksVirtualNetwork", + type: { + name: "Composite", + className: "VirtualNetworkPeeringPropertiesFormatDatabricksVirtualNetwork", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + } + } + } +}; + +export const AddressSpace: msRest.CompositeMapper = { + serializedName: "AddressSpace", + type: { + name: "Composite", + className: "AddressSpace", + modelProperties: { + addressPrefixes: { + serializedName: "addressPrefixes", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetwork: msRest.CompositeMapper = { + serializedName: "VirtualNetworkPeeringPropertiesFormat_remoteVirtualNetwork", + type: { + name: "Composite", + className: "VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetwork", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + } + } + } +}; + +export const VirtualNetworkPeering: msRest.CompositeMapper = { + serializedName: "VirtualNetworkPeering", + type: { + name: "Composite", + className: "VirtualNetworkPeering", + modelProperties: { + allowVirtualNetworkAccess: { + serializedName: "properties.allowVirtualNetworkAccess", + type: { + name: "Boolean" + } + }, + allowForwardedTraffic: { + serializedName: "properties.allowForwardedTraffic", + type: { + name: "Boolean" + } + }, + allowGatewayTransit: { + serializedName: "properties.allowGatewayTransit", + type: { + name: "Boolean" + } + }, + useRemoteGateways: { + serializedName: "properties.useRemoteGateways", + type: { + name: "Boolean" + } + }, + databricksVirtualNetwork: { + serializedName: "properties.databricksVirtualNetwork", + type: { + name: "Composite", + className: "VirtualNetworkPeeringPropertiesFormatDatabricksVirtualNetwork" + } + }, + databricksAddressSpace: { + serializedName: "properties.databricksAddressSpace", + type: { + name: "Composite", + className: "AddressSpace" + } + }, + remoteVirtualNetwork: { + required: true, + serializedName: "properties.remoteVirtualNetwork", + type: { + name: "Composite", + className: "VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetwork" + } + }, + remoteAddressSpace: { + serializedName: "properties.remoteAddressSpace", + type: { + name: "Composite", + className: "AddressSpace" + } + }, + peeringState: { + readOnly: true, + serializedName: "properties.peeringState", + type: { + name: "String" + } + }, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + export const WorkspaceListResult: msRest.CompositeMapper = { serializedName: "WorkspaceListResult", type: { @@ -394,3 +1249,87 @@ export const OperationListResult: msRest.CompositeMapper = { } } }; + +export const PrivateLinkResourcesList: msRest.CompositeMapper = { + serializedName: "PrivateLinkResourcesList", + type: { + name: "Composite", + className: "PrivateLinkResourcesList", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "GroupIdInformation" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateEndpointConnectionsList: msRest.CompositeMapper = { + serializedName: "PrivateEndpointConnectionsList", + type: { + name: "Composite", + className: "PrivateEndpointConnectionsList", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateEndpointConnection" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const VirtualNetworkPeeringList: msRest.CompositeMapper = { + serializedName: "VirtualNetworkPeeringList", + type: { + name: "Composite", + className: "VirtualNetworkPeeringList", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VirtualNetworkPeering" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; diff --git a/sdk/databricks/arm-databricks/src/models/operationsMappers.ts b/sdk/databricks/arm-databricks/src/models/operationsMappers.ts index ca1587789d15..872cb56fb0bd 100644 --- a/sdk/databricks/arm-databricks/src/models/operationsMappers.ts +++ b/sdk/databricks/arm-databricks/src/models/operationsMappers.ts @@ -1,19 +1,16 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - OperationListResult, + ErrorDetail, + ErrorInfo, + ErrorResponse, Operation, OperationDisplay, - ErrorResponse, - ErrorInfo, - ErrorDetail + OperationListResult } from "../models/mappers"; - diff --git a/sdk/databricks/arm-databricks/src/models/parameters.ts b/sdk/databricks/arm-databricks/src/models/parameters.ts index 0ebe5bdcaaa5..098101132b68 100644 --- a/sdk/databricks/arm-databricks/src/models/parameters.ts +++ b/sdk/databricks/arm-databricks/src/models/parameters.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -20,11 +19,35 @@ export const acceptLanguage: msRest.OperationParameter = { } } }; -export const apiVersion: msRest.OperationQueryParameter = { +export const apiVersion0: msRest.OperationQueryParameter = { parameterPath: "apiVersion", mapper: { required: true, + isConstant: true, serializedName: "api-version", + defaultValue: '2021-04-01-preview', + type: { + name: "String" + } + } +}; +export const apiVersion1: msRest.OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + required: true, + isConstant: true, + serializedName: "api-version", + defaultValue: '2018-04-01', + type: { + name: "String" + } + } +}; +export const groupId: msRest.OperationURLParameter = { + parameterPath: "groupId", + mapper: { + required: true, + serializedName: "groupId", type: { name: "String" } @@ -41,6 +64,26 @@ export const nextPageLink: msRest.OperationURLParameter = { }, skipEncoding: true }; +export const peeringName: msRest.OperationURLParameter = { + parameterPath: "peeringName", + mapper: { + required: true, + serializedName: "peeringName", + type: { + name: "String" + } + } +}; +export const privateEndpointConnectionName: msRest.OperationURLParameter = { + parameterPath: "privateEndpointConnectionName", + mapper: { + required: true, + serializedName: "privateEndpointConnectionName", + type: { + name: "String" + } + } +}; export const resourceGroupName: msRest.OperationURLParameter = { parameterPath: "resourceGroupName", mapper: { diff --git a/sdk/databricks/arm-databricks/src/models/privateEndpointConnectionsMappers.ts b/sdk/databricks/arm-databricks/src/models/privateEndpointConnectionsMappers.ts new file mode 100644 index 000000000000..7fb8e87c2230 --- /dev/null +++ b/sdk/databricks/arm-databricks/src/models/privateEndpointConnectionsMappers.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + AddressSpace, + BaseResource, + CreatedBy, + Encryption, + EncryptionEntitiesDefinition, + EncryptionV2, + EncryptionV2KeyVaultProperties, + ErrorDetail, + ErrorInfo, + ErrorResponse, + GroupIdInformation, + GroupIdInformationProperties, + ManagedIdentityConfiguration, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateEndpointConnectionProperties, + PrivateEndpointConnectionsList, + PrivateLinkServiceConnectionState, + Resource, + Sku, + SystemData, + TrackedResource, + VirtualNetworkPeering, + VirtualNetworkPeeringPropertiesFormatDatabricksVirtualNetwork, + VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetwork, + Workspace, + WorkspaceCustomBooleanParameter, + WorkspaceCustomObjectParameter, + WorkspaceCustomParameters, + WorkspaceCustomStringParameter, + WorkspaceEncryptionParameter, + WorkspacePropertiesEncryption, + WorkspaceProviderAuthorization +} from "../models/mappers"; diff --git a/sdk/databricks/arm-databricks/src/models/privateLinkResourcesMappers.ts b/sdk/databricks/arm-databricks/src/models/privateLinkResourcesMappers.ts new file mode 100644 index 000000000000..1bc4c5b4b2c7 --- /dev/null +++ b/sdk/databricks/arm-databricks/src/models/privateLinkResourcesMappers.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + AddressSpace, + BaseResource, + CreatedBy, + Encryption, + EncryptionEntitiesDefinition, + EncryptionV2, + EncryptionV2KeyVaultProperties, + ErrorDetail, + ErrorInfo, + ErrorResponse, + GroupIdInformation, + GroupIdInformationProperties, + ManagedIdentityConfiguration, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateEndpointConnectionProperties, + PrivateLinkResourcesList, + PrivateLinkServiceConnectionState, + Resource, + Sku, + SystemData, + TrackedResource, + VirtualNetworkPeering, + VirtualNetworkPeeringPropertiesFormatDatabricksVirtualNetwork, + VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetwork, + Workspace, + WorkspaceCustomBooleanParameter, + WorkspaceCustomObjectParameter, + WorkspaceCustomParameters, + WorkspaceCustomStringParameter, + WorkspaceEncryptionParameter, + WorkspacePropertiesEncryption, + WorkspaceProviderAuthorization +} from "../models/mappers"; diff --git a/sdk/databricks/arm-databricks/src/models/vNetPeeringMappers.ts b/sdk/databricks/arm-databricks/src/models/vNetPeeringMappers.ts new file mode 100644 index 000000000000..86dc085e6743 --- /dev/null +++ b/sdk/databricks/arm-databricks/src/models/vNetPeeringMappers.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + AddressSpace, + BaseResource, + CreatedBy, + Encryption, + EncryptionEntitiesDefinition, + EncryptionV2, + EncryptionV2KeyVaultProperties, + ErrorDetail, + ErrorInfo, + ErrorResponse, + GroupIdInformation, + GroupIdInformationProperties, + ManagedIdentityConfiguration, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateEndpointConnectionProperties, + PrivateLinkServiceConnectionState, + Resource, + Sku, + SystemData, + TrackedResource, + VirtualNetworkPeering, + VirtualNetworkPeeringList, + VirtualNetworkPeeringPropertiesFormatDatabricksVirtualNetwork, + VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetwork, + Workspace, + WorkspaceCustomBooleanParameter, + WorkspaceCustomObjectParameter, + WorkspaceCustomParameters, + WorkspaceCustomStringParameter, + WorkspaceEncryptionParameter, + WorkspacePropertiesEncryption, + WorkspaceProviderAuthorization +} from "../models/mappers"; diff --git a/sdk/databricks/arm-databricks/src/models/workspacesMappers.ts b/sdk/databricks/arm-databricks/src/models/workspacesMappers.ts index e6f592d4a993..d1896d68580b 100644 --- a/sdk/databricks/arm-databricks/src/models/workspacesMappers.ts +++ b/sdk/databricks/arm-databricks/src/models/workspacesMappers.ts @@ -1,24 +1,44 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - Workspace, - TrackedResource, - Resource, + AddressSpace, BaseResource, - WorkspaceProviderAuthorization, - Sku, - ErrorResponse, - ErrorInfo, + CreatedBy, + Encryption, + EncryptionEntitiesDefinition, + EncryptionV2, + EncryptionV2KeyVaultProperties, ErrorDetail, - WorkspaceUpdate, - WorkspaceListResult + ErrorInfo, + ErrorResponse, + GroupIdInformation, + GroupIdInformationProperties, + ManagedIdentityConfiguration, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateEndpointConnectionProperties, + PrivateLinkServiceConnectionState, + Resource, + Sku, + SystemData, + TrackedResource, + VirtualNetworkPeering, + VirtualNetworkPeeringPropertiesFormatDatabricksVirtualNetwork, + VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetwork, + Workspace, + WorkspaceCustomBooleanParameter, + WorkspaceCustomObjectParameter, + WorkspaceCustomParameters, + WorkspaceCustomStringParameter, + WorkspaceEncryptionParameter, + WorkspaceListResult, + WorkspacePropertiesEncryption, + WorkspaceProviderAuthorization, + WorkspaceUpdate } from "../models/mappers"; - diff --git a/sdk/databricks/arm-databricks/src/operations/index.ts b/sdk/databricks/arm-databricks/src/operations/index.ts index 74640cd56b69..06215340107a 100644 --- a/sdk/databricks/arm-databricks/src/operations/index.ts +++ b/sdk/databricks/arm-databricks/src/operations/index.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -10,3 +9,6 @@ export * from "./workspaces"; export * from "./operations"; +export * from "./privateLinkResources"; +export * from "./privateEndpointConnections"; +export * from "./vNetPeering"; diff --git a/sdk/databricks/arm-databricks/src/operations/operations.ts b/sdk/databricks/arm-databricks/src/operations/operations.ts index 69151b9b3e14..ee8855264031 100644 --- a/sdk/databricks/arm-databricks/src/operations/operations.ts +++ b/sdk/databricks/arm-databricks/src/operations/operations.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -12,17 +11,17 @@ import * as msRest from "@azure/ms-rest-js"; import * as Models from "../models"; import * as Mappers from "../models/operationsMappers"; import * as Parameters from "../models/parameters"; -import { DatabricksClientContext } from "../databricksClientContext"; +import { AzureDatabricksManagementClientContext } from "../azureDatabricksManagementClientContext"; /** Class representing a Operations. */ export class Operations { - private readonly client: DatabricksClientContext; + private readonly client: AzureDatabricksManagementClientContext; /** * Create a Operations. - * @param {DatabricksClientContext} client Reference to the service client. + * @param {AzureDatabricksManagementClientContext} client Reference to the service client. */ - constructor(client: DatabricksClientContext) { + constructor(client: AzureDatabricksManagementClientContext) { this.client = client; } @@ -85,7 +84,7 @@ const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "providers/Microsoft.Databricks/operations", queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -108,6 +107,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion0 + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/databricks/arm-databricks/src/operations/privateEndpointConnections.ts b/sdk/databricks/arm-databricks/src/operations/privateEndpointConnections.ts new file mode 100644 index 000000000000..157402cae6aa --- /dev/null +++ b/sdk/databricks/arm-databricks/src/operations/privateEndpointConnections.ts @@ -0,0 +1,339 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/privateEndpointConnectionsMappers"; +import * as Parameters from "../models/parameters"; +import { AzureDatabricksManagementClientContext } from "../azureDatabricksManagementClientContext"; + +/** Class representing a PrivateEndpointConnections. */ +export class PrivateEndpointConnections { + private readonly client: AzureDatabricksManagementClientContext; + + /** + * Create a PrivateEndpointConnections. + * @param {AzureDatabricksManagementClientContext} client Reference to the service client. + */ + constructor(client: AzureDatabricksManagementClientContext) { + this.client = client; + } + + /** + * List private endpoint connections of the workspace + * @summary List private endpoint connections + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param callback The callback + */ + list(resourceGroupName: string, workspaceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, workspaceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Get a private endpoint connection properties for a workspace + * @summary Get private endpoint connection + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param privateEndpointConnectionName The name of the private endpoint connection + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, workspaceName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param privateEndpointConnectionName The name of the private endpoint connection + * @param callback The callback + */ + get(resourceGroupName: string, workspaceName: string, privateEndpointConnectionName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param privateEndpointConnectionName The name of the private endpoint connection + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, workspaceName: string, privateEndpointConnectionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, workspaceName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + privateEndpointConnectionName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Update the status of a private endpoint connection with the specified name + * @summary Update private endpoint connection status + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param privateEndpointConnectionName The name of the private endpoint connection + * @param privateEndpointConnection The private endpoint connection with updated properties + * @param [options] The optional parameters + * @returns Promise + */ + create(resourceGroupName: string, workspaceName: string, privateEndpointConnectionName: string, privateEndpointConnection: Models.PrivateEndpointConnection, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreate(resourceGroupName,workspaceName,privateEndpointConnectionName,privateEndpointConnection,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Remove private endpoint connection with the specified name + * @summary Remove private endpoint connection + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param privateEndpointConnectionName The name of the private endpoint connection + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, workspaceName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,workspaceName,privateEndpointConnectionName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Update the status of a private endpoint connection with the specified name + * @summary Update private endpoint connection status + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param privateEndpointConnectionName The name of the private endpoint connection + * @param privateEndpointConnection The private endpoint connection with updated properties + * @param [options] The optional parameters + * @returns Promise + */ + beginCreate(resourceGroupName: string, workspaceName: string, privateEndpointConnectionName: string, privateEndpointConnection: Models.PrivateEndpointConnection, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + workspaceName, + privateEndpointConnectionName, + privateEndpointConnection, + options + }, + beginCreateOperationSpec, + options); + } + + /** + * Remove private endpoint connection with the specified name + * @summary Remove private endpoint connection + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param privateEndpointConnectionName The name of the private endpoint connection + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, workspaceName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + workspaceName, + privateEndpointConnectionName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * List private endpoint connections of the workspace + * @summary List private endpoint connections + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/privateEndpointConnections", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnectionsList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.subscriptionId, + Parameters.privateEndpointConnectionName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginCreateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.subscriptionId, + Parameters.privateEndpointConnectionName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "privateEndpointConnection", + mapper: { + ...Mappers.PrivateEndpointConnection, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + 202: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.subscriptionId, + Parameters.privateEndpointConnectionName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnectionsList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/databricks/arm-databricks/src/operations/privateLinkResources.ts b/sdk/databricks/arm-databricks/src/operations/privateLinkResources.ts new file mode 100644 index 000000000000..70ff1d3234d8 --- /dev/null +++ b/sdk/databricks/arm-databricks/src/operations/privateLinkResources.ts @@ -0,0 +1,203 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/privateLinkResourcesMappers"; +import * as Parameters from "../models/parameters"; +import { AzureDatabricksManagementClientContext } from "../azureDatabricksManagementClientContext"; + +/** Class representing a PrivateLinkResources. */ +export class PrivateLinkResources { + private readonly client: AzureDatabricksManagementClientContext; + + /** + * Create a PrivateLinkResources. + * @param {AzureDatabricksManagementClientContext} client Reference to the service client. + */ + constructor(client: AzureDatabricksManagementClientContext) { + this.client = client; + } + + /** + * List private link resources for a given workspace + * @summary List private link resources + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param callback The callback + */ + list(resourceGroupName: string, workspaceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, workspaceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Get the specified private link resource for the given group id (sub-resource) + * @summary Get the specified private link resource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param groupId The name of the private link resource + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, workspaceName: string, groupId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param groupId The name of the private link resource + * @param callback The callback + */ + get(resourceGroupName: string, workspaceName: string, groupId: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param groupId The name of the private link resource + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, workspaceName: string, groupId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, workspaceName: string, groupId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + groupId, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * List private link resources for a given workspace + * @summary List private link resources + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/privateLinkResources", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResourcesList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/privateLinkResources/{groupId}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.subscriptionId, + Parameters.groupId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.GroupIdInformation + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResourcesList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/databricks/arm-databricks/src/operations/vNetPeering.ts b/sdk/databricks/arm-databricks/src/operations/vNetPeering.ts new file mode 100644 index 000000000000..7d36413fb6be --- /dev/null +++ b/sdk/databricks/arm-databricks/src/operations/vNetPeering.ts @@ -0,0 +1,333 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/vNetPeeringMappers"; +import * as Parameters from "../models/parameters"; +import { AzureDatabricksManagementClientContext } from "../azureDatabricksManagementClientContext"; + +/** Class representing a VNetPeering. */ +export class VNetPeering { + private readonly client: AzureDatabricksManagementClientContext; + + /** + * Create a VNetPeering. + * @param {AzureDatabricksManagementClientContext} client Reference to the service client. + */ + constructor(client: AzureDatabricksManagementClientContext) { + this.client = client; + } + + /** + * Gets the workspace vNet Peering. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param peeringName The name of the workspace vNet peering. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, workspaceName: string, peeringName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param peeringName The name of the workspace vNet peering. + * @param callback The callback + */ + get(resourceGroupName: string, workspaceName: string, peeringName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param peeringName The name of the workspace vNet peering. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, workspaceName: string, peeringName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, workspaceName: string, peeringName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + peeringName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Deletes the workspace vNetPeering. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param peeringName The name of the workspace vNet peering. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, workspaceName: string, peeringName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,workspaceName,peeringName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Creates vNet Peering for workspace. + * @param virtualNetworkPeeringParameters Parameters supplied to the create workspace vNet Peering. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param peeringName The name of the workspace vNet peering. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(virtualNetworkPeeringParameters: Models.VirtualNetworkPeering, resourceGroupName: string, workspaceName: string, peeringName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(virtualNetworkPeeringParameters,resourceGroupName,workspaceName,peeringName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Lists the workspace vNet Peerings. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param [options] The optional parameters + * @returns Promise + */ + listByWorkspace(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param callback The callback + */ + listByWorkspace(resourceGroupName: string, workspaceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param options The optional parameters + * @param callback The callback + */ + listByWorkspace(resourceGroupName: string, workspaceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByWorkspace(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + options + }, + listByWorkspaceOperationSpec, + callback) as Promise; + } + + /** + * Deletes the workspace vNetPeering. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param peeringName The name of the workspace vNet peering. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, workspaceName: string, peeringName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + workspaceName, + peeringName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Creates vNet Peering for workspace. + * @param virtualNetworkPeeringParameters Parameters supplied to the create workspace vNet Peering. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param peeringName The name of the workspace vNet peering. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(virtualNetworkPeeringParameters: Models.VirtualNetworkPeering, resourceGroupName: string, workspaceName: string, peeringName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + virtualNetworkPeeringParameters, + resourceGroupName, + workspaceName, + peeringName, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Lists the workspace vNet Peerings. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByWorkspaceNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByWorkspaceNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByWorkspaceNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByWorkspaceNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByWorkspaceNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/virtualNetworkPeerings/{peeringName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.subscriptionId, + Parameters.peeringName + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.VirtualNetworkPeering + }, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByWorkspaceOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/virtualNetworkPeerings", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.VirtualNetworkPeeringList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/virtualNetworkPeerings/{peeringName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.subscriptionId, + Parameters.peeringName + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/virtualNetworkPeerings/{peeringName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.subscriptionId, + Parameters.peeringName + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "virtualNetworkPeeringParameters", + mapper: { + ...Mappers.VirtualNetworkPeering, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.VirtualNetworkPeering + }, + 201: { + bodyMapper: Mappers.VirtualNetworkPeering + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByWorkspaceNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.VirtualNetworkPeeringList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/databricks/arm-databricks/src/operations/workspaces.ts b/sdk/databricks/arm-databricks/src/operations/workspaces.ts index df498c59fb03..57faea6c5ebc 100644 --- a/sdk/databricks/arm-databricks/src/operations/workspaces.ts +++ b/sdk/databricks/arm-databricks/src/operations/workspaces.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -13,17 +12,17 @@ import * as msRestAzure from "@azure/ms-rest-azure-js"; import * as Models from "../models"; import * as Mappers from "../models/workspacesMappers"; import * as Parameters from "../models/parameters"; -import { DatabricksClientContext } from "../databricksClientContext"; +import { AzureDatabricksManagementClientContext } from "../azureDatabricksManagementClientContext"; /** Class representing a Workspaces. */ export class Workspaces { - private readonly client: DatabricksClientContext; + private readonly client: AzureDatabricksManagementClientContext; /** * Create a Workspaces. - * @param {DatabricksClientContext} client Reference to the service client. + * @param {AzureDatabricksManagementClientContext} client Reference to the service client. */ - constructor(client: DatabricksClientContext) { + constructor(client: AzureDatabricksManagementClientContext) { this.client = client; } @@ -275,7 +274,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -284,7 +283,6 @@ const getOperationSpec: msRest.OperationSpec = { 200: { bodyMapper: Mappers.Workspace }, - 404: {}, default: { bodyMapper: Mappers.ErrorResponse } @@ -300,7 +298,7 @@ const listByResourceGroupOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -323,7 +321,7 @@ const listBySubscriptionOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -348,12 +346,13 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage ], responses: { + 200: {}, 202: {}, 204: {}, default: { @@ -372,7 +371,7 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -407,7 +406,7 @@ const beginUpdateOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -438,6 +437,9 @@ const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion0 + ], headerParameters: [ Parameters.acceptLanguage ], @@ -459,6 +461,9 @@ const listBySubscriptionNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion0 + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/databricks/arm-databricks/tsconfig.json b/sdk/databricks/arm-databricks/tsconfig.json index 87bbf5b5fa49..422b584abd5e 100644 --- a/sdk/databricks/arm-databricks/tsconfig.json +++ b/sdk/databricks/arm-databricks/tsconfig.json @@ -9,7 +9,7 @@ "esModuleInterop": true, "allowSyntheticDefaultImports": true, "forceConsistentCasingInFileNames": true, - "lib": ["es6"], + "lib": ["es6", "dom"], "declaration": true, "outDir": "./esm", "importHelpers": true From de107dd9e84607745d04d4b5b0f25d35bae72488 Mon Sep 17 00:00:00 2001 From: colawwj <70128817+colawwj@users.noreply.github.com> Date: Fri, 9 Jul 2021 14:58:16 +0800 Subject: [PATCH 15/28] arm-appplatform (#16139) --- sdk/appplatform/arm-appplatform/README.md | 8 +- sdk/appplatform/arm-appplatform/package.json | 4 +- .../src/appPlatformManagementClientContext.ts | 6 +- .../arm-appplatform/src/models/appsMappers.ts | 3 + .../src/models/bindingsMappers.ts | 3 + .../src/models/certificatesMappers.ts | 3 + .../src/models/configServersMappers.ts | 3 + .../src/models/customDomainsMappers.ts | 3 + .../src/models/deploymentsMappers.ts | 3 + .../arm-appplatform/src/models/index.ts | 101 ++++++++++++-- .../arm-appplatform/src/models/mappers.ts | 129 +++++++++++++++++- .../src/models/monitoringSettingsMappers.ts | 3 + .../src/models/servicesMappers.ts | 3 + 13 files changed, 243 insertions(+), 29 deletions(-) diff --git a/sdk/appplatform/arm-appplatform/README.md b/sdk/appplatform/arm-appplatform/README.md index c06e938283f7..86419554dac7 100644 --- a/sdk/appplatform/arm-appplatform/README.md +++ b/sdk/appplatform/arm-appplatform/README.md @@ -1,11 +1,11 @@ ## Azure AppPlatformManagementClient SDK for JavaScript -This package contains an isomorphic SDK (runs both in Node.js and in browsers) for AppPlatformManagementClient. +This package contains an isomorphic SDK (runs both in node.js and in browsers) for AppPlatformManagementClient. ### Currently supported environments - [LTS versions of Node.js](https://nodejs.org/about/releases/) -- Latest versions of Safari, Chrome, Edge, and Firefox. +- Latest versions of Safari, Chrome, Edge and Firefox. ### Prerequisites @@ -21,7 +21,6 @@ Install both packages using the below command: ```bash npm install --save @azure/arm-appplatform @azure/identity ``` - > **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. @@ -37,7 +36,6 @@ If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/ In the below samples, we pass the credential and the Azure subscription id to instantiate the client. Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. - #### nodejs - Authentication, client creation, and get services as an example written in JavaScript. ##### Sample code @@ -87,7 +85,7 @@ In browser applications, we recommend using the `InteractiveBrowserCredential` t const credential = new InteractiveBrowserCredential( { clientId: "", - tenantId: "" + tenant: "" }); const client = new Azure.ArmAppplatform.AppPlatformManagementClient(creds, subscriptionId); const resourceGroupName = "testresourceGroupName"; diff --git a/sdk/appplatform/arm-appplatform/package.json b/sdk/appplatform/arm-appplatform/package.json index 048062d2f2ef..5858db62b3c0 100644 --- a/sdk/appplatform/arm-appplatform/package.json +++ b/sdk/appplatform/arm-appplatform/package.json @@ -2,7 +2,7 @@ "name": "@azure/arm-appplatform", "author": "Microsoft Corporation", "description": "AppPlatformManagementClient Library with typescript type definitions for node.js and browser.", - "version": "1.3.0", + "version": "1.4.0", "dependencies": { "@azure/ms-rest-azure-js": "^2.1.0", "@azure/ms-rest-js": "^2.2.0", @@ -27,7 +27,7 @@ "rollup-plugin-sourcemaps": "^0.4.2", "uglify-js": "^3.6.0" }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/appplatform/arm-appplatform", + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/feature/v4/sdk/appplatform/arm-appplatform", "repository": { "type": "git", "url": "https://github.com/Azure/azure-sdk-for-js.git" diff --git a/sdk/appplatform/arm-appplatform/src/appPlatformManagementClientContext.ts b/sdk/appplatform/arm-appplatform/src/appPlatformManagementClientContext.ts index 1c6af685d8ac..27e67f0731fd 100644 --- a/sdk/appplatform/arm-appplatform/src/appPlatformManagementClientContext.ts +++ b/sdk/appplatform/arm-appplatform/src/appPlatformManagementClientContext.ts @@ -9,11 +9,11 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; -import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; +import { TokenCredential } from "@azure/core-auth"; const packageName = "@azure/arm-appplatform"; -const packageVersion = "1.3.0"; +const packageVersion = "1.4.0"; export class AppPlatformManagementClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials | TokenCredential; @@ -50,7 +50,7 @@ export class AppPlatformManagementClientContext extends msRestAzure.AzureService super(credentials, options); - this.apiVersion = '2020-11-01-preview'; + this.apiVersion = '2021-06-01-preview'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; diff --git a/sdk/appplatform/arm-appplatform/src/models/appsMappers.ts b/sdk/appplatform/arm-appplatform/src/models/appsMappers.ts index 99e4dea19713..c1543243c627 100644 --- a/sdk/appplatform/arm-appplatform/src/models/appsMappers.ts +++ b/sdk/appplatform/arm-appplatform/src/models/appsMappers.ts @@ -22,6 +22,7 @@ export { ConfigServerProperties, ConfigServerResource, ConfigServerSettings, + CustomContainer, CustomDomainProperties, CustomDomainResource, CustomDomainValidatePayload, @@ -32,6 +33,7 @@ export { DeploymentSettings, ErrorModel, GitPatternRepository, + ImageRegistryCredential, ManagedIdentityProperties, MonitoringSettingProperties, MonitoringSettingResource, @@ -41,6 +43,7 @@ export { ProxyResource, RequiredTraffic, Resource, + ResourceRequests, ResourceUploadDefinition, ServiceResource, Sku, diff --git a/sdk/appplatform/arm-appplatform/src/models/bindingsMappers.ts b/sdk/appplatform/arm-appplatform/src/models/bindingsMappers.ts index 30588e309be2..a8fef206e095 100644 --- a/sdk/appplatform/arm-appplatform/src/models/bindingsMappers.ts +++ b/sdk/appplatform/arm-appplatform/src/models/bindingsMappers.ts @@ -22,6 +22,7 @@ export { ConfigServerProperties, ConfigServerResource, ConfigServerSettings, + CustomContainer, CustomDomainProperties, CustomDomainResource, DeploymentInstance, @@ -30,6 +31,7 @@ export { DeploymentSettings, ErrorModel, GitPatternRepository, + ImageRegistryCredential, ManagedIdentityProperties, MonitoringSettingProperties, MonitoringSettingResource, @@ -39,6 +41,7 @@ export { ProxyResource, RequiredTraffic, Resource, + ResourceRequests, ServiceResource, Sku, TemporaryDisk, diff --git a/sdk/appplatform/arm-appplatform/src/models/certificatesMappers.ts b/sdk/appplatform/arm-appplatform/src/models/certificatesMappers.ts index 74a82eb8d30a..f0d9c604020b 100644 --- a/sdk/appplatform/arm-appplatform/src/models/certificatesMappers.ts +++ b/sdk/appplatform/arm-appplatform/src/models/certificatesMappers.ts @@ -22,6 +22,7 @@ export { ConfigServerProperties, ConfigServerResource, ConfigServerSettings, + CustomContainer, CustomDomainProperties, CustomDomainResource, DeploymentInstance, @@ -30,6 +31,7 @@ export { DeploymentSettings, ErrorModel, GitPatternRepository, + ImageRegistryCredential, ManagedIdentityProperties, MonitoringSettingProperties, MonitoringSettingResource, @@ -39,6 +41,7 @@ export { ProxyResource, RequiredTraffic, Resource, + ResourceRequests, ServiceResource, Sku, TemporaryDisk, diff --git a/sdk/appplatform/arm-appplatform/src/models/configServersMappers.ts b/sdk/appplatform/arm-appplatform/src/models/configServersMappers.ts index a4f7578092d0..4fbb71a816ed 100644 --- a/sdk/appplatform/arm-appplatform/src/models/configServersMappers.ts +++ b/sdk/appplatform/arm-appplatform/src/models/configServersMappers.ts @@ -23,6 +23,7 @@ export { ConfigServerSettings, ConfigServerSettingsErrorRecord, ConfigServerSettingsValidateResult, + CustomContainer, CustomDomainProperties, CustomDomainResource, DeploymentInstance, @@ -31,6 +32,7 @@ export { DeploymentSettings, ErrorModel, GitPatternRepository, + ImageRegistryCredential, ManagedIdentityProperties, MonitoringSettingProperties, MonitoringSettingResource, @@ -40,6 +42,7 @@ export { ProxyResource, RequiredTraffic, Resource, + ResourceRequests, ServiceResource, Sku, TemporaryDisk, diff --git a/sdk/appplatform/arm-appplatform/src/models/customDomainsMappers.ts b/sdk/appplatform/arm-appplatform/src/models/customDomainsMappers.ts index 02fcb4f36e3d..66d675938524 100644 --- a/sdk/appplatform/arm-appplatform/src/models/customDomainsMappers.ts +++ b/sdk/appplatform/arm-appplatform/src/models/customDomainsMappers.ts @@ -21,6 +21,7 @@ export { ConfigServerProperties, ConfigServerResource, ConfigServerSettings, + CustomContainer, CustomDomainProperties, CustomDomainResource, CustomDomainResourceCollection, @@ -30,6 +31,7 @@ export { DeploymentSettings, ErrorModel, GitPatternRepository, + ImageRegistryCredential, ManagedIdentityProperties, MonitoringSettingProperties, MonitoringSettingResource, @@ -39,6 +41,7 @@ export { ProxyResource, RequiredTraffic, Resource, + ResourceRequests, ServiceResource, Sku, TemporaryDisk, diff --git a/sdk/appplatform/arm-appplatform/src/models/deploymentsMappers.ts b/sdk/appplatform/arm-appplatform/src/models/deploymentsMappers.ts index 7414c396b7b1..3da0223f88d1 100644 --- a/sdk/appplatform/arm-appplatform/src/models/deploymentsMappers.ts +++ b/sdk/appplatform/arm-appplatform/src/models/deploymentsMappers.ts @@ -21,6 +21,7 @@ export { ConfigServerProperties, ConfigServerResource, ConfigServerSettings, + CustomContainer, CustomDomainProperties, CustomDomainResource, DeploymentInstance, @@ -30,6 +31,7 @@ export { DeploymentSettings, ErrorModel, GitPatternRepository, + ImageRegistryCredential, LogFileUrlResponse, ManagedIdentityProperties, MonitoringSettingProperties, @@ -40,6 +42,7 @@ export { ProxyResource, RequiredTraffic, Resource, + ResourceRequests, ServiceResource, Sku, TemporaryDisk, diff --git a/sdk/appplatform/arm-appplatform/src/models/index.ts b/sdk/appplatform/arm-appplatform/src/models/index.ts index 221fe440bc9f..542f5caec2d9 100644 --- a/sdk/appplatform/arm-appplatform/src/models/index.ts +++ b/sdk/appplatform/arm-appplatform/src/models/index.ts @@ -120,11 +120,11 @@ export interface ClusterResourceProperties { */ export interface Sku { /** - * Name of the Sku + * Name of the Sku. Default value: 'S0'. */ name?: string; /** - * Tier of the Sku + * Tier of the Sku. Default value: 'Standard'. */ tier?: string; /** @@ -546,10 +546,6 @@ export interface AppResourceProperties { * Indicate if only https is allowed. */ httpsOnly?: boolean; - /** - * Indicate if end to end TLS is enabled. - */ - enableEndToEndTLS?: boolean; /** * Date time when the resource is created * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -563,6 +559,10 @@ export interface AppResourceProperties { * Persistent disk settings */ persistentDisk?: PersistentDisk; + /** + * Indicate if end to end TLS is enabled. + */ + enableEndToEndTLS?: boolean; } /** @@ -798,12 +798,55 @@ export interface CustomDomainValidateResult { message?: string; } +/** + * Credential of the image registry + */ +export interface ImageRegistryCredential { + /** + * The username of the image registry credential + */ + username?: string; + /** + * The password of the image registry credential + */ + password?: string; +} + +/** + * Custom container payload + */ +export interface CustomContainer { + /** + * The name of the registry that contains the container image + */ + server?: string; + /** + * Container image of the custom container. This should be in the form of : + * without the server name of the registry + */ + containerImage?: string; + /** + * Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this + * is not provided. + */ + command?: string[]; + /** + * Arguments to the entrypoint. The docker image's CMD is used if this is not provided. + */ + args?: string[]; + /** + * Credential of the image registry + */ + imageRegistryCredential?: ImageRegistryCredential; +} + /** * Source information for a deployment */ export interface UserSourceInfo { /** - * Type of the source uploaded. Possible values include: 'Jar', 'NetCoreZip', 'Source' + * Type of the source uploaded. Possible values include: 'Jar', 'NetCoreZip', 'Source', + * 'Container' */ type?: UserSourceType; /** @@ -820,6 +863,26 @@ export interface UserSourceInfo { * the relative path to the target module/project. */ artifactSelector?: string; + /** + * Custom container payload + */ + customContainer?: CustomContainer; +} + +/** + * Deployment resource request payload + */ +export interface ResourceRequests { + /** + * Required CPU. 1 core can be represented by 1 or 1000m. This should be 500m or 1 for Basic + * tier, and {500m, 1, 2, 3, 4} for Standard tier. + */ + cpu?: string; + /** + * Required memory. 1 GB can be represented by 1Gi or 1024Mi. This should be {512Mi, 1Gi, 2Gi} + * for Basic tier, and {512Mi, 1Gi, 2Gi, ..., 8Gi} for Standard tier. + */ + memory?: string; } /** @@ -827,15 +890,23 @@ export interface UserSourceInfo { */ export interface DeploymentSettings { /** - * Required CPU, basic tier should be 1, standard tier should be in range (1, 4). Default value: - * 1. + * Required CPU. This should be 1 for Basic tier, and in range [1, 4] for Standard tier. This is + * deprecated starting from API version 2021-06-01-preview. Please use the resourceRequests field + * to set the CPU size. Default value: 1. */ cpu?: number; /** - * Required Memory size in GB, basic tier should be in range (1, 2), standard tier should be in - * range (1, 8). Default value: 1. + * Required Memory size in GB. This should be in range [1, 2] for Basic tier, and in range [1, 8] + * for Standard tier. This is deprecated starting from API version 2021-06-01-preview. Please use + * the resourceRequests field to set the the memory size. Default value: 1. */ memoryInGB?: number; + /** + * The requested resource quantity for required CPU and Memory. It is recommended that using this + * field to represent the required CPU and Memory, the old field cpu and memoryInGB will be + * deprecated later. + */ + resourceRequests?: ResourceRequests; /** * JVM parameter */ @@ -1007,6 +1078,10 @@ export interface MetricDimension { * Localized friendly display name of the dimension */ displayName?: string; + /** + * Whether this dimension should be included for the Shoebox export scenario + */ + toBeExportedForShoebox?: boolean; } /** @@ -1499,11 +1574,11 @@ export type AppResourceProvisioningState = 'Succeeded' | 'Failed' | 'Creating' | /** * Defines values for UserSourceType. - * Possible values include: 'Jar', 'NetCoreZip', 'Source' + * Possible values include: 'Jar', 'NetCoreZip', 'Source', 'Container' * @readonly * @enum {string} */ -export type UserSourceType = 'Jar' | 'NetCoreZip' | 'Source'; +export type UserSourceType = 'Jar' | 'NetCoreZip' | 'Source' | 'Container'; /** * Defines values for RuntimeVersion. diff --git a/sdk/appplatform/arm-appplatform/src/models/mappers.ts b/sdk/appplatform/arm-appplatform/src/models/mappers.ts index d5aea74885fa..c80ead76b135 100644 --- a/sdk/appplatform/arm-appplatform/src/models/mappers.ts +++ b/sdk/appplatform/arm-appplatform/src/models/mappers.ts @@ -196,12 +196,14 @@ export const Sku: msRest.CompositeMapper = { modelProperties: { name: { serializedName: "name", + defaultValue: 'S0', type: { name: "String" } }, tier: { serializedName: "tier", + defaultValue: 'Standard', type: { name: "String" } @@ -910,12 +912,6 @@ export const AppResourceProperties: msRest.CompositeMapper = { name: "Boolean" } }, - enableEndToEndTLS: { - serializedName: "enableEndToEndTLS", - type: { - name: "Boolean" - } - }, createdTime: { readOnly: true, serializedName: "createdTime", @@ -936,6 +932,12 @@ export const AppResourceProperties: msRest.CompositeMapper = { name: "Composite", className: "PersistentDisk" } + }, + enableEndToEndTLS: { + serializedName: "enableEndToEndTLS", + type: { + name: "Boolean" + } } } } @@ -1320,6 +1322,79 @@ export const CustomDomainValidateResult: msRest.CompositeMapper = { } }; +export const ImageRegistryCredential: msRest.CompositeMapper = { + serializedName: "ImageRegistryCredential", + type: { + name: "Composite", + className: "ImageRegistryCredential", + modelProperties: { + username: { + serializedName: "username", + type: { + name: "String" + } + }, + password: { + serializedName: "password", + type: { + name: "String" + } + } + } + } +}; + +export const CustomContainer: msRest.CompositeMapper = { + serializedName: "CustomContainer", + type: { + name: "Composite", + className: "CustomContainer", + modelProperties: { + server: { + serializedName: "server", + type: { + name: "String" + } + }, + containerImage: { + serializedName: "containerImage", + type: { + name: "String" + } + }, + command: { + serializedName: "command", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + args: { + serializedName: "args", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + imageRegistryCredential: { + serializedName: "imageRegistryCredential", + type: { + name: "Composite", + className: "ImageRegistryCredential" + } + } + } + } +}; + export const UserSourceInfo: msRest.CompositeMapper = { serializedName: "UserSourceInfo", type: { @@ -1349,6 +1424,35 @@ export const UserSourceInfo: msRest.CompositeMapper = { type: { name: "String" } + }, + customContainer: { + serializedName: "customContainer", + type: { + name: "Composite", + className: "CustomContainer" + } + } + } + } +}; + +export const ResourceRequests: msRest.CompositeMapper = { + serializedName: "ResourceRequests", + type: { + name: "Composite", + className: "ResourceRequests", + modelProperties: { + cpu: { + serializedName: "cpu", + type: { + name: "String" + } + }, + memory: { + serializedName: "memory", + type: { + name: "String" + } } } } @@ -1374,6 +1478,13 @@ export const DeploymentSettings: msRest.CompositeMapper = { name: "Number" } }, + resourceRequests: { + serializedName: "resourceRequests", + type: { + name: "Composite", + className: "ResourceRequests" + } + }, jvmOptions: { serializedName: "jvmOptions", type: { @@ -1645,6 +1756,12 @@ export const MetricDimension: msRest.CompositeMapper = { type: { name: "String" } + }, + toBeExportedForShoebox: { + serializedName: "toBeExportedForShoebox", + type: { + name: "Boolean" + } } } } diff --git a/sdk/appplatform/arm-appplatform/src/models/monitoringSettingsMappers.ts b/sdk/appplatform/arm-appplatform/src/models/monitoringSettingsMappers.ts index 0463b1feac36..b827ef84ea79 100644 --- a/sdk/appplatform/arm-appplatform/src/models/monitoringSettingsMappers.ts +++ b/sdk/appplatform/arm-appplatform/src/models/monitoringSettingsMappers.ts @@ -21,6 +21,7 @@ export { ConfigServerProperties, ConfigServerResource, ConfigServerSettings, + CustomContainer, CustomDomainProperties, CustomDomainResource, DeploymentInstance, @@ -29,6 +30,7 @@ export { DeploymentSettings, ErrorModel, GitPatternRepository, + ImageRegistryCredential, ManagedIdentityProperties, MonitoringSettingProperties, MonitoringSettingResource, @@ -38,6 +40,7 @@ export { ProxyResource, RequiredTraffic, Resource, + ResourceRequests, ServiceResource, Sku, TemporaryDisk, diff --git a/sdk/appplatform/arm-appplatform/src/models/servicesMappers.ts b/sdk/appplatform/arm-appplatform/src/models/servicesMappers.ts index de115949d99c..58194934685e 100644 --- a/sdk/appplatform/arm-appplatform/src/models/servicesMappers.ts +++ b/sdk/appplatform/arm-appplatform/src/models/servicesMappers.ts @@ -21,6 +21,7 @@ export { ConfigServerProperties, ConfigServerResource, ConfigServerSettings, + CustomContainer, CustomDomainProperties, CustomDomainResource, DeploymentInstance, @@ -29,6 +30,7 @@ export { DeploymentSettings, ErrorModel, GitPatternRepository, + ImageRegistryCredential, ManagedIdentityProperties, MonitoringSettingProperties, MonitoringSettingResource, @@ -41,6 +43,7 @@ export { RegenerateTestKeyRequestPayload, RequiredTraffic, Resource, + ResourceRequests, ServiceResource, ServiceResourceList, Sku, From 38040718514f951b153da88d68ca7a8df92d363f Mon Sep 17 00:00:00 2001 From: colawwj <70128817+colawwj@users.noreply.github.com> Date: Fri, 9 Jul 2021 15:01:58 +0800 Subject: [PATCH 16/28] arm-avs-release (#16198) --- sdk/avs/arm-avs/LICENSE.txt | 2 +- sdk/avs/arm-avs/README.md | 9 +- sdk/avs/arm-avs/package.json | 4 +- sdk/avs/arm-avs/rollup.config.js | 4 +- sdk/avs/arm-avs/src/avsClient.ts | 21 +- sdk/avs/arm-avs/src/avsClientContext.ts | 11 +- sdk/avs/arm-avs/src/models/addonsMappers.ts | 61 + .../src/models/authorizationsMappers.ts | 42 +- .../arm-avs/src/models/cloudLinksMappers.ts | 61 + sdk/avs/arm-avs/src/models/clustersMappers.ts | 42 +- .../arm-avs/src/models/datastoresMappers.ts | 61 + .../models/globalReachConnectionsMappers.ts | 61 + .../src/models/hcxEnterpriseSitesMappers.ts | 42 +- sdk/avs/arm-avs/src/models/index.ts | 3539 ++++++++++++++++- .../arm-avs/src/models/locationsMappers.ts | 5 +- sdk/avs/arm-avs/src/models/mappers.ts | 2066 +++++++++- .../arm-avs/src/models/operationsMappers.ts | 12 +- sdk/avs/arm-avs/src/models/parameters.ts | 168 +- .../src/models/privateCloudsMappers.ts | 42 +- .../src/models/scriptCmdletsMappers.ts | 61 + .../src/models/scriptExecutionsMappers.ts | 61 + .../src/models/scriptPackagesMappers.ts | 61 + .../src/models/workloadNetworksMappers.ts | 69 + sdk/avs/arm-avs/src/operations/addons.ts | 334 ++ .../arm-avs/src/operations/authorizations.ts | 24 +- sdk/avs/arm-avs/src/operations/cloudLinks.ts | 334 ++ sdk/avs/arm-avs/src/operations/clusters.ts | 8 +- sdk/avs/arm-avs/src/operations/datastores.ts | 350 ++ .../src/operations/globalReachConnections.ts | 332 ++ .../src/operations/hcxEnterpriseSites.ts | 27 +- sdk/avs/arm-avs/src/operations/index.ts | 13 +- sdk/avs/arm-avs/src/operations/locations.ts | 5 +- sdk/avs/arm-avs/src/operations/operations.ts | 8 +- .../arm-avs/src/operations/privateClouds.ts | 119 +- .../arm-avs/src/operations/scriptCmdlets.ts | 215 + .../src/operations/scriptExecutions.ts | 411 ++ .../arm-avs/src/operations/scriptPackages.ts | 200 + .../src/operations/workloadNetworks.ts | 2935 ++++++++++++++ 38 files changed, 11456 insertions(+), 364 deletions(-) create mode 100644 sdk/avs/arm-avs/src/models/addonsMappers.ts create mode 100644 sdk/avs/arm-avs/src/models/cloudLinksMappers.ts create mode 100644 sdk/avs/arm-avs/src/models/datastoresMappers.ts create mode 100644 sdk/avs/arm-avs/src/models/globalReachConnectionsMappers.ts create mode 100644 sdk/avs/arm-avs/src/models/scriptCmdletsMappers.ts create mode 100644 sdk/avs/arm-avs/src/models/scriptExecutionsMappers.ts create mode 100644 sdk/avs/arm-avs/src/models/scriptPackagesMappers.ts create mode 100644 sdk/avs/arm-avs/src/models/workloadNetworksMappers.ts create mode 100644 sdk/avs/arm-avs/src/operations/addons.ts create mode 100644 sdk/avs/arm-avs/src/operations/cloudLinks.ts create mode 100644 sdk/avs/arm-avs/src/operations/datastores.ts create mode 100644 sdk/avs/arm-avs/src/operations/globalReachConnections.ts create mode 100644 sdk/avs/arm-avs/src/operations/scriptCmdlets.ts create mode 100644 sdk/avs/arm-avs/src/operations/scriptExecutions.ts create mode 100644 sdk/avs/arm-avs/src/operations/scriptPackages.ts create mode 100644 sdk/avs/arm-avs/src/operations/workloadNetworks.ts diff --git a/sdk/avs/arm-avs/LICENSE.txt b/sdk/avs/arm-avs/LICENSE.txt index ea8fb1516028..2d3163745319 100644 --- a/sdk/avs/arm-avs/LICENSE.txt +++ b/sdk/avs/arm-avs/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2020 Microsoft +Copyright (c) 2021 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/avs/arm-avs/README.md b/sdk/avs/arm-avs/README.md index 63a73a5aafa8..353b532b2dd2 100644 --- a/sdk/avs/arm-avs/README.md +++ b/sdk/avs/arm-avs/README.md @@ -1,11 +1,11 @@ ## Azure AvsClient SDK for JavaScript -This package contains an isomorphic SDK (runs both in Node.js and in browsers) for AvsClient. +This package contains an isomorphic SDK (runs both in node.js and in browsers) for AvsClient. ### Currently supported environments - [LTS versions of Node.js](https://nodejs.org/about/releases/) -- Latest versions of Safari, Chrome, Edge, and Firefox. +- Latest versions of Safari, Chrome, Edge and Firefox. ### Prerequisites @@ -21,7 +21,6 @@ Install both packages using the below command: ```bash npm install --save @azure/arm-avs @azure/identity ``` - > **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. @@ -37,7 +36,6 @@ If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/ In the below samples, we pass the credential and the Azure subscription id to instantiate the client. Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. - #### nodejs - Authentication, client creation, and list operations as an example written in JavaScript. ##### Sample code @@ -51,7 +49,6 @@ const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; // Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. const creds = new DefaultAzureCredential(); const client = new AvsClient(creds, subscriptionId); - client.operations.list().then((result) => { console.log("The result is:"); console.log(result); @@ -86,7 +83,7 @@ In browser applications, we recommend using the `InteractiveBrowserCredential` t const credential = new InteractiveBrowserCredential( { clientId: "", - tenantId: "" + tenant: "" }); const client = new Azure.ArmAvs.AvsClient(creds, subscriptionId); client.operations.list().then((result) => { diff --git a/sdk/avs/arm-avs/package.json b/sdk/avs/arm-avs/package.json index 6cac221a8bca..1a2e860f94ab 100644 --- a/sdk/avs/arm-avs/package.json +++ b/sdk/avs/arm-avs/package.json @@ -2,7 +2,7 @@ "name": "@azure/arm-avs", "author": "Microsoft Corporation", "description": "AvsClient Library with typescript type definitions for node.js and browser.", - "version": "1.1.0", + "version": "2.0.0", "dependencies": { "@azure/ms-rest-azure-js": "^2.1.0", "@azure/ms-rest-js": "^2.2.0", @@ -27,7 +27,7 @@ "rollup-plugin-sourcemaps": "^0.4.2", "uglify-js": "^3.6.0" }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/avs/arm-avs", + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/feature/v4/sdk/avs/arm-avs", "repository": { "type": "git", "url": "https://github.com/Azure/azure-sdk-for-js.git" diff --git a/sdk/avs/arm-avs/rollup.config.js b/sdk/avs/arm-avs/rollup.config.js index f2cc59bca8c9..9e2c6038eb1d 100644 --- a/sdk/avs/arm-avs/rollup.config.js +++ b/sdk/avs/arm-avs/rollup.config.js @@ -21,8 +21,8 @@ const config = { "@azure/ms-rest-azure-js": "msRestAzure" }, banner: `/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. diff --git a/sdk/avs/arm-avs/src/avsClient.ts b/sdk/avs/arm-avs/src/avsClient.ts index 3b2edc265a44..aaaa5a6236b2 100644 --- a/sdk/avs/arm-avs/src/avsClient.ts +++ b/sdk/avs/arm-avs/src/avsClient.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -22,8 +21,16 @@ class AvsClient extends AvsClientContext { locations: operations.Locations; privateClouds: operations.PrivateClouds; clusters: operations.Clusters; + datastores: operations.Datastores; hcxEnterpriseSites: operations.HcxEnterpriseSites; authorizations: operations.Authorizations; + globalReachConnections: operations.GlobalReachConnections; + workloadNetworks: operations.WorkloadNetworks; + cloudLinks: operations.CloudLinks; + addons: operations.Addons; + scriptPackages: operations.ScriptPackages; + scriptCmdlets: operations.ScriptCmdlets; + scriptExecutions: operations.ScriptExecutions; /** * Initializes a new instance of the AvsClient class. @@ -42,8 +49,16 @@ class AvsClient extends AvsClientContext { this.locations = new operations.Locations(this); this.privateClouds = new operations.PrivateClouds(this); this.clusters = new operations.Clusters(this); + this.datastores = new operations.Datastores(this); this.hcxEnterpriseSites = new operations.HcxEnterpriseSites(this); this.authorizations = new operations.Authorizations(this); + this.globalReachConnections = new operations.GlobalReachConnections(this); + this.workloadNetworks = new operations.WorkloadNetworks(this); + this.cloudLinks = new operations.CloudLinks(this); + this.addons = new operations.Addons(this); + this.scriptPackages = new operations.ScriptPackages(this); + this.scriptCmdlets = new operations.ScriptCmdlets(this); + this.scriptExecutions = new operations.ScriptExecutions(this); } } diff --git a/sdk/avs/arm-avs/src/avsClientContext.ts b/sdk/avs/arm-avs/src/avsClientContext.ts index 03dceb2252d3..ce126894cc98 100644 --- a/sdk/avs/arm-avs/src/avsClientContext.ts +++ b/sdk/avs/arm-avs/src/avsClientContext.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -10,11 +9,11 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; -import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; +import { TokenCredential } from "@azure/core-auth"; const packageName = "@azure/arm-avs"; -const packageVersion = "1.1.0"; +const packageVersion = "2.0.0"; export class AvsClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials | TokenCredential; @@ -50,7 +49,7 @@ export class AvsClientContext extends msRestAzure.AzureServiceClient { super(credentials, options); - this.apiVersion = '2020-03-20'; + this.apiVersion = '2021-06-01'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; diff --git a/sdk/avs/arm-avs/src/models/addonsMappers.ts b/sdk/avs/arm-avs/src/models/addonsMappers.ts new file mode 100644 index 000000000000..cf965d12f4b9 --- /dev/null +++ b/sdk/avs/arm-avs/src/models/addonsMappers.ts @@ -0,0 +1,61 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + Addon, + AddonHcxProperties, + AddonList, + AddonProperties, + AddonSrmProperties, + AddonVrProperties, + BaseResource, + Circuit, + CloudError, + CloudLink, + Cluster, + CommonClusterProperties, + Datastore, + DiskPoolVolume, + Endpoints, + ErrorAdditionalInfo, + ErrorResponse, + ExpressRouteAuthorization, + GlobalReachConnection, + HcxEnterpriseSite, + IdentitySource, + ManagementCluster, + NetAppVolume, + PrivateCloud, + ProxyResource, + PSCredentialExecutionParameter, + Resource, + ScriptCmdlet, + ScriptExecution, + ScriptExecutionParameter, + ScriptPackage, + ScriptParameter, + ScriptSecureStringExecutionParameter, + ScriptStringExecutionParameter, + Sku, + TrackedResource, + WorkloadNetworkDhcp, + WorkloadNetworkDhcpEntity, + WorkloadNetworkDhcpRelay, + WorkloadNetworkDhcpServer, + WorkloadNetworkDnsService, + WorkloadNetworkDnsZone, + WorkloadNetworkGateway, + WorkloadNetworkPortMirroring, + WorkloadNetworkPublicIP, + WorkloadNetworkSegment, + WorkloadNetworkSegmentPortVif, + WorkloadNetworkSegmentSubnet, + WorkloadNetworkVirtualMachine, + WorkloadNetworkVMGroup +} from "../models/mappers"; diff --git a/sdk/avs/arm-avs/src/models/authorizationsMappers.ts b/sdk/avs/arm-avs/src/models/authorizationsMappers.ts index e05ac88a10b2..971a067ca334 100644 --- a/sdk/avs/arm-avs/src/models/authorizationsMappers.ts +++ b/sdk/avs/arm-avs/src/models/authorizationsMappers.ts @@ -1,27 +1,61 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { + discriminators, + Addon, + AddonHcxProperties, + AddonProperties, + AddonSrmProperties, + AddonVrProperties, BaseResource, Circuit, CloudError, + CloudLink, Cluster, - ClusterUpdateProperties, + CommonClusterProperties, + Datastore, + DiskPoolVolume, Endpoints, ErrorAdditionalInfo, ErrorResponse, ExpressRouteAuthorization, ExpressRouteAuthorizationList, + GlobalReachConnection, HcxEnterpriseSite, IdentitySource, ManagementCluster, + NetAppVolume, PrivateCloud, + ProxyResource, + PSCredentialExecutionParameter, Resource, + ScriptCmdlet, + ScriptExecution, + ScriptExecutionParameter, + ScriptPackage, + ScriptParameter, + ScriptSecureStringExecutionParameter, + ScriptStringExecutionParameter, Sku, - TrackedResource + TrackedResource, + WorkloadNetworkDhcp, + WorkloadNetworkDhcpEntity, + WorkloadNetworkDhcpRelay, + WorkloadNetworkDhcpServer, + WorkloadNetworkDnsService, + WorkloadNetworkDnsZone, + WorkloadNetworkGateway, + WorkloadNetworkPortMirroring, + WorkloadNetworkPublicIP, + WorkloadNetworkSegment, + WorkloadNetworkSegmentPortVif, + WorkloadNetworkSegmentSubnet, + WorkloadNetworkVirtualMachine, + WorkloadNetworkVMGroup } from "../models/mappers"; diff --git a/sdk/avs/arm-avs/src/models/cloudLinksMappers.ts b/sdk/avs/arm-avs/src/models/cloudLinksMappers.ts new file mode 100644 index 000000000000..ab66f0a4c077 --- /dev/null +++ b/sdk/avs/arm-avs/src/models/cloudLinksMappers.ts @@ -0,0 +1,61 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + Addon, + AddonHcxProperties, + AddonProperties, + AddonSrmProperties, + AddonVrProperties, + BaseResource, + Circuit, + CloudError, + CloudLink, + CloudLinkList, + Cluster, + CommonClusterProperties, + Datastore, + DiskPoolVolume, + Endpoints, + ErrorAdditionalInfo, + ErrorResponse, + ExpressRouteAuthorization, + GlobalReachConnection, + HcxEnterpriseSite, + IdentitySource, + ManagementCluster, + NetAppVolume, + PrivateCloud, + ProxyResource, + PSCredentialExecutionParameter, + Resource, + ScriptCmdlet, + ScriptExecution, + ScriptExecutionParameter, + ScriptPackage, + ScriptParameter, + ScriptSecureStringExecutionParameter, + ScriptStringExecutionParameter, + Sku, + TrackedResource, + WorkloadNetworkDhcp, + WorkloadNetworkDhcpEntity, + WorkloadNetworkDhcpRelay, + WorkloadNetworkDhcpServer, + WorkloadNetworkDnsService, + WorkloadNetworkDnsZone, + WorkloadNetworkGateway, + WorkloadNetworkPortMirroring, + WorkloadNetworkPublicIP, + WorkloadNetworkSegment, + WorkloadNetworkSegmentPortVif, + WorkloadNetworkSegmentSubnet, + WorkloadNetworkVirtualMachine, + WorkloadNetworkVMGroup +} from "../models/mappers"; diff --git a/sdk/avs/arm-avs/src/models/clustersMappers.ts b/sdk/avs/arm-avs/src/models/clustersMappers.ts index 124b77e9e04d..f63850920810 100644 --- a/sdk/avs/arm-avs/src/models/clustersMappers.ts +++ b/sdk/avs/arm-avs/src/models/clustersMappers.ts @@ -1,28 +1,62 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { + discriminators, + Addon, + AddonHcxProperties, + AddonProperties, + AddonSrmProperties, + AddonVrProperties, BaseResource, Circuit, CloudError, + CloudLink, Cluster, ClusterList, ClusterUpdate, - ClusterUpdateProperties, + CommonClusterProperties, + Datastore, + DiskPoolVolume, Endpoints, ErrorAdditionalInfo, ErrorResponse, ExpressRouteAuthorization, + GlobalReachConnection, HcxEnterpriseSite, IdentitySource, ManagementCluster, + NetAppVolume, PrivateCloud, + ProxyResource, + PSCredentialExecutionParameter, Resource, + ScriptCmdlet, + ScriptExecution, + ScriptExecutionParameter, + ScriptPackage, + ScriptParameter, + ScriptSecureStringExecutionParameter, + ScriptStringExecutionParameter, Sku, - TrackedResource + TrackedResource, + WorkloadNetworkDhcp, + WorkloadNetworkDhcpEntity, + WorkloadNetworkDhcpRelay, + WorkloadNetworkDhcpServer, + WorkloadNetworkDnsService, + WorkloadNetworkDnsZone, + WorkloadNetworkGateway, + WorkloadNetworkPortMirroring, + WorkloadNetworkPublicIP, + WorkloadNetworkSegment, + WorkloadNetworkSegmentPortVif, + WorkloadNetworkSegmentSubnet, + WorkloadNetworkVirtualMachine, + WorkloadNetworkVMGroup } from "../models/mappers"; diff --git a/sdk/avs/arm-avs/src/models/datastoresMappers.ts b/sdk/avs/arm-avs/src/models/datastoresMappers.ts new file mode 100644 index 000000000000..29be66bd71da --- /dev/null +++ b/sdk/avs/arm-avs/src/models/datastoresMappers.ts @@ -0,0 +1,61 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + Addon, + AddonHcxProperties, + AddonProperties, + AddonSrmProperties, + AddonVrProperties, + BaseResource, + Circuit, + CloudError, + CloudLink, + Cluster, + CommonClusterProperties, + Datastore, + DatastoreList, + DiskPoolVolume, + Endpoints, + ErrorAdditionalInfo, + ErrorResponse, + ExpressRouteAuthorization, + GlobalReachConnection, + HcxEnterpriseSite, + IdentitySource, + ManagementCluster, + NetAppVolume, + PrivateCloud, + ProxyResource, + PSCredentialExecutionParameter, + Resource, + ScriptCmdlet, + ScriptExecution, + ScriptExecutionParameter, + ScriptPackage, + ScriptParameter, + ScriptSecureStringExecutionParameter, + ScriptStringExecutionParameter, + Sku, + TrackedResource, + WorkloadNetworkDhcp, + WorkloadNetworkDhcpEntity, + WorkloadNetworkDhcpRelay, + WorkloadNetworkDhcpServer, + WorkloadNetworkDnsService, + WorkloadNetworkDnsZone, + WorkloadNetworkGateway, + WorkloadNetworkPortMirroring, + WorkloadNetworkPublicIP, + WorkloadNetworkSegment, + WorkloadNetworkSegmentPortVif, + WorkloadNetworkSegmentSubnet, + WorkloadNetworkVirtualMachine, + WorkloadNetworkVMGroup +} from "../models/mappers"; diff --git a/sdk/avs/arm-avs/src/models/globalReachConnectionsMappers.ts b/sdk/avs/arm-avs/src/models/globalReachConnectionsMappers.ts new file mode 100644 index 000000000000..9fb905d075f7 --- /dev/null +++ b/sdk/avs/arm-avs/src/models/globalReachConnectionsMappers.ts @@ -0,0 +1,61 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + Addon, + AddonHcxProperties, + AddonProperties, + AddonSrmProperties, + AddonVrProperties, + BaseResource, + Circuit, + CloudError, + CloudLink, + Cluster, + CommonClusterProperties, + Datastore, + DiskPoolVolume, + Endpoints, + ErrorAdditionalInfo, + ErrorResponse, + ExpressRouteAuthorization, + GlobalReachConnection, + GlobalReachConnectionList, + HcxEnterpriseSite, + IdentitySource, + ManagementCluster, + NetAppVolume, + PrivateCloud, + ProxyResource, + PSCredentialExecutionParameter, + Resource, + ScriptCmdlet, + ScriptExecution, + ScriptExecutionParameter, + ScriptPackage, + ScriptParameter, + ScriptSecureStringExecutionParameter, + ScriptStringExecutionParameter, + Sku, + TrackedResource, + WorkloadNetworkDhcp, + WorkloadNetworkDhcpEntity, + WorkloadNetworkDhcpRelay, + WorkloadNetworkDhcpServer, + WorkloadNetworkDnsService, + WorkloadNetworkDnsZone, + WorkloadNetworkGateway, + WorkloadNetworkPortMirroring, + WorkloadNetworkPublicIP, + WorkloadNetworkSegment, + WorkloadNetworkSegmentPortVif, + WorkloadNetworkSegmentSubnet, + WorkloadNetworkVirtualMachine, + WorkloadNetworkVMGroup +} from "../models/mappers"; diff --git a/sdk/avs/arm-avs/src/models/hcxEnterpriseSitesMappers.ts b/sdk/avs/arm-avs/src/models/hcxEnterpriseSitesMappers.ts index 874d20947675..083d84e54139 100644 --- a/sdk/avs/arm-avs/src/models/hcxEnterpriseSitesMappers.ts +++ b/sdk/avs/arm-avs/src/models/hcxEnterpriseSitesMappers.ts @@ -1,27 +1,61 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { + discriminators, + Addon, + AddonHcxProperties, + AddonProperties, + AddonSrmProperties, + AddonVrProperties, BaseResource, Circuit, CloudError, + CloudLink, Cluster, - ClusterUpdateProperties, + CommonClusterProperties, + Datastore, + DiskPoolVolume, Endpoints, ErrorAdditionalInfo, ErrorResponse, ExpressRouteAuthorization, + GlobalReachConnection, HcxEnterpriseSite, HcxEnterpriseSiteList, IdentitySource, ManagementCluster, + NetAppVolume, PrivateCloud, + ProxyResource, + PSCredentialExecutionParameter, Resource, + ScriptCmdlet, + ScriptExecution, + ScriptExecutionParameter, + ScriptPackage, + ScriptParameter, + ScriptSecureStringExecutionParameter, + ScriptStringExecutionParameter, Sku, - TrackedResource + TrackedResource, + WorkloadNetworkDhcp, + WorkloadNetworkDhcpEntity, + WorkloadNetworkDhcpRelay, + WorkloadNetworkDhcpServer, + WorkloadNetworkDnsService, + WorkloadNetworkDnsZone, + WorkloadNetworkGateway, + WorkloadNetworkPortMirroring, + WorkloadNetworkPublicIP, + WorkloadNetworkSegment, + WorkloadNetworkSegmentPortVif, + WorkloadNetworkSegmentSubnet, + WorkloadNetworkVirtualMachine, + WorkloadNetworkVMGroup } from "../models/mappers"; diff --git a/sdk/avs/arm-avs/src/models/index.ts b/sdk/avs/arm-avs/src/models/index.ts index b2e5781ec254..e55e9bcb1955 100644 --- a/sdk/avs/arm-avs/src/models/index.ts +++ b/sdk/avs/arm-avs/src/models/index.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -78,6 +78,12 @@ export interface TrackedResource extends Resource { tags?: { [propertyName: string]: string }; } +/** + * The resource model definition for a ARM proxy resource + */ +export interface ProxyResource extends Resource { +} + /** * The resource management error additional info. */ @@ -95,7 +101,9 @@ export interface ErrorAdditionalInfo { } /** - * The resource management error response. + * Common error response for all Azure Resource Manager APIs to return error details for failed + * operations. (This also follows the OData error response format.) + * @summary Error Response */ export interface ErrorResponse { /** @@ -151,6 +159,131 @@ export interface OperationDisplay { readonly description?: string; } +/** + * Specifications of the Log for Azure Monitoring + */ +export interface LogSpecification { + /** + * Name of the log + */ + name?: string; + /** + * Localized friendly display name of the log + */ + displayName?: string; + /** + * Blob duration of the log + */ + blobDuration?: string; +} + +/** + * Specifications of the Dimension of metrics + */ +export interface MetricDimension { + /** + * Name of the dimension + */ + name?: string; + /** + * Localized friendly display name of the dimension + */ + displayName?: string; + /** + * Name of the dimension as it appears in MDM + */ + internalName?: string; + /** + * A boolean flag indicating whether this dimension should be included for the shoebox export + * scenario + */ + toBeExportedForShoebox?: boolean; +} + +/** + * Specifications of the Metrics for Azure Monitoring + */ +export interface MetricSpecification { + /** + * Name of the metric + */ + name?: string; + /** + * Localized friendly display name of the metric + */ + displayName?: string; + /** + * Localized friendly description of the metric + */ + displayDescription?: string; + /** + * Unit that makes sense for the metric + */ + unit?: string; + /** + * Name of the metric category that the metric belongs to. A metric can only belong to a single + * category. + */ + category?: string; + /** + * Only provide one value for this field. Valid values: Average, Minimum, Maximum, Total, Count. + */ + aggregationType?: string; + /** + * Supported aggregation types + */ + supportedAggregationTypes?: string[]; + /** + * Supported time grain types + */ + supportedTimeGrainTypes?: string[]; + /** + * Optional. If set to true, then zero will be returned for time duration where no metric is + * emitted/published. + */ + fillGapWithZero?: boolean; + /** + * Dimensions of the metric + */ + dimensions?: MetricDimension[]; + /** + * Whether or not the service is using regional MDM accounts. + */ + enableRegionalMdmAccount?: string; + /** + * The name of the MDM account. + */ + sourceMdmAccount?: string; + /** + * The name of the MDM namespace. + */ + sourceMdmNamespace?: string; +} + +/** + * Service specification payload + */ +export interface ServiceSpecification { + /** + * Specifications of the Log for Azure Monitoring + */ + logSpecifications?: LogSpecification[]; + /** + * Specifications of the Metrics for Azure Monitoring + */ + metricSpecifications?: MetricSpecification[]; +} + +/** + * Extra Operation properties + */ +export interface OperationProperties { + /** + * Service specifications of the operation + */ + serviceSpecification?: ServiceSpecification; +} + /** * A REST API operation */ @@ -165,6 +298,18 @@ export interface Operation { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly display?: OperationDisplay; + /** + * Gets or sets a value indicating whether the operation is a data action or not + */ + isDataAction?: boolean; + /** + * Origin of the operation + */ + origin?: string; + /** + * Properties of the operation + */ + properties?: OperationProperties; } /** @@ -309,7 +454,7 @@ export interface PrivateCloud extends TrackedResource { managementCluster?: ManagementCluster; /** * Connectivity to internet is enabled or disabled. Possible values include: 'Enabled', - * 'Disabled' + * 'Disabled'. Default value: 'Disabled'. */ internet?: InternetEnum; /** @@ -370,22 +515,26 @@ export interface PrivateCloud extends TrackedResource { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly nsxtCertificateThumbprint?: string; + /** + * Array of cloud link IDs from other clouds that connect to this one + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly externalCloudLinks?: string[]; } /** - * The properties of a cluster that may be updated + * The common properties of a cluster */ -export interface ClusterUpdateProperties { +export interface CommonClusterProperties { /** * The cluster size */ clusterSize?: number; -} - -/** - * The properties of a default cluster - */ -export interface ManagementCluster extends ClusterUpdateProperties { + /** + * The state of the cluster provisioning. Possible values include: 'Succeeded', 'Failed', + * 'Cancelled', 'Deleting', 'Updating' + */ + provisioningState?: ClusterProvisioningState; /** * The identity * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -398,12 +547,18 @@ export interface ManagementCluster extends ClusterUpdateProperties { readonly hosts?: string[]; } +/** + * The properties of a management cluster + */ +export interface ManagementCluster extends CommonClusterProperties { +} + /** * An update to a private cloud resource */ export interface PrivateCloudUpdate { /** - * Resource tags. + * Resource tags */ tags?: { [propertyName: string]: string }; /** @@ -412,7 +567,7 @@ export interface PrivateCloudUpdate { managementCluster?: ManagementCluster; /** * Connectivity to internet is enabled or disabled. Possible values include: 'Enabled', - * 'Disabled' + * 'Disabled'. Default value: 'Disabled'. */ internet?: InternetEnum; /** @@ -433,6 +588,11 @@ export interface Cluster extends Resource { * The cluster size */ clusterSize?: number; + /** + * The state of the cluster provisioning. Possible values include: 'Succeeded', 'Failed', + * 'Cancelled', 'Deleting', 'Updating' + */ + provisioningState?: ClusterProvisioningState; /** * The identity * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -443,12 +603,6 @@ export interface Cluster extends Resource { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly hosts?: string[]; - /** - * The state of the cluster provisioning. Possible values include: 'Succeeded', 'Failed', - * 'Cancelled', 'Deleting', 'Updating' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly provisioningState?: ClusterProvisioningState; } /** @@ -461,6 +615,151 @@ export interface ClusterUpdate { clusterSize?: number; } +/** + * Contains the possible cases for AddonProperties. + */ +export type AddonPropertiesUnion = AddonProperties | AddonSrmProperties | AddonVrProperties | AddonHcxProperties; + +/** + * The properties of an addon + */ +export interface AddonProperties { + /** + * Polymorphic Discriminator + */ + addonType: "AddonProperties"; + /** + * The state of the addon provisioning. Possible values include: 'Succeeded', 'Failed', + * 'Cancelled', 'Building', 'Deleting', 'Updating' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: AddonProvisioningState; +} + +/** + * An addon resource + */ +export interface Addon extends Resource { + /** + * The properties of an addon resource + */ + properties?: AddonPropertiesUnion; +} + +/** + * The properties of a Site Recovery Manager (SRM) addon + */ +export interface AddonSrmProperties { + /** + * Polymorphic Discriminator + */ + addonType: "SRM"; + /** + * The state of the addon provisioning. Possible values include: 'Succeeded', 'Failed', + * 'Cancelled', 'Building', 'Deleting', 'Updating' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: AddonProvisioningState; + /** + * The Site Recovery Manager (SRM) license + */ + licenseKey: string; +} + +/** + * The properties of a vSphere Replication (VR) addon + */ +export interface AddonVrProperties { + /** + * Polymorphic Discriminator + */ + addonType: "VR"; + /** + * The state of the addon provisioning. Possible values include: 'Succeeded', 'Failed', + * 'Cancelled', 'Building', 'Deleting', 'Updating' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: AddonProvisioningState; + /** + * The vSphere Replication Server (VRS) count + */ + vrsCount: number; +} + +/** + * The properties of an HCX addon + */ +export interface AddonHcxProperties { + /** + * Polymorphic Discriminator + */ + addonType: "HCX"; + /** + * The state of the addon provisioning. Possible values include: 'Succeeded', 'Failed', + * 'Cancelled', 'Building', 'Deleting', 'Updating' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: AddonProvisioningState; + /** + * The HCX offer, example VMware MaaS Cloud Provider (Enterprise) + */ + offer: string; +} + +/** + * An Azure NetApp Files volume from Microsoft.NetApp provider + */ +export interface NetAppVolume { + /** + * Azure resource ID of the NetApp volume + */ + id: string; +} + +/** + * An iSCSI volume from Microsoft.StoragePool provider + */ +export interface DiskPoolVolume { + /** + * Azure resource ID of the iSCSI target + */ + targetId: string; + /** + * Name of the LUN to be used for datastore + */ + lunName: string; + /** + * Mode that describes whether the LUN has to be mounted as a datastore or attached as a LUN. + * Possible values include: 'MOUNT', 'ATTACH'. Default value: 'MOUNT'. + */ + mountOption?: MountOptionEnum; + /** + * Device path + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly path?: string; +} + +/** + * A datastore resource + */ +export interface Datastore extends Resource { + /** + * The state of the datastore provisioning. Possible values include: 'Succeeded', 'Failed', + * 'Cancelled', 'Pending', 'Creating', 'Updating', 'Deleting' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: DatastoreProvisioningState; + /** + * An Azure NetApp Files volume + */ + netAppVolume?: NetAppVolume; + /** + * An iSCSI volume + */ + diskPoolVolume?: DiskPoolVolume; +} + /** * Administrative credentials for accessing vCenter and NSX-T */ @@ -505,166 +804,2990 @@ export interface HcxEnterpriseSite extends Resource { } /** - * Optional Parameters. + * A global reach connection resource */ -export interface ClustersUpdateOptionalParams extends msRest.RequestOptionsBase { +export interface GlobalReachConnection extends Resource { /** - * The cluster size + * The state of the ExpressRoute Circuit Authorization provisioning. Possible values include: + * 'Succeeded', 'Failed', 'Updating' + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - clusterSize?: number; + readonly provisioningState?: GlobalReachConnectionProvisioningState; + /** + * The network used for global reach carved out from the original network block provided for the + * private cloud + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly addressPrefix?: string; + /** + * Authorization key from the peer express route used for the global reach connection + */ + authorizationKey?: string; + /** + * The connection status of the global reach connection. Possible values include: 'Connected', + * 'Connecting', 'Disconnected' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly circuitConnectionStatus?: GlobalReachConnectionStatus; + /** + * Identifier of the ExpressRoute Circuit to peer with in the global reach connection + */ + peerExpressRouteCircuit?: string; } /** - * Optional Parameters. + * A cloud link resource */ -export interface ClustersBeginUpdateOptionalParams extends msRest.RequestOptionsBase { +export interface CloudLink extends Resource { /** - * The cluster size + * The state of the cloud link. Possible values include: 'Active', 'Building', 'Deleting', + * 'Failed', 'Disconnected' + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - clusterSize?: number; + readonly status?: CloudLinkStatus; + /** + * Identifier of the other private cloud participating in the link. + */ + linkedCloud?: string; } /** - * An interface representing AvsClientOptions. + * Subnet configuration for segment */ -export interface AvsClientOptions extends AzureServiceClientOptions { - baseUri?: string; +export interface WorkloadNetworkSegmentSubnet { + /** + * DHCP Range assigned for subnet. + */ + dhcpRanges?: string[]; + /** + * Gateway address. + */ + gatewayAddress?: string; } /** - * @interface - * Pageable list of operations - * @extends Array + * Ports and any VIF attached to segment. */ -export interface OperationList extends Array { +export interface WorkloadNetworkSegmentPortVif { /** - * URL to get the next page if any - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Name of port or VIF attached to segment. */ - readonly nextLink?: string; + portName?: string; } /** - * @interface - * A paged list of private clouds - * @extends Array + * NSX Segment */ -export interface PrivateCloudList extends Array { +export interface WorkloadNetworkSegment extends ProxyResource { /** - * URL to get the next page if any + * Display name of the segment. + */ + displayName?: string; + /** + * Gateway which to connect segment to. + */ + connectedGateway?: string; + /** + * Subnet which to connect segment to. + */ + subnet?: WorkloadNetworkSegmentSubnet; + /** + * Port Vif which segment is associated with. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly nextLink?: string; + readonly portVif?: WorkloadNetworkSegmentPortVif[]; + /** + * Segment status. Possible values include: 'SUCCESS, FAILURE' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly status?: SegmentStatusEnum; + /** + * The provisioning state. Possible values include: 'Succeeded', 'Failed', 'Building', + * 'Deleting', 'Updating' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: WorkloadNetworkSegmentProvisioningState; + /** + * NSX revision number. + */ + revision?: number; } /** - * @interface - * A paged list of clusters - * @extends Array + * Contains the possible cases for WorkloadNetworkDhcpEntity. */ -export interface ClusterList extends Array { +export type WorkloadNetworkDhcpEntityUnion = WorkloadNetworkDhcpEntity | WorkloadNetworkDhcpServer | WorkloadNetworkDhcpRelay; + +/** + * Base class for WorkloadNetworkDhcpServer and WorkloadNetworkDhcpRelay to inherit from + */ +export interface WorkloadNetworkDhcpEntity { /** - * URL to get the next page if any - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Polymorphic Discriminator */ - readonly nextLink?: string; -} + dhcpType: "WorkloadNetworkDhcpEntity"; + /** + * Display name of the DHCP entity. + */ + displayName?: string; + /** + * NSX Segments consuming DHCP. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly segments?: string[]; + /** + * The provisioning state. Possible values include: 'Succeeded', 'Failed', 'Building', + * 'Deleting', 'Updating' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: WorkloadNetworkDhcpProvisioningState; + /** + * NSX revision number. + */ + revision?: number; +} + +/** + * NSX DHCP Server + */ +export interface WorkloadNetworkDhcpServer { + /** + * Polymorphic Discriminator + */ + dhcpType: "SERVER"; + /** + * Display name of the DHCP entity. + */ + displayName?: string; + /** + * NSX Segments consuming DHCP. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly segments?: string[]; + /** + * The provisioning state. Possible values include: 'Succeeded', 'Failed', 'Building', + * 'Deleting', 'Updating' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: WorkloadNetworkDhcpProvisioningState; + /** + * NSX revision number. + */ + revision?: number; + /** + * DHCP Server Address. + */ + serverAddress?: string; + /** + * DHCP Server Lease Time. + */ + leaseTime?: number; +} + +/** + * NSX DHCP Relay + */ +export interface WorkloadNetworkDhcpRelay { + /** + * Polymorphic Discriminator + */ + dhcpType: "RELAY"; + /** + * Display name of the DHCP entity. + */ + displayName?: string; + /** + * NSX Segments consuming DHCP. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly segments?: string[]; + /** + * The provisioning state. Possible values include: 'Succeeded', 'Failed', 'Building', + * 'Deleting', 'Updating' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: WorkloadNetworkDhcpProvisioningState; + /** + * NSX revision number. + */ + revision?: number; + /** + * DHCP Relay Addresses. Max 3. + */ + serverAddresses?: string[]; +} + +/** + * NSX DHCP + */ +export interface WorkloadNetworkDhcp extends ProxyResource { + /** + * DHCP properties. + */ + properties?: WorkloadNetworkDhcpEntityUnion; +} + +/** + * NSX Port Mirroring + */ +export interface WorkloadNetworkPortMirroring extends ProxyResource { + /** + * Display name of the port mirroring profile. + */ + displayName?: string; + /** + * Direction of port mirroring profile. Possible values include: 'INGRESS, EGRESS, BIDIRECTIONAL' + */ + direction?: PortMirroringDirectionEnum; + /** + * Source VM Group. + */ + source?: string; + /** + * Destination VM Group. + */ + destination?: string; + /** + * Port Mirroring Status. Possible values include: 'SUCCESS, FAILURE' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly status?: PortMirroringStatusEnum; + /** + * The provisioning state. Possible values include: 'Succeeded', 'Failed', 'Building', + * 'Deleting', 'Updating' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: WorkloadNetworkPortMirroringProvisioningState; + /** + * NSX revision number. + */ + revision?: number; +} + +/** + * NSX VM Group + */ +export interface WorkloadNetworkVMGroup extends ProxyResource { + /** + * Display name of the VM group. + */ + displayName?: string; + /** + * Virtual machine members of this group. + */ + members?: string[]; + /** + * VM Group status. Possible values include: 'SUCCESS, FAILURE' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly status?: VMGroupStatusEnum; + /** + * The provisioning state. Possible values include: 'Succeeded', 'Failed', 'Building', + * 'Deleting', 'Updating' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: WorkloadNetworkVMGroupProvisioningState; + /** + * NSX revision number. + */ + revision?: number; +} + +/** + * NSX Virtual Machine + */ +export interface WorkloadNetworkVirtualMachine extends ProxyResource { + /** + * Display name of the VM. + */ + displayName?: string; + /** + * Virtual machine type. Possible values include: 'REGULAR, EDGE, SERVICE' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly vmType?: VMTypeEnum; +} + +/** + * NSX Gateway. + */ +export interface WorkloadNetworkGateway extends ProxyResource { + /** + * Display name of the DHCP entity. + */ + displayName?: string; + /** + * NSX Gateway Path. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly path?: string; +} + +/** + * NSX DNS Service + */ +export interface WorkloadNetworkDnsService extends ProxyResource { + /** + * Display name of the DNS Service. + */ + displayName?: string; + /** + * DNS service IP of the DNS Service. + */ + dnsServiceIp?: string; + /** + * Default DNS zone of the DNS Service. + */ + defaultDnsZone?: string; + /** + * FQDN zones of the DNS Service. + */ + fqdnZones?: string[]; + /** + * DNS Service log level. Possible values include: 'DEBUG', 'INFO', 'WARNING', 'ERROR', 'FATAL' + */ + logLevel?: DnsServiceLogLevelEnum; + /** + * DNS Service status. Possible values include: 'SUCCESS', 'FAILURE' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly status?: DnsServiceStatusEnum; + /** + * The provisioning state. Possible values include: 'Succeeded', 'Failed', 'Building', + * 'Deleting', 'Updating' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: WorkloadNetworkDnsServiceProvisioningState; + /** + * NSX revision number. + */ + revision?: number; +} + +/** + * NSX DNS Zone + */ +export interface WorkloadNetworkDnsZone extends ProxyResource { + /** + * Display name of the DNS Zone. + */ + displayName?: string; + /** + * Domain names of the DNS Zone. + */ + domain?: string[]; + /** + * DNS Server IP array of the DNS Zone. + */ + dnsServerIps?: string[]; + /** + * Source IP of the DNS Zone. + */ + sourceIp?: string; + /** + * Number of DNS Services using the DNS zone. + */ + dnsServices?: number; + /** + * The provisioning state. Possible values include: 'Succeeded', 'Failed', 'Building', + * 'Deleting', 'Updating' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: WorkloadNetworkDnsZoneProvisioningState; + /** + * NSX revision number. + */ + revision?: number; +} + +/** + * NSX Public IP Block + */ +export interface WorkloadNetworkPublicIP extends ProxyResource { + /** + * Display name of the Public IP Block. + */ + displayName?: string; + /** + * Number of Public IPs requested. + */ + numberOfPublicIPs?: number; + /** + * CIDR Block of the Public IP Block. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly publicIPBlock?: string; + /** + * The provisioning state. Possible values include: 'Succeeded', 'Failed', 'Building', + * 'Deleting', 'Updating' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: WorkloadNetworkPublicIPProvisioningState; +} + +/** + * Script Package resources available for execution + */ +export interface ScriptPackage extends ProxyResource { + /** + * User friendly description of the package + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly description?: string; + /** + * Module version + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly version?: string; +} + +/** + * An parameter that the script will accept + */ +export interface ScriptParameter { + /** + * The type of parameter the script is expecting. psCredential is a PSCredentialObject. Possible + * values include: 'String', 'SecureString', 'Credential', 'Int', 'Bool', 'Float' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: ScriptParameterTypes; + /** + * The parameter name that the script will expect a parameter value for + */ + name?: string; + /** + * User friendly description of the parameter + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly description?: string; + /** + * Should this parameter be visible to arm and passed in the parameters argument when executing. + * Possible values include: 'Visible', 'Hidden' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly visibility?: VisibilityParameterEnum; + /** + * Is this parameter required or optional. Possible values include: 'Optional', 'Required' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly optional?: OptionalParamEnum; +} + +/** + * A cmdlet available for script execution + */ +export interface ScriptCmdlet extends ProxyResource { + /** + * Description of the scripts functionality + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly description?: string; + /** + * Recommended time limit for execution + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly timeout?: string; + /** + * Parameters the script will accept + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly parameters?: ScriptParameter[]; +} + +/** + * Contains the possible cases for ScriptExecutionParameter. + */ +export type ScriptExecutionParameterUnion = ScriptExecutionParameter | ScriptSecureStringExecutionParameter | ScriptStringExecutionParameter | PSCredentialExecutionParameter; + +/** + * The arguments passed in to the execution + */ +export interface ScriptExecutionParameter { + /** + * Polymorphic Discriminator + */ + type: "ScriptExecutionParameter"; + /** + * The parameter name + */ + name: string; +} + +/** + * An instance of a script executed by a user - custom or AVS + */ +export interface ScriptExecution extends ProxyResource { + /** + * A reference to the script cmdlet resource if user is running a AVS script + */ + scriptCmdletId?: string; + /** + * Parameters the script will accept + */ + parameters?: ScriptExecutionParameterUnion[]; + /** + * Parameters that will be hidden/not visible to ARM, such as passwords and credentials + */ + hiddenParameters?: ScriptExecutionParameterUnion[]; + /** + * Error message if the script was able to run, but if the script itself had errors or powershell + * threw an exception + */ + failureReason?: string; + /** + * Time limit for execution + */ + timeout: string; + /** + * Time to live for the resource. If not provided, will be available for 60 days + */ + retention?: string; + /** + * Time the script execution was submitted + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly submittedAt?: Date; + /** + * Time the script execution was started + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly startedAt?: Date; + /** + * Time the script execution was finished + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly finishedAt?: Date; + /** + * The state of the script execution resource. Possible values include: 'Pending', 'Running', + * 'Succeeded', 'Failed', 'Cancelling', 'Cancelled', 'Deleting' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: ScriptExecutionProvisioningState; + /** + * Standard output stream from the powershell execution + */ + output?: string[]; + /** + * User-defined dictionary. + */ + namedOutputs?: { [propertyName: string]: any }; + /** + * Standard information out stream from the powershell execution + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly information?: string[]; + /** + * Standard warning out stream from the powershell execution + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly warnings?: string[]; + /** + * Standard error output stream from the powershell execution + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly errors?: string[]; +} + +/** + * a plain text value execution parameter + */ +export interface ScriptSecureStringExecutionParameter { + /** + * Polymorphic Discriminator + */ + type: "SecureValue"; + /** + * The parameter name + */ + name: string; + /** + * A secure value for the passed parameter, not to be stored in logs + */ + secureValue?: string; +} + +/** + * a plain text value execution parameter + */ +export interface ScriptStringExecutionParameter { + /** + * Polymorphic Discriminator + */ + type: "Value"; + /** + * The parameter name + */ + name: string; + /** + * The value for the passed parameter + */ + value?: string; +} + +/** + * a powershell credential object + */ +export interface PSCredentialExecutionParameter { + /** + * Polymorphic Discriminator + */ + type: "Credential"; + /** + * The parameter name + */ + name: string; + /** + * username for login + */ + username?: string; + /** + * password for login + */ + password?: string; +} + +/** + * Optional Parameters. + */ +export interface ClustersUpdateOptionalParams extends msRest.RequestOptionsBase { + /** + * The cluster size + */ + clusterSize?: number; +} + +/** + * Optional Parameters. + */ +export interface ClustersBeginUpdateOptionalParams extends msRest.RequestOptionsBase { + /** + * The cluster size + */ + clusterSize?: number; +} + +/** + * Optional Parameters. + */ +export interface WorkloadNetworksCreateDhcpOptionalParams extends msRest.RequestOptionsBase { + /** + * DHCP properties. + */ + properties?: WorkloadNetworkDhcpEntityUnion; +} + +/** + * Optional Parameters. + */ +export interface WorkloadNetworksUpdateDhcpOptionalParams extends msRest.RequestOptionsBase { + /** + * DHCP properties. + */ + properties?: WorkloadNetworkDhcpEntityUnion; +} + +/** + * Optional Parameters. + */ +export interface WorkloadNetworksBeginCreateDhcpOptionalParams extends msRest.RequestOptionsBase { + /** + * DHCP properties. + */ + properties?: WorkloadNetworkDhcpEntityUnion; +} + +/** + * Optional Parameters. + */ +export interface WorkloadNetworksBeginUpdateDhcpOptionalParams extends msRest.RequestOptionsBase { + /** + * DHCP properties. + */ + properties?: WorkloadNetworkDhcpEntityUnion; +} + +/** + * Optional Parameters. + */ +export interface CloudLinksCreateOrUpdateOptionalParams extends msRest.RequestOptionsBase { + /** + * Identifier of the other private cloud participating in the link. + */ + linkedCloud?: string; +} + +/** + * Optional Parameters. + */ +export interface CloudLinksBeginCreateOrUpdateOptionalParams extends msRest.RequestOptionsBase { + /** + * Identifier of the other private cloud participating in the link. + */ + linkedCloud?: string; +} + +/** + * Optional Parameters. + */ +export interface AddonsCreateOrUpdateOptionalParams extends msRest.RequestOptionsBase { + /** + * The properties of an addon resource + */ + properties?: AddonPropertiesUnion; +} + +/** + * Optional Parameters. + */ +export interface AddonsBeginCreateOrUpdateOptionalParams extends msRest.RequestOptionsBase { + /** + * The properties of an addon resource + */ + properties?: AddonPropertiesUnion; +} + +/** + * Optional Parameters. + */ +export interface ScriptExecutionsGetExecutionLogsOptionalParams extends msRest.RequestOptionsBase { + /** + * Name of the desired output stream to return. If not provided, will return all. An empty array + * will return nothing + */ + scriptOutputStreamType?: ScriptOutputStreamType[]; +} + +/** + * An interface representing AvsClientOptions. + */ +export interface AvsClientOptions extends AzureServiceClientOptions { + baseUri?: string; +} + +/** + * @interface + * Pageable list of operations + * @extends Array + */ +export interface OperationList extends Array { + /** + * URL to get the next page if any + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * A paged list of private clouds + * @extends Array + */ +export interface PrivateCloudList extends Array { + /** + * URL to get the next page if any + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * A paged list of clusters + * @extends Array + */ +export interface ClusterList extends Array { + /** + * URL to get the next page if any + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * A paged list of datastores + * @extends Array + */ +export interface DatastoreList extends Array { + /** + * URL to get the next page if any + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * A paged list of HCX Enterprise Sites + * @extends Array + */ +export interface HcxEnterpriseSiteList extends Array { + /** + * URL to get the next page if any + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * A paged list of ExpressRoute Circuit Authorizations + * @extends Array + */ +export interface ExpressRouteAuthorizationList extends Array { + /** + * URL to get the next page if any + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * A paged list of global reach connections + * @extends Array + */ +export interface GlobalReachConnectionList extends Array { + /** + * URL to get the next page if any + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * A list of NSX Segments + * @extends Array + */ +export interface WorkloadNetworkSegmentsList extends Array { + /** + * URL to get the next page if any + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * A list of NSX dhcp entities + * @extends Array + */ +export interface WorkloadNetworkDhcpList extends Array { + /** + * URL to get the next page if any + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * A list of NSX Gateways + * @extends Array + */ +export interface WorkloadNetworkGatewayList extends Array { + /** + * URL to get the next page if any + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * A list of NSX Port Mirroring + * @extends Array + */ +export interface WorkloadNetworkPortMirroringList extends Array { + /** + * URL to get the next page if any + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * A list of NSX VM Groups + * @extends Array + */ +export interface WorkloadNetworkVMGroupsList extends Array { + /** + * URL to get the next page if any + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * A list of NSX Virtual Machines + * @extends Array + */ +export interface WorkloadNetworkVirtualMachinesList extends Array { + /** + * URL to get the next page if any + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * A list of NSX DNS Services + * @extends Array + */ +export interface WorkloadNetworkDnsServicesList extends Array { + /** + * URL to get the next page if any + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * A list of NSX DNS Zones + * @extends Array + */ +export interface WorkloadNetworkDnsZonesList extends Array { + /** + * URL to get the next page if any + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * A list of NSX Public IP Blocks + * @extends Array + */ +export interface WorkloadNetworkPublicIPsList extends Array { + /** + * URL to get the next page if any + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * A paged list of cloud links + * @extends Array + */ +export interface CloudLinkList extends Array { + /** + * URL to get the next page if any + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * A paged list of addons + * @extends Array + */ +export interface AddonList extends Array { + /** + * URL to get the next page if any + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * A list of the available script packages + * @extends Array + */ +export interface ScriptPackagesList extends Array { + /** + * URL to get the next page if any + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * Pageable list of scripts/cmdlets + * @extends Array + */ +export interface ScriptCmdletsList extends Array { + /** + * URL to get the next page if any + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * Pageable list of script executions + * @extends Array + */ +export interface ScriptExecutionsList extends Array { + /** + * URL to get the next page if any + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * Defines values for TrialStatus. + * Possible values include: 'TrialAvailable', 'TrialUsed', 'TrialDisabled' + * @readonly + * @enum {string} + */ +export type TrialStatus = 'TrialAvailable' | 'TrialUsed' | 'TrialDisabled'; + +/** + * Defines values for QuotaEnabled. + * Possible values include: 'Enabled', 'Disabled' + * @readonly + * @enum {string} + */ +export type QuotaEnabled = 'Enabled' | 'Disabled'; + +/** + * Defines values for ExpressRouteAuthorizationProvisioningState. + * Possible values include: 'Succeeded', 'Failed', 'Updating' + * @readonly + * @enum {string} + */ +export type ExpressRouteAuthorizationProvisioningState = 'Succeeded' | 'Failed' | 'Updating'; + +/** + * Defines values for SslEnum. + * Possible values include: 'Enabled', 'Disabled' + * @readonly + * @enum {string} + */ +export type SslEnum = 'Enabled' | 'Disabled'; + +/** + * Defines values for PrivateCloudProvisioningState. + * Possible values include: 'Succeeded', 'Failed', 'Cancelled', 'Pending', 'Building', 'Deleting', + * 'Updating' + * @readonly + * @enum {string} + */ +export type PrivateCloudProvisioningState = 'Succeeded' | 'Failed' | 'Cancelled' | 'Pending' | 'Building' | 'Deleting' | 'Updating'; + +/** + * Defines values for InternetEnum. + * Possible values include: 'Enabled', 'Disabled' + * @readonly + * @enum {string} + */ +export type InternetEnum = 'Enabled' | 'Disabled'; + +/** + * Defines values for ClusterProvisioningState. + * Possible values include: 'Succeeded', 'Failed', 'Cancelled', 'Deleting', 'Updating' + * @readonly + * @enum {string} + */ +export type ClusterProvisioningState = 'Succeeded' | 'Failed' | 'Cancelled' | 'Deleting' | 'Updating'; + +/** + * Defines values for AddonProvisioningState. + * Possible values include: 'Succeeded', 'Failed', 'Cancelled', 'Building', 'Deleting', 'Updating' + * @readonly + * @enum {string} + */ +export type AddonProvisioningState = 'Succeeded' | 'Failed' | 'Cancelled' | 'Building' | 'Deleting' | 'Updating'; + +/** + * Defines values for DatastoreProvisioningState. + * Possible values include: 'Succeeded', 'Failed', 'Cancelled', 'Pending', 'Creating', 'Updating', + * 'Deleting' + * @readonly + * @enum {string} + */ +export type DatastoreProvisioningState = 'Succeeded' | 'Failed' | 'Cancelled' | 'Pending' | 'Creating' | 'Updating' | 'Deleting'; + +/** + * Defines values for MountOptionEnum. + * Possible values include: 'MOUNT', 'ATTACH' + * @readonly + * @enum {string} + */ +export type MountOptionEnum = 'MOUNT' | 'ATTACH'; + +/** + * Defines values for HcxEnterpriseSiteStatus. + * Possible values include: 'Available', 'Consumed', 'Deactivated', 'Deleted' + * @readonly + * @enum {string} + */ +export type HcxEnterpriseSiteStatus = 'Available' | 'Consumed' | 'Deactivated' | 'Deleted'; + +/** + * Defines values for GlobalReachConnectionProvisioningState. + * Possible values include: 'Succeeded', 'Failed', 'Updating' + * @readonly + * @enum {string} + */ +export type GlobalReachConnectionProvisioningState = 'Succeeded' | 'Failed' | 'Updating'; + +/** + * Defines values for GlobalReachConnectionStatus. + * Possible values include: 'Connected', 'Connecting', 'Disconnected' + * @readonly + * @enum {string} + */ +export type GlobalReachConnectionStatus = 'Connected' | 'Connecting' | 'Disconnected'; + +/** + * Defines values for CloudLinkStatus. + * Possible values include: 'Active', 'Building', 'Deleting', 'Failed', 'Disconnected' + * @readonly + * @enum {string} + */ +export type CloudLinkStatus = 'Active' | 'Building' | 'Deleting' | 'Failed' | 'Disconnected'; + +/** + * Defines values for SegmentStatusEnum. + * Possible values include: 'SUCCESS, FAILURE' + * @readonly + * @enum {string} + */ +export type SegmentStatusEnum = 'SUCCESS, FAILURE'; + +/** + * Defines values for WorkloadNetworkSegmentProvisioningState. + * Possible values include: 'Succeeded', 'Failed', 'Building', 'Deleting', 'Updating' + * @readonly + * @enum {string} + */ +export type WorkloadNetworkSegmentProvisioningState = 'Succeeded' | 'Failed' | 'Building' | 'Deleting' | 'Updating'; + +/** + * Defines values for WorkloadNetworkDhcpProvisioningState. + * Possible values include: 'Succeeded', 'Failed', 'Building', 'Deleting', 'Updating' + * @readonly + * @enum {string} + */ +export type WorkloadNetworkDhcpProvisioningState = 'Succeeded' | 'Failed' | 'Building' | 'Deleting' | 'Updating'; + +/** + * Defines values for PortMirroringDirectionEnum. + * Possible values include: 'INGRESS, EGRESS, BIDIRECTIONAL' + * @readonly + * @enum {string} + */ +export type PortMirroringDirectionEnum = 'INGRESS, EGRESS, BIDIRECTIONAL'; + +/** + * Defines values for PortMirroringStatusEnum. + * Possible values include: 'SUCCESS, FAILURE' + * @readonly + * @enum {string} + */ +export type PortMirroringStatusEnum = 'SUCCESS, FAILURE'; + +/** + * Defines values for WorkloadNetworkPortMirroringProvisioningState. + * Possible values include: 'Succeeded', 'Failed', 'Building', 'Deleting', 'Updating' + * @readonly + * @enum {string} + */ +export type WorkloadNetworkPortMirroringProvisioningState = 'Succeeded' | 'Failed' | 'Building' | 'Deleting' | 'Updating'; + +/** + * Defines values for VMGroupStatusEnum. + * Possible values include: 'SUCCESS, FAILURE' + * @readonly + * @enum {string} + */ +export type VMGroupStatusEnum = 'SUCCESS, FAILURE'; + +/** + * Defines values for WorkloadNetworkVMGroupProvisioningState. + * Possible values include: 'Succeeded', 'Failed', 'Building', 'Deleting', 'Updating' + * @readonly + * @enum {string} + */ +export type WorkloadNetworkVMGroupProvisioningState = 'Succeeded' | 'Failed' | 'Building' | 'Deleting' | 'Updating'; + +/** + * Defines values for VMTypeEnum. + * Possible values include: 'REGULAR, EDGE, SERVICE' + * @readonly + * @enum {string} + */ +export type VMTypeEnum = 'REGULAR, EDGE, SERVICE'; + +/** + * Defines values for DnsServiceLogLevelEnum. + * Possible values include: 'DEBUG', 'INFO', 'WARNING', 'ERROR', 'FATAL' + * @readonly + * @enum {string} + */ +export type DnsServiceLogLevelEnum = 'DEBUG' | 'INFO' | 'WARNING' | 'ERROR' | 'FATAL'; + +/** + * Defines values for DnsServiceStatusEnum. + * Possible values include: 'SUCCESS', 'FAILURE' + * @readonly + * @enum {string} + */ +export type DnsServiceStatusEnum = 'SUCCESS' | 'FAILURE'; + +/** + * Defines values for WorkloadNetworkDnsServiceProvisioningState. + * Possible values include: 'Succeeded', 'Failed', 'Building', 'Deleting', 'Updating' + * @readonly + * @enum {string} + */ +export type WorkloadNetworkDnsServiceProvisioningState = 'Succeeded' | 'Failed' | 'Building' | 'Deleting' | 'Updating'; + +/** + * Defines values for WorkloadNetworkDnsZoneProvisioningState. + * Possible values include: 'Succeeded', 'Failed', 'Building', 'Deleting', 'Updating' + * @readonly + * @enum {string} + */ +export type WorkloadNetworkDnsZoneProvisioningState = 'Succeeded' | 'Failed' | 'Building' | 'Deleting' | 'Updating'; + +/** + * Defines values for WorkloadNetworkPublicIPProvisioningState. + * Possible values include: 'Succeeded', 'Failed', 'Building', 'Deleting', 'Updating' + * @readonly + * @enum {string} + */ +export type WorkloadNetworkPublicIPProvisioningState = 'Succeeded' | 'Failed' | 'Building' | 'Deleting' | 'Updating'; + +/** + * Defines values for ScriptParameterTypes. + * Possible values include: 'String', 'SecureString', 'Credential', 'Int', 'Bool', 'Float' + * @readonly + * @enum {string} + */ +export type ScriptParameterTypes = 'String' | 'SecureString' | 'Credential' | 'Int' | 'Bool' | 'Float'; + +/** + * Defines values for VisibilityParameterEnum. + * Possible values include: 'Visible', 'Hidden' + * @readonly + * @enum {string} + */ +export type VisibilityParameterEnum = 'Visible' | 'Hidden'; + +/** + * Defines values for OptionalParamEnum. + * Possible values include: 'Optional', 'Required' + * @readonly + * @enum {string} + */ +export type OptionalParamEnum = 'Optional' | 'Required'; + +/** + * Defines values for ScriptExecutionProvisioningState. + * Possible values include: 'Pending', 'Running', 'Succeeded', 'Failed', 'Cancelling', 'Cancelled', + * 'Deleting' + * @readonly + * @enum {string} + */ +export type ScriptExecutionProvisioningState = 'Pending' | 'Running' | 'Succeeded' | 'Failed' | 'Cancelling' | 'Cancelled' | 'Deleting'; + +/** + * Defines values for ScriptOutputStreamType. + * Possible values include: 'Information', 'Warning', 'Output', 'Error' + * @readonly + * @enum {string} + */ +export type ScriptOutputStreamType = 'Information' | 'Warning' | 'Output' | 'Error'; + +/** + * Contains response data for the list operation. + */ +export type OperationsListResponse = OperationList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationList; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type OperationsListNextResponse = OperationList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationList; + }; +}; + +/** + * Contains response data for the checkTrialAvailability operation. + */ +export type LocationsCheckTrialAvailabilityResponse = Trial & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Trial; + }; +}; + +/** + * Contains response data for the checkQuotaAvailability operation. + */ +export type LocationsCheckQuotaAvailabilityResponse = Quota & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Quota; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type PrivateCloudsListResponse = PrivateCloudList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PrivateCloudList; + }; +}; + +/** + * Contains response data for the listInSubscription operation. + */ +export type PrivateCloudsListInSubscriptionResponse = PrivateCloudList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PrivateCloudList; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type PrivateCloudsGetResponse = PrivateCloud & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PrivateCloud; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type PrivateCloudsCreateOrUpdateResponse = PrivateCloud & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PrivateCloud; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type PrivateCloudsUpdateResponse = PrivateCloud & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PrivateCloud; + }; +}; + +/** + * Contains response data for the listAdminCredentials operation. + */ +export type PrivateCloudsListAdminCredentialsResponse = AdminCredentials & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: AdminCredentials; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type PrivateCloudsBeginCreateOrUpdateResponse = PrivateCloud & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PrivateCloud; + }; +}; + +/** + * Contains response data for the beginUpdate operation. + */ +export type PrivateCloudsBeginUpdateResponse = PrivateCloud & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PrivateCloud; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type PrivateCloudsListNextResponse = PrivateCloudList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PrivateCloudList; + }; +}; + +/** + * Contains response data for the listInSubscriptionNext operation. + */ +export type PrivateCloudsListInSubscriptionNextResponse = PrivateCloudList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PrivateCloudList; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type ClustersListResponse = ClusterList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ClusterList; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type ClustersGetResponse = Cluster & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Cluster; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type ClustersCreateOrUpdateResponse = Cluster & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Cluster; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type ClustersUpdateResponse = Cluster & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Cluster; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type ClustersBeginCreateOrUpdateResponse = Cluster & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Cluster; + }; +}; + +/** + * Contains response data for the beginUpdate operation. + */ +export type ClustersBeginUpdateResponse = Cluster & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Cluster; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type ClustersListNextResponse = ClusterList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ClusterList; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type DatastoresListResponse = DatastoreList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: DatastoreList; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type DatastoresGetResponse = Datastore & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Datastore; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type DatastoresCreateOrUpdateResponse = Datastore & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Datastore; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type DatastoresBeginCreateOrUpdateResponse = Datastore & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Datastore; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type DatastoresListNextResponse = DatastoreList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: DatastoreList; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type HcxEnterpriseSitesListResponse = HcxEnterpriseSiteList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: HcxEnterpriseSiteList; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type HcxEnterpriseSitesGetResponse = HcxEnterpriseSite & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: HcxEnterpriseSite; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type HcxEnterpriseSitesCreateOrUpdateResponse = HcxEnterpriseSite & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: HcxEnterpriseSite; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type HcxEnterpriseSitesListNextResponse = HcxEnterpriseSiteList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: HcxEnterpriseSiteList; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type AuthorizationsListResponse = ExpressRouteAuthorizationList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ExpressRouteAuthorizationList; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type AuthorizationsGetResponse = ExpressRouteAuthorization & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ExpressRouteAuthorization; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type AuthorizationsCreateOrUpdateResponse = ExpressRouteAuthorization & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ExpressRouteAuthorization; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type AuthorizationsBeginCreateOrUpdateResponse = ExpressRouteAuthorization & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ExpressRouteAuthorization; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type AuthorizationsListNextResponse = ExpressRouteAuthorizationList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ExpressRouteAuthorizationList; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type GlobalReachConnectionsListResponse = GlobalReachConnectionList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: GlobalReachConnectionList; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type GlobalReachConnectionsGetResponse = GlobalReachConnection & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: GlobalReachConnection; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type GlobalReachConnectionsCreateOrUpdateResponse = GlobalReachConnection & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: GlobalReachConnection; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type GlobalReachConnectionsBeginCreateOrUpdateResponse = GlobalReachConnection & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: GlobalReachConnection; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type GlobalReachConnectionsListNextResponse = GlobalReachConnectionList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: GlobalReachConnectionList; + }; +}; + +/** + * Contains response data for the listSegments operation. + */ +export type WorkloadNetworksListSegmentsResponse = WorkloadNetworkSegmentsList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WorkloadNetworkSegmentsList; + }; +}; + +/** + * Contains response data for the getSegment operation. + */ +export type WorkloadNetworksGetSegmentResponse = WorkloadNetworkSegment & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WorkloadNetworkSegment; + }; +}; + +/** + * Contains response data for the createSegments operation. + */ +export type WorkloadNetworksCreateSegmentsResponse = WorkloadNetworkSegment & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WorkloadNetworkSegment; + }; +}; + +/** + * Contains response data for the updateSegments operation. + */ +export type WorkloadNetworksUpdateSegmentsResponse = WorkloadNetworkSegment & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WorkloadNetworkSegment; + }; +}; + +/** + * Contains response data for the listDhcp operation. + */ +export type WorkloadNetworksListDhcpResponse = WorkloadNetworkDhcpList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WorkloadNetworkDhcpList; + }; +}; + +/** + * Contains response data for the getDhcp operation. + */ +export type WorkloadNetworksGetDhcpResponse = WorkloadNetworkDhcp & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WorkloadNetworkDhcp; + }; +}; + +/** + * Contains response data for the createDhcp operation. + */ +export type WorkloadNetworksCreateDhcpResponse = WorkloadNetworkDhcp & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WorkloadNetworkDhcp; + }; +}; + +/** + * Contains response data for the updateDhcp operation. + */ +export type WorkloadNetworksUpdateDhcpResponse = WorkloadNetworkDhcp & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WorkloadNetworkDhcp; + }; +}; + +/** + * Contains response data for the listGateways operation. + */ +export type WorkloadNetworksListGatewaysResponse = WorkloadNetworkGatewayList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WorkloadNetworkGatewayList; + }; +}; + +/** + * Contains response data for the getGateway operation. + */ +export type WorkloadNetworksGetGatewayResponse = WorkloadNetworkGateway & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WorkloadNetworkGateway; + }; +}; + +/** + * Contains response data for the listPortMirroring operation. + */ +export type WorkloadNetworksListPortMirroringResponse = WorkloadNetworkPortMirroringList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WorkloadNetworkPortMirroringList; + }; +}; + +/** + * Contains response data for the getPortMirroring operation. + */ +export type WorkloadNetworksGetPortMirroringResponse = WorkloadNetworkPortMirroring & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WorkloadNetworkPortMirroring; + }; +}; + +/** + * Contains response data for the createPortMirroring operation. + */ +export type WorkloadNetworksCreatePortMirroringResponse = WorkloadNetworkPortMirroring & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WorkloadNetworkPortMirroring; + }; +}; + +/** + * Contains response data for the updatePortMirroring operation. + */ +export type WorkloadNetworksUpdatePortMirroringResponse = WorkloadNetworkPortMirroring & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WorkloadNetworkPortMirroring; + }; +}; + +/** + * Contains response data for the listVMGroups operation. + */ +export type WorkloadNetworksListVMGroupsResponse = WorkloadNetworkVMGroupsList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WorkloadNetworkVMGroupsList; + }; +}; + +/** + * Contains response data for the getVMGroup operation. + */ +export type WorkloadNetworksGetVMGroupResponse = WorkloadNetworkVMGroup & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WorkloadNetworkVMGroup; + }; +}; + +/** + * Contains response data for the createVMGroup operation. + */ +export type WorkloadNetworksCreateVMGroupResponse = WorkloadNetworkVMGroup & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WorkloadNetworkVMGroup; + }; +}; + +/** + * Contains response data for the updateVMGroup operation. + */ +export type WorkloadNetworksUpdateVMGroupResponse = WorkloadNetworkVMGroup & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WorkloadNetworkVMGroup; + }; +}; + +/** + * Contains response data for the listVirtualMachines operation. + */ +export type WorkloadNetworksListVirtualMachinesResponse = WorkloadNetworkVirtualMachinesList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WorkloadNetworkVirtualMachinesList; + }; +}; + +/** + * Contains response data for the getVirtualMachine operation. + */ +export type WorkloadNetworksGetVirtualMachineResponse = WorkloadNetworkVirtualMachine & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WorkloadNetworkVirtualMachine; + }; +}; + +/** + * Contains response data for the listDnsServices operation. + */ +export type WorkloadNetworksListDnsServicesResponse = WorkloadNetworkDnsServicesList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WorkloadNetworkDnsServicesList; + }; +}; + +/** + * Contains response data for the getDnsService operation. + */ +export type WorkloadNetworksGetDnsServiceResponse = WorkloadNetworkDnsService & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WorkloadNetworkDnsService; + }; +}; + +/** + * Contains response data for the createDnsService operation. + */ +export type WorkloadNetworksCreateDnsServiceResponse = WorkloadNetworkDnsService & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WorkloadNetworkDnsService; + }; +}; + +/** + * Contains response data for the updateDnsService operation. + */ +export type WorkloadNetworksUpdateDnsServiceResponse = WorkloadNetworkDnsService & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WorkloadNetworkDnsService; + }; +}; + +/** + * Contains response data for the listDnsZones operation. + */ +export type WorkloadNetworksListDnsZonesResponse = WorkloadNetworkDnsZonesList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WorkloadNetworkDnsZonesList; + }; +}; + +/** + * Contains response data for the getDnsZone operation. + */ +export type WorkloadNetworksGetDnsZoneResponse = WorkloadNetworkDnsZone & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WorkloadNetworkDnsZone; + }; +}; + +/** + * Contains response data for the createDnsZone operation. + */ +export type WorkloadNetworksCreateDnsZoneResponse = WorkloadNetworkDnsZone & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WorkloadNetworkDnsZone; + }; +}; + +/** + * Contains response data for the updateDnsZone operation. + */ +export type WorkloadNetworksUpdateDnsZoneResponse = WorkloadNetworkDnsZone & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WorkloadNetworkDnsZone; + }; +}; + +/** + * Contains response data for the listPublicIPs operation. + */ +export type WorkloadNetworksListPublicIPsResponse = WorkloadNetworkPublicIPsList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WorkloadNetworkPublicIPsList; + }; +}; + +/** + * Contains response data for the getPublicIP operation. + */ +export type WorkloadNetworksGetPublicIPResponse = WorkloadNetworkPublicIP & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WorkloadNetworkPublicIP; + }; +}; + +/** + * Contains response data for the createPublicIP operation. + */ +export type WorkloadNetworksCreatePublicIPResponse = WorkloadNetworkPublicIP & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WorkloadNetworkPublicIP; + }; +}; + +/** + * Contains response data for the beginCreateSegments operation. + */ +export type WorkloadNetworksBeginCreateSegmentsResponse = WorkloadNetworkSegment & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WorkloadNetworkSegment; + }; +}; + +/** + * Contains response data for the beginUpdateSegments operation. + */ +export type WorkloadNetworksBeginUpdateSegmentsResponse = WorkloadNetworkSegment & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WorkloadNetworkSegment; + }; +}; + +/** + * Contains response data for the beginCreateDhcp operation. + */ +export type WorkloadNetworksBeginCreateDhcpResponse = WorkloadNetworkDhcp & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WorkloadNetworkDhcp; + }; +}; + +/** + * Contains response data for the beginUpdateDhcp operation. + */ +export type WorkloadNetworksBeginUpdateDhcpResponse = WorkloadNetworkDhcp & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WorkloadNetworkDhcp; + }; +}; + +/** + * Contains response data for the beginCreatePortMirroring operation. + */ +export type WorkloadNetworksBeginCreatePortMirroringResponse = WorkloadNetworkPortMirroring & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WorkloadNetworkPortMirroring; + }; +}; + +/** + * Contains response data for the beginUpdatePortMirroring operation. + */ +export type WorkloadNetworksBeginUpdatePortMirroringResponse = WorkloadNetworkPortMirroring & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WorkloadNetworkPortMirroring; + }; +}; + +/** + * Contains response data for the beginCreateVMGroup operation. + */ +export type WorkloadNetworksBeginCreateVMGroupResponse = WorkloadNetworkVMGroup & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WorkloadNetworkVMGroup; + }; +}; /** - * @interface - * A paged list of HCX Enterprise Sites - * @extends Array + * Contains response data for the beginUpdateVMGroup operation. */ -export interface HcxEnterpriseSiteList extends Array { +export type WorkloadNetworksBeginUpdateVMGroupResponse = WorkloadNetworkVMGroup & { /** - * URL to get the next page if any - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The underlying HTTP response. */ - readonly nextLink?: string; -} + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WorkloadNetworkVMGroup; + }; +}; /** - * @interface - * A paged list of ExpressRoute Circuit Authorizations - * @extends Array + * Contains response data for the beginCreateDnsService operation. */ -export interface ExpressRouteAuthorizationList extends Array { +export type WorkloadNetworksBeginCreateDnsServiceResponse = WorkloadNetworkDnsService & { /** - * URL to get the next page if any - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The underlying HTTP response. */ - readonly nextLink?: string; -} + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; -/** - * Defines values for TrialStatus. - * Possible values include: 'TrialAvailable', 'TrialUsed', 'TrialDisabled' - * @readonly - * @enum {string} - */ -export type TrialStatus = 'TrialAvailable' | 'TrialUsed' | 'TrialDisabled'; + /** + * The response body as parsed JSON or XML + */ + parsedBody: WorkloadNetworkDnsService; + }; +}; /** - * Defines values for QuotaEnabled. - * Possible values include: 'Enabled', 'Disabled' - * @readonly - * @enum {string} + * Contains response data for the beginUpdateDnsService operation. */ -export type QuotaEnabled = 'Enabled' | 'Disabled'; +export type WorkloadNetworksBeginUpdateDnsServiceResponse = WorkloadNetworkDnsService & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; -/** - * Defines values for ExpressRouteAuthorizationProvisioningState. - * Possible values include: 'Succeeded', 'Failed', 'Updating' - * @readonly - * @enum {string} - */ -export type ExpressRouteAuthorizationProvisioningState = 'Succeeded' | 'Failed' | 'Updating'; + /** + * The response body as parsed JSON or XML + */ + parsedBody: WorkloadNetworkDnsService; + }; +}; /** - * Defines values for SslEnum. - * Possible values include: 'Enabled', 'Disabled' - * @readonly - * @enum {string} + * Contains response data for the beginCreateDnsZone operation. */ -export type SslEnum = 'Enabled' | 'Disabled'; +export type WorkloadNetworksBeginCreateDnsZoneResponse = WorkloadNetworkDnsZone & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; -/** - * Defines values for PrivateCloudProvisioningState. - * Possible values include: 'Succeeded', 'Failed', 'Cancelled', 'Pending', 'Building', 'Deleting', - * 'Updating' - * @readonly - * @enum {string} - */ -export type PrivateCloudProvisioningState = 'Succeeded' | 'Failed' | 'Cancelled' | 'Pending' | 'Building' | 'Deleting' | 'Updating'; + /** + * The response body as parsed JSON or XML + */ + parsedBody: WorkloadNetworkDnsZone; + }; +}; /** - * Defines values for InternetEnum. - * Possible values include: 'Enabled', 'Disabled' - * @readonly - * @enum {string} + * Contains response data for the beginUpdateDnsZone operation. */ -export type InternetEnum = 'Enabled' | 'Disabled'; +export type WorkloadNetworksBeginUpdateDnsZoneResponse = WorkloadNetworkDnsZone & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; -/** - * Defines values for ClusterProvisioningState. - * Possible values include: 'Succeeded', 'Failed', 'Cancelled', 'Deleting', 'Updating' - * @readonly - * @enum {string} - */ -export type ClusterProvisioningState = 'Succeeded' | 'Failed' | 'Cancelled' | 'Deleting' | 'Updating'; + /** + * The response body as parsed JSON or XML + */ + parsedBody: WorkloadNetworkDnsZone; + }; +}; /** - * Defines values for HcxEnterpriseSiteStatus. - * Possible values include: 'Available', 'Consumed', 'Deactivated', 'Deleted' - * @readonly - * @enum {string} + * Contains response data for the beginCreatePublicIP operation. */ -export type HcxEnterpriseSiteStatus = 'Available' | 'Consumed' | 'Deactivated' | 'Deleted'; +export type WorkloadNetworksBeginCreatePublicIPResponse = WorkloadNetworkPublicIP & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WorkloadNetworkPublicIP; + }; +}; /** - * Contains response data for the list operation. + * Contains response data for the listSegmentsNext operation. */ -export type OperationsListResponse = OperationList & { +export type WorkloadNetworksListSegmentsNextResponse = WorkloadNetworkSegmentsList & { /** * The underlying HTTP response. */ @@ -677,14 +3800,14 @@ export type OperationsListResponse = OperationList & { /** * The response body as parsed JSON or XML */ - parsedBody: OperationList; + parsedBody: WorkloadNetworkSegmentsList; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the listDhcpNext operation. */ -export type OperationsListNextResponse = OperationList & { +export type WorkloadNetworksListDhcpNextResponse = WorkloadNetworkDhcpList & { /** * The underlying HTTP response. */ @@ -697,14 +3820,14 @@ export type OperationsListNextResponse = OperationList & { /** * The response body as parsed JSON or XML */ - parsedBody: OperationList; + parsedBody: WorkloadNetworkDhcpList; }; }; /** - * Contains response data for the checkTrialAvailability operation. + * Contains response data for the listGatewaysNext operation. */ -export type LocationsCheckTrialAvailabilityResponse = Trial & { +export type WorkloadNetworksListGatewaysNextResponse = WorkloadNetworkGatewayList & { /** * The underlying HTTP response. */ @@ -717,14 +3840,14 @@ export type LocationsCheckTrialAvailabilityResponse = Trial & { /** * The response body as parsed JSON or XML */ - parsedBody: Trial; + parsedBody: WorkloadNetworkGatewayList; }; }; /** - * Contains response data for the checkQuotaAvailability operation. + * Contains response data for the listPortMirroringNext operation. */ -export type LocationsCheckQuotaAvailabilityResponse = Quota & { +export type WorkloadNetworksListPortMirroringNextResponse = WorkloadNetworkPortMirroringList & { /** * The underlying HTTP response. */ @@ -737,14 +3860,14 @@ export type LocationsCheckQuotaAvailabilityResponse = Quota & { /** * The response body as parsed JSON or XML */ - parsedBody: Quota; + parsedBody: WorkloadNetworkPortMirroringList; }; }; /** - * Contains response data for the list operation. + * Contains response data for the listVMGroupsNext operation. */ -export type PrivateCloudsListResponse = PrivateCloudList & { +export type WorkloadNetworksListVMGroupsNextResponse = WorkloadNetworkVMGroupsList & { /** * The underlying HTTP response. */ @@ -757,14 +3880,14 @@ export type PrivateCloudsListResponse = PrivateCloudList & { /** * The response body as parsed JSON or XML */ - parsedBody: PrivateCloudList; + parsedBody: WorkloadNetworkVMGroupsList; }; }; /** - * Contains response data for the listInSubscription operation. + * Contains response data for the listVirtualMachinesNext operation. */ -export type PrivateCloudsListInSubscriptionResponse = PrivateCloudList & { +export type WorkloadNetworksListVirtualMachinesNextResponse = WorkloadNetworkVirtualMachinesList & { /** * The underlying HTTP response. */ @@ -777,14 +3900,14 @@ export type PrivateCloudsListInSubscriptionResponse = PrivateCloudList & { /** * The response body as parsed JSON or XML */ - parsedBody: PrivateCloudList; + parsedBody: WorkloadNetworkVirtualMachinesList; }; }; /** - * Contains response data for the get operation. + * Contains response data for the listDnsServicesNext operation. */ -export type PrivateCloudsGetResponse = PrivateCloud & { +export type WorkloadNetworksListDnsServicesNextResponse = WorkloadNetworkDnsServicesList & { /** * The underlying HTTP response. */ @@ -797,14 +3920,14 @@ export type PrivateCloudsGetResponse = PrivateCloud & { /** * The response body as parsed JSON or XML */ - parsedBody: PrivateCloud; + parsedBody: WorkloadNetworkDnsServicesList; }; }; /** - * Contains response data for the createOrUpdate operation. + * Contains response data for the listDnsZonesNext operation. */ -export type PrivateCloudsCreateOrUpdateResponse = PrivateCloud & { +export type WorkloadNetworksListDnsZonesNextResponse = WorkloadNetworkDnsZonesList & { /** * The underlying HTTP response. */ @@ -817,14 +3940,14 @@ export type PrivateCloudsCreateOrUpdateResponse = PrivateCloud & { /** * The response body as parsed JSON or XML */ - parsedBody: PrivateCloud; + parsedBody: WorkloadNetworkDnsZonesList; }; }; /** - * Contains response data for the update operation. + * Contains response data for the listPublicIPsNext operation. */ -export type PrivateCloudsUpdateResponse = PrivateCloud & { +export type WorkloadNetworksListPublicIPsNextResponse = WorkloadNetworkPublicIPsList & { /** * The underlying HTTP response. */ @@ -837,14 +3960,14 @@ export type PrivateCloudsUpdateResponse = PrivateCloud & { /** * The response body as parsed JSON or XML */ - parsedBody: PrivateCloud; + parsedBody: WorkloadNetworkPublicIPsList; }; }; /** - * Contains response data for the listAdminCredentials operation. + * Contains response data for the list operation. */ -export type PrivateCloudsListAdminCredentialsResponse = AdminCredentials & { +export type CloudLinksListResponse = CloudLinkList & { /** * The underlying HTTP response. */ @@ -857,14 +3980,14 @@ export type PrivateCloudsListAdminCredentialsResponse = AdminCredentials & { /** * The response body as parsed JSON or XML */ - parsedBody: AdminCredentials; + parsedBody: CloudLinkList; }; }; /** - * Contains response data for the beginCreateOrUpdate operation. + * Contains response data for the get operation. */ -export type PrivateCloudsBeginCreateOrUpdateResponse = PrivateCloud & { +export type CloudLinksGetResponse = CloudLink & { /** * The underlying HTTP response. */ @@ -877,14 +4000,14 @@ export type PrivateCloudsBeginCreateOrUpdateResponse = PrivateCloud & { /** * The response body as parsed JSON or XML */ - parsedBody: PrivateCloud; + parsedBody: CloudLink; }; }; /** - * Contains response data for the beginUpdate operation. + * Contains response data for the createOrUpdate operation. */ -export type PrivateCloudsBeginUpdateResponse = PrivateCloud & { +export type CloudLinksCreateOrUpdateResponse = CloudLink & { /** * The underlying HTTP response. */ @@ -897,14 +4020,14 @@ export type PrivateCloudsBeginUpdateResponse = PrivateCloud & { /** * The response body as parsed JSON or XML */ - parsedBody: PrivateCloud; + parsedBody: CloudLink; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the beginCreateOrUpdate operation. */ -export type PrivateCloudsListNextResponse = PrivateCloudList & { +export type CloudLinksBeginCreateOrUpdateResponse = CloudLink & { /** * The underlying HTTP response. */ @@ -917,14 +4040,14 @@ export type PrivateCloudsListNextResponse = PrivateCloudList & { /** * The response body as parsed JSON or XML */ - parsedBody: PrivateCloudList; + parsedBody: CloudLink; }; }; /** - * Contains response data for the listInSubscriptionNext operation. + * Contains response data for the listNext operation. */ -export type PrivateCloudsListInSubscriptionNextResponse = PrivateCloudList & { +export type CloudLinksListNextResponse = CloudLinkList & { /** * The underlying HTTP response. */ @@ -937,14 +4060,14 @@ export type PrivateCloudsListInSubscriptionNextResponse = PrivateCloudList & { /** * The response body as parsed JSON or XML */ - parsedBody: PrivateCloudList; + parsedBody: CloudLinkList; }; }; /** * Contains response data for the list operation. */ -export type ClustersListResponse = ClusterList & { +export type AddonsListResponse = AddonList & { /** * The underlying HTTP response. */ @@ -957,14 +4080,14 @@ export type ClustersListResponse = ClusterList & { /** * The response body as parsed JSON or XML */ - parsedBody: ClusterList; + parsedBody: AddonList; }; }; /** * Contains response data for the get operation. */ -export type ClustersGetResponse = Cluster & { +export type AddonsGetResponse = Addon & { /** * The underlying HTTP response. */ @@ -977,14 +4100,14 @@ export type ClustersGetResponse = Cluster & { /** * The response body as parsed JSON or XML */ - parsedBody: Cluster; + parsedBody: Addon; }; }; /** * Contains response data for the createOrUpdate operation. */ -export type ClustersCreateOrUpdateResponse = Cluster & { +export type AddonsCreateOrUpdateResponse = Addon & { /** * The underlying HTTP response. */ @@ -997,14 +4120,14 @@ export type ClustersCreateOrUpdateResponse = Cluster & { /** * The response body as parsed JSON or XML */ - parsedBody: Cluster; + parsedBody: Addon; }; }; /** - * Contains response data for the update operation. + * Contains response data for the beginCreateOrUpdate operation. */ -export type ClustersUpdateResponse = Cluster & { +export type AddonsBeginCreateOrUpdateResponse = Addon & { /** * The underlying HTTP response. */ @@ -1017,14 +4140,14 @@ export type ClustersUpdateResponse = Cluster & { /** * The response body as parsed JSON or XML */ - parsedBody: Cluster; + parsedBody: Addon; }; }; /** - * Contains response data for the beginCreateOrUpdate operation. + * Contains response data for the listNext operation. */ -export type ClustersBeginCreateOrUpdateResponse = Cluster & { +export type AddonsListNextResponse = AddonList & { /** * The underlying HTTP response. */ @@ -1037,14 +4160,14 @@ export type ClustersBeginCreateOrUpdateResponse = Cluster & { /** * The response body as parsed JSON or XML */ - parsedBody: Cluster; + parsedBody: AddonList; }; }; /** - * Contains response data for the beginUpdate operation. + * Contains response data for the list operation. */ -export type ClustersBeginUpdateResponse = Cluster & { +export type ScriptPackagesListResponse = ScriptPackagesList & { /** * The underlying HTTP response. */ @@ -1057,14 +4180,14 @@ export type ClustersBeginUpdateResponse = Cluster & { /** * The response body as parsed JSON or XML */ - parsedBody: Cluster; + parsedBody: ScriptPackagesList; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the get operation. */ -export type ClustersListNextResponse = ClusterList & { +export type ScriptPackagesGetResponse = ScriptPackage & { /** * The underlying HTTP response. */ @@ -1077,14 +4200,14 @@ export type ClustersListNextResponse = ClusterList & { /** * The response body as parsed JSON or XML */ - parsedBody: ClusterList; + parsedBody: ScriptPackage; }; }; /** - * Contains response data for the list operation. + * Contains response data for the listNext operation. */ -export type HcxEnterpriseSitesListResponse = HcxEnterpriseSiteList & { +export type ScriptPackagesListNextResponse = ScriptPackagesList & { /** * The underlying HTTP response. */ @@ -1097,14 +4220,14 @@ export type HcxEnterpriseSitesListResponse = HcxEnterpriseSiteList & { /** * The response body as parsed JSON or XML */ - parsedBody: HcxEnterpriseSiteList; + parsedBody: ScriptPackagesList; }; }; /** - * Contains response data for the get operation. + * Contains response data for the list operation. */ -export type HcxEnterpriseSitesGetResponse = HcxEnterpriseSite & { +export type ScriptCmdletsListResponse = ScriptCmdletsList & { /** * The underlying HTTP response. */ @@ -1117,14 +4240,14 @@ export type HcxEnterpriseSitesGetResponse = HcxEnterpriseSite & { /** * The response body as parsed JSON or XML */ - parsedBody: HcxEnterpriseSite; + parsedBody: ScriptCmdletsList; }; }; /** - * Contains response data for the createOrUpdate operation. + * Contains response data for the get operation. */ -export type HcxEnterpriseSitesCreateOrUpdateResponse = HcxEnterpriseSite & { +export type ScriptCmdletsGetResponse = ScriptCmdlet & { /** * The underlying HTTP response. */ @@ -1137,14 +4260,14 @@ export type HcxEnterpriseSitesCreateOrUpdateResponse = HcxEnterpriseSite & { /** * The response body as parsed JSON or XML */ - parsedBody: HcxEnterpriseSite; + parsedBody: ScriptCmdlet; }; }; /** * Contains response data for the listNext operation. */ -export type HcxEnterpriseSitesListNextResponse = HcxEnterpriseSiteList & { +export type ScriptCmdletsListNextResponse = ScriptCmdletsList & { /** * The underlying HTTP response. */ @@ -1157,14 +4280,14 @@ export type HcxEnterpriseSitesListNextResponse = HcxEnterpriseSiteList & { /** * The response body as parsed JSON or XML */ - parsedBody: HcxEnterpriseSiteList; + parsedBody: ScriptCmdletsList; }; }; /** * Contains response data for the list operation. */ -export type AuthorizationsListResponse = ExpressRouteAuthorizationList & { +export type ScriptExecutionsListResponse = ScriptExecutionsList & { /** * The underlying HTTP response. */ @@ -1177,14 +4300,14 @@ export type AuthorizationsListResponse = ExpressRouteAuthorizationList & { /** * The response body as parsed JSON or XML */ - parsedBody: ExpressRouteAuthorizationList; + parsedBody: ScriptExecutionsList; }; }; /** * Contains response data for the get operation. */ -export type AuthorizationsGetResponse = ExpressRouteAuthorization & { +export type ScriptExecutionsGetResponse = ScriptExecution & { /** * The underlying HTTP response. */ @@ -1197,14 +4320,14 @@ export type AuthorizationsGetResponse = ExpressRouteAuthorization & { /** * The response body as parsed JSON or XML */ - parsedBody: ExpressRouteAuthorization; + parsedBody: ScriptExecution; }; }; /** * Contains response data for the createOrUpdate operation. */ -export type AuthorizationsCreateOrUpdateResponse = ExpressRouteAuthorization & { +export type ScriptExecutionsCreateOrUpdateResponse = ScriptExecution & { /** * The underlying HTTP response. */ @@ -1217,14 +4340,34 @@ export type AuthorizationsCreateOrUpdateResponse = ExpressRouteAuthorization & { /** * The response body as parsed JSON or XML */ - parsedBody: ExpressRouteAuthorization; + parsedBody: ScriptExecution; + }; +}; + +/** + * Contains response data for the getExecutionLogs operation. + */ +export type ScriptExecutionsGetExecutionLogsResponse = ScriptExecution & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ScriptExecution; }; }; /** * Contains response data for the beginCreateOrUpdate operation. */ -export type AuthorizationsBeginCreateOrUpdateResponse = ExpressRouteAuthorization & { +export type ScriptExecutionsBeginCreateOrUpdateResponse = ScriptExecution & { /** * The underlying HTTP response. */ @@ -1237,14 +4380,14 @@ export type AuthorizationsBeginCreateOrUpdateResponse = ExpressRouteAuthorizatio /** * The response body as parsed JSON or XML */ - parsedBody: ExpressRouteAuthorization; + parsedBody: ScriptExecution; }; }; /** * Contains response data for the listNext operation. */ -export type AuthorizationsListNextResponse = ExpressRouteAuthorizationList & { +export type ScriptExecutionsListNextResponse = ScriptExecutionsList & { /** * The underlying HTTP response. */ @@ -1257,6 +4400,6 @@ export type AuthorizationsListNextResponse = ExpressRouteAuthorizationList & { /** * The response body as parsed JSON or XML */ - parsedBody: ExpressRouteAuthorizationList; + parsedBody: ScriptExecutionsList; }; }; diff --git a/sdk/avs/arm-avs/src/models/locationsMappers.ts b/sdk/avs/arm-avs/src/models/locationsMappers.ts index 42d375510a29..b3717d115978 100644 --- a/sdk/avs/arm-avs/src/models/locationsMappers.ts +++ b/sdk/avs/arm-avs/src/models/locationsMappers.ts @@ -1,12 +1,13 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { + discriminators, CloudError, ErrorAdditionalInfo, ErrorResponse, diff --git a/sdk/avs/arm-avs/src/models/mappers.ts b/sdk/avs/arm-avs/src/models/mappers.ts index a3e223e991ab..fb43aa751017 100644 --- a/sdk/avs/arm-avs/src/models/mappers.ts +++ b/sdk/avs/arm-avs/src/models/mappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -124,6 +124,17 @@ export const TrackedResource: msRest.CompositeMapper = { } }; +export const ProxyResource: msRest.CompositeMapper = { + serializedName: "ProxyResource", + type: { + name: "Composite", + className: "ProxyResource", + modelProperties: { + ...Resource.type.modelProperties + } + } +}; + export const ErrorAdditionalInfo: msRest.CompositeMapper = { serializedName: "ErrorAdditionalInfo", type: { @@ -243,6 +254,223 @@ export const OperationDisplay: msRest.CompositeMapper = { } }; +export const LogSpecification: msRest.CompositeMapper = { + serializedName: "LogSpecification", + type: { + name: "Composite", + className: "LogSpecification", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + displayName: { + serializedName: "displayName", + type: { + name: "String" + } + }, + blobDuration: { + serializedName: "blobDuration", + type: { + name: "String" + } + } + } + } +}; + +export const MetricDimension: msRest.CompositeMapper = { + serializedName: "MetricDimension", + type: { + name: "Composite", + className: "MetricDimension", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + displayName: { + serializedName: "displayName", + type: { + name: "String" + } + }, + internalName: { + serializedName: "internalName", + type: { + name: "String" + } + }, + toBeExportedForShoebox: { + serializedName: "toBeExportedForShoebox", + type: { + name: "Boolean" + } + } + } + } +}; + +export const MetricSpecification: msRest.CompositeMapper = { + serializedName: "MetricSpecification", + type: { + name: "Composite", + className: "MetricSpecification", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + displayName: { + serializedName: "displayName", + type: { + name: "String" + } + }, + displayDescription: { + serializedName: "displayDescription", + type: { + name: "String" + } + }, + unit: { + serializedName: "unit", + type: { + name: "String" + } + }, + category: { + serializedName: "category", + type: { + name: "String" + } + }, + aggregationType: { + serializedName: "aggregationType", + type: { + name: "String" + } + }, + supportedAggregationTypes: { + serializedName: "supportedAggregationTypes", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + supportedTimeGrainTypes: { + serializedName: "supportedTimeGrainTypes", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + fillGapWithZero: { + serializedName: "fillGapWithZero", + type: { + name: "Boolean" + } + }, + dimensions: { + serializedName: "dimensions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MetricDimension" + } + } + } + }, + enableRegionalMdmAccount: { + serializedName: "enableRegionalMdmAccount", + type: { + name: "String" + } + }, + sourceMdmAccount: { + serializedName: "sourceMdmAccount", + type: { + name: "String" + } + }, + sourceMdmNamespace: { + serializedName: "sourceMdmNamespace", + type: { + name: "String" + } + } + } + } +}; + +export const ServiceSpecification: msRest.CompositeMapper = { + serializedName: "ServiceSpecification", + type: { + name: "Composite", + className: "ServiceSpecification", + modelProperties: { + logSpecifications: { + serializedName: "logSpecifications", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "LogSpecification" + } + } + } + }, + metricSpecifications: { + serializedName: "metricSpecifications", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MetricSpecification" + } + } + } + } + } + } +}; + +export const OperationProperties: msRest.CompositeMapper = { + serializedName: "OperationProperties", + type: { + name: "Composite", + className: "OperationProperties", + modelProperties: { + serviceSpecification: { + serializedName: "serviceSpecification", + type: { + name: "Composite", + className: "ServiceSpecification" + } + } + } + } +}; + export const Operation: msRest.CompositeMapper = { serializedName: "Operation", type: { @@ -263,6 +491,25 @@ export const Operation: msRest.CompositeMapper = { name: "Composite", className: "OperationDisplay" } + }, + isDataAction: { + serializedName: "isDataAction", + type: { + name: "Boolean" + } + }, + origin: { + serializedName: "origin", + type: { + name: "String" + } + }, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "OperationProperties" + } } } } @@ -480,6 +727,7 @@ export const PrivateCloud: msRest.CompositeMapper = { }, internet: { serializedName: "properties.internet", + defaultValue: 'Disabled', type: { name: "String" } @@ -571,34 +819,41 @@ export const PrivateCloud: msRest.CompositeMapper = { type: { name: "String" } + }, + externalCloudLinks: { + readOnly: true, + serializedName: "properties.externalCloudLinks", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } } } } }; -export const ClusterUpdateProperties: msRest.CompositeMapper = { - serializedName: "ClusterUpdateProperties", +export const CommonClusterProperties: msRest.CompositeMapper = { + serializedName: "CommonClusterProperties", type: { name: "Composite", - className: "ClusterUpdateProperties", + className: "CommonClusterProperties", modelProperties: { clusterSize: { serializedName: "clusterSize", type: { name: "Number" } - } - } - } -}; - -export const ManagementCluster: msRest.CompositeMapper = { - serializedName: "ManagementCluster", - type: { - name: "Composite", - className: "ManagementCluster", - modelProperties: { - ...ClusterUpdateProperties.type.modelProperties, + }, + provisioningState: { + serializedName: "provisioningState", + type: { + name: "String" + } + }, clusterId: { readOnly: true, serializedName: "clusterId", @@ -622,6 +877,17 @@ export const ManagementCluster: msRest.CompositeMapper = { } }; +export const ManagementCluster: msRest.CompositeMapper = { + serializedName: "ManagementCluster", + type: { + name: "Composite", + className: "ManagementCluster", + modelProperties: { + ...CommonClusterProperties.type.modelProperties + } + } +}; + export const PrivateCloudUpdate: msRest.CompositeMapper = { serializedName: "PrivateCloudUpdate", type: { @@ -648,6 +914,7 @@ export const PrivateCloudUpdate: msRest.CompositeMapper = { }, internet: { serializedName: "properties.internet", + defaultValue: 'Disabled', type: { name: "String" } @@ -689,6 +956,12 @@ export const Cluster: msRest.CompositeMapper = { name: "Number" } }, + provisioningState: { + serializedName: "properties.provisioningState", + type: { + name: "String" + } + }, clusterId: { readOnly: true, serializedName: "properties.clusterId", @@ -707,13 +980,6 @@ export const Cluster: msRest.CompositeMapper = { } } } - }, - provisioningState: { - readOnly: true, - serializedName: "properties.provisioningState", - type: { - name: "String" - } } } } @@ -735,36 +1001,27 @@ export const ClusterUpdate: msRest.CompositeMapper = { } }; -export const AdminCredentials: msRest.CompositeMapper = { - serializedName: "AdminCredentials", +export const AddonProperties: msRest.CompositeMapper = { + serializedName: "AddonProperties", type: { name: "Composite", - className: "AdminCredentials", + polymorphicDiscriminator: { + serializedName: "addonType", + clientName: "addonType" + }, + uberParent: "AddonProperties", + className: "AddonProperties", modelProperties: { - nsxtUsername: { - readOnly: true, - serializedName: "nsxtUsername", - type: { - name: "String" - } - }, - nsxtPassword: { - readOnly: true, - serializedName: "nsxtPassword", - type: { - name: "String" - } - }, - vcenterUsername: { + provisioningState: { readOnly: true, - serializedName: "vcenterUsername", + serializedName: "provisioningState", type: { name: "String" } }, - vcenterPassword: { - readOnly: true, - serializedName: "vcenterPassword", + addonType: { + required: true, + serializedName: "addonType", type: { name: "String" } @@ -773,23 +1030,1427 @@ export const AdminCredentials: msRest.CompositeMapper = { } }; -export const HcxEnterpriseSite: msRest.CompositeMapper = { - serializedName: "HcxEnterpriseSite", +export const Addon: msRest.CompositeMapper = { + serializedName: "Addon", type: { name: "Composite", - className: "HcxEnterpriseSite", + className: "Addon", modelProperties: { ...Resource.type.modelProperties, - activationKey: { - readOnly: true, - serializedName: "properties.activationKey", + properties: { + serializedName: "properties", type: { - name: "String" + name: "Composite", + className: "AddonProperties" + } + } + } + } +}; + +export const AddonSrmProperties: msRest.CompositeMapper = { + serializedName: "SRM", + type: { + name: "Composite", + polymorphicDiscriminator: AddonProperties.type.polymorphicDiscriminator, + uberParent: "AddonProperties", + className: "AddonSrmProperties", + modelProperties: { + ...AddonProperties.type.modelProperties, + licenseKey: { + required: true, + serializedName: "licenseKey", + type: { + name: "String" + } + } + } + } +}; + +export const AddonVrProperties: msRest.CompositeMapper = { + serializedName: "VR", + type: { + name: "Composite", + polymorphicDiscriminator: AddonProperties.type.polymorphicDiscriminator, + uberParent: "AddonProperties", + className: "AddonVrProperties", + modelProperties: { + ...AddonProperties.type.modelProperties, + vrsCount: { + required: true, + serializedName: "vrsCount", + type: { + name: "Number" + } + } + } + } +}; + +export const AddonHcxProperties: msRest.CompositeMapper = { + serializedName: "HCX", + type: { + name: "Composite", + polymorphicDiscriminator: AddonProperties.type.polymorphicDiscriminator, + uberParent: "AddonProperties", + className: "AddonHcxProperties", + modelProperties: { + ...AddonProperties.type.modelProperties, + offer: { + required: true, + serializedName: "offer", + type: { + name: "String" + } + } + } + } +}; + +export const NetAppVolume: msRest.CompositeMapper = { + serializedName: "NetAppVolume", + type: { + name: "Composite", + className: "NetAppVolume", + modelProperties: { + id: { + required: true, + serializedName: "id", + type: { + name: "String" + } + } + } + } +}; + +export const DiskPoolVolume: msRest.CompositeMapper = { + serializedName: "DiskPoolVolume", + type: { + name: "Composite", + className: "DiskPoolVolume", + modelProperties: { + targetId: { + required: true, + serializedName: "targetId", + type: { + name: "String" + } + }, + lunName: { + required: true, + serializedName: "lunName", + type: { + name: "String" + } + }, + mountOption: { + serializedName: "mountOption", + defaultValue: 'MOUNT', + type: { + name: "String" + } + }, + path: { + readOnly: true, + serializedName: "path", + type: { + name: "String" + } + } + } + } +}; + +export const Datastore: msRest.CompositeMapper = { + serializedName: "Datastore", + type: { + name: "Composite", + className: "Datastore", + modelProperties: { + ...Resource.type.modelProperties, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + }, + netAppVolume: { + serializedName: "properties.netAppVolume", + type: { + name: "Composite", + className: "NetAppVolume" + } + }, + diskPoolVolume: { + serializedName: "properties.diskPoolVolume", + type: { + name: "Composite", + className: "DiskPoolVolume" + } + } + } + } +}; + +export const AdminCredentials: msRest.CompositeMapper = { + serializedName: "AdminCredentials", + type: { + name: "Composite", + className: "AdminCredentials", + modelProperties: { + nsxtUsername: { + readOnly: true, + serializedName: "nsxtUsername", + type: { + name: "String" + } + }, + nsxtPassword: { + readOnly: true, + serializedName: "nsxtPassword", + type: { + name: "String" + } + }, + vcenterUsername: { + readOnly: true, + serializedName: "vcenterUsername", + type: { + name: "String" + } + }, + vcenterPassword: { + readOnly: true, + serializedName: "vcenterPassword", + type: { + name: "String" + } + } + } + } +}; + +export const HcxEnterpriseSite: msRest.CompositeMapper = { + serializedName: "HcxEnterpriseSite", + type: { + name: "Composite", + className: "HcxEnterpriseSite", + modelProperties: { + ...Resource.type.modelProperties, + activationKey: { + readOnly: true, + serializedName: "properties.activationKey", + type: { + name: "String" + } + }, + status: { + readOnly: true, + serializedName: "properties.status", + type: { + name: "String" + } + } + } + } +}; + +export const GlobalReachConnection: msRest.CompositeMapper = { + serializedName: "GlobalReachConnection", + type: { + name: "Composite", + className: "GlobalReachConnection", + modelProperties: { + ...Resource.type.modelProperties, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + }, + addressPrefix: { + readOnly: true, + serializedName: "properties.addressPrefix", + type: { + name: "String" + } + }, + authorizationKey: { + serializedName: "properties.authorizationKey", + type: { + name: "String" + } + }, + circuitConnectionStatus: { + readOnly: true, + serializedName: "properties.circuitConnectionStatus", + type: { + name: "String" + } + }, + peerExpressRouteCircuit: { + serializedName: "properties.peerExpressRouteCircuit", + type: { + name: "String" + } + } + } + } +}; + +export const CloudLink: msRest.CompositeMapper = { + serializedName: "CloudLink", + type: { + name: "Composite", + className: "CloudLink", + modelProperties: { + ...Resource.type.modelProperties, + status: { + readOnly: true, + serializedName: "properties.status", + type: { + name: "String" + } + }, + linkedCloud: { + serializedName: "properties.linkedCloud", + type: { + name: "String" + } + } + } + } +}; + +export const WorkloadNetworkSegmentSubnet: msRest.CompositeMapper = { + serializedName: "WorkloadNetworkSegmentSubnet", + type: { + name: "Composite", + className: "WorkloadNetworkSegmentSubnet", + modelProperties: { + dhcpRanges: { + serializedName: "dhcpRanges", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + gatewayAddress: { + serializedName: "gatewayAddress", + type: { + name: "String" + } + } + } + } +}; + +export const WorkloadNetworkSegmentPortVif: msRest.CompositeMapper = { + serializedName: "WorkloadNetworkSegmentPortVif", + type: { + name: "Composite", + className: "WorkloadNetworkSegmentPortVif", + modelProperties: { + portName: { + serializedName: "portName", + type: { + name: "String" + } + } + } + } +}; + +export const WorkloadNetworkSegment: msRest.CompositeMapper = { + serializedName: "WorkloadNetworkSegment", + type: { + name: "Composite", + className: "WorkloadNetworkSegment", + modelProperties: { + ...ProxyResource.type.modelProperties, + displayName: { + serializedName: "properties.displayName", + type: { + name: "String" + } + }, + connectedGateway: { + serializedName: "properties.connectedGateway", + type: { + name: "String" + } + }, + subnet: { + serializedName: "properties.subnet", + type: { + name: "Composite", + className: "WorkloadNetworkSegmentSubnet" + } + }, + portVif: { + readOnly: true, + serializedName: "properties.portVif", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "WorkloadNetworkSegmentPortVif" + } + } + } + }, + status: { + readOnly: true, + serializedName: "properties.status", + type: { + name: "String" + } + }, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + }, + revision: { + serializedName: "properties.revision", + type: { + name: "Number" + } + } + } + } +}; + +export const WorkloadNetworkDhcpEntity: msRest.CompositeMapper = { + serializedName: "WorkloadNetworkDhcpEntity", + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "dhcpType", + clientName: "dhcpType" + }, + uberParent: "WorkloadNetworkDhcpEntity", + className: "WorkloadNetworkDhcpEntity", + modelProperties: { + displayName: { + serializedName: "displayName", + type: { + name: "String" + } + }, + segments: { + readOnly: true, + serializedName: "segments", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + provisioningState: { + readOnly: true, + serializedName: "provisioningState", + type: { + name: "String" + } + }, + revision: { + serializedName: "revision", + type: { + name: "Number" + } + }, + dhcpType: { + required: true, + serializedName: "dhcpType", + type: { + name: "String" + } + } + } + } +}; + +export const WorkloadNetworkDhcpServer: msRest.CompositeMapper = { + serializedName: "SERVER", + type: { + name: "Composite", + polymorphicDiscriminator: WorkloadNetworkDhcpEntity.type.polymorphicDiscriminator, + uberParent: "WorkloadNetworkDhcpEntity", + className: "WorkloadNetworkDhcpServer", + modelProperties: { + ...WorkloadNetworkDhcpEntity.type.modelProperties, + serverAddress: { + serializedName: "serverAddress", + type: { + name: "String" + } + }, + leaseTime: { + serializedName: "leaseTime", + type: { + name: "Number" + } + } + } + } +}; + +export const WorkloadNetworkDhcpRelay: msRest.CompositeMapper = { + serializedName: "RELAY", + type: { + name: "Composite", + polymorphicDiscriminator: WorkloadNetworkDhcpEntity.type.polymorphicDiscriminator, + uberParent: "WorkloadNetworkDhcpEntity", + className: "WorkloadNetworkDhcpRelay", + modelProperties: { + ...WorkloadNetworkDhcpEntity.type.modelProperties, + serverAddresses: { + serializedName: "serverAddresses", + constraints: { + MaxItems: 3, + MinItems: 1 + }, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const WorkloadNetworkDhcp: msRest.CompositeMapper = { + serializedName: "WorkloadNetworkDhcp", + type: { + name: "Composite", + className: "WorkloadNetworkDhcp", + modelProperties: { + ...ProxyResource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "WorkloadNetworkDhcpEntity" + } + } + } + } +}; + +export const WorkloadNetworkPortMirroring: msRest.CompositeMapper = { + serializedName: "WorkloadNetworkPortMirroring", + type: { + name: "Composite", + className: "WorkloadNetworkPortMirroring", + modelProperties: { + ...ProxyResource.type.modelProperties, + displayName: { + serializedName: "properties.displayName", + type: { + name: "String" + } + }, + direction: { + serializedName: "properties.direction", + type: { + name: "String" + } + }, + source: { + serializedName: "properties.source", + type: { + name: "String" + } + }, + destination: { + serializedName: "properties.destination", + type: { + name: "String" + } + }, + status: { + readOnly: true, + serializedName: "properties.status", + type: { + name: "String" + } + }, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + }, + revision: { + serializedName: "properties.revision", + type: { + name: "Number" + } + } + } + } +}; + +export const WorkloadNetworkVMGroup: msRest.CompositeMapper = { + serializedName: "WorkloadNetworkVMGroup", + type: { + name: "Composite", + className: "WorkloadNetworkVMGroup", + modelProperties: { + ...ProxyResource.type.modelProperties, + displayName: { + serializedName: "properties.displayName", + type: { + name: "String" + } + }, + members: { + serializedName: "properties.members", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + status: { + readOnly: true, + serializedName: "properties.status", + type: { + name: "String" + } + }, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + }, + revision: { + serializedName: "properties.revision", + type: { + name: "Number" + } + } + } + } +}; + +export const WorkloadNetworkVirtualMachine: msRest.CompositeMapper = { + serializedName: "WorkloadNetworkVirtualMachine", + type: { + name: "Composite", + className: "WorkloadNetworkVirtualMachine", + modelProperties: { + ...ProxyResource.type.modelProperties, + displayName: { + serializedName: "properties.displayName", + type: { + name: "String" + } + }, + vmType: { + readOnly: true, + serializedName: "properties.vmType", + type: { + name: "String" + } + } + } + } +}; + +export const WorkloadNetworkGateway: msRest.CompositeMapper = { + serializedName: "WorkloadNetworkGateway", + type: { + name: "Composite", + className: "WorkloadNetworkGateway", + modelProperties: { + ...ProxyResource.type.modelProperties, + displayName: { + serializedName: "properties.displayName", + type: { + name: "String" + } + }, + path: { + readOnly: true, + serializedName: "properties.path", + type: { + name: "String" + } + } + } + } +}; + +export const WorkloadNetworkDnsService: msRest.CompositeMapper = { + serializedName: "WorkloadNetworkDnsService", + type: { + name: "Composite", + className: "WorkloadNetworkDnsService", + modelProperties: { + ...ProxyResource.type.modelProperties, + displayName: { + serializedName: "properties.displayName", + type: { + name: "String" + } + }, + dnsServiceIp: { + serializedName: "properties.dnsServiceIp", + type: { + name: "String" + } + }, + defaultDnsZone: { + serializedName: "properties.defaultDnsZone", + type: { + name: "String" + } + }, + fqdnZones: { + serializedName: "properties.fqdnZones", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + logLevel: { + serializedName: "properties.logLevel", + type: { + name: "String" + } + }, + status: { + readOnly: true, + serializedName: "properties.status", + type: { + name: "String" + } + }, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + }, + revision: { + serializedName: "properties.revision", + type: { + name: "Number" + } + } + } + } +}; + +export const WorkloadNetworkDnsZone: msRest.CompositeMapper = { + serializedName: "WorkloadNetworkDnsZone", + type: { + name: "Composite", + className: "WorkloadNetworkDnsZone", + modelProperties: { + ...ProxyResource.type.modelProperties, + displayName: { + serializedName: "properties.displayName", + type: { + name: "String" + } + }, + domain: { + serializedName: "properties.domain", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + dnsServerIps: { + serializedName: "properties.dnsServerIps", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + sourceIp: { + serializedName: "properties.sourceIp", + type: { + name: "String" + } + }, + dnsServices: { + serializedName: "properties.dnsServices", + type: { + name: "Number" + } + }, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + }, + revision: { + serializedName: "properties.revision", + type: { + name: "Number" + } + } + } + } +}; + +export const WorkloadNetworkPublicIP: msRest.CompositeMapper = { + serializedName: "WorkloadNetworkPublicIP", + type: { + name: "Composite", + className: "WorkloadNetworkPublicIP", + modelProperties: { + ...ProxyResource.type.modelProperties, + displayName: { + serializedName: "properties.displayName", + type: { + name: "String" + } + }, + numberOfPublicIPs: { + serializedName: "properties.numberOfPublicIPs", + type: { + name: "Number" + } + }, + publicIPBlock: { + readOnly: true, + serializedName: "properties.publicIPBlock", + type: { + name: "String" + } + }, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + } + } + } +}; + +export const ScriptPackage: msRest.CompositeMapper = { + serializedName: "ScriptPackage", + type: { + name: "Composite", + className: "ScriptPackage", + modelProperties: { + ...ProxyResource.type.modelProperties, + description: { + readOnly: true, + serializedName: "properties.description", + type: { + name: "String" + } + }, + version: { + readOnly: true, + serializedName: "properties.version", + type: { + name: "String" + } + } + } + } +}; + +export const ScriptParameter: msRest.CompositeMapper = { + serializedName: "ScriptParameter", + type: { + name: "Composite", + className: "ScriptParameter", + modelProperties: { + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + }, + description: { + readOnly: true, + serializedName: "description", + type: { + name: "String" + } + }, + visibility: { + readOnly: true, + serializedName: "visibility", + type: { + name: "String" + } + }, + optional: { + readOnly: true, + serializedName: "optional", + type: { + name: "String" + } + } + } + } +}; + +export const ScriptCmdlet: msRest.CompositeMapper = { + serializedName: "ScriptCmdlet", + type: { + name: "Composite", + className: "ScriptCmdlet", + modelProperties: { + ...ProxyResource.type.modelProperties, + description: { + readOnly: true, + serializedName: "properties.description", + type: { + name: "String" + } + }, + timeout: { + readOnly: true, + serializedName: "properties.timeout", + type: { + name: "String" + } + }, + parameters: { + readOnly: true, + serializedName: "properties.parameters", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ScriptParameter" + } + } + } + } + } + } +}; + +export const ScriptExecutionParameter: msRest.CompositeMapper = { + serializedName: "ScriptExecutionParameter", + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "type", + clientName: "type" + }, + uberParent: "ScriptExecutionParameter", + className: "ScriptExecutionParameter", + modelProperties: { + name: { + required: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + required: true, + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const ScriptExecution: msRest.CompositeMapper = { + serializedName: "ScriptExecution", + type: { + name: "Composite", + className: "ScriptExecution", + modelProperties: { + ...ProxyResource.type.modelProperties, + scriptCmdletId: { + serializedName: "properties.scriptCmdletId", + type: { + name: "String" + } + }, + parameters: { + serializedName: "properties.parameters", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ScriptExecutionParameter" + } + } + } + }, + hiddenParameters: { + serializedName: "properties.hiddenParameters", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ScriptExecutionParameter" + } + } + } + }, + failureReason: { + serializedName: "properties.failureReason", + type: { + name: "String" + } + }, + timeout: { + required: true, + serializedName: "properties.timeout", + type: { + name: "String" + } + }, + retention: { + serializedName: "properties.retention", + type: { + name: "String" + } + }, + submittedAt: { + readOnly: true, + serializedName: "properties.submittedAt", + type: { + name: "DateTime" + } + }, + startedAt: { + readOnly: true, + serializedName: "properties.startedAt", + type: { + name: "DateTime" + } + }, + finishedAt: { + readOnly: true, + serializedName: "properties.finishedAt", + type: { + name: "DateTime" + } + }, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + }, + output: { + serializedName: "properties.output", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + namedOutputs: { + serializedName: "properties.namedOutputs", + type: { + name: "Dictionary", + value: { + type: { + name: "Object" + } + } + } + }, + information: { + readOnly: true, + serializedName: "properties.information", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + warnings: { + readOnly: true, + serializedName: "properties.warnings", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + errors: { + readOnly: true, + serializedName: "properties.errors", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const ScriptSecureStringExecutionParameter: msRest.CompositeMapper = { + serializedName: "SecureValue", + type: { + name: "Composite", + polymorphicDiscriminator: ScriptExecutionParameter.type.polymorphicDiscriminator, + uberParent: "ScriptExecutionParameter", + className: "ScriptSecureStringExecutionParameter", + modelProperties: { + ...ScriptExecutionParameter.type.modelProperties, + secureValue: { + serializedName: "secureValue", + type: { + name: "String" + } + } + } + } +}; + +export const ScriptStringExecutionParameter: msRest.CompositeMapper = { + serializedName: "Value", + type: { + name: "Composite", + polymorphicDiscriminator: ScriptExecutionParameter.type.polymorphicDiscriminator, + uberParent: "ScriptExecutionParameter", + className: "ScriptStringExecutionParameter", + modelProperties: { + ...ScriptExecutionParameter.type.modelProperties, + value: { + serializedName: "value", + type: { + name: "String" + } + } + } + } +}; + +export const PSCredentialExecutionParameter: msRest.CompositeMapper = { + serializedName: "Credential", + type: { + name: "Composite", + polymorphicDiscriminator: ScriptExecutionParameter.type.polymorphicDiscriminator, + uberParent: "ScriptExecutionParameter", + className: "PSCredentialExecutionParameter", + modelProperties: { + ...ScriptExecutionParameter.type.modelProperties, + username: { + serializedName: "username", + type: { + name: "String" + } + }, + password: { + serializedName: "password", + type: { + name: "String" + } + } + } + } +}; + +export const OperationList: msRest.CompositeMapper = { + serializedName: "OperationList", + type: { + name: "Composite", + className: "OperationList", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Operation" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateCloudList: msRest.CompositeMapper = { + serializedName: "PrivateCloudList", + type: { + name: "Composite", + className: "PrivateCloudList", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateCloud" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const ClusterList: msRest.CompositeMapper = { + serializedName: "ClusterList", + type: { + name: "Composite", + className: "ClusterList", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Cluster" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const DatastoreList: msRest.CompositeMapper = { + serializedName: "DatastoreList", + type: { + name: "Composite", + className: "DatastoreList", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Datastore" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const HcxEnterpriseSiteList: msRest.CompositeMapper = { + serializedName: "HcxEnterpriseSiteList", + type: { + name: "Composite", + className: "HcxEnterpriseSiteList", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "HcxEnterpriseSite" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const ExpressRouteAuthorizationList: msRest.CompositeMapper = { + serializedName: "ExpressRouteAuthorizationList", + type: { + name: "Composite", + className: "ExpressRouteAuthorizationList", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ExpressRouteAuthorization" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const GlobalReachConnectionList: msRest.CompositeMapper = { + serializedName: "GlobalReachConnectionList", + type: { + name: "Composite", + className: "GlobalReachConnectionList", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "GlobalReachConnection" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const WorkloadNetworkSegmentsList: msRest.CompositeMapper = { + serializedName: "WorkloadNetworkSegmentsList", + type: { + name: "Composite", + className: "WorkloadNetworkSegmentsList", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "WorkloadNetworkSegment" + } + } } }, - status: { + nextLink: { readOnly: true, - serializedName: "properties.status", + serializedName: "nextLink", type: { name: "String" } @@ -798,11 +2459,11 @@ export const HcxEnterpriseSite: msRest.CompositeMapper = { } }; -export const OperationList: msRest.CompositeMapper = { - serializedName: "OperationList", +export const WorkloadNetworkDhcpList: msRest.CompositeMapper = { + serializedName: "WorkloadNetworkDhcpList", type: { name: "Composite", - className: "OperationList", + className: "WorkloadNetworkDhcpList", modelProperties: { value: { readOnly: true, @@ -812,7 +2473,7 @@ export const OperationList: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "Operation" + className: "WorkloadNetworkDhcp" } } } @@ -828,11 +2489,11 @@ export const OperationList: msRest.CompositeMapper = { } }; -export const PrivateCloudList: msRest.CompositeMapper = { - serializedName: "PrivateCloudList", +export const WorkloadNetworkGatewayList: msRest.CompositeMapper = { + serializedName: "WorkloadNetworkGatewayList", type: { name: "Composite", - className: "PrivateCloudList", + className: "WorkloadNetworkGatewayList", modelProperties: { value: { readOnly: true, @@ -842,7 +2503,7 @@ export const PrivateCloudList: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "PrivateCloud" + className: "WorkloadNetworkGateway" } } } @@ -858,11 +2519,11 @@ export const PrivateCloudList: msRest.CompositeMapper = { } }; -export const ClusterList: msRest.CompositeMapper = { - serializedName: "ClusterList", +export const WorkloadNetworkPortMirroringList: msRest.CompositeMapper = { + serializedName: "WorkloadNetworkPortMirroringList", type: { name: "Composite", - className: "ClusterList", + className: "WorkloadNetworkPortMirroringList", modelProperties: { value: { readOnly: true, @@ -872,7 +2533,7 @@ export const ClusterList: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "Cluster" + className: "WorkloadNetworkPortMirroring" } } } @@ -888,11 +2549,11 @@ export const ClusterList: msRest.CompositeMapper = { } }; -export const HcxEnterpriseSiteList: msRest.CompositeMapper = { - serializedName: "HcxEnterpriseSiteList", +export const WorkloadNetworkVMGroupsList: msRest.CompositeMapper = { + serializedName: "WorkloadNetworkVMGroupsList", type: { name: "Composite", - className: "HcxEnterpriseSiteList", + className: "WorkloadNetworkVMGroupsList", modelProperties: { value: { readOnly: true, @@ -902,7 +2563,7 @@ export const HcxEnterpriseSiteList: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "HcxEnterpriseSite" + className: "WorkloadNetworkVMGroup" } } } @@ -918,11 +2579,11 @@ export const HcxEnterpriseSiteList: msRest.CompositeMapper = { } }; -export const ExpressRouteAuthorizationList: msRest.CompositeMapper = { - serializedName: "ExpressRouteAuthorizationList", +export const WorkloadNetworkVirtualMachinesList: msRest.CompositeMapper = { + serializedName: "WorkloadNetworkVirtualMachinesList", type: { name: "Composite", - className: "ExpressRouteAuthorizationList", + className: "WorkloadNetworkVirtualMachinesList", modelProperties: { value: { readOnly: true, @@ -932,7 +2593,247 @@ export const ExpressRouteAuthorizationList: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "ExpressRouteAuthorization" + className: "WorkloadNetworkVirtualMachine" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const WorkloadNetworkDnsServicesList: msRest.CompositeMapper = { + serializedName: "WorkloadNetworkDnsServicesList", + type: { + name: "Composite", + className: "WorkloadNetworkDnsServicesList", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "WorkloadNetworkDnsService" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const WorkloadNetworkDnsZonesList: msRest.CompositeMapper = { + serializedName: "WorkloadNetworkDnsZonesList", + type: { + name: "Composite", + className: "WorkloadNetworkDnsZonesList", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "WorkloadNetworkDnsZone" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const WorkloadNetworkPublicIPsList: msRest.CompositeMapper = { + serializedName: "WorkloadNetworkPublicIPsList", + type: { + name: "Composite", + className: "WorkloadNetworkPublicIPsList", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "WorkloadNetworkPublicIP" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const CloudLinkList: msRest.CompositeMapper = { + serializedName: "CloudLinkList", + type: { + name: "Composite", + className: "CloudLinkList", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CloudLink" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const AddonList: msRest.CompositeMapper = { + serializedName: "AddonList", + type: { + name: "Composite", + className: "AddonList", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Addon" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const ScriptPackagesList: msRest.CompositeMapper = { + serializedName: "ScriptPackagesList", + type: { + name: "Composite", + className: "ScriptPackagesList", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ScriptPackage" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const ScriptCmdletsList: msRest.CompositeMapper = { + serializedName: "ScriptCmdletsList", + type: { + name: "Composite", + className: "ScriptCmdletsList", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ScriptCmdlet" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const ScriptExecutionsList: msRest.CompositeMapper = { + serializedName: "ScriptExecutionsList", + type: { + name: "Composite", + className: "ScriptExecutionsList", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ScriptExecution" } } } @@ -947,3 +2848,18 @@ export const ExpressRouteAuthorizationList: msRest.CompositeMapper = { } } }; + +export const discriminators = { + 'AddonProperties' : AddonProperties, + 'AddonProperties.SRM' : AddonSrmProperties, + 'AddonProperties.VR' : AddonVrProperties, + 'AddonProperties.HCX' : AddonHcxProperties, + 'WorkloadNetworkDhcpEntity' : WorkloadNetworkDhcpEntity, + 'WorkloadNetworkDhcpEntity.SERVER' : WorkloadNetworkDhcpServer, + 'WorkloadNetworkDhcpEntity.RELAY' : WorkloadNetworkDhcpRelay, + 'ScriptExecutionParameter' : ScriptExecutionParameter, + 'ScriptExecutionParameter.SecureValue' : ScriptSecureStringExecutionParameter, + 'ScriptExecutionParameter.Value' : ScriptStringExecutionParameter, + 'ScriptExecutionParameter.Credential' : PSCredentialExecutionParameter + +}; diff --git a/sdk/avs/arm-avs/src/models/operationsMappers.ts b/sdk/avs/arm-avs/src/models/operationsMappers.ts index 0a19c814cee4..47dcbdb04409 100644 --- a/sdk/avs/arm-avs/src/models/operationsMappers.ts +++ b/sdk/avs/arm-avs/src/models/operationsMappers.ts @@ -1,16 +1,22 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { + discriminators, CloudError, ErrorAdditionalInfo, ErrorResponse, + LogSpecification, + MetricDimension, + MetricSpecification, Operation, OperationDisplay, - OperationList + OperationList, + OperationProperties, + ServiceSpecification } from "../models/mappers"; diff --git a/sdk/avs/arm-avs/src/models/parameters.ts b/sdk/avs/arm-avs/src/models/parameters.ts index a6e0588f1cac..2ebe6b72c6a3 100644 --- a/sdk/avs/arm-avs/src/models/parameters.ts +++ b/sdk/avs/arm-avs/src/models/parameters.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -20,6 +19,16 @@ export const acceptLanguage: msRest.OperationParameter = { } } }; +export const addonName: msRest.OperationURLParameter = { + parameterPath: "addonName", + mapper: { + required: true, + serializedName: "addonName", + type: { + name: "String" + } + } +}; export const apiVersion: msRest.OperationQueryParameter = { parameterPath: "apiVersion", mapper: { @@ -43,6 +52,16 @@ export const authorizationName: msRest.OperationURLParameter = { } } }; +export const cloudLinkName: msRest.OperationURLParameter = { + parameterPath: "cloudLinkName", + mapper: { + required: true, + serializedName: "cloudLinkName", + type: { + name: "String" + } + } +}; export const clusterName: msRest.OperationURLParameter = { parameterPath: "clusterName", mapper: { @@ -53,6 +72,66 @@ export const clusterName: msRest.OperationURLParameter = { } } }; +export const datastoreName: msRest.OperationURLParameter = { + parameterPath: "datastoreName", + mapper: { + required: true, + serializedName: "datastoreName", + type: { + name: "String" + } + } +}; +export const dhcpId: msRest.OperationURLParameter = { + parameterPath: "dhcpId", + mapper: { + required: true, + serializedName: "dhcpId", + type: { + name: "String" + } + } +}; +export const dnsServiceId: msRest.OperationURLParameter = { + parameterPath: "dnsServiceId", + mapper: { + required: true, + serializedName: "dnsServiceId", + type: { + name: "String" + } + } +}; +export const dnsZoneId: msRest.OperationURLParameter = { + parameterPath: "dnsZoneId", + mapper: { + required: true, + serializedName: "dnsZoneId", + type: { + name: "String" + } + } +}; +export const gatewayId: msRest.OperationURLParameter = { + parameterPath: "gatewayId", + mapper: { + required: true, + serializedName: "gatewayId", + type: { + name: "String" + } + } +}; +export const globalReachConnectionName: msRest.OperationURLParameter = { + parameterPath: "globalReachConnectionName", + mapper: { + required: true, + serializedName: "globalReachConnectionName", + type: { + name: "String" + } + } +}; export const hcxEnterpriseSiteName: msRest.OperationURLParameter = { parameterPath: "hcxEnterpriseSiteName", mapper: { @@ -84,6 +163,16 @@ export const nextPageLink: msRest.OperationURLParameter = { }, skipEncoding: true }; +export const portMirroringId: msRest.OperationURLParameter = { + parameterPath: "portMirroringId", + mapper: { + required: true, + serializedName: "portMirroringId", + type: { + name: "String" + } + } +}; export const privateCloudName: msRest.OperationURLParameter = { parameterPath: "privateCloudName", mapper: { @@ -94,6 +183,16 @@ export const privateCloudName: msRest.OperationURLParameter = { } } }; +export const publicIPId: msRest.OperationURLParameter = { + parameterPath: "publicIPId", + mapper: { + required: true, + serializedName: "publicIPId", + type: { + name: "String" + } + } +}; export const resourceGroupName: msRest.OperationURLParameter = { parameterPath: "resourceGroupName", mapper: { @@ -101,14 +200,53 @@ export const resourceGroupName: msRest.OperationURLParameter = { serializedName: "resourceGroupName", constraints: { MaxLength: 90, - MinLength: 1, - Pattern: /^[-\w\._\(\)]+$/ + MinLength: 1 }, type: { name: "String" } } }; +export const scriptCmdletName: msRest.OperationURLParameter = { + parameterPath: "scriptCmdletName", + mapper: { + required: true, + serializedName: "scriptCmdletName", + type: { + name: "String" + } + } +}; +export const scriptExecutionName: msRest.OperationURLParameter = { + parameterPath: "scriptExecutionName", + mapper: { + required: true, + serializedName: "scriptExecutionName", + type: { + name: "String" + } + } +}; +export const scriptPackageName: msRest.OperationURLParameter = { + parameterPath: "scriptPackageName", + mapper: { + required: true, + serializedName: "scriptPackageName", + type: { + name: "String" + } + } +}; +export const segmentId: msRest.OperationURLParameter = { + parameterPath: "segmentId", + mapper: { + required: true, + serializedName: "segmentId", + type: { + name: "String" + } + } +}; export const subscriptionId: msRest.OperationURLParameter = { parameterPath: "subscriptionId", mapper: { @@ -122,3 +260,23 @@ export const subscriptionId: msRest.OperationURLParameter = { } } }; +export const virtualMachineId: msRest.OperationURLParameter = { + parameterPath: "virtualMachineId", + mapper: { + required: true, + serializedName: "virtualMachineId", + type: { + name: "String" + } + } +}; +export const vmGroupId: msRest.OperationURLParameter = { + parameterPath: "vmGroupId", + mapper: { + required: true, + serializedName: "vmGroupId", + type: { + name: "String" + } + } +}; diff --git a/sdk/avs/arm-avs/src/models/privateCloudsMappers.ts b/sdk/avs/arm-avs/src/models/privateCloudsMappers.ts index edfebca08ab4..4d28dbae9f81 100644 --- a/sdk/avs/arm-avs/src/models/privateCloudsMappers.ts +++ b/sdk/avs/arm-avs/src/models/privateCloudsMappers.ts @@ -1,29 +1,63 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { + discriminators, + Addon, + AddonHcxProperties, + AddonProperties, + AddonSrmProperties, + AddonVrProperties, AdminCredentials, BaseResource, Circuit, CloudError, + CloudLink, Cluster, - ClusterUpdateProperties, + CommonClusterProperties, + Datastore, + DiskPoolVolume, Endpoints, ErrorAdditionalInfo, ErrorResponse, ExpressRouteAuthorization, + GlobalReachConnection, HcxEnterpriseSite, IdentitySource, ManagementCluster, + NetAppVolume, PrivateCloud, PrivateCloudList, PrivateCloudUpdate, + ProxyResource, + PSCredentialExecutionParameter, Resource, + ScriptCmdlet, + ScriptExecution, + ScriptExecutionParameter, + ScriptPackage, + ScriptParameter, + ScriptSecureStringExecutionParameter, + ScriptStringExecutionParameter, Sku, - TrackedResource + TrackedResource, + WorkloadNetworkDhcp, + WorkloadNetworkDhcpEntity, + WorkloadNetworkDhcpRelay, + WorkloadNetworkDhcpServer, + WorkloadNetworkDnsService, + WorkloadNetworkDnsZone, + WorkloadNetworkGateway, + WorkloadNetworkPortMirroring, + WorkloadNetworkPublicIP, + WorkloadNetworkSegment, + WorkloadNetworkSegmentPortVif, + WorkloadNetworkSegmentSubnet, + WorkloadNetworkVirtualMachine, + WorkloadNetworkVMGroup } from "../models/mappers"; diff --git a/sdk/avs/arm-avs/src/models/scriptCmdletsMappers.ts b/sdk/avs/arm-avs/src/models/scriptCmdletsMappers.ts new file mode 100644 index 000000000000..2943c74d4ddc --- /dev/null +++ b/sdk/avs/arm-avs/src/models/scriptCmdletsMappers.ts @@ -0,0 +1,61 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + Addon, + AddonHcxProperties, + AddonProperties, + AddonSrmProperties, + AddonVrProperties, + BaseResource, + Circuit, + CloudError, + CloudLink, + Cluster, + CommonClusterProperties, + Datastore, + DiskPoolVolume, + Endpoints, + ErrorAdditionalInfo, + ErrorResponse, + ExpressRouteAuthorization, + GlobalReachConnection, + HcxEnterpriseSite, + IdentitySource, + ManagementCluster, + NetAppVolume, + PrivateCloud, + ProxyResource, + PSCredentialExecutionParameter, + Resource, + ScriptCmdlet, + ScriptCmdletsList, + ScriptExecution, + ScriptExecutionParameter, + ScriptPackage, + ScriptParameter, + ScriptSecureStringExecutionParameter, + ScriptStringExecutionParameter, + Sku, + TrackedResource, + WorkloadNetworkDhcp, + WorkloadNetworkDhcpEntity, + WorkloadNetworkDhcpRelay, + WorkloadNetworkDhcpServer, + WorkloadNetworkDnsService, + WorkloadNetworkDnsZone, + WorkloadNetworkGateway, + WorkloadNetworkPortMirroring, + WorkloadNetworkPublicIP, + WorkloadNetworkSegment, + WorkloadNetworkSegmentPortVif, + WorkloadNetworkSegmentSubnet, + WorkloadNetworkVirtualMachine, + WorkloadNetworkVMGroup +} from "../models/mappers"; diff --git a/sdk/avs/arm-avs/src/models/scriptExecutionsMappers.ts b/sdk/avs/arm-avs/src/models/scriptExecutionsMappers.ts new file mode 100644 index 000000000000..7aff1c90f446 --- /dev/null +++ b/sdk/avs/arm-avs/src/models/scriptExecutionsMappers.ts @@ -0,0 +1,61 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + Addon, + AddonHcxProperties, + AddonProperties, + AddonSrmProperties, + AddonVrProperties, + BaseResource, + Circuit, + CloudError, + CloudLink, + Cluster, + CommonClusterProperties, + Datastore, + DiskPoolVolume, + Endpoints, + ErrorAdditionalInfo, + ErrorResponse, + ExpressRouteAuthorization, + GlobalReachConnection, + HcxEnterpriseSite, + IdentitySource, + ManagementCluster, + NetAppVolume, + PrivateCloud, + ProxyResource, + PSCredentialExecutionParameter, + Resource, + ScriptCmdlet, + ScriptExecution, + ScriptExecutionParameter, + ScriptExecutionsList, + ScriptPackage, + ScriptParameter, + ScriptSecureStringExecutionParameter, + ScriptStringExecutionParameter, + Sku, + TrackedResource, + WorkloadNetworkDhcp, + WorkloadNetworkDhcpEntity, + WorkloadNetworkDhcpRelay, + WorkloadNetworkDhcpServer, + WorkloadNetworkDnsService, + WorkloadNetworkDnsZone, + WorkloadNetworkGateway, + WorkloadNetworkPortMirroring, + WorkloadNetworkPublicIP, + WorkloadNetworkSegment, + WorkloadNetworkSegmentPortVif, + WorkloadNetworkSegmentSubnet, + WorkloadNetworkVirtualMachine, + WorkloadNetworkVMGroup +} from "../models/mappers"; diff --git a/sdk/avs/arm-avs/src/models/scriptPackagesMappers.ts b/sdk/avs/arm-avs/src/models/scriptPackagesMappers.ts new file mode 100644 index 000000000000..89ed471cebd5 --- /dev/null +++ b/sdk/avs/arm-avs/src/models/scriptPackagesMappers.ts @@ -0,0 +1,61 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + Addon, + AddonHcxProperties, + AddonProperties, + AddonSrmProperties, + AddonVrProperties, + BaseResource, + Circuit, + CloudError, + CloudLink, + Cluster, + CommonClusterProperties, + Datastore, + DiskPoolVolume, + Endpoints, + ErrorAdditionalInfo, + ErrorResponse, + ExpressRouteAuthorization, + GlobalReachConnection, + HcxEnterpriseSite, + IdentitySource, + ManagementCluster, + NetAppVolume, + PrivateCloud, + ProxyResource, + PSCredentialExecutionParameter, + Resource, + ScriptCmdlet, + ScriptExecution, + ScriptExecutionParameter, + ScriptPackage, + ScriptPackagesList, + ScriptParameter, + ScriptSecureStringExecutionParameter, + ScriptStringExecutionParameter, + Sku, + TrackedResource, + WorkloadNetworkDhcp, + WorkloadNetworkDhcpEntity, + WorkloadNetworkDhcpRelay, + WorkloadNetworkDhcpServer, + WorkloadNetworkDnsService, + WorkloadNetworkDnsZone, + WorkloadNetworkGateway, + WorkloadNetworkPortMirroring, + WorkloadNetworkPublicIP, + WorkloadNetworkSegment, + WorkloadNetworkSegmentPortVif, + WorkloadNetworkSegmentSubnet, + WorkloadNetworkVirtualMachine, + WorkloadNetworkVMGroup +} from "../models/mappers"; diff --git a/sdk/avs/arm-avs/src/models/workloadNetworksMappers.ts b/sdk/avs/arm-avs/src/models/workloadNetworksMappers.ts new file mode 100644 index 000000000000..5a85a4df625a --- /dev/null +++ b/sdk/avs/arm-avs/src/models/workloadNetworksMappers.ts @@ -0,0 +1,69 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + Addon, + AddonHcxProperties, + AddonProperties, + AddonSrmProperties, + AddonVrProperties, + BaseResource, + Circuit, + CloudError, + CloudLink, + Cluster, + CommonClusterProperties, + Datastore, + DiskPoolVolume, + Endpoints, + ErrorAdditionalInfo, + ErrorResponse, + ExpressRouteAuthorization, + GlobalReachConnection, + HcxEnterpriseSite, + IdentitySource, + ManagementCluster, + NetAppVolume, + PrivateCloud, + ProxyResource, + PSCredentialExecutionParameter, + Resource, + ScriptCmdlet, + ScriptExecution, + ScriptExecutionParameter, + ScriptPackage, + ScriptParameter, + ScriptSecureStringExecutionParameter, + ScriptStringExecutionParameter, + Sku, + TrackedResource, + WorkloadNetworkDhcp, + WorkloadNetworkDhcpEntity, + WorkloadNetworkDhcpList, + WorkloadNetworkDhcpRelay, + WorkloadNetworkDhcpServer, + WorkloadNetworkDnsService, + WorkloadNetworkDnsServicesList, + WorkloadNetworkDnsZone, + WorkloadNetworkDnsZonesList, + WorkloadNetworkGateway, + WorkloadNetworkGatewayList, + WorkloadNetworkPortMirroring, + WorkloadNetworkPortMirroringList, + WorkloadNetworkPublicIP, + WorkloadNetworkPublicIPsList, + WorkloadNetworkSegment, + WorkloadNetworkSegmentPortVif, + WorkloadNetworkSegmentsList, + WorkloadNetworkSegmentSubnet, + WorkloadNetworkVirtualMachine, + WorkloadNetworkVirtualMachinesList, + WorkloadNetworkVMGroup, + WorkloadNetworkVMGroupsList +} from "../models/mappers"; diff --git a/sdk/avs/arm-avs/src/operations/addons.ts b/sdk/avs/arm-avs/src/operations/addons.ts new file mode 100644 index 000000000000..f1e204b403b1 --- /dev/null +++ b/sdk/avs/arm-avs/src/operations/addons.ts @@ -0,0 +1,334 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/addonsMappers"; +import * as Parameters from "../models/parameters"; +import { AvsClientContext } from "../avsClientContext"; + +/** Class representing a Addons. */ +export class Addons { + private readonly client: AvsClientContext; + + /** + * Create a Addons. + * @param {AvsClientContext} client Reference to the service client. + */ + constructor(client: AvsClientContext) { + this.client = client; + } + + /** + * @summary List addons in a private cloud + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, privateCloudName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param callback The callback + */ + list(resourceGroupName: string, privateCloudName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, privateCloudName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, privateCloudName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + privateCloudName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * @summary Get an addon by name in a private cloud + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param addonName Name of the addon for the private cloud + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, privateCloudName: string, addonName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param addonName Name of the addon for the private cloud + * @param callback The callback + */ + get(resourceGroupName: string, privateCloudName: string, addonName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param addonName Name of the addon for the private cloud + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, privateCloudName: string, addonName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, privateCloudName: string, addonName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + privateCloudName, + addonName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * @summary Create or update a addon in a private cloud + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName The name of the private cloud. + * @param addonName Name of the addon for the private cloud + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, privateCloudName: string, addonName: string, options?: Models.AddonsCreateOrUpdateOptionalParams): Promise { + return this.beginCreateOrUpdate(resourceGroupName,privateCloudName,addonName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * @summary Delete a addon in a private cloud + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param addonName Name of the addon for the private cloud + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, privateCloudName: string, addonName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,privateCloudName,addonName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * @summary Create or update a addon in a private cloud + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName The name of the private cloud. + * @param addonName Name of the addon for the private cloud + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, privateCloudName: string, addonName: string, options?: Models.AddonsBeginCreateOrUpdateOptionalParams): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + privateCloudName, + addonName, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * @summary Delete a addon in a private cloud + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param addonName Name of the addon for the private cloud + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, privateCloudName: string, addonName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + privateCloudName, + addonName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * @summary List addons in a private cloud + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AddonList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons/{addonName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName, + Parameters.addonName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Addon + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons/{addonName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName, + Parameters.addonName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: { + properties: [ + "options", + "properties" + ] + }, + mapper: { + ...Mappers.Addon, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.Addon + }, + 201: { + bodyMapper: Mappers.Addon + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons/{addonName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName, + Parameters.addonName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AddonList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/avs/arm-avs/src/operations/authorizations.ts b/sdk/avs/arm-avs/src/operations/authorizations.ts index 6111185333ad..a1b4337f2904 100644 --- a/sdk/avs/arm-avs/src/operations/authorizations.ts +++ b/sdk/avs/arm-avs/src/operations/authorizations.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -100,12 +99,11 @@ export class Authorizations { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName The name of the private cloud. * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud - * @param authorization An ExpressRoute Circuit Authorization * @param [options] The optional parameters * @returns Promise */ - createOrUpdate(resourceGroupName: string, privateCloudName: string, authorizationName: string, authorization: any, options?: msRest.RequestOptionsBase): Promise { - return this.beginCreateOrUpdate(resourceGroupName,privateCloudName,authorizationName,authorization,options) + createOrUpdate(resourceGroupName: string, privateCloudName: string, authorizationName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(resourceGroupName,privateCloudName,authorizationName,options) .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } @@ -127,17 +125,15 @@ export class Authorizations { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName The name of the private cloud. * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud - * @param authorization An ExpressRoute Circuit Authorization * @param [options] The optional parameters * @returns Promise */ - beginCreateOrUpdate(resourceGroupName: string, privateCloudName: string, authorizationName: string, authorization: any, options?: msRest.RequestOptionsBase): Promise { + beginCreateOrUpdate(resourceGroupName: string, privateCloudName: string, authorizationName: string, options?: msRest.RequestOptionsBase): Promise { return this.client.sendLRORequest( { resourceGroupName, privateCloudName, authorizationName, - authorization, options }, beginCreateOrUpdateOperationSpec, @@ -264,11 +260,8 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { requestBody: { parameterPath: "authorization", mapper: { - required: true, - serializedName: "authorization", - type: { - name: "Object" - } + ...Mappers.ExpressRouteAuthorization, + required: true } }, responses: { @@ -318,6 +311,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/avs/arm-avs/src/operations/cloudLinks.ts b/sdk/avs/arm-avs/src/operations/cloudLinks.ts new file mode 100644 index 000000000000..5460d5f876b9 --- /dev/null +++ b/sdk/avs/arm-avs/src/operations/cloudLinks.ts @@ -0,0 +1,334 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/cloudLinksMappers"; +import * as Parameters from "../models/parameters"; +import { AvsClientContext } from "../avsClientContext"; + +/** Class representing a CloudLinks. */ +export class CloudLinks { + private readonly client: AvsClientContext; + + /** + * Create a CloudLinks. + * @param {AvsClientContext} client Reference to the service client. + */ + constructor(client: AvsClientContext) { + this.client = client; + } + + /** + * @summary List cloud link in a private cloud + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, privateCloudName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param callback The callback + */ + list(resourceGroupName: string, privateCloudName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, privateCloudName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, privateCloudName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + privateCloudName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * @summary Get an cloud link by name in a private cloud + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param cloudLinkName Name of the cloud link resource + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, privateCloudName: string, cloudLinkName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param cloudLinkName Name of the cloud link resource + * @param callback The callback + */ + get(resourceGroupName: string, privateCloudName: string, cloudLinkName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param cloudLinkName Name of the cloud link resource + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, privateCloudName: string, cloudLinkName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, privateCloudName: string, cloudLinkName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + privateCloudName, + cloudLinkName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * @summary Create or update a cloud link in a private cloud + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName The name of the private cloud. + * @param cloudLinkName Name of the cloud link resource + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, privateCloudName: string, cloudLinkName: string, options?: Models.CloudLinksCreateOrUpdateOptionalParams): Promise { + return this.beginCreateOrUpdate(resourceGroupName,privateCloudName,cloudLinkName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * @summary Delete a cloud link in a private cloud + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param cloudLinkName Name of the cloud link resource + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, privateCloudName: string, cloudLinkName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,privateCloudName,cloudLinkName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * @summary Create or update a cloud link in a private cloud + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName The name of the private cloud. + * @param cloudLinkName Name of the cloud link resource + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, privateCloudName: string, cloudLinkName: string, options?: Models.CloudLinksBeginCreateOrUpdateOptionalParams): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + privateCloudName, + cloudLinkName, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * @summary Delete a cloud link in a private cloud + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param cloudLinkName Name of the cloud link resource + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, privateCloudName: string, cloudLinkName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + privateCloudName, + cloudLinkName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * @summary List cloud link in a private cloud + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.CloudLinkList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks/{cloudLinkName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName, + Parameters.cloudLinkName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.CloudLink + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks/{cloudLinkName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName, + Parameters.cloudLinkName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: { + linkedCloud: [ + "options", + "linkedCloud" + ] + }, + mapper: { + ...Mappers.CloudLink, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.CloudLink + }, + 201: { + bodyMapper: Mappers.CloudLink + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks/{cloudLinkName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName, + Parameters.cloudLinkName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.CloudLinkList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/avs/arm-avs/src/operations/clusters.ts b/sdk/avs/arm-avs/src/operations/clusters.ts index 2c005ebadd1c..300a524a845c 100644 --- a/sdk/avs/arm-avs/src/operations/clusters.ts +++ b/sdk/avs/arm-avs/src/operations/clusters.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -389,6 +388,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/avs/arm-avs/src/operations/datastores.ts b/sdk/avs/arm-avs/src/operations/datastores.ts new file mode 100644 index 000000000000..b9fb66bb0b93 --- /dev/null +++ b/sdk/avs/arm-avs/src/operations/datastores.ts @@ -0,0 +1,350 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/datastoresMappers"; +import * as Parameters from "../models/parameters"; +import { AvsClientContext } from "../avsClientContext"; + +/** Class representing a Datastores. */ +export class Datastores { + private readonly client: AvsClientContext; + + /** + * Create a Datastores. + * @param {AvsClientContext} client Reference to the service client. + */ + constructor(client: AvsClientContext) { + this.client = client; + } + + /** + * @summary List datastores in a private cloud cluster + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, privateCloudName: string, clusterName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @param callback The callback + */ + list(resourceGroupName: string, privateCloudName: string, clusterName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, privateCloudName: string, clusterName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, privateCloudName: string, clusterName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + privateCloudName, + clusterName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * @summary Get a datastore in a private cloud cluster + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @param datastoreName Name of the datastore in the private cloud cluster + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, privateCloudName: string, clusterName: string, datastoreName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @param datastoreName Name of the datastore in the private cloud cluster + * @param callback The callback + */ + get(resourceGroupName: string, privateCloudName: string, clusterName: string, datastoreName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @param datastoreName Name of the datastore in the private cloud cluster + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, privateCloudName: string, clusterName: string, datastoreName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, privateCloudName: string, clusterName: string, datastoreName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + privateCloudName, + clusterName, + datastoreName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * @summary Create or update a datastore in a private cloud cluster + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @param datastoreName Name of the datastore in the private cloud cluster + * @param datastore A datastore in a private cloud cluster + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, privateCloudName: string, clusterName: string, datastoreName: string, datastore: Models.Datastore, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(resourceGroupName,privateCloudName,clusterName,datastoreName,datastore,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * @summary Delete a datastore in a private cloud cluster + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @param datastoreName Name of the datastore in the private cloud cluster + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, privateCloudName: string, clusterName: string, datastoreName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,privateCloudName,clusterName,datastoreName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * @summary Create or update a datastore in a private cloud cluster + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @param datastoreName Name of the datastore in the private cloud cluster + * @param datastore A datastore in a private cloud cluster + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, privateCloudName: string, clusterName: string, datastoreName: string, datastore: Models.Datastore, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + privateCloudName, + clusterName, + datastoreName, + datastore, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * @summary Delete a datastore in a private cloud cluster + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @param datastoreName Name of the datastore in the private cloud cluster + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, privateCloudName: string, clusterName: string, datastoreName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + privateCloudName, + clusterName, + datastoreName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * @summary List datastores in a private cloud cluster + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName, + Parameters.clusterName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DatastoreList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores/{datastoreName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName, + Parameters.clusterName, + Parameters.datastoreName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Datastore + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores/{datastoreName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName, + Parameters.clusterName, + Parameters.datastoreName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "datastore", + mapper: { + ...Mappers.Datastore, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.Datastore + }, + 201: { + bodyMapper: Mappers.Datastore + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores/{datastoreName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName, + Parameters.clusterName, + Parameters.datastoreName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DatastoreList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/avs/arm-avs/src/operations/globalReachConnections.ts b/sdk/avs/arm-avs/src/operations/globalReachConnections.ts new file mode 100644 index 000000000000..19aab04b254a --- /dev/null +++ b/sdk/avs/arm-avs/src/operations/globalReachConnections.ts @@ -0,0 +1,332 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/globalReachConnectionsMappers"; +import * as Parameters from "../models/parameters"; +import { AvsClientContext } from "../avsClientContext"; + +/** Class representing a GlobalReachConnections. */ +export class GlobalReachConnections { + private readonly client: AvsClientContext; + + /** + * Create a GlobalReachConnections. + * @param {AvsClientContext} client Reference to the service client. + */ + constructor(client: AvsClientContext) { + this.client = client; + } + + /** + * @summary List global reach connections in a private cloud + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, privateCloudName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param callback The callback + */ + list(resourceGroupName: string, privateCloudName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, privateCloudName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, privateCloudName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + privateCloudName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * @summary Get a global reach connection by name in a private cloud + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param globalReachConnectionName Name of the global reach connection in the private cloud + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, privateCloudName: string, globalReachConnectionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param globalReachConnectionName Name of the global reach connection in the private cloud + * @param callback The callback + */ + get(resourceGroupName: string, privateCloudName: string, globalReachConnectionName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param globalReachConnectionName Name of the global reach connection in the private cloud + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, privateCloudName: string, globalReachConnectionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, privateCloudName: string, globalReachConnectionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + privateCloudName, + globalReachConnectionName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * @summary Create or update a global reach connection in a private cloud + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName The name of the private cloud. + * @param globalReachConnectionName Name of the global reach connection in the private cloud + * @param globalReachConnection A global reach connection in the private cloud + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, privateCloudName: string, globalReachConnectionName: string, globalReachConnection: Models.GlobalReachConnection, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(resourceGroupName,privateCloudName,globalReachConnectionName,globalReachConnection,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * @summary Delete a global reach connection in a private cloud + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param globalReachConnectionName Name of the global reach connection in the private cloud + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, privateCloudName: string, globalReachConnectionName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,privateCloudName,globalReachConnectionName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * @summary Create or update a global reach connection in a private cloud + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName The name of the private cloud. + * @param globalReachConnectionName Name of the global reach connection in the private cloud + * @param globalReachConnection A global reach connection in the private cloud + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, privateCloudName: string, globalReachConnectionName: string, globalReachConnection: Models.GlobalReachConnection, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + privateCloudName, + globalReachConnectionName, + globalReachConnection, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * @summary Delete a global reach connection in a private cloud + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param globalReachConnectionName Name of the global reach connection in the private cloud + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, privateCloudName: string, globalReachConnectionName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + privateCloudName, + globalReachConnectionName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * @summary List global reach connections in a private cloud + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.GlobalReachConnectionList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections/{globalReachConnectionName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName, + Parameters.globalReachConnectionName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.GlobalReachConnection + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections/{globalReachConnectionName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName, + Parameters.globalReachConnectionName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "globalReachConnection", + mapper: { + ...Mappers.GlobalReachConnection, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.GlobalReachConnection + }, + 201: { + bodyMapper: Mappers.GlobalReachConnection + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections/{globalReachConnectionName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName, + Parameters.globalReachConnectionName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.GlobalReachConnectionList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/avs/arm-avs/src/operations/hcxEnterpriseSites.ts b/sdk/avs/arm-avs/src/operations/hcxEnterpriseSites.ts index ed9205e69420..6872ad97df76 100644 --- a/sdk/avs/arm-avs/src/operations/hcxEnterpriseSites.ts +++ b/sdk/avs/arm-avs/src/operations/hcxEnterpriseSites.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -99,35 +98,31 @@ export class HcxEnterpriseSites { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName The name of the private cloud. * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud - * @param hcxEnterpriseSite The HCX Enterprise Site * @param [options] The optional parameters * @returns Promise */ - createOrUpdate(resourceGroupName: string, privateCloudName: string, hcxEnterpriseSiteName: string, hcxEnterpriseSite: any, options?: msRest.RequestOptionsBase): Promise; + createOrUpdate(resourceGroupName: string, privateCloudName: string, hcxEnterpriseSiteName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName The name of the private cloud. * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud - * @param hcxEnterpriseSite The HCX Enterprise Site * @param callback The callback */ - createOrUpdate(resourceGroupName: string, privateCloudName: string, hcxEnterpriseSiteName: string, hcxEnterpriseSite: any, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, privateCloudName: string, hcxEnterpriseSiteName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName The name of the private cloud. * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud - * @param hcxEnterpriseSite The HCX Enterprise Site * @param options The optional parameters * @param callback The callback */ - createOrUpdate(resourceGroupName: string, privateCloudName: string, hcxEnterpriseSiteName: string, hcxEnterpriseSite: any, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - createOrUpdate(resourceGroupName: string, privateCloudName: string, hcxEnterpriseSiteName: string, hcxEnterpriseSite: any, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + createOrUpdate(resourceGroupName: string, privateCloudName: string, hcxEnterpriseSiteName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, privateCloudName: string, hcxEnterpriseSiteName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, privateCloudName, hcxEnterpriseSiteName, - hcxEnterpriseSite, options }, createOrUpdateOperationSpec, @@ -270,11 +265,8 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { requestBody: { parameterPath: "hcxEnterpriseSite", mapper: { - required: true, - serializedName: "hcxEnterpriseSite", - type: { - name: "Object" - } + ...Mappers.HcxEnterpriseSite, + required: true } }, responses: { @@ -323,6 +315,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/avs/arm-avs/src/operations/index.ts b/sdk/avs/arm-avs/src/operations/index.ts index 41167f64dfff..0e75ff3ae113 100644 --- a/sdk/avs/arm-avs/src/operations/index.ts +++ b/sdk/avs/arm-avs/src/operations/index.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -12,5 +11,13 @@ export * from "./operations"; export * from "./locations"; export * from "./privateClouds"; export * from "./clusters"; +export * from "./datastores"; export * from "./hcxEnterpriseSites"; export * from "./authorizations"; +export * from "./globalReachConnections"; +export * from "./workloadNetworks"; +export * from "./cloudLinks"; +export * from "./addons"; +export * from "./scriptPackages"; +export * from "./scriptCmdlets"; +export * from "./scriptExecutions"; diff --git a/sdk/avs/arm-avs/src/operations/locations.ts b/sdk/avs/arm-avs/src/operations/locations.ts index 7ff1fa9c7351..0ad6b1f865c4 100644 --- a/sdk/avs/arm-avs/src/operations/locations.ts +++ b/sdk/avs/arm-avs/src/operations/locations.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is diff --git a/sdk/avs/arm-avs/src/operations/operations.ts b/sdk/avs/arm-avs/src/operations/operations.ts index af15d66d1a93..b06ec348fd51 100644 --- a/sdk/avs/arm-avs/src/operations/operations.ts +++ b/sdk/avs/arm-avs/src/operations/operations.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -108,6 +107,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/avs/arm-avs/src/operations/privateClouds.ts b/sdk/avs/arm-avs/src/operations/privateClouds.ts index eebc9d8ac564..80341dad85db 100644 --- a/sdk/avs/arm-avs/src/operations/privateClouds.ts +++ b/sdk/avs/arm-avs/src/operations/privateClouds.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -149,6 +148,30 @@ export class PrivateClouds { .then(lroPoller => lroPoller.pollUntilFinished()); } + /** + * @summary Rotate the vCenter password + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param [options] The optional parameters + * @returns Promise + */ + rotateVcenterPassword(resourceGroupName: string, privateCloudName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginRotateVcenterPassword(resourceGroupName,privateCloudName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * @summary Rotate the NSX-T Manager password + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param [options] The optional parameters + * @returns Promise + */ + rotateNsxtPassword(resourceGroupName: string, privateCloudName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginRotateNsxtPassword(resourceGroupName,privateCloudName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + /** * @summary List the admin credentials for the private cloud * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -239,6 +262,42 @@ export class PrivateClouds { options); } + /** + * @summary Rotate the vCenter password + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param [options] The optional parameters + * @returns Promise + */ + beginRotateVcenterPassword(resourceGroupName: string, privateCloudName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + privateCloudName, + options + }, + beginRotateVcenterPasswordOperationSpec, + options); + } + + /** + * @summary Rotate the NSX-T Manager password + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param [options] The optional parameters + * @returns Promise + */ + beginRotateNsxtPassword(resourceGroupName: string, privateCloudName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + privateCloudName, + options + }, + beginRotateNsxtPasswordOperationSpec, + options); + } + /** * @summary List private clouds in a resource group * @param nextPageLink The NextLink from the previous successful call to List operation. @@ -490,6 +549,54 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { serializer }; +const beginRotateVcenterPasswordOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/rotateVcenterPassword", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginRotateNsxtPasswordOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/rotateNsxtPassword", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + const listNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", @@ -497,6 +604,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], @@ -518,6 +628,9 @@ const listInSubscriptionNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/avs/arm-avs/src/operations/scriptCmdlets.ts b/sdk/avs/arm-avs/src/operations/scriptCmdlets.ts new file mode 100644 index 000000000000..00250ba63797 --- /dev/null +++ b/sdk/avs/arm-avs/src/operations/scriptCmdlets.ts @@ -0,0 +1,215 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/scriptCmdletsMappers"; +import * as Parameters from "../models/parameters"; +import { AvsClientContext } from "../avsClientContext"; + +/** Class representing a ScriptCmdlets. */ +export class ScriptCmdlets { + private readonly client: AvsClientContext; + + /** + * Create a ScriptCmdlets. + * @param {AvsClientContext} client Reference to the service client. + */ + constructor(client: AvsClientContext) { + this.client = client; + } + + /** + * Return script cmdlet resources available for a private cloud to create a script execution + * resource on their Private Cloud + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param scriptPackageName Name of the script package in the private cloud + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, privateCloudName: string, scriptPackageName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param scriptPackageName Name of the script package in the private cloud + * @param callback The callback + */ + list(resourceGroupName: string, privateCloudName: string, scriptPackageName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param scriptPackageName Name of the script package in the private cloud + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, privateCloudName: string, scriptPackageName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, privateCloudName: string, scriptPackageName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + privateCloudName, + scriptPackageName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Return information about a script cmdlet resource in a specific package on a private cloud + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param scriptPackageName Name of the script package in the private cloud + * @param scriptCmdletName Name of the script cmdlet resource in the script package in the private + * cloud + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, privateCloudName: string, scriptPackageName: string, scriptCmdletName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param scriptPackageName Name of the script package in the private cloud + * @param scriptCmdletName Name of the script cmdlet resource in the script package in the private + * cloud + * @param callback The callback + */ + get(resourceGroupName: string, privateCloudName: string, scriptPackageName: string, scriptCmdletName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param scriptPackageName Name of the script package in the private cloud + * @param scriptCmdletName Name of the script cmdlet resource in the script package in the private + * cloud + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, privateCloudName: string, scriptPackageName: string, scriptCmdletName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, privateCloudName: string, scriptPackageName: string, scriptCmdletName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + privateCloudName, + scriptPackageName, + scriptCmdletName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Return script cmdlet resources available for a private cloud to create a script execution + * resource on their Private Cloud + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptPackages/{scriptPackageName}/scriptCmdlets", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName, + Parameters.scriptPackageName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ScriptCmdletsList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptPackages/{scriptPackageName}/scriptCmdlets/{scriptCmdletName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName, + Parameters.scriptPackageName, + Parameters.scriptCmdletName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ScriptCmdlet + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ScriptCmdletsList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/avs/arm-avs/src/operations/scriptExecutions.ts b/sdk/avs/arm-avs/src/operations/scriptExecutions.ts new file mode 100644 index 000000000000..5ceca22b6fed --- /dev/null +++ b/sdk/avs/arm-avs/src/operations/scriptExecutions.ts @@ -0,0 +1,411 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/scriptExecutionsMappers"; +import * as Parameters from "../models/parameters"; +import { AvsClientContext } from "../avsClientContext"; + +/** Class representing a ScriptExecutions. */ +export class ScriptExecutions { + private readonly client: AvsClientContext; + + /** + * Create a ScriptExecutions. + * @param {AvsClientContext} client Reference to the service client. + */ + constructor(client: AvsClientContext) { + this.client = client; + } + + /** + * @summary Get an script execution resource by name in a private cloud + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, privateCloudName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param callback The callback + */ + list(resourceGroupName: string, privateCloudName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, privateCloudName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, privateCloudName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + privateCloudName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * @summary Get an script execution resource by name in a private cloud + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param scriptExecutionName Name of the user-invoked script execution resource + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, privateCloudName: string, scriptExecutionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param scriptExecutionName Name of the user-invoked script execution resource + * @param callback The callback + */ + get(resourceGroupName: string, privateCloudName: string, scriptExecutionName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param scriptExecutionName Name of the user-invoked script execution resource + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, privateCloudName: string, scriptExecutionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, privateCloudName: string, scriptExecutionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + privateCloudName, + scriptExecutionName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * @summary Create or update a script execution resource in a private cloud + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName The name of the private cloud. + * @param scriptExecutionName Name of the user-invoked script execution resource + * @param scriptExecution A script running in the private cloud + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, privateCloudName: string, scriptExecutionName: string, scriptExecution: Models.ScriptExecution, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(resourceGroupName,privateCloudName,scriptExecutionName,scriptExecution,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * @summary Cancel a ScriptExecution in a private cloud + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param scriptExecutionName Name of the user-invoked script execution resource + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, privateCloudName: string, scriptExecutionName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,privateCloudName,scriptExecutionName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Return the logs for a script execution resource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param scriptExecutionName Name of the user-invoked script execution resource + * @param [options] The optional parameters + * @returns Promise + */ + getExecutionLogs(resourceGroupName: string, privateCloudName: string, scriptExecutionName: string, options?: Models.ScriptExecutionsGetExecutionLogsOptionalParams): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param scriptExecutionName Name of the user-invoked script execution resource + * @param callback The callback + */ + getExecutionLogs(resourceGroupName: string, privateCloudName: string, scriptExecutionName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param scriptExecutionName Name of the user-invoked script execution resource + * @param options The optional parameters + * @param callback The callback + */ + getExecutionLogs(resourceGroupName: string, privateCloudName: string, scriptExecutionName: string, options: Models.ScriptExecutionsGetExecutionLogsOptionalParams, callback: msRest.ServiceCallback): void; + getExecutionLogs(resourceGroupName: string, privateCloudName: string, scriptExecutionName: string, options?: Models.ScriptExecutionsGetExecutionLogsOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + privateCloudName, + scriptExecutionName, + options + }, + getExecutionLogsOperationSpec, + callback) as Promise; + } + + /** + * @summary Create or update a script execution resource in a private cloud + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName The name of the private cloud. + * @param scriptExecutionName Name of the user-invoked script execution resource + * @param scriptExecution A script running in the private cloud + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, privateCloudName: string, scriptExecutionName: string, scriptExecution: Models.ScriptExecution, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + privateCloudName, + scriptExecutionName, + scriptExecution, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * @summary Cancel a ScriptExecution in a private cloud + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param scriptExecutionName Name of the user-invoked script execution resource + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, privateCloudName: string, scriptExecutionName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + privateCloudName, + scriptExecutionName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * @summary Get an script execution resource by name in a private cloud + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ScriptExecutionsList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName, + Parameters.scriptExecutionName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ScriptExecution + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getExecutionLogsOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}/getExecutionLogs", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName, + Parameters.scriptExecutionName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: [ + "options", + "scriptOutputStreamType" + ], + mapper: { + serializedName: "scriptOutputStreamType", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + }, + responses: { + 200: { + bodyMapper: Mappers.ScriptExecution + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName, + Parameters.scriptExecutionName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "scriptExecution", + mapper: { + ...Mappers.ScriptExecution, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ScriptExecution + }, + 201: { + bodyMapper: Mappers.ScriptExecution + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName, + Parameters.scriptExecutionName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ScriptExecutionsList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/avs/arm-avs/src/operations/scriptPackages.ts b/sdk/avs/arm-avs/src/operations/scriptPackages.ts new file mode 100644 index 000000000000..9dec8dd568ee --- /dev/null +++ b/sdk/avs/arm-avs/src/operations/scriptPackages.ts @@ -0,0 +1,200 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/scriptPackagesMappers"; +import * as Parameters from "../models/parameters"; +import { AvsClientContext } from "../avsClientContext"; + +/** Class representing a ScriptPackages. */ +export class ScriptPackages { + private readonly client: AvsClientContext; + + /** + * Create a ScriptPackages. + * @param {AvsClientContext} client Reference to the service client. + */ + constructor(client: AvsClientContext) { + this.client = client; + } + + /** + * Return script packages available for a private cloud to run on their Private Cloud + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, privateCloudName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param callback The callback + */ + list(resourceGroupName: string, privateCloudName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, privateCloudName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, privateCloudName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + privateCloudName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Return script package available to run on an Private Cloud + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param scriptPackageName Name of the script package in the private cloud + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, privateCloudName: string, scriptPackageName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param scriptPackageName Name of the script package in the private cloud + * @param callback The callback + */ + get(resourceGroupName: string, privateCloudName: string, scriptPackageName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param scriptPackageName Name of the script package in the private cloud + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, privateCloudName: string, scriptPackageName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, privateCloudName: string, scriptPackageName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + privateCloudName, + scriptPackageName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Return script packages available for a private cloud to run on their Private Cloud + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptPackages", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ScriptPackagesList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptPackages/{scriptPackageName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName, + Parameters.scriptPackageName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ScriptPackage + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ScriptPackagesList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/avs/arm-avs/src/operations/workloadNetworks.ts b/sdk/avs/arm-avs/src/operations/workloadNetworks.ts new file mode 100644 index 000000000000..42bea81cd6cc --- /dev/null +++ b/sdk/avs/arm-avs/src/operations/workloadNetworks.ts @@ -0,0 +1,2935 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/workloadNetworksMappers"; +import * as Parameters from "../models/parameters"; +import { AvsClientContext } from "../avsClientContext"; + +/** Class representing a WorkloadNetworks. */ +export class WorkloadNetworks { + private readonly client: AvsClientContext; + + /** + * Create a WorkloadNetworks. + * @param {AvsClientContext} client Reference to the service client. + */ + constructor(client: AvsClientContext) { + this.client = client; + } + + /** + * @summary List of segments in a private cloud workload network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param [options] The optional parameters + * @returns Promise + */ + listSegments(resourceGroupName: string, privateCloudName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param callback The callback + */ + listSegments(resourceGroupName: string, privateCloudName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param options The optional parameters + * @param callback The callback + */ + listSegments(resourceGroupName: string, privateCloudName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listSegments(resourceGroupName: string, privateCloudName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + privateCloudName, + options + }, + listSegmentsOperationSpec, + callback) as Promise; + } + + /** + * @summary Get a segment by id in a private cloud workload network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name + * @param [options] The optional parameters + * @returns Promise + */ + getSegment(resourceGroupName: string, privateCloudName: string, segmentId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name + * @param callback The callback + */ + getSegment(resourceGroupName: string, privateCloudName: string, segmentId: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name + * @param options The optional parameters + * @param callback The callback + */ + getSegment(resourceGroupName: string, privateCloudName: string, segmentId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getSegment(resourceGroupName: string, privateCloudName: string, segmentId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + privateCloudName, + segmentId, + options + }, + getSegmentOperationSpec, + callback) as Promise; + } + + /** + * @summary Create a segment by id in a private cloud workload network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name + * @param workloadNetworkSegment NSX Segment + * @param [options] The optional parameters + * @returns Promise + */ + createSegments(resourceGroupName: string, privateCloudName: string, segmentId: string, workloadNetworkSegment: Models.WorkloadNetworkSegment, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateSegments(resourceGroupName,privateCloudName,segmentId,workloadNetworkSegment,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * @summary Create or update a segment by id in a private cloud workload network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name + * @param workloadNetworkSegment NSX Segment + * @param [options] The optional parameters + * @returns Promise + */ + updateSegments(resourceGroupName: string, privateCloudName: string, segmentId: string, workloadNetworkSegment: Models.WorkloadNetworkSegment, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpdateSegments(resourceGroupName,privateCloudName,segmentId,workloadNetworkSegment,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * @summary Delete a segment by id in a private cloud workload network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name + * @param [options] The optional parameters + * @returns Promise + */ + deleteSegment(resourceGroupName: string, privateCloudName: string, segmentId: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteSegment(resourceGroupName,privateCloudName,segmentId,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * @summary List dhcp in a private cloud workload network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param [options] The optional parameters + * @returns Promise + */ + listDhcp(resourceGroupName: string, privateCloudName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param callback The callback + */ + listDhcp(resourceGroupName: string, privateCloudName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param options The optional parameters + * @param callback The callback + */ + listDhcp(resourceGroupName: string, privateCloudName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listDhcp(resourceGroupName: string, privateCloudName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + privateCloudName, + options + }, + listDhcpOperationSpec, + callback) as Promise; + } + + /** + * @summary Get dhcp by id in a private cloud workload network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name + * @param privateCloudName Name of the private cloud + * @param [options] The optional parameters + * @returns Promise + */ + getDhcp(resourceGroupName: string, dhcpId: string, privateCloudName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name + * @param privateCloudName Name of the private cloud + * @param callback The callback + */ + getDhcp(resourceGroupName: string, dhcpId: string, privateCloudName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name + * @param privateCloudName Name of the private cloud + * @param options The optional parameters + * @param callback The callback + */ + getDhcp(resourceGroupName: string, dhcpId: string, privateCloudName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getDhcp(resourceGroupName: string, dhcpId: string, privateCloudName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + dhcpId, + privateCloudName, + options + }, + getDhcpOperationSpec, + callback) as Promise; + } + + /** + * @summary Create dhcp by id in a private cloud workload network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name + * @param [options] The optional parameters + * @returns Promise + */ + createDhcp(resourceGroupName: string, privateCloudName: string, dhcpId: string, options?: Models.WorkloadNetworksCreateDhcpOptionalParams): Promise { + return this.beginCreateDhcp(resourceGroupName,privateCloudName,dhcpId,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * @summary Create or update dhcp by id in a private cloud workload network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name + * @param [options] The optional parameters + * @returns Promise + */ + updateDhcp(resourceGroupName: string, privateCloudName: string, dhcpId: string, options?: Models.WorkloadNetworksUpdateDhcpOptionalParams): Promise { + return this.beginUpdateDhcp(resourceGroupName,privateCloudName,dhcpId,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * @summary Delete dhcp by id in a private cloud workload network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name + * @param [options] The optional parameters + * @returns Promise + */ + deleteDhcp(resourceGroupName: string, privateCloudName: string, dhcpId: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteDhcp(resourceGroupName,privateCloudName,dhcpId,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * @summary List of gateways in a private cloud workload network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param [options] The optional parameters + * @returns Promise + */ + listGateways(resourceGroupName: string, privateCloudName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param callback The callback + */ + listGateways(resourceGroupName: string, privateCloudName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param options The optional parameters + * @param callback The callback + */ + listGateways(resourceGroupName: string, privateCloudName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listGateways(resourceGroupName: string, privateCloudName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + privateCloudName, + options + }, + listGatewaysOperationSpec, + callback) as Promise; + } + + /** + * @summary Get a gateway by id in a private cloud workload network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param gatewayId NSX Gateway identifier. Generally the same as the Gateway's display name + * @param [options] The optional parameters + * @returns Promise + */ + getGateway(resourceGroupName: string, privateCloudName: string, gatewayId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param gatewayId NSX Gateway identifier. Generally the same as the Gateway's display name + * @param callback The callback + */ + getGateway(resourceGroupName: string, privateCloudName: string, gatewayId: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param gatewayId NSX Gateway identifier. Generally the same as the Gateway's display name + * @param options The optional parameters + * @param callback The callback + */ + getGateway(resourceGroupName: string, privateCloudName: string, gatewayId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getGateway(resourceGroupName: string, privateCloudName: string, gatewayId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + privateCloudName, + gatewayId, + options + }, + getGatewayOperationSpec, + callback) as Promise; + } + + /** + * @summary List of port mirroring profiles in a private cloud workload network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param [options] The optional parameters + * @returns Promise + */ + listPortMirroring(resourceGroupName: string, privateCloudName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param callback The callback + */ + listPortMirroring(resourceGroupName: string, privateCloudName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param options The optional parameters + * @param callback The callback + */ + listPortMirroring(resourceGroupName: string, privateCloudName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listPortMirroring(resourceGroupName: string, privateCloudName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + privateCloudName, + options + }, + listPortMirroringOperationSpec, + callback) as Promise; + } + + /** + * @summary Get a port mirroring profile by id in a private cloud workload network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring + * display name + * @param [options] The optional parameters + * @returns Promise + */ + getPortMirroring(resourceGroupName: string, privateCloudName: string, portMirroringId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring + * display name + * @param callback The callback + */ + getPortMirroring(resourceGroupName: string, privateCloudName: string, portMirroringId: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring + * display name + * @param options The optional parameters + * @param callback The callback + */ + getPortMirroring(resourceGroupName: string, privateCloudName: string, portMirroringId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getPortMirroring(resourceGroupName: string, privateCloudName: string, portMirroringId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + privateCloudName, + portMirroringId, + options + }, + getPortMirroringOperationSpec, + callback) as Promise; + } + + /** + * @summary Create a port mirroring profile by id in a private cloud workload network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring + * display name + * @param workloadNetworkPortMirroring NSX port mirroring + * @param [options] The optional parameters + * @returns Promise + */ + createPortMirroring(resourceGroupName: string, privateCloudName: string, portMirroringId: string, workloadNetworkPortMirroring: Models.WorkloadNetworkPortMirroring, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreatePortMirroring(resourceGroupName,privateCloudName,portMirroringId,workloadNetworkPortMirroring,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * @summary Create or update a port mirroring profile by id in a private cloud workload network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring + * display name + * @param workloadNetworkPortMirroring NSX port mirroring + * @param [options] The optional parameters + * @returns Promise + */ + updatePortMirroring(resourceGroupName: string, privateCloudName: string, portMirroringId: string, workloadNetworkPortMirroring: Models.WorkloadNetworkPortMirroring, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpdatePortMirroring(resourceGroupName,privateCloudName,portMirroringId,workloadNetworkPortMirroring,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * @summary Delete a port mirroring profile by id in a private cloud workload network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring + * display name + * @param privateCloudName Name of the private cloud + * @param [options] The optional parameters + * @returns Promise + */ + deletePortMirroring(resourceGroupName: string, portMirroringId: string, privateCloudName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeletePortMirroring(resourceGroupName,portMirroringId,privateCloudName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * @summary List of vm groups in a private cloud workload network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param [options] The optional parameters + * @returns Promise + */ + listVMGroups(resourceGroupName: string, privateCloudName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param callback The callback + */ + listVMGroups(resourceGroupName: string, privateCloudName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param options The optional parameters + * @param callback The callback + */ + listVMGroups(resourceGroupName: string, privateCloudName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listVMGroups(resourceGroupName: string, privateCloudName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + privateCloudName, + options + }, + listVMGroupsOperationSpec, + callback) as Promise; + } + + /** + * @summary Get a vm group by id in a private cloud workload network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name + * @param [options] The optional parameters + * @returns Promise + */ + getVMGroup(resourceGroupName: string, privateCloudName: string, vmGroupId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name + * @param callback The callback + */ + getVMGroup(resourceGroupName: string, privateCloudName: string, vmGroupId: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name + * @param options The optional parameters + * @param callback The callback + */ + getVMGroup(resourceGroupName: string, privateCloudName: string, vmGroupId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getVMGroup(resourceGroupName: string, privateCloudName: string, vmGroupId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + privateCloudName, + vmGroupId, + options + }, + getVMGroupOperationSpec, + callback) as Promise; + } + + /** + * @summary Create a vm group by id in a private cloud workload network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name + * @param workloadNetworkVMGroup NSX VM Group + * @param [options] The optional parameters + * @returns Promise + */ + createVMGroup(resourceGroupName: string, privateCloudName: string, vmGroupId: string, workloadNetworkVMGroup: Models.WorkloadNetworkVMGroup, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateVMGroup(resourceGroupName,privateCloudName,vmGroupId,workloadNetworkVMGroup,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * @summary Create or update a vm group by id in a private cloud workload network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name + * @param workloadNetworkVMGroup NSX VM Group + * @param [options] The optional parameters + * @returns Promise + */ + updateVMGroup(resourceGroupName: string, privateCloudName: string, vmGroupId: string, workloadNetworkVMGroup: Models.WorkloadNetworkVMGroup, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpdateVMGroup(resourceGroupName,privateCloudName,vmGroupId,workloadNetworkVMGroup,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * @summary Delete a vm group by id in a private cloud workload network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name + * @param privateCloudName Name of the private cloud + * @param [options] The optional parameters + * @returns Promise + */ + deleteVMGroup(resourceGroupName: string, vmGroupId: string, privateCloudName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteVMGroup(resourceGroupName,vmGroupId,privateCloudName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * @summary List of virtual machines in a private cloud workload network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param [options] The optional parameters + * @returns Promise + */ + listVirtualMachines(resourceGroupName: string, privateCloudName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param callback The callback + */ + listVirtualMachines(resourceGroupName: string, privateCloudName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param options The optional parameters + * @param callback The callback + */ + listVirtualMachines(resourceGroupName: string, privateCloudName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listVirtualMachines(resourceGroupName: string, privateCloudName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + privateCloudName, + options + }, + listVirtualMachinesOperationSpec, + callback) as Promise; + } + + /** + * @summary Get a virtual machine by id in a private cloud workload network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param virtualMachineId Virtual Machine identifier + * @param [options] The optional parameters + * @returns Promise + */ + getVirtualMachine(resourceGroupName: string, privateCloudName: string, virtualMachineId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param virtualMachineId Virtual Machine identifier + * @param callback The callback + */ + getVirtualMachine(resourceGroupName: string, privateCloudName: string, virtualMachineId: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param virtualMachineId Virtual Machine identifier + * @param options The optional parameters + * @param callback The callback + */ + getVirtualMachine(resourceGroupName: string, privateCloudName: string, virtualMachineId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getVirtualMachine(resourceGroupName: string, privateCloudName: string, virtualMachineId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + privateCloudName, + virtualMachineId, + options + }, + getVirtualMachineOperationSpec, + callback) as Promise; + } + + /** + * @summary List of DNS services in a private cloud workload network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param [options] The optional parameters + * @returns Promise + */ + listDnsServices(resourceGroupName: string, privateCloudName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param callback The callback + */ + listDnsServices(resourceGroupName: string, privateCloudName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param options The optional parameters + * @param callback The callback + */ + listDnsServices(resourceGroupName: string, privateCloudName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listDnsServices(resourceGroupName: string, privateCloudName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + privateCloudName, + options + }, + listDnsServicesOperationSpec, + callback) as Promise; + } + + /** + * @summary Get a DNS service by id in a private cloud workload network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display + * name + * @param [options] The optional parameters + * @returns Promise + */ + getDnsService(resourceGroupName: string, privateCloudName: string, dnsServiceId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display + * name + * @param callback The callback + */ + getDnsService(resourceGroupName: string, privateCloudName: string, dnsServiceId: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display + * name + * @param options The optional parameters + * @param callback The callback + */ + getDnsService(resourceGroupName: string, privateCloudName: string, dnsServiceId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getDnsService(resourceGroupName: string, privateCloudName: string, dnsServiceId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + privateCloudName, + dnsServiceId, + options + }, + getDnsServiceOperationSpec, + callback) as Promise; + } + + /** + * @summary Create a DNS service by id in a private cloud workload network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display + * name + * @param workloadNetworkDnsService NSX DNS Service + * @param [options] The optional parameters + * @returns Promise + */ + createDnsService(resourceGroupName: string, privateCloudName: string, dnsServiceId: string, workloadNetworkDnsService: Models.WorkloadNetworkDnsService, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateDnsService(resourceGroupName,privateCloudName,dnsServiceId,workloadNetworkDnsService,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * @summary Create or update a DNS service by id in a private cloud workload network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display + * name + * @param workloadNetworkDnsService NSX DNS Service + * @param [options] The optional parameters + * @returns Promise + */ + updateDnsService(resourceGroupName: string, privateCloudName: string, dnsServiceId: string, workloadNetworkDnsService: Models.WorkloadNetworkDnsService, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpdateDnsService(resourceGroupName,privateCloudName,dnsServiceId,workloadNetworkDnsService,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * @summary Delete a DNS service by id in a private cloud workload network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display + * name + * @param privateCloudName Name of the private cloud + * @param [options] The optional parameters + * @returns Promise + */ + deleteDnsService(resourceGroupName: string, dnsServiceId: string, privateCloudName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteDnsService(resourceGroupName,dnsServiceId,privateCloudName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * @summary List of DNS zones in a private cloud workload network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param [options] The optional parameters + * @returns Promise + */ + listDnsZones(resourceGroupName: string, privateCloudName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param callback The callback + */ + listDnsZones(resourceGroupName: string, privateCloudName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param options The optional parameters + * @param callback The callback + */ + listDnsZones(resourceGroupName: string, privateCloudName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listDnsZones(resourceGroupName: string, privateCloudName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + privateCloudName, + options + }, + listDnsZonesOperationSpec, + callback) as Promise; + } + + /** + * @summary Get a DNS zone by id in a private cloud workload network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name + * @param [options] The optional parameters + * @returns Promise + */ + getDnsZone(resourceGroupName: string, privateCloudName: string, dnsZoneId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name + * @param callback The callback + */ + getDnsZone(resourceGroupName: string, privateCloudName: string, dnsZoneId: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name + * @param options The optional parameters + * @param callback The callback + */ + getDnsZone(resourceGroupName: string, privateCloudName: string, dnsZoneId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getDnsZone(resourceGroupName: string, privateCloudName: string, dnsZoneId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + privateCloudName, + dnsZoneId, + options + }, + getDnsZoneOperationSpec, + callback) as Promise; + } + + /** + * @summary Create a DNS zone by id in a private cloud workload network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name + * @param workloadNetworkDnsZone NSX DNS Zone + * @param [options] The optional parameters + * @returns Promise + */ + createDnsZone(resourceGroupName: string, privateCloudName: string, dnsZoneId: string, workloadNetworkDnsZone: Models.WorkloadNetworkDnsZone, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateDnsZone(resourceGroupName,privateCloudName,dnsZoneId,workloadNetworkDnsZone,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * @summary Create or update a DNS zone by id in a private cloud workload network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name + * @param workloadNetworkDnsZone NSX DNS Zone + * @param [options] The optional parameters + * @returns Promise + */ + updateDnsZone(resourceGroupName: string, privateCloudName: string, dnsZoneId: string, workloadNetworkDnsZone: Models.WorkloadNetworkDnsZone, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpdateDnsZone(resourceGroupName,privateCloudName,dnsZoneId,workloadNetworkDnsZone,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * @summary Delete a DNS zone by id in a private cloud workload network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name + * @param privateCloudName Name of the private cloud + * @param [options] The optional parameters + * @returns Promise + */ + deleteDnsZone(resourceGroupName: string, dnsZoneId: string, privateCloudName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteDnsZone(resourceGroupName,dnsZoneId,privateCloudName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * @summary List of Public IP Blocks in a private cloud workload network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param [options] The optional parameters + * @returns Promise + */ + listPublicIPs(resourceGroupName: string, privateCloudName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param callback The callback + */ + listPublicIPs(resourceGroupName: string, privateCloudName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param options The optional parameters + * @param callback The callback + */ + listPublicIPs(resourceGroupName: string, privateCloudName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listPublicIPs(resourceGroupName: string, privateCloudName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + privateCloudName, + options + }, + listPublicIPsOperationSpec, + callback) as Promise; + } + + /** + * @summary Get a Public IP Block by id in a private cloud workload network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param publicIPId NSX Public IP Block identifier. Generally the same as the Public IP Block's + * display name + * @param [options] The optional parameters + * @returns Promise + */ + getPublicIP(resourceGroupName: string, privateCloudName: string, publicIPId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param publicIPId NSX Public IP Block identifier. Generally the same as the Public IP Block's + * display name + * @param callback The callback + */ + getPublicIP(resourceGroupName: string, privateCloudName: string, publicIPId: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param publicIPId NSX Public IP Block identifier. Generally the same as the Public IP Block's + * display name + * @param options The optional parameters + * @param callback The callback + */ + getPublicIP(resourceGroupName: string, privateCloudName: string, publicIPId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getPublicIP(resourceGroupName: string, privateCloudName: string, publicIPId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + privateCloudName, + publicIPId, + options + }, + getPublicIPOperationSpec, + callback) as Promise; + } + + /** + * @summary Create a Public IP Block by id in a private cloud workload network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param publicIPId NSX Public IP Block identifier. Generally the same as the Public IP Block's + * display name + * @param workloadNetworkPublicIP NSX Public IP Block + * @param [options] The optional parameters + * @returns Promise + */ + createPublicIP(resourceGroupName: string, privateCloudName: string, publicIPId: string, workloadNetworkPublicIP: Models.WorkloadNetworkPublicIP, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreatePublicIP(resourceGroupName,privateCloudName,publicIPId,workloadNetworkPublicIP,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * @summary Delete a Public IP Block by id in a private cloud workload network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPId NSX Public IP Block identifier. Generally the same as the Public IP Block's + * display name + * @param privateCloudName Name of the private cloud + * @param [options] The optional parameters + * @returns Promise + */ + deletePublicIP(resourceGroupName: string, publicIPId: string, privateCloudName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeletePublicIP(resourceGroupName,publicIPId,privateCloudName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * @summary Create a segment by id in a private cloud workload network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name + * @param workloadNetworkSegment NSX Segment + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateSegments(resourceGroupName: string, privateCloudName: string, segmentId: string, workloadNetworkSegment: Models.WorkloadNetworkSegment, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + privateCloudName, + segmentId, + workloadNetworkSegment, + options + }, + beginCreateSegmentsOperationSpec, + options); + } + + /** + * @summary Create or update a segment by id in a private cloud workload network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name + * @param workloadNetworkSegment NSX Segment + * @param [options] The optional parameters + * @returns Promise + */ + beginUpdateSegments(resourceGroupName: string, privateCloudName: string, segmentId: string, workloadNetworkSegment: Models.WorkloadNetworkSegment, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + privateCloudName, + segmentId, + workloadNetworkSegment, + options + }, + beginUpdateSegmentsOperationSpec, + options); + } + + /** + * @summary Delete a segment by id in a private cloud workload network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteSegment(resourceGroupName: string, privateCloudName: string, segmentId: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + privateCloudName, + segmentId, + options + }, + beginDeleteSegmentOperationSpec, + options); + } + + /** + * @summary Create dhcp by id in a private cloud workload network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateDhcp(resourceGroupName: string, privateCloudName: string, dhcpId: string, options?: Models.WorkloadNetworksBeginCreateDhcpOptionalParams): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + privateCloudName, + dhcpId, + options + }, + beginCreateDhcpOperationSpec, + options); + } + + /** + * @summary Create or update dhcp by id in a private cloud workload network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name + * @param [options] The optional parameters + * @returns Promise + */ + beginUpdateDhcp(resourceGroupName: string, privateCloudName: string, dhcpId: string, options?: Models.WorkloadNetworksBeginUpdateDhcpOptionalParams): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + privateCloudName, + dhcpId, + options + }, + beginUpdateDhcpOperationSpec, + options); + } + + /** + * @summary Delete dhcp by id in a private cloud workload network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteDhcp(resourceGroupName: string, privateCloudName: string, dhcpId: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + privateCloudName, + dhcpId, + options + }, + beginDeleteDhcpOperationSpec, + options); + } + + /** + * @summary Create a port mirroring profile by id in a private cloud workload network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring + * display name + * @param workloadNetworkPortMirroring NSX port mirroring + * @param [options] The optional parameters + * @returns Promise + */ + beginCreatePortMirroring(resourceGroupName: string, privateCloudName: string, portMirroringId: string, workloadNetworkPortMirroring: Models.WorkloadNetworkPortMirroring, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + privateCloudName, + portMirroringId, + workloadNetworkPortMirroring, + options + }, + beginCreatePortMirroringOperationSpec, + options); + } + + /** + * @summary Create or update a port mirroring profile by id in a private cloud workload network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring + * display name + * @param workloadNetworkPortMirroring NSX port mirroring + * @param [options] The optional parameters + * @returns Promise + */ + beginUpdatePortMirroring(resourceGroupName: string, privateCloudName: string, portMirroringId: string, workloadNetworkPortMirroring: Models.WorkloadNetworkPortMirroring, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + privateCloudName, + portMirroringId, + workloadNetworkPortMirroring, + options + }, + beginUpdatePortMirroringOperationSpec, + options); + } + + /** + * @summary Delete a port mirroring profile by id in a private cloud workload network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring + * display name + * @param privateCloudName Name of the private cloud + * @param [options] The optional parameters + * @returns Promise + */ + beginDeletePortMirroring(resourceGroupName: string, portMirroringId: string, privateCloudName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + portMirroringId, + privateCloudName, + options + }, + beginDeletePortMirroringOperationSpec, + options); + } + + /** + * @summary Create a vm group by id in a private cloud workload network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name + * @param workloadNetworkVMGroup NSX VM Group + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateVMGroup(resourceGroupName: string, privateCloudName: string, vmGroupId: string, workloadNetworkVMGroup: Models.WorkloadNetworkVMGroup, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + privateCloudName, + vmGroupId, + workloadNetworkVMGroup, + options + }, + beginCreateVMGroupOperationSpec, + options); + } + + /** + * @summary Create or update a vm group by id in a private cloud workload network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name + * @param workloadNetworkVMGroup NSX VM Group + * @param [options] The optional parameters + * @returns Promise + */ + beginUpdateVMGroup(resourceGroupName: string, privateCloudName: string, vmGroupId: string, workloadNetworkVMGroup: Models.WorkloadNetworkVMGroup, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + privateCloudName, + vmGroupId, + workloadNetworkVMGroup, + options + }, + beginUpdateVMGroupOperationSpec, + options); + } + + /** + * @summary Delete a vm group by id in a private cloud workload network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name + * @param privateCloudName Name of the private cloud + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteVMGroup(resourceGroupName: string, vmGroupId: string, privateCloudName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + vmGroupId, + privateCloudName, + options + }, + beginDeleteVMGroupOperationSpec, + options); + } + + /** + * @summary Create a DNS service by id in a private cloud workload network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display + * name + * @param workloadNetworkDnsService NSX DNS Service + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateDnsService(resourceGroupName: string, privateCloudName: string, dnsServiceId: string, workloadNetworkDnsService: Models.WorkloadNetworkDnsService, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + privateCloudName, + dnsServiceId, + workloadNetworkDnsService, + options + }, + beginCreateDnsServiceOperationSpec, + options); + } + + /** + * @summary Create or update a DNS service by id in a private cloud workload network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display + * name + * @param workloadNetworkDnsService NSX DNS Service + * @param [options] The optional parameters + * @returns Promise + */ + beginUpdateDnsService(resourceGroupName: string, privateCloudName: string, dnsServiceId: string, workloadNetworkDnsService: Models.WorkloadNetworkDnsService, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + privateCloudName, + dnsServiceId, + workloadNetworkDnsService, + options + }, + beginUpdateDnsServiceOperationSpec, + options); + } + + /** + * @summary Delete a DNS service by id in a private cloud workload network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display + * name + * @param privateCloudName Name of the private cloud + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteDnsService(resourceGroupName: string, dnsServiceId: string, privateCloudName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + dnsServiceId, + privateCloudName, + options + }, + beginDeleteDnsServiceOperationSpec, + options); + } + + /** + * @summary Create a DNS zone by id in a private cloud workload network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name + * @param workloadNetworkDnsZone NSX DNS Zone + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateDnsZone(resourceGroupName: string, privateCloudName: string, dnsZoneId: string, workloadNetworkDnsZone: Models.WorkloadNetworkDnsZone, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + privateCloudName, + dnsZoneId, + workloadNetworkDnsZone, + options + }, + beginCreateDnsZoneOperationSpec, + options); + } + + /** + * @summary Create or update a DNS zone by id in a private cloud workload network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name + * @param workloadNetworkDnsZone NSX DNS Zone + * @param [options] The optional parameters + * @returns Promise + */ + beginUpdateDnsZone(resourceGroupName: string, privateCloudName: string, dnsZoneId: string, workloadNetworkDnsZone: Models.WorkloadNetworkDnsZone, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + privateCloudName, + dnsZoneId, + workloadNetworkDnsZone, + options + }, + beginUpdateDnsZoneOperationSpec, + options); + } + + /** + * @summary Delete a DNS zone by id in a private cloud workload network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name + * @param privateCloudName Name of the private cloud + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteDnsZone(resourceGroupName: string, dnsZoneId: string, privateCloudName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + dnsZoneId, + privateCloudName, + options + }, + beginDeleteDnsZoneOperationSpec, + options); + } + + /** + * @summary Create a Public IP Block by id in a private cloud workload network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param publicIPId NSX Public IP Block identifier. Generally the same as the Public IP Block's + * display name + * @param workloadNetworkPublicIP NSX Public IP Block + * @param [options] The optional parameters + * @returns Promise + */ + beginCreatePublicIP(resourceGroupName: string, privateCloudName: string, publicIPId: string, workloadNetworkPublicIP: Models.WorkloadNetworkPublicIP, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + privateCloudName, + publicIPId, + workloadNetworkPublicIP, + options + }, + beginCreatePublicIPOperationSpec, + options); + } + + /** + * @summary Delete a Public IP Block by id in a private cloud workload network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPId NSX Public IP Block identifier. Generally the same as the Public IP Block's + * display name + * @param privateCloudName Name of the private cloud + * @param [options] The optional parameters + * @returns Promise + */ + beginDeletePublicIP(resourceGroupName: string, publicIPId: string, privateCloudName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + publicIPId, + privateCloudName, + options + }, + beginDeletePublicIPOperationSpec, + options); + } + + /** + * @summary List of segments in a private cloud workload network. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listSegmentsNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listSegmentsNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listSegmentsNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listSegmentsNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listSegmentsNextOperationSpec, + callback) as Promise; + } + + /** + * @summary List dhcp in a private cloud workload network. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listDhcpNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listDhcpNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listDhcpNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listDhcpNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listDhcpNextOperationSpec, + callback) as Promise; + } + + /** + * @summary List of gateways in a private cloud workload network. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listGatewaysNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listGatewaysNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listGatewaysNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listGatewaysNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listGatewaysNextOperationSpec, + callback) as Promise; + } + + /** + * @summary List of port mirroring profiles in a private cloud workload network. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listPortMirroringNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listPortMirroringNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listPortMirroringNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listPortMirroringNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listPortMirroringNextOperationSpec, + callback) as Promise; + } + + /** + * @summary List of vm groups in a private cloud workload network. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listVMGroupsNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listVMGroupsNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listVMGroupsNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listVMGroupsNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listVMGroupsNextOperationSpec, + callback) as Promise; + } + + /** + * @summary List of virtual machines in a private cloud workload network. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listVirtualMachinesNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listVirtualMachinesNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listVirtualMachinesNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listVirtualMachinesNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listVirtualMachinesNextOperationSpec, + callback) as Promise; + } + + /** + * @summary List of DNS services in a private cloud workload network. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listDnsServicesNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listDnsServicesNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listDnsServicesNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listDnsServicesNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listDnsServicesNextOperationSpec, + callback) as Promise; + } + + /** + * @summary List of DNS zones in a private cloud workload network. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listDnsZonesNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listDnsZonesNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listDnsZonesNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listDnsZonesNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listDnsZonesNextOperationSpec, + callback) as Promise; + } + + /** + * @summary List of Public IP Blocks in a private cloud workload network. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listPublicIPsNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listPublicIPsNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listPublicIPsNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listPublicIPsNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listPublicIPsNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listSegmentsOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.WorkloadNetworkSegmentsList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getSegmentOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName, + Parameters.segmentId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.WorkloadNetworkSegment + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listDhcpOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.WorkloadNetworkDhcpList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getDhcpOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.dhcpId, + Parameters.privateCloudName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.WorkloadNetworkDhcp + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listGatewaysOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/gateways", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.WorkloadNetworkGatewayList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getGatewayOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/gateways/{gatewayId}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName, + Parameters.gatewayId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.WorkloadNetworkGateway + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listPortMirroringOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.WorkloadNetworkPortMirroringList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getPortMirroringOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName, + Parameters.portMirroringId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.WorkloadNetworkPortMirroring + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listVMGroupsOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.WorkloadNetworkVMGroupsList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getVMGroupOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName, + Parameters.vmGroupId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.WorkloadNetworkVMGroup + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listVirtualMachinesOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/virtualMachines", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.WorkloadNetworkVirtualMachinesList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getVirtualMachineOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/virtualMachines/{virtualMachineId}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName, + Parameters.virtualMachineId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.WorkloadNetworkVirtualMachine + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listDnsServicesOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.WorkloadNetworkDnsServicesList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getDnsServiceOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName, + Parameters.dnsServiceId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.WorkloadNetworkDnsService + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listDnsZonesOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.WorkloadNetworkDnsZonesList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getDnsZoneOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName, + Parameters.dnsZoneId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.WorkloadNetworkDnsZone + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listPublicIPsOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.WorkloadNetworkPublicIPsList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getPublicIPOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName, + Parameters.publicIPId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.WorkloadNetworkPublicIP + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateSegmentsOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName, + Parameters.segmentId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "workloadNetworkSegment", + mapper: { + ...Mappers.WorkloadNetworkSegment, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.WorkloadNetworkSegment + }, + 201: { + bodyMapper: Mappers.WorkloadNetworkSegment + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginUpdateSegmentsOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName, + Parameters.segmentId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "workloadNetworkSegment", + mapper: { + ...Mappers.WorkloadNetworkSegment, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.WorkloadNetworkSegment + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginDeleteSegmentOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName, + Parameters.segmentId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateDhcpOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName, + Parameters.dhcpId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: { + properties: [ + "options", + "properties" + ] + }, + mapper: { + ...Mappers.WorkloadNetworkDhcp, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.WorkloadNetworkDhcp + }, + 201: { + bodyMapper: Mappers.WorkloadNetworkDhcp + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginUpdateDhcpOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName, + Parameters.dhcpId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: { + properties: [ + "options", + "properties" + ] + }, + mapper: { + ...Mappers.WorkloadNetworkDhcp, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.WorkloadNetworkDhcp + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginDeleteDhcpOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName, + Parameters.dhcpId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreatePortMirroringOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName, + Parameters.portMirroringId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "workloadNetworkPortMirroring", + mapper: { + ...Mappers.WorkloadNetworkPortMirroring, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.WorkloadNetworkPortMirroring + }, + 201: { + bodyMapper: Mappers.WorkloadNetworkPortMirroring + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginUpdatePortMirroringOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName, + Parameters.portMirroringId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "workloadNetworkPortMirroring", + mapper: { + ...Mappers.WorkloadNetworkPortMirroring, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.WorkloadNetworkPortMirroring + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginDeletePortMirroringOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.portMirroringId, + Parameters.privateCloudName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateVMGroupOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName, + Parameters.vmGroupId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "workloadNetworkVMGroup", + mapper: { + ...Mappers.WorkloadNetworkVMGroup, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.WorkloadNetworkVMGroup + }, + 201: { + bodyMapper: Mappers.WorkloadNetworkVMGroup + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginUpdateVMGroupOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName, + Parameters.vmGroupId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "workloadNetworkVMGroup", + mapper: { + ...Mappers.WorkloadNetworkVMGroup, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.WorkloadNetworkVMGroup + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginDeleteVMGroupOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.vmGroupId, + Parameters.privateCloudName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateDnsServiceOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName, + Parameters.dnsServiceId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "workloadNetworkDnsService", + mapper: { + ...Mappers.WorkloadNetworkDnsService, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.WorkloadNetworkDnsService + }, + 201: { + bodyMapper: Mappers.WorkloadNetworkDnsService + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginUpdateDnsServiceOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName, + Parameters.dnsServiceId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "workloadNetworkDnsService", + mapper: { + ...Mappers.WorkloadNetworkDnsService, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.WorkloadNetworkDnsService + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginDeleteDnsServiceOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.dnsServiceId, + Parameters.privateCloudName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateDnsZoneOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName, + Parameters.dnsZoneId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "workloadNetworkDnsZone", + mapper: { + ...Mappers.WorkloadNetworkDnsZone, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.WorkloadNetworkDnsZone + }, + 201: { + bodyMapper: Mappers.WorkloadNetworkDnsZone + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginUpdateDnsZoneOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName, + Parameters.dnsZoneId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "workloadNetworkDnsZone", + mapper: { + ...Mappers.WorkloadNetworkDnsZone, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.WorkloadNetworkDnsZone + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginDeleteDnsZoneOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.dnsZoneId, + Parameters.privateCloudName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreatePublicIPOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName, + Parameters.publicIPId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "workloadNetworkPublicIP", + mapper: { + ...Mappers.WorkloadNetworkPublicIP, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.WorkloadNetworkPublicIP + }, + 201: { + bodyMapper: Mappers.WorkloadNetworkPublicIP + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginDeletePublicIPOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.publicIPId, + Parameters.privateCloudName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listSegmentsNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.WorkloadNetworkSegmentsList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listDhcpNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.WorkloadNetworkDhcpList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listGatewaysNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.WorkloadNetworkGatewayList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listPortMirroringNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.WorkloadNetworkPortMirroringList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listVMGroupsNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.WorkloadNetworkVMGroupsList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listVirtualMachinesNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.WorkloadNetworkVirtualMachinesList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listDnsServicesNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.WorkloadNetworkDnsServicesList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listDnsZonesNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.WorkloadNetworkDnsZonesList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listPublicIPsNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.WorkloadNetworkPublicIPsList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; From 18c9ac9ce52d9bf633344af0d2a853732e1fc8dc Mon Sep 17 00:00:00 2001 From: colawwj <70128817+colawwj@users.noreply.github.com> Date: Fri, 9 Jul 2021 15:02:49 +0800 Subject: [PATCH 17/28] arm-postgresql-flexible-release (#16307) --- .../arm-postgresql-flexible/package.json | 2 +- .../src/models/configurationsMappers.ts | 8 +- .../src/models/databasesMappers.ts | 8 +- .../src/models/firewallRulesMappers.ts | 8 +- .../src/models/index.ts | 460 ++++++++++++---- .../locationBasedCapabilitiesMappers.ts | 4 +- .../src/models/mappers.ts | 513 ++++++++++++++---- .../src/models/parameters.ts | 34 +- .../src/models/serversMappers.ts | 9 +- .../src/operations/checkNameAvailability.ts | 2 +- .../src/operations/configurations.ts | 78 ++- .../src/operations/databases.ts | 10 +- .../src/operations/firewallRules.ts | 10 +- .../src/operations/getPrivateDnsZoneSuffix.ts | 32 +- .../operations/locationBasedCapabilities.ts | 4 +- .../src/operations/operations.ts | 2 +- .../src/operations/servers.ts | 33 +- .../operations/virtualNetworkSubnetUsage.ts | 2 +- .../src/postgreSQLManagementClientContext.ts | 4 +- 19 files changed, 907 insertions(+), 316 deletions(-) diff --git a/sdk/postgresql/arm-postgresql-flexible/package.json b/sdk/postgresql/arm-postgresql-flexible/package.json index 0f5129a384a6..04750712d11c 100644 --- a/sdk/postgresql/arm-postgresql-flexible/package.json +++ b/sdk/postgresql/arm-postgresql-flexible/package.json @@ -2,7 +2,7 @@ "name": "@azure/arm-postgresql-flexible", "author": "Microsoft Corporation", "description": "PostgreSQLManagementClient Library with typescript type definitions for node.js and browser.", - "version": "2.0.0", + "version": "3.0.0", "dependencies": { "@azure/ms-rest-azure-js": "^2.1.0", "@azure/ms-rest-js": "^2.2.0", diff --git a/sdk/postgresql/arm-postgresql-flexible/src/models/configurationsMappers.ts b/sdk/postgresql/arm-postgresql-flexible/src/models/configurationsMappers.ts index acac8c76e960..e63c693ddc6d 100644 --- a/sdk/postgresql/arm-postgresql-flexible/src/models/configurationsMappers.ts +++ b/sdk/postgresql/arm-postgresql-flexible/src/models/configurationsMappers.ts @@ -8,6 +8,7 @@ export { AzureEntityResource, + Backup, BaseResource, CloudError, Configuration, @@ -16,8 +17,10 @@ export { ErrorAdditionalInfo, ErrorResponse, FirewallRule, + HighAvailability, Identity, MaintenanceWindow, + Network, Plan, ProxyResource, Resource, @@ -26,9 +29,8 @@ export { ResourceModelWithAllowedPropertySetPlan, ResourceModelWithAllowedPropertySetSku, Server, - ServerPropertiesDelegatedSubnetArguments, - ServerPropertiesPrivateDnsZoneArguments, Sku, - StorageProfile, + Storage, + SystemData, TrackedResource } from "../models/mappers"; diff --git a/sdk/postgresql/arm-postgresql-flexible/src/models/databasesMappers.ts b/sdk/postgresql/arm-postgresql-flexible/src/models/databasesMappers.ts index f519c40fac30..3ac50955c92d 100644 --- a/sdk/postgresql/arm-postgresql-flexible/src/models/databasesMappers.ts +++ b/sdk/postgresql/arm-postgresql-flexible/src/models/databasesMappers.ts @@ -8,6 +8,7 @@ export { AzureEntityResource, + Backup, BaseResource, CloudError, Configuration, @@ -16,8 +17,10 @@ export { ErrorAdditionalInfo, ErrorResponse, FirewallRule, + HighAvailability, Identity, MaintenanceWindow, + Network, Plan, ProxyResource, Resource, @@ -26,9 +29,8 @@ export { ResourceModelWithAllowedPropertySetPlan, ResourceModelWithAllowedPropertySetSku, Server, - ServerPropertiesDelegatedSubnetArguments, - ServerPropertiesPrivateDnsZoneArguments, Sku, - StorageProfile, + Storage, + SystemData, TrackedResource } from "../models/mappers"; diff --git a/sdk/postgresql/arm-postgresql-flexible/src/models/firewallRulesMappers.ts b/sdk/postgresql/arm-postgresql-flexible/src/models/firewallRulesMappers.ts index b60c3edd80c1..19d3f36b91aa 100644 --- a/sdk/postgresql/arm-postgresql-flexible/src/models/firewallRulesMappers.ts +++ b/sdk/postgresql/arm-postgresql-flexible/src/models/firewallRulesMappers.ts @@ -8,6 +8,7 @@ export { AzureEntityResource, + Backup, BaseResource, CloudError, Configuration, @@ -16,8 +17,10 @@ export { ErrorResponse, FirewallRule, FirewallRuleListResult, + HighAvailability, Identity, MaintenanceWindow, + Network, Plan, ProxyResource, Resource, @@ -26,9 +29,8 @@ export { ResourceModelWithAllowedPropertySetPlan, ResourceModelWithAllowedPropertySetSku, Server, - ServerPropertiesDelegatedSubnetArguments, - ServerPropertiesPrivateDnsZoneArguments, Sku, - StorageProfile, + Storage, + SystemData, TrackedResource } from "../models/mappers"; diff --git a/sdk/postgresql/arm-postgresql-flexible/src/models/index.ts b/sdk/postgresql/arm-postgresql-flexible/src/models/index.ts index f38a69ae811e..9ad7cffe0b82 100644 --- a/sdk/postgresql/arm-postgresql-flexible/src/models/index.ts +++ b/sdk/postgresql/arm-postgresql-flexible/src/models/index.ts @@ -66,6 +66,11 @@ export interface StorageMBCapability { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly storageSizeMB?: number; + /** + * The status + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly status?: string; } /** @@ -92,6 +97,11 @@ export interface VcoreCapability { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly supportedMemoryPerVcoreMB?: number; + /** + * The status + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly status?: string; } /** @@ -107,6 +117,11 @@ export interface ServerVersionCapability { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly supportedVcores?: VcoreCapability[]; + /** + * The status + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly status?: string; } /** @@ -122,25 +137,89 @@ export interface StorageEditionCapability { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly supportedStorageMB?: StorageMBCapability[]; + /** + * The status + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly status?: string; +} + +/** + * node type capability + */ +export interface NodeTypeCapability { + /** + * note type name + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * note type + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nodeType?: string; + /** + * The status + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly status?: string; +} + +/** + * Flexible server edition capabilities. + */ +export interface FlexibleServerEditionCapability { + /** + * Server edition name + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * The list of editions supported by this server edition. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly supportedStorageEditions?: StorageEditionCapability[]; + /** + * The list of server versions supported by this server edition. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly supportedServerVersions?: ServerVersionCapability[]; + /** + * The status + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly status?: string; } /** - * Server edition capabilities. + * Hyperscale node edition capabilities. */ -export interface ServerEditionCapability { +export interface HyperscaleNodeEditionCapability { /** * Server edition name * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; /** + * The list of editions supported by this server edition. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly supportedStorageEditions?: StorageEditionCapability[]; /** + * The list of server versions supported by this server edition. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly supportedServerVersions?: ServerVersionCapability[]; + /** + * The list of Node Types supported by this server edition. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly supportedNodeTypes?: NodeTypeCapability[]; + /** + * The status + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly status?: string; } /** @@ -153,65 +232,124 @@ export interface CapabilityProperties { */ readonly zone?: string; /** + * A value indicating whether a new server in this region can have geo-backups to paired region. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly geoBackupSupported?: boolean; + /** + * A value indicating whether a new server in this region can support multi zone HA. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly zoneRedundantHaSupported?: boolean; + /** + * A value indicating whether a new server in this region can have geo-backups to paired region. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly supportedFlexibleServerEditions?: ServerEditionCapability[]; + readonly zoneRedundantHaAndGeoBackupSupported?: boolean; + /** + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly supportedFlexibleServerEditions?: FlexibleServerEditionCapability[]; + /** + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly supportedHyperscaleNodeEditions?: HyperscaleNodeEditionCapability[]; + /** + * The status + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly status?: string; } /** - * Storage Profile properties of a server + * Storage properties of a server */ -export interface StorageProfile { +export interface Storage { + /** + * Max storage allowed for a server. + */ + storageSizeGB?: number; +} + +/** + * Backup properties of a server + */ +export interface Backup { /** * Backup retention days for the server. */ backupRetentionDays?: number; /** - * Max storage allowed for a server. + * A value indicating whether Geo-Redundant backup is enabled on the server. Possible values + * include: 'Enabled', 'Disabled' */ - storageMB?: number; + geoRedundantBackup?: GeoRedundantBackupEnum; + /** + * The earliest restore point time (ISO8601 format) for server. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly earliestRestoreDate?: Date; } /** - * Maintenance window of a server. + * Network properties of a server */ -export interface MaintenanceWindow { - /** - * indicates whether custom window is enabled or disabled - */ - customWindow?: string; +export interface Network { /** - * start hour for maintenance window + * public network access is enabled or not. Possible values include: 'Enabled', 'Disabled' + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - startHour?: number; + readonly publicNetworkAccess?: ServerPublicNetworkAccessState; /** - * start minute for maintenance window + * delegated subnet arm resource id. */ - startMinute?: number; + delegatedSubnetResourceId?: string; /** - * day of week for maintenance window + * private dns zone arm resource id. */ - dayOfWeek?: number; + privateDnsZoneArmResourceId?: string; } /** - * An interface representing ServerPropertiesDelegatedSubnetArguments. + * High availability properties of a server */ -export interface ServerPropertiesDelegatedSubnetArguments { +export interface HighAvailability { /** - * delegated subnet arm resource id. + * The HA mode for the server. Possible values include: 'Disabled', 'ZoneRedundant' */ - subnetArmResourceId?: string; + mode?: HighAvailabilityMode; + /** + * A state of a HA server that is visible to user. Possible values include: 'NotEnabled', + * 'CreatingStandby', 'ReplicatingData', 'FailingOver', 'Healthy', 'RemovingStandby' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly state?: ServerHAState; + /** + * availability zone information of the standby. + */ + standbyAvailabilityZone?: string; } /** - * An interface representing ServerPropertiesPrivateDnsZoneArguments. + * Maintenance window properties of a server. */ -export interface ServerPropertiesPrivateDnsZoneArguments { +export interface MaintenanceWindow { /** - * private dns zone arm resource id. + * indicates whether custom window is enabled or disabled */ - privateDnsZoneArmResourceId?: string; + customWindow?: string; + /** + * start hour for maintenance window + */ + startHour?: number; + /** + * start minute for maintenance window + */ + startMinute?: number; + /** + * day of week for maintenance window + */ + dayOfWeek?: number; } /** @@ -249,6 +387,38 @@ export interface Sku { tier: SkuTier; } +/** + * 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. Possible values include: 'User', + * 'Application', 'ManagedIdentity', 'Key' + */ + 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. Possible values include: 'User', + * 'Application', 'ManagedIdentity', 'Key' + */ + lastModifiedByType?: CreatedByType; + /** + * The timestamp of resource last modification (UTC) + */ + lastModifiedAt?: Date; +} + /** * Common fields that are returned in the response for all Azure Resource Manager resources * @summary Resource @@ -311,89 +481,73 @@ export interface Server extends TrackedResource { */ administratorLoginPassword?: string; /** - * PostgreSQL Server version. Possible values include: '12', '11' + * PostgreSQL Server version. Possible values include: '13', '12', '11' */ version?: ServerVersion; /** - * A state of a server that is visible to user. Possible values include: 'Ready', 'Dropping', - * 'Disabled', 'Starting', 'Stopping', 'Stopped', 'Updating' + * The minor version of the server. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly state?: ServerState; + readonly minorVersion?: string; /** - * A state of a HA server that is visible to user. Possible values include: 'NotEnabled', - * 'CreatingStandby', 'ReplicatingData', 'FailingOver', 'Healthy', 'RemovingStandby' + * A state of a server that is visible to user. Possible values include: 'Ready', 'Dropping', + * 'Disabled', 'Starting', 'Stopping', 'Stopped', 'Updating' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly haState?: ServerHAState; + readonly state?: ServerState; /** * The fully qualified domain name of a server. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly fullyQualifiedDomainName?: string; /** - * The display name of a server. + * Storage properties of a server. */ - displayName?: string; + storage?: Storage; /** - * Storage profile of a server. + * Backup properties of a server. */ - storageProfile?: StorageProfile; + backup?: Backup; /** - * public network access is enabled or not. Possible values include: 'Enabled', 'Disabled' - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Network properties of a server. */ - readonly publicNetworkAccess?: ServerPublicNetworkAccessState; + network?: Network; /** - * Maintenance window of a server. + * High availability properties of a server. */ - maintenanceWindow?: MaintenanceWindow; + highAvailability?: HighAvailability; /** - * stand by count value can be either enabled or disabled. Possible values include: 'Enabled', - * 'Disabled' + * Maintenance window properties of a server. */ - haEnabled?: HAEnabledEnum; - /** - * The source PostgreSQL server name to restore from. - */ - sourceServerName?: string; - /** - * The subscription id of source serve PostgreSQL server name to restore from. - */ - sourceSubscriptionId?: string; + maintenanceWindow?: MaintenanceWindow; /** - * The resource group name of source serve PostgreSQL server name to restore from. + * The source server resource ID to restore from. It's required when 'createMode' is + * 'PointInTimeRestore'. */ - sourceResourceGroupName?: string; + sourceServerResourceId?: string; /** - * Restore point creation time (ISO8601 format), specifying the time to restore from. + * Restore point creation time (ISO8601 format), specifying the time to restore from. It's + * required when 'createMode' is 'PointInTimeRestore'. */ pointInTimeUTC?: Date; /** - * availability Zone information of the server. + * availability zone information of the server. */ availabilityZone?: string; /** - * availability Zone information of the server. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly standbyAvailabilityZone?: string; - /** - * Status showing whether the data encryption is enabled with customer-managed keys. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly byokEnforcement?: string; - delegatedSubnetArguments?: ServerPropertiesDelegatedSubnetArguments; - privateDnsZoneArguments?: ServerPropertiesPrivateDnsZoneArguments; - /** - * The mode to create a new PostgreSQL server. Possible values include: 'Default', - * 'PointInTimeRestore' + * The mode to create a new PostgreSQL server. Possible values include: 'Default', 'Create', + * 'Update', 'PointInTimeRestore' */ createMode?: CreateMode; /** * Application-specific metadata in the form of key-value pairs. */ serverTags?: { [propertyName: string]: string }; + /** + * The system metadata relating to this resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly systemData?: SystemData; } /** @@ -413,18 +567,25 @@ export interface ServerForUpdate { */ administratorLoginPassword?: string; /** - * Storage profile of a server. + * Storage properties of a server. + */ + storage?: Storage; + /** + * Backup properties of a server. */ - storageProfile?: StorageProfile; + backup?: Backup; /** - * stand by count value can be either enabled or disabled. Possible values include: 'Enabled', - * 'Disabled' + * High availability properties of a server. */ - haEnabled?: HAEnabledEnum; + highAvailability?: HighAvailability; /** - * Maintenance window of a server. + * Maintenance window properties of a server. */ maintenanceWindow?: MaintenanceWindow; + /** + * The mode to update a new PostgreSQL server. Possible values include: 'Default', 'Update' + */ + createMode?: CreateModeForUpdate; /** * Application-specific metadata in the form of key-value pairs. */ @@ -451,6 +612,11 @@ export interface FirewallRule extends ProxyResource { * The end IP address of the server firewall rule. Must be IPv4 format. */ endIpAddress: string; + /** + * The system metadata relating to this resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly systemData?: SystemData; } /** @@ -486,6 +652,11 @@ export interface Configuration extends ProxyResource { * Source of the configuration. */ source?: string; + /** + * The system metadata relating to this resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly systemData?: SystemData; } /** @@ -596,6 +767,20 @@ export interface NameAvailability { type?: string; } +/** + * Represents server restart parameters. + */ +export interface RestartParameter { + /** + * Indicates whether to restart the server with failover. + */ + restartWithFailover?: boolean; + /** + * Failover mode. + */ + failoverMode?: string; +} + /** * The resource management error additional info. */ @@ -772,6 +957,31 @@ export interface Database extends ProxyResource { * The collation of the database. */ collation?: string; + /** + * The system metadata relating to this resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly systemData?: SystemData; +} + +/** + * Optional Parameters. + */ +export interface ServersRestartOptionalParams extends msRest.RequestOptionsBase { + /** + * The parameters for restarting a server. + */ + parameters?: RestartParameter; +} + +/** + * Optional Parameters. + */ +export interface ServersBeginRestartOptionalParams extends msRest.RequestOptionsBase { + /** + * The parameters for restarting a server. + */ + parameters?: RestartParameter; } /** @@ -844,11 +1054,11 @@ export interface DatabaseListResult extends Array { /** * Defines values for ServerVersion. - * Possible values include: '12', '11' + * Possible values include: '13', '12', '11' * @readonly * @enum {string} */ -export type ServerVersion = '12' | '11'; +export type ServerVersion = '13' | '12' | '11'; /** * Defines values for ServerState. @@ -860,13 +1070,12 @@ export type ServerVersion = '12' | '11'; export type ServerState = 'Ready' | 'Dropping' | 'Disabled' | 'Starting' | 'Stopping' | 'Stopped' | 'Updating'; /** - * Defines values for ServerHAState. - * Possible values include: 'NotEnabled', 'CreatingStandby', 'ReplicatingData', 'FailingOver', - * 'Healthy', 'RemovingStandby' + * Defines values for GeoRedundantBackupEnum. + * Possible values include: 'Enabled', 'Disabled' * @readonly * @enum {string} */ -export type ServerHAState = 'NotEnabled' | 'CreatingStandby' | 'ReplicatingData' | 'FailingOver' | 'Healthy' | 'RemovingStandby'; +export type GeoRedundantBackupEnum = 'Enabled' | 'Disabled'; /** * Defines values for ServerPublicNetworkAccessState. @@ -877,20 +1086,29 @@ export type ServerHAState = 'NotEnabled' | 'CreatingStandby' | 'ReplicatingData' export type ServerPublicNetworkAccessState = 'Enabled' | 'Disabled'; /** - * Defines values for HAEnabledEnum. - * Possible values include: 'Enabled', 'Disabled' + * Defines values for HighAvailabilityMode. + * Possible values include: 'Disabled', 'ZoneRedundant' * @readonly * @enum {string} */ -export type HAEnabledEnum = 'Enabled' | 'Disabled'; +export type HighAvailabilityMode = 'Disabled' | 'ZoneRedundant'; + +/** + * Defines values for ServerHAState. + * Possible values include: 'NotEnabled', 'CreatingStandby', 'ReplicatingData', 'FailingOver', + * 'Healthy', 'RemovingStandby' + * @readonly + * @enum {string} + */ +export type ServerHAState = 'NotEnabled' | 'CreatingStandby' | 'ReplicatingData' | 'FailingOver' | 'Healthy' | 'RemovingStandby'; /** * Defines values for CreateMode. - * Possible values include: 'Default', 'PointInTimeRestore' + * Possible values include: 'Default', 'Create', 'Update', 'PointInTimeRestore' * @readonly * @enum {string} */ -export type CreateMode = 'Default' | 'PointInTimeRestore'; +export type CreateMode = 'Default' | 'Create' | 'Update' | 'PointInTimeRestore'; /** * Defines values for ResourceIdentityType. @@ -908,6 +1126,22 @@ export type ResourceIdentityType = 'SystemAssigned'; */ export type SkuTier = 'Burstable' | 'GeneralPurpose' | 'MemoryOptimized'; +/** + * Defines values for CreatedByType. + * Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' + * @readonly + * @enum {string} + */ +export type CreatedByType = 'User' | 'Application' | 'ManagedIdentity' | 'Key'; + +/** + * Defines values for CreateModeForUpdate. + * Possible values include: 'Default', 'Update' + * @readonly + * @enum {string} + */ +export type CreateModeForUpdate = 'Default' | 'Update'; + /** * Defines values for ConfigurationDataType. * Possible values include: 'Boolean', 'Numeric', 'Integer', 'Enumeration' @@ -924,14 +1158,6 @@ export type ConfigurationDataType = 'Boolean' | 'Numeric' | 'Integer' | 'Enumera */ export type OperationOrigin = 'NotSpecified' | 'user' | 'system'; -/** - * Defines values for Body. - * Possible values include: 'PostgreSQL', 'PostgreSQLCitus', 'MySQL', 'MariaDb', 'Oracle' - * @readonly - * @enum {string} - */ -export type Body = 'PostgreSQL' | 'PostgreSQLCitus' | 'MySQL' | 'MariaDb' | 'Oracle'; - /** * Contains response data for the create operation. */ @@ -1272,6 +1498,26 @@ export type ConfigurationsUpdateResponse = Configuration & { }; }; +/** + * Contains response data for the put operation. + */ +export type ConfigurationsPutResponse = Configuration & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Configuration; + }; +}; + /** * Contains response data for the beginUpdate operation. */ @@ -1292,6 +1538,26 @@ export type ConfigurationsBeginUpdateResponse = Configuration & { }; }; +/** + * Contains response data for the beginPut operation. + */ +export type ConfigurationsBeginPutResponse = Configuration & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Configuration; + }; +}; + /** * Contains response data for the listByServerNext operation. */ diff --git a/sdk/postgresql/arm-postgresql-flexible/src/models/locationBasedCapabilitiesMappers.ts b/sdk/postgresql/arm-postgresql-flexible/src/models/locationBasedCapabilitiesMappers.ts index d8ca8f65034d..731cba513de0 100644 --- a/sdk/postgresql/arm-postgresql-flexible/src/models/locationBasedCapabilitiesMappers.ts +++ b/sdk/postgresql/arm-postgresql-flexible/src/models/locationBasedCapabilitiesMappers.ts @@ -12,7 +12,9 @@ export { CloudError, ErrorAdditionalInfo, ErrorResponse, - ServerEditionCapability, + FlexibleServerEditionCapability, + HyperscaleNodeEditionCapability, + NodeTypeCapability, ServerVersionCapability, StorageEditionCapability, StorageMBCapability, diff --git a/sdk/postgresql/arm-postgresql-flexible/src/models/mappers.ts b/sdk/postgresql/arm-postgresql-flexible/src/models/mappers.ts index 0f33f76e46ce..0069331612de 100644 --- a/sdk/postgresql/arm-postgresql-flexible/src/models/mappers.ts +++ b/sdk/postgresql/arm-postgresql-flexible/src/models/mappers.ts @@ -101,6 +101,13 @@ export const StorageMBCapability: msRest.CompositeMapper = { type: { name: "Number" } + }, + status: { + readOnly: true, + serializedName: "status", + type: { + name: "String" + } } } } @@ -139,6 +146,13 @@ export const VcoreCapability: msRest.CompositeMapper = { type: { name: "Number" } + }, + status: { + readOnly: true, + serializedName: "status", + type: { + name: "String" + } } } } @@ -169,6 +183,13 @@ export const ServerVersionCapability: msRest.CompositeMapper = { } } } + }, + status: { + readOnly: true, + serializedName: "status", + type: { + name: "String" + } } } } @@ -199,16 +220,54 @@ export const StorageEditionCapability: msRest.CompositeMapper = { } } } + }, + status: { + readOnly: true, + serializedName: "status", + type: { + name: "String" + } } } } }; -export const ServerEditionCapability: msRest.CompositeMapper = { - serializedName: "ServerEditionCapability", +export const NodeTypeCapability: msRest.CompositeMapper = { + serializedName: "NodeTypeCapability", type: { name: "Composite", - className: "ServerEditionCapability", + className: "NodeTypeCapability", + modelProperties: { + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + nodeType: { + readOnly: true, + serializedName: "nodeType", + type: { + name: "String" + } + }, + status: { + readOnly: true, + serializedName: "status", + type: { + name: "String" + } + } + } + } +}; + +export const FlexibleServerEditionCapability: msRest.CompositeMapper = { + serializedName: "FlexibleServerEditionCapability", + type: { + name: "Composite", + className: "FlexibleServerEditionCapability", modelProperties: { name: { readOnly: true, @@ -242,6 +301,76 @@ export const ServerEditionCapability: msRest.CompositeMapper = { } } } + }, + status: { + readOnly: true, + serializedName: "status", + type: { + name: "String" + } + } + } + } +}; + +export const HyperscaleNodeEditionCapability: msRest.CompositeMapper = { + serializedName: "HyperscaleNodeEditionCapability", + type: { + name: "Composite", + className: "HyperscaleNodeEditionCapability", + modelProperties: { + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + supportedStorageEditions: { + readOnly: true, + serializedName: "supportedStorageEditions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "StorageEditionCapability" + } + } + } + }, + supportedServerVersions: { + readOnly: true, + serializedName: "supportedServerVersions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ServerVersionCapability" + } + } + } + }, + supportedNodeTypes: { + readOnly: true, + serializedName: "supportedNodeTypes", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "NodeTypeCapability" + } + } + } + }, + status: { + readOnly: true, + serializedName: "status", + type: { + name: "String" + } } } } @@ -260,6 +389,27 @@ export const CapabilityProperties: msRest.CompositeMapper = { name: "String" } }, + geoBackupSupported: { + readOnly: true, + serializedName: "geoBackupSupported", + type: { + name: "Boolean" + } + }, + zoneRedundantHaSupported: { + readOnly: true, + serializedName: "zoneRedundantHaSupported", + type: { + name: "Boolean" + } + }, + zoneRedundantHaAndGeoBackupSupported: { + readOnly: true, + serializedName: "zoneRedundantHaAndGeoBackupSupported", + type: { + name: "Boolean" + } + }, supportedFlexibleServerEditions: { readOnly: true, serializedName: "supportedFlexibleServerEditions", @@ -268,20 +418,56 @@ export const CapabilityProperties: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "ServerEditionCapability" + className: "FlexibleServerEditionCapability" + } + } + } + }, + supportedHyperscaleNodeEditions: { + readOnly: true, + serializedName: "supportedHyperscaleNodeEditions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "HyperscaleNodeEditionCapability" } } } + }, + status: { + readOnly: true, + serializedName: "status", + type: { + name: "String" + } } } } }; -export const StorageProfile: msRest.CompositeMapper = { - serializedName: "StorageProfile", +export const Storage: msRest.CompositeMapper = { + serializedName: "Storage", type: { name: "Composite", - className: "StorageProfile", + className: "Storage", + modelProperties: { + storageSizeGB: { + serializedName: "storageSizeGB", + type: { + name: "Number" + } + } + } + } +}; + +export const Backup: msRest.CompositeMapper = { + serializedName: "Backup", + type: { + name: "Composite", + className: "Backup", modelProperties: { backupRetentionDays: { serializedName: "backupRetentionDays", @@ -289,58 +475,73 @@ export const StorageProfile: msRest.CompositeMapper = { name: "Number" } }, - storageMB: { - serializedName: "storageMB", + geoRedundantBackup: { + serializedName: "geoRedundantBackup", type: { - name: "Number" + name: "String" + } + }, + earliestRestoreDate: { + readOnly: true, + serializedName: "earliestRestoreDate", + type: { + name: "DateTime" } } } } }; -export const MaintenanceWindow: msRest.CompositeMapper = { - serializedName: "MaintenanceWindow", +export const Network: msRest.CompositeMapper = { + serializedName: "Network", type: { name: "Composite", - className: "MaintenanceWindow", + className: "Network", modelProperties: { - customWindow: { - serializedName: "customWindow", + publicNetworkAccess: { + readOnly: true, + serializedName: "publicNetworkAccess", type: { name: "String" } }, - startHour: { - serializedName: "startHour", - type: { - name: "Number" - } - }, - startMinute: { - serializedName: "startMinute", + delegatedSubnetResourceId: { + serializedName: "delegatedSubnetResourceId", type: { - name: "Number" + name: "String" } }, - dayOfWeek: { - serializedName: "dayOfWeek", + privateDnsZoneArmResourceId: { + serializedName: "privateDnsZoneArmResourceId", type: { - name: "Number" + name: "String" } } } } }; -export const ServerPropertiesDelegatedSubnetArguments: msRest.CompositeMapper = { - serializedName: "ServerProperties_delegatedSubnetArguments", +export const HighAvailability: msRest.CompositeMapper = { + serializedName: "HighAvailability", type: { name: "Composite", - className: "ServerPropertiesDelegatedSubnetArguments", + className: "HighAvailability", modelProperties: { - subnetArmResourceId: { - serializedName: "subnetArmResourceId", + mode: { + serializedName: "mode", + type: { + name: "String" + } + }, + state: { + readOnly: true, + serializedName: "state", + type: { + name: "String" + } + }, + standbyAvailabilityZone: { + serializedName: "standbyAvailabilityZone", type: { name: "String" } @@ -349,17 +550,35 @@ export const ServerPropertiesDelegatedSubnetArguments: msRest.CompositeMapper = } }; -export const ServerPropertiesPrivateDnsZoneArguments: msRest.CompositeMapper = { - serializedName: "ServerProperties_privateDnsZoneArguments", +export const MaintenanceWindow: msRest.CompositeMapper = { + serializedName: "MaintenanceWindow", type: { name: "Composite", - className: "ServerPropertiesPrivateDnsZoneArguments", + className: "MaintenanceWindow", modelProperties: { - privateDnsZoneArmResourceId: { - serializedName: "privateDnsZoneArmResourceId", + customWindow: { + serializedName: "customWindow", type: { name: "String" } + }, + startHour: { + serializedName: "startHour", + type: { + name: "Number" + } + }, + startMinute: { + serializedName: "startMinute", + type: { + name: "Number" + } + }, + dayOfWeek: { + serializedName: "dayOfWeek", + type: { + name: "Number" + } } } } @@ -422,6 +641,52 @@ export const Sku: msRest.CompositeMapper = { } }; +export const SystemData: msRest.CompositeMapper = { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData", + modelProperties: { + createdBy: { + serializedName: "createdBy", + type: { + name: "String" + } + }, + createdByType: { + serializedName: "createdByType", + type: { + name: "String" + } + }, + createdAt: { + serializedName: "createdAt", + type: { + name: "DateTime" + } + }, + lastModifiedBy: { + serializedName: "lastModifiedBy", + type: { + name: "String" + } + }, + lastModifiedByType: { + serializedName: "lastModifiedByType", + type: { + name: "String" + } + }, + lastModifiedAt: { + serializedName: "lastModifiedAt", + type: { + name: "DateTime" + } + } + } + } +}; + export const Resource: msRest.CompositeMapper = { serializedName: "Resource", type: { @@ -521,16 +786,16 @@ export const Server: msRest.CompositeMapper = { name: "String" } }, - state: { + minorVersion: { readOnly: true, - serializedName: "properties.state", + serializedName: "properties.minorVersion", type: { name: "String" } }, - haState: { + state: { readOnly: true, - serializedName: "properties.haState", + serializedName: "properties.state", type: { name: "String" } @@ -542,57 +807,43 @@ export const Server: msRest.CompositeMapper = { name: "String" } }, - displayName: { - serializedName: "properties.displayName", - type: { - name: "String" - } - }, - storageProfile: { - serializedName: "properties.storageProfile", + storage: { + serializedName: "properties.storage", type: { name: "Composite", - className: "StorageProfile" + className: "Storage" } }, - publicNetworkAccess: { - readOnly: true, - serializedName: "properties.publicNetworkAccess", - type: { - name: "String" - } - }, - maintenanceWindow: { - serializedName: "properties.maintenanceWindow", + backup: { + serializedName: "properties.backup", type: { name: "Composite", - className: "MaintenanceWindow" + className: "Backup" } }, - haEnabled: { - serializedName: "properties.haEnabled", + network: { + serializedName: "properties.network", type: { - name: "Enum", - allowedValues: [ - "Enabled", - "Disabled" - ] + name: "Composite", + className: "Network" } }, - sourceServerName: { - serializedName: "properties.sourceServerName", + highAvailability: { + serializedName: "properties.highAvailability", type: { - name: "String" + name: "Composite", + className: "HighAvailability" } }, - sourceSubscriptionId: { - serializedName: "properties.sourceSubscriptionId", + maintenanceWindow: { + serializedName: "properties.maintenanceWindow", type: { - name: "String" + name: "Composite", + className: "MaintenanceWindow" } }, - sourceResourceGroupName: { - serializedName: "properties.sourceResourceGroupName", + sourceServerResourceId: { + serializedName: "properties.sourceServerResourceId", type: { name: "String" } @@ -609,34 +860,6 @@ export const Server: msRest.CompositeMapper = { name: "String" } }, - standbyAvailabilityZone: { - readOnly: true, - serializedName: "properties.standbyAvailabilityZone", - type: { - name: "String" - } - }, - byokEnforcement: { - readOnly: true, - serializedName: "properties.byokEnforcement", - type: { - name: "String" - } - }, - delegatedSubnetArguments: { - serializedName: "properties.delegatedSubnetArguments", - type: { - name: "Composite", - className: "ServerPropertiesDelegatedSubnetArguments" - } - }, - privateDnsZoneArguments: { - serializedName: "properties.privateDnsZoneArguments", - type: { - name: "Composite", - className: "ServerPropertiesPrivateDnsZoneArguments" - } - }, createMode: { serializedName: "properties.createMode", type: { @@ -653,6 +876,14 @@ export const Server: msRest.CompositeMapper = { } } } + }, + systemData: { + readOnly: true, + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } } } } @@ -683,21 +914,25 @@ export const ServerForUpdate: msRest.CompositeMapper = { name: "String" } }, - storageProfile: { - serializedName: "properties.storageProfile", + storage: { + serializedName: "properties.storage", type: { name: "Composite", - className: "StorageProfile" + className: "Storage" } }, - haEnabled: { - serializedName: "properties.haEnabled", + backup: { + serializedName: "properties.backup", type: { - name: "Enum", - allowedValues: [ - "Enabled", - "Disabled" - ] + name: "Composite", + className: "Backup" + } + }, + highAvailability: { + serializedName: "properties.highAvailability", + type: { + name: "Composite", + className: "HighAvailability" } }, maintenanceWindow: { @@ -707,6 +942,12 @@ export const ServerForUpdate: msRest.CompositeMapper = { className: "MaintenanceWindow" } }, + createMode: { + serializedName: "properties.createMode", + type: { + name: "String" + } + }, tags: { serializedName: "tags", type: { @@ -759,6 +1000,14 @@ export const FirewallRule: msRest.CompositeMapper = { type: { name: "String" } + }, + systemData: { + readOnly: true, + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } } } } @@ -810,6 +1059,14 @@ export const Configuration: msRest.CompositeMapper = { type: { name: "String" } + }, + systemData: { + readOnly: true, + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } } } } @@ -988,6 +1245,28 @@ export const NameAvailability: msRest.CompositeMapper = { } }; +export const RestartParameter: msRest.CompositeMapper = { + serializedName: "RestartParameter", + type: { + name: "Composite", + className: "RestartParameter", + modelProperties: { + restartWithFailover: { + serializedName: "restartWithFailover", + type: { + name: "Boolean" + } + }, + failoverMode: { + serializedName: "failoverMode", + type: { + name: "String" + } + } + } + } +}; + export const ErrorAdditionalInfo: msRest.CompositeMapper = { serializedName: "ErrorAdditionalInfo", type: { @@ -1272,6 +1551,14 @@ export const Database: msRest.CompositeMapper = { type: { name: "String" } + }, + systemData: { + readOnly: true, + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } } } } diff --git a/sdk/postgresql/arm-postgresql-flexible/src/models/parameters.ts b/sdk/postgresql/arm-postgresql-flexible/src/models/parameters.ts index 57a1ec746a91..de9e3c42451a 100644 --- a/sdk/postgresql/arm-postgresql-flexible/src/models/parameters.ts +++ b/sdk/postgresql/arm-postgresql-flexible/src/models/parameters.ts @@ -19,43 +19,11 @@ export const acceptLanguage: msRest.OperationParameter = { } } }; -export const apiVersion0: msRest.OperationQueryParameter = { +export const apiVersion: msRest.OperationQueryParameter = { parameterPath: "apiVersion", mapper: { required: true, - isConstant: true, serializedName: "api-version", - defaultValue: '2020-02-14-preview', - constraints: { - MinLength: 1 - }, - type: { - name: "String" - } - } -}; -export const apiVersion1: msRest.OperationQueryParameter = { - parameterPath: "apiVersion", - mapper: { - required: true, - isConstant: true, - serializedName: "api-version", - defaultValue: '2020-11-05-preview', - constraints: { - MinLength: 1 - }, - type: { - name: "String" - } - } -}; -export const apiVersion2: msRest.OperationQueryParameter = { - parameterPath: "apiVersion", - mapper: { - required: true, - isConstant: true, - serializedName: "api-version", - defaultValue: '2021-03-31-privatepreview', constraints: { MinLength: 1 }, diff --git a/sdk/postgresql/arm-postgresql-flexible/src/models/serversMappers.ts b/sdk/postgresql/arm-postgresql-flexible/src/models/serversMappers.ts index 980b29e943e4..121df0cf53d1 100644 --- a/sdk/postgresql/arm-postgresql-flexible/src/models/serversMappers.ts +++ b/sdk/postgresql/arm-postgresql-flexible/src/models/serversMappers.ts @@ -8,6 +8,7 @@ export { AzureEntityResource, + Backup, BaseResource, CloudError, Configuration, @@ -15,8 +16,10 @@ export { ErrorAdditionalInfo, ErrorResponse, FirewallRule, + HighAvailability, Identity, MaintenanceWindow, + Network, Plan, ProxyResource, Resource, @@ -24,12 +27,12 @@ export { ResourceModelWithAllowedPropertySetIdentity, ResourceModelWithAllowedPropertySetPlan, ResourceModelWithAllowedPropertySetSku, + RestartParameter, Server, ServerForUpdate, ServerListResult, - ServerPropertiesDelegatedSubnetArguments, - ServerPropertiesPrivateDnsZoneArguments, Sku, - StorageProfile, + Storage, + SystemData, TrackedResource } from "../models/mappers"; diff --git a/sdk/postgresql/arm-postgresql-flexible/src/operations/checkNameAvailability.ts b/sdk/postgresql/arm-postgresql-flexible/src/operations/checkNameAvailability.ts index 8d21d47efba5..b91464de1da5 100644 --- a/sdk/postgresql/arm-postgresql-flexible/src/operations/checkNameAvailability.ts +++ b/sdk/postgresql/arm-postgresql-flexible/src/operations/checkNameAvailability.ts @@ -66,7 +66,7 @@ const executeOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/postgresql/arm-postgresql-flexible/src/operations/configurations.ts b/sdk/postgresql/arm-postgresql-flexible/src/operations/configurations.ts index b8464f046acb..3c43d0482b49 100644 --- a/sdk/postgresql/arm-postgresql-flexible/src/operations/configurations.ts +++ b/sdk/postgresql/arm-postgresql-flexible/src/operations/configurations.ts @@ -108,6 +108,20 @@ export class Configurations { .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } + /** + * Updates a configuration of a server. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param configurationName The name of the server configuration. + * @param parameters The required parameters for updating a server configuration. + * @param [options] The optional parameters + * @returns Promise + */ + put(resourceGroupName: string, serverName: string, configurationName: string, parameters: Models.Configuration, options?: msRest.RequestOptionsBase): Promise { + return this.beginPut(resourceGroupName,serverName,configurationName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + /** * Updates a configuration of a server. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -130,6 +144,28 @@ export class Configurations { options); } + /** + * Updates a configuration of a server. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param configurationName The name of the server configuration. + * @param parameters The required parameters for updating a server configuration. + * @param [options] The optional parameters + * @returns Promise + */ + beginPut(resourceGroupName: string, serverName: string, configurationName: string, parameters: Models.Configuration, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + configurationName, + parameters, + options + }, + beginPutOperationSpec, + options); + } + /** * List all the configurations in a given server. * @param nextPageLink The NextLink from the previous successful call to List operation. @@ -170,7 +206,7 @@ const listByServerOperationSpec: msRest.OperationSpec = { Parameters.serverName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage @@ -196,7 +232,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.configurationName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage @@ -222,7 +258,41 @@ const beginUpdateOperationSpec: msRest.OperationSpec = { Parameters.configurationName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.Configuration, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.Configuration + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginPutOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/flexibleServers/{serverName}/configurations/{configurationName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.configurationName + ], + queryParameters: [ + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage @@ -254,7 +324,7 @@ const listByServerNextOperationSpec: msRest.OperationSpec = { Parameters.nextPageLink ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/postgresql/arm-postgresql-flexible/src/operations/databases.ts b/sdk/postgresql/arm-postgresql-flexible/src/operations/databases.ts index 2ac841ead905..92c5fdc95bd9 100644 --- a/sdk/postgresql/arm-postgresql-flexible/src/operations/databases.ts +++ b/sdk/postgresql/arm-postgresql-flexible/src/operations/databases.ts @@ -204,7 +204,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.databaseName ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage @@ -229,7 +229,7 @@ const listByServerOperationSpec: msRest.OperationSpec = { Parameters.serverName ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage @@ -255,7 +255,7 @@ const beginCreateOperationSpec: msRest.OperationSpec = { Parameters.databaseName ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage @@ -292,7 +292,7 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { Parameters.databaseName ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage @@ -316,7 +316,7 @@ const listByServerNextOperationSpec: msRest.OperationSpec = { Parameters.nextPageLink ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/postgresql/arm-postgresql-flexible/src/operations/firewallRules.ts b/sdk/postgresql/arm-postgresql-flexible/src/operations/firewallRules.ts index c643e1f139a2..82417e785e5b 100644 --- a/sdk/postgresql/arm-postgresql-flexible/src/operations/firewallRules.ts +++ b/sdk/postgresql/arm-postgresql-flexible/src/operations/firewallRules.ts @@ -204,7 +204,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.firewallRuleName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage @@ -229,7 +229,7 @@ const listByServerOperationSpec: msRest.OperationSpec = { Parameters.serverName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage @@ -255,7 +255,7 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { Parameters.firewallRuleName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage @@ -292,7 +292,7 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { Parameters.firewallRuleName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage @@ -316,7 +316,7 @@ const listByServerNextOperationSpec: msRest.OperationSpec = { Parameters.nextPageLink ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/postgresql/arm-postgresql-flexible/src/operations/getPrivateDnsZoneSuffix.ts b/sdk/postgresql/arm-postgresql-flexible/src/operations/getPrivateDnsZoneSuffix.ts index 59a5549084b4..cf523a0e02fd 100644 --- a/sdk/postgresql/arm-postgresql-flexible/src/operations/getPrivateDnsZoneSuffix.ts +++ b/sdk/postgresql/arm-postgresql-flexible/src/operations/getPrivateDnsZoneSuffix.ts @@ -27,29 +27,22 @@ export class GetPrivateDnsZoneSuffix { /** * Get private DNS zone suffix in the cloud - * @param body The required parameters for getting private DNS zone suffix based on server type. - * Possible values include: 'PostgreSQL', 'PostgreSQLCitus', 'MySQL', 'MariaDb', 'Oracle' * @param [options] The optional parameters * @returns Promise */ - execute(body: Models.Body, options?: msRest.RequestOptionsBase): Promise; + execute(options?: msRest.RequestOptionsBase): Promise; /** - * @param body The required parameters for getting private DNS zone suffix based on server type. - * Possible values include: 'PostgreSQL', 'PostgreSQLCitus', 'MySQL', 'MariaDb', 'Oracle' * @param callback The callback */ - execute(body: Models.Body, callback: msRest.ServiceCallback): void; + execute(callback: msRest.ServiceCallback): void; /** - * @param body The required parameters for getting private DNS zone suffix based on server type. - * Possible values include: 'PostgreSQL', 'PostgreSQLCitus', 'MySQL', 'MariaDb', 'Oracle' * @param options The optional parameters * @param callback The callback */ - execute(body: Models.Body, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - execute(body: Models.Body, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + execute(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + execute(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { - body, options }, executeOperationSpec, @@ -61,26 +54,13 @@ export class GetPrivateDnsZoneSuffix { const serializer = new msRest.Serializer(Mappers); const executeOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: "subscriptions/{subscriptionId}/providers/Microsoft.DBForPostgreSql/getPrivateDnsZoneSuffix", - urlParameters: [ - Parameters.subscriptionId - ], + path: "providers/Microsoft.DBForPostgreSql/getPrivateDnsZoneSuffix", queryParameters: [ - Parameters.apiVersion2 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage ], - requestBody: { - parameterPath: "body", - mapper: { - required: true, - serializedName: "body", - type: { - name: "String" - } - } - }, responses: { 200: { bodyMapper: { diff --git a/sdk/postgresql/arm-postgresql-flexible/src/operations/locationBasedCapabilities.ts b/sdk/postgresql/arm-postgresql-flexible/src/operations/locationBasedCapabilities.ts index 4c5cb150cb80..0bafacc33c84 100644 --- a/sdk/postgresql/arm-postgresql-flexible/src/operations/locationBasedCapabilities.ts +++ b/sdk/postgresql/arm-postgresql-flexible/src/operations/locationBasedCapabilities.ts @@ -92,7 +92,7 @@ const executeOperationSpec: msRest.OperationSpec = { Parameters.locationName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage @@ -116,7 +116,7 @@ const executeNextOperationSpec: msRest.OperationSpec = { Parameters.nextPageLink ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/postgresql/arm-postgresql-flexible/src/operations/operations.ts b/sdk/postgresql/arm-postgresql-flexible/src/operations/operations.ts index 079d53b2dd21..155dbe32fe3d 100644 --- a/sdk/postgresql/arm-postgresql-flexible/src/operations/operations.ts +++ b/sdk/postgresql/arm-postgresql-flexible/src/operations/operations.ts @@ -56,7 +56,7 @@ const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "providers/Microsoft.DBForPostgreSql/operations", queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/postgresql/arm-postgresql-flexible/src/operations/servers.ts b/sdk/postgresql/arm-postgresql-flexible/src/operations/servers.ts index 8f552abd68e6..03f8a8b190f3 100644 --- a/sdk/postgresql/arm-postgresql-flexible/src/operations/servers.ts +++ b/sdk/postgresql/arm-postgresql-flexible/src/operations/servers.ts @@ -156,7 +156,7 @@ export class Servers { * @param [options] The optional parameters * @returns Promise */ - restart(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise { + restart(resourceGroupName: string, serverName: string, options?: Models.ServersRestartOptionalParams): Promise { return this.beginRestart(resourceGroupName,serverName,options) .then(lroPoller => lroPoller.pollUntilFinished()); } @@ -251,7 +251,7 @@ export class Servers { * @param [options] The optional parameters * @returns Promise */ - beginRestart(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise { + beginRestart(resourceGroupName: string, serverName: string, options?: Models.ServersBeginRestartOptionalParams): Promise { return this.client.sendLRORequest( { resourceGroupName, @@ -366,7 +366,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.serverName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage @@ -390,7 +390,7 @@ const listByResourceGroupOperationSpec: msRest.OperationSpec = { Parameters.resourceGroupName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage @@ -413,7 +413,7 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage @@ -438,7 +438,7 @@ const beginCreateOperationSpec: msRest.OperationSpec = { Parameters.serverName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage @@ -474,7 +474,7 @@ const beginUpdateOperationSpec: msRest.OperationSpec = { Parameters.serverName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage @@ -507,7 +507,7 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { Parameters.serverName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage @@ -532,11 +532,18 @@ const beginRestartOperationSpec: msRest.OperationSpec = { Parameters.serverName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage ], + requestBody: { + parameterPath: [ + "options", + "parameters" + ], + mapper: Mappers.RestartParameter + }, responses: { 200: {}, 202: {}, @@ -556,7 +563,7 @@ const beginStartOperationSpec: msRest.OperationSpec = { Parameters.serverName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage @@ -580,7 +587,7 @@ const beginStopOperationSpec: msRest.OperationSpec = { Parameters.serverName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage @@ -603,7 +610,7 @@ const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { Parameters.nextPageLink ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage @@ -627,7 +634,7 @@ const listNextOperationSpec: msRest.OperationSpec = { Parameters.nextPageLink ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/postgresql/arm-postgresql-flexible/src/operations/virtualNetworkSubnetUsage.ts b/sdk/postgresql/arm-postgresql-flexible/src/operations/virtualNetworkSubnetUsage.ts index 7132c84f1eaf..dbd7f7574e1f 100644 --- a/sdk/postgresql/arm-postgresql-flexible/src/operations/virtualNetworkSubnetUsage.ts +++ b/sdk/postgresql/arm-postgresql-flexible/src/operations/virtualNetworkSubnetUsage.ts @@ -68,7 +68,7 @@ const executeOperationSpec: msRest.OperationSpec = { Parameters.locationName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/postgresql/arm-postgresql-flexible/src/postgreSQLManagementClientContext.ts b/sdk/postgresql/arm-postgresql-flexible/src/postgreSQLManagementClientContext.ts index 1b12aa2e9d10..5366ffd5f270 100644 --- a/sdk/postgresql/arm-postgresql-flexible/src/postgreSQLManagementClientContext.ts +++ b/sdk/postgresql/arm-postgresql-flexible/src/postgreSQLManagementClientContext.ts @@ -13,10 +13,11 @@ import * as msRestAzure from "@azure/ms-rest-azure-js"; import { TokenCredential } from "@azure/core-auth"; const packageName = "@azure/arm-postgresql-flexible"; -const packageVersion = "2.0.0"; +const packageVersion = "3.0.0"; export class PostgreSQLManagementClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials | TokenCredential; + apiVersion?: string; subscriptionId: string; /** @@ -48,6 +49,7 @@ export class PostgreSQLManagementClientContext extends msRestAzure.AzureServiceC super(credentials, options); + this.apiVersion = '2021-06-01'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; From 24c4d4688bcfc5a93df4f181403ffabe207f2a72 Mon Sep 17 00:00:00 2001 From: Wei Dong <40835867+dw511214992@users.noreply.github.com> Date: Mon, 12 Jul 2021 08:53:59 +0800 Subject: [PATCH 18/28] bugfix (#16329) --- sdk/reservations/arm-reservations/README.md | 117 ++++++++++-------- .../arm-reservations/package.json | 9 +- .../src/azureReservationAPI.ts | 10 +- .../src/azureReservationAPIContext.ts | 14 ++- sdk/subscription/arm-subscriptions/README.md | 107 ++++++++-------- .../arm-subscriptions/package.json | 9 +- .../src/subscriptionClient.ts | 10 +- .../src/subscriptionClientContext.ts | 14 ++- 8 files changed, 169 insertions(+), 121 deletions(-) diff --git a/sdk/reservations/arm-reservations/README.md b/sdk/reservations/arm-reservations/README.md index 156ab2e58ad8..0e5eb07ebc3c 100644 --- a/sdk/reservations/arm-reservations/README.md +++ b/sdk/reservations/arm-reservations/README.md @@ -1,94 +1,107 @@ ## Azure AzureReservationAPI SDK for JavaScript -This package contains an isomorphic SDK for AzureReservationAPI. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for AzureReservationAPI. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-reservations` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: ```bash -npm install @azure/arm-reservations +npm install --save @azure/arm-reservations @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - Authentication, client creation and get quota as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. -```bash -npm install @azure/ms-rest-nodeauth@"^3.0.0" -``` +#### nodejs - Authentication, client creation, and get quota as an example written in JavaScript. ##### Sample code ```javascript +const { DefaultAzureCredential } = require("@azure/identity"); const { AzureReservationAPI } = require("@azure/arm-reservations"); -const { interactiveLogin } = require("@azure/ms-rest-nodeauth"); - -interactiveLogin().then((creds) => { - const client = new AzureReservationAPI(creds); - const subscriptionId = "testsubscriptionId"; - const providerId = "testproviderId"; - const location = "westus"; - const resourceName = "testresourceName"; - client.quota.get(subscriptionId, providerId, location, resourceName).then((result) => { - console.log("The result is:"); - console.log(result); - }); +const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; + +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new AzureReservationAPI(creds, subscriptionId); +const testSubscriptionId = "testsubscriptionId"; +const providerId = "testproviderId"; +const location = "westus"; +const resourceName = "testresourceName"; +client.quota.get(testSubscriptionId, providerId, location, resourceName).then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and get quota as an example written in JavaScript. +#### browser - Authentication, client creation, and get quota as an example written in JavaScript. -##### Install @azure/ms-rest-browserauth - -```bash -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-reservations sample - - + diff --git a/sdk/reservations/arm-reservations/package.json b/sdk/reservations/arm-reservations/package.json index 3ed3ffb6d440..30a5d2de2c52 100644 --- a/sdk/reservations/arm-reservations/package.json +++ b/sdk/reservations/arm-reservations/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-reservations", "author": "Microsoft Corporation", "description": "AzureReservationAPI Library with typescript type definitions for node.js and browser.", - "version": "6.0.0", + "version": "6.1.0", "dependencies": { - "@azure/ms-rest-azure-js": "^2.0.1", - "@azure/ms-rest-js": "^2.0.4", + "@azure/ms-rest-azure-js": "^2.1.0", + "@azure/ms-rest-js": "^2.2.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.10.0" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/azureReservationAPI.js", "types": "./esm/azureReservationAPI.d.ts", "devDependencies": { - "typescript": "^3.5.3", + "typescript": "^3.6.0", "rollup": "^1.18.0", "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", diff --git a/sdk/reservations/arm-reservations/src/azureReservationAPI.ts b/sdk/reservations/arm-reservations/src/azureReservationAPI.ts index 6f761cb07da8..93f338093fde 100644 --- a/sdk/reservations/arm-reservations/src/azureReservationAPI.ts +++ b/sdk/reservations/arm-reservations/src/azureReservationAPI.ts @@ -8,6 +8,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as Parameters from "./models/parameters"; @@ -27,10 +28,15 @@ class AzureReservationAPI extends AzureReservationAPIContext { /** * Initializes a new instance of the AzureReservationAPI class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, options?: Models.AzureReservationAPIOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, options?: Models.AzureReservationAPIOptions) { super(credentials, options); this.reservation = new operations.Reservation(this); this.reservationOrder = new operations.ReservationOrder(this); diff --git a/sdk/reservations/arm-reservations/src/azureReservationAPIContext.ts b/sdk/reservations/arm-reservations/src/azureReservationAPIContext.ts index 49da34adf76d..e068f355fc82 100644 --- a/sdk/reservations/arm-reservations/src/azureReservationAPIContext.ts +++ b/sdk/reservations/arm-reservations/src/azureReservationAPIContext.ts @@ -9,20 +9,26 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-reservations"; -const packageVersion = "6.0.0"; +const packageVersion = "6.1.0"; export class AzureReservationAPIContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; /** * Initializes a new instance of the AzureReservationAPI class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, options?: Models.AzureReservationAPIOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, options?: Models.AzureReservationAPIOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } diff --git a/sdk/subscription/arm-subscriptions/README.md b/sdk/subscription/arm-subscriptions/README.md index e57ebc12be19..2b3b9e76e8c9 100644 --- a/sdk/subscription/arm-subscriptions/README.md +++ b/sdk/subscription/arm-subscriptions/README.md @@ -1,92 +1,101 @@ ## Azure SubscriptionClient SDK for JavaScript -This package contains an isomorphic SDK for SubscriptionClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for SubscriptionClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-subscriptions` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: ```bash -npm install @azure/arm-subscriptions +npm install --save @azure/arm-subscriptions @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - Authentication, client creation and listLocations subscriptions as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. -```bash -npm install @azure/ms-rest-nodeauth@"^3.0.0" -``` +#### nodejs - Authentication, client creation, and listLocations subscriptions as an example written in JavaScript. ##### Sample code -```typescript -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { SubscriptionClient, SubscriptionModels, SubscriptionMappers } from "@azure/arm-subscriptions"; +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { SubscriptionClient } = require("@azure/arm-subscriptions"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new SubscriptionClient(creds, subscriptionId); - const subscriptionId = "testsubscriptionId"; - client.subscriptions.listLocations(subscriptionId).then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new SubscriptionClient(creds, subscriptionId); +const testSubscriptionId = "testsubscriptionId"; +client.subscriptions.listLocations(testSubscriptionId).then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and listLocations subscriptions as an example written in JavaScript. +#### browser - Authentication, client creation, and listLocations subscriptions as an example written in JavaScript. -##### Install @azure/ms-rest-browserauth - -```bash -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-subscriptions sample - - + diff --git a/sdk/subscription/arm-subscriptions/package.json b/sdk/subscription/arm-subscriptions/package.json index 6f56ecd0b90b..496e84d39a30 100644 --- a/sdk/subscription/arm-subscriptions/package.json +++ b/sdk/subscription/arm-subscriptions/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-subscriptions", "author": "Microsoft Corporation", "description": "SubscriptionClient Library with typescript type definitions for node.js and browser.", - "version": "3.0.0", + "version": "3.1.0", "dependencies": { - "@azure/ms-rest-azure-js": "^2.0.1", - "@azure/ms-rest-js": "^2.0.4", + "@azure/ms-rest-azure-js": "^2.1.0", + "@azure/ms-rest-js": "^2.2.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.10.0" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/subscriptionClient.js", "types": "./esm/subscriptionClient.d.ts", "devDependencies": { - "typescript": "^3.5.3", + "typescript": "^3.6.0", "rollup": "^1.18.0", "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", diff --git a/sdk/subscription/arm-subscriptions/src/subscriptionClient.ts b/sdk/subscription/arm-subscriptions/src/subscriptionClient.ts index e09ea265f1f4..1422cd860dec 100644 --- a/sdk/subscription/arm-subscriptions/src/subscriptionClient.ts +++ b/sdk/subscription/arm-subscriptions/src/subscriptionClient.ts @@ -9,6 +9,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -25,10 +26,15 @@ class SubscriptionClient extends SubscriptionClientContext { /** * Initializes a new instance of the SubscriptionClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, options?: Models.SubscriptionClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, options?: Models.SubscriptionClientOptions) { super(credentials, options); this.subscriptions = new operations.Subscriptions(this); this.tenants = new operations.Tenants(this); diff --git a/sdk/subscription/arm-subscriptions/src/subscriptionClientContext.ts b/sdk/subscription/arm-subscriptions/src/subscriptionClientContext.ts index e04e4ea0027c..3971cb1fd930 100644 --- a/sdk/subscription/arm-subscriptions/src/subscriptionClientContext.ts +++ b/sdk/subscription/arm-subscriptions/src/subscriptionClientContext.ts @@ -10,20 +10,26 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-subscriptions"; -const packageVersion = "3.0.0"; +const packageVersion = "3.1.0"; export class SubscriptionClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; /** * Initializes a new instance of the SubscriptionClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, options?: Models.SubscriptionClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, options?: Models.SubscriptionClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } From eb5b44c7c1d6636c6a810234bcbdad511fd61402 Mon Sep 17 00:00:00 2001 From: Wei Dong <40835867+dw511214992@users.noreply.github.com> Date: Mon, 12 Jul 2021 09:42:25 +0800 Subject: [PATCH 19/28] enable ci only when branch is feature/* --- eng/pipelines/mgmt-pr.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/eng/pipelines/mgmt-pr.yml b/eng/pipelines/mgmt-pr.yml index 22ec82033297..ea6064520837 100644 --- a/eng/pipelines/mgmt-pr.yml +++ b/eng/pipelines/mgmt-pr.yml @@ -1,3 +1,7 @@ +trigger: + branches: + include: + - feature/* pr: branches: include: From 72523c68429ea8ce22eaaebc57ae362c889f93ce Mon Sep 17 00:00:00 2001 From: colawwj <70128817+colawwj@users.noreply.github.com> Date: Fri, 16 Jul 2021 10:23:40 +0800 Subject: [PATCH 20/28] arm-mysql-release (#16375) --- sdk/mysql/arm-mysql/LICENSE.txt | 2 +- sdk/mysql/arm-mysql/README.md | 8 +- sdk/mysql/arm-mysql/package.json | 16 +- sdk/mysql/arm-mysql/rollup.config.js | 6 +- .../arm-mysql/src/models/advisorsMappers.ts | 44 + .../models/checkNameAvailabilityMappers.ts | 6 +- .../src/models/configurationsMappers.ts | 27 +- .../arm-mysql/src/models/databasesMappers.ts | 27 +- .../src/models/firewallRulesMappers.ts | 27 +- sdk/mysql/arm-mysql/src/models/index.ts | 2161 +++++++++++++++-- .../locationBasedPerformanceTierMappers.ts | 6 +- ...dedActionSessionsOperationStatusMappers.ts | 13 + ...dRecommendedActionSessionsResultMappers.ts | 44 + .../arm-mysql/src/models/logFilesMappers.ts | 27 +- sdk/mysql/arm-mysql/src/models/mappers.ts | 1393 ++++++++++- .../arm-mysql/src/models/operationsMappers.ts | 6 +- sdk/mysql/arm-mysql/src/models/parameters.ts | 167 +- .../privateEndpointConnectionsMappers.ts | 47 + .../src/models/privateLinkResourcesMappers.ts | 46 + .../arm-mysql/src/models/queryTextsMappers.ts | 46 + .../src/models/recommendedActionsMappers.ts | 44 + .../src/models/recoverableServersMappers.ts | 45 + .../arm-mysql/src/models/replicasMappers.ts | 27 +- .../src/models/serverAdministratorsMappers.ts | 46 + .../serverBasedPerformanceTierMappers.ts | 17 + .../arm-mysql/src/models/serverKeysMappers.ts | 46 + .../src/models/serverParametersMappers.ts | 46 + .../serverSecurityAlertPoliciesMappers.ts | 26 +- .../arm-mysql/src/models/serversMappers.ts | 28 +- .../src/models/topQueryStatisticsMappers.ts | 47 + .../src/models/virtualNetworkRulesMappers.ts | 25 +- .../src/models/waitStatisticsMappers.ts | 47 + .../arm-mysql/src/mySQLManagementClient.ts | 160 +- .../src/mySQLManagementClientContext.ts | 19 +- .../arm-mysql/src/operations/advisors.ts | 200 ++ .../src/operations/checkNameAvailability.ts | 7 +- .../src/operations/configurations.ts | 35 +- .../arm-mysql/src/operations/databases.ts | 43 +- .../arm-mysql/src/operations/firewallRules.ts | 43 +- sdk/mysql/arm-mysql/src/operations/index.ts | 21 +- .../locationBasedPerformanceTier.ts | 7 +- ...ecommendedActionSessionsOperationStatus.ts | 86 + ...ionBasedRecommendedActionSessionsResult.ts | 144 ++ .../arm-mysql/src/operations/logFiles.ts | 16 +- .../arm-mysql/src/operations/operations.ts | 7 +- .../operations/privateEndpointConnections.ts | 401 +++ .../src/operations/privateLinkResources.ts | 200 ++ .../arm-mysql/src/operations/queryTexts.ts | 210 ++ .../src/operations/recommendedActions.ts | 212 ++ .../src/operations/recoverableServers.ts | 86 + .../arm-mysql/src/operations/replicas.ts | 16 +- .../src/operations/serverAdministrators.ts | 269 ++ .../operations/serverBasedPerformanceTier.ts | 86 + .../arm-mysql/src/operations/serverKeys.ts | 332 +++ .../src/operations/serverParameters.ts | 96 + .../operations/serverSecurityAlertPolicies.ts | 133 +- sdk/mysql/arm-mysql/src/operations/servers.ts | 233 +- .../src/operations/topQueryStatistics.ts | 211 ++ .../src/operations/virtualNetworkRules.ts | 46 +- .../src/operations/waitStatistics.ts | 211 ++ sdk/mysql/arm-mysql/tsconfig.json | 2 +- 61 files changed, 7610 insertions(+), 485 deletions(-) create mode 100644 sdk/mysql/arm-mysql/src/models/advisorsMappers.ts create mode 100644 sdk/mysql/arm-mysql/src/models/locationBasedRecommendedActionSessionsOperationStatusMappers.ts create mode 100644 sdk/mysql/arm-mysql/src/models/locationBasedRecommendedActionSessionsResultMappers.ts create mode 100644 sdk/mysql/arm-mysql/src/models/privateEndpointConnectionsMappers.ts create mode 100644 sdk/mysql/arm-mysql/src/models/privateLinkResourcesMappers.ts create mode 100644 sdk/mysql/arm-mysql/src/models/queryTextsMappers.ts create mode 100644 sdk/mysql/arm-mysql/src/models/recommendedActionsMappers.ts create mode 100644 sdk/mysql/arm-mysql/src/models/recoverableServersMappers.ts create mode 100644 sdk/mysql/arm-mysql/src/models/serverAdministratorsMappers.ts create mode 100644 sdk/mysql/arm-mysql/src/models/serverBasedPerformanceTierMappers.ts create mode 100644 sdk/mysql/arm-mysql/src/models/serverKeysMappers.ts create mode 100644 sdk/mysql/arm-mysql/src/models/serverParametersMappers.ts create mode 100644 sdk/mysql/arm-mysql/src/models/topQueryStatisticsMappers.ts create mode 100644 sdk/mysql/arm-mysql/src/models/waitStatisticsMappers.ts create mode 100644 sdk/mysql/arm-mysql/src/operations/advisors.ts create mode 100644 sdk/mysql/arm-mysql/src/operations/locationBasedRecommendedActionSessionsOperationStatus.ts create mode 100644 sdk/mysql/arm-mysql/src/operations/locationBasedRecommendedActionSessionsResult.ts create mode 100644 sdk/mysql/arm-mysql/src/operations/privateEndpointConnections.ts create mode 100644 sdk/mysql/arm-mysql/src/operations/privateLinkResources.ts create mode 100644 sdk/mysql/arm-mysql/src/operations/queryTexts.ts create mode 100644 sdk/mysql/arm-mysql/src/operations/recommendedActions.ts create mode 100644 sdk/mysql/arm-mysql/src/operations/recoverableServers.ts create mode 100644 sdk/mysql/arm-mysql/src/operations/serverAdministrators.ts create mode 100644 sdk/mysql/arm-mysql/src/operations/serverBasedPerformanceTier.ts create mode 100644 sdk/mysql/arm-mysql/src/operations/serverKeys.ts create mode 100644 sdk/mysql/arm-mysql/src/operations/serverParameters.ts create mode 100644 sdk/mysql/arm-mysql/src/operations/topQueryStatistics.ts create mode 100644 sdk/mysql/arm-mysql/src/operations/waitStatistics.ts diff --git a/sdk/mysql/arm-mysql/LICENSE.txt b/sdk/mysql/arm-mysql/LICENSE.txt index b73b4a1293c3..2d3163745319 100644 --- a/sdk/mysql/arm-mysql/LICENSE.txt +++ b/sdk/mysql/arm-mysql/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2019 Microsoft +Copyright (c) 2021 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/mysql/arm-mysql/README.md b/sdk/mysql/arm-mysql/README.md index a2ef706bd607..f21fd62b4fac 100644 --- a/sdk/mysql/arm-mysql/README.md +++ b/sdk/mysql/arm-mysql/README.md @@ -1,11 +1,11 @@ ## Azure MySQLManagementClient SDK for JavaScript -This package contains an isomorphic SDK (runs both in Node.js and in browsers) for MySQLManagementClient. +This package contains an isomorphic SDK (runs both in node.js and in browsers) for MySQLManagementClient. ### Currently supported environments - [LTS versions of Node.js](https://nodejs.org/about/releases/) -- Latest versions of Safari, Chrome, Edge, and Firefox. +- Latest versions of Safari, Chrome, Edge and Firefox. ### Prerequisites @@ -21,7 +21,6 @@ Install both packages using the below command: ```bash npm install --save @azure/arm-mysql @azure/identity ``` - > **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. @@ -37,7 +36,6 @@ If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/ In the below samples, we pass the credential and the Azure subscription id to instantiate the client. Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. - #### nodejs - Authentication, client creation, and get servers as an example written in JavaScript. ##### Sample code @@ -87,7 +85,7 @@ In browser applications, we recommend using the `InteractiveBrowserCredential` t const credential = new InteractiveBrowserCredential( { clientId: "", - tenantId: "" + tenant: "" }); const client = new Azure.ArmMysql.MySQLManagementClient(creds, subscriptionId); const resourceGroupName = "testresourceGroupName"; diff --git a/sdk/mysql/arm-mysql/package.json b/sdk/mysql/arm-mysql/package.json index 7a74704f28d7..ba72873fa217 100644 --- a/sdk/mysql/arm-mysql/package.json +++ b/sdk/mysql/arm-mysql/package.json @@ -2,12 +2,12 @@ "name": "@azure/arm-mysql", "author": "Microsoft Corporation", "description": "MySQLManagementClient Library with typescript type definitions for node.js and browser.", - "version": "3.4.0", + "version": "4.0.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.4.0", - "@azure/ms-rest-js": "^1.11.0", + "@azure/ms-rest-azure-js": "^2.1.0", + "@azure/ms-rest-js": "^2.2.0", "@azure/core-auth": "^1.1.4", - "tslib": "^1.9.3" + "tslib": "^1.10.0" }, "keywords": [ "node", @@ -22,12 +22,12 @@ "types": "./esm/mySQLManagementClient.d.ts", "devDependencies": { "typescript": "^3.6.0", - "rollup": "^0.66.2", - "rollup-plugin-node-resolve": "^3.4.0", + "rollup": "^1.18.0", + "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", - "uglify-js": "^3.4.9" + "uglify-js": "^3.6.0" }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/mysql/arm-mysql", + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/feature/v4/sdk/mysql/arm-mysql", "repository": { "type": "git", "url": "https://github.com/Azure/azure-sdk-for-js.git" diff --git a/sdk/mysql/arm-mysql/rollup.config.js b/sdk/mysql/arm-mysql/rollup.config.js index 1461c9cabee5..c88001adb6de 100644 --- a/sdk/mysql/arm-mysql/rollup.config.js +++ b/sdk/mysql/arm-mysql/rollup.config.js @@ -21,15 +21,15 @@ const config = { "@azure/ms-rest-azure-js": "msRestAzure" }, banner: `/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */` }, plugins: [ - nodeResolve({ module: true }), + nodeResolve({ mainFields: ['module', 'main'] }), sourcemaps() ] }; diff --git a/sdk/mysql/arm-mysql/src/models/advisorsMappers.ts b/sdk/mysql/arm-mysql/src/models/advisorsMappers.ts new file mode 100644 index 000000000000..5c2a40ac30ca --- /dev/null +++ b/sdk/mysql/arm-mysql/src/models/advisorsMappers.ts @@ -0,0 +1,44 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + Advisor, + AdvisorsResultList, + AzureEntityResource, + BaseResource, + CloudError, + Configuration, + Database, + FirewallRule, + LogFile, + PrivateEndpointConnection, + PrivateEndpointProperty, + PrivateLinkResource, + PrivateLinkResourceProperties, + PrivateLinkServiceConnectionStateProperty, + ProxyResource, + QueryStatistic, + QueryText, + RecommendationAction, + RecoverableServerResource, + Resource, + ResourceIdentity, + Server, + ServerAdministratorResource, + ServerKey, + ServerPrivateEndpointConnection, + ServerPrivateEndpointConnectionProperties, + ServerPrivateLinkServiceConnectionStateProperty, + ServerSecurityAlertPolicy, + Sku, + StorageProfile, + TrackedResource, + VirtualNetworkRule, + WaitStatistic +} from "../models/mappers"; diff --git a/sdk/mysql/arm-mysql/src/models/checkNameAvailabilityMappers.ts b/sdk/mysql/arm-mysql/src/models/checkNameAvailabilityMappers.ts index ba8b8606adc4..127d67d9f6e5 100644 --- a/sdk/mysql/arm-mysql/src/models/checkNameAvailabilityMappers.ts +++ b/sdk/mysql/arm-mysql/src/models/checkNameAvailabilityMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -9,6 +9,8 @@ export { discriminators, CloudError, + ErrorAdditionalInfo, + ErrorResponse, NameAvailability, NameAvailabilityRequest } from "../models/mappers"; diff --git a/sdk/mysql/arm-mysql/src/models/configurationsMappers.ts b/sdk/mysql/arm-mysql/src/models/configurationsMappers.ts index 3df779f095a3..eb893e43a9f8 100644 --- a/sdk/mysql/arm-mysql/src/models/configurationsMappers.ts +++ b/sdk/mysql/arm-mysql/src/models/configurationsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -8,18 +8,39 @@ export { discriminators, + Advisor, + AzureEntityResource, BaseResource, CloudError, Configuration, ConfigurationListResult, Database, + ErrorAdditionalInfo, + ErrorResponse, FirewallRule, LogFile, + PrivateEndpointConnection, + PrivateEndpointProperty, + PrivateLinkResource, + PrivateLinkResourceProperties, + PrivateLinkServiceConnectionStateProperty, ProxyResource, + QueryStatistic, + QueryText, + RecommendationAction, + RecoverableServerResource, + Resource, + ResourceIdentity, Server, + ServerAdministratorResource, + ServerKey, + ServerPrivateEndpointConnection, + ServerPrivateEndpointConnectionProperties, + ServerPrivateLinkServiceConnectionStateProperty, ServerSecurityAlertPolicy, Sku, StorageProfile, TrackedResource, - VirtualNetworkRule + VirtualNetworkRule, + WaitStatistic } from "../models/mappers"; diff --git a/sdk/mysql/arm-mysql/src/models/databasesMappers.ts b/sdk/mysql/arm-mysql/src/models/databasesMappers.ts index aab1065ee094..c7c9c9bbd485 100644 --- a/sdk/mysql/arm-mysql/src/models/databasesMappers.ts +++ b/sdk/mysql/arm-mysql/src/models/databasesMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -8,18 +8,39 @@ export { discriminators, + Advisor, + AzureEntityResource, BaseResource, CloudError, Configuration, Database, DatabaseListResult, + ErrorAdditionalInfo, + ErrorResponse, FirewallRule, LogFile, + PrivateEndpointConnection, + PrivateEndpointProperty, + PrivateLinkResource, + PrivateLinkResourceProperties, + PrivateLinkServiceConnectionStateProperty, ProxyResource, + QueryStatistic, + QueryText, + RecommendationAction, + RecoverableServerResource, + Resource, + ResourceIdentity, Server, + ServerAdministratorResource, + ServerKey, + ServerPrivateEndpointConnection, + ServerPrivateEndpointConnectionProperties, + ServerPrivateLinkServiceConnectionStateProperty, ServerSecurityAlertPolicy, Sku, StorageProfile, TrackedResource, - VirtualNetworkRule + VirtualNetworkRule, + WaitStatistic } from "../models/mappers"; diff --git a/sdk/mysql/arm-mysql/src/models/firewallRulesMappers.ts b/sdk/mysql/arm-mysql/src/models/firewallRulesMappers.ts index 2b819a0b71bc..5d947da7c2aa 100644 --- a/sdk/mysql/arm-mysql/src/models/firewallRulesMappers.ts +++ b/sdk/mysql/arm-mysql/src/models/firewallRulesMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -8,18 +8,39 @@ export { discriminators, + Advisor, + AzureEntityResource, BaseResource, CloudError, Configuration, Database, + ErrorAdditionalInfo, + ErrorResponse, FirewallRule, FirewallRuleListResult, LogFile, + PrivateEndpointConnection, + PrivateEndpointProperty, + PrivateLinkResource, + PrivateLinkResourceProperties, + PrivateLinkServiceConnectionStateProperty, ProxyResource, + QueryStatistic, + QueryText, + RecommendationAction, + RecoverableServerResource, + Resource, + ResourceIdentity, Server, + ServerAdministratorResource, + ServerKey, + ServerPrivateEndpointConnection, + ServerPrivateEndpointConnectionProperties, + ServerPrivateLinkServiceConnectionStateProperty, ServerSecurityAlertPolicy, Sku, StorageProfile, TrackedResource, - VirtualNetworkRule + VirtualNetworkRule, + WaitStatistic } from "../models/mappers"; diff --git a/sdk/mysql/arm-mysql/src/models/index.ts b/sdk/mysql/arm-mysql/src/models/index.ts index 693159b1be74..fe68adb49199 100644 --- a/sdk/mysql/arm-mysql/src/models/index.ts +++ b/sdk/mysql/arm-mysql/src/models/index.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -12,38 +12,69 @@ import * as msRest from "@azure/ms-rest-js"; export { BaseResource, CloudError }; /** - * Resource properties. + * An interface representing PrivateEndpointProperty. */ -export interface ProxyResource extends BaseResource { +export interface PrivateEndpointProperty extends BaseResource { /** - * Resource ID - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Resource id of the private endpoint. */ - readonly id?: string; + id?: string; +} + +/** + * An interface representing ServerPrivateLinkServiceConnectionStateProperty. + */ +export interface ServerPrivateLinkServiceConnectionStateProperty { + /** + * The private link service connection status. Possible values include: 'Approved', 'Pending', + * 'Rejected', 'Disconnected' + */ + status: PrivateLinkServiceConnectionStateStatus; + /** + * The private link service connection description. + */ + description: string; /** - * Resource name. + * The actions required for private link service connection. Possible values include: 'None' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly name?: string; + readonly actionsRequired?: PrivateLinkServiceConnectionStateActionsRequire; +} + +/** + * Properties of a private endpoint connection. + */ +export interface ServerPrivateEndpointConnectionProperties { /** - * Resource type. + * Private endpoint which the connection belongs to. + */ + privateEndpoint?: PrivateEndpointProperty; + /** + * Connection state of the private endpoint connection. + */ + privateLinkServiceConnectionState?: ServerPrivateLinkServiceConnectionStateProperty; + /** + * State of the private endpoint connection. Possible values include: 'Approving', 'Ready', + * 'Dropping', 'Failed', 'Rejecting' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly type?: string; + readonly provisioningState?: PrivateEndpointProvisioningState; } /** - * Resource properties including location and tags for track resources. + * A private endpoint connection under a server */ -export interface TrackedResource extends ProxyResource { +export interface ServerPrivateEndpointConnection { /** - * The location the resource resides in. + * Resource Id of the private endpoint connection. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - location: string; + readonly id?: string; /** - * Application-specific metadata in the form of key-value pairs. + * Private endpoint connection properties + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - tags?: { [propertyName: string]: string }; + readonly properties?: ServerPrivateEndpointConnectionProperties; } /** @@ -82,7 +113,7 @@ export interface ServerPropertiesForCreate { */ createMode: "ServerPropertiesForCreate"; /** - * Server version. Possible values include: '5.6', '5.7' + * Server version. Possible values include: '5.6', '5.7', '8.0' */ version?: ServerVersion; /** @@ -90,6 +121,21 @@ export interface ServerPropertiesForCreate { * 'Disabled' */ sslEnforcement?: SslEnforcementEnum; + /** + * Enforce a minimal Tls version for the server. Possible values include: 'TLS1_0', 'TLS1_1', + * 'TLS1_2', 'TLSEnforcementDisabled' + */ + minimalTlsVersion?: MinimalTlsVersionEnum; + /** + * Status showing whether the server enabled infrastructure encryption. Possible values include: + * 'Enabled', 'Disabled' + */ + infrastructureEncryption?: InfrastructureEncryption; + /** + * Whether or not public network access is allowed for this server. Value is optional but if + * passed in, must be 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' + */ + publicNetworkAccess?: PublicNetworkAccessEnum; /** * Storage profile of a server. */ @@ -105,7 +151,7 @@ export interface ServerPropertiesForDefaultCreate { */ createMode: "Default"; /** - * Server version. Possible values include: '5.6', '5.7' + * Server version. Possible values include: '5.6', '5.7', '8.0' */ version?: ServerVersion; /** @@ -113,6 +159,21 @@ export interface ServerPropertiesForDefaultCreate { * 'Disabled' */ sslEnforcement?: SslEnforcementEnum; + /** + * Enforce a minimal Tls version for the server. Possible values include: 'TLS1_0', 'TLS1_1', + * 'TLS1_2', 'TLSEnforcementDisabled' + */ + minimalTlsVersion?: MinimalTlsVersionEnum; + /** + * Status showing whether the server enabled infrastructure encryption. Possible values include: + * 'Enabled', 'Disabled' + */ + infrastructureEncryption?: InfrastructureEncryption; + /** + * Whether or not public network access is allowed for this server. Value is optional but if + * passed in, must be 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' + */ + publicNetworkAccess?: PublicNetworkAccessEnum; /** * Storage profile of a server. */ @@ -137,7 +198,7 @@ export interface ServerPropertiesForRestore { */ createMode: "PointInTimeRestore"; /** - * Server version. Possible values include: '5.6', '5.7' + * Server version. Possible values include: '5.6', '5.7', '8.0' */ version?: ServerVersion; /** @@ -145,6 +206,21 @@ export interface ServerPropertiesForRestore { * 'Disabled' */ sslEnforcement?: SslEnforcementEnum; + /** + * Enforce a minimal Tls version for the server. Possible values include: 'TLS1_0', 'TLS1_1', + * 'TLS1_2', 'TLSEnforcementDisabled' + */ + minimalTlsVersion?: MinimalTlsVersionEnum; + /** + * Status showing whether the server enabled infrastructure encryption. Possible values include: + * 'Enabled', 'Disabled' + */ + infrastructureEncryption?: InfrastructureEncryption; + /** + * Whether or not public network access is allowed for this server. Value is optional but if + * passed in, must be 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' + */ + publicNetworkAccess?: PublicNetworkAccessEnum; /** * Storage profile of a server. */ @@ -169,7 +245,7 @@ export interface ServerPropertiesForGeoRestore { */ createMode: "GeoRestore"; /** - * Server version. Possible values include: '5.6', '5.7' + * Server version. Possible values include: '5.6', '5.7', '8.0' */ version?: ServerVersion; /** @@ -177,6 +253,21 @@ export interface ServerPropertiesForGeoRestore { * 'Disabled' */ sslEnforcement?: SslEnforcementEnum; + /** + * Enforce a minimal Tls version for the server. Possible values include: 'TLS1_0', 'TLS1_1', + * 'TLS1_2', 'TLSEnforcementDisabled' + */ + minimalTlsVersion?: MinimalTlsVersionEnum; + /** + * Status showing whether the server enabled infrastructure encryption. Possible values include: + * 'Enabled', 'Disabled' + */ + infrastructureEncryption?: InfrastructureEncryption; + /** + * Whether or not public network access is allowed for this server. Value is optional but if + * passed in, must be 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' + */ + publicNetworkAccess?: PublicNetworkAccessEnum; /** * Storage profile of a server. */ @@ -196,7 +287,7 @@ export interface ServerPropertiesForReplica { */ createMode: "Replica"; /** - * Server version. Possible values include: '5.6', '5.7' + * Server version. Possible values include: '5.6', '5.7', '8.0' */ version?: ServerVersion; /** @@ -204,6 +295,21 @@ export interface ServerPropertiesForReplica { * 'Disabled' */ sslEnforcement?: SslEnforcementEnum; + /** + * Enforce a minimal Tls version for the server. Possible values include: 'TLS1_0', 'TLS1_1', + * 'TLS1_2', 'TLSEnforcementDisabled' + */ + minimalTlsVersion?: MinimalTlsVersionEnum; + /** + * Status showing whether the server enabled infrastructure encryption. Possible values include: + * 'Enabled', 'Disabled' + */ + infrastructureEncryption?: InfrastructureEncryption; + /** + * Whether or not public network access is allowed for this server. Value is optional but if + * passed in, must be 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' + */ + publicNetworkAccess?: PublicNetworkAccessEnum; /** * Storage profile of a server. */ @@ -221,7 +327,7 @@ export interface Sku { /** * The name of the sku, typically, tier + family + cores, e.g. B_Gen4_1, GP_Gen5_8. */ - name?: string; + name: string; /** * The tier of the particular SKU, e.g. Basic. Possible values include: 'Basic', * 'GeneralPurpose', 'MemoryOptimized' @@ -241,10 +347,75 @@ export interface Sku { family?: string; } +/** + * Azure Active Directory identity configuration for a resource. + */ +export interface ResourceIdentity { + /** + * The Azure Active Directory principal id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly principalId?: string; + /** + * The identity type. Set this to 'SystemAssigned' in order to automatically create and assign an + * Azure Active Directory principal for the resource. Possible values include: 'SystemAssigned' + */ + type?: IdentityType; + /** + * The Azure Active Directory tenant id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly tenantId?: string; +} + +/** + * Common fields that are returned in the response for all Azure Resource Manager resources + * @summary Resource + */ +export interface Resource extends BaseResource { + /** + * Fully qualified resource ID for the resource. Ex - + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * The name of the resource + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + * "Microsoft.Storage/storageAccounts" + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; +} + +/** + * The resource model definition for an Azure Resource Manager tracked top level resource which has + * 'tags' and a 'location' + * @summary Tracked Resource + */ +export interface TrackedResource extends Resource { + /** + * Resource tags. + */ + tags?: { [propertyName: string]: string }; + /** + * The geo-location where the resource lives + */ + location: string; +} + /** * Represents a server. */ export interface Server extends TrackedResource { + /** + * The Azure Active Directory identity of the server. + */ + identity?: ResourceIdentity; /** * The SKU (pricing tier) of the server. */ @@ -255,7 +426,7 @@ export interface Server extends TrackedResource { */ administratorLogin?: string; /** - * Server version. Possible values include: '5.6', '5.7' + * Server version. Possible values include: '5.6', '5.7', '8.0' */ version?: ServerVersion; /** @@ -263,9 +434,24 @@ export interface Server extends TrackedResource { * 'Disabled' */ sslEnforcement?: SslEnforcementEnum; + /** + * Enforce a minimal Tls version for the server. Possible values include: 'TLS1_0', 'TLS1_1', + * 'TLS1_2', 'TLSEnforcementDisabled' + */ + minimalTlsVersion?: MinimalTlsVersionEnum; + /** + * Status showing whether the server data encryption is enabled with customer-managed keys. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly byokEnforcement?: string; + /** + * Status showing whether the server enabled infrastructure encryption. Possible values include: + * 'Enabled', 'Disabled' + */ + infrastructureEncryption?: InfrastructureEncryption; /** * A state of a server that is visible to user. Possible values include: 'Ready', 'Dropping', - * 'Disabled' + * 'Disabled', 'Inaccessible' */ userVisibleState?: ServerState; /** @@ -292,12 +478,26 @@ export interface Server extends TrackedResource { * The maximum number of replicas that a master server can have. */ replicaCapacity?: number; + /** + * Whether or not public network access is allowed for this server. Value is optional but if + * passed in, must be 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' + */ + publicNetworkAccess?: PublicNetworkAccessEnum; + /** + * List of private endpoint connections on a server + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly privateEndpointConnections?: ServerPrivateEndpointConnection[]; } /** * Represents a server to be created. */ export interface ServerForCreate { + /** + * The Azure Active Directory identity of the server. + */ + identity?: ResourceIdentity; /** * The SKU (pricing tier) of the server. */ @@ -320,6 +520,10 @@ export interface ServerForCreate { * Parameters allowed to update for a server. */ export interface ServerUpdateParameters { + /** + * The Azure Active Directory identity of the server. + */ + identity?: ResourceIdentity; /** * The SKU (pricing tier) of the server. */ @@ -333,7 +537,7 @@ export interface ServerUpdateParameters { */ administratorLoginPassword?: string; /** - * The version of a server. Possible values include: '5.6', '5.7' + * The version of a server. Possible values include: '5.6', '5.7', '8.0' */ version?: ServerVersion; /** @@ -341,6 +545,16 @@ export interface ServerUpdateParameters { * 'Disabled' */ sslEnforcement?: SslEnforcementEnum; + /** + * Enforce a minimal Tls version for the server. Possible values include: 'TLS1_0', 'TLS1_1', + * 'TLS1_2', 'TLSEnforcementDisabled' + */ + minimalTlsVersion?: MinimalTlsVersionEnum; + /** + * Whether or not public network access is allowed for this server. Value is optional but if + * passed in, must be 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' + */ + publicNetworkAccess?: PublicNetworkAccessEnum; /** * The replication role of the server. */ @@ -351,6 +565,14 @@ export interface ServerUpdateParameters { tags?: { [propertyName: string]: string }; } +/** + * The resource model definition for a Azure Resource Manager proxy resource. It will not have tags + * and a location + * @summary Proxy Resource + */ +export interface ProxyResource extends Resource { +} + /** * Represents a server firewall rule. */ @@ -570,6 +792,30 @@ export interface PerformanceTierProperties { * ID of the performance tier. */ id?: string; + /** + * Maximum Backup retention in days for the performance tier edition + */ + maxBackupRetentionDays?: number; + /** + * Minimum Backup retention in days for the performance tier edition + */ + minBackupRetentionDays?: number; + /** + * Max storage allowed for a server. + */ + maxStorageMB?: number; + /** + * Max storage allowed for a server. + */ + minLargeStorageMB?: number; + /** + * Max storage allowed for a server. + */ + maxLargeStorageMB?: number; + /** + * Max storage allowed for a server. + */ + minStorageMB?: number; /** * Service level objectives associated with the performance tier */ @@ -608,6 +854,121 @@ export interface NameAvailability { reason?: string; } +/** + * The resource management error additional info. + */ +export interface ErrorAdditionalInfo { + /** + * The additional info type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * The additional info. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly info?: any; +} + +/** + * Common error response for all Azure Resource Manager APIs to return error details for failed + * operations. (This also follows the OData error response format.) + * @summary Error Response + */ +export interface ErrorResponse { + /** + * The error code. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly code?: string; + /** + * The error message. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly message?: string; + /** + * The error target. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly target?: string; + /** + * The error details. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly details?: ErrorResponse[]; + /** + * The error additional info. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly additionalInfo?: ErrorAdditionalInfo[]; +} + +/** + * Represents a and external administrator to be created. + */ +export interface ServerAdministratorResource extends ProxyResource { + /** + * The server administrator login account name. + */ + login: string; + /** + * The server administrator Sid (Secure ID). + */ + sid: string; + /** + * The server Active Directory Administrator tenant id. + */ + tenantId: string; +} + +/** + * A recoverable server resource. + */ +export interface RecoverableServerResource extends ProxyResource { + /** + * The last available backup date time. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly lastAvailableBackupDateTime?: string; + /** + * The service level objective + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly serviceLevelObjective?: string; + /** + * Edition of the performance tier. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly edition?: string; + /** + * vCore associated with the service level objective + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly vCore?: number; + /** + * Hardware generation associated with the service level objective + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly hardwareGeneration?: string; + /** + * The MySQL version + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly version?: string; +} + +/** + * The resource model definition for an Azure Resource Manager resource with an etag. + * @summary Entity Resource + */ +export interface AzureEntityResource extends Resource { + /** + * Resource Etag. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly etag?: string; +} + /** * A server security alert policy. */ @@ -646,30 +1007,385 @@ export interface ServerSecurityAlertPolicy extends ProxyResource { } /** - * An interface representing MySQLManagementClientOptions. + * Represents a Query Text. */ -export interface MySQLManagementClientOptions extends AzureServiceClientOptions { - baseUri?: string; +export interface QueryText extends ProxyResource { + /** + * Query identifier unique to the server. + */ + queryId?: string; + /** + * Query text. + */ + queryText?: string; } /** - * @interface - * A list of servers. - * @extends Array + * Input to get top query statistics */ -export interface ServerListResult extends Array { +export interface TopQueryStatisticsInput { + /** + * Max number of top queries to return. + */ + numberOfTopQueries: number; + /** + * Aggregation function name. + */ + aggregationFunction: string; + /** + * Observed metric name. + */ + observedMetric: string; + /** + * Observation start time. + */ + observationStartTime: Date; + /** + * Observation end time. + */ + observationEndTime: Date; + /** + * Aggregation interval type in ISO 8601 format. + */ + aggregationWindow: string; } /** - * @interface - * A list of firewall rules. - * @extends Array + * Represents a Query Statistic. */ -export interface FirewallRuleListResult extends Array { -} - -/** - * @interface +export interface QueryStatistic extends ProxyResource { + /** + * Database query identifier. + */ + queryId?: string; + /** + * Observation start time. + */ + startTime?: Date; + /** + * Observation end time. + */ + endTime?: Date; + /** + * Aggregation function name. + */ + aggregationFunction?: string; + /** + * The list of database names. + */ + databaseNames?: string[]; + /** + * Number of query executions in this time interval. + */ + queryExecutionCount?: number; + /** + * Metric name. + */ + metricName?: string; + /** + * Metric display name. + */ + metricDisplayName?: string; + /** + * Metric value. + */ + metricValue?: number; + /** + * Metric value unit. + */ + metricValueUnit?: string; +} + +/** + * Input to get wait statistics + */ +export interface WaitStatisticsInput { + /** + * Observation start time. + */ + observationStartTime: Date; + /** + * Observation end time. + */ + observationEndTime: Date; + /** + * Aggregation interval type in ISO 8601 format. + */ + aggregationWindow: string; +} + +/** + * Represents a Wait Statistic. + */ +export interface WaitStatistic extends ProxyResource { + /** + * Observation start time. + */ + startTime?: Date; + /** + * Observation end time. + */ + endTime?: Date; + /** + * Wait event name. + */ + eventName?: string; + /** + * Wait event type name. + */ + eventTypeName?: string; + /** + * Database query identifier. + */ + queryId?: number; + /** + * Database Name. + */ + databaseName?: string; + /** + * Database user identifier. + */ + userId?: number; + /** + * Wait event count observed in this time interval. + */ + count?: number; + /** + * Total time of wait in milliseconds in this time interval. + */ + totalTimeInMs?: number; +} + +/** + * Result of Query Performance Insight data reset. + */ +export interface QueryPerformanceInsightResetDataResult { + /** + * Indicates result of the operation. Possible values include: 'Succeeded', 'Failed' + */ + status?: QueryPerformanceInsightResetDataResultState; + /** + * operation message. + */ + message?: string; +} + +/** + * Represents a recommendation action advisor. + */ +export interface Advisor extends ProxyResource { + /** + * The properties of a recommendation action advisor. + */ + properties?: any; +} + +/** + * Represents a Recommendation Action. + */ +export interface RecommendationAction extends ProxyResource { + /** + * Advisor name. + */ + advisorName?: string; + /** + * Recommendation action session identifier. + */ + sessionId?: string; + /** + * Recommendation action identifier. + */ + actionId?: number; + /** + * Recommendation action creation time. + */ + createdTime?: Date; + /** + * Recommendation action expiration time. + */ + expirationTime?: Date; + /** + * Recommendation action reason. + */ + reason?: string; + /** + * Recommendation action type. + */ + recommendationType?: string; + /** + * Recommendation action details. + */ + details?: { [propertyName: string]: string }; +} + +/** + * Recommendation action session operation status. + */ +export interface RecommendedActionSessionsOperationStatus { + /** + * Operation identifier. + */ + name?: string; + /** + * Operation start time. + */ + startTime?: Date; + /** + * Operation status. + */ + status?: string; +} + +/** + * An interface representing PrivateLinkServiceConnectionStateProperty. + */ +export interface PrivateLinkServiceConnectionStateProperty { + /** + * The private link service connection status. + */ + status: string; + /** + * The private link service connection description. + */ + description: string; + /** + * The actions required for private link service connection. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly actionsRequired?: string; +} + +/** + * A private endpoint connection + */ +export interface PrivateEndpointConnection extends ProxyResource { + /** + * Private endpoint which the connection belongs to. + */ + privateEndpoint?: PrivateEndpointProperty; + /** + * Connection state of the private endpoint connection. + */ + privateLinkServiceConnectionState?: PrivateLinkServiceConnectionStateProperty; + /** + * State of the private endpoint connection. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: string; +} + +/** + * Tags object for patch operations. + */ +export interface TagsObject { + /** + * Resource tags. + */ + tags?: { [propertyName: string]: string }; +} + +/** + * Properties of a private link resource. + */ +export interface PrivateLinkResourceProperties { + /** + * The private link resource group id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly groupId?: string; + /** + * The private link resource required member names. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly requiredMembers?: string[]; +} + +/** + * A private link resource + */ +export interface PrivateLinkResource extends ProxyResource { + /** + * The private link resource group id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly properties?: PrivateLinkResourceProperties; +} + +/** + * A MySQL Server key. + */ +export interface ServerKey extends ProxyResource { + /** + * Kind of encryption protector used to protect the key. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly kind?: string; + /** + * The URI of the key. + */ + uri?: string; + /** + * The key creation date. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly creationDate?: Date; +} + +/** + * An interface representing ServerUpgradeParameters. + */ +export interface ServerUpgradeParameters { + /** + * Represents an server storage profile. + */ + targetServerVersion?: string; +} + +/** + * Optional Parameters. + */ +export interface RecommendedActionsListByServerOptionalParams extends msRest.RequestOptionsBase { + /** + * The recommendation action session identifier. + */ + sessionId?: string; +} + +/** + * Optional Parameters. + */ +export interface RecommendedActionsListByServerNextOptionalParams extends msRest.RequestOptionsBase { + /** + * The recommendation action session identifier. + */ + sessionId?: string; +} + +/** + * An interface representing MySQLManagementClientOptions. + */ +export interface MySQLManagementClientOptions extends AzureServiceClientOptions { + baseUri?: string; +} + +/** + * @interface + * A list of servers. + * @extends Array + */ +export interface ServerListResult extends Array { +} + +/** + * @interface + * A list of firewall rules. + * @extends Array + */ +export interface FirewallRuleListResult extends Array { +} + +/** + * @interface * A list of virtual network rules. * @extends Array */ @@ -706,89 +1422,1138 @@ export interface LogFileListResult extends Array { } /** - * @interface - * A list of performance tiers. - * @extends Array + * @interface + * The response to a list Active Directory Administrators request. + * @extends Array + */ +export interface ServerAdministratorResourceListResult extends Array { +} + +/** + * @interface + * A list of performance tiers. + * @extends Array + */ +export interface PerformanceTierListResult extends Array { +} + +/** + * @interface + * A list of the server's security alert policies. + * @extends Array + */ +export interface ServerSecurityAlertPolicyListResult extends Array { + /** + * Link to retrieve next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * A list of query texts. + * @extends Array + */ +export interface QueryTextsResultList extends Array { + /** + * Link to retrieve next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * A list of query statistics. + * @extends Array + */ +export interface TopQueryStatisticsResultList extends Array { + /** + * Link to retrieve next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * A list of wait statistics. + * @extends Array + */ +export interface WaitStatisticsResultList extends Array { + /** + * Link to retrieve next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * A list of query statistics. + * @extends Array + */ +export interface AdvisorsResultList extends Array { + /** + * Link to retrieve next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * A list of recommendation actions. + * @extends Array + */ +export interface RecommendationActionsResultList extends Array { + /** + * Link to retrieve next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * A list of private endpoint connections. + * @extends Array + */ +export interface PrivateEndpointConnectionListResult extends Array { + /** + * Link to retrieve next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * A list of private link resources + * @extends Array + */ +export interface PrivateLinkResourceListResult extends Array { + /** + * Link to retrieve next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * A list of MySQL Server keys. + * @extends Array + */ +export interface ServerKeyListResult extends Array { + /** + * Link to retrieve next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * Defines values for ServerVersion. + * Possible values include: '5.6', '5.7', '8.0' + * @readonly + * @enum {string} + */ +export type ServerVersion = '5.6' | '5.7' | '8.0'; + +/** + * Defines values for SslEnforcementEnum. + * Possible values include: 'Enabled', 'Disabled' + * @readonly + * @enum {string} + */ +export type SslEnforcementEnum = 'Enabled' | 'Disabled'; + +/** + * Defines values for MinimalTlsVersionEnum. + * Possible values include: 'TLS1_0', 'TLS1_1', 'TLS1_2', 'TLSEnforcementDisabled' + * @readonly + * @enum {string} + */ +export type MinimalTlsVersionEnum = 'TLS1_0' | 'TLS1_1' | 'TLS1_2' | 'TLSEnforcementDisabled'; + +/** + * Defines values for InfrastructureEncryption. + * Possible values include: 'Enabled', 'Disabled' + * @readonly + * @enum {string} + */ +export type InfrastructureEncryption = 'Enabled' | 'Disabled'; + +/** + * Defines values for PublicNetworkAccessEnum. + * Possible values include: 'Enabled', 'Disabled' + * @readonly + * @enum {string} + */ +export type PublicNetworkAccessEnum = 'Enabled' | 'Disabled'; + +/** + * Defines values for PrivateLinkServiceConnectionStateStatus. + * Possible values include: 'Approved', 'Pending', 'Rejected', 'Disconnected' + * @readonly + * @enum {string} + */ +export type PrivateLinkServiceConnectionStateStatus = 'Approved' | 'Pending' | 'Rejected' | 'Disconnected'; + +/** + * Defines values for PrivateLinkServiceConnectionStateActionsRequire. + * Possible values include: 'None' + * @readonly + * @enum {string} + */ +export type PrivateLinkServiceConnectionStateActionsRequire = 'None'; + +/** + * Defines values for PrivateEndpointProvisioningState. + * Possible values include: 'Approving', 'Ready', 'Dropping', 'Failed', 'Rejecting' + * @readonly + * @enum {string} + */ +export type PrivateEndpointProvisioningState = 'Approving' | 'Ready' | 'Dropping' | 'Failed' | 'Rejecting'; + +/** + * Defines values for ServerState. + * Possible values include: 'Ready', 'Dropping', 'Disabled', 'Inaccessible' + * @readonly + * @enum {string} + */ +export type ServerState = 'Ready' | 'Dropping' | 'Disabled' | 'Inaccessible'; + +/** + * Defines values for GeoRedundantBackup. + * Possible values include: 'Enabled', 'Disabled' + * @readonly + * @enum {string} + */ +export type GeoRedundantBackup = 'Enabled' | 'Disabled'; + +/** + * Defines values for StorageAutogrow. + * Possible values include: 'Enabled', 'Disabled' + * @readonly + * @enum {string} + */ +export type StorageAutogrow = 'Enabled' | 'Disabled'; + +/** + * Defines values for SkuTier. + * Possible values include: 'Basic', 'GeneralPurpose', 'MemoryOptimized' + * @readonly + * @enum {string} + */ +export type SkuTier = 'Basic' | 'GeneralPurpose' | 'MemoryOptimized'; + +/** + * Defines values for IdentityType. + * Possible values include: 'SystemAssigned' + * @readonly + * @enum {string} + */ +export type IdentityType = 'SystemAssigned'; + +/** + * Defines values for VirtualNetworkRuleState. + * Possible values include: 'Initializing', 'InProgress', 'Ready', 'Deleting', 'Unknown' + * @readonly + * @enum {string} + */ +export type VirtualNetworkRuleState = 'Initializing' | 'InProgress' | 'Ready' | 'Deleting' | 'Unknown'; + +/** + * Defines values for OperationOrigin. + * Possible values include: 'NotSpecified', 'user', 'system' + * @readonly + * @enum {string} + */ +export type OperationOrigin = 'NotSpecified' | 'user' | 'system'; + +/** + * Defines values for ServerSecurityAlertPolicyState. + * Possible values include: 'Enabled', 'Disabled' + * @readonly + * @enum {string} + */ +export type ServerSecurityAlertPolicyState = 'Enabled' | 'Disabled'; + +/** + * Defines values for QueryPerformanceInsightResetDataResultState. + * Possible values include: 'Succeeded', 'Failed' + * @readonly + * @enum {string} + */ +export type QueryPerformanceInsightResetDataResultState = 'Succeeded' | 'Failed'; + +/** + * Contains response data for the create operation. + */ +export type ServersCreateResponse = Server & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Server; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type ServersUpdateResponse = Server & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Server; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type ServersGetResponse = Server & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Server; + }; +}; + +/** + * Contains response data for the listByResourceGroup operation. + */ +export type ServersListByResourceGroupResponse = ServerListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServerListResult; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type ServersListResponse = ServerListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServerListResult; + }; +}; + +/** + * Contains response data for the beginCreate operation. + */ +export type ServersBeginCreateResponse = Server & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Server; + }; +}; + +/** + * Contains response data for the beginUpdate operation. + */ +export type ServersBeginUpdateResponse = Server & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Server; + }; +}; + +/** + * Contains response data for the listByServer operation. + */ +export type ReplicasListByServerResponse = ServerListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServerListResult; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type FirewallRulesCreateOrUpdateResponse = FirewallRule & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: FirewallRule; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type FirewallRulesGetResponse = FirewallRule & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: FirewallRule; + }; +}; + +/** + * Contains response data for the listByServer operation. + */ +export type FirewallRulesListByServerResponse = FirewallRuleListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: FirewallRuleListResult; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type FirewallRulesBeginCreateOrUpdateResponse = FirewallRule & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: FirewallRule; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type VirtualNetworkRulesGetResponse = VirtualNetworkRule & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: VirtualNetworkRule; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type VirtualNetworkRulesCreateOrUpdateResponse = VirtualNetworkRule & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: VirtualNetworkRule; + }; +}; + +/** + * Contains response data for the listByServer operation. + */ +export type VirtualNetworkRulesListByServerResponse = VirtualNetworkRuleListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: VirtualNetworkRuleListResult; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type VirtualNetworkRulesBeginCreateOrUpdateResponse = VirtualNetworkRule & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: VirtualNetworkRule; + }; +}; + +/** + * Contains response data for the listByServerNext operation. + */ +export type VirtualNetworkRulesListByServerNextResponse = VirtualNetworkRuleListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: VirtualNetworkRuleListResult; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type DatabasesCreateOrUpdateResponse = Database & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Database; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type DatabasesGetResponse = Database & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Database; + }; +}; + +/** + * Contains response data for the listByServer operation. + */ +export type DatabasesListByServerResponse = DatabaseListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: DatabaseListResult; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type DatabasesBeginCreateOrUpdateResponse = Database & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Database; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type ConfigurationsCreateOrUpdateResponse = Configuration & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Configuration; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type ConfigurationsGetResponse = Configuration & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Configuration; + }; +}; + +/** + * Contains response data for the listByServer operation. + */ +export type ConfigurationsListByServerResponse = ConfigurationListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ConfigurationListResult; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type ConfigurationsBeginCreateOrUpdateResponse = Configuration & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Configuration; + }; +}; + +/** + * Contains response data for the listUpdateConfigurations operation. + */ +export type ServerParametersListUpdateConfigurationsResponse = ConfigurationListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ConfigurationListResult; + }; +}; + +/** + * Contains response data for the beginListUpdateConfigurations operation. + */ +export type ServerParametersBeginListUpdateConfigurationsResponse = ConfigurationListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ConfigurationListResult; + }; +}; + +/** + * Contains response data for the listByServer operation. + */ +export type LogFilesListByServerResponse = LogFileListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: LogFileListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type ServerAdministratorsGetResponse = ServerAdministratorResource & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServerAdministratorResource; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type ServerAdministratorsCreateOrUpdateResponse = ServerAdministratorResource & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServerAdministratorResource; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type ServerAdministratorsListResponse = ServerAdministratorResourceListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServerAdministratorResourceListResult; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type ServerAdministratorsBeginCreateOrUpdateResponse = ServerAdministratorResource & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServerAdministratorResource; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type RecoverableServersGetResponse = RecoverableServerResource & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: RecoverableServerResource; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type ServerBasedPerformanceTierListResponse = PerformanceTierListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PerformanceTierListResult; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type LocationBasedPerformanceTierListResponse = PerformanceTierListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PerformanceTierListResult; + }; +}; + +/** + * Contains response data for the execute operation. + */ +export type CheckNameAvailabilityExecuteResponse = NameAvailability & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: NameAvailability; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type OperationsListResponse = OperationListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type ServerSecurityAlertPoliciesGetResponse = ServerSecurityAlertPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServerSecurityAlertPolicy; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. */ -export interface PerformanceTierListResult extends Array { -} +export type ServerSecurityAlertPoliciesCreateOrUpdateResponse = ServerSecurityAlertPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; -/** - * Defines values for ServerVersion. - * Possible values include: '5.6', '5.7' - * @readonly - * @enum {string} - */ -export type ServerVersion = '5.6' | '5.7'; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServerSecurityAlertPolicy; + }; +}; /** - * Defines values for SslEnforcementEnum. - * Possible values include: 'Enabled', 'Disabled' - * @readonly - * @enum {string} + * Contains response data for the listByServer operation. */ -export type SslEnforcementEnum = 'Enabled' | 'Disabled'; +export type ServerSecurityAlertPoliciesListByServerResponse = ServerSecurityAlertPolicyListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; -/** - * Defines values for ServerState. - * Possible values include: 'Ready', 'Dropping', 'Disabled' - * @readonly - * @enum {string} - */ -export type ServerState = 'Ready' | 'Dropping' | 'Disabled'; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServerSecurityAlertPolicyListResult; + }; +}; /** - * Defines values for GeoRedundantBackup. - * Possible values include: 'Enabled', 'Disabled' - * @readonly - * @enum {string} + * Contains response data for the beginCreateOrUpdate operation. */ -export type GeoRedundantBackup = 'Enabled' | 'Disabled'; +export type ServerSecurityAlertPoliciesBeginCreateOrUpdateResponse = ServerSecurityAlertPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; -/** - * Defines values for StorageAutogrow. - * Possible values include: 'Enabled', 'Disabled' - * @readonly - * @enum {string} - */ -export type StorageAutogrow = 'Enabled' | 'Disabled'; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServerSecurityAlertPolicy; + }; +}; /** - * Defines values for SkuTier. - * Possible values include: 'Basic', 'GeneralPurpose', 'MemoryOptimized' - * @readonly - * @enum {string} + * Contains response data for the listByServerNext operation. */ -export type SkuTier = 'Basic' | 'GeneralPurpose' | 'MemoryOptimized'; +export type ServerSecurityAlertPoliciesListByServerNextResponse = ServerSecurityAlertPolicyListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; -/** - * Defines values for VirtualNetworkRuleState. - * Possible values include: 'Initializing', 'InProgress', 'Ready', 'Deleting', 'Unknown' - * @readonly - * @enum {string} - */ -export type VirtualNetworkRuleState = 'Initializing' | 'InProgress' | 'Ready' | 'Deleting' | 'Unknown'; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServerSecurityAlertPolicyListResult; + }; +}; /** - * Defines values for OperationOrigin. - * Possible values include: 'NotSpecified', 'user', 'system' - * @readonly - * @enum {string} + * Contains response data for the get operation. */ -export type OperationOrigin = 'NotSpecified' | 'user' | 'system'; +export type QueryTextsGetResponse = QueryText & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; -/** - * Defines values for ServerSecurityAlertPolicyState. - * Possible values include: 'Enabled', 'Disabled' - * @readonly - * @enum {string} - */ -export type ServerSecurityAlertPolicyState = 'Enabled' | 'Disabled'; + /** + * The response body as parsed JSON or XML + */ + parsedBody: QueryText; + }; +}; /** - * Contains response data for the create operation. + * Contains response data for the listByServer operation. */ -export type ServersCreateResponse = Server & { +export type QueryTextsListByServerResponse = QueryTextsResultList & { /** * The underlying HTTP response. */ @@ -801,14 +2566,14 @@ export type ServersCreateResponse = Server & { /** * The response body as parsed JSON or XML */ - parsedBody: Server; + parsedBody: QueryTextsResultList; }; }; /** - * Contains response data for the update operation. + * Contains response data for the listByServerNext operation. */ -export type ServersUpdateResponse = Server & { +export type QueryTextsListByServerNextResponse = QueryTextsResultList & { /** * The underlying HTTP response. */ @@ -821,14 +2586,14 @@ export type ServersUpdateResponse = Server & { /** * The response body as parsed JSON or XML */ - parsedBody: Server; + parsedBody: QueryTextsResultList; }; }; /** * Contains response data for the get operation. */ -export type ServersGetResponse = Server & { +export type TopQueryStatisticsGetResponse = QueryStatistic & { /** * The underlying HTTP response. */ @@ -841,14 +2606,14 @@ export type ServersGetResponse = Server & { /** * The response body as parsed JSON or XML */ - parsedBody: Server; + parsedBody: QueryStatistic; }; }; /** - * Contains response data for the listByResourceGroup operation. + * Contains response data for the listByServer operation. */ -export type ServersListByResourceGroupResponse = ServerListResult & { +export type TopQueryStatisticsListByServerResponse = TopQueryStatisticsResultList & { /** * The underlying HTTP response. */ @@ -861,14 +2626,14 @@ export type ServersListByResourceGroupResponse = ServerListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: ServerListResult; + parsedBody: TopQueryStatisticsResultList; }; }; /** - * Contains response data for the list operation. + * Contains response data for the listByServerNext operation. */ -export type ServersListResponse = ServerListResult & { +export type TopQueryStatisticsListByServerNextResponse = TopQueryStatisticsResultList & { /** * The underlying HTTP response. */ @@ -881,14 +2646,14 @@ export type ServersListResponse = ServerListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: ServerListResult; + parsedBody: TopQueryStatisticsResultList; }; }; /** - * Contains response data for the beginCreate operation. + * Contains response data for the get operation. */ -export type ServersBeginCreateResponse = Server & { +export type WaitStatisticsGetResponse = WaitStatistic & { /** * The underlying HTTP response. */ @@ -901,14 +2666,14 @@ export type ServersBeginCreateResponse = Server & { /** * The response body as parsed JSON or XML */ - parsedBody: Server; + parsedBody: WaitStatistic; }; }; /** - * Contains response data for the beginUpdate operation. + * Contains response data for the listByServer operation. */ -export type ServersBeginUpdateResponse = Server & { +export type WaitStatisticsListByServerResponse = WaitStatisticsResultList & { /** * The underlying HTTP response. */ @@ -921,14 +2686,14 @@ export type ServersBeginUpdateResponse = Server & { /** * The response body as parsed JSON or XML */ - parsedBody: Server; + parsedBody: WaitStatisticsResultList; }; }; /** - * Contains response data for the listByServer operation. + * Contains response data for the listByServerNext operation. */ -export type ReplicasListByServerResponse = ServerListResult & { +export type WaitStatisticsListByServerNextResponse = WaitStatisticsResultList & { /** * The underlying HTTP response. */ @@ -941,14 +2706,14 @@ export type ReplicasListByServerResponse = ServerListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: ServerListResult; + parsedBody: WaitStatisticsResultList; }; }; /** - * Contains response data for the createOrUpdate operation. + * Contains response data for the resetQueryPerformanceInsightData operation. */ -export type FirewallRulesCreateOrUpdateResponse = FirewallRule & { +export type ResetQueryPerformanceInsightDataResponse = QueryPerformanceInsightResetDataResult & { /** * The underlying HTTP response. */ @@ -961,14 +2726,14 @@ export type FirewallRulesCreateOrUpdateResponse = FirewallRule & { /** * The response body as parsed JSON or XML */ - parsedBody: FirewallRule; + parsedBody: QueryPerformanceInsightResetDataResult; }; }; /** * Contains response data for the get operation. */ -export type FirewallRulesGetResponse = FirewallRule & { +export type AdvisorsGetResponse = Advisor & { /** * The underlying HTTP response. */ @@ -981,14 +2746,14 @@ export type FirewallRulesGetResponse = FirewallRule & { /** * The response body as parsed JSON or XML */ - parsedBody: FirewallRule; + parsedBody: Advisor; }; }; /** * Contains response data for the listByServer operation. */ -export type FirewallRulesListByServerResponse = FirewallRuleListResult & { +export type AdvisorsListByServerResponse = AdvisorsResultList & { /** * The underlying HTTP response. */ @@ -1001,14 +2766,14 @@ export type FirewallRulesListByServerResponse = FirewallRuleListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: FirewallRuleListResult; + parsedBody: AdvisorsResultList; }; }; /** - * Contains response data for the beginCreateOrUpdate operation. + * Contains response data for the listByServerNext operation. */ -export type FirewallRulesBeginCreateOrUpdateResponse = FirewallRule & { +export type AdvisorsListByServerNextResponse = AdvisorsResultList & { /** * The underlying HTTP response. */ @@ -1021,14 +2786,14 @@ export type FirewallRulesBeginCreateOrUpdateResponse = FirewallRule & { /** * The response body as parsed JSON or XML */ - parsedBody: FirewallRule; + parsedBody: AdvisorsResultList; }; }; /** * Contains response data for the get operation. */ -export type VirtualNetworkRulesGetResponse = VirtualNetworkRule & { +export type RecommendedActionsGetResponse = RecommendationAction & { /** * The underlying HTTP response. */ @@ -1041,14 +2806,14 @@ export type VirtualNetworkRulesGetResponse = VirtualNetworkRule & { /** * The response body as parsed JSON or XML */ - parsedBody: VirtualNetworkRule; + parsedBody: RecommendationAction; }; }; /** - * Contains response data for the createOrUpdate operation. + * Contains response data for the listByServer operation. */ -export type VirtualNetworkRulesCreateOrUpdateResponse = VirtualNetworkRule & { +export type RecommendedActionsListByServerResponse = RecommendationActionsResultList & { /** * The underlying HTTP response. */ @@ -1061,14 +2826,14 @@ export type VirtualNetworkRulesCreateOrUpdateResponse = VirtualNetworkRule & { /** * The response body as parsed JSON or XML */ - parsedBody: VirtualNetworkRule; + parsedBody: RecommendationActionsResultList; }; }; /** - * Contains response data for the listByServer operation. + * Contains response data for the listByServerNext operation. */ -export type VirtualNetworkRulesListByServerResponse = VirtualNetworkRuleListResult & { +export type RecommendedActionsListByServerNextResponse = RecommendationActionsResultList & { /** * The underlying HTTP response. */ @@ -1081,14 +2846,14 @@ export type VirtualNetworkRulesListByServerResponse = VirtualNetworkRuleListResu /** * The response body as parsed JSON or XML */ - parsedBody: VirtualNetworkRuleListResult; + parsedBody: RecommendationActionsResultList; }; }; /** - * Contains response data for the beginCreateOrUpdate operation. + * Contains response data for the get operation. */ -export type VirtualNetworkRulesBeginCreateOrUpdateResponse = VirtualNetworkRule & { +export type LocationBasedRecommendedActionSessionsOperationStatusGetResponse = RecommendedActionSessionsOperationStatus & { /** * The underlying HTTP response. */ @@ -1101,14 +2866,14 @@ export type VirtualNetworkRulesBeginCreateOrUpdateResponse = VirtualNetworkRule /** * The response body as parsed JSON or XML */ - parsedBody: VirtualNetworkRule; + parsedBody: RecommendedActionSessionsOperationStatus; }; }; /** - * Contains response data for the listByServerNext operation. + * Contains response data for the list operation. */ -export type VirtualNetworkRulesListByServerNextResponse = VirtualNetworkRuleListResult & { +export type LocationBasedRecommendedActionSessionsResultListResponse = RecommendationActionsResultList & { /** * The underlying HTTP response. */ @@ -1121,14 +2886,14 @@ export type VirtualNetworkRulesListByServerNextResponse = VirtualNetworkRuleList /** * The response body as parsed JSON or XML */ - parsedBody: VirtualNetworkRuleListResult; + parsedBody: RecommendationActionsResultList; }; }; /** - * Contains response data for the createOrUpdate operation. + * Contains response data for the listNext operation. */ -export type DatabasesCreateOrUpdateResponse = Database & { +export type LocationBasedRecommendedActionSessionsResultListNextResponse = RecommendationActionsResultList & { /** * The underlying HTTP response. */ @@ -1141,14 +2906,14 @@ export type DatabasesCreateOrUpdateResponse = Database & { /** * The response body as parsed JSON or XML */ - parsedBody: Database; + parsedBody: RecommendationActionsResultList; }; }; /** * Contains response data for the get operation. */ -export type DatabasesGetResponse = Database & { +export type PrivateEndpointConnectionsGetResponse = PrivateEndpointConnection & { /** * The underlying HTTP response. */ @@ -1161,14 +2926,14 @@ export type DatabasesGetResponse = Database & { /** * The response body as parsed JSON or XML */ - parsedBody: Database; + parsedBody: PrivateEndpointConnection; }; }; /** - * Contains response data for the listByServer operation. + * Contains response data for the createOrUpdate operation. */ -export type DatabasesListByServerResponse = DatabaseListResult & { +export type PrivateEndpointConnectionsCreateOrUpdateResponse = PrivateEndpointConnection & { /** * The underlying HTTP response. */ @@ -1181,14 +2946,14 @@ export type DatabasesListByServerResponse = DatabaseListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: DatabaseListResult; + parsedBody: PrivateEndpointConnection; }; }; /** - * Contains response data for the beginCreateOrUpdate operation. + * Contains response data for the updateTags operation. */ -export type DatabasesBeginCreateOrUpdateResponse = Database & { +export type PrivateEndpointConnectionsUpdateTagsResponse = PrivateEndpointConnection & { /** * The underlying HTTP response. */ @@ -1201,14 +2966,14 @@ export type DatabasesBeginCreateOrUpdateResponse = Database & { /** * The response body as parsed JSON or XML */ - parsedBody: Database; + parsedBody: PrivateEndpointConnection; }; }; /** - * Contains response data for the createOrUpdate operation. + * Contains response data for the listByServer operation. */ -export type ConfigurationsCreateOrUpdateResponse = Configuration & { +export type PrivateEndpointConnectionsListByServerResponse = PrivateEndpointConnectionListResult & { /** * The underlying HTTP response. */ @@ -1221,14 +2986,14 @@ export type ConfigurationsCreateOrUpdateResponse = Configuration & { /** * The response body as parsed JSON or XML */ - parsedBody: Configuration; + parsedBody: PrivateEndpointConnectionListResult; }; }; /** - * Contains response data for the get operation. + * Contains response data for the beginCreateOrUpdate operation. */ -export type ConfigurationsGetResponse = Configuration & { +export type PrivateEndpointConnectionsBeginCreateOrUpdateResponse = PrivateEndpointConnection & { /** * The underlying HTTP response. */ @@ -1241,14 +3006,14 @@ export type ConfigurationsGetResponse = Configuration & { /** * The response body as parsed JSON or XML */ - parsedBody: Configuration; + parsedBody: PrivateEndpointConnection; }; }; /** - * Contains response data for the listByServer operation. + * Contains response data for the beginUpdateTags operation. */ -export type ConfigurationsListByServerResponse = ConfigurationListResult & { +export type PrivateEndpointConnectionsBeginUpdateTagsResponse = PrivateEndpointConnection & { /** * The underlying HTTP response. */ @@ -1261,14 +3026,14 @@ export type ConfigurationsListByServerResponse = ConfigurationListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: ConfigurationListResult; + parsedBody: PrivateEndpointConnection; }; }; /** - * Contains response data for the beginCreateOrUpdate operation. + * Contains response data for the listByServerNext operation. */ -export type ConfigurationsBeginCreateOrUpdateResponse = Configuration & { +export type PrivateEndpointConnectionsListByServerNextResponse = PrivateEndpointConnectionListResult & { /** * The underlying HTTP response. */ @@ -1281,14 +3046,14 @@ export type ConfigurationsBeginCreateOrUpdateResponse = Configuration & { /** * The response body as parsed JSON or XML */ - parsedBody: Configuration; + parsedBody: PrivateEndpointConnectionListResult; }; }; /** * Contains response data for the listByServer operation. */ -export type LogFilesListByServerResponse = LogFileListResult & { +export type PrivateLinkResourcesListByServerResponse = PrivateLinkResourceListResult & { /** * The underlying HTTP response. */ @@ -1301,14 +3066,14 @@ export type LogFilesListByServerResponse = LogFileListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: LogFileListResult; + parsedBody: PrivateLinkResourceListResult; }; }; /** - * Contains response data for the list operation. + * Contains response data for the get operation. */ -export type LocationBasedPerformanceTierListResponse = PerformanceTierListResult & { +export type PrivateLinkResourcesGetResponse = PrivateLinkResource & { /** * The underlying HTTP response. */ @@ -1321,14 +3086,14 @@ export type LocationBasedPerformanceTierListResponse = PerformanceTierListResult /** * The response body as parsed JSON or XML */ - parsedBody: PerformanceTierListResult; + parsedBody: PrivateLinkResource; }; }; /** - * Contains response data for the execute operation. + * Contains response data for the listByServerNext operation. */ -export type CheckNameAvailabilityExecuteResponse = NameAvailability & { +export type PrivateLinkResourcesListByServerNextResponse = PrivateLinkResourceListResult & { /** * The underlying HTTP response. */ @@ -1341,14 +3106,34 @@ export type CheckNameAvailabilityExecuteResponse = NameAvailability & { /** * The response body as parsed JSON or XML */ - parsedBody: NameAvailability; + parsedBody: PrivateLinkResourceListResult; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type ServerKeysListResponse = ServerKeyListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServerKeyListResult; }; }; /** * Contains response data for the get operation. */ -export type ServerSecurityAlertPoliciesGetResponse = ServerSecurityAlertPolicy & { +export type ServerKeysGetResponse = ServerKey & { /** * The underlying HTTP response. */ @@ -1361,14 +3146,14 @@ export type ServerSecurityAlertPoliciesGetResponse = ServerSecurityAlertPolicy & /** * The response body as parsed JSON or XML */ - parsedBody: ServerSecurityAlertPolicy; + parsedBody: ServerKey; }; }; /** * Contains response data for the createOrUpdate operation. */ -export type ServerSecurityAlertPoliciesCreateOrUpdateResponse = ServerSecurityAlertPolicy & { +export type ServerKeysCreateOrUpdateResponse = ServerKey & { /** * The underlying HTTP response. */ @@ -1381,14 +3166,14 @@ export type ServerSecurityAlertPoliciesCreateOrUpdateResponse = ServerSecurityAl /** * The response body as parsed JSON or XML */ - parsedBody: ServerSecurityAlertPolicy; + parsedBody: ServerKey; }; }; /** * Contains response data for the beginCreateOrUpdate operation. */ -export type ServerSecurityAlertPoliciesBeginCreateOrUpdateResponse = ServerSecurityAlertPolicy & { +export type ServerKeysBeginCreateOrUpdateResponse = ServerKey & { /** * The underlying HTTP response. */ @@ -1401,14 +3186,14 @@ export type ServerSecurityAlertPoliciesBeginCreateOrUpdateResponse = ServerSecur /** * The response body as parsed JSON or XML */ - parsedBody: ServerSecurityAlertPolicy; + parsedBody: ServerKey; }; }; /** - * Contains response data for the list operation. + * Contains response data for the listNext operation. */ -export type OperationsListResponse = OperationListResult & { +export type ServerKeysListNextResponse = ServerKeyListResult & { /** * The underlying HTTP response. */ @@ -1421,6 +3206,6 @@ export type OperationsListResponse = OperationListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: OperationListResult; + parsedBody: ServerKeyListResult; }; }; diff --git a/sdk/mysql/arm-mysql/src/models/locationBasedPerformanceTierMappers.ts b/sdk/mysql/arm-mysql/src/models/locationBasedPerformanceTierMappers.ts index a4911d3e4ae0..b25abbd987af 100644 --- a/sdk/mysql/arm-mysql/src/models/locationBasedPerformanceTierMappers.ts +++ b/sdk/mysql/arm-mysql/src/models/locationBasedPerformanceTierMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -9,6 +9,8 @@ export { discriminators, CloudError, + ErrorAdditionalInfo, + ErrorResponse, PerformanceTierListResult, PerformanceTierProperties, PerformanceTierServiceLevelObjectives diff --git a/sdk/mysql/arm-mysql/src/models/locationBasedRecommendedActionSessionsOperationStatusMappers.ts b/sdk/mysql/arm-mysql/src/models/locationBasedRecommendedActionSessionsOperationStatusMappers.ts new file mode 100644 index 000000000000..ff2a4816f96f --- /dev/null +++ b/sdk/mysql/arm-mysql/src/models/locationBasedRecommendedActionSessionsOperationStatusMappers.ts @@ -0,0 +1,13 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + CloudError, + RecommendedActionSessionsOperationStatus +} from "../models/mappers"; diff --git a/sdk/mysql/arm-mysql/src/models/locationBasedRecommendedActionSessionsResultMappers.ts b/sdk/mysql/arm-mysql/src/models/locationBasedRecommendedActionSessionsResultMappers.ts new file mode 100644 index 000000000000..deafb24c5207 --- /dev/null +++ b/sdk/mysql/arm-mysql/src/models/locationBasedRecommendedActionSessionsResultMappers.ts @@ -0,0 +1,44 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + Advisor, + AzureEntityResource, + BaseResource, + CloudError, + Configuration, + Database, + FirewallRule, + LogFile, + PrivateEndpointConnection, + PrivateEndpointProperty, + PrivateLinkResource, + PrivateLinkResourceProperties, + PrivateLinkServiceConnectionStateProperty, + ProxyResource, + QueryStatistic, + QueryText, + RecommendationAction, + RecommendationActionsResultList, + RecoverableServerResource, + Resource, + ResourceIdentity, + Server, + ServerAdministratorResource, + ServerKey, + ServerPrivateEndpointConnection, + ServerPrivateEndpointConnectionProperties, + ServerPrivateLinkServiceConnectionStateProperty, + ServerSecurityAlertPolicy, + Sku, + StorageProfile, + TrackedResource, + VirtualNetworkRule, + WaitStatistic +} from "../models/mappers"; diff --git a/sdk/mysql/arm-mysql/src/models/logFilesMappers.ts b/sdk/mysql/arm-mysql/src/models/logFilesMappers.ts index b6832542b835..c2ca049b38d5 100644 --- a/sdk/mysql/arm-mysql/src/models/logFilesMappers.ts +++ b/sdk/mysql/arm-mysql/src/models/logFilesMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -8,18 +8,39 @@ export { discriminators, + Advisor, + AzureEntityResource, BaseResource, CloudError, Configuration, Database, + ErrorAdditionalInfo, + ErrorResponse, FirewallRule, LogFile, LogFileListResult, + PrivateEndpointConnection, + PrivateEndpointProperty, + PrivateLinkResource, + PrivateLinkResourceProperties, + PrivateLinkServiceConnectionStateProperty, ProxyResource, + QueryStatistic, + QueryText, + RecommendationAction, + RecoverableServerResource, + Resource, + ResourceIdentity, Server, + ServerAdministratorResource, + ServerKey, + ServerPrivateEndpointConnection, + ServerPrivateEndpointConnectionProperties, + ServerPrivateLinkServiceConnectionStateProperty, ServerSecurityAlertPolicy, Sku, StorageProfile, TrackedResource, - VirtualNetworkRule + VirtualNetworkRule, + WaitStatistic } from "../models/mappers"; diff --git a/sdk/mysql/arm-mysql/src/models/mappers.ts b/sdk/mysql/arm-mysql/src/models/mappers.ts index ba6229c5b54f..f8eda1559004 100644 --- a/sdk/mysql/arm-mysql/src/models/mappers.ts +++ b/sdk/mysql/arm-mysql/src/models/mappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -12,29 +12,76 @@ import * as msRest from "@azure/ms-rest-js"; export const CloudError = CloudErrorMapper; export const BaseResource = BaseResourceMapper; -export const ProxyResource: msRest.CompositeMapper = { - serializedName: "ProxyResource", +export const PrivateEndpointProperty: msRest.CompositeMapper = { + serializedName: "PrivateEndpointProperty", type: { name: "Composite", - className: "ProxyResource", + className: "PrivateEndpointProperty", modelProperties: { id: { - readOnly: true, serializedName: "id", type: { name: "String" } + } + } + } +}; + +export const ServerPrivateLinkServiceConnectionStateProperty: msRest.CompositeMapper = { + serializedName: "ServerPrivateLinkServiceConnectionStateProperty", + type: { + name: "Composite", + className: "ServerPrivateLinkServiceConnectionStateProperty", + modelProperties: { + status: { + required: true, + serializedName: "status", + type: { + name: "String" + } }, - name: { + description: { + required: true, + serializedName: "description", + type: { + name: "String" + } + }, + actionsRequired: { readOnly: true, - serializedName: "name", + serializedName: "actionsRequired", type: { name: "String" } + } + } + } +}; + +export const ServerPrivateEndpointConnectionProperties: msRest.CompositeMapper = { + serializedName: "ServerPrivateEndpointConnectionProperties", + type: { + name: "Composite", + className: "ServerPrivateEndpointConnectionProperties", + modelProperties: { + privateEndpoint: { + serializedName: "privateEndpoint", + type: { + name: "Composite", + className: "PrivateEndpointProperty" + } }, - type: { + privateLinkServiceConnectionState: { + serializedName: "privateLinkServiceConnectionState", + type: { + name: "Composite", + className: "ServerPrivateLinkServiceConnectionStateProperty" + } + }, + provisioningState: { readOnly: true, - serializedName: "type", + serializedName: "provisioningState", type: { name: "String" } @@ -43,29 +90,25 @@ export const ProxyResource: msRest.CompositeMapper = { } }; -export const TrackedResource: msRest.CompositeMapper = { - serializedName: "TrackedResource", +export const ServerPrivateEndpointConnection: msRest.CompositeMapper = { + serializedName: "ServerPrivateEndpointConnection", type: { name: "Composite", - className: "TrackedResource", + className: "ServerPrivateEndpointConnection", modelProperties: { - ...ProxyResource.type.modelProperties, - location: { - required: true, - serializedName: "location", + id: { + readOnly: true, + serializedName: "id", type: { name: "String" } }, - tags: { - serializedName: "tags", + properties: { + readOnly: true, + serializedName: "properties", type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } + name: "Composite", + className: "ServerPrivateEndpointConnectionProperties" } } } @@ -133,6 +176,24 @@ export const ServerPropertiesForCreate: msRest.CompositeMapper = { ] } }, + minimalTlsVersion: { + serializedName: "minimalTlsVersion", + type: { + name: "String" + } + }, + infrastructureEncryption: { + serializedName: "infrastructureEncryption", + type: { + name: "String" + } + }, + publicNetworkAccess: { + serializedName: "publicNetworkAccess", + type: { + name: "String" + } + }, storageProfile: { serializedName: "storageProfile", type: { @@ -252,6 +313,7 @@ export const Sku: msRest.CompositeMapper = { className: "Sku", modelProperties: { name: { + required: true, serializedName: "name", type: { name: "String" @@ -288,6 +350,96 @@ export const Sku: msRest.CompositeMapper = { } }; +export const ResourceIdentity: msRest.CompositeMapper = { + serializedName: "ResourceIdentity", + type: { + name: "Composite", + className: "ResourceIdentity", + modelProperties: { + principalId: { + readOnly: true, + serializedName: "principalId", + type: { + name: "Uuid" + } + }, + type: { + serializedName: "type", + type: { + name: "String" + } + }, + tenantId: { + readOnly: true, + serializedName: "tenantId", + type: { + name: "Uuid" + } + } + } + } +}; + +export const Resource: msRest.CompositeMapper = { + serializedName: "Resource", + type: { + name: "Composite", + className: "Resource", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const TrackedResource: msRest.CompositeMapper = { + serializedName: "TrackedResource", + type: { + name: "Composite", + className: "TrackedResource", + modelProperties: { + ...Resource.type.modelProperties, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + location: { + required: true, + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + export const Server: msRest.CompositeMapper = { serializedName: "Server", type: { @@ -295,6 +447,13 @@ export const Server: msRest.CompositeMapper = { className: "Server", modelProperties: { ...TrackedResource.type.modelProperties, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "ResourceIdentity" + } + }, sku: { serializedName: "sku", type: { @@ -324,6 +483,25 @@ export const Server: msRest.CompositeMapper = { ] } }, + minimalTlsVersion: { + serializedName: "properties.minimalTlsVersion", + type: { + name: "String" + } + }, + byokEnforcement: { + readOnly: true, + serializedName: "properties.byokEnforcement", + type: { + name: "String" + } + }, + infrastructureEncryption: { + serializedName: "properties.infrastructureEncryption", + type: { + name: "String" + } + }, userVisibleState: { serializedName: "properties.userVisibleState", type: { @@ -369,6 +547,25 @@ export const Server: msRest.CompositeMapper = { type: { name: "Number" } + }, + publicNetworkAccess: { + serializedName: "properties.publicNetworkAccess", + type: { + name: "String" + } + }, + privateEndpointConnections: { + readOnly: true, + serializedName: "properties.privateEndpointConnections", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ServerPrivateEndpointConnection" + } + } + } } } } @@ -380,6 +577,13 @@ export const ServerForCreate: msRest.CompositeMapper = { name: "Composite", className: "ServerForCreate", modelProperties: { + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "ResourceIdentity" + } + }, sku: { serializedName: "sku", type: { @@ -423,6 +627,13 @@ export const ServerUpdateParameters: msRest.CompositeMapper = { name: "Composite", className: "ServerUpdateParameters", modelProperties: { + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "ResourceIdentity" + } + }, sku: { serializedName: "sku", type: { @@ -459,6 +670,18 @@ export const ServerUpdateParameters: msRest.CompositeMapper = { ] } }, + minimalTlsVersion: { + serializedName: "properties.minimalTlsVersion", + type: { + name: "String" + } + }, + publicNetworkAccess: { + serializedName: "properties.publicNetworkAccess", + type: { + name: "String" + } + }, replicationRole: { serializedName: "properties.replicationRole", type: { @@ -480,6 +703,17 @@ export const ServerUpdateParameters: msRest.CompositeMapper = { } }; +export const ProxyResource: msRest.CompositeMapper = { + serializedName: "ProxyResource", + type: { + name: "Composite", + className: "ProxyResource", + modelProperties: { + ...Resource.type.modelProperties + } + } +}; + export const FirewallRule: msRest.CompositeMapper = { serializedName: "FirewallRule", type: { @@ -833,6 +1067,42 @@ export const PerformanceTierProperties: msRest.CompositeMapper = { name: "String" } }, + maxBackupRetentionDays: { + serializedName: "maxBackupRetentionDays", + type: { + name: "Number" + } + }, + minBackupRetentionDays: { + serializedName: "minBackupRetentionDays", + type: { + name: "Number" + } + }, + maxStorageMB: { + serializedName: "maxStorageMB", + type: { + name: "Number" + } + }, + minLargeStorageMB: { + serializedName: "minLargeStorageMB", + type: { + name: "Number" + } + }, + maxLargeStorageMB: { + serializedName: "maxLargeStorageMB", + type: { + name: "Number" + } + }, + minStorageMB: { + serializedName: "minStorageMB", + type: { + name: "Number" + } + }, serviceLevelObjectives: { serializedName: "serviceLevelObjectives", type: { @@ -900,20 +1170,213 @@ export const NameAvailability: msRest.CompositeMapper = { } }; -export const ServerSecurityAlertPolicy: msRest.CompositeMapper = { - serializedName: "ServerSecurityAlertPolicy", +export const ErrorAdditionalInfo: msRest.CompositeMapper = { + serializedName: "ErrorAdditionalInfo", type: { name: "Composite", - className: "ServerSecurityAlertPolicy", + className: "ErrorAdditionalInfo", modelProperties: { - ...ProxyResource.type.modelProperties, - state: { - required: true, - serializedName: "properties.state", + type: { + readOnly: true, + serializedName: "type", type: { - name: "Enum", - allowedValues: [ - "Enabled", + name: "String" + } + }, + info: { + readOnly: true, + serializedName: "info", + type: { + name: "Object" + } + } + } + } +}; + +export const ErrorResponse: msRest.CompositeMapper = { + serializedName: "ErrorResponse", + type: { + name: "Composite", + className: "ErrorResponse", + modelProperties: { + code: { + readOnly: true, + serializedName: "code", + type: { + name: "String" + } + }, + message: { + readOnly: true, + serializedName: "message", + type: { + name: "String" + } + }, + target: { + readOnly: true, + serializedName: "target", + type: { + name: "String" + } + }, + details: { + readOnly: true, + serializedName: "details", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorResponse" + } + } + } + }, + additionalInfo: { + readOnly: true, + serializedName: "additionalInfo", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorAdditionalInfo" + } + } + } + } + } + } +}; + +export const ServerAdministratorResource: msRest.CompositeMapper = { + serializedName: "ServerAdministratorResource", + type: { + name: "Composite", + className: "ServerAdministratorResource", + modelProperties: { + ...ProxyResource.type.modelProperties, + administratorType: { + required: true, + isConstant: true, + serializedName: "properties.administratorType", + defaultValue: 'ActiveDirectory', + type: { + name: "String" + } + }, + login: { + required: true, + serializedName: "properties.login", + type: { + name: "String" + } + }, + sid: { + required: true, + serializedName: "properties.sid", + type: { + name: "Uuid" + } + }, + tenantId: { + required: true, + serializedName: "properties.tenantId", + type: { + name: "Uuid" + } + } + } + } +}; + +export const RecoverableServerResource: msRest.CompositeMapper = { + serializedName: "RecoverableServerResource", + type: { + name: "Composite", + className: "RecoverableServerResource", + modelProperties: { + ...ProxyResource.type.modelProperties, + lastAvailableBackupDateTime: { + readOnly: true, + serializedName: "properties.lastAvailableBackupDateTime", + type: { + name: "String" + } + }, + serviceLevelObjective: { + readOnly: true, + serializedName: "properties.serviceLevelObjective", + type: { + name: "String" + } + }, + edition: { + readOnly: true, + serializedName: "properties.edition", + type: { + name: "String" + } + }, + vCore: { + readOnly: true, + serializedName: "properties.vCore", + type: { + name: "Number" + } + }, + hardwareGeneration: { + readOnly: true, + serializedName: "properties.hardwareGeneration", + type: { + name: "String" + } + }, + version: { + readOnly: true, + serializedName: "properties.version", + type: { + name: "String" + } + } + } + } +}; + +export const AzureEntityResource: msRest.CompositeMapper = { + serializedName: "AzureEntityResource", + type: { + name: "Composite", + className: "AzureEntityResource", + modelProperties: { + ...Resource.type.modelProperties, + etag: { + readOnly: true, + serializedName: "etag", + type: { + name: "String" + } + } + } + } +}; + +export const ServerSecurityAlertPolicy: msRest.CompositeMapper = { + serializedName: "ServerSecurityAlertPolicy", + type: { + name: "Composite", + className: "ServerSecurityAlertPolicy", + modelProperties: { + ...ProxyResource.type.modelProperties, + state: { + required: true, + serializedName: "properties.state", + type: { + name: "Enum", + allowedValues: [ + "Enabled", "Disabled" ] } @@ -961,7 +1424,573 @@ export const ServerSecurityAlertPolicy: msRest.CompositeMapper = { retentionDays: { serializedName: "properties.retentionDays", type: { - name: "Number" + name: "Number" + } + } + } + } +}; + +export const QueryText: msRest.CompositeMapper = { + serializedName: "QueryText", + type: { + name: "Composite", + className: "QueryText", + modelProperties: { + ...ProxyResource.type.modelProperties, + queryId: { + serializedName: "properties.queryId", + type: { + name: "String" + } + }, + queryText: { + serializedName: "properties.queryText", + type: { + name: "String" + } + } + } + } +}; + +export const TopQueryStatisticsInput: msRest.CompositeMapper = { + serializedName: "TopQueryStatisticsInput", + type: { + name: "Composite", + className: "TopQueryStatisticsInput", + modelProperties: { + numberOfTopQueries: { + required: true, + serializedName: "properties.numberOfTopQueries", + type: { + name: "Number" + } + }, + aggregationFunction: { + required: true, + serializedName: "properties.aggregationFunction", + type: { + name: "String" + } + }, + observedMetric: { + required: true, + serializedName: "properties.observedMetric", + type: { + name: "String" + } + }, + observationStartTime: { + required: true, + serializedName: "properties.observationStartTime", + type: { + name: "DateTime" + } + }, + observationEndTime: { + required: true, + serializedName: "properties.observationEndTime", + type: { + name: "DateTime" + } + }, + aggregationWindow: { + required: true, + serializedName: "properties.aggregationWindow", + type: { + name: "String" + } + } + } + } +}; + +export const QueryStatistic: msRest.CompositeMapper = { + serializedName: "QueryStatistic", + type: { + name: "Composite", + className: "QueryStatistic", + modelProperties: { + ...ProxyResource.type.modelProperties, + queryId: { + serializedName: "properties.queryId", + type: { + name: "String" + } + }, + startTime: { + serializedName: "properties.startTime", + type: { + name: "DateTime" + } + }, + endTime: { + serializedName: "properties.endTime", + type: { + name: "DateTime" + } + }, + aggregationFunction: { + serializedName: "properties.aggregationFunction", + type: { + name: "String" + } + }, + databaseNames: { + serializedName: "properties.databaseNames", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + queryExecutionCount: { + serializedName: "properties.queryExecutionCount", + type: { + name: "Number" + } + }, + metricName: { + serializedName: "properties.metricName", + type: { + name: "String" + } + }, + metricDisplayName: { + serializedName: "properties.metricDisplayName", + type: { + name: "String" + } + }, + metricValue: { + serializedName: "properties.metricValue", + type: { + name: "Number" + } + }, + metricValueUnit: { + serializedName: "properties.metricValueUnit", + type: { + name: "String" + } + } + } + } +}; + +export const WaitStatisticsInput: msRest.CompositeMapper = { + serializedName: "WaitStatisticsInput", + type: { + name: "Composite", + className: "WaitStatisticsInput", + modelProperties: { + observationStartTime: { + required: true, + serializedName: "properties.observationStartTime", + type: { + name: "DateTime" + } + }, + observationEndTime: { + required: true, + serializedName: "properties.observationEndTime", + type: { + name: "DateTime" + } + }, + aggregationWindow: { + required: true, + serializedName: "properties.aggregationWindow", + type: { + name: "String" + } + } + } + } +}; + +export const WaitStatistic: msRest.CompositeMapper = { + serializedName: "WaitStatistic", + type: { + name: "Composite", + className: "WaitStatistic", + modelProperties: { + ...ProxyResource.type.modelProperties, + startTime: { + serializedName: "properties.startTime", + type: { + name: "DateTime" + } + }, + endTime: { + serializedName: "properties.endTime", + type: { + name: "DateTime" + } + }, + eventName: { + serializedName: "properties.eventName", + type: { + name: "String" + } + }, + eventTypeName: { + serializedName: "properties.eventTypeName", + type: { + name: "String" + } + }, + queryId: { + serializedName: "properties.queryId", + type: { + name: "Number" + } + }, + databaseName: { + serializedName: "properties.databaseName", + type: { + name: "String" + } + }, + userId: { + serializedName: "properties.userId", + type: { + name: "Number" + } + }, + count: { + serializedName: "properties.count", + type: { + name: "Number" + } + }, + totalTimeInMs: { + serializedName: "properties.totalTimeInMs", + type: { + name: "Number" + } + } + } + } +}; + +export const QueryPerformanceInsightResetDataResult: msRest.CompositeMapper = { + serializedName: "QueryPerformanceInsightResetDataResult", + type: { + name: "Composite", + className: "QueryPerformanceInsightResetDataResult", + modelProperties: { + status: { + serializedName: "status", + type: { + name: "String" + } + }, + message: { + serializedName: "message", + type: { + name: "String" + } + } + } + } +}; + +export const Advisor: msRest.CompositeMapper = { + serializedName: "Advisor", + type: { + name: "Composite", + className: "Advisor", + modelProperties: { + ...ProxyResource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Object" + } + } + } + } +}; + +export const RecommendationAction: msRest.CompositeMapper = { + serializedName: "RecommendationAction", + type: { + name: "Composite", + className: "RecommendationAction", + modelProperties: { + ...ProxyResource.type.modelProperties, + advisorName: { + serializedName: "properties.advisorName", + type: { + name: "String" + } + }, + sessionId: { + serializedName: "properties.sessionId", + type: { + name: "String" + } + }, + actionId: { + serializedName: "properties.actionId", + type: { + name: "Number" + } + }, + createdTime: { + serializedName: "properties.createdTime", + type: { + name: "DateTime" + } + }, + expirationTime: { + serializedName: "properties.expirationTime", + type: { + name: "DateTime" + } + }, + reason: { + serializedName: "properties.reason", + type: { + name: "String" + } + }, + recommendationType: { + serializedName: "properties.recommendationType", + type: { + name: "String" + } + }, + details: { + serializedName: "properties.details", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const RecommendedActionSessionsOperationStatus: msRest.CompositeMapper = { + serializedName: "RecommendedActionSessionsOperationStatus", + type: { + name: "Composite", + className: "RecommendedActionSessionsOperationStatus", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + startTime: { + serializedName: "startTime", + type: { + name: "DateTime" + } + }, + status: { + serializedName: "status", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateLinkServiceConnectionStateProperty: msRest.CompositeMapper = { + serializedName: "PrivateLinkServiceConnectionStateProperty", + type: { + name: "Composite", + className: "PrivateLinkServiceConnectionStateProperty", + modelProperties: { + status: { + required: true, + serializedName: "status", + type: { + name: "String" + } + }, + description: { + required: true, + serializedName: "description", + type: { + name: "String" + } + }, + actionsRequired: { + readOnly: true, + serializedName: "actionsRequired", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateEndpointConnection: msRest.CompositeMapper = { + serializedName: "PrivateEndpointConnection", + type: { + name: "Composite", + className: "PrivateEndpointConnection", + modelProperties: { + ...ProxyResource.type.modelProperties, + privateEndpoint: { + serializedName: "properties.privateEndpoint", + type: { + name: "Composite", + className: "PrivateEndpointProperty" + } + }, + privateLinkServiceConnectionState: { + serializedName: "properties.privateLinkServiceConnectionState", + type: { + name: "Composite", + className: "PrivateLinkServiceConnectionStateProperty" + } + }, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + } + } + } +}; + +export const TagsObject: msRest.CompositeMapper = { + serializedName: "TagsObject", + type: { + name: "Composite", + className: "TagsObject", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const PrivateLinkResourceProperties: msRest.CompositeMapper = { + serializedName: "PrivateLinkResourceProperties", + type: { + name: "Composite", + className: "PrivateLinkResourceProperties", + modelProperties: { + groupId: { + readOnly: true, + serializedName: "groupId", + type: { + name: "String" + } + }, + requiredMembers: { + readOnly: true, + serializedName: "requiredMembers", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const PrivateLinkResource: msRest.CompositeMapper = { + serializedName: "PrivateLinkResource", + type: { + name: "Composite", + className: "PrivateLinkResource", + modelProperties: { + ...ProxyResource.type.modelProperties, + properties: { + readOnly: true, + serializedName: "properties", + type: { + name: "Composite", + className: "PrivateLinkResourceProperties" + } + } + } + } +}; + +export const ServerKey: msRest.CompositeMapper = { + serializedName: "ServerKey", + type: { + name: "Composite", + className: "ServerKey", + modelProperties: { + ...ProxyResource.type.modelProperties, + kind: { + readOnly: true, + serializedName: "kind", + type: { + name: "String" + } + }, + serverKeyType: { + required: true, + isConstant: true, + serializedName: "properties.serverKeyType", + defaultValue: 'AzureKeyVault', + type: { + name: "String" + } + }, + uri: { + serializedName: "properties.uri", + type: { + name: "String" + } + }, + creationDate: { + readOnly: true, + serializedName: "properties.creationDate", + type: { + name: "DateTime" + } + } + } + } +}; + +export const ServerUpgradeParameters: msRest.CompositeMapper = { + serializedName: "ServerUpgradeParameters", + type: { + name: "Composite", + className: "ServerUpgradeParameters", + modelProperties: { + targetServerVersion: { + serializedName: "properties.targetServerVersion", + type: { + name: "String" } } } @@ -1108,6 +2137,28 @@ export const LogFileListResult: msRest.CompositeMapper = { } }; +export const ServerAdministratorResourceListResult: msRest.CompositeMapper = { + serializedName: "ServerAdministratorResourceListResult", + type: { + name: "Composite", + className: "ServerAdministratorResourceListResult", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ServerAdministratorResource" + } + } + } + } + } + } +}; + export const PerformanceTierListResult: msRest.CompositeMapper = { serializedName: "PerformanceTierListResult", type: { @@ -1130,6 +2181,276 @@ export const PerformanceTierListResult: msRest.CompositeMapper = { } }; +export const ServerSecurityAlertPolicyListResult: msRest.CompositeMapper = { + serializedName: "ServerSecurityAlertPolicyListResult", + type: { + name: "Composite", + className: "ServerSecurityAlertPolicyListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ServerSecurityAlertPolicy" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const QueryTextsResultList: msRest.CompositeMapper = { + serializedName: "QueryTextsResultList", + type: { + name: "Composite", + className: "QueryTextsResultList", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "QueryText" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const TopQueryStatisticsResultList: msRest.CompositeMapper = { + serializedName: "TopQueryStatisticsResultList", + type: { + name: "Composite", + className: "TopQueryStatisticsResultList", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "QueryStatistic" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const WaitStatisticsResultList: msRest.CompositeMapper = { + serializedName: "WaitStatisticsResultList", + type: { + name: "Composite", + className: "WaitStatisticsResultList", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "WaitStatistic" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const AdvisorsResultList: msRest.CompositeMapper = { + serializedName: "AdvisorsResultList", + type: { + name: "Composite", + className: "AdvisorsResultList", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Advisor" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const RecommendationActionsResultList: msRest.CompositeMapper = { + serializedName: "RecommendationActionsResultList", + type: { + name: "Composite", + className: "RecommendationActionsResultList", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RecommendationAction" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateEndpointConnectionListResult: msRest.CompositeMapper = { + serializedName: "PrivateEndpointConnectionListResult", + type: { + name: "Composite", + className: "PrivateEndpointConnectionListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateEndpointConnection" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateLinkResourceListResult: msRest.CompositeMapper = { + serializedName: "PrivateLinkResourceListResult", + type: { + name: "Composite", + className: "PrivateLinkResourceListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateLinkResource" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const ServerKeyListResult: msRest.CompositeMapper = { + serializedName: "ServerKeyListResult", + type: { + name: "Composite", + className: "ServerKeyListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ServerKey" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + export const discriminators = { 'ServerPropertiesForCreate' : ServerPropertiesForCreate, 'ServerPropertiesForCreate.Default' : ServerPropertiesForDefaultCreate, diff --git a/sdk/mysql/arm-mysql/src/models/operationsMappers.ts b/sdk/mysql/arm-mysql/src/models/operationsMappers.ts index 65fc7dd1800a..324f42f8d515 100644 --- a/sdk/mysql/arm-mysql/src/models/operationsMappers.ts +++ b/sdk/mysql/arm-mysql/src/models/operationsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -9,6 +9,8 @@ export { discriminators, CloudError, + ErrorAdditionalInfo, + ErrorResponse, Operation, OperationDisplay, OperationListResult diff --git a/sdk/mysql/arm-mysql/src/models/parameters.ts b/sdk/mysql/arm-mysql/src/models/parameters.ts index 7dbc0227f6c5..c54178d0d7b7 100644 --- a/sdk/mysql/arm-mysql/src/models/parameters.ts +++ b/sdk/mysql/arm-mysql/src/models/parameters.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -20,11 +19,56 @@ export const acceptLanguage: msRest.OperationParameter = { } } }; -export const apiVersion: msRest.OperationQueryParameter = { +export const advisorName: msRest.OperationURLParameter = { + parameterPath: "advisorName", + mapper: { + required: true, + serializedName: "advisorName", + type: { + name: "String" + } + } +}; +export const apiVersion0: msRest.OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + required: true, + isConstant: true, + serializedName: "api-version", + defaultValue: '2017-12-01', + constraints: { + MinLength: 1 + }, + type: { + name: "String" + } + } +}; +export const apiVersion1: msRest.OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + required: true, + isConstant: true, + serializedName: "api-version", + defaultValue: '2020-01-01', + constraints: { + MinLength: 1 + }, + type: { + name: "String" + } + } +}; +export const apiVersion2: msRest.OperationQueryParameter = { parameterPath: "apiVersion", mapper: { required: true, + isConstant: true, serializedName: "api-version", + defaultValue: '2018-06-01', + constraints: { + MinLength: 1 + }, type: { name: "String" } @@ -60,6 +104,26 @@ export const firewallRuleName: msRest.OperationURLParameter = { } } }; +export const groupName: msRest.OperationURLParameter = { + parameterPath: "groupName", + mapper: { + required: true, + serializedName: "groupName", + type: { + name: "String" + } + } +}; +export const keyName: msRest.OperationURLParameter = { + parameterPath: "keyName", + mapper: { + required: true, + serializedName: "keyName", + type: { + name: "String" + } + } +}; export const locationName: msRest.OperationURLParameter = { parameterPath: "locationName", mapper: { @@ -81,11 +145,81 @@ export const nextPageLink: msRest.OperationURLParameter = { }, skipEncoding: true }; +export const operationId: msRest.OperationURLParameter = { + parameterPath: "operationId", + mapper: { + required: true, + serializedName: "operationId", + type: { + name: "String" + } + } +}; +export const privateEndpointConnectionName: msRest.OperationURLParameter = { + parameterPath: "privateEndpointConnectionName", + mapper: { + required: true, + serializedName: "privateEndpointConnectionName", + type: { + name: "String" + } + } +}; +export const queryId: msRest.OperationURLParameter = { + parameterPath: "queryId", + mapper: { + required: true, + serializedName: "queryId", + type: { + name: "String" + } + } +}; +export const queryIds: msRest.OperationQueryParameter = { + parameterPath: "queryIds", + mapper: { + required: true, + serializedName: "queryIds", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + collectionFormat: msRest.QueryCollectionFormat.Multi +}; +export const queryStatisticId: msRest.OperationURLParameter = { + parameterPath: "queryStatisticId", + mapper: { + required: true, + serializedName: "queryStatisticId", + type: { + name: "String" + } + } +}; +export const recommendedActionName: msRest.OperationURLParameter = { + parameterPath: "recommendedActionName", + mapper: { + required: true, + serializedName: "recommendedActionName", + type: { + name: "String" + } + } +}; export const resourceGroupName: msRest.OperationURLParameter = { parameterPath: "resourceGroupName", mapper: { required: true, serializedName: "resourceGroupName", + constraints: { + MaxLength: 90, + MinLength: 1 + }, type: { name: "String" } @@ -113,11 +247,26 @@ export const serverName: msRest.OperationURLParameter = { } } }; +export const sessionId: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "sessionId" + ], + mapper: { + serializedName: "sessionId", + type: { + name: "String" + } + } +}; export const subscriptionId: msRest.OperationURLParameter = { parameterPath: "subscriptionId", mapper: { required: true, serializedName: "subscriptionId", + constraints: { + MinLength: 1 + }, type: { name: "String" } @@ -133,3 +282,13 @@ export const virtualNetworkRuleName: msRest.OperationURLParameter = { } } }; +export const waitStatisticsId: msRest.OperationURLParameter = { + parameterPath: "waitStatisticsId", + mapper: { + required: true, + serializedName: "waitStatisticsId", + type: { + name: "String" + } + } +}; diff --git a/sdk/mysql/arm-mysql/src/models/privateEndpointConnectionsMappers.ts b/sdk/mysql/arm-mysql/src/models/privateEndpointConnectionsMappers.ts new file mode 100644 index 000000000000..9f61628ff429 --- /dev/null +++ b/sdk/mysql/arm-mysql/src/models/privateEndpointConnectionsMappers.ts @@ -0,0 +1,47 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + Advisor, + AzureEntityResource, + BaseResource, + CloudError, + Configuration, + Database, + ErrorAdditionalInfo, + ErrorResponse, + FirewallRule, + LogFile, + PrivateEndpointConnection, + PrivateEndpointConnectionListResult, + PrivateEndpointProperty, + PrivateLinkResource, + PrivateLinkResourceProperties, + PrivateLinkServiceConnectionStateProperty, + ProxyResource, + QueryStatistic, + QueryText, + RecommendationAction, + RecoverableServerResource, + Resource, + ResourceIdentity, + Server, + ServerAdministratorResource, + ServerKey, + ServerPrivateEndpointConnection, + ServerPrivateEndpointConnectionProperties, + ServerPrivateLinkServiceConnectionStateProperty, + ServerSecurityAlertPolicy, + Sku, + StorageProfile, + TagsObject, + TrackedResource, + VirtualNetworkRule, + WaitStatistic +} from "../models/mappers"; diff --git a/sdk/mysql/arm-mysql/src/models/privateLinkResourcesMappers.ts b/sdk/mysql/arm-mysql/src/models/privateLinkResourcesMappers.ts new file mode 100644 index 000000000000..069551e39e5a --- /dev/null +++ b/sdk/mysql/arm-mysql/src/models/privateLinkResourcesMappers.ts @@ -0,0 +1,46 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + Advisor, + AzureEntityResource, + BaseResource, + CloudError, + Configuration, + Database, + ErrorAdditionalInfo, + ErrorResponse, + FirewallRule, + LogFile, + PrivateEndpointConnection, + PrivateEndpointProperty, + PrivateLinkResource, + PrivateLinkResourceListResult, + PrivateLinkResourceProperties, + PrivateLinkServiceConnectionStateProperty, + ProxyResource, + QueryStatistic, + QueryText, + RecommendationAction, + RecoverableServerResource, + Resource, + ResourceIdentity, + Server, + ServerAdministratorResource, + ServerKey, + ServerPrivateEndpointConnection, + ServerPrivateEndpointConnectionProperties, + ServerPrivateLinkServiceConnectionStateProperty, + ServerSecurityAlertPolicy, + Sku, + StorageProfile, + TrackedResource, + VirtualNetworkRule, + WaitStatistic +} from "../models/mappers"; diff --git a/sdk/mysql/arm-mysql/src/models/queryTextsMappers.ts b/sdk/mysql/arm-mysql/src/models/queryTextsMappers.ts new file mode 100644 index 000000000000..d39a9e2c34c3 --- /dev/null +++ b/sdk/mysql/arm-mysql/src/models/queryTextsMappers.ts @@ -0,0 +1,46 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + Advisor, + AzureEntityResource, + BaseResource, + CloudError, + Configuration, + Database, + ErrorAdditionalInfo, + ErrorResponse, + FirewallRule, + LogFile, + PrivateEndpointConnection, + PrivateEndpointProperty, + PrivateLinkResource, + PrivateLinkResourceProperties, + PrivateLinkServiceConnectionStateProperty, + ProxyResource, + QueryStatistic, + QueryText, + QueryTextsResultList, + RecommendationAction, + RecoverableServerResource, + Resource, + ResourceIdentity, + Server, + ServerAdministratorResource, + ServerKey, + ServerPrivateEndpointConnection, + ServerPrivateEndpointConnectionProperties, + ServerPrivateLinkServiceConnectionStateProperty, + ServerSecurityAlertPolicy, + Sku, + StorageProfile, + TrackedResource, + VirtualNetworkRule, + WaitStatistic +} from "../models/mappers"; diff --git a/sdk/mysql/arm-mysql/src/models/recommendedActionsMappers.ts b/sdk/mysql/arm-mysql/src/models/recommendedActionsMappers.ts new file mode 100644 index 000000000000..deafb24c5207 --- /dev/null +++ b/sdk/mysql/arm-mysql/src/models/recommendedActionsMappers.ts @@ -0,0 +1,44 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + Advisor, + AzureEntityResource, + BaseResource, + CloudError, + Configuration, + Database, + FirewallRule, + LogFile, + PrivateEndpointConnection, + PrivateEndpointProperty, + PrivateLinkResource, + PrivateLinkResourceProperties, + PrivateLinkServiceConnectionStateProperty, + ProxyResource, + QueryStatistic, + QueryText, + RecommendationAction, + RecommendationActionsResultList, + RecoverableServerResource, + Resource, + ResourceIdentity, + Server, + ServerAdministratorResource, + ServerKey, + ServerPrivateEndpointConnection, + ServerPrivateEndpointConnectionProperties, + ServerPrivateLinkServiceConnectionStateProperty, + ServerSecurityAlertPolicy, + Sku, + StorageProfile, + TrackedResource, + VirtualNetworkRule, + WaitStatistic +} from "../models/mappers"; diff --git a/sdk/mysql/arm-mysql/src/models/recoverableServersMappers.ts b/sdk/mysql/arm-mysql/src/models/recoverableServersMappers.ts new file mode 100644 index 000000000000..16da9a6030f9 --- /dev/null +++ b/sdk/mysql/arm-mysql/src/models/recoverableServersMappers.ts @@ -0,0 +1,45 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + Advisor, + AzureEntityResource, + BaseResource, + CloudError, + Configuration, + Database, + ErrorAdditionalInfo, + ErrorResponse, + FirewallRule, + LogFile, + PrivateEndpointConnection, + PrivateEndpointProperty, + PrivateLinkResource, + PrivateLinkResourceProperties, + PrivateLinkServiceConnectionStateProperty, + ProxyResource, + QueryStatistic, + QueryText, + RecommendationAction, + RecoverableServerResource, + Resource, + ResourceIdentity, + Server, + ServerAdministratorResource, + ServerKey, + ServerPrivateEndpointConnection, + ServerPrivateEndpointConnectionProperties, + ServerPrivateLinkServiceConnectionStateProperty, + ServerSecurityAlertPolicy, + Sku, + StorageProfile, + TrackedResource, + VirtualNetworkRule, + WaitStatistic +} from "../models/mappers"; diff --git a/sdk/mysql/arm-mysql/src/models/replicasMappers.ts b/sdk/mysql/arm-mysql/src/models/replicasMappers.ts index b86a44e417cd..b077bfd6f83c 100644 --- a/sdk/mysql/arm-mysql/src/models/replicasMappers.ts +++ b/sdk/mysql/arm-mysql/src/models/replicasMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -8,18 +8,39 @@ export { discriminators, + Advisor, + AzureEntityResource, BaseResource, CloudError, Configuration, Database, + ErrorAdditionalInfo, + ErrorResponse, FirewallRule, LogFile, + PrivateEndpointConnection, + PrivateEndpointProperty, + PrivateLinkResource, + PrivateLinkResourceProperties, + PrivateLinkServiceConnectionStateProperty, ProxyResource, + QueryStatistic, + QueryText, + RecommendationAction, + RecoverableServerResource, + Resource, + ResourceIdentity, Server, + ServerAdministratorResource, + ServerKey, ServerListResult, + ServerPrivateEndpointConnection, + ServerPrivateEndpointConnectionProperties, + ServerPrivateLinkServiceConnectionStateProperty, ServerSecurityAlertPolicy, Sku, StorageProfile, TrackedResource, - VirtualNetworkRule + VirtualNetworkRule, + WaitStatistic } from "../models/mappers"; diff --git a/sdk/mysql/arm-mysql/src/models/serverAdministratorsMappers.ts b/sdk/mysql/arm-mysql/src/models/serverAdministratorsMappers.ts new file mode 100644 index 000000000000..f357c0b66170 --- /dev/null +++ b/sdk/mysql/arm-mysql/src/models/serverAdministratorsMappers.ts @@ -0,0 +1,46 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + Advisor, + AzureEntityResource, + BaseResource, + CloudError, + Configuration, + Database, + ErrorAdditionalInfo, + ErrorResponse, + FirewallRule, + LogFile, + PrivateEndpointConnection, + PrivateEndpointProperty, + PrivateLinkResource, + PrivateLinkResourceProperties, + PrivateLinkServiceConnectionStateProperty, + ProxyResource, + QueryStatistic, + QueryText, + RecommendationAction, + RecoverableServerResource, + Resource, + ResourceIdentity, + Server, + ServerAdministratorResource, + ServerAdministratorResourceListResult, + ServerKey, + ServerPrivateEndpointConnection, + ServerPrivateEndpointConnectionProperties, + ServerPrivateLinkServiceConnectionStateProperty, + ServerSecurityAlertPolicy, + Sku, + StorageProfile, + TrackedResource, + VirtualNetworkRule, + WaitStatistic +} from "../models/mappers"; diff --git a/sdk/mysql/arm-mysql/src/models/serverBasedPerformanceTierMappers.ts b/sdk/mysql/arm-mysql/src/models/serverBasedPerformanceTierMappers.ts new file mode 100644 index 000000000000..b25abbd987af --- /dev/null +++ b/sdk/mysql/arm-mysql/src/models/serverBasedPerformanceTierMappers.ts @@ -0,0 +1,17 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + CloudError, + ErrorAdditionalInfo, + ErrorResponse, + PerformanceTierListResult, + PerformanceTierProperties, + PerformanceTierServiceLevelObjectives +} from "../models/mappers"; diff --git a/sdk/mysql/arm-mysql/src/models/serverKeysMappers.ts b/sdk/mysql/arm-mysql/src/models/serverKeysMappers.ts new file mode 100644 index 000000000000..1f6c9dca0cd6 --- /dev/null +++ b/sdk/mysql/arm-mysql/src/models/serverKeysMappers.ts @@ -0,0 +1,46 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + Advisor, + AzureEntityResource, + BaseResource, + CloudError, + Configuration, + Database, + ErrorAdditionalInfo, + ErrorResponse, + FirewallRule, + LogFile, + PrivateEndpointConnection, + PrivateEndpointProperty, + PrivateLinkResource, + PrivateLinkResourceProperties, + PrivateLinkServiceConnectionStateProperty, + ProxyResource, + QueryStatistic, + QueryText, + RecommendationAction, + RecoverableServerResource, + Resource, + ResourceIdentity, + Server, + ServerAdministratorResource, + ServerKey, + ServerKeyListResult, + ServerPrivateEndpointConnection, + ServerPrivateEndpointConnectionProperties, + ServerPrivateLinkServiceConnectionStateProperty, + ServerSecurityAlertPolicy, + Sku, + StorageProfile, + TrackedResource, + VirtualNetworkRule, + WaitStatistic +} from "../models/mappers"; diff --git a/sdk/mysql/arm-mysql/src/models/serverParametersMappers.ts b/sdk/mysql/arm-mysql/src/models/serverParametersMappers.ts new file mode 100644 index 000000000000..eb893e43a9f8 --- /dev/null +++ b/sdk/mysql/arm-mysql/src/models/serverParametersMappers.ts @@ -0,0 +1,46 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + Advisor, + AzureEntityResource, + BaseResource, + CloudError, + Configuration, + ConfigurationListResult, + Database, + ErrorAdditionalInfo, + ErrorResponse, + FirewallRule, + LogFile, + PrivateEndpointConnection, + PrivateEndpointProperty, + PrivateLinkResource, + PrivateLinkResourceProperties, + PrivateLinkServiceConnectionStateProperty, + ProxyResource, + QueryStatistic, + QueryText, + RecommendationAction, + RecoverableServerResource, + Resource, + ResourceIdentity, + Server, + ServerAdministratorResource, + ServerKey, + ServerPrivateEndpointConnection, + ServerPrivateEndpointConnectionProperties, + ServerPrivateLinkServiceConnectionStateProperty, + ServerSecurityAlertPolicy, + Sku, + StorageProfile, + TrackedResource, + VirtualNetworkRule, + WaitStatistic +} from "../models/mappers"; diff --git a/sdk/mysql/arm-mysql/src/models/serverSecurityAlertPoliciesMappers.ts b/sdk/mysql/arm-mysql/src/models/serverSecurityAlertPoliciesMappers.ts index 9555ebb4e3ca..2c5469f8d147 100644 --- a/sdk/mysql/arm-mysql/src/models/serverSecurityAlertPoliciesMappers.ts +++ b/sdk/mysql/arm-mysql/src/models/serverSecurityAlertPoliciesMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -8,17 +8,37 @@ export { discriminators, + Advisor, + AzureEntityResource, BaseResource, CloudError, Configuration, Database, FirewallRule, LogFile, + PrivateEndpointConnection, + PrivateEndpointProperty, + PrivateLinkResource, + PrivateLinkResourceProperties, + PrivateLinkServiceConnectionStateProperty, ProxyResource, + QueryStatistic, + QueryText, + RecommendationAction, + RecoverableServerResource, + Resource, + ResourceIdentity, Server, + ServerAdministratorResource, + ServerKey, + ServerPrivateEndpointConnection, + ServerPrivateEndpointConnectionProperties, + ServerPrivateLinkServiceConnectionStateProperty, ServerSecurityAlertPolicy, + ServerSecurityAlertPolicyListResult, Sku, StorageProfile, TrackedResource, - VirtualNetworkRule + VirtualNetworkRule, + WaitStatistic } from "../models/mappers"; diff --git a/sdk/mysql/arm-mysql/src/models/serversMappers.ts b/sdk/mysql/arm-mysql/src/models/serversMappers.ts index 4495c8e37cdd..cd315af4a01a 100644 --- a/sdk/mysql/arm-mysql/src/models/serversMappers.ts +++ b/sdk/mysql/arm-mysql/src/models/serversMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -8,16 +8,36 @@ export { discriminators, + Advisor, + AzureEntityResource, BaseResource, CloudError, Configuration, Database, + ErrorAdditionalInfo, + ErrorResponse, FirewallRule, LogFile, + PrivateEndpointConnection, + PrivateEndpointProperty, + PrivateLinkResource, + PrivateLinkResourceProperties, + PrivateLinkServiceConnectionStateProperty, ProxyResource, + QueryStatistic, + QueryText, + RecommendationAction, + RecoverableServerResource, + Resource, + ResourceIdentity, Server, + ServerAdministratorResource, ServerForCreate, + ServerKey, ServerListResult, + ServerPrivateEndpointConnection, + ServerPrivateEndpointConnectionProperties, + ServerPrivateLinkServiceConnectionStateProperty, ServerPropertiesForCreate, ServerPropertiesForDefaultCreate, ServerPropertiesForGeoRestore, @@ -25,8 +45,10 @@ export { ServerPropertiesForRestore, ServerSecurityAlertPolicy, ServerUpdateParameters, + ServerUpgradeParameters, Sku, StorageProfile, TrackedResource, - VirtualNetworkRule + VirtualNetworkRule, + WaitStatistic } from "../models/mappers"; diff --git a/sdk/mysql/arm-mysql/src/models/topQueryStatisticsMappers.ts b/sdk/mysql/arm-mysql/src/models/topQueryStatisticsMappers.ts new file mode 100644 index 000000000000..2aa6cafd7096 --- /dev/null +++ b/sdk/mysql/arm-mysql/src/models/topQueryStatisticsMappers.ts @@ -0,0 +1,47 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + Advisor, + AzureEntityResource, + BaseResource, + CloudError, + Configuration, + Database, + ErrorAdditionalInfo, + ErrorResponse, + FirewallRule, + LogFile, + PrivateEndpointConnection, + PrivateEndpointProperty, + PrivateLinkResource, + PrivateLinkResourceProperties, + PrivateLinkServiceConnectionStateProperty, + ProxyResource, + QueryStatistic, + QueryText, + RecommendationAction, + RecoverableServerResource, + Resource, + ResourceIdentity, + Server, + ServerAdministratorResource, + ServerKey, + ServerPrivateEndpointConnection, + ServerPrivateEndpointConnectionProperties, + ServerPrivateLinkServiceConnectionStateProperty, + ServerSecurityAlertPolicy, + Sku, + StorageProfile, + TopQueryStatisticsInput, + TopQueryStatisticsResultList, + TrackedResource, + VirtualNetworkRule, + WaitStatistic +} from "../models/mappers"; diff --git a/sdk/mysql/arm-mysql/src/models/virtualNetworkRulesMappers.ts b/sdk/mysql/arm-mysql/src/models/virtualNetworkRulesMappers.ts index 08d2a62e7e38..bf7ebf2a5a9e 100644 --- a/sdk/mysql/arm-mysql/src/models/virtualNetworkRulesMappers.ts +++ b/sdk/mysql/arm-mysql/src/models/virtualNetworkRulesMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -8,18 +8,37 @@ export { discriminators, + Advisor, + AzureEntityResource, BaseResource, CloudError, Configuration, Database, FirewallRule, LogFile, + PrivateEndpointConnection, + PrivateEndpointProperty, + PrivateLinkResource, + PrivateLinkResourceProperties, + PrivateLinkServiceConnectionStateProperty, ProxyResource, + QueryStatistic, + QueryText, + RecommendationAction, + RecoverableServerResource, + Resource, + ResourceIdentity, Server, + ServerAdministratorResource, + ServerKey, + ServerPrivateEndpointConnection, + ServerPrivateEndpointConnectionProperties, + ServerPrivateLinkServiceConnectionStateProperty, ServerSecurityAlertPolicy, Sku, StorageProfile, TrackedResource, VirtualNetworkRule, - VirtualNetworkRuleListResult + VirtualNetworkRuleListResult, + WaitStatistic } from "../models/mappers"; diff --git a/sdk/mysql/arm-mysql/src/models/waitStatisticsMappers.ts b/sdk/mysql/arm-mysql/src/models/waitStatisticsMappers.ts new file mode 100644 index 000000000000..d1d66904001b --- /dev/null +++ b/sdk/mysql/arm-mysql/src/models/waitStatisticsMappers.ts @@ -0,0 +1,47 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + Advisor, + AzureEntityResource, + BaseResource, + CloudError, + Configuration, + Database, + ErrorAdditionalInfo, + ErrorResponse, + FirewallRule, + LogFile, + PrivateEndpointConnection, + PrivateEndpointProperty, + PrivateLinkResource, + PrivateLinkResourceProperties, + PrivateLinkServiceConnectionStateProperty, + ProxyResource, + QueryStatistic, + QueryText, + RecommendationAction, + RecoverableServerResource, + Resource, + ResourceIdentity, + Server, + ServerAdministratorResource, + ServerKey, + ServerPrivateEndpointConnection, + ServerPrivateEndpointConnectionProperties, + ServerPrivateLinkServiceConnectionStateProperty, + ServerSecurityAlertPolicy, + Sku, + StorageProfile, + TrackedResource, + VirtualNetworkRule, + WaitStatistic, + WaitStatisticsInput, + WaitStatisticsResultList +} from "../models/mappers"; diff --git a/sdk/mysql/arm-mysql/src/mySQLManagementClient.ts b/sdk/mysql/arm-mysql/src/mySQLManagementClient.ts index f128cfad2096..de421fa8448d 100644 --- a/sdk/mysql/arm-mysql/src/mySQLManagementClient.ts +++ b/sdk/mysql/arm-mysql/src/mySQLManagementClient.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -10,8 +9,10 @@ import * as msRest from "@azure/ms-rest-js"; import { TokenCredential } from "@azure/core-auth"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; +import * as Parameters from "./models/parameters"; import * as operations from "./operations"; import { MySQLManagementClientContext } from "./mySQLManagementClientContext"; @@ -24,11 +25,25 @@ class MySQLManagementClient extends MySQLManagementClientContext { virtualNetworkRules: operations.VirtualNetworkRules; databases: operations.Databases; configurations: operations.Configurations; + serverParameters: operations.ServerParameters; logFiles: operations.LogFiles; + serverAdministrators: operations.ServerAdministrators; + recoverableServers: operations.RecoverableServers; + serverBasedPerformanceTier: operations.ServerBasedPerformanceTier; locationBasedPerformanceTier: operations.LocationBasedPerformanceTier; checkNameAvailability: operations.CheckNameAvailability; - serverSecurityAlertPolicies: operations.ServerSecurityAlertPolicies; operations: operations.Operations; + serverSecurityAlertPolicies: operations.ServerSecurityAlertPolicies; + queryTexts: operations.QueryTexts; + topQueryStatistics: operations.TopQueryStatistics; + waitStatistics: operations.WaitStatistics; + advisors: operations.Advisors; + recommendedActions: operations.RecommendedActions; + locationBasedRecommendedActionSessionsOperationStatus: operations.LocationBasedRecommendedActionSessionsOperationStatus; + locationBasedRecommendedActionSessionsResult: operations.LocationBasedRecommendedActionSessionsResult; + privateEndpointConnections: operations.PrivateEndpointConnections; + privateLinkResources: operations.PrivateLinkResources; + serverKeys: operations.ServerKeys; /** * Initializes a new instance of the MySQLManagementClient class. @@ -38,7 +53,7 @@ class MySQLManagementClient extends MySQLManagementClientContext { * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and * @azure/ms-rest-browserauth are also supported. - * @param subscriptionId The subscription ID that identifies an Azure subscription. + * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.MySQLManagementClientOptions) { @@ -49,15 +64,148 @@ class MySQLManagementClient extends MySQLManagementClientContext { this.virtualNetworkRules = new operations.VirtualNetworkRules(this); this.databases = new operations.Databases(this); this.configurations = new operations.Configurations(this); + this.serverParameters = new operations.ServerParameters(this); this.logFiles = new operations.LogFiles(this); + this.serverAdministrators = new operations.ServerAdministrators(this); + this.recoverableServers = new operations.RecoverableServers(this); + this.serverBasedPerformanceTier = new operations.ServerBasedPerformanceTier(this); this.locationBasedPerformanceTier = new operations.LocationBasedPerformanceTier(this); this.checkNameAvailability = new operations.CheckNameAvailability(this); - this.serverSecurityAlertPolicies = new operations.ServerSecurityAlertPolicies(this); this.operations = new operations.Operations(this); + this.serverSecurityAlertPolicies = new operations.ServerSecurityAlertPolicies(this); + this.queryTexts = new operations.QueryTexts(this); + this.topQueryStatistics = new operations.TopQueryStatistics(this); + this.waitStatistics = new operations.WaitStatistics(this); + this.advisors = new operations.Advisors(this); + this.recommendedActions = new operations.RecommendedActions(this); + this.locationBasedRecommendedActionSessionsOperationStatus = new operations.LocationBasedRecommendedActionSessionsOperationStatus(this); + this.locationBasedRecommendedActionSessionsResult = new operations.LocationBasedRecommendedActionSessionsResult(this); + this.privateEndpointConnections = new operations.PrivateEndpointConnections(this); + this.privateLinkResources = new operations.PrivateLinkResources(this); + this.serverKeys = new operations.ServerKeys(this); + } + + /** + * Reset data for Query Performance Insight. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param [options] The optional parameters + * @returns Promise + */ + resetQueryPerformanceInsightData(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param callback The callback + */ + resetQueryPerformanceInsightData(resourceGroupName: string, serverName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param options The optional parameters + * @param callback The callback + */ + resetQueryPerformanceInsightData(resourceGroupName: string, serverName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + resetQueryPerformanceInsightData(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.sendOperationRequest( + { + resourceGroupName, + serverName, + options + }, + resetQueryPerformanceInsightDataOperationSpec, + callback) as Promise; + } + + /** + * Create recommendation action session for the advisor. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param advisorName The advisor name for recommendation action. + * @param databaseName The name of the database. + * @param [options] The optional parameters + * @returns Promise + */ + createRecommendedActionSession(resourceGroupName: string, serverName: string, advisorName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateRecommendedActionSession(resourceGroupName,serverName,advisorName,databaseName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Create recommendation action session for the advisor. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param advisorName The advisor name for recommendation action. + * @param databaseName The name of the database. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateRecommendedActionSession(resourceGroupName: string, serverName: string, advisorName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise { + return this.sendLRORequest( + { + resourceGroupName, + serverName, + advisorName, + databaseName, + options + }, + beginCreateRecommendedActionSessionOperationSpec, + options); } } // Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const resetQueryPerformanceInsightDataOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/resetQueryPerformanceInsightData", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.QueryPerformanceInsightResetDataResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateRecommendedActionSessionOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/advisors/{advisorName}/createRecommendedActionSession", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.advisorName + ], + queryParameters: [ + Parameters.apiVersion2, + Parameters.databaseName + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; export { MySQLManagementClient, diff --git a/sdk/mysql/arm-mysql/src/mySQLManagementClientContext.ts b/sdk/mysql/arm-mysql/src/mySQLManagementClientContext.ts index 91c35fd07caf..54c28a1aa876 100644 --- a/sdk/mysql/arm-mysql/src/mySQLManagementClientContext.ts +++ b/sdk/mysql/arm-mysql/src/mySQLManagementClientContext.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -10,16 +9,15 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; -import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; +import { TokenCredential } from "@azure/core-auth"; const packageName = "@azure/arm-mysql"; -const packageVersion = "3.4.0"; +const packageVersion = "4.0.0"; export class MySQLManagementClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; - apiVersion?: string; /** * Initializes a new instance of the MySQLManagementClient class. @@ -29,7 +27,7 @@ export class MySQLManagementClientContext extends msRestAzure.AzureServiceClient * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and * @azure/ms-rest-browserauth are also supported. - * @param subscriptionId The subscription ID that identifies an Azure subscription. + * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.MySQLManagementClientOptions) { @@ -43,14 +41,13 @@ export class MySQLManagementClientContext extends msRestAzure.AzureServiceClient if (!options) { options = {}; } - if(!options.userAgent) { + if (!options.userAgent) { const defaultUserAgent = msRestAzure.getDefaultUserAgentValue(); options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`; } super(credentials, options); - this.apiVersion = '2017-12-01'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; @@ -58,10 +55,10 @@ export class MySQLManagementClientContext extends msRestAzure.AzureServiceClient this.credentials = credentials; this.subscriptionId = subscriptionId; - if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) { + if (options.acceptLanguage !== null && options.acceptLanguage !== undefined) { this.acceptLanguage = options.acceptLanguage; } - if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { + if (options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout; } } diff --git a/sdk/mysql/arm-mysql/src/operations/advisors.ts b/sdk/mysql/arm-mysql/src/operations/advisors.ts new file mode 100644 index 000000000000..42e54d4f7719 --- /dev/null +++ b/sdk/mysql/arm-mysql/src/operations/advisors.ts @@ -0,0 +1,200 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/advisorsMappers"; +import * as Parameters from "../models/parameters"; +import { MySQLManagementClientContext } from "../mySQLManagementClientContext"; + +/** Class representing a Advisors. */ +export class Advisors { + private readonly client: MySQLManagementClientContext; + + /** + * Create a Advisors. + * @param {MySQLManagementClientContext} client Reference to the service client. + */ + constructor(client: MySQLManagementClientContext) { + this.client = client; + } + + /** + * Get a recommendation action advisor. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param advisorName The advisor name for recommendation action. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, serverName: string, advisorName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param advisorName The advisor name for recommendation action. + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, advisorName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param advisorName The advisor name for recommendation action. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, advisorName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, serverName: string, advisorName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + advisorName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * List recommendation action advisors. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param [options] The optional parameters + * @returns Promise + */ + listByServer(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param callback The callback + */ + listByServer(resourceGroupName: string, serverName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param options The optional parameters + * @param callback The callback + */ + listByServer(resourceGroupName: string, serverName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByServer(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + options + }, + listByServerOperationSpec, + callback) as Promise; + } + + /** + * List recommendation action advisors. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByServerNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByServerNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByServerNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByServerNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByServerNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/advisors/{advisorName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.advisorName + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Advisor + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByServerOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/advisors", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AdvisorsResultList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByServerNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AdvisorsResultList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/mysql/arm-mysql/src/operations/checkNameAvailability.ts b/sdk/mysql/arm-mysql/src/operations/checkNameAvailability.ts index 1461d4413798..3e498bfaae57 100644 --- a/sdk/mysql/arm-mysql/src/operations/checkNameAvailability.ts +++ b/sdk/mysql/arm-mysql/src/operations/checkNameAvailability.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -67,7 +66,7 @@ const executeOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/mysql/arm-mysql/src/operations/configurations.ts b/sdk/mysql/arm-mysql/src/operations/configurations.ts index 9eef7a32e000..dfb6ab1644d1 100644 --- a/sdk/mysql/arm-mysql/src/operations/configurations.ts +++ b/sdk/mysql/arm-mysql/src/operations/configurations.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -29,8 +28,7 @@ export class Configurations { /** * Updates a configuration of a server. - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param configurationName The name of the server configuration. * @param parameters The required parameters for updating a server configuration. @@ -44,8 +42,7 @@ export class Configurations { /** * Gets information about a configuration of server. - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param configurationName The name of the server configuration. * @param [options] The optional parameters @@ -53,16 +50,14 @@ export class Configurations { */ get(resourceGroupName: string, serverName: string, configurationName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param configurationName The name of the server configuration. * @param callback The callback */ get(resourceGroupName: string, serverName: string, configurationName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param configurationName The name of the server configuration. * @param options The optional parameters @@ -83,23 +78,20 @@ export class Configurations { /** * List all the configurations in a given server. - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param [options] The optional parameters * @returns Promise */ listByServer(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param callback The callback */ listByServer(resourceGroupName: string, serverName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param options The optional parameters * @param callback The callback @@ -118,8 +110,7 @@ export class Configurations { /** * Updates a configuration of a server. - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param configurationName The name of the server configuration. * @param parameters The required parameters for updating a server configuration. @@ -152,7 +143,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.configurationName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -177,7 +168,7 @@ const listByServerOperationSpec: msRest.OperationSpec = { Parameters.serverName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -203,7 +194,7 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { Parameters.configurationName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/mysql/arm-mysql/src/operations/databases.ts b/sdk/mysql/arm-mysql/src/operations/databases.ts index c0400068269c..643c9509a100 100644 --- a/sdk/mysql/arm-mysql/src/operations/databases.ts +++ b/sdk/mysql/arm-mysql/src/operations/databases.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -29,8 +28,7 @@ export class Databases { /** * Creates a new database or updates an existing database. - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The required parameters for creating or updating a database. @@ -44,8 +42,7 @@ export class Databases { /** * Deletes a database. - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param databaseName The name of the database. * @param [options] The optional parameters @@ -58,8 +55,7 @@ export class Databases { /** * Gets information about a database. - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param databaseName The name of the database. * @param [options] The optional parameters @@ -67,16 +63,14 @@ export class Databases { */ get(resourceGroupName: string, serverName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param databaseName The name of the database. * @param callback The callback */ get(resourceGroupName: string, serverName: string, databaseName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param databaseName The name of the database. * @param options The optional parameters @@ -97,23 +91,20 @@ export class Databases { /** * List all the databases in a given server. - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param [options] The optional parameters * @returns Promise */ listByServer(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param callback The callback */ listByServer(resourceGroupName: string, serverName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param options The optional parameters * @param callback The callback @@ -132,8 +123,7 @@ export class Databases { /** * Creates a new database or updates an existing database. - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The required parameters for creating or updating a database. @@ -155,8 +145,7 @@ export class Databases { /** * Deletes a database. - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param databaseName The name of the database. * @param [options] The optional parameters @@ -187,7 +176,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.databaseName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -212,7 +201,7 @@ const listByServerOperationSpec: msRest.OperationSpec = { Parameters.serverName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -238,7 +227,7 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { Parameters.databaseName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -275,7 +264,7 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { Parameters.databaseName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/mysql/arm-mysql/src/operations/firewallRules.ts b/sdk/mysql/arm-mysql/src/operations/firewallRules.ts index 1744e21a520a..defc4b4b9495 100644 --- a/sdk/mysql/arm-mysql/src/operations/firewallRules.ts +++ b/sdk/mysql/arm-mysql/src/operations/firewallRules.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -29,8 +28,7 @@ export class FirewallRules { /** * Creates a new firewall rule or updates an existing firewall rule. - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param firewallRuleName The name of the server firewall rule. * @param parameters The required parameters for creating or updating a firewall rule. @@ -44,8 +42,7 @@ export class FirewallRules { /** * Deletes a server firewall rule. - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param firewallRuleName The name of the server firewall rule. * @param [options] The optional parameters @@ -58,8 +55,7 @@ export class FirewallRules { /** * Gets information about a server firewall rule. - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param firewallRuleName The name of the server firewall rule. * @param [options] The optional parameters @@ -67,16 +63,14 @@ export class FirewallRules { */ get(resourceGroupName: string, serverName: string, firewallRuleName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param firewallRuleName The name of the server firewall rule. * @param callback The callback */ get(resourceGroupName: string, serverName: string, firewallRuleName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param firewallRuleName The name of the server firewall rule. * @param options The optional parameters @@ -97,23 +91,20 @@ export class FirewallRules { /** * List all the firewall rules in a given server. - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param [options] The optional parameters * @returns Promise */ listByServer(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param callback The callback */ listByServer(resourceGroupName: string, serverName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param options The optional parameters * @param callback The callback @@ -132,8 +123,7 @@ export class FirewallRules { /** * Creates a new firewall rule or updates an existing firewall rule. - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param firewallRuleName The name of the server firewall rule. * @param parameters The required parameters for creating or updating a firewall rule. @@ -155,8 +145,7 @@ export class FirewallRules { /** * Deletes a server firewall rule. - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param firewallRuleName The name of the server firewall rule. * @param [options] The optional parameters @@ -187,7 +176,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.firewallRuleName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -212,7 +201,7 @@ const listByServerOperationSpec: msRest.OperationSpec = { Parameters.serverName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -238,7 +227,7 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { Parameters.firewallRuleName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -275,7 +264,7 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { Parameters.firewallRuleName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/mysql/arm-mysql/src/operations/index.ts b/sdk/mysql/arm-mysql/src/operations/index.ts index bb02d2d2c5e9..b410ef07bc23 100644 --- a/sdk/mysql/arm-mysql/src/operations/index.ts +++ b/sdk/mysql/arm-mysql/src/operations/index.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -14,8 +13,22 @@ export * from "./firewallRules"; export * from "./virtualNetworkRules"; export * from "./databases"; export * from "./configurations"; +export * from "./serverParameters"; export * from "./logFiles"; +export * from "./serverAdministrators"; +export * from "./recoverableServers"; +export * from "./serverBasedPerformanceTier"; export * from "./locationBasedPerformanceTier"; export * from "./checkNameAvailability"; -export * from "./serverSecurityAlertPolicies"; export * from "./operations"; +export * from "./serverSecurityAlertPolicies"; +export * from "./queryTexts"; +export * from "./topQueryStatistics"; +export * from "./waitStatistics"; +export * from "./advisors"; +export * from "./recommendedActions"; +export * from "./locationBasedRecommendedActionSessionsOperationStatus"; +export * from "./locationBasedRecommendedActionSessionsResult"; +export * from "./privateEndpointConnections"; +export * from "./privateLinkResources"; +export * from "./serverKeys"; diff --git a/sdk/mysql/arm-mysql/src/operations/locationBasedPerformanceTier.ts b/sdk/mysql/arm-mysql/src/operations/locationBasedPerformanceTier.ts index 470294fa212d..8ebcea3231f0 100644 --- a/sdk/mysql/arm-mysql/src/operations/locationBasedPerformanceTier.ts +++ b/sdk/mysql/arm-mysql/src/operations/locationBasedPerformanceTier.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -65,7 +64,7 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.locationName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/mysql/arm-mysql/src/operations/locationBasedRecommendedActionSessionsOperationStatus.ts b/sdk/mysql/arm-mysql/src/operations/locationBasedRecommendedActionSessionsOperationStatus.ts new file mode 100644 index 000000000000..17e6a1131cb9 --- /dev/null +++ b/sdk/mysql/arm-mysql/src/operations/locationBasedRecommendedActionSessionsOperationStatus.ts @@ -0,0 +1,86 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/locationBasedRecommendedActionSessionsOperationStatusMappers"; +import * as Parameters from "../models/parameters"; +import { MySQLManagementClientContext } from "../mySQLManagementClientContext"; + +/** Class representing a LocationBasedRecommendedActionSessionsOperationStatus. */ +export class LocationBasedRecommendedActionSessionsOperationStatus { + private readonly client: MySQLManagementClientContext; + + /** + * Create a LocationBasedRecommendedActionSessionsOperationStatus. + * @param {MySQLManagementClientContext} client Reference to the service client. + */ + constructor(client: MySQLManagementClientContext) { + this.client = client; + } + + /** + * Recommendation action session operation status. + * @param locationName The name of the location. + * @param operationId The operation identifier. + * @param [options] The optional parameters + * @returns Promise + */ + get(locationName: string, operationId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param locationName The name of the location. + * @param operationId The operation identifier. + * @param callback The callback + */ + get(locationName: string, operationId: string, callback: msRest.ServiceCallback): void; + /** + * @param locationName The name of the location. + * @param operationId The operation identifier. + * @param options The optional parameters + * @param callback The callback + */ + get(locationName: string, operationId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(locationName: string, operationId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + locationName, + operationId, + options + }, + getOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/locations/{locationName}/recommendedActionSessionsAzureAsyncOperation/{operationId}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.locationName, + Parameters.operationId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RecommendedActionSessionsOperationStatus + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/mysql/arm-mysql/src/operations/locationBasedRecommendedActionSessionsResult.ts b/sdk/mysql/arm-mysql/src/operations/locationBasedRecommendedActionSessionsResult.ts new file mode 100644 index 000000000000..9b5b8217b1d9 --- /dev/null +++ b/sdk/mysql/arm-mysql/src/operations/locationBasedRecommendedActionSessionsResult.ts @@ -0,0 +1,144 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/locationBasedRecommendedActionSessionsResultMappers"; +import * as Parameters from "../models/parameters"; +import { MySQLManagementClientContext } from "../mySQLManagementClientContext"; + +/** Class representing a LocationBasedRecommendedActionSessionsResult. */ +export class LocationBasedRecommendedActionSessionsResult { + private readonly client: MySQLManagementClientContext; + + /** + * Create a LocationBasedRecommendedActionSessionsResult. + * @param {MySQLManagementClientContext} client Reference to the service client. + */ + constructor(client: MySQLManagementClientContext) { + this.client = client; + } + + /** + * Recommendation action session operation result. + * @param locationName The name of the location. + * @param operationId The operation identifier. + * @param [options] The optional parameters + * @returns Promise + */ + list(locationName: string, operationId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param locationName The name of the location. + * @param operationId The operation identifier. + * @param callback The callback + */ + list(locationName: string, operationId: string, callback: msRest.ServiceCallback): void; + /** + * @param locationName The name of the location. + * @param operationId The operation identifier. + * @param options The optional parameters + * @param callback The callback + */ + list(locationName: string, operationId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(locationName: string, operationId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + locationName, + operationId, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Recommendation action session operation result. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/locations/{locationName}/recommendedActionSessionsOperationResults/{operationId}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.locationName, + Parameters.operationId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RecommendationActionsResultList + }, + 201: { + bodyMapper: Mappers.RecommendationActionsResultList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RecommendationActionsResultList + }, + 201: { + bodyMapper: Mappers.RecommendationActionsResultList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/mysql/arm-mysql/src/operations/logFiles.ts b/sdk/mysql/arm-mysql/src/operations/logFiles.ts index 357983282b65..4f2d87f16a5e 100644 --- a/sdk/mysql/arm-mysql/src/operations/logFiles.ts +++ b/sdk/mysql/arm-mysql/src/operations/logFiles.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -28,23 +27,20 @@ export class LogFiles { /** * List all the log files in a given server. - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param [options] The optional parameters * @returns Promise */ listByServer(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param callback The callback */ listByServer(resourceGroupName: string, serverName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param options The optional parameters * @param callback The callback @@ -73,7 +69,7 @@ const listByServerOperationSpec: msRest.OperationSpec = { Parameters.serverName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/mysql/arm-mysql/src/operations/operations.ts b/sdk/mysql/arm-mysql/src/operations/operations.ts index b165a30747ef..db20811345fc 100644 --- a/sdk/mysql/arm-mysql/src/operations/operations.ts +++ b/sdk/mysql/arm-mysql/src/operations/operations.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -57,7 +56,7 @@ const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "providers/Microsoft.DBforMySQL/operations", queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/mysql/arm-mysql/src/operations/privateEndpointConnections.ts b/sdk/mysql/arm-mysql/src/operations/privateEndpointConnections.ts new file mode 100644 index 000000000000..ea8afeff31d3 --- /dev/null +++ b/sdk/mysql/arm-mysql/src/operations/privateEndpointConnections.ts @@ -0,0 +1,401 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/privateEndpointConnectionsMappers"; +import * as Parameters from "../models/parameters"; +import { MySQLManagementClientContext } from "../mySQLManagementClientContext"; + +/** Class representing a PrivateEndpointConnections. */ +export class PrivateEndpointConnections { + private readonly client: MySQLManagementClientContext; + + /** + * Create a PrivateEndpointConnections. + * @param {MySQLManagementClientContext} client Reference to the service client. + */ + constructor(client: MySQLManagementClientContext) { + this.client = client; + } + + /** + * Gets a private endpoint connection. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, serverName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, privateEndpointConnectionName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, privateEndpointConnectionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, serverName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + privateEndpointConnectionName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Approve or reject a private endpoint connection with a given name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName + * @param parameters + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, serverName: string, privateEndpointConnectionName: string, parameters: Models.PrivateEndpointConnection, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(resourceGroupName,serverName,privateEndpointConnectionName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes a private endpoint connection with a given name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, serverName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,serverName,privateEndpointConnectionName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Updates private endpoint connection with the specified tags. + * @summary Updates tags on private endpoint connection. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName + * @param parameters Parameters supplied to the Update private endpoint connection Tags operation. + * @param [options] The optional parameters + * @returns Promise + */ + updateTags(resourceGroupName: string, serverName: string, privateEndpointConnectionName: string, parameters: Models.TagsObject, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpdateTags(resourceGroupName,serverName,privateEndpointConnectionName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Gets all private endpoint connections on a server. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param [options] The optional parameters + * @returns Promise + */ + listByServer(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param callback The callback + */ + listByServer(resourceGroupName: string, serverName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param options The optional parameters + * @param callback The callback + */ + listByServer(resourceGroupName: string, serverName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByServer(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + options + }, + listByServerOperationSpec, + callback) as Promise; + } + + /** + * Approve or reject a private endpoint connection with a given name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName + * @param parameters + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, serverName: string, privateEndpointConnectionName: string, parameters: Models.PrivateEndpointConnection, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + privateEndpointConnectionName, + parameters, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Deletes a private endpoint connection with a given name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, serverName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + privateEndpointConnectionName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Updates private endpoint connection with the specified tags. + * @summary Updates tags on private endpoint connection. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName + * @param parameters Parameters supplied to the Update private endpoint connection Tags operation. + * @param [options] The optional parameters + * @returns Promise + */ + beginUpdateTags(resourceGroupName: string, serverName: string, privateEndpointConnectionName: string, parameters: Models.TagsObject, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + privateEndpointConnectionName, + parameters, + options + }, + beginUpdateTagsOperationSpec, + options); + } + + /** + * Gets all private endpoint connections on a server. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByServerNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByServerNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByServerNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByServerNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByServerNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.privateEndpointConnectionName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByServerOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/privateEndpointConnections", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnectionListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.privateEndpointConnectionName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.PrivateEndpointConnection, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.privateEndpointConnectionName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginUpdateTagsOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.privateEndpointConnectionName + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.TagsObject, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByServerNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnectionListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/mysql/arm-mysql/src/operations/privateLinkResources.ts b/sdk/mysql/arm-mysql/src/operations/privateLinkResources.ts new file mode 100644 index 000000000000..59ec527070e0 --- /dev/null +++ b/sdk/mysql/arm-mysql/src/operations/privateLinkResources.ts @@ -0,0 +1,200 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/privateLinkResourcesMappers"; +import * as Parameters from "../models/parameters"; +import { MySQLManagementClientContext } from "../mySQLManagementClientContext"; + +/** Class representing a PrivateLinkResources. */ +export class PrivateLinkResources { + private readonly client: MySQLManagementClientContext; + + /** + * Create a PrivateLinkResources. + * @param {MySQLManagementClientContext} client Reference to the service client. + */ + constructor(client: MySQLManagementClientContext) { + this.client = client; + } + + /** + * Gets the private link resources for MySQL server. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param [options] The optional parameters + * @returns Promise + */ + listByServer(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param callback The callback + */ + listByServer(resourceGroupName: string, serverName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param options The optional parameters + * @param callback The callback + */ + listByServer(resourceGroupName: string, serverName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByServer(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + options + }, + listByServerOperationSpec, + callback) as Promise; + } + + /** + * Gets a private link resource for MySQL server. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param groupName The name of the private link resource. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, serverName: string, groupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param groupName The name of the private link resource. + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, groupName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param groupName The name of the private link resource. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, groupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, serverName: string, groupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + groupName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Gets the private link resources for MySQL server. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByServerNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByServerNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByServerNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByServerNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByServerNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByServerOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/privateLinkResources", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResourceListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/privateLinkResources/{groupName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.groupName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResource + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByServerNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResourceListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/mysql/arm-mysql/src/operations/queryTexts.ts b/sdk/mysql/arm-mysql/src/operations/queryTexts.ts new file mode 100644 index 000000000000..b65e9ca93713 --- /dev/null +++ b/sdk/mysql/arm-mysql/src/operations/queryTexts.ts @@ -0,0 +1,210 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/queryTextsMappers"; +import * as Parameters from "../models/parameters"; +import { MySQLManagementClientContext } from "../mySQLManagementClientContext"; + +/** Class representing a QueryTexts. */ +export class QueryTexts { + private readonly client: MySQLManagementClientContext; + + /** + * Create a QueryTexts. + * @param {MySQLManagementClientContext} client Reference to the service client. + */ + constructor(client: MySQLManagementClientContext) { + this.client = client; + } + + /** + * Retrieve the Query-Store query texts for the queryId. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param queryId The Query-Store query identifier. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, serverName: string, queryId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param queryId The Query-Store query identifier. + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, queryId: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param queryId The Query-Store query identifier. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, queryId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, serverName: string, queryId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + queryId, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Retrieve the Query-Store query texts for specified queryIds. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param queryIds The query identifiers + * @param [options] The optional parameters + * @returns Promise + */ + listByServer(resourceGroupName: string, serverName: string, queryIds: string[], options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param queryIds The query identifiers + * @param callback The callback + */ + listByServer(resourceGroupName: string, serverName: string, queryIds: string[], callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param queryIds The query identifiers + * @param options The optional parameters + * @param callback The callback + */ + listByServer(resourceGroupName: string, serverName: string, queryIds: string[], options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByServer(resourceGroupName: string, serverName: string, queryIds: string[], options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + queryIds, + options + }, + listByServerOperationSpec, + callback) as Promise; + } + + /** + * Retrieve the Query-Store query texts for specified queryIds. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param queryIds The query identifiers + * @param [options] The optional parameters + * @returns Promise + */ + listByServerNext(nextPageLink: string, queryIds: string[], options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param queryIds The query identifiers + * @param callback The callback + */ + listByServerNext(nextPageLink: string, queryIds: string[], callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param queryIds The query identifiers + * @param options The optional parameters + * @param callback The callback + */ + listByServerNext(nextPageLink: string, queryIds: string[], options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByServerNext(nextPageLink: string, queryIds: string[], options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + queryIds, + options + }, + listByServerNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/queryTexts/{queryId}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.queryId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.QueryText + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByServerOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/queryTexts", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName + ], + queryParameters: [ + Parameters.apiVersion2, + Parameters.queryIds + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.QueryTextsResultList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByServerNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion2, + Parameters.queryIds + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.QueryTextsResultList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/mysql/arm-mysql/src/operations/recommendedActions.ts b/sdk/mysql/arm-mysql/src/operations/recommendedActions.ts new file mode 100644 index 000000000000..7d0296dead2c --- /dev/null +++ b/sdk/mysql/arm-mysql/src/operations/recommendedActions.ts @@ -0,0 +1,212 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/recommendedActionsMappers"; +import * as Parameters from "../models/parameters"; +import { MySQLManagementClientContext } from "../mySQLManagementClientContext"; + +/** Class representing a RecommendedActions. */ +export class RecommendedActions { + private readonly client: MySQLManagementClientContext; + + /** + * Create a RecommendedActions. + * @param {MySQLManagementClientContext} client Reference to the service client. + */ + constructor(client: MySQLManagementClientContext) { + this.client = client; + } + + /** + * Retrieve recommended actions from the advisor. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param advisorName The advisor name for recommendation action. + * @param recommendedActionName The recommended action name. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, serverName: string, advisorName: string, recommendedActionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param advisorName The advisor name for recommendation action. + * @param recommendedActionName The recommended action name. + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, advisorName: string, recommendedActionName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param advisorName The advisor name for recommendation action. + * @param recommendedActionName The recommended action name. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, advisorName: string, recommendedActionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, serverName: string, advisorName: string, recommendedActionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + advisorName, + recommendedActionName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Retrieve recommended actions from the advisor. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param advisorName The advisor name for recommendation action. + * @param [options] The optional parameters + * @returns Promise + */ + listByServer(resourceGroupName: string, serverName: string, advisorName: string, options?: Models.RecommendedActionsListByServerOptionalParams): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param advisorName The advisor name for recommendation action. + * @param callback The callback + */ + listByServer(resourceGroupName: string, serverName: string, advisorName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param advisorName The advisor name for recommendation action. + * @param options The optional parameters + * @param callback The callback + */ + listByServer(resourceGroupName: string, serverName: string, advisorName: string, options: Models.RecommendedActionsListByServerOptionalParams, callback: msRest.ServiceCallback): void; + listByServer(resourceGroupName: string, serverName: string, advisorName: string, options?: Models.RecommendedActionsListByServerOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + advisorName, + options + }, + listByServerOperationSpec, + callback) as Promise; + } + + /** + * Retrieve recommended actions from the advisor. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByServerNext(nextPageLink: string, options?: Models.RecommendedActionsListByServerNextOptionalParams): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByServerNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByServerNext(nextPageLink: string, options: Models.RecommendedActionsListByServerNextOptionalParams, callback: msRest.ServiceCallback): void; + listByServerNext(nextPageLink: string, options?: Models.RecommendedActionsListByServerNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByServerNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/advisors/{advisorName}/recommendedActions/{recommendedActionName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.advisorName, + Parameters.recommendedActionName + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RecommendationAction + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByServerOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/advisors/{advisorName}/recommendedActions", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.advisorName + ], + queryParameters: [ + Parameters.apiVersion2, + Parameters.sessionId + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RecommendationActionsResultList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByServerNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion2, + Parameters.sessionId + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RecommendationActionsResultList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/mysql/arm-mysql/src/operations/recoverableServers.ts b/sdk/mysql/arm-mysql/src/operations/recoverableServers.ts new file mode 100644 index 000000000000..dfc8cc3e7f09 --- /dev/null +++ b/sdk/mysql/arm-mysql/src/operations/recoverableServers.ts @@ -0,0 +1,86 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/recoverableServersMappers"; +import * as Parameters from "../models/parameters"; +import { MySQLManagementClientContext } from "../mySQLManagementClientContext"; + +/** Class representing a RecoverableServers. */ +export class RecoverableServers { + private readonly client: MySQLManagementClientContext; + + /** + * Create a RecoverableServers. + * @param {MySQLManagementClientContext} client Reference to the service client. + */ + constructor(client: MySQLManagementClientContext) { + this.client = client; + } + + /** + * Gets a recoverable MySQL Server. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + options + }, + getOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/recoverableServers", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RecoverableServerResource + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/mysql/arm-mysql/src/operations/replicas.ts b/sdk/mysql/arm-mysql/src/operations/replicas.ts index ddea7a60a9ca..2dcd0bb040b5 100644 --- a/sdk/mysql/arm-mysql/src/operations/replicas.ts +++ b/sdk/mysql/arm-mysql/src/operations/replicas.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -28,23 +27,20 @@ export class Replicas { /** * List all the replicas for a given server. - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param [options] The optional parameters * @returns Promise */ listByServer(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param callback The callback */ listByServer(resourceGroupName: string, serverName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param options The optional parameters * @param callback The callback @@ -73,7 +69,7 @@ const listByServerOperationSpec: msRest.OperationSpec = { Parameters.serverName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/mysql/arm-mysql/src/operations/serverAdministrators.ts b/sdk/mysql/arm-mysql/src/operations/serverAdministrators.ts new file mode 100644 index 000000000000..8d1d31d6c959 --- /dev/null +++ b/sdk/mysql/arm-mysql/src/operations/serverAdministrators.ts @@ -0,0 +1,269 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/serverAdministratorsMappers"; +import * as Parameters from "../models/parameters"; +import { MySQLManagementClientContext } from "../mySQLManagementClientContext"; + +/** Class representing a ServerAdministrators. */ +export class ServerAdministrators { + private readonly client: MySQLManagementClientContext; + + /** + * Create a ServerAdministrators. + * @param {MySQLManagementClientContext} client Reference to the service client. + */ + constructor(client: MySQLManagementClientContext) { + this.client = client; + } + + /** + * Gets information about a AAD server administrator. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates or update active directory administrator on an existing server. The update action will + * overwrite the existing administrator. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param properties The required parameters for creating or updating an AAD server administrator. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, serverName: string, properties: Models.ServerAdministratorResource, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(resourceGroupName,serverName,properties,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes server active directory administrator. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,serverName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Returns a list of server Administrators. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param callback The callback + */ + list(resourceGroupName: string, serverName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, serverName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Creates or update active directory administrator on an existing server. The update action will + * overwrite the existing administrator. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param properties The required parameters for creating or updating an AAD server administrator. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, serverName: string, properties: Models.ServerAdministratorResource, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + properties, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Deletes server active directory administrator. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + options + }, + beginDeleteMethodOperationSpec, + options); + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/administrators/activeDirectory", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ServerAdministratorResource + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/administrators", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ServerAdministratorResourceListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/administrators/activeDirectory", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "properties", + mapper: { + ...Mappers.ServerAdministratorResource, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ServerAdministratorResource + }, + 202: { + bodyMapper: Mappers.ServerAdministratorResource + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/administrators/activeDirectory", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/mysql/arm-mysql/src/operations/serverBasedPerformanceTier.ts b/sdk/mysql/arm-mysql/src/operations/serverBasedPerformanceTier.ts new file mode 100644 index 000000000000..6c2e61ff4ce1 --- /dev/null +++ b/sdk/mysql/arm-mysql/src/operations/serverBasedPerformanceTier.ts @@ -0,0 +1,86 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/serverBasedPerformanceTierMappers"; +import * as Parameters from "../models/parameters"; +import { MySQLManagementClientContext } from "../mySQLManagementClientContext"; + +/** Class representing a ServerBasedPerformanceTier. */ +export class ServerBasedPerformanceTier { + private readonly client: MySQLManagementClientContext; + + /** + * Create a ServerBasedPerformanceTier. + * @param {MySQLManagementClientContext} client Reference to the service client. + */ + constructor(client: MySQLManagementClientContext) { + this.client = client; + } + + /** + * List all the performance tiers for a MySQL server. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param callback The callback + */ + list(resourceGroupName: string, serverName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, serverName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + options + }, + listOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/performanceTiers", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PerformanceTierListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/mysql/arm-mysql/src/operations/serverKeys.ts b/sdk/mysql/arm-mysql/src/operations/serverKeys.ts new file mode 100644 index 000000000000..f5a98e6b0959 --- /dev/null +++ b/sdk/mysql/arm-mysql/src/operations/serverKeys.ts @@ -0,0 +1,332 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/serverKeysMappers"; +import * as Parameters from "../models/parameters"; +import { MySQLManagementClientContext } from "../mySQLManagementClientContext"; + +/** Class representing a ServerKeys. */ +export class ServerKeys { + private readonly client: MySQLManagementClientContext; + + /** + * Create a ServerKeys. + * @param {MySQLManagementClientContext} client Reference to the service client. + */ + constructor(client: MySQLManagementClientContext) { + this.client = client; + } + + /** + * Gets a list of Server keys. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param callback The callback + */ + list(resourceGroupName: string, serverName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, serverName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Gets a MySQL Server key. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param keyName The name of the MySQL Server key to be retrieved. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, serverName: string, keyName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param keyName The name of the MySQL Server key to be retrieved. + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, keyName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param keyName The name of the MySQL Server key to be retrieved. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, keyName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, serverName: string, keyName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + keyName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates a MySQL Server key. + * @param serverName The name of the server. + * @param keyName The name of the MySQL Server key to be operated on (updated or created). + * @param parameters The requested MySQL Server key resource state. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(serverName: string, keyName: string, parameters: Models.ServerKey, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(serverName,keyName,parameters,resourceGroupName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes the MySQL Server key with the given name. + * @param serverName The name of the server. + * @param keyName The name of the MySQL Server key to be deleted. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(serverName: string, keyName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(serverName,keyName,resourceGroupName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Creates or updates a MySQL Server key. + * @param serverName The name of the server. + * @param keyName The name of the MySQL Server key to be operated on (updated or created). + * @param parameters The requested MySQL Server key resource state. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(serverName: string, keyName: string, parameters: Models.ServerKey, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + serverName, + keyName, + parameters, + resourceGroupName, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Deletes the MySQL Server key with the given name. + * @param serverName The name of the server. + * @param keyName The name of the MySQL Server key to be deleted. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(serverName: string, keyName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + serverName, + keyName, + resourceGroupName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Gets a list of Server keys. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/keys", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ServerKeyListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/keys/{keyName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.keyName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ServerKey + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/keys/{keyName}", + urlParameters: [ + Parameters.serverName, + Parameters.keyName, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.ServerKey, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ServerKey + }, + 202: { + bodyMapper: Mappers.ServerKey + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/keys/{keyName}", + urlParameters: [ + Parameters.serverName, + Parameters.keyName, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ServerKeyListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/mysql/arm-mysql/src/operations/serverParameters.ts b/sdk/mysql/arm-mysql/src/operations/serverParameters.ts new file mode 100644 index 000000000000..1c7988537caa --- /dev/null +++ b/sdk/mysql/arm-mysql/src/operations/serverParameters.ts @@ -0,0 +1,96 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/serverParametersMappers"; +import * as Parameters from "../models/parameters"; +import { MySQLManagementClientContext } from "../mySQLManagementClientContext"; + +/** Class representing a ServerParameters. */ +export class ServerParameters { + private readonly client: MySQLManagementClientContext; + + /** + * Create a ServerParameters. + * @param {MySQLManagementClientContext} client Reference to the service client. + */ + constructor(client: MySQLManagementClientContext) { + this.client = client; + } + + /** + * Update a list of configurations in a given server. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param value The parameters for updating a list of server configuration. + * @param [options] The optional parameters + * @returns Promise + */ + listUpdateConfigurations(resourceGroupName: string, serverName: string, value: Models.ConfigurationListResult, options?: msRest.RequestOptionsBase): Promise { + return this.beginListUpdateConfigurations(resourceGroupName,serverName,value,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Update a list of configurations in a given server. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param value The parameters for updating a list of server configuration. + * @param [options] The optional parameters + * @returns Promise + */ + beginListUpdateConfigurations(resourceGroupName: string, serverName: string, value: Models.ConfigurationListResult, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + value, + options + }, + beginListUpdateConfigurationsOperationSpec, + options); + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const beginListUpdateConfigurationsOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/updateConfigurations", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "value", + mapper: { + ...Mappers.ConfigurationListResult, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ConfigurationListResult + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/mysql/arm-mysql/src/operations/serverSecurityAlertPolicies.ts b/sdk/mysql/arm-mysql/src/operations/serverSecurityAlertPolicies.ts index 05c012e4492d..2c5f1e2ac0d1 100644 --- a/sdk/mysql/arm-mysql/src/operations/serverSecurityAlertPolicies.ts +++ b/sdk/mysql/arm-mysql/src/operations/serverSecurityAlertPolicies.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -29,23 +28,20 @@ export class ServerSecurityAlertPolicies { /** * Get a server's security alert policy. - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param [options] The optional parameters * @returns Promise */ get(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param callback The callback */ get(resourceGroupName: string, serverName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param options The optional parameters * @param callback The callback @@ -64,8 +60,7 @@ export class ServerSecurityAlertPolicies { /** * Creates or updates a threat detection policy. - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param parameters The server security alert policy. * @param [options] The optional parameters @@ -76,10 +71,41 @@ export class ServerSecurityAlertPolicies { .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } + /** + * Get the server's threat detection policies. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param [options] The optional parameters + * @returns Promise + */ + listByServer(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param callback The callback + */ + listByServer(resourceGroupName: string, serverName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param options The optional parameters + * @param callback The callback + */ + listByServer(resourceGroupName: string, serverName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByServer(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + options + }, + listByServerOperationSpec, + callback) as Promise; + } + /** * Creates or updates a threat detection policy. - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param parameters The server security alert policy. * @param [options] The optional parameters @@ -96,6 +122,34 @@ export class ServerSecurityAlertPolicies { beginCreateOrUpdateOperationSpec, options); } + + /** + * Get the server's threat detection policies. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByServerNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByServerNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByServerNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByServerNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByServerNextOperationSpec, + callback) as Promise; + } } // Operation Specifications @@ -110,7 +164,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -126,6 +180,31 @@ const getOperationSpec: msRest.OperationSpec = { serializer }; +const listByServerOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/securityAlertPolicies", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ServerSecurityAlertPolicyListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/securityAlertPolicies/{securityAlertPolicyName}", @@ -136,7 +215,7 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -159,3 +238,27 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { }, serializer }; + +const listByServerNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ServerSecurityAlertPolicyListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/mysql/arm-mysql/src/operations/servers.ts b/sdk/mysql/arm-mysql/src/operations/servers.ts index 2985d9a5c7b4..ce9ef59e6c2c 100644 --- a/sdk/mysql/arm-mysql/src/operations/servers.ts +++ b/sdk/mysql/arm-mysql/src/operations/servers.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -30,8 +29,7 @@ export class Servers { /** * Creates a new server or updates an existing server. The update action will overwrite the * existing server. - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param parameters The required parameters for creating or updating a server. * @param [options] The optional parameters @@ -45,8 +43,7 @@ export class Servers { /** * Updates an existing server. The request body can contain one to many of the properties present * in the normal server definition. - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param parameters The required parameters for updating a server. * @param [options] The optional parameters @@ -59,8 +56,7 @@ export class Servers { /** * Deletes a server. - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param [options] The optional parameters * @returns Promise @@ -72,23 +68,20 @@ export class Servers { /** * Gets information about a server. - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param [options] The optional parameters * @returns Promise */ get(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param callback The callback */ get(resourceGroupName: string, serverName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param options The optional parameters * @param callback The callback @@ -107,21 +100,18 @@ export class Servers { /** * List all the servers in a given resource group. - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param [options] The optional parameters * @returns Promise */ listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param callback The callback */ listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param options The optional parameters * @param callback The callback */ @@ -162,8 +152,7 @@ export class Servers { /** * Restarts a server. - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param [options] The optional parameters * @returns Promise @@ -173,11 +162,47 @@ export class Servers { .then(lroPoller => lroPoller.pollUntilFinished()); } + /** + * Starts a stopped server. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param [options] The optional parameters + * @returns Promise + */ + start(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginStart(resourceGroupName,serverName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Stops a running server. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param [options] The optional parameters + * @returns Promise + */ + stop(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginStop(resourceGroupName,serverName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Upgrade server version. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters The required parameters for updating a server. + * @param [options] The optional parameters + * @returns Promise + */ + upgrade(resourceGroupName: string, serverName: string, parameters: Models.ServerUpgradeParameters, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpgrade(resourceGroupName,serverName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + /** * Creates a new server or updates an existing server. The update action will overwrite the * existing server. - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param parameters The required parameters for creating or updating a server. * @param [options] The optional parameters @@ -198,8 +223,7 @@ export class Servers { /** * Updates an existing server. The request body can contain one to many of the properties present * in the normal server definition. - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param parameters The required parameters for updating a server. * @param [options] The optional parameters @@ -219,8 +243,7 @@ export class Servers { /** * Deletes a server. - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param [options] The optional parameters * @returns Promise @@ -238,8 +261,7 @@ export class Servers { /** * Restarts a server. - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param [options] The optional parameters * @returns Promise @@ -254,6 +276,62 @@ export class Servers { beginRestartOperationSpec, options); } + + /** + * Starts a stopped server. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param [options] The optional parameters + * @returns Promise + */ + beginStart(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + options + }, + beginStartOperationSpec, + options); + } + + /** + * Stops a running server. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param [options] The optional parameters + * @returns Promise + */ + beginStop(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + options + }, + beginStopOperationSpec, + options); + } + + /** + * Upgrade server version. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters The required parameters for updating a server. + * @param [options] The optional parameters + * @returns Promise + */ + beginUpgrade(resourceGroupName: string, serverName: string, parameters: Models.ServerUpgradeParameters, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + parameters, + options + }, + beginUpgradeOperationSpec, + options); + } } // Operation Specifications @@ -267,7 +345,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.serverName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -291,7 +369,7 @@ const listByResourceGroupOperationSpec: msRest.OperationSpec = { Parameters.resourceGroupName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -314,7 +392,7 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -339,7 +417,7 @@ const beginCreateOperationSpec: msRest.OperationSpec = { Parameters.serverName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -375,7 +453,7 @@ const beginUpdateOperationSpec: msRest.OperationSpec = { Parameters.serverName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -408,7 +486,7 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { Parameters.serverName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -433,7 +511,7 @@ const beginRestartOperationSpec: msRest.OperationSpec = { Parameters.serverName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -447,3 +525,82 @@ const beginRestartOperationSpec: msRest.OperationSpec = { }, serializer }; + +const beginStartOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/start", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginStopOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/stop", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginUpgradeOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/upgrade", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.ServerUpgradeParameters, + required: true + } + }, + responses: { + 200: {}, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/mysql/arm-mysql/src/operations/topQueryStatistics.ts b/sdk/mysql/arm-mysql/src/operations/topQueryStatistics.ts new file mode 100644 index 000000000000..786de98ff08e --- /dev/null +++ b/sdk/mysql/arm-mysql/src/operations/topQueryStatistics.ts @@ -0,0 +1,211 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/topQueryStatisticsMappers"; +import * as Parameters from "../models/parameters"; +import { MySQLManagementClientContext } from "../mySQLManagementClientContext"; + +/** Class representing a TopQueryStatistics. */ +export class TopQueryStatistics { + private readonly client: MySQLManagementClientContext; + + /** + * Create a TopQueryStatistics. + * @param {MySQLManagementClientContext} client Reference to the service client. + */ + constructor(client: MySQLManagementClientContext) { + this.client = client; + } + + /** + * Retrieve the query statistic for specified identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param queryStatisticId The Query Statistic identifier. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, serverName: string, queryStatisticId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param queryStatisticId The Query Statistic identifier. + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, queryStatisticId: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param queryStatisticId The Query Statistic identifier. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, queryStatisticId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, serverName: string, queryStatisticId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + queryStatisticId, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Retrieve the Query-Store top queries for specified metric and aggregation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters The required parameters for retrieving top query statistics. + * @param [options] The optional parameters + * @returns Promise + */ + listByServer(resourceGroupName: string, serverName: string, parameters: Models.TopQueryStatisticsInput, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters The required parameters for retrieving top query statistics. + * @param callback The callback + */ + listByServer(resourceGroupName: string, serverName: string, parameters: Models.TopQueryStatisticsInput, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters The required parameters for retrieving top query statistics. + * @param options The optional parameters + * @param callback The callback + */ + listByServer(resourceGroupName: string, serverName: string, parameters: Models.TopQueryStatisticsInput, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByServer(resourceGroupName: string, serverName: string, parameters: Models.TopQueryStatisticsInput, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + parameters, + options + }, + listByServerOperationSpec, + callback) as Promise; + } + + /** + * Retrieve the Query-Store top queries for specified metric and aggregation. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByServerNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByServerNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByServerNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByServerNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByServerNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/topQueryStatistics/{queryStatisticId}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.queryStatisticId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.QueryStatistic + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByServerOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/topQueryStatistics", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.TopQueryStatisticsInput, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.TopQueryStatisticsResultList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByServerNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.TopQueryStatisticsResultList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/mysql/arm-mysql/src/operations/virtualNetworkRules.ts b/sdk/mysql/arm-mysql/src/operations/virtualNetworkRules.ts index 5416a1edca8c..cf6b54e0e393 100644 --- a/sdk/mysql/arm-mysql/src/operations/virtualNetworkRules.ts +++ b/sdk/mysql/arm-mysql/src/operations/virtualNetworkRules.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -29,8 +28,7 @@ export class VirtualNetworkRules { /** * Gets a virtual network rule. - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @param [options] The optional parameters @@ -38,16 +36,14 @@ export class VirtualNetworkRules { */ get(resourceGroupName: string, serverName: string, virtualNetworkRuleName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @param callback The callback */ get(resourceGroupName: string, serverName: string, virtualNetworkRuleName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @param options The optional parameters @@ -68,8 +64,7 @@ export class VirtualNetworkRules { /** * Creates or updates an existing virtual network rule. - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @param parameters The requested virtual Network Rule Resource state. @@ -83,8 +78,7 @@ export class VirtualNetworkRules { /** * Deletes the virtual network rule with the given name. - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @param [options] The optional parameters @@ -97,23 +91,20 @@ export class VirtualNetworkRules { /** * Gets a list of virtual network rules in a server. - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param [options] The optional parameters * @returns Promise */ listByServer(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param callback The callback */ listByServer(resourceGroupName: string, serverName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param options The optional parameters * @param callback The callback @@ -132,8 +123,7 @@ export class VirtualNetworkRules { /** * Creates or updates an existing virtual network rule. - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @param parameters The requested virtual Network Rule Resource state. @@ -155,8 +145,7 @@ export class VirtualNetworkRules { /** * Deletes the virtual network rule with the given name. - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @param [options] The optional parameters @@ -215,7 +204,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.virtualNetworkRuleName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -240,7 +229,7 @@ const listByServerOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -266,7 +255,7 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { Parameters.virtualNetworkRuleName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -303,7 +292,7 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -326,6 +315,9 @@ const listByServerNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion0 + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/mysql/arm-mysql/src/operations/waitStatistics.ts b/sdk/mysql/arm-mysql/src/operations/waitStatistics.ts new file mode 100644 index 000000000000..a0f199e4f410 --- /dev/null +++ b/sdk/mysql/arm-mysql/src/operations/waitStatistics.ts @@ -0,0 +1,211 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/waitStatisticsMappers"; +import * as Parameters from "../models/parameters"; +import { MySQLManagementClientContext } from "../mySQLManagementClientContext"; + +/** Class representing a WaitStatistics. */ +export class WaitStatistics { + private readonly client: MySQLManagementClientContext; + + /** + * Create a WaitStatistics. + * @param {MySQLManagementClientContext} client Reference to the service client. + */ + constructor(client: MySQLManagementClientContext) { + this.client = client; + } + + /** + * Retrieve wait statistics for specified identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param waitStatisticsId The Wait Statistic identifier. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, serverName: string, waitStatisticsId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param waitStatisticsId The Wait Statistic identifier. + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, waitStatisticsId: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param waitStatisticsId The Wait Statistic identifier. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, waitStatisticsId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, serverName: string, waitStatisticsId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + waitStatisticsId, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Retrieve wait statistics for specified aggregation window. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters The required parameters for retrieving wait statistics. + * @param [options] The optional parameters + * @returns Promise + */ + listByServer(resourceGroupName: string, serverName: string, parameters: Models.WaitStatisticsInput, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters The required parameters for retrieving wait statistics. + * @param callback The callback + */ + listByServer(resourceGroupName: string, serverName: string, parameters: Models.WaitStatisticsInput, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters The required parameters for retrieving wait statistics. + * @param options The optional parameters + * @param callback The callback + */ + listByServer(resourceGroupName: string, serverName: string, parameters: Models.WaitStatisticsInput, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByServer(resourceGroupName: string, serverName: string, parameters: Models.WaitStatisticsInput, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + parameters, + options + }, + listByServerOperationSpec, + callback) as Promise; + } + + /** + * Retrieve wait statistics for specified aggregation window. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByServerNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByServerNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByServerNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByServerNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByServerNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/waitStatistics/{waitStatisticsId}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.waitStatisticsId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.WaitStatistic + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByServerOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/waitStatistics", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.WaitStatisticsInput, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.WaitStatisticsResultList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByServerNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.WaitStatisticsResultList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/mysql/arm-mysql/tsconfig.json b/sdk/mysql/arm-mysql/tsconfig.json index 87bbf5b5fa49..422b584abd5e 100644 --- a/sdk/mysql/arm-mysql/tsconfig.json +++ b/sdk/mysql/arm-mysql/tsconfig.json @@ -9,7 +9,7 @@ "esModuleInterop": true, "allowSyntheticDefaultImports": true, "forceConsistentCasingInFileNames": true, - "lib": ["es6"], + "lib": ["es6", "dom"], "declaration": true, "outDir": "./esm", "importHelpers": true From 2c8de11d93ade7bf25c0ea5529157417e0c794ff Mon Sep 17 00:00:00 2001 From: colawwj <70128817+colawwj@users.noreply.github.com> Date: Fri, 16 Jul 2021 10:24:27 +0800 Subject: [PATCH 21/28] arm-postgresql-release (#16374) --- sdk/postgresql/arm-postgresql/README.md | 10 ++++------ sdk/postgresql/arm-postgresql/package.json | 4 ++-- .../arm-postgresql/src/models/parameters.ts | 3 +-- .../src/operations/checkNameAvailability.ts | 2 +- .../src/operations/configurations.ts | 6 +++--- .../arm-postgresql/src/operations/databases.ts | 8 ++++---- .../arm-postgresql/src/operations/firewallRules.ts | 8 ++++---- .../src/operations/locationBasedPerformanceTier.ts | 2 +- .../arm-postgresql/src/operations/logFiles.ts | 2 +- .../arm-postgresql/src/operations/operations.ts | 2 +- .../src/operations/recoverableServers.ts | 2 +- .../arm-postgresql/src/operations/replicas.ts | 2 +- .../src/operations/serverAdministrators.ts | 8 ++++---- .../src/operations/serverBasedPerformanceTier.ts | 2 +- .../src/operations/serverParameters.ts | 2 +- .../arm-postgresql/src/operations/servers.ts | 14 +++++++------- .../src/operations/virtualNetworkRules.ts | 8 ++++---- .../src/postgreSQLManagementClientContext.ts | 10 +++++----- 18 files changed, 46 insertions(+), 49 deletions(-) diff --git a/sdk/postgresql/arm-postgresql/README.md b/sdk/postgresql/arm-postgresql/README.md index 70ce548880f8..030b923cffdc 100644 --- a/sdk/postgresql/arm-postgresql/README.md +++ b/sdk/postgresql/arm-postgresql/README.md @@ -1,11 +1,11 @@ ## Azure PostgreSQLManagementClient SDK for JavaScript -This package contains an isomorphic SDK (runs both in Node.js and in browsers) for PostgreSQLManagementClient. +This package contains an isomorphic SDK (runs both in node.js and in browsers) for PostgreSQLManagementClient. ### Currently supported environments - [LTS versions of Node.js](https://nodejs.org/about/releases/) -- Latest versions of Safari, Chrome, Edge, and Firefox. +- Latest versions of Safari, Chrome, Edge and Firefox. ### Prerequisites @@ -21,7 +21,6 @@ Install both packages using the below command: ```bash npm install --save @azure/arm-postgresql @azure/identity ``` - > **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. @@ -37,7 +36,6 @@ If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/ In the below samples, we pass the credential and the Azure subscription id to instantiate the client. Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. - #### nodejs - Authentication, client creation, and get servers as an example written in JavaScript. ##### Sample code @@ -87,7 +85,7 @@ In browser applications, we recommend using the `InteractiveBrowserCredential` t const credential = new InteractiveBrowserCredential( { clientId: "", - tenantId: "" + tenant: "" }); const client = new Azure.ArmPostgresql.PostgreSQLManagementClient(creds, subscriptionId); const resourceGroupName = "testresourceGroupName"; @@ -109,4 +107,4 @@ In browser applications, we recommend using the `InteractiveBrowserCredential` t - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/postgresql/arm-postgresql/README.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/postgresql/arm-postgresql//README.png) diff --git a/sdk/postgresql/arm-postgresql/package.json b/sdk/postgresql/arm-postgresql/package.json index 2d8d44c2fba5..05180467ae00 100644 --- a/sdk/postgresql/arm-postgresql/package.json +++ b/sdk/postgresql/arm-postgresql/package.json @@ -2,7 +2,7 @@ "name": "@azure/arm-postgresql", "author": "Microsoft Corporation", "description": "PostgreSQLManagementClient Library with typescript type definitions for node.js and browser.", - "version": "5.1.0", + "version": "5.2.0", "dependencies": { "@azure/ms-rest-azure-js": "^2.1.0", "@azure/ms-rest-js": "^2.2.0", @@ -27,7 +27,7 @@ "rollup-plugin-sourcemaps": "^0.4.2", "uglify-js": "^3.6.0" }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/postgresql/arm-postgresql", + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/feature/v4/sdk/postgresql/arm-postgresql/", "repository": { "type": "git", "url": "https://github.com/Azure/azure-sdk-for-js.git" diff --git a/sdk/postgresql/arm-postgresql/src/models/parameters.ts b/sdk/postgresql/arm-postgresql/src/models/parameters.ts index 6a07dcd20cdc..6b24bcc52046 100644 --- a/sdk/postgresql/arm-postgresql/src/models/parameters.ts +++ b/sdk/postgresql/arm-postgresql/src/models/parameters.ts @@ -152,8 +152,7 @@ export const resourceGroupName: msRest.OperationURLParameter = { serializedName: "resourceGroupName", constraints: { MaxLength: 90, - MinLength: 1, - Pattern: /^[-\w\._\(\)]+$/ + MinLength: 1 }, type: { name: "String" diff --git a/sdk/postgresql/arm-postgresql/src/operations/checkNameAvailability.ts b/sdk/postgresql/arm-postgresql/src/operations/checkNameAvailability.ts index 23d60ee561c9..4ca29cf51daf 100644 --- a/sdk/postgresql/arm-postgresql/src/operations/checkNameAvailability.ts +++ b/sdk/postgresql/arm-postgresql/src/operations/checkNameAvailability.ts @@ -61,7 +61,7 @@ export class CheckNameAvailability { const serializer = new msRest.Serializer(Mappers); const executeOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: "subscriptions/{subscriptionId}/providers/Microsoft.DBForPostgreSQL/checkNameAvailability", + path: "subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/checkNameAvailability", urlParameters: [ Parameters.subscriptionId ], diff --git a/sdk/postgresql/arm-postgresql/src/operations/configurations.ts b/sdk/postgresql/arm-postgresql/src/operations/configurations.ts index 411db3ba0b14..18401c02b7d3 100644 --- a/sdk/postgresql/arm-postgresql/src/operations/configurations.ts +++ b/sdk/postgresql/arm-postgresql/src/operations/configurations.ts @@ -135,7 +135,7 @@ export class Configurations { const serializer = new msRest.Serializer(Mappers); const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/configurations/{configurationName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/configurations/{configurationName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -161,7 +161,7 @@ const getOperationSpec: msRest.OperationSpec = { const listByServerOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/configurations", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/configurations", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -186,7 +186,7 @@ const listByServerOperationSpec: msRest.OperationSpec = { const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/configurations/{configurationName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/configurations/{configurationName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, diff --git a/sdk/postgresql/arm-postgresql/src/operations/databases.ts b/sdk/postgresql/arm-postgresql/src/operations/databases.ts index 3311dbc0d0c1..63dfec8a9b77 100644 --- a/sdk/postgresql/arm-postgresql/src/operations/databases.ts +++ b/sdk/postgresql/arm-postgresql/src/operations/databases.ts @@ -168,7 +168,7 @@ export class Databases { const serializer = new msRest.Serializer(Mappers); const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/databases/{databaseName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/databases/{databaseName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -194,7 +194,7 @@ const getOperationSpec: msRest.OperationSpec = { const listByServerOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/databases", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/databases", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -219,7 +219,7 @@ const listByServerOperationSpec: msRest.OperationSpec = { const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/databases/{databaseName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/databases/{databaseName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -256,7 +256,7 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { const beginDeleteMethodOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/databases/{databaseName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/databases/{databaseName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, diff --git a/sdk/postgresql/arm-postgresql/src/operations/firewallRules.ts b/sdk/postgresql/arm-postgresql/src/operations/firewallRules.ts index a9385ad42207..1662cc85cee2 100644 --- a/sdk/postgresql/arm-postgresql/src/operations/firewallRules.ts +++ b/sdk/postgresql/arm-postgresql/src/operations/firewallRules.ts @@ -168,7 +168,7 @@ export class FirewallRules { const serializer = new msRest.Serializer(Mappers); const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/firewallRules/{firewallRuleName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/firewallRules/{firewallRuleName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -194,7 +194,7 @@ const getOperationSpec: msRest.OperationSpec = { const listByServerOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/firewallRules", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/firewallRules", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -219,7 +219,7 @@ const listByServerOperationSpec: msRest.OperationSpec = { const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/firewallRules/{firewallRuleName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/firewallRules/{firewallRuleName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -256,7 +256,7 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { const beginDeleteMethodOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/firewallRules/{firewallRuleName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/firewallRules/{firewallRuleName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, diff --git a/sdk/postgresql/arm-postgresql/src/operations/locationBasedPerformanceTier.ts b/sdk/postgresql/arm-postgresql/src/operations/locationBasedPerformanceTier.ts index 93f28deedf25..b4980bb1db6a 100644 --- a/sdk/postgresql/arm-postgresql/src/operations/locationBasedPerformanceTier.ts +++ b/sdk/postgresql/arm-postgresql/src/operations/locationBasedPerformanceTier.ts @@ -58,7 +58,7 @@ export class LocationBasedPerformanceTier { const serializer = new msRest.Serializer(Mappers); const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.DBForPostgreSQL/locations/{locationName}/performanceTiers", + path: "subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/locations/{locationName}/performanceTiers", urlParameters: [ Parameters.subscriptionId, Parameters.locationName diff --git a/sdk/postgresql/arm-postgresql/src/operations/logFiles.ts b/sdk/postgresql/arm-postgresql/src/operations/logFiles.ts index b4e3f166ca73..593fab8b6bc6 100644 --- a/sdk/postgresql/arm-postgresql/src/operations/logFiles.ts +++ b/sdk/postgresql/arm-postgresql/src/operations/logFiles.ts @@ -62,7 +62,7 @@ export class LogFiles { const serializer = new msRest.Serializer(Mappers); const listByServerOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/logFiles", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/logFiles", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, diff --git a/sdk/postgresql/arm-postgresql/src/operations/operations.ts b/sdk/postgresql/arm-postgresql/src/operations/operations.ts index 153e9feadba2..893280a3443c 100644 --- a/sdk/postgresql/arm-postgresql/src/operations/operations.ts +++ b/sdk/postgresql/arm-postgresql/src/operations/operations.ts @@ -54,7 +54,7 @@ export class Operations { const serializer = new msRest.Serializer(Mappers); const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "providers/Microsoft.DBForPostgreSQL/operations", + path: "providers/Microsoft.DBforPostgreSQL/operations", queryParameters: [ Parameters.apiVersion0 ], diff --git a/sdk/postgresql/arm-postgresql/src/operations/recoverableServers.ts b/sdk/postgresql/arm-postgresql/src/operations/recoverableServers.ts index 2ec7f1537604..8882c06ab118 100644 --- a/sdk/postgresql/arm-postgresql/src/operations/recoverableServers.ts +++ b/sdk/postgresql/arm-postgresql/src/operations/recoverableServers.ts @@ -62,7 +62,7 @@ export class RecoverableServers { const serializer = new msRest.Serializer(Mappers); const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/recoverableServers", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/recoverableServers", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, diff --git a/sdk/postgresql/arm-postgresql/src/operations/replicas.ts b/sdk/postgresql/arm-postgresql/src/operations/replicas.ts index fa52aae1861d..aa456abcb0b0 100644 --- a/sdk/postgresql/arm-postgresql/src/operations/replicas.ts +++ b/sdk/postgresql/arm-postgresql/src/operations/replicas.ts @@ -62,7 +62,7 @@ export class Replicas { const serializer = new msRest.Serializer(Mappers); const listByServerOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/replicas", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/replicas", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, diff --git a/sdk/postgresql/arm-postgresql/src/operations/serverAdministrators.ts b/sdk/postgresql/arm-postgresql/src/operations/serverAdministrators.ts index 5ae9b70082b5..0fe20530eb59 100644 --- a/sdk/postgresql/arm-postgresql/src/operations/serverAdministrators.ts +++ b/sdk/postgresql/arm-postgresql/src/operations/serverAdministrators.ts @@ -160,7 +160,7 @@ export class ServerAdministrators { const serializer = new msRest.Serializer(Mappers); const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/administrators/activeDirectory", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/administrators/activeDirectory", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -185,7 +185,7 @@ const getOperationSpec: msRest.OperationSpec = { const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/administrators", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/administrators", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -210,7 +210,7 @@ const listOperationSpec: msRest.OperationSpec = { const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/administrators/activeDirectory", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/administrators/activeDirectory", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -245,7 +245,7 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { const beginDeleteMethodOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/administrators/activeDirectory", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/administrators/activeDirectory", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, diff --git a/sdk/postgresql/arm-postgresql/src/operations/serverBasedPerformanceTier.ts b/sdk/postgresql/arm-postgresql/src/operations/serverBasedPerformanceTier.ts index 2697145861c5..1019479743e5 100644 --- a/sdk/postgresql/arm-postgresql/src/operations/serverBasedPerformanceTier.ts +++ b/sdk/postgresql/arm-postgresql/src/operations/serverBasedPerformanceTier.ts @@ -62,7 +62,7 @@ export class ServerBasedPerformanceTier { const serializer = new msRest.Serializer(Mappers); const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/performanceTiers", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/performanceTiers", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, diff --git a/sdk/postgresql/arm-postgresql/src/operations/serverParameters.ts b/sdk/postgresql/arm-postgresql/src/operations/serverParameters.ts index f9ec586d5cb4..349a5d70027b 100644 --- a/sdk/postgresql/arm-postgresql/src/operations/serverParameters.ts +++ b/sdk/postgresql/arm-postgresql/src/operations/serverParameters.ts @@ -64,7 +64,7 @@ export class ServerParameters { const serializer = new msRest.Serializer(Mappers); const beginListUpdateConfigurationsOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/updateConfigurations", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/updateConfigurations", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, diff --git a/sdk/postgresql/arm-postgresql/src/operations/servers.ts b/sdk/postgresql/arm-postgresql/src/operations/servers.ts index a03fe311cca5..2a15f343678d 100644 --- a/sdk/postgresql/arm-postgresql/src/operations/servers.ts +++ b/sdk/postgresql/arm-postgresql/src/operations/servers.ts @@ -243,7 +243,7 @@ export class Servers { const serializer = new msRest.Serializer(Mappers); const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -268,7 +268,7 @@ const getOperationSpec: msRest.OperationSpec = { const listByResourceGroupOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName @@ -292,7 +292,7 @@ const listByResourceGroupOperationSpec: msRest.OperationSpec = { const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.DBForPostgreSQL/servers", + path: "subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/servers", urlParameters: [ Parameters.subscriptionId ], @@ -315,7 +315,7 @@ const listOperationSpec: msRest.OperationSpec = { const beginCreateOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -351,7 +351,7 @@ const beginCreateOperationSpec: msRest.OperationSpec = { const beginUpdateOperationSpec: msRest.OperationSpec = { httpMethod: "PATCH", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -384,7 +384,7 @@ const beginUpdateOperationSpec: msRest.OperationSpec = { const beginDeleteMethodOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -409,7 +409,7 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { const beginRestartOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/restart", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/restart", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, diff --git a/sdk/postgresql/arm-postgresql/src/operations/virtualNetworkRules.ts b/sdk/postgresql/arm-postgresql/src/operations/virtualNetworkRules.ts index c9e901550b6a..91d544e77d01 100644 --- a/sdk/postgresql/arm-postgresql/src/operations/virtualNetworkRules.ts +++ b/sdk/postgresql/arm-postgresql/src/operations/virtualNetworkRules.ts @@ -196,7 +196,7 @@ export class VirtualNetworkRules { const serializer = new msRest.Serializer(Mappers); const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}", urlParameters: [ Parameters.resourceGroupName, Parameters.serverName, @@ -222,7 +222,7 @@ const getOperationSpec: msRest.OperationSpec = { const listByServerOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/virtualNetworkRules", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/virtualNetworkRules", urlParameters: [ Parameters.resourceGroupName, Parameters.serverName, @@ -247,7 +247,7 @@ const listByServerOperationSpec: msRest.OperationSpec = { const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}", urlParameters: [ Parameters.resourceGroupName, Parameters.serverName, @@ -284,7 +284,7 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { const beginDeleteMethodOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}", urlParameters: [ Parameters.resourceGroupName, Parameters.serverName, diff --git a/sdk/postgresql/arm-postgresql/src/postgreSQLManagementClientContext.ts b/sdk/postgresql/arm-postgresql/src/postgreSQLManagementClientContext.ts index 63ae6996dc86..8cafe103d3a0 100644 --- a/sdk/postgresql/arm-postgresql/src/postgreSQLManagementClientContext.ts +++ b/sdk/postgresql/arm-postgresql/src/postgreSQLManagementClientContext.ts @@ -9,11 +9,11 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; -import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; +import { TokenCredential } from "@azure/core-auth"; const packageName = "@azure/arm-postgresql"; -const packageVersion = "5.1.0"; +const packageVersion = "5.2.0"; export class PostgreSQLManagementClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials | TokenCredential; @@ -41,7 +41,7 @@ export class PostgreSQLManagementClientContext extends msRestAzure.AzureServiceC if (!options) { options = {}; } - if(!options.userAgent) { + if (!options.userAgent) { const defaultUserAgent = msRestAzure.getDefaultUserAgentValue(); options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`; } @@ -55,10 +55,10 @@ export class PostgreSQLManagementClientContext extends msRestAzure.AzureServiceC this.credentials = credentials; this.subscriptionId = subscriptionId; - if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) { + if (options.acceptLanguage !== null && options.acceptLanguage !== undefined) { this.acceptLanguage = options.acceptLanguage; } - if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { + if (options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout; } } From 88a322034f334346c021083b55916b638f49dbf1 Mon Sep 17 00:00:00 2001 From: colawwj <70128817+colawwj@users.noreply.github.com> Date: Fri, 16 Jul 2021 10:28:36 +0800 Subject: [PATCH 22/28] arm-network-release (#16330) --- sdk/network/arm-network/README.md | 50 +- sdk/network/arm-network/package.json | 4 +- ...atewayPrivateEndpointConnectionsMappers.ts | 3 + ...ationGatewayPrivateLinkResourcesMappers.ts | 3 + .../src/models/applicationGatewaysMappers.ts | 3 + .../applicationSecurityGroupsMappers.ts | 3 + .../availableEndpointServicesMappers.ts | 3 + .../models/azureFirewallFqdnTagsMappers.ts | 3 + .../src/models/azureFirewallsMappers.ts | 3 + .../src/models/bastionHostsMappers.ts | 3 + .../models/bgpServiceCommunitiesMappers.ts | 3 + .../src/models/connectionMonitorsMappers.ts | 3 + .../src/models/customIPPrefixesMappers.ts | 3 + .../src/models/ddosCustomPoliciesMappers.ts | 3 + .../src/models/ddosProtectionPlansMappers.ts | 3 + .../src/models/defaultSecurityRulesMappers.ts | 3 + .../dscpConfigurationOperationsMappers.ts | 3 + ...xpressRouteCircuitAuthorizationsMappers.ts | 3 + .../expressRouteCircuitConnectionsMappers.ts | 3 + .../expressRouteCircuitPeeringsMappers.ts | 3 + .../src/models/expressRouteCircuitsMappers.ts | 3 + .../models/expressRouteConnectionsMappers.ts | 3 + ...ressRouteCrossConnectionPeeringsMappers.ts | 3 + .../expressRouteCrossConnectionsMappers.ts | 3 + .../src/models/expressRouteGatewaysMappers.ts | 3 + .../src/models/expressRouteLinksMappers.ts | 3 + .../expressRoutePortsLocationsMappers.ts | 3 + .../src/models/expressRoutePortsMappers.ts | 3 + .../expressRouteServiceProvidersMappers.ts | 3 + .../src/models/firewallPoliciesMappers.ts | 3 + ...rewallPolicyRuleCollectionGroupsMappers.ts | 3 + .../arm-network/src/models/flowLogsMappers.ts | 3 + .../src/models/hubRouteTablesMappers.ts | 3 + .../hubVirtualNetworkConnectionsMappers.ts | 3 + .../src/models/inboundNatRulesMappers.ts | 3 + .../inboundSecurityRuleOperationsMappers.ts | 3 + sdk/network/arm-network/src/models/index.ts | 14143 ++++++++-------- .../src/models/ipAllocationsMappers.ts | 3 + .../arm-network/src/models/ipGroupsMappers.ts | 3 + .../loadBalancerBackendAddressPoolsMappers.ts | 3 + ...BalancerFrontendIPConfigurationsMappers.ts | 3 + .../loadBalancerLoadBalancingRulesMappers.ts | 3 + .../loadBalancerNetworkInterfacesMappers.ts | 3 + .../loadBalancerOutboundRulesMappers.ts | 3 + .../src/models/loadBalancerProbesMappers.ts | 3 + .../src/models/loadBalancersMappers.ts | 5 + .../src/models/localNetworkGatewaysMappers.ts | 3 + sdk/network/arm-network/src/models/mappers.ts | 474 +- .../src/models/natGatewaysMappers.ts | 3 + .../arm-network/src/models/natRulesMappers.ts | 3 + ...networkInterfaceIPConfigurationsMappers.ts | 3 + .../networkInterfaceLoadBalancersMappers.ts | 3 + ...etworkInterfaceTapConfigurationsMappers.ts | 3 + .../src/models/networkInterfacesMappers.ts | 3 + .../src/models/networkProfilesMappers.ts | 3 + .../models/networkSecurityGroupsMappers.ts | 3 + .../models/networkVirtualAppliancesMappers.ts | 3 + .../src/models/networkWatchersMappers.ts | 3 + .../src/models/p2sVpnGatewaysMappers.ts | 3 + .../arm-network/src/models/parameters.ts | 14 +- ...erExpressRouteCircuitConnectionsMappers.ts | 3 + .../src/models/privateDnsZoneGroupsMappers.ts | 3 + .../src/models/privateEndpointsMappers.ts | 3 + .../src/models/privateLinkServicesMappers.ts | 3 + .../src/models/publicIPAddressesMappers.ts | 3 + .../src/models/publicIPPrefixesMappers.ts | 3 + .../models/resourceNavigationLinksMappers.ts | 3 + .../src/models/routeFilterRulesMappers.ts | 3 + .../src/models/routeFiltersMappers.ts | 3 + .../src/models/routeTablesMappers.ts | 3 + .../arm-network/src/models/routesMappers.ts | 3 + .../models/securityPartnerProvidersMappers.ts | 3 + .../src/models/securityRulesMappers.ts | 3 + .../models/serviceAssociationLinksMappers.ts | 3 + .../models/serviceEndpointPoliciesMappers.ts | 3 + ...serviceEndpointPolicyDefinitionsMappers.ts | 3 + .../arm-network/src/models/subnetsMappers.ts | 3 + .../models/virtualApplianceSitesMappers.ts | 3 + .../src/models/virtualApplianceSkusMappers.ts | 3 + .../models/virtualHubBgpConnectionMappers.ts | 3 + .../models/virtualHubBgpConnectionsMappers.ts | 3 + .../virtualHubIpConfigurationMappers.ts | 3 + .../models/virtualHubRouteTableV2sMappers.ts | 3 + .../src/models/virtualHubsMappers.ts | 3 + ...virtualNetworkGatewayConnectionsMappers.ts | 3 + .../virtualNetworkGatewayNatRulesMappers.ts | 318 + .../models/virtualNetworkGatewaysMappers.ts | 3 + .../models/virtualNetworkPeeringsMappers.ts | 3 + .../src/models/virtualNetworkTapsMappers.ts | 3 + .../src/models/virtualNetworksMappers.ts | 3 + .../models/virtualRouterPeeringsMappers.ts | 3 + .../src/models/virtualRoutersMappers.ts | 3 + .../src/models/virtualWansMappers.ts | 3 + .../src/models/vpnConnectionsMappers.ts | 3 + .../src/models/vpnGatewaysMappers.ts | 3 + .../src/models/vpnLinkConnectionsMappers.ts | 3 + .../models/vpnServerConfigurationsMappers.ts | 3 + .../models/vpnSiteLinkConnectionsMappers.ts | 3 + .../src/models/vpnSiteLinksMappers.ts | 3 + .../arm-network/src/models/vpnSitesMappers.ts | 3 + .../webApplicationFirewallPoliciesMappers.ts | 3 + .../src/networkManagementClient.ts | 498 +- .../src/networkManagementClientContext.ts | 19 +- .../arm-network/src/operations/index.ts | 1 + .../src/operations/loadBalancers.ts | 60 + .../virtualNetworkGatewayNatRules.ts | 334 + .../src/operations/virtualNetworkPeerings.ts | 5 +- 107 files changed, 8779 insertions(+), 7428 deletions(-) create mode 100644 sdk/network/arm-network/src/models/virtualNetworkGatewayNatRulesMappers.ts create mode 100644 sdk/network/arm-network/src/operations/virtualNetworkGatewayNatRules.ts diff --git a/sdk/network/arm-network/README.md b/sdk/network/arm-network/README.md index bc1dae18b485..af87d40e7168 100644 --- a/sdk/network/arm-network/README.md +++ b/sdk/network/arm-network/README.md @@ -5,7 +5,7 @@ This package contains an isomorphic SDK (runs both in node.js and in browsers) f ### Currently supported environments - [LTS versions of Node.js](https://nodejs.org/about/releases/) -- Latest versions of Safari, Chrome, Edge, and Firefox. +- Latest versions of Safari, Chrome, Edge and Firefox. ### Prerequisites @@ -14,18 +14,15 @@ You must have an [Azure subscription](https://azure.microsoft.com/free/). ### How to install To use this SDK in your project, you will need to install two packages. - - `@azure/arm-network` that contains the client. - `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. Install both packages using the below command: - ```bash npm install --save @azure/arm-network @azure/identity ``` - > **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. -> If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. ### How to use @@ -39,7 +36,6 @@ npm install --save @azure/arm-network @azure/identity In the below samples, we pass the credential and the Azure subscription id to instantiate the client. Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. - #### nodejs - Authentication, client creation, and get applicationGateways as an example written in JavaScript. ##### Sample code @@ -55,24 +51,20 @@ const creds = new DefaultAzureCredential(); const client = new NetworkManagementClient(creds, subscriptionId); const resourceGroupName = "testresourceGroupName"; const applicationGatewayName = "testapplicationGatewayName"; -client.applicationGateways - .get(resourceGroupName, applicationGatewayName) - .then((result) => { - console.log("The result is:"); - console.log(result); - }) - .catch((err) => { - console.log("An error occurred:"); - console.error(err); - }); +client.applicationGateways.get(resourceGroupName, applicationGatewayName).then((result) => { + console.log("The result is:"); + console.log(result); +}).catch((err) => { + console.log("An error occurred:"); + console.error(err); +}); ``` #### browser - Authentication, client creation, and get applicationGateways as an example written in JavaScript. In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. - -- See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. -- Note down the client Id from the previous step and use it in the browser sample below. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code @@ -90,23 +82,21 @@ In browser applications, we recommend using the `InteractiveBrowserCredential` t const subscriptionId = ""; // Create credentials using the `@azure/identity` package. // Please note that you can also use credentials from the `@azure/ms-rest-browserauth` package instead. - const credential = new InteractiveBrowserCredential({ + const credential = new InteractiveBrowserCredential( + { clientId: "", tenant: "" }); const client = new Azure.ArmNetwork.NetworkManagementClient(creds, subscriptionId); const resourceGroupName = "testresourceGroupName"; const applicationGatewayName = "testapplicationGatewayName"; - client.applicationGateways - .get(resourceGroupName, applicationGatewayName) - .then((result) => { - console.log("The result is:"); - console.log(result); - }) - .catch((err) => { - console.log("An error occurred:"); - console.error(err); - }); + client.applicationGateways.get(resourceGroupName, applicationGatewayName).then((result) => { + console.log("The result is:"); + console.log(result); + }).catch((err) => { + console.log("An error occurred:"); + console.error(err); + }); diff --git a/sdk/network/arm-network/package.json b/sdk/network/arm-network/package.json index 27144ec92901..2a511174e820 100644 --- a/sdk/network/arm-network/package.json +++ b/sdk/network/arm-network/package.json @@ -2,7 +2,7 @@ "name": "@azure/arm-network", "author": "Microsoft Corporation", "description": "NetworkManagementClient Library with typescript type definitions for node.js and browser.", - "version": "25.0.0", + "version": "25.1.0", "dependencies": { "@azure/ms-rest-azure-js": "^2.1.0", "@azure/ms-rest-js": "^2.2.0", @@ -27,7 +27,7 @@ "rollup-plugin-sourcemaps": "^0.4.2", "uglify-js": "^3.6.0" }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/network/arm-network", + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/feature/v4/sdk/network/arm-network", "repository": { "type": "git", "url": "https://github.com/Azure/azure-sdk-for-js.git" diff --git a/sdk/network/arm-network/src/models/applicationGatewayPrivateEndpointConnectionsMappers.ts b/sdk/network/arm-network/src/models/applicationGatewayPrivateEndpointConnectionsMappers.ts index 07d952e84660..7801704420c0 100644 --- a/sdk/network/arm-network/src/models/applicationGatewayPrivateEndpointConnectionsMappers.ts +++ b/sdk/network/arm-network/src/models/applicationGatewayPrivateEndpointConnectionsMappers.ts @@ -162,6 +162,7 @@ export { FlowLog, FlowLogFormatParameters, FrontendIPConfiguration, + GatewayLoadBalancerTunnelInterface, HTTPHeader, HubIPAddresses, HubIpConfiguration, @@ -260,6 +261,7 @@ export { ServiceEndpointPolicy, ServiceEndpointPolicyDefinition, ServiceEndpointPropertiesFormat, + Sku, StaticRoute, Subnet, SubResource, @@ -283,6 +285,7 @@ export { VirtualNetworkGatewayConnection, VirtualNetworkGatewayConnectionListEntity, VirtualNetworkGatewayIPConfiguration, + VirtualNetworkGatewayNatRule, VirtualNetworkGatewaySku, VirtualNetworkPeering, VirtualNetworkTap, diff --git a/sdk/network/arm-network/src/models/applicationGatewayPrivateLinkResourcesMappers.ts b/sdk/network/arm-network/src/models/applicationGatewayPrivateLinkResourcesMappers.ts index 85a0b5406645..4fd0f8ef5f08 100644 --- a/sdk/network/arm-network/src/models/applicationGatewayPrivateLinkResourcesMappers.ts +++ b/sdk/network/arm-network/src/models/applicationGatewayPrivateLinkResourcesMappers.ts @@ -162,6 +162,7 @@ export { FlowLog, FlowLogFormatParameters, FrontendIPConfiguration, + GatewayLoadBalancerTunnelInterface, HTTPHeader, HubIPAddresses, HubIpConfiguration, @@ -260,6 +261,7 @@ export { ServiceEndpointPolicy, ServiceEndpointPolicyDefinition, ServiceEndpointPropertiesFormat, + Sku, StaticRoute, Subnet, SubResource, @@ -283,6 +285,7 @@ export { VirtualNetworkGatewayConnection, VirtualNetworkGatewayConnectionListEntity, VirtualNetworkGatewayIPConfiguration, + VirtualNetworkGatewayNatRule, VirtualNetworkGatewaySku, VirtualNetworkPeering, VirtualNetworkTap, diff --git a/sdk/network/arm-network/src/models/applicationGatewaysMappers.ts b/sdk/network/arm-network/src/models/applicationGatewaysMappers.ts index 05ed4ef3f9c0..161c914adf75 100644 --- a/sdk/network/arm-network/src/models/applicationGatewaysMappers.ts +++ b/sdk/network/arm-network/src/models/applicationGatewaysMappers.ts @@ -172,6 +172,7 @@ export { FlowLog, FlowLogFormatParameters, FrontendIPConfiguration, + GatewayLoadBalancerTunnelInterface, HTTPHeader, HubIPAddresses, HubIpConfiguration, @@ -270,6 +271,7 @@ export { ServiceEndpointPolicy, ServiceEndpointPolicyDefinition, ServiceEndpointPropertiesFormat, + Sku, StaticRoute, Subnet, SubResource, @@ -294,6 +296,7 @@ export { VirtualNetworkGatewayConnection, VirtualNetworkGatewayConnectionListEntity, VirtualNetworkGatewayIPConfiguration, + VirtualNetworkGatewayNatRule, VirtualNetworkGatewaySku, VirtualNetworkPeering, VirtualNetworkTap, diff --git a/sdk/network/arm-network/src/models/applicationSecurityGroupsMappers.ts b/sdk/network/arm-network/src/models/applicationSecurityGroupsMappers.ts index cf9faf34301e..be1ba2459aca 100644 --- a/sdk/network/arm-network/src/models/applicationSecurityGroupsMappers.ts +++ b/sdk/network/arm-network/src/models/applicationSecurityGroupsMappers.ts @@ -162,6 +162,7 @@ export { FlowLog, FlowLogFormatParameters, FrontendIPConfiguration, + GatewayLoadBalancerTunnelInterface, HTTPHeader, HubIPAddresses, HubIpConfiguration, @@ -260,6 +261,7 @@ export { ServiceEndpointPolicy, ServiceEndpointPolicyDefinition, ServiceEndpointPropertiesFormat, + Sku, StaticRoute, Subnet, SubResource, @@ -284,6 +286,7 @@ export { VirtualNetworkGatewayConnection, VirtualNetworkGatewayConnectionListEntity, VirtualNetworkGatewayIPConfiguration, + VirtualNetworkGatewayNatRule, VirtualNetworkGatewaySku, VirtualNetworkPeering, VirtualNetworkTap, diff --git a/sdk/network/arm-network/src/models/availableEndpointServicesMappers.ts b/sdk/network/arm-network/src/models/availableEndpointServicesMappers.ts index 23fbbce0a3ba..7d627e8243d8 100644 --- a/sdk/network/arm-network/src/models/availableEndpointServicesMappers.ts +++ b/sdk/network/arm-network/src/models/availableEndpointServicesMappers.ts @@ -162,6 +162,7 @@ export { FlowLog, FlowLogFormatParameters, FrontendIPConfiguration, + GatewayLoadBalancerTunnelInterface, HTTPHeader, HubIPAddresses, HubIpConfiguration, @@ -260,6 +261,7 @@ export { ServiceEndpointPolicy, ServiceEndpointPolicyDefinition, ServiceEndpointPropertiesFormat, + Sku, StaticRoute, Subnet, SubResource, @@ -283,6 +285,7 @@ export { VirtualNetworkGatewayConnection, VirtualNetworkGatewayConnectionListEntity, VirtualNetworkGatewayIPConfiguration, + VirtualNetworkGatewayNatRule, VirtualNetworkGatewaySku, VirtualNetworkPeering, VirtualNetworkTap, diff --git a/sdk/network/arm-network/src/models/azureFirewallFqdnTagsMappers.ts b/sdk/network/arm-network/src/models/azureFirewallFqdnTagsMappers.ts index 873fed349cb3..3d714df8f0f7 100644 --- a/sdk/network/arm-network/src/models/azureFirewallFqdnTagsMappers.ts +++ b/sdk/network/arm-network/src/models/azureFirewallFqdnTagsMappers.ts @@ -162,6 +162,7 @@ export { FlowLog, FlowLogFormatParameters, FrontendIPConfiguration, + GatewayLoadBalancerTunnelInterface, HTTPHeader, HubIPAddresses, HubIpConfiguration, @@ -260,6 +261,7 @@ export { ServiceEndpointPolicy, ServiceEndpointPolicyDefinition, ServiceEndpointPropertiesFormat, + Sku, StaticRoute, Subnet, SubResource, @@ -283,6 +285,7 @@ export { VirtualNetworkGatewayConnection, VirtualNetworkGatewayConnectionListEntity, VirtualNetworkGatewayIPConfiguration, + VirtualNetworkGatewayNatRule, VirtualNetworkGatewaySku, VirtualNetworkPeering, VirtualNetworkTap, diff --git a/sdk/network/arm-network/src/models/azureFirewallsMappers.ts b/sdk/network/arm-network/src/models/azureFirewallsMappers.ts index 1a023588521c..523e4001a0b7 100644 --- a/sdk/network/arm-network/src/models/azureFirewallsMappers.ts +++ b/sdk/network/arm-network/src/models/azureFirewallsMappers.ts @@ -162,6 +162,7 @@ export { FlowLog, FlowLogFormatParameters, FrontendIPConfiguration, + GatewayLoadBalancerTunnelInterface, HTTPHeader, HubIPAddresses, HubIpConfiguration, @@ -260,6 +261,7 @@ export { ServiceEndpointPolicy, ServiceEndpointPolicyDefinition, ServiceEndpointPropertiesFormat, + Sku, StaticRoute, Subnet, SubResource, @@ -284,6 +286,7 @@ export { VirtualNetworkGatewayConnection, VirtualNetworkGatewayConnectionListEntity, VirtualNetworkGatewayIPConfiguration, + VirtualNetworkGatewayNatRule, VirtualNetworkGatewaySku, VirtualNetworkPeering, VirtualNetworkTap, diff --git a/sdk/network/arm-network/src/models/bastionHostsMappers.ts b/sdk/network/arm-network/src/models/bastionHostsMappers.ts index 961c33268b6d..245e1db8eb80 100644 --- a/sdk/network/arm-network/src/models/bastionHostsMappers.ts +++ b/sdk/network/arm-network/src/models/bastionHostsMappers.ts @@ -162,6 +162,7 @@ export { FlowLog, FlowLogFormatParameters, FrontendIPConfiguration, + GatewayLoadBalancerTunnelInterface, HTTPHeader, HubIPAddresses, HubIpConfiguration, @@ -260,6 +261,7 @@ export { ServiceEndpointPolicy, ServiceEndpointPolicyDefinition, ServiceEndpointPropertiesFormat, + Sku, StaticRoute, Subnet, SubResource, @@ -283,6 +285,7 @@ export { VirtualNetworkGatewayConnection, VirtualNetworkGatewayConnectionListEntity, VirtualNetworkGatewayIPConfiguration, + VirtualNetworkGatewayNatRule, VirtualNetworkGatewaySku, VirtualNetworkPeering, VirtualNetworkTap, diff --git a/sdk/network/arm-network/src/models/bgpServiceCommunitiesMappers.ts b/sdk/network/arm-network/src/models/bgpServiceCommunitiesMappers.ts index 1f71a8773237..534608a588f0 100644 --- a/sdk/network/arm-network/src/models/bgpServiceCommunitiesMappers.ts +++ b/sdk/network/arm-network/src/models/bgpServiceCommunitiesMappers.ts @@ -162,6 +162,7 @@ export { FlowLog, FlowLogFormatParameters, FrontendIPConfiguration, + GatewayLoadBalancerTunnelInterface, HTTPHeader, HubIPAddresses, HubIpConfiguration, @@ -260,6 +261,7 @@ export { ServiceEndpointPolicy, ServiceEndpointPolicyDefinition, ServiceEndpointPropertiesFormat, + Sku, StaticRoute, Subnet, SubResource, @@ -283,6 +285,7 @@ export { VirtualNetworkGatewayConnection, VirtualNetworkGatewayConnectionListEntity, VirtualNetworkGatewayIPConfiguration, + VirtualNetworkGatewayNatRule, VirtualNetworkGatewaySku, VirtualNetworkPeering, VirtualNetworkTap, diff --git a/sdk/network/arm-network/src/models/connectionMonitorsMappers.ts b/sdk/network/arm-network/src/models/connectionMonitorsMappers.ts index 270f748fbb5b..06d2e5ce91bb 100644 --- a/sdk/network/arm-network/src/models/connectionMonitorsMappers.ts +++ b/sdk/network/arm-network/src/models/connectionMonitorsMappers.ts @@ -168,6 +168,7 @@ export { FlowLog, FlowLogFormatParameters, FrontendIPConfiguration, + GatewayLoadBalancerTunnelInterface, HopLink, HTTPHeader, HubIPAddresses, @@ -267,6 +268,7 @@ export { ServiceEndpointPolicy, ServiceEndpointPolicyDefinition, ServiceEndpointPropertiesFormat, + Sku, StaticRoute, Subnet, SubResource, @@ -291,6 +293,7 @@ export { VirtualNetworkGatewayConnection, VirtualNetworkGatewayConnectionListEntity, VirtualNetworkGatewayIPConfiguration, + VirtualNetworkGatewayNatRule, VirtualNetworkGatewaySku, VirtualNetworkPeering, VirtualNetworkTap, diff --git a/sdk/network/arm-network/src/models/customIPPrefixesMappers.ts b/sdk/network/arm-network/src/models/customIPPrefixesMappers.ts index 706df93cbeb3..c203755c037f 100644 --- a/sdk/network/arm-network/src/models/customIPPrefixesMappers.ts +++ b/sdk/network/arm-network/src/models/customIPPrefixesMappers.ts @@ -162,6 +162,7 @@ export { FlowLog, FlowLogFormatParameters, FrontendIPConfiguration, + GatewayLoadBalancerTunnelInterface, HTTPHeader, HubIPAddresses, HubIpConfiguration, @@ -260,6 +261,7 @@ export { ServiceEndpointPolicy, ServiceEndpointPolicyDefinition, ServiceEndpointPropertiesFormat, + Sku, StaticRoute, Subnet, SubResource, @@ -284,6 +286,7 @@ export { VirtualNetworkGatewayConnection, VirtualNetworkGatewayConnectionListEntity, VirtualNetworkGatewayIPConfiguration, + VirtualNetworkGatewayNatRule, VirtualNetworkGatewaySku, VirtualNetworkPeering, VirtualNetworkTap, diff --git a/sdk/network/arm-network/src/models/ddosCustomPoliciesMappers.ts b/sdk/network/arm-network/src/models/ddosCustomPoliciesMappers.ts index 9ff446249074..9a0f4c65b2c6 100644 --- a/sdk/network/arm-network/src/models/ddosCustomPoliciesMappers.ts +++ b/sdk/network/arm-network/src/models/ddosCustomPoliciesMappers.ts @@ -161,6 +161,7 @@ export { FlowLog, FlowLogFormatParameters, FrontendIPConfiguration, + GatewayLoadBalancerTunnelInterface, HTTPHeader, HubIPAddresses, HubIpConfiguration, @@ -259,6 +260,7 @@ export { ServiceEndpointPolicy, ServiceEndpointPolicyDefinition, ServiceEndpointPropertiesFormat, + Sku, StaticRoute, Subnet, SubResource, @@ -283,6 +285,7 @@ export { VirtualNetworkGatewayConnection, VirtualNetworkGatewayConnectionListEntity, VirtualNetworkGatewayIPConfiguration, + VirtualNetworkGatewayNatRule, VirtualNetworkGatewaySku, VirtualNetworkPeering, VirtualNetworkTap, diff --git a/sdk/network/arm-network/src/models/ddosProtectionPlansMappers.ts b/sdk/network/arm-network/src/models/ddosProtectionPlansMappers.ts index 36e39d14e1cc..813c80c12b5e 100644 --- a/sdk/network/arm-network/src/models/ddosProtectionPlansMappers.ts +++ b/sdk/network/arm-network/src/models/ddosProtectionPlansMappers.ts @@ -162,6 +162,7 @@ export { FlowLog, FlowLogFormatParameters, FrontendIPConfiguration, + GatewayLoadBalancerTunnelInterface, HTTPHeader, HubIPAddresses, HubIpConfiguration, @@ -260,6 +261,7 @@ export { ServiceEndpointPolicy, ServiceEndpointPolicyDefinition, ServiceEndpointPropertiesFormat, + Sku, StaticRoute, Subnet, SubResource, @@ -284,6 +286,7 @@ export { VirtualNetworkGatewayConnection, VirtualNetworkGatewayConnectionListEntity, VirtualNetworkGatewayIPConfiguration, + VirtualNetworkGatewayNatRule, VirtualNetworkGatewaySku, VirtualNetworkPeering, VirtualNetworkTap, diff --git a/sdk/network/arm-network/src/models/defaultSecurityRulesMappers.ts b/sdk/network/arm-network/src/models/defaultSecurityRulesMappers.ts index c1e6c1a3fbc7..6f340b4650bf 100644 --- a/sdk/network/arm-network/src/models/defaultSecurityRulesMappers.ts +++ b/sdk/network/arm-network/src/models/defaultSecurityRulesMappers.ts @@ -161,6 +161,7 @@ export { FlowLog, FlowLogFormatParameters, FrontendIPConfiguration, + GatewayLoadBalancerTunnelInterface, HTTPHeader, HubIPAddresses, HubIpConfiguration, @@ -260,6 +261,7 @@ export { ServiceEndpointPolicy, ServiceEndpointPolicyDefinition, ServiceEndpointPropertiesFormat, + Sku, StaticRoute, Subnet, SubResource, @@ -283,6 +285,7 @@ export { VirtualNetworkGatewayConnection, VirtualNetworkGatewayConnectionListEntity, VirtualNetworkGatewayIPConfiguration, + VirtualNetworkGatewayNatRule, VirtualNetworkGatewaySku, VirtualNetworkPeering, VirtualNetworkTap, diff --git a/sdk/network/arm-network/src/models/dscpConfigurationOperationsMappers.ts b/sdk/network/arm-network/src/models/dscpConfigurationOperationsMappers.ts index c2ce73499728..28e701ec662f 100644 --- a/sdk/network/arm-network/src/models/dscpConfigurationOperationsMappers.ts +++ b/sdk/network/arm-network/src/models/dscpConfigurationOperationsMappers.ts @@ -162,6 +162,7 @@ export { FlowLog, FlowLogFormatParameters, FrontendIPConfiguration, + GatewayLoadBalancerTunnelInterface, HTTPHeader, HubIPAddresses, HubIpConfiguration, @@ -260,6 +261,7 @@ export { ServiceEndpointPolicy, ServiceEndpointPolicyDefinition, ServiceEndpointPropertiesFormat, + Sku, StaticRoute, Subnet, SubResource, @@ -283,6 +285,7 @@ export { VirtualNetworkGatewayConnection, VirtualNetworkGatewayConnectionListEntity, VirtualNetworkGatewayIPConfiguration, + VirtualNetworkGatewayNatRule, VirtualNetworkGatewaySku, VirtualNetworkPeering, VirtualNetworkTap, diff --git a/sdk/network/arm-network/src/models/expressRouteCircuitAuthorizationsMappers.ts b/sdk/network/arm-network/src/models/expressRouteCircuitAuthorizationsMappers.ts index 6b6fac907122..9bff42abac38 100644 --- a/sdk/network/arm-network/src/models/expressRouteCircuitAuthorizationsMappers.ts +++ b/sdk/network/arm-network/src/models/expressRouteCircuitAuthorizationsMappers.ts @@ -162,6 +162,7 @@ export { FlowLog, FlowLogFormatParameters, FrontendIPConfiguration, + GatewayLoadBalancerTunnelInterface, HTTPHeader, HubIPAddresses, HubIpConfiguration, @@ -260,6 +261,7 @@ export { ServiceEndpointPolicy, ServiceEndpointPolicyDefinition, ServiceEndpointPropertiesFormat, + Sku, StaticRoute, Subnet, SubResource, @@ -283,6 +285,7 @@ export { VirtualNetworkGatewayConnection, VirtualNetworkGatewayConnectionListEntity, VirtualNetworkGatewayIPConfiguration, + VirtualNetworkGatewayNatRule, VirtualNetworkGatewaySku, VirtualNetworkPeering, VirtualNetworkTap, diff --git a/sdk/network/arm-network/src/models/expressRouteCircuitConnectionsMappers.ts b/sdk/network/arm-network/src/models/expressRouteCircuitConnectionsMappers.ts index 7a9a52132ecc..bfd4bb07f0a4 100644 --- a/sdk/network/arm-network/src/models/expressRouteCircuitConnectionsMappers.ts +++ b/sdk/network/arm-network/src/models/expressRouteCircuitConnectionsMappers.ts @@ -162,6 +162,7 @@ export { FlowLog, FlowLogFormatParameters, FrontendIPConfiguration, + GatewayLoadBalancerTunnelInterface, HTTPHeader, HubIPAddresses, HubIpConfiguration, @@ -260,6 +261,7 @@ export { ServiceEndpointPolicy, ServiceEndpointPolicyDefinition, ServiceEndpointPropertiesFormat, + Sku, StaticRoute, Subnet, SubResource, @@ -283,6 +285,7 @@ export { VirtualNetworkGatewayConnection, VirtualNetworkGatewayConnectionListEntity, VirtualNetworkGatewayIPConfiguration, + VirtualNetworkGatewayNatRule, VirtualNetworkGatewaySku, VirtualNetworkPeering, VirtualNetworkTap, diff --git a/sdk/network/arm-network/src/models/expressRouteCircuitPeeringsMappers.ts b/sdk/network/arm-network/src/models/expressRouteCircuitPeeringsMappers.ts index e666b7d213db..f1c02618b6bc 100644 --- a/sdk/network/arm-network/src/models/expressRouteCircuitPeeringsMappers.ts +++ b/sdk/network/arm-network/src/models/expressRouteCircuitPeeringsMappers.ts @@ -162,6 +162,7 @@ export { FlowLog, FlowLogFormatParameters, FrontendIPConfiguration, + GatewayLoadBalancerTunnelInterface, HTTPHeader, HubIPAddresses, HubIpConfiguration, @@ -260,6 +261,7 @@ export { ServiceEndpointPolicy, ServiceEndpointPolicyDefinition, ServiceEndpointPropertiesFormat, + Sku, StaticRoute, Subnet, SubResource, @@ -283,6 +285,7 @@ export { VirtualNetworkGatewayConnection, VirtualNetworkGatewayConnectionListEntity, VirtualNetworkGatewayIPConfiguration, + VirtualNetworkGatewayNatRule, VirtualNetworkGatewaySku, VirtualNetworkPeering, VirtualNetworkTap, diff --git a/sdk/network/arm-network/src/models/expressRouteCircuitsMappers.ts b/sdk/network/arm-network/src/models/expressRouteCircuitsMappers.ts index 32f61b0d9250..dbd41ae1ea24 100644 --- a/sdk/network/arm-network/src/models/expressRouteCircuitsMappers.ts +++ b/sdk/network/arm-network/src/models/expressRouteCircuitsMappers.ts @@ -168,6 +168,7 @@ export { FlowLog, FlowLogFormatParameters, FrontendIPConfiguration, + GatewayLoadBalancerTunnelInterface, HTTPHeader, HubIPAddresses, HubIpConfiguration, @@ -266,6 +267,7 @@ export { ServiceEndpointPolicy, ServiceEndpointPolicyDefinition, ServiceEndpointPropertiesFormat, + Sku, StaticRoute, Subnet, SubResource, @@ -290,6 +292,7 @@ export { VirtualNetworkGatewayConnection, VirtualNetworkGatewayConnectionListEntity, VirtualNetworkGatewayIPConfiguration, + VirtualNetworkGatewayNatRule, VirtualNetworkGatewaySku, VirtualNetworkPeering, VirtualNetworkTap, diff --git a/sdk/network/arm-network/src/models/expressRouteConnectionsMappers.ts b/sdk/network/arm-network/src/models/expressRouteConnectionsMappers.ts index c4ccce04a14d..07a84673bd86 100644 --- a/sdk/network/arm-network/src/models/expressRouteConnectionsMappers.ts +++ b/sdk/network/arm-network/src/models/expressRouteConnectionsMappers.ts @@ -162,6 +162,7 @@ export { FlowLog, FlowLogFormatParameters, FrontendIPConfiguration, + GatewayLoadBalancerTunnelInterface, HTTPHeader, HubIPAddresses, HubIpConfiguration, @@ -260,6 +261,7 @@ export { ServiceEndpointPolicy, ServiceEndpointPolicyDefinition, ServiceEndpointPropertiesFormat, + Sku, StaticRoute, Subnet, SubResource, @@ -283,6 +285,7 @@ export { VirtualNetworkGatewayConnection, VirtualNetworkGatewayConnectionListEntity, VirtualNetworkGatewayIPConfiguration, + VirtualNetworkGatewayNatRule, VirtualNetworkGatewaySku, VirtualNetworkPeering, VirtualNetworkTap, diff --git a/sdk/network/arm-network/src/models/expressRouteCrossConnectionPeeringsMappers.ts b/sdk/network/arm-network/src/models/expressRouteCrossConnectionPeeringsMappers.ts index 4d4f15cbe244..120122c3ee34 100644 --- a/sdk/network/arm-network/src/models/expressRouteCrossConnectionPeeringsMappers.ts +++ b/sdk/network/arm-network/src/models/expressRouteCrossConnectionPeeringsMappers.ts @@ -162,6 +162,7 @@ export { FlowLog, FlowLogFormatParameters, FrontendIPConfiguration, + GatewayLoadBalancerTunnelInterface, HTTPHeader, HubIPAddresses, HubIpConfiguration, @@ -260,6 +261,7 @@ export { ServiceEndpointPolicy, ServiceEndpointPolicyDefinition, ServiceEndpointPropertiesFormat, + Sku, StaticRoute, Subnet, SubResource, @@ -283,6 +285,7 @@ export { VirtualNetworkGatewayConnection, VirtualNetworkGatewayConnectionListEntity, VirtualNetworkGatewayIPConfiguration, + VirtualNetworkGatewayNatRule, VirtualNetworkGatewaySku, VirtualNetworkPeering, VirtualNetworkTap, diff --git a/sdk/network/arm-network/src/models/expressRouteCrossConnectionsMappers.ts b/sdk/network/arm-network/src/models/expressRouteCrossConnectionsMappers.ts index d699059ad6b6..9c508ad76b62 100644 --- a/sdk/network/arm-network/src/models/expressRouteCrossConnectionsMappers.ts +++ b/sdk/network/arm-network/src/models/expressRouteCrossConnectionsMappers.ts @@ -168,6 +168,7 @@ export { FlowLog, FlowLogFormatParameters, FrontendIPConfiguration, + GatewayLoadBalancerTunnelInterface, HTTPHeader, HubIPAddresses, HubIpConfiguration, @@ -266,6 +267,7 @@ export { ServiceEndpointPolicy, ServiceEndpointPolicyDefinition, ServiceEndpointPropertiesFormat, + Sku, StaticRoute, Subnet, SubResource, @@ -290,6 +292,7 @@ export { VirtualNetworkGatewayConnection, VirtualNetworkGatewayConnectionListEntity, VirtualNetworkGatewayIPConfiguration, + VirtualNetworkGatewayNatRule, VirtualNetworkGatewaySku, VirtualNetworkPeering, VirtualNetworkTap, diff --git a/sdk/network/arm-network/src/models/expressRouteGatewaysMappers.ts b/sdk/network/arm-network/src/models/expressRouteGatewaysMappers.ts index e67aa1ae3cb8..4f8bc0c4c219 100644 --- a/sdk/network/arm-network/src/models/expressRouteGatewaysMappers.ts +++ b/sdk/network/arm-network/src/models/expressRouteGatewaysMappers.ts @@ -162,6 +162,7 @@ export { FlowLog, FlowLogFormatParameters, FrontendIPConfiguration, + GatewayLoadBalancerTunnelInterface, HTTPHeader, HubIPAddresses, HubIpConfiguration, @@ -260,6 +261,7 @@ export { ServiceEndpointPolicy, ServiceEndpointPolicyDefinition, ServiceEndpointPropertiesFormat, + Sku, StaticRoute, Subnet, SubResource, @@ -284,6 +286,7 @@ export { VirtualNetworkGatewayConnection, VirtualNetworkGatewayConnectionListEntity, VirtualNetworkGatewayIPConfiguration, + VirtualNetworkGatewayNatRule, VirtualNetworkGatewaySku, VirtualNetworkPeering, VirtualNetworkTap, diff --git a/sdk/network/arm-network/src/models/expressRouteLinksMappers.ts b/sdk/network/arm-network/src/models/expressRouteLinksMappers.ts index e125c350c049..9f9d66233786 100644 --- a/sdk/network/arm-network/src/models/expressRouteLinksMappers.ts +++ b/sdk/network/arm-network/src/models/expressRouteLinksMappers.ts @@ -162,6 +162,7 @@ export { FlowLog, FlowLogFormatParameters, FrontendIPConfiguration, + GatewayLoadBalancerTunnelInterface, HTTPHeader, HubIPAddresses, HubIpConfiguration, @@ -260,6 +261,7 @@ export { ServiceEndpointPolicy, ServiceEndpointPolicyDefinition, ServiceEndpointPropertiesFormat, + Sku, StaticRoute, Subnet, SubResource, @@ -283,6 +285,7 @@ export { VirtualNetworkGatewayConnection, VirtualNetworkGatewayConnectionListEntity, VirtualNetworkGatewayIPConfiguration, + VirtualNetworkGatewayNatRule, VirtualNetworkGatewaySku, VirtualNetworkPeering, VirtualNetworkTap, diff --git a/sdk/network/arm-network/src/models/expressRoutePortsLocationsMappers.ts b/sdk/network/arm-network/src/models/expressRoutePortsLocationsMappers.ts index e3a4d25caee9..e48aefcf831b 100644 --- a/sdk/network/arm-network/src/models/expressRoutePortsLocationsMappers.ts +++ b/sdk/network/arm-network/src/models/expressRoutePortsLocationsMappers.ts @@ -162,6 +162,7 @@ export { FlowLog, FlowLogFormatParameters, FrontendIPConfiguration, + GatewayLoadBalancerTunnelInterface, HTTPHeader, HubIPAddresses, HubIpConfiguration, @@ -260,6 +261,7 @@ export { ServiceEndpointPolicy, ServiceEndpointPolicyDefinition, ServiceEndpointPropertiesFormat, + Sku, StaticRoute, Subnet, SubResource, @@ -283,6 +285,7 @@ export { VirtualNetworkGatewayConnection, VirtualNetworkGatewayConnectionListEntity, VirtualNetworkGatewayIPConfiguration, + VirtualNetworkGatewayNatRule, VirtualNetworkGatewaySku, VirtualNetworkPeering, VirtualNetworkTap, diff --git a/sdk/network/arm-network/src/models/expressRoutePortsMappers.ts b/sdk/network/arm-network/src/models/expressRoutePortsMappers.ts index 6b666a1d7706..cdd760ec4116 100644 --- a/sdk/network/arm-network/src/models/expressRoutePortsMappers.ts +++ b/sdk/network/arm-network/src/models/expressRoutePortsMappers.ts @@ -162,6 +162,7 @@ export { FlowLog, FlowLogFormatParameters, FrontendIPConfiguration, + GatewayLoadBalancerTunnelInterface, GenerateExpressRoutePortsLOARequest, GenerateExpressRoutePortsLOAResult, HTTPHeader, @@ -262,6 +263,7 @@ export { ServiceEndpointPolicy, ServiceEndpointPolicyDefinition, ServiceEndpointPropertiesFormat, + Sku, StaticRoute, Subnet, SubResource, @@ -286,6 +288,7 @@ export { VirtualNetworkGatewayConnection, VirtualNetworkGatewayConnectionListEntity, VirtualNetworkGatewayIPConfiguration, + VirtualNetworkGatewayNatRule, VirtualNetworkGatewaySku, VirtualNetworkPeering, VirtualNetworkTap, diff --git a/sdk/network/arm-network/src/models/expressRouteServiceProvidersMappers.ts b/sdk/network/arm-network/src/models/expressRouteServiceProvidersMappers.ts index 416ce26822a3..d59d580e7272 100644 --- a/sdk/network/arm-network/src/models/expressRouteServiceProvidersMappers.ts +++ b/sdk/network/arm-network/src/models/expressRouteServiceProvidersMappers.ts @@ -162,6 +162,7 @@ export { FlowLog, FlowLogFormatParameters, FrontendIPConfiguration, + GatewayLoadBalancerTunnelInterface, HTTPHeader, HubIPAddresses, HubIpConfiguration, @@ -260,6 +261,7 @@ export { ServiceEndpointPolicy, ServiceEndpointPolicyDefinition, ServiceEndpointPropertiesFormat, + Sku, StaticRoute, Subnet, SubResource, @@ -283,6 +285,7 @@ export { VirtualNetworkGatewayConnection, VirtualNetworkGatewayConnectionListEntity, VirtualNetworkGatewayIPConfiguration, + VirtualNetworkGatewayNatRule, VirtualNetworkGatewaySku, VirtualNetworkPeering, VirtualNetworkTap, diff --git a/sdk/network/arm-network/src/models/firewallPoliciesMappers.ts b/sdk/network/arm-network/src/models/firewallPoliciesMappers.ts index dd6537cf4a71..d6206758056a 100644 --- a/sdk/network/arm-network/src/models/firewallPoliciesMappers.ts +++ b/sdk/network/arm-network/src/models/firewallPoliciesMappers.ts @@ -162,6 +162,7 @@ export { FlowLog, FlowLogFormatParameters, FrontendIPConfiguration, + GatewayLoadBalancerTunnelInterface, HTTPHeader, HubIPAddresses, HubIpConfiguration, @@ -260,6 +261,7 @@ export { ServiceEndpointPolicy, ServiceEndpointPolicyDefinition, ServiceEndpointPropertiesFormat, + Sku, StaticRoute, Subnet, SubResource, @@ -283,6 +285,7 @@ export { VirtualNetworkGatewayConnection, VirtualNetworkGatewayConnectionListEntity, VirtualNetworkGatewayIPConfiguration, + VirtualNetworkGatewayNatRule, VirtualNetworkGatewaySku, VirtualNetworkPeering, VirtualNetworkTap, diff --git a/sdk/network/arm-network/src/models/firewallPolicyRuleCollectionGroupsMappers.ts b/sdk/network/arm-network/src/models/firewallPolicyRuleCollectionGroupsMappers.ts index f13f838eb1d4..b96dba05afda 100644 --- a/sdk/network/arm-network/src/models/firewallPolicyRuleCollectionGroupsMappers.ts +++ b/sdk/network/arm-network/src/models/firewallPolicyRuleCollectionGroupsMappers.ts @@ -162,6 +162,7 @@ export { FlowLog, FlowLogFormatParameters, FrontendIPConfiguration, + GatewayLoadBalancerTunnelInterface, HTTPHeader, HubIPAddresses, HubIpConfiguration, @@ -260,6 +261,7 @@ export { ServiceEndpointPolicy, ServiceEndpointPolicyDefinition, ServiceEndpointPropertiesFormat, + Sku, StaticRoute, Subnet, SubResource, @@ -283,6 +285,7 @@ export { VirtualNetworkGatewayConnection, VirtualNetworkGatewayConnectionListEntity, VirtualNetworkGatewayIPConfiguration, + VirtualNetworkGatewayNatRule, VirtualNetworkGatewaySku, VirtualNetworkPeering, VirtualNetworkTap, diff --git a/sdk/network/arm-network/src/models/flowLogsMappers.ts b/sdk/network/arm-network/src/models/flowLogsMappers.ts index 56b6a349c879..d1040407fdf8 100644 --- a/sdk/network/arm-network/src/models/flowLogsMappers.ts +++ b/sdk/network/arm-network/src/models/flowLogsMappers.ts @@ -163,6 +163,7 @@ export { FlowLogFormatParameters, FlowLogListResult, FrontendIPConfiguration, + GatewayLoadBalancerTunnelInterface, HTTPHeader, HubIPAddresses, HubIpConfiguration, @@ -261,6 +262,7 @@ export { ServiceEndpointPolicy, ServiceEndpointPolicyDefinition, ServiceEndpointPropertiesFormat, + Sku, StaticRoute, Subnet, SubResource, @@ -285,6 +287,7 @@ export { VirtualNetworkGatewayConnection, VirtualNetworkGatewayConnectionListEntity, VirtualNetworkGatewayIPConfiguration, + VirtualNetworkGatewayNatRule, VirtualNetworkGatewaySku, VirtualNetworkPeering, VirtualNetworkTap, diff --git a/sdk/network/arm-network/src/models/hubRouteTablesMappers.ts b/sdk/network/arm-network/src/models/hubRouteTablesMappers.ts index bd6eee0a2c02..fc8694ae21c2 100644 --- a/sdk/network/arm-network/src/models/hubRouteTablesMappers.ts +++ b/sdk/network/arm-network/src/models/hubRouteTablesMappers.ts @@ -161,6 +161,7 @@ export { FlowLog, FlowLogFormatParameters, FrontendIPConfiguration, + GatewayLoadBalancerTunnelInterface, HTTPHeader, HubIPAddresses, HubIpConfiguration, @@ -260,6 +261,7 @@ export { ServiceEndpointPolicy, ServiceEndpointPolicyDefinition, ServiceEndpointPropertiesFormat, + Sku, StaticRoute, Subnet, SubResource, @@ -283,6 +285,7 @@ export { VirtualNetworkGatewayConnection, VirtualNetworkGatewayConnectionListEntity, VirtualNetworkGatewayIPConfiguration, + VirtualNetworkGatewayNatRule, VirtualNetworkGatewaySku, VirtualNetworkPeering, VirtualNetworkTap, diff --git a/sdk/network/arm-network/src/models/hubVirtualNetworkConnectionsMappers.ts b/sdk/network/arm-network/src/models/hubVirtualNetworkConnectionsMappers.ts index cae0d433eb86..db120d457956 100644 --- a/sdk/network/arm-network/src/models/hubVirtualNetworkConnectionsMappers.ts +++ b/sdk/network/arm-network/src/models/hubVirtualNetworkConnectionsMappers.ts @@ -161,6 +161,7 @@ export { FlowLog, FlowLogFormatParameters, FrontendIPConfiguration, + GatewayLoadBalancerTunnelInterface, HTTPHeader, HubIPAddresses, HubIpConfiguration, @@ -260,6 +261,7 @@ export { ServiceEndpointPolicy, ServiceEndpointPolicyDefinition, ServiceEndpointPropertiesFormat, + Sku, StaticRoute, Subnet, SubResource, @@ -283,6 +285,7 @@ export { VirtualNetworkGatewayConnection, VirtualNetworkGatewayConnectionListEntity, VirtualNetworkGatewayIPConfiguration, + VirtualNetworkGatewayNatRule, VirtualNetworkGatewaySku, VirtualNetworkPeering, VirtualNetworkTap, diff --git a/sdk/network/arm-network/src/models/inboundNatRulesMappers.ts b/sdk/network/arm-network/src/models/inboundNatRulesMappers.ts index b8c62f32b878..97ed4511996e 100644 --- a/sdk/network/arm-network/src/models/inboundNatRulesMappers.ts +++ b/sdk/network/arm-network/src/models/inboundNatRulesMappers.ts @@ -161,6 +161,7 @@ export { FlowLog, FlowLogFormatParameters, FrontendIPConfiguration, + GatewayLoadBalancerTunnelInterface, HTTPHeader, HubIPAddresses, HubIpConfiguration, @@ -260,6 +261,7 @@ export { ServiceEndpointPolicy, ServiceEndpointPolicyDefinition, ServiceEndpointPropertiesFormat, + Sku, StaticRoute, Subnet, SubResource, @@ -283,6 +285,7 @@ export { VirtualNetworkGatewayConnection, VirtualNetworkGatewayConnectionListEntity, VirtualNetworkGatewayIPConfiguration, + VirtualNetworkGatewayNatRule, VirtualNetworkGatewaySku, VirtualNetworkPeering, VirtualNetworkTap, diff --git a/sdk/network/arm-network/src/models/inboundSecurityRuleOperationsMappers.ts b/sdk/network/arm-network/src/models/inboundSecurityRuleOperationsMappers.ts index fc1036897ffc..ba49649edf23 100644 --- a/sdk/network/arm-network/src/models/inboundSecurityRuleOperationsMappers.ts +++ b/sdk/network/arm-network/src/models/inboundSecurityRuleOperationsMappers.ts @@ -161,6 +161,7 @@ export { FlowLog, FlowLogFormatParameters, FrontendIPConfiguration, + GatewayLoadBalancerTunnelInterface, HTTPHeader, HubIPAddresses, HubIpConfiguration, @@ -259,6 +260,7 @@ export { ServiceEndpointPolicy, ServiceEndpointPolicyDefinition, ServiceEndpointPropertiesFormat, + Sku, StaticRoute, Subnet, SubResource, @@ -282,6 +284,7 @@ export { VirtualNetworkGatewayConnection, VirtualNetworkGatewayConnectionListEntity, VirtualNetworkGatewayIPConfiguration, + VirtualNetworkGatewayNatRule, VirtualNetworkGatewaySku, VirtualNetworkPeering, VirtualNetworkTap, diff --git a/sdk/network/arm-network/src/models/index.ts b/sdk/network/arm-network/src/models/index.ts index 01e0cc2974eb..20e7723de7f5 100644 --- a/sdk/network/arm-network/src/models/index.ts +++ b/sdk/network/arm-network/src/models/index.ts @@ -262,7 +262,11 @@ export interface ExtendedLocation { /** * The name of the extended location. */ - name: string; + name?: string; + /** + * The type of the extended location. Possible values include: 'EdgeZone' + */ + type?: ExtendedLocationTypes; } /** @@ -527,12 +531,14 @@ export interface ResourceSet { /** * The visibility list of the private link service. */ -export interface PrivateLinkServicePropertiesVisibility extends ResourceSet {} +export interface PrivateLinkServicePropertiesVisibility extends ResourceSet { +} /** * The auto-approval list of the private link service. */ -export interface PrivateLinkServicePropertiesAutoApproval extends ResourceSet {} +export interface PrivateLinkServicePropertiesAutoApproval extends ResourceSet { +} /** * Private link service resource. @@ -668,6 +674,10 @@ export interface NetworkInterface extends Resource { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly provisioningState?: ProvisioningState; + /** + * WorkloadType of the NetworkInterface for BareMetal resources + */ + workloadType?: string; /** * Type of Network Interface resource. Possible values include: 'Standard', 'Elastic' */ @@ -1218,6 +1228,11 @@ export interface PublicIPAddress extends Resource { * The linked public IP address of the public IP address resource. */ linkedPublicIPAddress?: PublicIPAddress; + /** + * Specify what happens to the public IP address when the VM using it is deleted. Possible values + * include: 'Delete', 'Detach' + */ + deleteOption?: DeleteOptions; /** * A unique read-only string that changes whenever the resource is updated. * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -1598,6 +1613,10 @@ export interface FrontendIPConfiguration extends SubResource { * The reference to the Public IP Prefix resource. */ publicIPPrefix?: SubResource; + /** + * The reference to gateway load balancer frontend IP. + */ + gatewayLoadBalancer?: SubResource; /** * The provisioning state of the frontend IP configuration resource. Possible values include: * 'Succeeded', 'Updating', 'Deleting', 'Failed' @@ -1666,6 +1685,30 @@ export interface VirtualNetworkTap extends Resource { readonly etag?: string; } +/** + * Gateway load balancer tunnel interface of a load balancer backend address pool. + */ +export interface GatewayLoadBalancerTunnelInterface { + /** + * Port of gateway load balancer tunnel interface. + */ + port?: number; + /** + * Identifier of gateway load balancer tunnel interface. + */ + identifier?: number; + /** + * Protocol of gateway load balancer tunnel interface. Possible values include: 'None', 'Native', + * 'VXLAN' + */ + protocol?: GatewayLoadBalancerTunnelProtocol; + /** + * Traffic type of gateway load balancer tunnel interface. Possible values include: 'None', + * 'Internal', 'External' + */ + type?: GatewayLoadBalancerTunnelInterfaceType; +} + /** * Load balancer backend addresses. */ @@ -1705,6 +1748,10 @@ export interface BackendAddressPool extends SubResource { * The location of the backend address pool. */ location?: string; + /** + * An array of gateway load balancer tunnel interfaces. + */ + tunnelInterfaces?: GatewayLoadBalancerTunnelInterface[]; /** * An array of backend addresses. */ @@ -1845,6 +1892,10 @@ export interface NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties * IPConfiguration in a network interface. */ export interface NetworkInterfaceIPConfiguration extends SubResource { + /** + * The reference to gateway load balancer frontend IP. + */ + gatewayLoadBalancer?: SubResource; /** * The reference to Virtual Network Taps. */ @@ -2269,6 +2320,16 @@ export interface ApplicationGatewayTrustedClientCertificate extends SubResource * Certificate public data. */ data?: string; + /** + * Validated certificate data. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly validatedCertData?: string; + /** + * Distinguished name of client certificate issuer. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly clientCertIssuerDN?: string; /** * The provisioning state of the trusted client certificate resource. Possible values include: * 'Succeeded', 'Updating', 'Deleting', 'Failed' @@ -3222,9 +3283,7 @@ export interface ManagedServiceIdentity { * references will be ARM resource ids in the form: * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. */ - userAssignedIdentities?: { - [propertyName: string]: ManagedServiceIdentityUserAssignedIdentitiesValue; - }; + userAssignedIdentities?: { [propertyName: string]: ManagedServiceIdentityUserAssignedIdentitiesValue }; } /** @@ -4096,6 +4155,17 @@ export interface AzureWebCategory { readonly etag?: string; } +/** + * The sku of this Bastion Host. + */ +export interface Sku { + /** + * The name of this Bastion Host. Possible values include: 'Basic', 'Standard'. Default value: + * 'Standard'. + */ + name?: BastionHostSkuName; +} + /** * IP configuration of an Bastion Host. */ @@ -4158,12 +4228,17 @@ export interface BastionHost extends Resource { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly etag?: string; + /** + * The sku of this Bastion Host. + */ + sku?: Sku; } /** * Describes a Virtual Machine. */ -export interface VM extends Resource {} +export interface VM extends Resource { +} /** * Bastion Shareable Link. @@ -4315,6 +4390,23 @@ export interface CustomIpPrefix extends Resource { * The prefix range in CIDR notation. Should include the start address and the prefix length. */ cidr?: string; + /** + * Signed message for WAN validation. + */ + signedMessage?: string; + /** + * Authorization message for WAN validation. + */ + authorizationMessage?: string; + /** + * The Parent CustomIpPrefix for IPv6 /64 CustomIpPrefix. + */ + customIpPrefixParent?: CustomIpPrefix; + /** + * The list of all Children for IPv6 /48 CustomIpPrefix. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly childCustomIpPrefixes?: CustomIpPrefix[]; /** * The commissioned state of the Custom IP Prefix. Possible values include: 'Provisioning', * 'Provisioned', 'Commissioning', 'Commissioned', 'Decommissioning', 'Deprovisioning' @@ -4330,6 +4422,11 @@ export interface CustomIpPrefix extends Resource { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly resourceGuid?: string; + /** + * The reason why resource is in failed state. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly failedReason?: string; /** * The provisioning state of the custom IP prefix resource. Possible values include: 'Succeeded', * 'Updating', 'Deleting', 'Failed' @@ -5859,10 +5956,7 @@ export interface FirewallPolicy extends Resource { /** * Contains the possible cases for FirewallPolicyRuleCollection. */ -export type FirewallPolicyRuleCollectionUnion = - | FirewallPolicyRuleCollection - | FirewallPolicyNatRuleCollection - | FirewallPolicyFilterRuleCollection; +export type FirewallPolicyRuleCollectionUnion = FirewallPolicyRuleCollection | FirewallPolicyNatRuleCollection | FirewallPolicyFilterRuleCollection; /** * Properties of the rule collection. @@ -6257,7 +6351,7 @@ export interface IpGroup extends Resource { */ export interface LoadBalancerSku { /** - * Name of a load balancer SKU. Possible values include: 'Basic', 'Standard' + * Name of a load balancer SKU. Possible values include: 'Basic', 'Standard', 'Gateway' */ name?: LoadBalancerSkuName; /** @@ -6279,6 +6373,10 @@ export interface LoadBalancingRule extends SubResource { * backend IPs. */ backendAddressPool?: SubResource; + /** + * An array of references to pool of DIPs. + */ + backendAddressPools?: SubResource[]; /** * The reference to the load balancer probe used by the load balancing rule. */ @@ -6598,6 +6696,30 @@ export interface LoadBalancer extends Resource { readonly etag?: string; } +/** + * VIP swap request's frontend IP configuration object. + */ +export interface LoadBalancerVipSwapRequestFrontendIPConfiguration { + /** + * The ID of frontend IP configuration resource. + */ + id?: string; + /** + * A reference to public IP address resource. + */ + publicIPAddress?: SubResource; +} + +/** + * The request for a VIP swap. + */ +export interface LoadBalancerVipSwapRequest { + /** + * A list of frontend IP configuration resources that should swap VIPs. + */ + frontendIPConfigurations?: LoadBalancerVipSwapRequestFrontendIPConfiguration[]; +} + /** * The response body contains the status of the specified asynchronous operation, indicating * whether it has succeeded, is in progress, or has failed. Note that this status is distinct from @@ -6622,6 +6744,10 @@ export interface AzureAsyncOperationResult { * The effective network security group association. */ export interface EffectiveNetworkSecurityGroupAssociation { + /** + * The ID of the Azure network manager if assigned. + */ + networkManager?: SubResource; /** * The ID of the subnet if assigned. */ @@ -6828,7 +6954,8 @@ export interface ContainerNetworkInterfaceConfiguration extends SubResource { /** * Reference to container resource in remote resource provider. */ -export interface Container extends SubResource {} +export interface Container extends SubResource { +} /** * The ip configuration for a container network interface. @@ -9759,9 +9886,13 @@ export interface VirtualNetworkPeering extends SubResource { */ remoteVirtualNetwork?: SubResource; /** - * The reference to the remote virtual network address space. + * The reference to the address space peered with the remote virtual network. */ remoteAddressSpace?: AddressSpace; + /** + * The reference to the current address space of the remote virtual network. + */ + remoteVirtualNetworkAddressSpace?: AddressSpace; /** * The reference to the remote virtual network's Bgp Communities. */ @@ -9771,6 +9902,11 @@ export interface VirtualNetworkPeering extends SubResource { * 'Disconnected' */ peeringState?: VirtualNetworkPeeringState; + /** + * The peering sync status of the virtual network peering. Possible values include: + * 'FullyInSync', 'RemoteNotInSync', 'LocalNotInSync', 'LocalAndRemoteNotInSync' + */ + peeringSyncLevel?: VirtualNetworkPeeringLevel; /** * The provisioning state of the virtual network peering resource. Possible values include: * 'Succeeded', 'Updating', 'Deleting', 'Failed' @@ -9860,6 +9996,10 @@ export interface VirtualNetwork extends Resource { * network. */ dhcpOptions?: DhcpOptions; + /** + * The FlowTimeout value (in minutes) for the Virtual Network + */ + flowTimeoutInMinutes?: number; /** * A list of subnets in a Virtual Network. */ @@ -10062,6 +10202,63 @@ export interface VirtualNetworkGatewayIPConfiguration extends SubResource { readonly etag?: string; } +/** + * Vpn NatRule mapping. + */ +export interface VpnNatRuleMapping { + /** + * Address space for Vpn NatRule mapping. + */ + addressSpace?: string; +} + +/** + * VirtualNetworkGatewayNatRule Resource. + */ +export interface VirtualNetworkGatewayNatRule extends SubResource { + /** + * The provisioning state of the NAT Rule resource. Possible values include: 'Succeeded', + * 'Updating', 'Deleting', 'Failed' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: ProvisioningState; + /** + * The type of NAT rule for VPN NAT. Possible values include: 'Static', 'Dynamic' + */ + virtualNetworkGatewayNatRulePropertiesType?: VpnNatRuleType; + /** + * The Source NAT direction of a VPN NAT. Possible values include: 'EgressSnat', 'IngressSnat' + */ + mode?: VpnNatRuleMode; + /** + * The private IP address internal mapping for NAT. + */ + internalMappings?: VpnNatRuleMapping[]; + /** + * The private IP address external mapping for NAT. + */ + externalMappings?: VpnNatRuleMapping[]; + /** + * The IP Configuration ID this NAT rule applies to. + */ + ipConfigurationId?: string; + /** + * The name of the resource that is unique within a resource group. This name can be used to + * access the resource. + */ + name?: string; + /** + * A unique read-only string that changes whenever the resource is updated. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly etag?: string; + /** + * Resource type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; +} + /** * VirtualNetworkGatewaySku details. */ @@ -10397,10 +10594,6 @@ export interface GatewayRoute { * A common class for general resource information. */ export interface VirtualNetworkGateway extends Resource { - /** - * The extended location of type local virtual network gateway. - */ - extendedLocation?: ExtendedLocation; /** * IP configurations for virtual network gateway. */ @@ -10480,6 +10673,18 @@ export interface VirtualNetworkGateway extends Resource { * customer vnet. */ vNetExtendedLocationResourceId?: string; + /** + * NatRules for virtual network gateway. + */ + natRules?: VirtualNetworkGatewayNatRule[]; + /** + * EnableBgpRouteTranslationForNat flag. + */ + enableBgpRouteTranslationForNat?: boolean; + /** + * The extended location of type local virtual network gateway. + */ + extendedLocation?: ExtendedLocation; /** * A unique read-only string that changes whenever the resource is updated. * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -10636,6 +10841,14 @@ export interface VirtualNetworkGatewayConnection extends Resource { * The reference to local network gateway resource. */ localNetworkGateway2?: LocalNetworkGateway; + /** + * List of ingress NatRules. + */ + ingressNatRules?: SubResource[]; + /** + * List of egress NatRules. + */ + egressNatRules?: SubResource[]; /** * Gateway connection type. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', * 'VPNClient' @@ -11627,6 +11840,11 @@ export interface VirtualHub extends Resource { * Flag to control transit for VirtualRouter hub. */ allowBranchToBranchTraffic?: boolean; + /** + * The preferred gateway to route on-prem traffic. Possible values include: 'ExpressRoute', + * 'VpnGateway', 'None' + */ + preferredRoutingGateway?: PreferredRoutingGateway; /** * A unique read-only string that changes whenever the resource is updated. * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -11904,16 +12122,6 @@ export interface VpnGatewayIpConfiguration { privateIpAddress?: string; } -/** - * Vpn NatRule mapping. - */ -export interface VpnNatRuleMapping { - /** - * Address space for Vpn NatRule mapping. - */ - addressSpace?: string; -} - /** * VpnGatewayNatRule Resource. */ @@ -12981,8 +13189,7 @@ export interface ApplicationGatewaysBackendHealthOptionalParams extends msRest.R /** * Optional Parameters. */ -export interface ApplicationGatewaysBackendHealthOnDemandOptionalParams - extends msRest.RequestOptionsBase { +export interface ApplicationGatewaysBackendHealthOnDemandOptionalParams extends msRest.RequestOptionsBase { /** * Expands BackendAddressPool and BackendHttpSettings referenced in backend health. */ @@ -12992,8 +13199,7 @@ export interface ApplicationGatewaysBackendHealthOnDemandOptionalParams /** * Optional Parameters. */ -export interface ApplicationGatewaysBeginBackendHealthOptionalParams - extends msRest.RequestOptionsBase { +export interface ApplicationGatewaysBeginBackendHealthOptionalParams extends msRest.RequestOptionsBase { /** * Expands BackendAddressPool and BackendHttpSettings referenced in backend health. */ @@ -13003,8 +13209,7 @@ export interface ApplicationGatewaysBeginBackendHealthOptionalParams /** * Optional Parameters. */ -export interface ApplicationGatewaysBeginBackendHealthOnDemandOptionalParams - extends msRest.RequestOptionsBase { +export interface ApplicationGatewaysBeginBackendHealthOnDemandOptionalParams extends msRest.RequestOptionsBase { /** * Expands BackendAddressPool and BackendHttpSettings referenced in backend health. */ @@ -13024,8 +13229,7 @@ export interface WebCategoriesGetOptionalParams extends msRest.RequestOptionsBas /** * Optional Parameters. */ -export interface NetworkInterfacesGetCloudServiceNetworkInterfaceOptionalParams - extends msRest.RequestOptionsBase { +export interface NetworkInterfacesGetCloudServiceNetworkInterfaceOptionalParams extends msRest.RequestOptionsBase { /** * Expands referenced resources. */ @@ -13045,8 +13249,7 @@ export interface NetworkInterfacesGetOptionalParams extends msRest.RequestOption /** * Optional Parameters. */ -export interface NetworkInterfacesGetVirtualMachineScaleSetNetworkInterfaceOptionalParams - extends msRest.RequestOptionsBase { +export interface NetworkInterfacesGetVirtualMachineScaleSetNetworkInterfaceOptionalParams extends msRest.RequestOptionsBase { /** * Expands referenced resources. */ @@ -13056,8 +13259,7 @@ export interface NetworkInterfacesGetVirtualMachineScaleSetNetworkInterfaceOptio /** * Optional Parameters. */ -export interface NetworkInterfacesListVirtualMachineScaleSetIpConfigurationsOptionalParams - extends msRest.RequestOptionsBase { +export interface NetworkInterfacesListVirtualMachineScaleSetIpConfigurationsOptionalParams extends msRest.RequestOptionsBase { /** * Expands referenced resources. */ @@ -13067,8 +13269,7 @@ export interface NetworkInterfacesListVirtualMachineScaleSetIpConfigurationsOpti /** * Optional Parameters. */ -export interface NetworkInterfacesGetVirtualMachineScaleSetIpConfigurationOptionalParams - extends msRest.RequestOptionsBase { +export interface NetworkInterfacesGetVirtualMachineScaleSetIpConfigurationOptionalParams extends msRest.RequestOptionsBase { /** * Expands referenced resources. */ @@ -13078,8 +13279,7 @@ export interface NetworkInterfacesGetVirtualMachineScaleSetIpConfigurationOption /** * Optional Parameters. */ -export interface NetworkInterfacesListVirtualMachineScaleSetIpConfigurationsNextOptionalParams - extends msRest.RequestOptionsBase { +export interface NetworkInterfacesListVirtualMachineScaleSetIpConfigurationsNextOptionalParams extends msRest.RequestOptionsBase { /** * Expands referenced resources. */ @@ -13089,8 +13289,7 @@ export interface NetworkInterfacesListVirtualMachineScaleSetIpConfigurationsNext /** * Optional Parameters. */ -export interface PublicIPAddressesGetCloudServicePublicIPAddressOptionalParams - extends msRest.RequestOptionsBase { +export interface PublicIPAddressesGetCloudServicePublicIPAddressOptionalParams extends msRest.RequestOptionsBase { /** * Expands referenced resources. */ @@ -13110,8 +13309,7 @@ export interface PublicIPAddressesGetOptionalParams extends msRest.RequestOption /** * Optional Parameters. */ -export interface PublicIPAddressesGetVirtualMachineScaleSetPublicIPAddressOptionalParams - extends msRest.RequestOptionsBase { +export interface PublicIPAddressesGetVirtualMachineScaleSetPublicIPAddressOptionalParams extends msRest.RequestOptionsBase { /** * Expands referenced resources. */ @@ -13232,8 +13430,7 @@ export interface ConnectionMonitorsCreateOrUpdateOptionalParams extends msRest.R /** * Optional Parameters. */ -export interface ConnectionMonitorsBeginCreateOrUpdateOptionalParams - extends msRest.RequestOptionsBase { +export interface ConnectionMonitorsBeginCreateOrUpdateOptionalParams extends msRest.RequestOptionsBase { /** * Value indicating whether connection monitor V1 should be migrated to V2 format. */ @@ -13263,8 +13460,7 @@ export interface PrivateLinkServicesGetOptionalParams extends msRest.RequestOpti /** * Optional Parameters. */ -export interface PrivateLinkServicesGetPrivateEndpointConnectionOptionalParams - extends msRest.RequestOptionsBase { +export interface PrivateLinkServicesGetPrivateEndpointConnectionOptionalParams extends msRest.RequestOptionsBase { /** * Expands referenced resources. */ @@ -13331,6 +13527,28 @@ export interface SubnetsGetOptionalParams extends msRest.RequestOptionsBase { expand?: string; } +/** + * Optional Parameters. + */ +export interface VirtualNetworkPeeringsCreateOrUpdateOptionalParams extends msRest.RequestOptionsBase { + /** + * Parameter indicates the intention to sync the peering with the current address space on the + * remote vNet after it's updated. Possible values include: 'true' + */ + syncRemoteAddressSpace?: SyncRemoteAddressSpace; +} + +/** + * Optional Parameters. + */ +export interface VirtualNetworkPeeringsBeginCreateOrUpdateOptionalParams extends msRest.RequestOptionsBase { + /** + * Parameter indicates the intention to sync the peering with the current address space on the + * remote vNet after it's updated. Possible values include: 'true' + */ + syncRemoteAddressSpace?: SyncRemoteAddressSpace; +} + /** * Optional Parameters. */ @@ -13345,8 +13563,7 @@ export interface VirtualNetworkGatewaysResetOptionalParams extends msRest.Reques /** * Optional Parameters. */ -export interface VirtualNetworkGatewaysGetBgpPeerStatusOptionalParams - extends msRest.RequestOptionsBase { +export interface VirtualNetworkGatewaysGetBgpPeerStatusOptionalParams extends msRest.RequestOptionsBase { /** * The IP address of the peer to retrieve the status of. */ @@ -13356,8 +13573,7 @@ export interface VirtualNetworkGatewaysGetBgpPeerStatusOptionalParams /** * Optional Parameters. */ -export interface VirtualNetworkGatewaysStartPacketCaptureOptionalParams - extends msRest.RequestOptionsBase { +export interface VirtualNetworkGatewaysStartPacketCaptureOptionalParams extends msRest.RequestOptionsBase { /** * Virtual network gateway packet capture parameters supplied to start packet capture on gateway. */ @@ -13378,8 +13594,7 @@ export interface VirtualNetworkGatewaysBeginResetOptionalParams extends msRest.R /** * Optional Parameters. */ -export interface VirtualNetworkGatewaysBeginGetBgpPeerStatusOptionalParams - extends msRest.RequestOptionsBase { +export interface VirtualNetworkGatewaysBeginGetBgpPeerStatusOptionalParams extends msRest.RequestOptionsBase { /** * The IP address of the peer to retrieve the status of. */ @@ -13389,8 +13604,7 @@ export interface VirtualNetworkGatewaysBeginGetBgpPeerStatusOptionalParams /** * Optional Parameters. */ -export interface VirtualNetworkGatewaysBeginStartPacketCaptureOptionalParams - extends msRest.RequestOptionsBase { +export interface VirtualNetworkGatewaysBeginStartPacketCaptureOptionalParams extends msRest.RequestOptionsBase { /** * Virtual network gateway packet capture parameters supplied to start packet capture on gateway. */ @@ -13400,8 +13614,7 @@ export interface VirtualNetworkGatewaysBeginStartPacketCaptureOptionalParams /** * Optional Parameters. */ -export interface VirtualNetworkGatewayConnectionsStartPacketCaptureOptionalParams - extends msRest.RequestOptionsBase { +export interface VirtualNetworkGatewayConnectionsStartPacketCaptureOptionalParams extends msRest.RequestOptionsBase { /** * Virtual network gateway packet capture parameters supplied to start packet capture on gateway * connection. @@ -13412,8 +13625,7 @@ export interface VirtualNetworkGatewayConnectionsStartPacketCaptureOptionalParam /** * Optional Parameters. */ -export interface VirtualNetworkGatewayConnectionsBeginStartPacketCaptureOptionalParams - extends msRest.RequestOptionsBase { +export interface VirtualNetworkGatewayConnectionsBeginStartPacketCaptureOptionalParams extends msRest.RequestOptionsBase { /** * Virtual network gateway packet capture parameters supplied to start packet capture on gateway * connection. @@ -13434,8 +13646,7 @@ export interface VirtualRoutersGetOptionalParams extends msRest.RequestOptionsBa /** * Optional Parameters. */ -export interface VirtualHubsGetEffectiveVirtualHubRoutesOptionalParams - extends msRest.RequestOptionsBase { +export interface VirtualHubsGetEffectiveVirtualHubRoutesOptionalParams extends msRest.RequestOptionsBase { /** * Parameters supplied to get the effective routes for a specific resource. */ @@ -13445,8 +13656,7 @@ export interface VirtualHubsGetEffectiveVirtualHubRoutesOptionalParams /** * Optional Parameters. */ -export interface VirtualHubsBeginGetEffectiveVirtualHubRoutesOptionalParams - extends msRest.RequestOptionsBase { +export interface VirtualHubsBeginGetEffectiveVirtualHubRoutesOptionalParams extends msRest.RequestOptionsBase { /** * Parameters supplied to get the effective routes for a specific resource. */ @@ -13476,8 +13686,7 @@ export interface VpnGatewaysStopPacketCaptureOptionalParams extends msRest.Reque /** * Optional Parameters. */ -export interface VpnGatewaysBeginStartPacketCaptureOptionalParams - extends msRest.RequestOptionsBase { +export interface VpnGatewaysBeginStartPacketCaptureOptionalParams extends msRest.RequestOptionsBase { /** * Vpn gateway packet capture parameters supplied to start packet capture on vpn gateway. */ @@ -13519,8 +13728,7 @@ export interface VpnConnectionsStopPacketCaptureOptionalParams extends msRest.Re /** * Optional Parameters. */ -export interface VpnConnectionsBeginStartPacketCaptureOptionalParams - extends msRest.RequestOptionsBase { +export interface VpnConnectionsBeginStartPacketCaptureOptionalParams extends msRest.RequestOptionsBase { /** * Vpn Connection packet capture parameters supplied to start packet capture on gateway * connection. @@ -13531,8 +13739,7 @@ export interface VpnConnectionsBeginStartPacketCaptureOptionalParams /** * Optional Parameters. */ -export interface VpnConnectionsBeginStopPacketCaptureOptionalParams - extends msRest.RequestOptionsBase { +export interface VpnConnectionsBeginStopPacketCaptureOptionalParams extends msRest.RequestOptionsBase { /** * Vpn Connection packet capture parameters supplied to stop packet capture on gateway * connection. @@ -13564,8 +13771,7 @@ export interface ApplicationGatewayListResult extends Array * Response for ApplicationGatewayAvailableSslOptions API service call. * @extends Array */ -export interface ApplicationGatewayAvailableSslPredefinedPolicies - extends Array { +export interface ApplicationGatewayAvailableSslPredefinedPolicies extends Array { /** * URL to get the next set of results. */ @@ -13578,8 +13784,7 @@ export interface ApplicationGatewayAvailableSslPredefinedPolicies * resources for an application gateway. * @extends Array */ -export interface ApplicationGatewayPrivateLinkResourceListResult - extends Array { +export interface ApplicationGatewayPrivateLinkResourceListResult extends Array { /** * URL to get the next set of results. */ @@ -13592,8 +13797,7 @@ export interface ApplicationGatewayPrivateLinkResourceListResult * endpoint connections for an application gateway. * @extends Array */ -export interface ApplicationGatewayPrivateEndpointConnectionListResult - extends Array { +export interface ApplicationGatewayPrivateEndpointConnectionListResult extends Array { /** * URL to get the next set of results. */ @@ -13741,8 +13945,7 @@ export interface NetworkInterfaceListResult extends Array { * Response for list ip configurations API service call. * @extends Array */ -export interface NetworkInterfaceIPConfigurationListResult - extends Array { +export interface NetworkInterfaceIPConfigurationListResult extends Array { /** * The URL to get the next set of results. * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -13844,8 +14047,7 @@ export interface ExpressRouteCircuitPeeringListResult extends Array */ -export interface ExpressRouteCircuitConnectionListResult - extends Array { +export interface ExpressRouteCircuitConnectionListResult extends Array { /** * The URL to get the next set of results. */ @@ -13858,8 +14060,7 @@ export interface ExpressRouteCircuitConnectionListResult * connections that belongs to a Private Peering for an ExpressRouteCircuit. * @extends Array */ -export interface PeerExpressRouteCircuitConnectionListResult - extends Array { +export interface PeerExpressRouteCircuitConnectionListResult extends Array { /** * The URL to get the next set of results. */ @@ -13909,8 +14110,7 @@ export interface ExpressRouteCrossConnectionListResult extends Array */ -export interface ExpressRouteCrossConnectionPeeringList - extends Array { +export interface ExpressRouteCrossConnectionPeeringList extends Array { /** * The URL to get the next set of results. * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -13974,8 +14174,7 @@ export interface FirewallPolicyListResult extends Array { * Response for ListFirewallPolicyRuleCollectionGroups API service call. * @extends Array */ -export interface FirewallPolicyRuleCollectionGroupListResult - extends Array { +export interface FirewallPolicyRuleCollectionGroupListResult extends Array { /** * URL to get the next set of results. */ @@ -14037,8 +14236,7 @@ export interface LoadBalancerBackendAddressPoolListResult extends Array */ -export interface LoadBalancerFrontendIPConfigurationListResult - extends Array { +export interface LoadBalancerFrontendIPConfigurationListResult extends Array { /** * The URL to get the next set of results. * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -14128,8 +14326,7 @@ export interface NetworkInterfaceLoadBalancerListResult extends Array */ -export interface NetworkInterfaceTapConfigurationListResult - extends Array { +export interface NetworkInterfaceTapConfigurationListResult extends Array { /** * The URL to get the next set of results. * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -14215,21 +14412,24 @@ export interface NetworkVirtualApplianceSkuListResult extends Array */ -export interface NetworkWatcherListResult extends Array {} +export interface NetworkWatcherListResult extends Array { +} /** * @interface * List of packet capture sessions. * @extends Array */ -export interface PacketCaptureListResult extends Array {} +export interface PacketCaptureListResult extends Array { +} /** * @interface * List of connection monitors. * @extends Array */ -export interface ConnectionMonitorListResult extends Array {} +export interface ConnectionMonitorListResult extends Array { +} /** * @interface @@ -14328,8 +14528,7 @@ export interface PrivateEndpointConnectionListResult extends Array */ -export interface AutoApprovedPrivateLinkServicesResult - extends Array { +export interface AutoApprovedPrivateLinkServicesResult extends Array { /** * The URL to get the next set of results. * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -14440,8 +14639,7 @@ export interface ServiceEndpointPolicyListResult extends Array */ -export interface ServiceEndpointPolicyDefinitionListResult - extends Array { +export interface ServiceEndpointPolicyDefinitionListResult extends Array { /** * The URL to get the next set of results. */ @@ -14527,8 +14725,7 @@ export interface VirtualNetworkGatewayListResult extends Array */ -export interface VirtualNetworkGatewayListConnectionsResult - extends Array { +export interface VirtualNetworkGatewayListConnectionsResult extends Array { /** * The URL to get the next set of results. * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -14541,8 +14738,7 @@ export interface VirtualNetworkGatewayListConnectionsResult * Response for the ListVirtualNetworkGatewayConnections API service call. * @extends Array */ -export interface VirtualNetworkGatewayConnectionListResult - extends Array { +export interface VirtualNetworkGatewayConnectionListResult extends Array { /** * The URL to get the next set of results. * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -14563,6 +14759,19 @@ export interface LocalNetworkGatewayListResult extends Array + */ +export interface ListVirtualNetworkGatewayNatRulesResult extends Array { + /** + * URL to get the next set of operation list results if there are any. + */ + nextLink?: string; +} + /** * @interface * Response for ListVirtualNetworkTap API service call. @@ -14795,8 +15004,7 @@ export interface ListHubRouteTablesResult extends Array { * WebApplicationFirewallPolicy objects and a URL link to get the next set of results. * @extends Array */ -export interface WebApplicationFirewallPolicyListResult - extends Array { +export interface WebApplicationFirewallPolicyListResult extends Array { /** * URL to get the next set of WebApplicationFirewallPolicy objects if there are any. * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -14810,7 +15018,7 @@ export interface WebApplicationFirewallPolicyListResult * @readonly * @enum {string} */ -export type ApplicationGatewayProtocol = "Http" | "Https"; +export type ApplicationGatewayProtocol = 'Http' | 'Https'; /** * Defines values for ProvisioningState. @@ -14818,7 +15026,7 @@ export type ApplicationGatewayProtocol = "Http" | "Https"; * @readonly * @enum {string} */ -export type ProvisioningState = "Succeeded" | "Updating" | "Deleting" | "Failed"; +export type ProvisioningState = 'Succeeded' | 'Updating' | 'Deleting' | 'Failed'; /** * Defines values for IPAllocationMethod. @@ -14826,7 +15034,7 @@ export type ProvisioningState = "Succeeded" | "Updating" | "Deleting" | "Failed" * @readonly * @enum {string} */ -export type IPAllocationMethod = "Static" | "Dynamic"; +export type IPAllocationMethod = 'Static' | 'Dynamic'; /** * Defines values for IPVersion. @@ -14834,7 +15042,7 @@ export type IPAllocationMethod = "Static" | "Dynamic"; * @readonly * @enum {string} */ -export type IPVersion = "IPv4" | "IPv6"; +export type IPVersion = 'IPv4' | 'IPv6'; /** * Defines values for SecurityRuleProtocol. @@ -14842,7 +15050,7 @@ export type IPVersion = "IPv4" | "IPv6"; * @readonly * @enum {string} */ -export type SecurityRuleProtocol = "Tcp" | "Udp" | "Icmp" | "Esp" | "*" | "Ah"; +export type SecurityRuleProtocol = 'Tcp' | 'Udp' | 'Icmp' | 'Esp' | '*' | 'Ah'; /** * Defines values for SecurityRuleAccess. @@ -14850,7 +15058,7 @@ export type SecurityRuleProtocol = "Tcp" | "Udp" | "Icmp" | "Esp" | "*" | "Ah"; * @readonly * @enum {string} */ -export type SecurityRuleAccess = "Allow" | "Deny"; +export type SecurityRuleAccess = 'Allow' | 'Deny'; /** * Defines values for SecurityRuleDirection. @@ -14858,7 +15066,15 @@ export type SecurityRuleAccess = "Allow" | "Deny"; * @readonly * @enum {string} */ -export type SecurityRuleDirection = "Inbound" | "Outbound"; +export type SecurityRuleDirection = 'Inbound' | 'Outbound'; + +/** + * Defines values for ExtendedLocationTypes. + * Possible values include: 'EdgeZone' + * @readonly + * @enum {string} + */ +export type ExtendedLocationTypes = 'EdgeZone'; /** * Defines values for NetworkInterfaceNicType. @@ -14866,7 +15082,7 @@ export type SecurityRuleDirection = "Inbound" | "Outbound"; * @readonly * @enum {string} */ -export type NetworkInterfaceNicType = "Standard" | "Elastic"; +export type NetworkInterfaceNicType = 'Standard' | 'Elastic'; /** * Defines values for NetworkInterfaceMigrationPhase. @@ -14874,7 +15090,7 @@ export type NetworkInterfaceNicType = "Standard" | "Elastic"; * @readonly * @enum {string} */ -export type NetworkInterfaceMigrationPhase = "None" | "Prepare" | "Commit" | "Abort" | "Committed"; +export type NetworkInterfaceMigrationPhase = 'None' | 'Prepare' | 'Commit' | 'Abort' | 'Committed'; /** * Defines values for FlowLogFormatType. @@ -14882,7 +15098,7 @@ export type NetworkInterfaceMigrationPhase = "None" | "Prepare" | "Commit" | "Ab * @readonly * @enum {string} */ -export type FlowLogFormatType = "JSON"; +export type FlowLogFormatType = 'JSON'; /** * Defines values for RouteNextHopType. @@ -14891,12 +15107,7 @@ export type FlowLogFormatType = "JSON"; * @readonly * @enum {string} */ -export type RouteNextHopType = - | "VirtualNetworkGateway" - | "VnetLocal" - | "Internet" - | "VirtualAppliance" - | "None"; +export type RouteNextHopType = 'VirtualNetworkGateway' | 'VnetLocal' | 'Internet' | 'VirtualAppliance' | 'None'; /** * Defines values for PublicIPAddressSkuName. @@ -14904,7 +15115,7 @@ export type RouteNextHopType = * @readonly * @enum {string} */ -export type PublicIPAddressSkuName = "Basic" | "Standard"; +export type PublicIPAddressSkuName = 'Basic' | 'Standard'; /** * Defines values for PublicIPAddressSkuTier. @@ -14912,7 +15123,7 @@ export type PublicIPAddressSkuName = "Basic" | "Standard"; * @readonly * @enum {string} */ -export type PublicIPAddressSkuTier = "Regional" | "Global"; +export type PublicIPAddressSkuTier = 'Regional' | 'Global'; /** * Defines values for DdosSettingsProtectionCoverage. @@ -14920,7 +15131,7 @@ export type PublicIPAddressSkuTier = "Regional" | "Global"; * @readonly * @enum {string} */ -export type DdosSettingsProtectionCoverage = "Basic" | "Standard"; +export type DdosSettingsProtectionCoverage = 'Basic' | 'Standard'; /** * Defines values for NatGatewaySkuName. @@ -14928,7 +15139,7 @@ export type DdosSettingsProtectionCoverage = "Basic" | "Standard"; * @readonly * @enum {string} */ -export type NatGatewaySkuName = "Standard"; +export type NatGatewaySkuName = 'Standard'; /** * Defines values for PublicIPAddressMigrationPhase. @@ -14936,7 +15147,15 @@ export type NatGatewaySkuName = "Standard"; * @readonly * @enum {string} */ -export type PublicIPAddressMigrationPhase = "None" | "Prepare" | "Commit" | "Abort" | "Committed"; +export type PublicIPAddressMigrationPhase = 'None' | 'Prepare' | 'Commit' | 'Abort' | 'Committed'; + +/** + * Defines values for DeleteOptions. + * Possible values include: 'Delete', 'Detach' + * @readonly + * @enum {string} + */ +export type DeleteOptions = 'Delete' | 'Detach'; /** * Defines values for VirtualNetworkPrivateEndpointNetworkPolicies. @@ -14944,7 +15163,7 @@ export type PublicIPAddressMigrationPhase = "None" | "Prepare" | "Commit" | "Abo * @readonly * @enum {string} */ -export type VirtualNetworkPrivateEndpointNetworkPolicies = "Enabled" | "Disabled"; +export type VirtualNetworkPrivateEndpointNetworkPolicies = 'Enabled' | 'Disabled'; /** * Defines values for VirtualNetworkPrivateLinkServiceNetworkPolicies. @@ -14952,7 +15171,23 @@ export type VirtualNetworkPrivateEndpointNetworkPolicies = "Enabled" | "Disabled * @readonly * @enum {string} */ -export type VirtualNetworkPrivateLinkServiceNetworkPolicies = "Enabled" | "Disabled"; +export type VirtualNetworkPrivateLinkServiceNetworkPolicies = 'Enabled' | 'Disabled'; + +/** + * Defines values for GatewayLoadBalancerTunnelProtocol. + * Possible values include: 'None', 'Native', 'VXLAN' + * @readonly + * @enum {string} + */ +export type GatewayLoadBalancerTunnelProtocol = 'None' | 'Native' | 'VXLAN'; + +/** + * Defines values for GatewayLoadBalancerTunnelInterfaceType. + * Possible values include: 'None', 'Internal', 'External' + * @readonly + * @enum {string} + */ +export type GatewayLoadBalancerTunnelInterfaceType = 'None' | 'Internal' | 'External'; /** * Defines values for TransportProtocol. @@ -14960,7 +15195,7 @@ export type VirtualNetworkPrivateLinkServiceNetworkPolicies = "Enabled" | "Disab * @readonly * @enum {string} */ -export type TransportProtocol = "Udp" | "Tcp" | "All"; +export type TransportProtocol = 'Udp' | 'Tcp' | 'All'; /** * Defines values for ApplicationGatewayCookieBasedAffinity. @@ -14968,7 +15203,7 @@ export type TransportProtocol = "Udp" | "Tcp" | "All"; * @readonly * @enum {string} */ -export type ApplicationGatewayCookieBasedAffinity = "Enabled" | "Disabled"; +export type ApplicationGatewayCookieBasedAffinity = 'Enabled' | 'Disabled'; /** * Defines values for ApplicationGatewayBackendHealthServerHealth. @@ -14976,12 +15211,7 @@ export type ApplicationGatewayCookieBasedAffinity = "Enabled" | "Disabled"; * @readonly * @enum {string} */ -export type ApplicationGatewayBackendHealthServerHealth = - | "Unknown" - | "Up" - | "Down" - | "Partial" - | "Draining"; +export type ApplicationGatewayBackendHealthServerHealth = 'Unknown' | 'Up' | 'Down' | 'Partial' | 'Draining'; /** * Defines values for ApplicationGatewaySkuName. @@ -14990,14 +15220,7 @@ export type ApplicationGatewayBackendHealthServerHealth = * @readonly * @enum {string} */ -export type ApplicationGatewaySkuName = - | "Standard_Small" - | "Standard_Medium" - | "Standard_Large" - | "WAF_Medium" - | "WAF_Large" - | "Standard_v2" - | "WAF_v2"; +export type ApplicationGatewaySkuName = 'Standard_Small' | 'Standard_Medium' | 'Standard_Large' | 'WAF_Medium' | 'WAF_Large' | 'Standard_v2' | 'WAF_v2'; /** * Defines values for ApplicationGatewayTier. @@ -15005,7 +15228,7 @@ export type ApplicationGatewaySkuName = * @readonly * @enum {string} */ -export type ApplicationGatewayTier = "Standard" | "WAF" | "Standard_v2" | "WAF_v2"; +export type ApplicationGatewayTier = 'Standard' | 'WAF' | 'Standard_v2' | 'WAF_v2'; /** * Defines values for ApplicationGatewaySslProtocol. @@ -15013,7 +15236,7 @@ export type ApplicationGatewayTier = "Standard" | "WAF" | "Standard_v2" | "WAF_v * @readonly * @enum {string} */ -export type ApplicationGatewaySslProtocol = "TLSv1_0" | "TLSv1_1" | "TLSv1_2"; +export type ApplicationGatewaySslProtocol = 'TLSv1_0' | 'TLSv1_1' | 'TLSv1_2'; /** * Defines values for ApplicationGatewaySslPolicyType. @@ -15021,7 +15244,7 @@ export type ApplicationGatewaySslProtocol = "TLSv1_0" | "TLSv1_1" | "TLSv1_2"; * @readonly * @enum {string} */ -export type ApplicationGatewaySslPolicyType = "Predefined" | "Custom"; +export type ApplicationGatewaySslPolicyType = 'Predefined' | 'Custom'; /** * Defines values for ApplicationGatewaySslPolicyName. @@ -15030,10 +15253,7 @@ export type ApplicationGatewaySslPolicyType = "Predefined" | "Custom"; * @readonly * @enum {string} */ -export type ApplicationGatewaySslPolicyName = - | "AppGwSslPolicy20150501" - | "AppGwSslPolicy20170401" - | "AppGwSslPolicy20170401S"; +export type ApplicationGatewaySslPolicyName = 'AppGwSslPolicy20150501' | 'AppGwSslPolicy20170401' | 'AppGwSslPolicy20170401S'; /** * Defines values for ApplicationGatewaySslCipherSuite. @@ -15055,35 +15275,7 @@ export type ApplicationGatewaySslPolicyName = * @readonly * @enum {string} */ -export type ApplicationGatewaySslCipherSuite = - | "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384" - | "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256" - | "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA" - | "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA" - | "TLS_DHE_RSA_WITH_AES_256_GCM_SHA384" - | "TLS_DHE_RSA_WITH_AES_128_GCM_SHA256" - | "TLS_DHE_RSA_WITH_AES_256_CBC_SHA" - | "TLS_DHE_RSA_WITH_AES_128_CBC_SHA" - | "TLS_RSA_WITH_AES_256_GCM_SHA384" - | "TLS_RSA_WITH_AES_128_GCM_SHA256" - | "TLS_RSA_WITH_AES_256_CBC_SHA256" - | "TLS_RSA_WITH_AES_128_CBC_SHA256" - | "TLS_RSA_WITH_AES_256_CBC_SHA" - | "TLS_RSA_WITH_AES_128_CBC_SHA" - | "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384" - | "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256" - | "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384" - | "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256" - | "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA" - | "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA" - | "TLS_DHE_DSS_WITH_AES_256_CBC_SHA256" - | "TLS_DHE_DSS_WITH_AES_128_CBC_SHA256" - | "TLS_DHE_DSS_WITH_AES_256_CBC_SHA" - | "TLS_DHE_DSS_WITH_AES_128_CBC_SHA" - | "TLS_RSA_WITH_3DES_EDE_CBC_SHA" - | "TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA" - | "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256" - | "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384"; +export type ApplicationGatewaySslCipherSuite = 'TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384' | 'TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256' | 'TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA' | 'TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA' | 'TLS_DHE_RSA_WITH_AES_256_GCM_SHA384' | 'TLS_DHE_RSA_WITH_AES_128_GCM_SHA256' | 'TLS_DHE_RSA_WITH_AES_256_CBC_SHA' | 'TLS_DHE_RSA_WITH_AES_128_CBC_SHA' | 'TLS_RSA_WITH_AES_256_GCM_SHA384' | 'TLS_RSA_WITH_AES_128_GCM_SHA256' | 'TLS_RSA_WITH_AES_256_CBC_SHA256' | 'TLS_RSA_WITH_AES_128_CBC_SHA256' | 'TLS_RSA_WITH_AES_256_CBC_SHA' | 'TLS_RSA_WITH_AES_128_CBC_SHA' | 'TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384' | 'TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256' | 'TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384' | 'TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256' | 'TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA' | 'TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA' | 'TLS_DHE_DSS_WITH_AES_256_CBC_SHA256' | 'TLS_DHE_DSS_WITH_AES_128_CBC_SHA256' | 'TLS_DHE_DSS_WITH_AES_256_CBC_SHA' | 'TLS_DHE_DSS_WITH_AES_128_CBC_SHA' | 'TLS_RSA_WITH_3DES_EDE_CBC_SHA' | 'TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA' | 'TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256' | 'TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384'; /** * Defines values for ApplicationGatewayCustomErrorStatusCode. @@ -15091,7 +15283,7 @@ export type ApplicationGatewaySslCipherSuite = * @readonly * @enum {string} */ -export type ApplicationGatewayCustomErrorStatusCode = "HttpStatus403" | "HttpStatus502"; +export type ApplicationGatewayCustomErrorStatusCode = 'HttpStatus403' | 'HttpStatus502'; /** * Defines values for ApplicationGatewayRequestRoutingRuleType. @@ -15099,7 +15291,7 @@ export type ApplicationGatewayCustomErrorStatusCode = "HttpStatus403" | "HttpSta * @readonly * @enum {string} */ -export type ApplicationGatewayRequestRoutingRuleType = "Basic" | "PathBasedRouting"; +export type ApplicationGatewayRequestRoutingRuleType = 'Basic' | 'PathBasedRouting'; /** * Defines values for ApplicationGatewayRedirectType. @@ -15107,7 +15299,7 @@ export type ApplicationGatewayRequestRoutingRuleType = "Basic" | "PathBasedRouti * @readonly * @enum {string} */ -export type ApplicationGatewayRedirectType = "Permanent" | "Found" | "SeeOther" | "Temporary"; +export type ApplicationGatewayRedirectType = 'Permanent' | 'Found' | 'SeeOther' | 'Temporary'; /** * Defines values for ApplicationGatewayOperationalState. @@ -15115,7 +15307,7 @@ export type ApplicationGatewayRedirectType = "Permanent" | "Found" | "SeeOther" * @readonly * @enum {string} */ -export type ApplicationGatewayOperationalState = "Stopped" | "Starting" | "Running" | "Stopping"; +export type ApplicationGatewayOperationalState = 'Stopped' | 'Starting' | 'Running' | 'Stopping'; /** * Defines values for ApplicationGatewayFirewallMode. @@ -15123,7 +15315,7 @@ export type ApplicationGatewayOperationalState = "Stopped" | "Starting" | "Runni * @readonly * @enum {string} */ -export type ApplicationGatewayFirewallMode = "Detection" | "Prevention"; +export type ApplicationGatewayFirewallMode = 'Detection' | 'Prevention'; /** * Defines values for ResourceIdentityType. @@ -15132,19 +15324,7 @@ export type ApplicationGatewayFirewallMode = "Detection" | "Prevention"; * @readonly * @enum {string} */ -export type ResourceIdentityType = - | "SystemAssigned" - | "UserAssigned" - | "SystemAssigned, UserAssigned" - | "None"; - -/** - * Defines values for ExtendedLocationTypes. - * Possible values include: 'EdgeZone' - * @readonly - * @enum {string} - */ -export type ExtendedLocationTypes = "EdgeZone"; +export type ResourceIdentityType = 'SystemAssigned' | 'UserAssigned' | 'SystemAssigned, UserAssigned' | 'None'; /** * Defines values for AzureFirewallRCActionType. @@ -15152,7 +15332,7 @@ export type ExtendedLocationTypes = "EdgeZone"; * @readonly * @enum {string} */ -export type AzureFirewallRCActionType = "Allow" | "Deny"; +export type AzureFirewallRCActionType = 'Allow' | 'Deny'; /** * Defines values for AzureFirewallApplicationRuleProtocolType. @@ -15160,7 +15340,7 @@ export type AzureFirewallRCActionType = "Allow" | "Deny"; * @readonly * @enum {string} */ -export type AzureFirewallApplicationRuleProtocolType = "Http" | "Https" | "Mssql"; +export type AzureFirewallApplicationRuleProtocolType = 'Http' | 'Https' | 'Mssql'; /** * Defines values for AzureFirewallNatRCActionType. @@ -15168,7 +15348,7 @@ export type AzureFirewallApplicationRuleProtocolType = "Http" | "Https" | "Mssql * @readonly * @enum {string} */ -export type AzureFirewallNatRCActionType = "Snat" | "Dnat"; +export type AzureFirewallNatRCActionType = 'Snat' | 'Dnat'; /** * Defines values for AzureFirewallNetworkRuleProtocol. @@ -15176,7 +15356,7 @@ export type AzureFirewallNatRCActionType = "Snat" | "Dnat"; * @readonly * @enum {string} */ -export type AzureFirewallNetworkRuleProtocol = "TCP" | "UDP" | "Any" | "ICMP"; +export type AzureFirewallNetworkRuleProtocol = 'TCP' | 'UDP' | 'Any' | 'ICMP'; /** * Defines values for AzureFirewallThreatIntelMode. @@ -15184,7 +15364,7 @@ export type AzureFirewallNetworkRuleProtocol = "TCP" | "UDP" | "Any" | "ICMP"; * @readonly * @enum {string} */ -export type AzureFirewallThreatIntelMode = "Alert" | "Deny" | "Off"; +export type AzureFirewallThreatIntelMode = 'Alert' | 'Deny' | 'Off'; /** * Defines values for AzureFirewallSkuName. @@ -15192,7 +15372,7 @@ export type AzureFirewallThreatIntelMode = "Alert" | "Deny" | "Off"; * @readonly * @enum {string} */ -export type AzureFirewallSkuName = "AZFW_VNet" | "AZFW_Hub"; +export type AzureFirewallSkuName = 'AZFW_VNet' | 'AZFW_Hub'; /** * Defines values for AzureFirewallSkuTier. @@ -15200,7 +15380,15 @@ export type AzureFirewallSkuName = "AZFW_VNet" | "AZFW_Hub"; * @readonly * @enum {string} */ -export type AzureFirewallSkuTier = "Standard" | "Premium"; +export type AzureFirewallSkuTier = 'Standard' | 'Premium'; + +/** + * Defines values for BastionHostSkuName. + * Possible values include: 'Basic', 'Standard' + * @readonly + * @enum {string} + */ +export type BastionHostSkuName = 'Basic' | 'Standard'; /** * Defines values for BastionConnectProtocol. @@ -15208,7 +15396,7 @@ export type AzureFirewallSkuTier = "Standard" | "Premium"; * @readonly * @enum {string} */ -export type BastionConnectProtocol = "SSH" | "RDP"; +export type BastionConnectProtocol = 'SSH' | 'RDP'; /** * Defines values for CommissionedState. @@ -15217,13 +15405,7 @@ export type BastionConnectProtocol = "SSH" | "RDP"; * @readonly * @enum {string} */ -export type CommissionedState = - | "Provisioning" - | "Provisioned" - | "Commissioning" - | "Commissioned" - | "Decommissioning" - | "Deprovisioning"; +export type CommissionedState = 'Provisioning' | 'Provisioned' | 'Commissioning' | 'Commissioned' | 'Decommissioning' | 'Deprovisioning'; /** * Defines values for DdosCustomPolicyProtocol. @@ -15231,7 +15413,7 @@ export type CommissionedState = * @readonly * @enum {string} */ -export type DdosCustomPolicyProtocol = "Tcp" | "Udp" | "Syn"; +export type DdosCustomPolicyProtocol = 'Tcp' | 'Udp' | 'Syn'; /** * Defines values for DdosCustomPolicyTriggerSensitivityOverride. @@ -15239,7 +15421,7 @@ export type DdosCustomPolicyProtocol = "Tcp" | "Udp" | "Syn"; * @readonly * @enum {string} */ -export type DdosCustomPolicyTriggerSensitivityOverride = "Relaxed" | "Low" | "Default" | "High"; +export type DdosCustomPolicyTriggerSensitivityOverride = 'Relaxed' | 'Low' | 'Default' | 'High'; /** * Defines values for ProtocolType. @@ -15247,16 +15429,7 @@ export type DdosCustomPolicyTriggerSensitivityOverride = "Relaxed" | "Low" | "De * @readonly * @enum {string} */ -export type ProtocolType = - | "DoNotUse" - | "Icmp" - | "Tcp" - | "Udp" - | "Gre" - | "Esp" - | "Ah" - | "Vxlan" - | "All"; +export type ProtocolType = 'DoNotUse' | 'Icmp' | 'Tcp' | 'Udp' | 'Gre' | 'Esp' | 'Ah' | 'Vxlan' | 'All'; /** * Defines values for AuthorizationUseStatus. @@ -15264,7 +15437,7 @@ export type ProtocolType = * @readonly * @enum {string} */ -export type AuthorizationUseStatus = "Available" | "InUse"; +export type AuthorizationUseStatus = 'Available' | 'InUse'; /** * Defines values for ExpressRouteCircuitPeeringAdvertisedPublicPrefixState. @@ -15272,11 +15445,7 @@ export type AuthorizationUseStatus = "Available" | "InUse"; * @readonly * @enum {string} */ -export type ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = - | "NotConfigured" - | "Configuring" - | "Configured" - | "ValidationNeeded"; +export type ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = 'NotConfigured' | 'Configuring' | 'Configured' | 'ValidationNeeded'; /** * Defines values for ExpressRouteCircuitPeeringState. @@ -15284,7 +15453,7 @@ export type ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = * @readonly * @enum {string} */ -export type ExpressRouteCircuitPeeringState = "Disabled" | "Enabled"; +export type ExpressRouteCircuitPeeringState = 'Disabled' | 'Enabled'; /** * Defines values for ExpressRoutePeeringType. @@ -15292,10 +15461,7 @@ export type ExpressRouteCircuitPeeringState = "Disabled" | "Enabled"; * @readonly * @enum {string} */ -export type ExpressRoutePeeringType = - | "AzurePublicPeering" - | "AzurePrivatePeering" - | "MicrosoftPeering"; +export type ExpressRoutePeeringType = 'AzurePublicPeering' | 'AzurePrivatePeering' | 'MicrosoftPeering'; /** * Defines values for ExpressRoutePeeringState. @@ -15303,7 +15469,7 @@ export type ExpressRoutePeeringType = * @readonly * @enum {string} */ -export type ExpressRoutePeeringState = "Disabled" | "Enabled"; +export type ExpressRoutePeeringState = 'Disabled' | 'Enabled'; /** * Defines values for CircuitConnectionStatus. @@ -15311,7 +15477,7 @@ export type ExpressRoutePeeringState = "Disabled" | "Enabled"; * @readonly * @enum {string} */ -export type CircuitConnectionStatus = "Connected" | "Connecting" | "Disconnected"; +export type CircuitConnectionStatus = 'Connected' | 'Connecting' | 'Disconnected'; /** * Defines values for ExpressRouteCircuitSkuTier. @@ -15319,7 +15485,7 @@ export type CircuitConnectionStatus = "Connected" | "Connecting" | "Disconnected * @readonly * @enum {string} */ -export type ExpressRouteCircuitSkuTier = "Standard" | "Premium" | "Basic" | "Local"; +export type ExpressRouteCircuitSkuTier = 'Standard' | 'Premium' | 'Basic' | 'Local'; /** * Defines values for ExpressRouteCircuitSkuFamily. @@ -15327,7 +15493,7 @@ export type ExpressRouteCircuitSkuTier = "Standard" | "Premium" | "Basic" | "Loc * @readonly * @enum {string} */ -export type ExpressRouteCircuitSkuFamily = "UnlimitedData" | "MeteredData"; +export type ExpressRouteCircuitSkuFamily = 'UnlimitedData' | 'MeteredData'; /** * Defines values for ServiceProviderProvisioningState. @@ -15335,11 +15501,7 @@ export type ExpressRouteCircuitSkuFamily = "UnlimitedData" | "MeteredData"; * @readonly * @enum {string} */ -export type ServiceProviderProvisioningState = - | "NotProvisioned" - | "Provisioning" - | "Provisioned" - | "Deprovisioning"; +export type ServiceProviderProvisioningState = 'NotProvisioned' | 'Provisioning' | 'Provisioned' | 'Deprovisioning'; /** * Defines values for ExpressRouteLinkMacSecCipher. @@ -15347,11 +15509,7 @@ export type ServiceProviderProvisioningState = * @readonly * @enum {string} */ -export type ExpressRouteLinkMacSecCipher = - | "GcmAes256" - | "GcmAes128" - | "GcmAesXpn128" - | "GcmAesXpn256"; +export type ExpressRouteLinkMacSecCipher = 'GcmAes256' | 'GcmAes128' | 'GcmAesXpn128' | 'GcmAesXpn256'; /** * Defines values for ExpressRouteLinkMacSecSciState. @@ -15359,7 +15517,7 @@ export type ExpressRouteLinkMacSecCipher = * @readonly * @enum {string} */ -export type ExpressRouteLinkMacSecSciState = "Disabled" | "Enabled"; +export type ExpressRouteLinkMacSecSciState = 'Disabled' | 'Enabled'; /** * Defines values for ExpressRouteLinkConnectorType. @@ -15367,7 +15525,7 @@ export type ExpressRouteLinkMacSecSciState = "Disabled" | "Enabled"; * @readonly * @enum {string} */ -export type ExpressRouteLinkConnectorType = "LC" | "SC"; +export type ExpressRouteLinkConnectorType = 'LC' | 'SC'; /** * Defines values for ExpressRouteLinkAdminState. @@ -15375,7 +15533,7 @@ export type ExpressRouteLinkConnectorType = "LC" | "SC"; * @readonly * @enum {string} */ -export type ExpressRouteLinkAdminState = "Enabled" | "Disabled"; +export type ExpressRouteLinkAdminState = 'Enabled' | 'Disabled'; /** * Defines values for ExpressRoutePortsEncapsulation. @@ -15383,7 +15541,7 @@ export type ExpressRouteLinkAdminState = "Enabled" | "Disabled"; * @readonly * @enum {string} */ -export type ExpressRoutePortsEncapsulation = "Dot1Q" | "QinQ"; +export type ExpressRoutePortsEncapsulation = 'Dot1Q' | 'QinQ'; /** * Defines values for FirewallPolicyIntrusionDetectionStateType. @@ -15391,7 +15549,7 @@ export type ExpressRoutePortsEncapsulation = "Dot1Q" | "QinQ"; * @readonly * @enum {string} */ -export type FirewallPolicyIntrusionDetectionStateType = "Off" | "Alert" | "Deny"; +export type FirewallPolicyIntrusionDetectionStateType = 'Off' | 'Alert' | 'Deny'; /** * Defines values for FirewallPolicyIntrusionDetectionProtocol. @@ -15399,7 +15557,7 @@ export type FirewallPolicyIntrusionDetectionStateType = "Off" | "Alert" | "Deny" * @readonly * @enum {string} */ -export type FirewallPolicyIntrusionDetectionProtocol = "TCP" | "UDP" | "ICMP" | "ANY"; +export type FirewallPolicyIntrusionDetectionProtocol = 'TCP' | 'UDP' | 'ICMP' | 'ANY'; /** * Defines values for FirewallPolicySkuTier. @@ -15407,7 +15565,7 @@ export type FirewallPolicyIntrusionDetectionProtocol = "TCP" | "UDP" | "ICMP" | * @readonly * @enum {string} */ -export type FirewallPolicySkuTier = "Standard" | "Premium"; +export type FirewallPolicySkuTier = 'Standard' | 'Premium'; /** * Defines values for FirewallPolicyNatRuleCollectionActionType. @@ -15415,7 +15573,7 @@ export type FirewallPolicySkuTier = "Standard" | "Premium"; * @readonly * @enum {string} */ -export type FirewallPolicyNatRuleCollectionActionType = "DNAT"; +export type FirewallPolicyNatRuleCollectionActionType = 'DNAT'; /** * Defines values for FirewallPolicyFilterRuleCollectionActionType. @@ -15423,7 +15581,7 @@ export type FirewallPolicyNatRuleCollectionActionType = "DNAT"; * @readonly * @enum {string} */ -export type FirewallPolicyFilterRuleCollectionActionType = "Allow" | "Deny"; +export type FirewallPolicyFilterRuleCollectionActionType = 'Allow' | 'Deny'; /** * Defines values for FirewallPolicyRuleApplicationProtocolType. @@ -15431,7 +15589,7 @@ export type FirewallPolicyFilterRuleCollectionActionType = "Allow" | "Deny"; * @readonly * @enum {string} */ -export type FirewallPolicyRuleApplicationProtocolType = "Http" | "Https"; +export type FirewallPolicyRuleApplicationProtocolType = 'Http' | 'Https'; /** * Defines values for FirewallPolicyRuleNetworkProtocol. @@ -15439,7 +15597,7 @@ export type FirewallPolicyRuleApplicationProtocolType = "Http" | "Https"; * @readonly * @enum {string} */ -export type FirewallPolicyRuleNetworkProtocol = "TCP" | "UDP" | "Any" | "ICMP"; +export type FirewallPolicyRuleNetworkProtocol = 'TCP' | 'UDP' | 'Any' | 'ICMP'; /** * Defines values for IpAllocationType. @@ -15447,15 +15605,15 @@ export type FirewallPolicyRuleNetworkProtocol = "TCP" | "UDP" | "Any" | "ICMP"; * @readonly * @enum {string} */ -export type IpAllocationType = "Undefined" | "Hypernet"; +export type IpAllocationType = 'Undefined' | 'Hypernet'; /** * Defines values for LoadBalancerSkuName. - * Possible values include: 'Basic', 'Standard' + * Possible values include: 'Basic', 'Standard', 'Gateway' * @readonly * @enum {string} */ -export type LoadBalancerSkuName = "Basic" | "Standard"; +export type LoadBalancerSkuName = 'Basic' | 'Standard' | 'Gateway'; /** * Defines values for LoadBalancerSkuTier. @@ -15463,7 +15621,7 @@ export type LoadBalancerSkuName = "Basic" | "Standard"; * @readonly * @enum {string} */ -export type LoadBalancerSkuTier = "Regional" | "Global"; +export type LoadBalancerSkuTier = 'Regional' | 'Global'; /** * Defines values for LoadDistribution. @@ -15471,7 +15629,7 @@ export type LoadBalancerSkuTier = "Regional" | "Global"; * @readonly * @enum {string} */ -export type LoadDistribution = "Default" | "SourceIP" | "SourceIPProtocol"; +export type LoadDistribution = 'Default' | 'SourceIP' | 'SourceIPProtocol'; /** * Defines values for ProbeProtocol. @@ -15479,7 +15637,7 @@ export type LoadDistribution = "Default" | "SourceIP" | "SourceIPProtocol"; * @readonly * @enum {string} */ -export type ProbeProtocol = "Http" | "Tcp" | "Https"; +export type ProbeProtocol = 'Http' | 'Tcp' | 'Https'; /** * Defines values for LoadBalancerOutboundRuleProtocol. @@ -15487,7 +15645,7 @@ export type ProbeProtocol = "Http" | "Tcp" | "Https"; * @readonly * @enum {string} */ -export type LoadBalancerOutboundRuleProtocol = "Tcp" | "Udp" | "All"; +export type LoadBalancerOutboundRuleProtocol = 'Tcp' | 'Udp' | 'All'; /** * Defines values for NetworkOperationStatus. @@ -15495,7 +15653,7 @@ export type LoadBalancerOutboundRuleProtocol = "Tcp" | "Udp" | "All"; * @readonly * @enum {string} */ -export type NetworkOperationStatus = "InProgress" | "Succeeded" | "Failed"; +export type NetworkOperationStatus = 'InProgress' | 'Succeeded' | 'Failed'; /** * Defines values for Access. @@ -15503,7 +15661,7 @@ export type NetworkOperationStatus = "InProgress" | "Succeeded" | "Failed"; * @readonly * @enum {string} */ -export type Access = "Allow" | "Deny"; +export type Access = 'Allow' | 'Deny'; /** * Defines values for AuthenticationMethod. @@ -15511,7 +15669,7 @@ export type Access = "Allow" | "Deny"; * @readonly * @enum {string} */ -export type AuthenticationMethod = "EAPTLS" | "EAPMSCHAPv2"; +export type AuthenticationMethod = 'EAPTLS' | 'EAPMSCHAPv2'; /** * Defines values for EffectiveSecurityRuleProtocol. @@ -15519,7 +15677,7 @@ export type AuthenticationMethod = "EAPTLS" | "EAPMSCHAPv2"; * @readonly * @enum {string} */ -export type EffectiveSecurityRuleProtocol = "Tcp" | "Udp" | "All"; +export type EffectiveSecurityRuleProtocol = 'Tcp' | 'Udp' | 'All'; /** * Defines values for EffectiveRouteSource. @@ -15527,7 +15685,7 @@ export type EffectiveSecurityRuleProtocol = "Tcp" | "Udp" | "All"; * @readonly * @enum {string} */ -export type EffectiveRouteSource = "Unknown" | "User" | "VirtualNetworkGateway" | "Default"; +export type EffectiveRouteSource = 'Unknown' | 'User' | 'VirtualNetworkGateway' | 'Default'; /** * Defines values for EffectiveRouteState. @@ -15535,7 +15693,7 @@ export type EffectiveRouteSource = "Unknown" | "User" | "VirtualNetworkGateway" * @readonly * @enum {string} */ -export type EffectiveRouteState = "Active" | "Invalid"; +export type EffectiveRouteState = 'Active' | 'Invalid'; /** * Defines values for InboundSecurityRulesProtocol. @@ -15543,7 +15701,7 @@ export type EffectiveRouteState = "Active" | "Invalid"; * @readonly * @enum {string} */ -export type InboundSecurityRulesProtocol = "TCP" | "UDP"; +export type InboundSecurityRulesProtocol = 'TCP' | 'UDP'; /** * Defines values for AssociationType. @@ -15551,7 +15709,7 @@ export type InboundSecurityRulesProtocol = "TCP" | "UDP"; * @readonly * @enum {string} */ -export type AssociationType = "Associated" | "Contains"; +export type AssociationType = 'Associated' | 'Contains'; /** * Defines values for Direction. @@ -15559,7 +15717,7 @@ export type AssociationType = "Associated" | "Contains"; * @readonly * @enum {string} */ -export type Direction = "Inbound" | "Outbound"; +export type Direction = 'Inbound' | 'Outbound'; /** * Defines values for IpFlowProtocol. @@ -15567,7 +15725,7 @@ export type Direction = "Inbound" | "Outbound"; * @readonly * @enum {string} */ -export type IpFlowProtocol = "TCP" | "UDP"; +export type IpFlowProtocol = 'TCP' | 'UDP'; /** * Defines values for NextHopType. @@ -15576,13 +15734,7 @@ export type IpFlowProtocol = "TCP" | "UDP"; * @readonly * @enum {string} */ -export type NextHopType = - | "Internet" - | "VirtualAppliance" - | "VirtualNetworkGateway" - | "VnetLocal" - | "HyperNetGateway" - | "None"; +export type NextHopType = 'Internet' | 'VirtualAppliance' | 'VirtualNetworkGateway' | 'VnetLocal' | 'HyperNetGateway' | 'None'; /** * Defines values for PcProtocol. @@ -15590,7 +15742,7 @@ export type NextHopType = * @readonly * @enum {string} */ -export type PcProtocol = "TCP" | "UDP" | "Any"; +export type PcProtocol = 'TCP' | 'UDP' | 'Any'; /** * Defines values for PcStatus. @@ -15598,7 +15750,7 @@ export type PcProtocol = "TCP" | "UDP" | "Any"; * @readonly * @enum {string} */ -export type PcStatus = "NotStarted" | "Running" | "Stopped" | "Error" | "Unknown"; +export type PcStatus = 'NotStarted' | 'Running' | 'Stopped' | 'Error' | 'Unknown'; /** * Defines values for PcError. @@ -15607,12 +15759,7 @@ export type PcStatus = "NotStarted" | "Running" | "Stopped" | "Error" | "Unknown * @readonly * @enum {string} */ -export type PcError = - | "InternalError" - | "AgentStopped" - | "CaptureFailed" - | "LocalFileFailed" - | "StorageFailed"; +export type PcError = 'InternalError' | 'AgentStopped' | 'CaptureFailed' | 'LocalFileFailed' | 'StorageFailed'; /** * Defines values for Protocol. @@ -15620,7 +15767,7 @@ export type PcError = * @readonly * @enum {string} */ -export type Protocol = "Tcp" | "Http" | "Https" | "Icmp"; +export type Protocol = 'Tcp' | 'Http' | 'Https' | 'Icmp'; /** * Defines values for HTTPMethod. @@ -15628,7 +15775,7 @@ export type Protocol = "Tcp" | "Http" | "Https" | "Icmp"; * @readonly * @enum {string} */ -export type HTTPMethod = "Get"; +export type HTTPMethod = 'Get'; /** * Defines values for Origin. @@ -15636,7 +15783,7 @@ export type HTTPMethod = "Get"; * @readonly * @enum {string} */ -export type Origin = "Local" | "Inbound" | "Outbound"; +export type Origin = 'Local' | 'Inbound' | 'Outbound'; /** * Defines values for Severity. @@ -15644,7 +15791,7 @@ export type Origin = "Local" | "Inbound" | "Outbound"; * @readonly * @enum {string} */ -export type Severity = "Error" | "Warning"; +export type Severity = 'Error' | 'Warning'; /** * Defines values for IssueType. @@ -15653,16 +15800,7 @@ export type Severity = "Error" | "Warning"; * @readonly * @enum {string} */ -export type IssueType = - | "Unknown" - | "AgentStopped" - | "GuestFirewall" - | "DnsResolution" - | "SocketBind" - | "NetworkSecurityRule" - | "UserDefinedRoute" - | "PortThrottled" - | "Platform"; +export type IssueType = 'Unknown' | 'AgentStopped' | 'GuestFirewall' | 'DnsResolution' | 'SocketBind' | 'NetworkSecurityRule' | 'UserDefinedRoute' | 'PortThrottled' | 'Platform'; /** * Defines values for ConnectionStatus. @@ -15670,7 +15808,7 @@ export type IssueType = * @readonly * @enum {string} */ -export type ConnectionStatus = "Unknown" | "Connected" | "Disconnected" | "Degraded"; +export type ConnectionStatus = 'Unknown' | 'Connected' | 'Disconnected' | 'Degraded'; /** * Defines values for VerbosityLevel. @@ -15678,7 +15816,7 @@ export type ConnectionStatus = "Unknown" | "Connected" | "Disconnected" | "Degra * @readonly * @enum {string} */ -export type VerbosityLevel = "Normal" | "Minimum" | "Full"; +export type VerbosityLevel = 'Normal' | 'Minimum' | 'Full'; /** * Defines values for EndpointType. @@ -15687,13 +15825,7 @@ export type VerbosityLevel = "Normal" | "Minimum" | "Full"; * @readonly * @enum {string} */ -export type EndpointType = - | "AzureVM" - | "AzureVNet" - | "AzureSubnet" - | "ExternalAddress" - | "MMAWorkspaceMachine" - | "MMAWorkspaceNetwork"; +export type EndpointType = 'AzureVM' | 'AzureVNet' | 'AzureSubnet' | 'ExternalAddress' | 'MMAWorkspaceMachine' | 'MMAWorkspaceNetwork'; /** * Defines values for ConnectionMonitorEndpointFilterType. @@ -15701,7 +15833,7 @@ export type EndpointType = * @readonly * @enum {string} */ -export type ConnectionMonitorEndpointFilterType = "Include"; +export type ConnectionMonitorEndpointFilterType = 'Include'; /** * Defines values for ConnectionMonitorEndpointFilterItemType. @@ -15709,7 +15841,7 @@ export type ConnectionMonitorEndpointFilterType = "Include"; * @readonly * @enum {string} */ -export type ConnectionMonitorEndpointFilterItemType = "AgentAddress"; +export type ConnectionMonitorEndpointFilterItemType = 'AgentAddress'; /** * Defines values for CoverageLevel. @@ -15717,13 +15849,7 @@ export type ConnectionMonitorEndpointFilterItemType = "AgentAddress"; * @readonly * @enum {string} */ -export type CoverageLevel = - | "Default" - | "Low" - | "BelowAverage" - | "Average" - | "AboveAverage" - | "Full"; +export type CoverageLevel = 'Default' | 'Low' | 'BelowAverage' | 'Average' | 'AboveAverage' | 'Full'; /** * Defines values for ConnectionMonitorTestConfigurationProtocol. @@ -15731,7 +15857,7 @@ export type CoverageLevel = * @readonly * @enum {string} */ -export type ConnectionMonitorTestConfigurationProtocol = "Tcp" | "Http" | "Icmp"; +export type ConnectionMonitorTestConfigurationProtocol = 'Tcp' | 'Http' | 'Icmp'; /** * Defines values for PreferredIPVersion. @@ -15739,7 +15865,7 @@ export type ConnectionMonitorTestConfigurationProtocol = "Tcp" | "Http" | "Icmp" * @readonly * @enum {string} */ -export type PreferredIPVersion = "IPv4" | "IPv6"; +export type PreferredIPVersion = 'IPv4' | 'IPv6'; /** * Defines values for HTTPConfigurationMethod. @@ -15747,7 +15873,7 @@ export type PreferredIPVersion = "IPv4" | "IPv6"; * @readonly * @enum {string} */ -export type HTTPConfigurationMethod = "Get" | "Post"; +export type HTTPConfigurationMethod = 'Get' | 'Post'; /** * Defines values for DestinationPortBehavior. @@ -15755,7 +15881,7 @@ export type HTTPConfigurationMethod = "Get" | "Post"; * @readonly * @enum {string} */ -export type DestinationPortBehavior = "None" | "ListenIfAvailable"; +export type DestinationPortBehavior = 'None' | 'ListenIfAvailable'; /** * Defines values for OutputType. @@ -15763,7 +15889,7 @@ export type DestinationPortBehavior = "None" | "ListenIfAvailable"; * @readonly * @enum {string} */ -export type OutputType = "Workspace"; +export type OutputType = 'Workspace'; /** * Defines values for ConnectionState. @@ -15771,7 +15897,7 @@ export type OutputType = "Workspace"; * @readonly * @enum {string} */ -export type ConnectionState = "Reachable" | "Unreachable" | "Unknown"; +export type ConnectionState = 'Reachable' | 'Unreachable' | 'Unknown'; /** * Defines values for EvaluationState. @@ -15779,7 +15905,7 @@ export type ConnectionState = "Reachable" | "Unreachable" | "Unknown"; * @readonly * @enum {string} */ -export type EvaluationState = "NotStarted" | "InProgress" | "Completed"; +export type EvaluationState = 'NotStarted' | 'InProgress' | 'Completed'; /** * Defines values for ConnectionMonitorType. @@ -15787,7 +15913,7 @@ export type EvaluationState = "NotStarted" | "InProgress" | "Completed"; * @readonly * @enum {string} */ -export type ConnectionMonitorType = "MultiEndpoint" | "SingleSourceDestination"; +export type ConnectionMonitorType = 'MultiEndpoint' | 'SingleSourceDestination'; /** * Defines values for ConnectionMonitorSourceStatus. @@ -15795,7 +15921,7 @@ export type ConnectionMonitorType = "MultiEndpoint" | "SingleSourceDestination"; * @readonly * @enum {string} */ -export type ConnectionMonitorSourceStatus = "Unknown" | "Active" | "Inactive"; +export type ConnectionMonitorSourceStatus = 'Unknown' | 'Active' | 'Inactive'; /** * Defines values for PublicIPPrefixSkuName. @@ -15803,7 +15929,7 @@ export type ConnectionMonitorSourceStatus = "Unknown" | "Active" | "Inactive"; * @readonly * @enum {string} */ -export type PublicIPPrefixSkuName = "Standard"; +export type PublicIPPrefixSkuName = 'Standard'; /** * Defines values for PublicIPPrefixSkuTier. @@ -15811,7 +15937,7 @@ export type PublicIPPrefixSkuName = "Standard"; * @readonly * @enum {string} */ -export type PublicIPPrefixSkuTier = "Regional" | "Global"; +export type PublicIPPrefixSkuTier = 'Regional' | 'Global'; /** * Defines values for SecurityProviderName. @@ -15819,7 +15945,7 @@ export type PublicIPPrefixSkuTier = "Regional" | "Global"; * @readonly * @enum {string} */ -export type SecurityProviderName = "ZScaler" | "IBoss" | "Checkpoint"; +export type SecurityProviderName = 'ZScaler' | 'IBoss' | 'Checkpoint'; /** * Defines values for SecurityPartnerProviderConnectionStatus. @@ -15827,11 +15953,7 @@ export type SecurityProviderName = "ZScaler" | "IBoss" | "Checkpoint"; * @readonly * @enum {string} */ -export type SecurityPartnerProviderConnectionStatus = - | "Unknown" - | "PartiallyConnected" - | "Connected" - | "NotConnected"; +export type SecurityPartnerProviderConnectionStatus = 'Unknown' | 'PartiallyConnected' | 'Connected' | 'NotConnected'; /** * Defines values for VirtualNetworkPeeringState. @@ -15839,7 +15961,32 @@ export type SecurityPartnerProviderConnectionStatus = * @readonly * @enum {string} */ -export type VirtualNetworkPeeringState = "Initiated" | "Connected" | "Disconnected"; +export type VirtualNetworkPeeringState = 'Initiated' | 'Connected' | 'Disconnected'; + +/** + * Defines values for VirtualNetworkPeeringLevel. + * Possible values include: 'FullyInSync', 'RemoteNotInSync', 'LocalNotInSync', + * 'LocalAndRemoteNotInSync' + * @readonly + * @enum {string} + */ +export type VirtualNetworkPeeringLevel = 'FullyInSync' | 'RemoteNotInSync' | 'LocalNotInSync' | 'LocalAndRemoteNotInSync'; + +/** + * Defines values for VpnNatRuleType. + * Possible values include: 'Static', 'Dynamic' + * @readonly + * @enum {string} + */ +export type VpnNatRuleType = 'Static' | 'Dynamic'; + +/** + * Defines values for VpnNatRuleMode. + * Possible values include: 'EgressSnat', 'IngressSnat' + * @readonly + * @enum {string} + */ +export type VpnNatRuleMode = 'EgressSnat' | 'IngressSnat'; /** * Defines values for VirtualNetworkGatewayType. @@ -15847,7 +15994,7 @@ export type VirtualNetworkPeeringState = "Initiated" | "Connected" | "Disconnect * @readonly * @enum {string} */ -export type VirtualNetworkGatewayType = "Vpn" | "ExpressRoute" | "LocalGateway"; +export type VirtualNetworkGatewayType = 'Vpn' | 'ExpressRoute' | 'LocalGateway'; /** * Defines values for VpnType. @@ -15855,7 +16002,7 @@ export type VirtualNetworkGatewayType = "Vpn" | "ExpressRoute" | "LocalGateway"; * @readonly * @enum {string} */ -export type VpnType = "PolicyBased" | "RouteBased"; +export type VpnType = 'PolicyBased' | 'RouteBased'; /** * Defines values for VpnGatewayGeneration. @@ -15863,7 +16010,7 @@ export type VpnType = "PolicyBased" | "RouteBased"; * @readonly * @enum {string} */ -export type VpnGatewayGeneration = "None" | "Generation1" | "Generation2"; +export type VpnGatewayGeneration = 'None' | 'Generation1' | 'Generation2'; /** * Defines values for VirtualNetworkGatewaySkuName. @@ -15873,24 +16020,7 @@ export type VpnGatewayGeneration = "None" | "Generation1" | "Generation2"; * @readonly * @enum {string} */ -export type VirtualNetworkGatewaySkuName = - | "Basic" - | "HighPerformance" - | "Standard" - | "UltraPerformance" - | "VpnGw1" - | "VpnGw2" - | "VpnGw3" - | "VpnGw4" - | "VpnGw5" - | "VpnGw1AZ" - | "VpnGw2AZ" - | "VpnGw3AZ" - | "VpnGw4AZ" - | "VpnGw5AZ" - | "ErGw1AZ" - | "ErGw2AZ" - | "ErGw3AZ"; +export type VirtualNetworkGatewaySkuName = 'Basic' | 'HighPerformance' | 'Standard' | 'UltraPerformance' | 'VpnGw1' | 'VpnGw2' | 'VpnGw3' | 'VpnGw4' | 'VpnGw5' | 'VpnGw1AZ' | 'VpnGw2AZ' | 'VpnGw3AZ' | 'VpnGw4AZ' | 'VpnGw5AZ' | 'ErGw1AZ' | 'ErGw2AZ' | 'ErGw3AZ'; /** * Defines values for VirtualNetworkGatewaySkuTier. @@ -15900,24 +16030,7 @@ export type VirtualNetworkGatewaySkuName = * @readonly * @enum {string} */ -export type VirtualNetworkGatewaySkuTier = - | "Basic" - | "HighPerformance" - | "Standard" - | "UltraPerformance" - | "VpnGw1" - | "VpnGw2" - | "VpnGw3" - | "VpnGw4" - | "VpnGw5" - | "VpnGw1AZ" - | "VpnGw2AZ" - | "VpnGw3AZ" - | "VpnGw4AZ" - | "VpnGw5AZ" - | "ErGw1AZ" - | "ErGw2AZ" - | "ErGw3AZ"; +export type VirtualNetworkGatewaySkuTier = 'Basic' | 'HighPerformance' | 'Standard' | 'UltraPerformance' | 'VpnGw1' | 'VpnGw2' | 'VpnGw3' | 'VpnGw4' | 'VpnGw5' | 'VpnGw1AZ' | 'VpnGw2AZ' | 'VpnGw3AZ' | 'VpnGw4AZ' | 'VpnGw5AZ' | 'ErGw1AZ' | 'ErGw2AZ' | 'ErGw3AZ'; /** * Defines values for VpnClientProtocol. @@ -15925,7 +16038,7 @@ export type VirtualNetworkGatewaySkuTier = * @readonly * @enum {string} */ -export type VpnClientProtocol = "IkeV2" | "SSTP" | "OpenVPN"; +export type VpnClientProtocol = 'IkeV2' | 'SSTP' | 'OpenVPN'; /** * Defines values for VpnAuthenticationType. @@ -15933,7 +16046,7 @@ export type VpnClientProtocol = "IkeV2" | "SSTP" | "OpenVPN"; * @readonly * @enum {string} */ -export type VpnAuthenticationType = "Certificate" | "Radius" | "AAD"; +export type VpnAuthenticationType = 'Certificate' | 'Radius' | 'AAD'; /** * Defines values for IpsecEncryption. @@ -15942,16 +16055,7 @@ export type VpnAuthenticationType = "Certificate" | "Radius" | "AAD"; * @readonly * @enum {string} */ -export type IpsecEncryption = - | "None" - | "DES" - | "DES3" - | "AES128" - | "AES192" - | "AES256" - | "GCMAES128" - | "GCMAES192" - | "GCMAES256"; +export type IpsecEncryption = 'None' | 'DES' | 'DES3' | 'AES128' | 'AES192' | 'AES256' | 'GCMAES128' | 'GCMAES192' | 'GCMAES256'; /** * Defines values for IpsecIntegrity. @@ -15959,7 +16063,7 @@ export type IpsecEncryption = * @readonly * @enum {string} */ -export type IpsecIntegrity = "MD5" | "SHA1" | "SHA256" | "GCMAES128" | "GCMAES192" | "GCMAES256"; +export type IpsecIntegrity = 'MD5' | 'SHA1' | 'SHA256' | 'GCMAES128' | 'GCMAES192' | 'GCMAES256'; /** * Defines values for IkeEncryption. @@ -15967,14 +16071,7 @@ export type IpsecIntegrity = "MD5" | "SHA1" | "SHA256" | "GCMAES128" | "GCMAES19 * @readonly * @enum {string} */ -export type IkeEncryption = - | "DES" - | "DES3" - | "AES128" - | "AES192" - | "AES256" - | "GCMAES256" - | "GCMAES128"; +export type IkeEncryption = 'DES' | 'DES3' | 'AES128' | 'AES192' | 'AES256' | 'GCMAES256' | 'GCMAES128'; /** * Defines values for IkeIntegrity. @@ -15982,7 +16079,7 @@ export type IkeEncryption = * @readonly * @enum {string} */ -export type IkeIntegrity = "MD5" | "SHA1" | "SHA256" | "SHA384" | "GCMAES256" | "GCMAES128"; +export type IkeIntegrity = 'MD5' | 'SHA1' | 'SHA256' | 'SHA384' | 'GCMAES256' | 'GCMAES128'; /** * Defines values for DhGroup. @@ -15991,15 +16088,7 @@ export type IkeIntegrity = "MD5" | "SHA1" | "SHA256" | "SHA384" | "GCMAES256" | * @readonly * @enum {string} */ -export type DhGroup = - | "None" - | "DHGroup1" - | "DHGroup2" - | "DHGroup14" - | "DHGroup2048" - | "ECP256" - | "ECP384" - | "DHGroup24"; +export type DhGroup = 'None' | 'DHGroup1' | 'DHGroup2' | 'DHGroup14' | 'DHGroup2048' | 'ECP256' | 'ECP384' | 'DHGroup24'; /** * Defines values for PfsGroup. @@ -16008,16 +16097,7 @@ export type DhGroup = * @readonly * @enum {string} */ -export type PfsGroup = - | "None" - | "PFS1" - | "PFS2" - | "PFS2048" - | "ECP256" - | "ECP384" - | "PFS24" - | "PFS14" - | "PFSMM"; +export type PfsGroup = 'None' | 'PFS1' | 'PFS2' | 'PFS2048' | 'ECP256' | 'ECP384' | 'PFS24' | 'PFS14' | 'PFSMM'; /** * Defines values for BgpPeerState. @@ -16025,7 +16105,7 @@ export type PfsGroup = * @readonly * @enum {string} */ -export type BgpPeerState = "Unknown" | "Stopped" | "Idle" | "Connecting" | "Connected"; +export type BgpPeerState = 'Unknown' | 'Stopped' | 'Idle' | 'Connecting' | 'Connected'; /** * Defines values for ProcessorArchitecture. @@ -16033,7 +16113,7 @@ export type BgpPeerState = "Unknown" | "Stopped" | "Idle" | "Connecting" | "Conn * @readonly * @enum {string} */ -export type ProcessorArchitecture = "Amd64" | "X86"; +export type ProcessorArchitecture = 'Amd64' | 'X86'; /** * Defines values for VirtualNetworkGatewayConnectionStatus. @@ -16041,11 +16121,7 @@ export type ProcessorArchitecture = "Amd64" | "X86"; * @readonly * @enum {string} */ -export type VirtualNetworkGatewayConnectionStatus = - | "Unknown" - | "Connecting" - | "Connected" - | "NotConnected"; +export type VirtualNetworkGatewayConnectionStatus = 'Unknown' | 'Connecting' | 'Connected' | 'NotConnected'; /** * Defines values for VirtualNetworkGatewayConnectionType. @@ -16053,11 +16129,7 @@ export type VirtualNetworkGatewayConnectionStatus = * @readonly * @enum {string} */ -export type VirtualNetworkGatewayConnectionType = - | "IPsec" - | "Vnet2Vnet" - | "ExpressRoute" - | "VPNClient"; +export type VirtualNetworkGatewayConnectionType = 'IPsec' | 'Vnet2Vnet' | 'ExpressRoute' | 'VPNClient'; /** * Defines values for VirtualNetworkGatewayConnectionProtocol. @@ -16065,7 +16137,7 @@ export type VirtualNetworkGatewayConnectionType = * @readonly * @enum {string} */ -export type VirtualNetworkGatewayConnectionProtocol = "IKEv2" | "IKEv1"; +export type VirtualNetworkGatewayConnectionProtocol = 'IKEv2' | 'IKEv1'; /** * Defines values for VirtualNetworkGatewayConnectionMode. @@ -16073,7 +16145,7 @@ export type VirtualNetworkGatewayConnectionProtocol = "IKEv2" | "IKEv1"; * @readonly * @enum {string} */ -export type VirtualNetworkGatewayConnectionMode = "Default" | "ResponderOnly" | "InitiatorOnly"; +export type VirtualNetworkGatewayConnectionMode = 'Default' | 'ResponderOnly' | 'InitiatorOnly'; /** * Defines values for OfficeTrafficCategory. @@ -16081,7 +16153,7 @@ export type VirtualNetworkGatewayConnectionMode = "Default" | "ResponderOnly" | * @readonly * @enum {string} */ -export type OfficeTrafficCategory = "Optimize" | "OptimizeAndAllow" | "All" | "None"; +export type OfficeTrafficCategory = 'Optimize' | 'OptimizeAndAllow' | 'All' | 'None'; /** * Defines values for RoutingState. @@ -16089,47 +16161,39 @@ export type OfficeTrafficCategory = "Optimize" | "OptimizeAndAllow" | "All" | "N * @readonly * @enum {string} */ -export type RoutingState = "None" | "Provisioned" | "Provisioning" | "Failed"; +export type RoutingState = 'None' | 'Provisioned' | 'Provisioning' | 'Failed'; /** - * Defines values for HubBgpConnectionStatus. - * Possible values include: 'Unknown', 'Connecting', 'Connected', 'NotConnected' + * Defines values for PreferredRoutingGateway. + * Possible values include: 'ExpressRoute', 'VpnGateway', 'None' * @readonly * @enum {string} */ -export type HubBgpConnectionStatus = "Unknown" | "Connecting" | "Connected" | "NotConnected"; +export type PreferredRoutingGateway = 'ExpressRoute' | 'VpnGateway' | 'None'; /** - * Defines values for VpnConnectionStatus. + * Defines values for HubBgpConnectionStatus. * Possible values include: 'Unknown', 'Connecting', 'Connected', 'NotConnected' * @readonly * @enum {string} */ -export type VpnConnectionStatus = "Unknown" | "Connecting" | "Connected" | "NotConnected"; - -/** - * Defines values for VpnLinkConnectionMode. - * Possible values include: 'Default', 'ResponderOnly', 'InitiatorOnly' - * @readonly - * @enum {string} - */ -export type VpnLinkConnectionMode = "Default" | "ResponderOnly" | "InitiatorOnly"; +export type HubBgpConnectionStatus = 'Unknown' | 'Connecting' | 'Connected' | 'NotConnected'; /** - * Defines values for VpnNatRuleType. - * Possible values include: 'Static', 'Dynamic' + * Defines values for VpnConnectionStatus. + * Possible values include: 'Unknown', 'Connecting', 'Connected', 'NotConnected' * @readonly * @enum {string} */ -export type VpnNatRuleType = "Static" | "Dynamic"; +export type VpnConnectionStatus = 'Unknown' | 'Connecting' | 'Connected' | 'NotConnected'; /** - * Defines values for VpnNatRuleMode. - * Possible values include: 'EgressSnat', 'IngressSnat' + * Defines values for VpnLinkConnectionMode. + * Possible values include: 'Default', 'ResponderOnly', 'InitiatorOnly' * @readonly * @enum {string} */ -export type VpnNatRuleMode = "EgressSnat" | "IngressSnat"; +export type VpnLinkConnectionMode = 'Default' | 'ResponderOnly' | 'InitiatorOnly'; /** * Defines values for VirtualWanSecurityProviderType. @@ -16137,7 +16201,7 @@ export type VpnNatRuleMode = "EgressSnat" | "IngressSnat"; * @readonly * @enum {string} */ -export type VirtualWanSecurityProviderType = "External" | "Native"; +export type VirtualWanSecurityProviderType = 'External' | 'Native'; /** * Defines values for TunnelConnectionStatus. @@ -16145,7 +16209,7 @@ export type VirtualWanSecurityProviderType = "External" | "Native"; * @readonly * @enum {string} */ -export type TunnelConnectionStatus = "Unknown" | "Connecting" | "Connected" | "NotConnected"; +export type TunnelConnectionStatus = 'Unknown' | 'Connecting' | 'Connected' | 'NotConnected'; /** * Defines values for HubVirtualNetworkConnectionStatus. @@ -16153,11 +16217,7 @@ export type TunnelConnectionStatus = "Unknown" | "Connecting" | "Connected" | "N * @readonly * @enum {string} */ -export type HubVirtualNetworkConnectionStatus = - | "Unknown" - | "Connecting" - | "Connected" - | "NotConnected"; +export type HubVirtualNetworkConnectionStatus = 'Unknown' | 'Connecting' | 'Connected' | 'NotConnected'; /** * Defines values for VpnGatewayTunnelingProtocol. @@ -16165,7 +16225,7 @@ export type HubVirtualNetworkConnectionStatus = * @readonly * @enum {string} */ -export type VpnGatewayTunnelingProtocol = "IkeV2" | "OpenVPN"; +export type VpnGatewayTunnelingProtocol = 'IkeV2' | 'OpenVPN'; /** * Defines values for WebApplicationFirewallEnabledState. @@ -16173,7 +16233,7 @@ export type VpnGatewayTunnelingProtocol = "IkeV2" | "OpenVPN"; * @readonly * @enum {string} */ -export type WebApplicationFirewallEnabledState = "Disabled" | "Enabled"; +export type WebApplicationFirewallEnabledState = 'Disabled' | 'Enabled'; /** * Defines values for WebApplicationFirewallMode. @@ -16181,7 +16241,7 @@ export type WebApplicationFirewallEnabledState = "Disabled" | "Enabled"; * @readonly * @enum {string} */ -export type WebApplicationFirewallMode = "Prevention" | "Detection"; +export type WebApplicationFirewallMode = 'Prevention' | 'Detection'; /** * Defines values for WebApplicationFirewallRuleType. @@ -16189,7 +16249,7 @@ export type WebApplicationFirewallMode = "Prevention" | "Detection"; * @readonly * @enum {string} */ -export type WebApplicationFirewallRuleType = "MatchRule" | "Invalid"; +export type WebApplicationFirewallRuleType = 'MatchRule' | 'Invalid'; /** * Defines values for WebApplicationFirewallMatchVariable. @@ -16198,15 +16258,7 @@ export type WebApplicationFirewallRuleType = "MatchRule" | "Invalid"; * @readonly * @enum {string} */ -export type WebApplicationFirewallMatchVariable = - | "RemoteAddr" - | "RequestMethod" - | "QueryString" - | "PostArgs" - | "RequestUri" - | "RequestHeaders" - | "RequestBody" - | "RequestCookies"; +export type WebApplicationFirewallMatchVariable = 'RemoteAddr' | 'RequestMethod' | 'QueryString' | 'PostArgs' | 'RequestUri' | 'RequestHeaders' | 'RequestBody' | 'RequestCookies'; /** * Defines values for WebApplicationFirewallOperator. @@ -16215,18 +16267,7 @@ export type WebApplicationFirewallMatchVariable = * @readonly * @enum {string} */ -export type WebApplicationFirewallOperator = - | "IPMatch" - | "Equal" - | "Contains" - | "LessThan" - | "GreaterThan" - | "LessThanOrEqual" - | "GreaterThanOrEqual" - | "BeginsWith" - | "EndsWith" - | "Regex" - | "GeoMatch"; +export type WebApplicationFirewallOperator = 'IPMatch' | 'Equal' | 'Contains' | 'LessThan' | 'GreaterThan' | 'LessThanOrEqual' | 'GreaterThanOrEqual' | 'BeginsWith' | 'EndsWith' | 'Regex' | 'GeoMatch'; /** * Defines values for WebApplicationFirewallTransform. @@ -16235,13 +16276,7 @@ export type WebApplicationFirewallOperator = * @readonly * @enum {string} */ -export type WebApplicationFirewallTransform = - | "Lowercase" - | "Trim" - | "UrlDecode" - | "UrlEncode" - | "RemoveNulls" - | "HtmlEntityDecode"; +export type WebApplicationFirewallTransform = 'Lowercase' | 'Trim' | 'UrlDecode' | 'UrlEncode' | 'RemoveNulls' | 'HtmlEntityDecode'; /** * Defines values for WebApplicationFirewallAction. @@ -16249,7 +16284,7 @@ export type WebApplicationFirewallTransform = * @readonly * @enum {string} */ -export type WebApplicationFirewallAction = "Allow" | "Block" | "Log"; +export type WebApplicationFirewallAction = 'Allow' | 'Block' | 'Log'; /** * Defines values for WebApplicationFirewallPolicyResourceState. @@ -16257,13 +16292,7 @@ export type WebApplicationFirewallAction = "Allow" | "Block" | "Log"; * @readonly * @enum {string} */ -export type WebApplicationFirewallPolicyResourceState = - | "Creating" - | "Enabling" - | "Enabled" - | "Disabling" - | "Disabled" - | "Deleting"; +export type WebApplicationFirewallPolicyResourceState = 'Creating' | 'Enabling' | 'Enabled' | 'Disabling' | 'Disabled' | 'Deleting'; /** * Defines values for OwaspCrsExclusionEntryMatchVariable. @@ -16271,10 +16300,7 @@ export type WebApplicationFirewallPolicyResourceState = * @readonly * @enum {string} */ -export type OwaspCrsExclusionEntryMatchVariable = - | "RequestHeaderNames" - | "RequestCookieNames" - | "RequestArgNames"; +export type OwaspCrsExclusionEntryMatchVariable = 'RequestHeaderNames' | 'RequestCookieNames' | 'RequestArgNames'; /** * Defines values for OwaspCrsExclusionEntrySelectorMatchOperator. @@ -16282,12 +16308,7 @@ export type OwaspCrsExclusionEntryMatchVariable = * @readonly * @enum {string} */ -export type OwaspCrsExclusionEntrySelectorMatchOperator = - | "Equals" - | "Contains" - | "StartsWith" - | "EndsWith" - | "EqualsAny"; +export type OwaspCrsExclusionEntrySelectorMatchOperator = 'Equals' | 'Contains' | 'StartsWith' | 'EndsWith' | 'EqualsAny'; /** * Defines values for ManagedRuleEnabledState. @@ -16295,7 +16316,15 @@ export type OwaspCrsExclusionEntrySelectorMatchOperator = * @readonly * @enum {string} */ -export type ManagedRuleEnabledState = "Disabled"; +export type ManagedRuleEnabledState = 'Disabled'; + +/** + * Defines values for SyncRemoteAddressSpace. + * Possible values include: 'true' + * @readonly + * @enum {string} + */ +export type SyncRemoteAddressSpace = 'true'; /** * Contains response data for the get operation. @@ -16305,16 +16334,16 @@ export type ApplicationGatewaysGetResponse = ApplicationGateway & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: ApplicationGateway; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ApplicationGateway; + }; }; /** @@ -16325,16 +16354,16 @@ export type ApplicationGatewaysCreateOrUpdateResponse = ApplicationGateway & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: ApplicationGateway; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ApplicationGateway; + }; }; /** @@ -16345,16 +16374,16 @@ export type ApplicationGatewaysUpdateTagsResponse = ApplicationGateway & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: ApplicationGateway; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ApplicationGateway; + }; }; /** @@ -16365,16 +16394,16 @@ export type ApplicationGatewaysListResponse = ApplicationGatewayListResult & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: ApplicationGatewayListResult; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ApplicationGatewayListResult; + }; }; /** @@ -16385,16 +16414,16 @@ export type ApplicationGatewaysListAllResponse = ApplicationGatewayListResult & * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: ApplicationGatewayListResult; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ApplicationGatewayListResult; + }; }; /** @@ -16405,16 +16434,16 @@ export type ApplicationGatewaysBackendHealthResponse = ApplicationGatewayBackend * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: ApplicationGatewayBackendHealth; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ApplicationGatewayBackendHealth; + }; }; /** @@ -16425,16 +16454,16 @@ export type ApplicationGatewaysBackendHealthOnDemandResponse = ApplicationGatewa * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: ApplicationGatewayBackendHealthOnDemand; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ApplicationGatewayBackendHealthOnDemand; + }; }; /** @@ -16445,16 +16474,16 @@ export type ApplicationGatewaysListAvailableServerVariablesResponse = Array */ - putBastionShareableLink( - resourceGroupName: string, - bastionHostName: string, - bslRequest: Models.BastionShareableLinkListRequest, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginPutBastionShareableLink( - resourceGroupName, - bastionHostName, - bslRequest, - options - ).then((lroPoller) => lroPoller.pollUntilFinished()) as Promise< - Models.PutBastionShareableLinkResponse - >; + putBastionShareableLink(resourceGroupName: string, bastionHostName: string, bslRequest: Models.BastionShareableLinkListRequest, options?: msRest.RequestOptionsBase): Promise { + return this.beginPutBastionShareableLink(resourceGroupName,bastionHostName,bslRequest,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } /** @@ -297,18 +271,9 @@ class NetworkManagementClient extends NetworkManagementClientContext { * @param [options] The optional parameters * @returns Promise */ - deleteBastionShareableLink( - resourceGroupName: string, - bastionHostName: string, - bslRequest: Models.BastionShareableLinkListRequest, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginDeleteBastionShareableLink( - resourceGroupName, - bastionHostName, - bslRequest, - options - ).then((lroPoller) => lroPoller.pollUntilFinished()); + deleteBastionShareableLink(resourceGroupName: string, bastionHostName: string, bslRequest: Models.BastionShareableLinkListRequest, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteBastionShareableLink(resourceGroupName,bastionHostName,bslRequest,options) + .then(lroPoller => lroPoller.pollUntilFinished()); } /** @@ -319,24 +284,14 @@ class NetworkManagementClient extends NetworkManagementClientContext { * @param [options] The optional parameters * @returns Promise */ - getBastionShareableLink( - resourceGroupName: string, - bastionHostName: string, - bslRequest: Models.BastionShareableLinkListRequest, - options?: msRest.RequestOptionsBase - ): Promise; + getBastionShareableLink(resourceGroupName: string, bastionHostName: string, bslRequest: Models.BastionShareableLinkListRequest, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName The name of the resource group. * @param bastionHostName The name of the Bastion Host. * @param bslRequest Post request for all the Bastion Shareable Link endpoints. * @param callback The callback */ - getBastionShareableLink( - resourceGroupName: string, - bastionHostName: string, - bslRequest: Models.BastionShareableLinkListRequest, - callback: msRest.ServiceCallback - ): void; + getBastionShareableLink(resourceGroupName: string, bastionHostName: string, bslRequest: Models.BastionShareableLinkListRequest, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The name of the resource group. * @param bastionHostName The name of the Bastion Host. @@ -344,22 +299,8 @@ class NetworkManagementClient extends NetworkManagementClientContext { * @param options The optional parameters * @param callback The callback */ - getBastionShareableLink( - resourceGroupName: string, - bastionHostName: string, - bslRequest: Models.BastionShareableLinkListRequest, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - getBastionShareableLink( - resourceGroupName: string, - bastionHostName: string, - bslRequest: Models.BastionShareableLinkListRequest, - options?: - | msRest.RequestOptionsBase - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + getBastionShareableLink(resourceGroupName: string, bastionHostName: string, bslRequest: Models.BastionShareableLinkListRequest, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getBastionShareableLink(resourceGroupName: string, bastionHostName: string, bslRequest: Models.BastionShareableLinkListRequest, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.sendOperationRequest( { resourceGroupName, @@ -368,8 +309,7 @@ class NetworkManagementClient extends NetworkManagementClientContext { options }, getBastionShareableLinkOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -379,18 +319,9 @@ class NetworkManagementClient extends NetworkManagementClientContext { * @param [options] The optional parameters * @returns Promise */ - getActiveSessions( - resourceGroupName: string, - bastionHostName: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginGetActiveSessions( - resourceGroupName, - bastionHostName, - options - ).then((lroPoller) => lroPoller.pollUntilFinished()) as Promise< - Models.GetActiveSessionsResponse - >; + getActiveSessions(resourceGroupName: string, bastionHostName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginGetActiveSessions(resourceGroupName,bastionHostName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } /** @@ -401,24 +332,14 @@ class NetworkManagementClient extends NetworkManagementClientContext { * @param [options] The optional parameters * @returns Promise */ - disconnectActiveSessions( - resourceGroupName: string, - bastionHostName: string, - sessionIds: Models.SessionIds, - options?: msRest.RequestOptionsBase - ): Promise; + disconnectActiveSessions(resourceGroupName: string, bastionHostName: string, sessionIds: Models.SessionIds, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName The name of the resource group. * @param bastionHostName The name of the Bastion Host. * @param sessionIds The list of sessionids to disconnect. * @param callback The callback */ - disconnectActiveSessions( - resourceGroupName: string, - bastionHostName: string, - sessionIds: Models.SessionIds, - callback: msRest.ServiceCallback - ): void; + disconnectActiveSessions(resourceGroupName: string, bastionHostName: string, sessionIds: Models.SessionIds, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The name of the resource group. * @param bastionHostName The name of the Bastion Host. @@ -426,20 +347,8 @@ class NetworkManagementClient extends NetworkManagementClientContext { * @param options The optional parameters * @param callback The callback */ - disconnectActiveSessions( - resourceGroupName: string, - bastionHostName: string, - sessionIds: Models.SessionIds, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - disconnectActiveSessions( - resourceGroupName: string, - bastionHostName: string, - sessionIds: Models.SessionIds, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + disconnectActiveSessions(resourceGroupName: string, bastionHostName: string, sessionIds: Models.SessionIds, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + disconnectActiveSessions(resourceGroupName: string, bastionHostName: string, sessionIds: Models.SessionIds, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.sendOperationRequest( { resourceGroupName, @@ -448,8 +357,7 @@ class NetworkManagementClient extends NetworkManagementClientContext { options }, disconnectActiveSessionsOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -460,22 +368,14 @@ class NetworkManagementClient extends NetworkManagementClientContext { * @param [options] The optional parameters * @returns Promise */ - checkDnsNameAvailability( - location: string, - domainNameLabel: string, - options?: msRest.RequestOptionsBase - ): Promise; + checkDnsNameAvailability(location: string, domainNameLabel: string, options?: msRest.RequestOptionsBase): Promise; /** * @param location The location of the domain name. * @param domainNameLabel The domain name to be verified. It must conform to the following regular * expression: ^[a-z][a-z0-9-]{1,61}[a-z0-9]$. * @param callback The callback */ - checkDnsNameAvailability( - location: string, - domainNameLabel: string, - callback: msRest.ServiceCallback - ): void; + checkDnsNameAvailability(location: string, domainNameLabel: string, callback: msRest.ServiceCallback): void; /** * @param location The location of the domain name. * @param domainNameLabel The domain name to be verified. It must conform to the following regular @@ -483,18 +383,8 @@ class NetworkManagementClient extends NetworkManagementClientContext { * @param options The optional parameters * @param callback The callback */ - checkDnsNameAvailability( - location: string, - domainNameLabel: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - checkDnsNameAvailability( - location: string, - domainNameLabel: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + checkDnsNameAvailability(location: string, domainNameLabel: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + checkDnsNameAvailability(location: string, domainNameLabel: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.sendOperationRequest( { location, @@ -502,8 +392,7 @@ class NetworkManagementClient extends NetworkManagementClientContext { options }, checkDnsNameAvailabilityOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -514,22 +403,14 @@ class NetworkManagementClient extends NetworkManagementClientContext { * @param [options] The optional parameters * @returns Promise */ - supportedSecurityProviders( - resourceGroupName: string, - virtualWANName: string, - options?: msRest.RequestOptionsBase - ): Promise; + supportedSecurityProviders(resourceGroupName: string, virtualWANName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName The resource group name. * @param virtualWANName The name of the VirtualWAN for which supported security providers are * needed. * @param callback The callback */ - supportedSecurityProviders( - resourceGroupName: string, - virtualWANName: string, - callback: msRest.ServiceCallback - ): void; + supportedSecurityProviders(resourceGroupName: string, virtualWANName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The resource group name. * @param virtualWANName The name of the VirtualWAN for which supported security providers are @@ -537,20 +418,8 @@ class NetworkManagementClient extends NetworkManagementClientContext { * @param options The optional parameters * @param callback The callback */ - supportedSecurityProviders( - resourceGroupName: string, - virtualWANName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - supportedSecurityProviders( - resourceGroupName: string, - virtualWANName: string, - options?: - | msRest.RequestOptionsBase - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + supportedSecurityProviders(resourceGroupName: string, virtualWANName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + supportedSecurityProviders(resourceGroupName: string, virtualWANName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.sendOperationRequest( { resourceGroupName, @@ -558,8 +427,7 @@ class NetworkManagementClient extends NetworkManagementClientContext { options }, supportedSecurityProvidersOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -573,20 +441,9 @@ class NetworkManagementClient extends NetworkManagementClientContext { * @param [options] The optional parameters * @returns Promise */ - generatevirtualwanvpnserverconfigurationvpnprofile( - resourceGroupName: string, - virtualWANName: string, - vpnClientParams: Models.VirtualWanVpnProfileParameters, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginGeneratevirtualwanvpnserverconfigurationvpnprofile( - resourceGroupName, - virtualWANName, - vpnClientParams, - options - ).then((lroPoller) => lroPoller.pollUntilFinished()) as Promise< - Models.GeneratevirtualwanvpnserverconfigurationvpnprofileResponse - >; + generatevirtualwanvpnserverconfigurationvpnprofile(resourceGroupName: string, virtualWANName: string, vpnClientParams: Models.VirtualWanVpnProfileParameters, options?: msRest.RequestOptionsBase): Promise { + return this.beginGeneratevirtualwanvpnserverconfigurationvpnprofile(resourceGroupName,virtualWANName,vpnClientParams,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } /** @@ -597,12 +454,7 @@ class NetworkManagementClient extends NetworkManagementClientContext { * @param [options] The optional parameters * @returns Promise */ - beginPutBastionShareableLink( - resourceGroupName: string, - bastionHostName: string, - bslRequest: Models.BastionShareableLinkListRequest, - options?: msRest.RequestOptionsBase - ): Promise { + beginPutBastionShareableLink(resourceGroupName: string, bastionHostName: string, bslRequest: Models.BastionShareableLinkListRequest, options?: msRest.RequestOptionsBase): Promise { return this.sendLRORequest( { resourceGroupName, @@ -611,8 +463,7 @@ class NetworkManagementClient extends NetworkManagementClientContext { options }, beginPutBastionShareableLinkOperationSpec, - options - ); + options); } /** @@ -623,12 +474,7 @@ class NetworkManagementClient extends NetworkManagementClientContext { * @param [options] The optional parameters * @returns Promise */ - beginDeleteBastionShareableLink( - resourceGroupName: string, - bastionHostName: string, - bslRequest: Models.BastionShareableLinkListRequest, - options?: msRest.RequestOptionsBase - ): Promise { + beginDeleteBastionShareableLink(resourceGroupName: string, bastionHostName: string, bslRequest: Models.BastionShareableLinkListRequest, options?: msRest.RequestOptionsBase): Promise { return this.sendLRORequest( { resourceGroupName, @@ -637,8 +483,7 @@ class NetworkManagementClient extends NetworkManagementClientContext { options }, beginDeleteBastionShareableLinkOperationSpec, - options - ); + options); } /** @@ -648,11 +493,7 @@ class NetworkManagementClient extends NetworkManagementClientContext { * @param [options] The optional parameters * @returns Promise */ - beginGetActiveSessions( - resourceGroupName: string, - bastionHostName: string, - options?: msRest.RequestOptionsBase - ): Promise { + beginGetActiveSessions(resourceGroupName: string, bastionHostName: string, options?: msRest.RequestOptionsBase): Promise { return this.sendLRORequest( { resourceGroupName, @@ -660,8 +501,7 @@ class NetworkManagementClient extends NetworkManagementClientContext { options }, beginGetActiveSessionsOperationSpec, - options - ); + options); } /** @@ -675,12 +515,7 @@ class NetworkManagementClient extends NetworkManagementClientContext { * @param [options] The optional parameters * @returns Promise */ - beginGeneratevirtualwanvpnserverconfigurationvpnprofile( - resourceGroupName: string, - virtualWANName: string, - vpnClientParams: Models.VirtualWanVpnProfileParameters, - options?: msRest.RequestOptionsBase - ): Promise { + beginGeneratevirtualwanvpnserverconfigurationvpnprofile(resourceGroupName: string, virtualWANName: string, vpnClientParams: Models.VirtualWanVpnProfileParameters, options?: msRest.RequestOptionsBase): Promise { return this.sendLRORequest( { resourceGroupName, @@ -689,8 +524,7 @@ class NetworkManagementClient extends NetworkManagementClientContext { options }, beginGeneratevirtualwanvpnserverconfigurationvpnprofileOperationSpec, - options - ); + options); } /** @@ -699,13 +533,9 @@ class NetworkManagementClient extends NetworkManagementClientContext { * @param [options] The optional parameters * @returns Promise */ - putBastionShareableLinkNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginPutBastionShareableLinkNext(nextPageLink, options).then((lroPoller) => - lroPoller.pollUntilFinished() - ) as Promise; + putBastionShareableLinkNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginPutBastionShareableLinkNext(nextPageLink,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } /** @@ -714,43 +544,26 @@ class NetworkManagementClient extends NetworkManagementClientContext { * @param [options] The optional parameters * @returns Promise */ - getBastionShareableLinkNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase - ): Promise; + getBastionShareableLinkNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - getBastionShareableLinkNext( - nextPageLink: string, - callback: msRest.ServiceCallback - ): void; + getBastionShareableLinkNext(nextPageLink: string, callback: msRest.ServiceCallback): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param options The optional parameters * @param callback The callback */ - getBastionShareableLinkNext( - nextPageLink: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - getBastionShareableLinkNext( - nextPageLink: string, - options?: - | msRest.RequestOptionsBase - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + getBastionShareableLinkNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getBastionShareableLinkNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.sendOperationRequest( { nextPageLink, options }, getBastionShareableLinkNextOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -759,13 +572,9 @@ class NetworkManagementClient extends NetworkManagementClientContext { * @param [options] The optional parameters * @returns Promise */ - getActiveSessionsNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginGetActiveSessionsNext(nextPageLink, options).then((lroPoller) => - lroPoller.pollUntilFinished() - ) as Promise; + getActiveSessionsNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginGetActiveSessionsNext(nextPageLink,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } /** @@ -774,41 +583,26 @@ class NetworkManagementClient extends NetworkManagementClientContext { * @param [options] The optional parameters * @returns Promise */ - disconnectActiveSessionsNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase - ): Promise; + disconnectActiveSessionsNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - disconnectActiveSessionsNext( - nextPageLink: string, - callback: msRest.ServiceCallback - ): void; + disconnectActiveSessionsNext(nextPageLink: string, callback: msRest.ServiceCallback): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param options The optional parameters * @param callback The callback */ - disconnectActiveSessionsNext( - nextPageLink: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - disconnectActiveSessionsNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + disconnectActiveSessionsNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + disconnectActiveSessionsNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.sendOperationRequest( { nextPageLink, options }, disconnectActiveSessionsNextOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -817,18 +611,14 @@ class NetworkManagementClient extends NetworkManagementClientContext { * @param [options] The optional parameters * @returns Promise */ - beginPutBastionShareableLinkNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase - ): Promise { + beginPutBastionShareableLinkNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise { return this.sendLRORequest( { nextPageLink, options }, beginPutBastionShareableLinkNextOperationSpec, - options - ); + options); } /** @@ -837,18 +627,14 @@ class NetworkManagementClient extends NetworkManagementClientContext { * @param [options] The optional parameters * @returns Promise */ - beginGetActiveSessionsNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase - ): Promise { + beginGetActiveSessionsNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise { return this.sendLRORequest( { nextPageLink, options }, beginGetActiveSessionsNextOperationSpec, - options - ); + options); } } @@ -856,15 +642,18 @@ class NetworkManagementClient extends NetworkManagementClientContext { const serializer = new msRest.Serializer(Mappers); const getBastionShareableLinkOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/getShareableLinks", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/getShareableLinks", urlParameters: [ Parameters.resourceGroupName, Parameters.bastionHostName, Parameters.subscriptionId ], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], requestBody: { parameterPath: "bslRequest", mapper: { @@ -885,15 +674,18 @@ const getBastionShareableLinkOperationSpec: msRest.OperationSpec = { const disconnectActiveSessionsOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/disconnectActiveSessions", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/disconnectActiveSessions", urlParameters: [ Parameters.resourceGroupName, Parameters.bastionHostName, Parameters.subscriptionId ], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], requestBody: { parameterPath: "sessionIds", mapper: { @@ -914,11 +706,18 @@ const disconnectActiveSessionsOperationSpec: msRest.OperationSpec = { const checkDnsNameAvailabilityOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: - "subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/CheckDnsNameAvailability", - urlParameters: [Parameters.location0, Parameters.subscriptionId], - queryParameters: [Parameters.domainNameLabel, Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + path: "subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/CheckDnsNameAvailability", + urlParameters: [ + Parameters.location0, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.domainNameLabel, + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.DnsNameAvailabilityResult @@ -932,15 +731,18 @@ const checkDnsNameAvailabilityOperationSpec: msRest.OperationSpec = { const supportedSecurityProvidersOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWANName}/supportedSecurityProviders", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWANName}/supportedSecurityProviders", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.virtualWANName0 ], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.VirtualWanSecurityProviders @@ -954,15 +756,18 @@ const supportedSecurityProvidersOperationSpec: msRest.OperationSpec = { const beginPutBastionShareableLinkOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/createShareableLinks", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/createShareableLinks", urlParameters: [ Parameters.resourceGroupName, Parameters.bastionHostName, Parameters.subscriptionId ], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], requestBody: { parameterPath: "bslRequest", mapper: { @@ -984,15 +789,18 @@ const beginPutBastionShareableLinkOperationSpec: msRest.OperationSpec = { const beginDeleteBastionShareableLinkOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/deleteShareableLinks", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/deleteShareableLinks", urlParameters: [ Parameters.resourceGroupName, Parameters.bastionHostName, Parameters.subscriptionId ], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], requestBody: { parameterPath: "bslRequest", mapper: { @@ -1012,15 +820,18 @@ const beginDeleteBastionShareableLinkOperationSpec: msRest.OperationSpec = { const beginGetActiveSessionsOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/getActiveSessions", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/getActiveSessions", urlParameters: [ Parameters.resourceGroupName, Parameters.bastionHostName, Parameters.subscriptionId ], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.BastionActiveSessionListResult @@ -1035,15 +846,18 @@ const beginGetActiveSessionsOperationSpec: msRest.OperationSpec = { const beginGeneratevirtualwanvpnserverconfigurationvpnprofileOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWANName}/GenerateVpnProfile", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWANName}/GenerateVpnProfile", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.virtualWANName0 ], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], requestBody: { parameterPath: "vpnClientParams", mapper: { @@ -1067,9 +881,15 @@ const getBastionShareableLinkNextOperationSpec: msRest.OperationSpec = { httpMethod: "POST", baseUrl: "https://management.azure.com", path: "{nextLink}", - urlParameters: [Parameters.nextPageLink], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.BastionShareableLinkListResult @@ -1085,9 +905,15 @@ const disconnectActiveSessionsNextOperationSpec: msRest.OperationSpec = { httpMethod: "POST", baseUrl: "https://management.azure.com", path: "{nextLink}", - urlParameters: [Parameters.nextPageLink], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.BastionSessionDeleteResult @@ -1103,9 +929,15 @@ const beginPutBastionShareableLinkNextOperationSpec: msRest.OperationSpec = { httpMethod: "POST", baseUrl: "https://management.azure.com", path: "{nextLink}", - urlParameters: [Parameters.nextPageLink], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.BastionShareableLinkListResult @@ -1122,9 +954,15 @@ const beginGetActiveSessionsNextOperationSpec: msRest.OperationSpec = { httpMethod: "POST", baseUrl: "https://management.azure.com", path: "{nextLink}", - urlParameters: [Parameters.nextPageLink], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.BastionActiveSessionListResult diff --git a/sdk/network/arm-network/src/networkManagementClientContext.ts b/sdk/network/arm-network/src/networkManagementClientContext.ts index 370fd268986e..86791276aefb 100644 --- a/sdk/network/arm-network/src/networkManagementClientContext.ts +++ b/sdk/network/arm-network/src/networkManagementClientContext.ts @@ -13,7 +13,7 @@ import * as msRestAzure from "@azure/ms-rest-azure-js"; import { TokenCredential } from "@azure/core-auth"; const packageName = "@azure/arm-network"; -const packageVersion = "25.0.0"; +const packageVersion = "25.1.0"; export class NetworkManagementClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials | TokenCredential; @@ -32,16 +32,12 @@ export class NetworkManagementClientContext extends msRestAzure.AzureServiceClie * subscription. The subscription ID forms part of the URI for every service call. * @param [options] The parameter options */ - constructor( - credentials: msRest.ServiceClientCredentials | TokenCredential, - subscriptionId: string, - options?: Models.NetworkManagementClientOptions - ) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.NetworkManagementClientOptions) { if (credentials == undefined) { - throw new Error("'credentials' cannot be null."); + throw new Error('\'credentials\' cannot be null.'); } if (subscriptionId == undefined) { - throw new Error("'subscriptionId' cannot be null."); + throw new Error('\'subscriptionId\' cannot be null.'); } if (!options) { @@ -54,7 +50,7 @@ export class NetworkManagementClientContext extends msRestAzure.AzureServiceClie super(credentials, options); - this.acceptLanguage = "en-US"; + this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; this.requestContentType = "application/json; charset=utf-8"; @@ -64,10 +60,7 @@ export class NetworkManagementClientContext extends msRestAzure.AzureServiceClie if (options.acceptLanguage !== null && options.acceptLanguage !== undefined) { this.acceptLanguage = options.acceptLanguage; } - if ( - options.longRunningOperationRetryTimeout !== null && - options.longRunningOperationRetryTimeout !== undefined - ) { + if (options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout; } } diff --git a/sdk/network/arm-network/src/operations/index.ts b/sdk/network/arm-network/src/operations/index.ts index 5e23f4aa5643..99d7960fd45f 100644 --- a/sdk/network/arm-network/src/operations/index.ts +++ b/sdk/network/arm-network/src/operations/index.ts @@ -88,6 +88,7 @@ export * from "./virtualNetworkPeerings"; export * from "./virtualNetworkGateways"; export * from "./virtualNetworkGatewayConnections"; export * from "./localNetworkGateways"; +export * from "./virtualNetworkGatewayNatRules"; export * from "./virtualNetworkTaps"; export * from "./virtualRouters"; export * from "./virtualRouterPeerings"; diff --git a/sdk/network/arm-network/src/operations/loadBalancers.ts b/sdk/network/arm-network/src/operations/loadBalancers.ts index 144a1af196be..dbcf29300e60 100644 --- a/sdk/network/arm-network/src/operations/loadBalancers.ts +++ b/sdk/network/arm-network/src/operations/loadBalancers.ts @@ -171,6 +171,18 @@ export class LoadBalancers { callback) as Promise; } + /** + * Swaps VIPs between two load balancers. + * @param location The region where load balancers are located at. + * @param parameters Parameters that define which VIPs should be swapped. + * @param [options] The optional parameters + * @returns Promise + */ + swapPublicIpAddresses(location: string, parameters: Models.LoadBalancerVipSwapRequest, options?: msRest.RequestOptionsBase): Promise { + return this.beginSwapPublicIpAddresses(location,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + /** * Deletes the specified load balancer. * @param resourceGroupName The name of the resource group. @@ -209,6 +221,24 @@ export class LoadBalancers { options); } + /** + * Swaps VIPs between two load balancers. + * @param location The region where load balancers are located at. + * @param parameters Parameters that define which VIPs should be swapped. + * @param [options] The optional parameters + * @returns Promise + */ + beginSwapPublicIpAddresses(location: string, parameters: Models.LoadBalancerVipSwapRequest, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + location, + parameters, + options + }, + beginSwapPublicIpAddressesOperationSpec, + options); + } + /** * Gets all the load balancers in a subscription. * @param nextPageLink The NextLink from the previous successful call to List operation. @@ -433,6 +463,36 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { serializer }; +const beginSwapPublicIpAddressesOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/setLoadBalancerFrontendPublicIpAddresses", + urlParameters: [ + Parameters.location0, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.LoadBalancerVipSwapRequest, + required: true + } + }, + responses: { + 200: {}, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + const listAllNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", diff --git a/sdk/network/arm-network/src/operations/virtualNetworkGatewayNatRules.ts b/sdk/network/arm-network/src/operations/virtualNetworkGatewayNatRules.ts new file mode 100644 index 000000000000..2c581039ce79 --- /dev/null +++ b/sdk/network/arm-network/src/operations/virtualNetworkGatewayNatRules.ts @@ -0,0 +1,334 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/virtualNetworkGatewayNatRulesMappers"; +import * as Parameters from "../models/parameters"; +import { NetworkManagementClientContext } from "../networkManagementClientContext"; + +/** Class representing a VirtualNetworkGatewayNatRules. */ +export class VirtualNetworkGatewayNatRules { + private readonly client: NetworkManagementClientContext; + + /** + * Create a VirtualNetworkGatewayNatRules. + * @param {NetworkManagementClientContext} client Reference to the service client. + */ + constructor(client: NetworkManagementClientContext) { + this.client = client; + } + + /** + * Retrieves the details of a nat rule. + * @param resourceGroupName The resource group name of the Virtual Network Gateway. + * @param virtualNetworkGatewayName The name of the gateway. + * @param natRuleName The name of the nat rule. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, virtualNetworkGatewayName: string, natRuleName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The resource group name of the Virtual Network Gateway. + * @param virtualNetworkGatewayName The name of the gateway. + * @param natRuleName The name of the nat rule. + * @param callback The callback + */ + get(resourceGroupName: string, virtualNetworkGatewayName: string, natRuleName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The resource group name of the Virtual Network Gateway. + * @param virtualNetworkGatewayName The name of the gateway. + * @param natRuleName The name of the nat rule. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, virtualNetworkGatewayName: string, natRuleName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, virtualNetworkGatewayName: string, natRuleName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + virtualNetworkGatewayName, + natRuleName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates a nat rule to a scalable virtual network gateway if it doesn't exist else updates the + * existing nat rules. + * @param resourceGroupName The resource group name of the Virtual Network Gateway. + * @param virtualNetworkGatewayName The name of the gateway. + * @param natRuleName The name of the nat rule. + * @param natRuleParameters Parameters supplied to create or Update a Nat Rule. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, virtualNetworkGatewayName: string, natRuleName: string, natRuleParameters: Models.VirtualNetworkGatewayNatRule, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(resourceGroupName,virtualNetworkGatewayName,natRuleName,natRuleParameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes a nat rule. + * @param resourceGroupName The resource group name of the Virtual Network Gateway. + * @param virtualNetworkGatewayName The name of the gateway. + * @param natRuleName The name of the nat rule. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, virtualNetworkGatewayName: string, natRuleName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,virtualNetworkGatewayName,natRuleName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Retrieves all nat rules for a particular virtual network gateway. + * @param resourceGroupName The resource group name of the virtual network gateway. + * @param virtualNetworkGatewayName The name of the gateway. + * @param [options] The optional parameters + * @returns Promise + */ + listByVirtualNetworkGateway(resourceGroupName: string, virtualNetworkGatewayName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The resource group name of the virtual network gateway. + * @param virtualNetworkGatewayName The name of the gateway. + * @param callback The callback + */ + listByVirtualNetworkGateway(resourceGroupName: string, virtualNetworkGatewayName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The resource group name of the virtual network gateway. + * @param virtualNetworkGatewayName The name of the gateway. + * @param options The optional parameters + * @param callback The callback + */ + listByVirtualNetworkGateway(resourceGroupName: string, virtualNetworkGatewayName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByVirtualNetworkGateway(resourceGroupName: string, virtualNetworkGatewayName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + virtualNetworkGatewayName, + options + }, + listByVirtualNetworkGatewayOperationSpec, + callback) as Promise; + } + + /** + * Creates a nat rule to a scalable virtual network gateway if it doesn't exist else updates the + * existing nat rules. + * @param resourceGroupName The resource group name of the Virtual Network Gateway. + * @param virtualNetworkGatewayName The name of the gateway. + * @param natRuleName The name of the nat rule. + * @param natRuleParameters Parameters supplied to create or Update a Nat Rule. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, virtualNetworkGatewayName: string, natRuleName: string, natRuleParameters: Models.VirtualNetworkGatewayNatRule, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + virtualNetworkGatewayName, + natRuleName, + natRuleParameters, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Deletes a nat rule. + * @param resourceGroupName The resource group name of the Virtual Network Gateway. + * @param virtualNetworkGatewayName The name of the gateway. + * @param natRuleName The name of the nat rule. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, virtualNetworkGatewayName: string, natRuleName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + virtualNetworkGatewayName, + natRuleName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Retrieves all nat rules for a particular virtual network gateway. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByVirtualNetworkGatewayNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByVirtualNetworkGatewayNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByVirtualNetworkGatewayNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByVirtualNetworkGatewayNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByVirtualNetworkGatewayNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/natRules/{natRuleName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.virtualNetworkGatewayName, + Parameters.natRuleName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.VirtualNetworkGatewayNatRule + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByVirtualNetworkGatewayOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/natRules", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.virtualNetworkGatewayName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ListVirtualNetworkGatewayNatRulesResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/natRules/{natRuleName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.virtualNetworkGatewayName, + Parameters.natRuleName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "natRuleParameters", + mapper: { + ...Mappers.VirtualNetworkGatewayNatRule, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.VirtualNetworkGatewayNatRule + }, + 201: { + bodyMapper: Mappers.VirtualNetworkGatewayNatRule + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/natRules/{natRuleName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.virtualNetworkGatewayName, + Parameters.natRuleName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByVirtualNetworkGatewayNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ListVirtualNetworkGatewayNatRulesResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/network/arm-network/src/operations/virtualNetworkPeerings.ts b/sdk/network/arm-network/src/operations/virtualNetworkPeerings.ts index badd47438967..d367ad03fcf3 100644 --- a/sdk/network/arm-network/src/operations/virtualNetworkPeerings.ts +++ b/sdk/network/arm-network/src/operations/virtualNetworkPeerings.ts @@ -85,7 +85,7 @@ export class VirtualNetworkPeerings { * @param [options] The optional parameters * @returns Promise */ - createOrUpdate(resourceGroupName: string, virtualNetworkName: string, virtualNetworkPeeringName: string, virtualNetworkPeeringParameters: Models.VirtualNetworkPeering, options?: msRest.RequestOptionsBase): Promise { + createOrUpdate(resourceGroupName: string, virtualNetworkName: string, virtualNetworkPeeringName: string, virtualNetworkPeeringParameters: Models.VirtualNetworkPeering, options?: Models.VirtualNetworkPeeringsCreateOrUpdateOptionalParams): Promise { return this.beginCreateOrUpdate(resourceGroupName,virtualNetworkName,virtualNetworkPeeringName,virtualNetworkPeeringParameters,options) .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } @@ -152,7 +152,7 @@ export class VirtualNetworkPeerings { * @param [options] The optional parameters * @returns Promise */ - beginCreateOrUpdate(resourceGroupName: string, virtualNetworkName: string, virtualNetworkPeeringName: string, virtualNetworkPeeringParameters: Models.VirtualNetworkPeering, options?: msRest.RequestOptionsBase): Promise { + beginCreateOrUpdate(resourceGroupName: string, virtualNetworkName: string, virtualNetworkPeeringName: string, virtualNetworkPeeringParameters: Models.VirtualNetworkPeering, options?: Models.VirtualNetworkPeeringsBeginCreateOrUpdateOptionalParams): Promise { return this.client.sendLRORequest( { resourceGroupName, @@ -283,6 +283,7 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ + Parameters.syncRemoteAddressSpace, Parameters.apiVersion0 ], headerParameters: [ From 670b2e84fdcbe867aad56c3913047db1878adc58 Mon Sep 17 00:00:00 2001 From: colawwj <70128817+colawwj@users.noreply.github.com> Date: Tue, 20 Jul 2021 10:37:23 +0800 Subject: [PATCH 23/28] arm-containerinstance-release (#16426) --- .../arm-containerinstance/README.md | 9 +++------ .../arm-containerinstance/package.json | 4 ++-- .../src/containerInstanceManagementClientContext.ts | 12 ++++++------ .../src/operations/containerGroups.ts | 2 +- 4 files changed, 12 insertions(+), 15 deletions(-) diff --git a/sdk/containerinstance/arm-containerinstance/README.md b/sdk/containerinstance/arm-containerinstance/README.md index 3cd6f8bf240c..76973225a483 100644 --- a/sdk/containerinstance/arm-containerinstance/README.md +++ b/sdk/containerinstance/arm-containerinstance/README.md @@ -1,11 +1,11 @@ ## Azure ContainerInstanceManagementClient SDK for JavaScript -This package contains an isomorphic SDK (runs both in Node.js and in browsers) for ContainerInstanceManagementClient. +This package contains an isomorphic SDK (runs both in node.js and in browsers) for ContainerInstanceManagementClient. ### Currently supported environments - [LTS versions of Node.js](https://nodejs.org/about/releases/) -- Latest versions of Safari, Chrome, Edge, and Firefox. +- Latest versions of Safari, Chrome, Edge and Firefox. ### Prerequisites @@ -21,7 +21,6 @@ Install both packages using the below command: ```bash npm install --save @azure/arm-containerinstance @azure/identity ``` - > **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. @@ -37,7 +36,6 @@ If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/ In the below samples, we pass the credential and the Azure subscription id to instantiate the client. Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. - #### nodejs - Authentication, client creation, and list containerGroups as an example written in JavaScript. ##### Sample code @@ -51,7 +49,6 @@ const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; // Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. const creds = new DefaultAzureCredential(); const client = new ContainerInstanceManagementClient(creds, subscriptionId); - client.containerGroups.list().then((result) => { console.log("The result is:"); console.log(result); @@ -86,7 +83,7 @@ In browser applications, we recommend using the `InteractiveBrowserCredential` t const credential = new InteractiveBrowserCredential( { clientId: "", - tenantId: "" + tenant: "" }); const client = new Azure.ArmContainerinstance.ContainerInstanceManagementClient(creds, subscriptionId); client.containerGroups.list().then((result) => { diff --git a/sdk/containerinstance/arm-containerinstance/package.json b/sdk/containerinstance/arm-containerinstance/package.json index 57537349e9c6..7af23df6c9d6 100644 --- a/sdk/containerinstance/arm-containerinstance/package.json +++ b/sdk/containerinstance/arm-containerinstance/package.json @@ -2,7 +2,7 @@ "name": "@azure/arm-containerinstance", "author": "Microsoft Corporation", "description": "ContainerInstanceManagementClient Library with typescript type definitions for node.js and browser.", - "version": "6.2.0", + "version": "6.3.0", "dependencies": { "@azure/ms-rest-azure-js": "^2.1.0", "@azure/ms-rest-js": "^2.2.0", @@ -27,7 +27,7 @@ "rollup-plugin-sourcemaps": "^0.4.2", "uglify-js": "^3.6.0" }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/containerinstance/arm-containerinstance", + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/feature/v4/sdk/containerinstance/arm-containerinstance", "repository": { "type": "git", "url": "https://github.com/Azure/azure-sdk-for-js.git" diff --git a/sdk/containerinstance/arm-containerinstance/src/containerInstanceManagementClientContext.ts b/sdk/containerinstance/arm-containerinstance/src/containerInstanceManagementClientContext.ts index dac70a4356bd..f0c300eae755 100644 --- a/sdk/containerinstance/arm-containerinstance/src/containerInstanceManagementClientContext.ts +++ b/sdk/containerinstance/arm-containerinstance/src/containerInstanceManagementClientContext.ts @@ -9,11 +9,11 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; -import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; +import { TokenCredential } from "@azure/core-auth"; const packageName = "@azure/arm-containerinstance"; -const packageVersion = "6.2.0"; +const packageVersion = "6.3.0"; export class ContainerInstanceManagementClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials | TokenCredential; @@ -43,14 +43,14 @@ export class ContainerInstanceManagementClientContext extends msRestAzure.AzureS if (!options) { options = {}; } - if(!options.userAgent) { + if (!options.userAgent) { const defaultUserAgent = msRestAzure.getDefaultUserAgentValue(); options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`; } super(credentials, options); - this.apiVersion = '2020-11-01'; + this.apiVersion = '2021-03-01'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; @@ -58,10 +58,10 @@ export class ContainerInstanceManagementClientContext extends msRestAzure.AzureS this.credentials = credentials; this.subscriptionId = subscriptionId; - if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) { + if (options.acceptLanguage !== null && options.acceptLanguage !== undefined) { this.acceptLanguage = options.acceptLanguage; } - if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { + if (options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout; } } diff --git a/sdk/containerinstance/arm-containerinstance/src/operations/containerGroups.ts b/sdk/containerinstance/arm-containerinstance/src/operations/containerGroups.ts index 7a03a85e7d17..ea5c1289b758 100644 --- a/sdk/containerinstance/arm-containerinstance/src/operations/containerGroups.ts +++ b/sdk/containerinstance/arm-containerinstance/src/operations/containerGroups.ts @@ -619,7 +619,7 @@ const beginStartOperationSpec: msRest.OperationSpec = { Parameters.acceptLanguage ], responses: { - 204: {}, + 202: {}, default: { bodyMapper: Mappers.CloudError } From af8126a8680e9180785768b6d3f3ce58b627cb2e Mon Sep 17 00:00:00 2001 From: colawwj <70128817+colawwj@users.noreply.github.com> Date: Tue, 20 Jul 2021 16:19:16 +0800 Subject: [PATCH 24/28] arm-signalr-release (#16471) --- sdk/signalr/arm-signalr/README.md | 9 +- sdk/signalr/arm-signalr/package.json | 4 +- sdk/signalr/arm-signalr/rollup.config.js | 10 +- sdk/signalr/arm-signalr/src/models/index.ts | 632 +++++++++--------- sdk/signalr/arm-signalr/src/models/mappers.ts | 22 + .../arm-signalr/src/models/parameters.ts | 2 +- .../arm-signalr/src/operations/operations.ts | 53 +- .../arm-signalr/src/operations/signalR.ts | 485 ++++++-------- .../signalRPrivateEndpointConnections.ts | 215 ++---- .../operations/signalRPrivateLinkResources.ts | 83 +-- .../signalRSharedPrivateLinkResources.ts | 208 ++---- .../arm-signalr/src/operations/usages.ts | 63 +- .../src/signalRManagementClient.ts | 7 +- .../src/signalRManagementClientContext.ts | 23 +- 14 files changed, 767 insertions(+), 1049 deletions(-) diff --git a/sdk/signalr/arm-signalr/README.md b/sdk/signalr/arm-signalr/README.md index 41b5de8f57fa..e3841a238dff 100644 --- a/sdk/signalr/arm-signalr/README.md +++ b/sdk/signalr/arm-signalr/README.md @@ -1,11 +1,11 @@ ## Azure SignalRManagementClient SDK for JavaScript -This package contains an isomorphic SDK (runs both in Node.js and in browsers) for SignalRManagementClient. +This package contains an isomorphic SDK (runs both in node.js and in browsers) for SignalRManagementClient. ### Currently supported environments - [LTS versions of Node.js](https://nodejs.org/about/releases/) -- Latest versions of Safari, Chrome, Edge, and Firefox. +- Latest versions of Safari, Chrome, Edge and Firefox. ### Prerequisites @@ -21,7 +21,6 @@ Install both packages using the below command: ```bash npm install --save @azure/arm-signalr @azure/identity ``` - > **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. @@ -37,7 +36,6 @@ If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/ In the below samples, we pass the credential and the Azure subscription id to instantiate the client. Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. - #### nodejs - Authentication, client creation, and list operations as an example written in JavaScript. ##### Sample code @@ -51,7 +49,6 @@ const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; // Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. const creds = new DefaultAzureCredential(); const client = new SignalRManagementClient(creds, subscriptionId); - client.operations.list().then((result) => { console.log("The result is:"); console.log(result); @@ -86,7 +83,7 @@ In browser applications, we recommend using the `InteractiveBrowserCredential` t const credential = new InteractiveBrowserCredential( { clientId: "", - tenantId: "" + tenant: "" }); const client = new Azure.ArmSignalr.SignalRManagementClient(creds, subscriptionId); client.operations.list().then((result) => { diff --git a/sdk/signalr/arm-signalr/package.json b/sdk/signalr/arm-signalr/package.json index 3b83e183076c..11f4fda185f6 100644 --- a/sdk/signalr/arm-signalr/package.json +++ b/sdk/signalr/arm-signalr/package.json @@ -2,7 +2,7 @@ "name": "@azure/arm-signalr", "author": "Microsoft Corporation", "description": "SignalRManagementClient Library with typescript type definitions for node.js and browser.", - "version": "4.1.0", + "version": "4.2.0", "dependencies": { "@azure/ms-rest-azure-js": "^2.1.0", "@azure/ms-rest-js": "^2.2.0", @@ -27,7 +27,7 @@ "rollup-plugin-sourcemaps": "^0.4.2", "uglify-js": "^3.6.0" }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/signalr/arm-signalr", + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/feature/v4/sdk/signalr/arm-signalr", "repository": { "type": "git", "url": "https://github.com/Azure/azure-sdk-for-js.git" diff --git a/sdk/signalr/arm-signalr/rollup.config.js b/sdk/signalr/arm-signalr/rollup.config.js index 7592cd72d347..0f16348bb245 100644 --- a/sdk/signalr/arm-signalr/rollup.config.js +++ b/sdk/signalr/arm-signalr/rollup.config.js @@ -7,7 +7,10 @@ import sourcemaps from "rollup-plugin-sourcemaps"; */ const config = { input: "./esm/signalRManagementClient.js", - external: ["@azure/ms-rest-js", "@azure/ms-rest-azure-js"], + external: [ + "@azure/ms-rest-js", + "@azure/ms-rest-azure-js" + ], output: { file: "./dist/arm-signalr.js", format: "umd", @@ -25,7 +28,10 @@ const config = { * Changes may cause incorrect behavior and will be lost if the code is regenerated. */` }, - plugins: [nodeResolve({ mainFields: ["module", "main"] }), sourcemaps()] + plugins: [ + nodeResolve({ mainFields: ['module', 'main'] }), + sourcemaps() + ] }; export default config; diff --git a/sdk/signalr/arm-signalr/src/models/index.ts b/sdk/signalr/arm-signalr/src/models/index.ts index 710d95537822..9e953f655da4 100644 --- a/sdk/signalr/arm-signalr/src/models/index.ts +++ b/sdk/signalr/arm-signalr/src/models/index.ts @@ -365,7 +365,8 @@ export interface Resource extends BaseResource { * The resource model definition for a ARM proxy resource. It will have everything other than * required location and tags */ -export interface ProxyResource extends Resource {} +export interface ProxyResource extends Resource { +} /** * A private endpoint connection to an azure resource @@ -617,7 +618,7 @@ export interface SignalRCorsSettings { } /** - * Feature of a SignalR resource, which controls the SignalR runtime behavior. + * Feature of a resource, which controls the runtime behavior. */ export interface SignalRFeature { /** @@ -694,7 +695,7 @@ export interface SignalRNetworkACLs { */ export interface SignalRTlsSettings { /** - * Request client certificate during TLS handshake if enabled + * Request client certificate during TLS handshake if enabled. Default value: true. */ clientCertEnabled?: boolean; } @@ -790,6 +791,25 @@ export interface SignalRResource extends TrackedResource { * Network ACLs */ networkACLs?: SignalRNetworkACLs; + /** + * Enable or disable public network access. Default to "Enabled". + * When it's Enabled, network ACLs still apply. + * When it's Disabled, public network access is always disabled no matter what you set in network + * ACLs. Default value: 'Enabled'. + */ + publicNetworkAccess?: string; + /** + * DisableLocalAuth + * Enable or disable local auth with AccessKey + * When set as true, connection with AccessKey=xxx won't work. Default value: false. + */ + disableLocalAuth?: boolean; + /** + * DisableLocalAuth + * Enable or disable aad auth + * When set as true, connection with AuthType=aad won't work. Default value: false. + */ + disableAadAuth?: boolean; /** * The kind of the service - e.g. "SignalR" for "Microsoft.SignalRService/SignalR". Possible * values include: 'SignalR', 'RawWebSockets' @@ -997,7 +1017,7 @@ export interface SharedPrivateLinkResourceList extends Array - ): void; - list( - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { options }, listOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -62,10 +55,7 @@ export class Operations { * @param [options] The optional parameters * @returns Promise */ - listNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase - ): Promise; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback @@ -76,24 +66,15 @@ export class Operations { * @param options The optional parameters * @param callback The callback */ - listNext( - nextPageLink: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, listNextOperationSpec, - callback - ) as Promise; + callback) as Promise; } } @@ -102,8 +83,12 @@ const serializer = new msRest.Serializer(Mappers); const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "providers/Microsoft.SignalRService/operations", - queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.OperationList @@ -119,9 +104,15 @@ const listNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", - urlParameters: [Parameters.nextPageLink], - queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.OperationList diff --git a/sdk/signalr/arm-signalr/src/operations/signalR.ts b/sdk/signalr/arm-signalr/src/operations/signalR.ts index eca4f66c7fc6..033f63a676d2 100644 --- a/sdk/signalr/arm-signalr/src/operations/signalR.ts +++ b/sdk/signalr/arm-signalr/src/operations/signalR.ts @@ -33,39 +33,21 @@ export class SignalR { * @param [options] The optional parameters * @returns Promise */ - checkNameAvailability( - location: string, - parameters: Models.NameAvailabilityParameters, - options?: msRest.RequestOptionsBase - ): Promise; + checkNameAvailability(location: string, parameters: Models.NameAvailabilityParameters, options?: msRest.RequestOptionsBase): Promise; /** * @param location the region * @param parameters Parameters supplied to the operation. * @param callback The callback */ - checkNameAvailability( - location: string, - parameters: Models.NameAvailabilityParameters, - callback: msRest.ServiceCallback - ): void; + checkNameAvailability(location: string, parameters: Models.NameAvailabilityParameters, callback: msRest.ServiceCallback): void; /** * @param location the region * @param parameters Parameters supplied to the operation. * @param options The optional parameters * @param callback The callback */ - checkNameAvailability( - location: string, - parameters: Models.NameAvailabilityParameters, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - checkNameAvailability( - location: string, - parameters: Models.NameAvailabilityParameters, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + checkNameAvailability(location: string, parameters: Models.NameAvailabilityParameters, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + checkNameAvailability(location: string, parameters: Models.NameAvailabilityParameters, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { location, @@ -73,8 +55,7 @@ export class SignalR { options }, checkNameAvailabilityOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -82,9 +63,7 @@ export class SignalR { * @param [options] The optional parameters * @returns Promise */ - listBySubscription( - options?: msRest.RequestOptionsBase - ): Promise; + listBySubscription(options?: msRest.RequestOptionsBase): Promise; /** * @param callback The callback */ @@ -93,21 +72,14 @@ export class SignalR { * @param options The optional parameters * @param callback The callback */ - listBySubscription( - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listBySubscription( - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + listBySubscription(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listBySubscription(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { options }, listBySubscriptionOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -117,43 +89,28 @@ export class SignalR { * @param [options] The optional parameters * @returns Promise */ - listByResourceGroup( - resourceGroupName: string, - options?: msRest.RequestOptionsBase - ): Promise; + listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName The name of the resource group that contains the resource. You can * obtain this value from the Azure Resource Manager API or the portal. * @param callback The callback */ - listByResourceGroup( - resourceGroupName: string, - callback: msRest.ServiceCallback - ): void; + listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The name of the resource group that contains the resource. You can * obtain this value from the Azure Resource Manager API or the portal. * @param options The optional parameters * @param callback The callback */ - listByResourceGroup( - resourceGroupName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listByResourceGroup( - resourceGroupName: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + listByResourceGroup(resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, options }, listByResourceGroupOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -164,22 +121,14 @@ export class SignalR { * @param [options] The optional parameters * @returns Promise */ - get( - resourceGroupName: string, - resourceName: string, - options?: msRest.RequestOptionsBase - ): Promise; + get(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName The name of the resource group that contains the resource. You can * obtain this value from the Azure Resource Manager API or the portal. * @param resourceName The name of the resource. * @param callback The callback */ - get( - resourceGroupName: string, - resourceName: string, - callback: msRest.ServiceCallback - ): void; + get(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The name of the resource group that contains the resource. You can * obtain this value from the Azure Resource Manager API or the portal. @@ -187,18 +136,8 @@ export class SignalR { * @param options The optional parameters * @param callback The callback */ - get( - resourceGroupName: string, - resourceName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - get( - resourceGroupName: string, - resourceName: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + get(resourceGroupName: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, @@ -206,8 +145,7 @@ export class SignalR { options }, getOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -219,20 +157,9 @@ export class SignalR { * @param [options] The optional parameters * @returns Promise */ - createOrUpdate( - parameters: Models.SignalRResource, - resourceGroupName: string, - resourceName: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginCreateOrUpdate( - parameters, - resourceGroupName, - resourceName, - options - ).then((lroPoller) => lroPoller.pollUntilFinished()) as Promise< - Models.SignalRCreateOrUpdateResponse - >; + createOrUpdate(parameters: Models.SignalRResource, resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(parameters,resourceGroupName,resourceName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } /** @@ -243,14 +170,9 @@ export class SignalR { * @param [options] The optional parameters * @returns Promise */ - deleteMethod( - resourceGroupName: string, - resourceName: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginDeleteMethod(resourceGroupName, resourceName, options).then((lroPoller) => - lroPoller.pollUntilFinished() - ); + deleteMethod(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,resourceName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); } /** @@ -262,18 +184,9 @@ export class SignalR { * @param [options] The optional parameters * @returns Promise */ - update( - parameters: Models.SignalRResource, - resourceGroupName: string, - resourceName: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginUpdate( - parameters, - resourceGroupName, - resourceName, - options - ).then((lroPoller) => lroPoller.pollUntilFinished()) as Promise; + update(parameters: Models.SignalRResource, resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpdate(parameters,resourceGroupName,resourceName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } /** @@ -284,22 +197,14 @@ export class SignalR { * @param [options] The optional parameters * @returns Promise */ - listKeys( - resourceGroupName: string, - resourceName: string, - options?: msRest.RequestOptionsBase - ): Promise; + listKeys(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName The name of the resource group that contains the resource. You can * obtain this value from the Azure Resource Manager API or the portal. * @param resourceName The name of the resource. * @param callback The callback */ - listKeys( - resourceGroupName: string, - resourceName: string, - callback: msRest.ServiceCallback - ): void; + listKeys(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The name of the resource group that contains the resource. You can * obtain this value from the Azure Resource Manager API or the portal. @@ -307,18 +212,8 @@ export class SignalR { * @param options The optional parameters * @param callback The callback */ - listKeys( - resourceGroupName: string, - resourceName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listKeys( - resourceGroupName: string, - resourceName: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + listKeys(resourceGroupName: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listKeys(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, @@ -326,8 +221,7 @@ export class SignalR { options }, listKeysOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -340,20 +234,9 @@ export class SignalR { * @param [options] The optional parameters * @returns Promise */ - regenerateKey( - parameters: Models.RegenerateKeyParameters, - resourceGroupName: string, - resourceName: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginRegenerateKey( - parameters, - resourceGroupName, - resourceName, - options - ).then((lroPoller) => lroPoller.pollUntilFinished()) as Promise< - Models.SignalRRegenerateKeyResponse - >; + regenerateKey(parameters: Models.RegenerateKeyParameters, resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginRegenerateKey(parameters,resourceGroupName,resourceName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } /** @@ -364,14 +247,9 @@ export class SignalR { * @param [options] The optional parameters * @returns Promise */ - restart( - resourceGroupName: string, - resourceName: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginRestart(resourceGroupName, resourceName, options).then((lroPoller) => - lroPoller.pollUntilFinished() - ); + restart(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginRestart(resourceGroupName,resourceName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); } /** @@ -383,12 +261,7 @@ export class SignalR { * @param [options] The optional parameters * @returns Promise */ - beginCreateOrUpdate( - parameters: Models.SignalRResource, - resourceGroupName: string, - resourceName: string, - options?: msRest.RequestOptionsBase - ): Promise { + beginCreateOrUpdate(parameters: Models.SignalRResource, resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise { return this.client.sendLRORequest( { parameters, @@ -397,8 +270,7 @@ export class SignalR { options }, beginCreateOrUpdateOperationSpec, - options - ); + options); } /** @@ -409,11 +281,7 @@ export class SignalR { * @param [options] The optional parameters * @returns Promise */ - beginDeleteMethod( - resourceGroupName: string, - resourceName: string, - options?: msRest.RequestOptionsBase - ): Promise { + beginDeleteMethod(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise { return this.client.sendLRORequest( { resourceGroupName, @@ -421,8 +289,7 @@ export class SignalR { options }, beginDeleteMethodOperationSpec, - options - ); + options); } /** @@ -434,12 +301,7 @@ export class SignalR { * @param [options] The optional parameters * @returns Promise */ - beginUpdate( - parameters: Models.SignalRResource, - resourceGroupName: string, - resourceName: string, - options?: msRest.RequestOptionsBase - ): Promise { + beginUpdate(parameters: Models.SignalRResource, resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise { return this.client.sendLRORequest( { parameters, @@ -448,8 +310,7 @@ export class SignalR { options }, beginUpdateOperationSpec, - options - ); + options); } /** @@ -462,12 +323,7 @@ export class SignalR { * @param [options] The optional parameters * @returns Promise */ - beginRegenerateKey( - parameters: Models.RegenerateKeyParameters, - resourceGroupName: string, - resourceName: string, - options?: msRest.RequestOptionsBase - ): Promise { + beginRegenerateKey(parameters: Models.RegenerateKeyParameters, resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise { return this.client.sendLRORequest( { parameters, @@ -476,8 +332,7 @@ export class SignalR { options }, beginRegenerateKeyOperationSpec, - options - ); + options); } /** @@ -488,11 +343,7 @@ export class SignalR { * @param [options] The optional parameters * @returns Promise */ - beginRestart( - resourceGroupName: string, - resourceName: string, - options?: msRest.RequestOptionsBase - ): Promise { + beginRestart(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise { return this.client.sendLRORequest( { resourceGroupName, @@ -500,8 +351,7 @@ export class SignalR { options }, beginRestartOperationSpec, - options - ); + options); } /** @@ -510,41 +360,26 @@ export class SignalR { * @param [options] The optional parameters * @returns Promise */ - listBySubscriptionNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase - ): Promise; + listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - listBySubscriptionNext( - nextPageLink: string, - callback: msRest.ServiceCallback - ): void; + listBySubscriptionNext(nextPageLink: string, callback: msRest.ServiceCallback): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param options The optional parameters * @param callback The callback */ - listBySubscriptionNext( - nextPageLink: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listBySubscriptionNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + listBySubscriptionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, listBySubscriptionNextOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -553,41 +388,26 @@ export class SignalR { * @param [options] The optional parameters * @returns Promise */ - listByResourceGroupNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase - ): Promise; + listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - listByResourceGroupNext( - nextPageLink: string, - callback: msRest.ServiceCallback - ): void; + listByResourceGroupNext(nextPageLink: string, callback: msRest.ServiceCallback): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param options The optional parameters * @param callback The callback */ - listByResourceGroupNext( - nextPageLink: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listByResourceGroupNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + listByResourceGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, listByResourceGroupNextOperationSpec, - callback - ) as Promise; + callback) as Promise; } } @@ -595,11 +415,17 @@ export class SignalR { const serializer = new msRest.Serializer(Mappers); const checkNameAvailabilityOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: - "subscriptions/{subscriptionId}/providers/Microsoft.SignalRService/locations/{location}/checkNameAvailability", - urlParameters: [Parameters.location, Parameters.subscriptionId], - queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + path: "subscriptions/{subscriptionId}/providers/Microsoft.SignalRService/locations/{location}/checkNameAvailability", + urlParameters: [ + Parameters.location, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], requestBody: { parameterPath: "parameters", mapper: { @@ -621,9 +447,15 @@ const checkNameAvailabilityOperationSpec: msRest.OperationSpec = { const listBySubscriptionOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/providers/Microsoft.SignalRService/signalR", - urlParameters: [Parameters.subscriptionId], - queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.SignalRResourceList @@ -637,11 +469,17 @@ const listBySubscriptionOperationSpec: msRest.OperationSpec = { const listByResourceGroupOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR", - urlParameters: [Parameters.subscriptionId, Parameters.resourceGroupName], - queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.SignalRResourceList @@ -655,11 +493,18 @@ const listByResourceGroupOperationSpec: msRest.OperationSpec = { const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}", - urlParameters: [Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.resourceName], - queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.SignalRResource @@ -673,11 +518,18 @@ const getOperationSpec: msRest.OperationSpec = { const listKeysOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/listKeys", - urlParameters: [Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.resourceName], - queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/listKeys", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.SignalRKeys @@ -691,11 +543,18 @@ const listKeysOperationSpec: msRest.OperationSpec = { const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}", - urlParameters: [Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.resourceName], - queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], requestBody: { parameterPath: "parameters", mapper: { @@ -720,11 +579,18 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { const beginDeleteMethodOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}", - urlParameters: [Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.resourceName], - queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: {}, 202: {}, @@ -738,11 +604,18 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { const beginUpdateOperationSpec: msRest.OperationSpec = { httpMethod: "PATCH", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}", - urlParameters: [Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.resourceName], - queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], requestBody: { parameterPath: "parameters", mapper: { @@ -764,11 +637,18 @@ const beginUpdateOperationSpec: msRest.OperationSpec = { const beginRegenerateKeyOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/regenerateKey", - urlParameters: [Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.resourceName], - queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/regenerateKey", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], requestBody: { parameterPath: "parameters", mapper: { @@ -789,11 +669,18 @@ const beginRegenerateKeyOperationSpec: msRest.OperationSpec = { const beginRestartOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/restart", - urlParameters: [Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.resourceName], - queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/restart", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 202: {}, 204: {}, @@ -808,9 +695,15 @@ const listBySubscriptionNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", - urlParameters: [Parameters.nextPageLink], - queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.SignalRResourceList @@ -826,9 +719,15 @@ const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", - urlParameters: [Parameters.nextPageLink], - queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.SignalRResourceList diff --git a/sdk/signalr/arm-signalr/src/operations/signalRPrivateEndpointConnections.ts b/sdk/signalr/arm-signalr/src/operations/signalRPrivateEndpointConnections.ts index e8c26ec6804a..eec4311c611c 100644 --- a/sdk/signalr/arm-signalr/src/operations/signalRPrivateEndpointConnections.ts +++ b/sdk/signalr/arm-signalr/src/operations/signalRPrivateEndpointConnections.ts @@ -34,22 +34,14 @@ export class SignalRPrivateEndpointConnections { * @param [options] The optional parameters * @returns Promise */ - list( - resourceGroupName: string, - resourceName: string, - options?: msRest.RequestOptionsBase - ): Promise; + list(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName The name of the resource group that contains the resource. You can * obtain this value from the Azure Resource Manager API or the portal. * @param resourceName The name of the resource. * @param callback The callback */ - list( - resourceGroupName: string, - resourceName: string, - callback: msRest.ServiceCallback - ): void; + list(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The name of the resource group that contains the resource. You can * obtain this value from the Azure Resource Manager API or the portal. @@ -57,20 +49,8 @@ export class SignalRPrivateEndpointConnections { * @param options The optional parameters * @param callback The callback */ - list( - resourceGroupName: string, - resourceName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - list( - resourceGroupName: string, - resourceName: string, - options?: - | msRest.RequestOptionsBase - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + list(resourceGroupName: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, @@ -78,8 +58,7 @@ export class SignalRPrivateEndpointConnections { options }, listOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -91,12 +70,7 @@ export class SignalRPrivateEndpointConnections { * @param [options] The optional parameters * @returns Promise */ - get( - privateEndpointConnectionName: string, - resourceGroupName: string, - resourceName: string, - options?: msRest.RequestOptionsBase - ): Promise; + get(privateEndpointConnectionName: string, resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param privateEndpointConnectionName The name of the private endpoint connection * @param resourceGroupName The name of the resource group that contains the resource. You can @@ -104,12 +78,7 @@ export class SignalRPrivateEndpointConnections { * @param resourceName The name of the resource. * @param callback The callback */ - get( - privateEndpointConnectionName: string, - resourceGroupName: string, - resourceName: string, - callback: msRest.ServiceCallback - ): void; + get(privateEndpointConnectionName: string, resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; /** * @param privateEndpointConnectionName The name of the private endpoint connection * @param resourceGroupName The name of the resource group that contains the resource. You can @@ -118,20 +87,8 @@ export class SignalRPrivateEndpointConnections { * @param options The optional parameters * @param callback The callback */ - get( - privateEndpointConnectionName: string, - resourceGroupName: string, - resourceName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - get( - privateEndpointConnectionName: string, - resourceGroupName: string, - resourceName: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + get(privateEndpointConnectionName: string, resourceGroupName: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(privateEndpointConnectionName: string, resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { privateEndpointConnectionName, @@ -140,8 +97,7 @@ export class SignalRPrivateEndpointConnections { options }, getOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -154,13 +110,7 @@ export class SignalRPrivateEndpointConnections { * @param [options] The optional parameters * @returns Promise */ - update( - privateEndpointConnectionName: string, - parameters: Models.PrivateEndpointConnection, - resourceGroupName: string, - resourceName: string, - options?: msRest.RequestOptionsBase - ): Promise; + update(privateEndpointConnectionName: string, parameters: Models.PrivateEndpointConnection, resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param privateEndpointConnectionName The name of the private endpoint connection * @param parameters The resource of private endpoint and its properties @@ -169,13 +119,7 @@ export class SignalRPrivateEndpointConnections { * @param resourceName The name of the resource. * @param callback The callback */ - update( - privateEndpointConnectionName: string, - parameters: Models.PrivateEndpointConnection, - resourceGroupName: string, - resourceName: string, - callback: msRest.ServiceCallback - ): void; + update(privateEndpointConnectionName: string, parameters: Models.PrivateEndpointConnection, resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; /** * @param privateEndpointConnectionName The name of the private endpoint connection * @param parameters The resource of private endpoint and its properties @@ -185,22 +129,8 @@ export class SignalRPrivateEndpointConnections { * @param options The optional parameters * @param callback The callback */ - update( - privateEndpointConnectionName: string, - parameters: Models.PrivateEndpointConnection, - resourceGroupName: string, - resourceName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - update( - privateEndpointConnectionName: string, - parameters: Models.PrivateEndpointConnection, - resourceGroupName: string, - resourceName: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + update(privateEndpointConnectionName: string, parameters: Models.PrivateEndpointConnection, resourceGroupName: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + update(privateEndpointConnectionName: string, parameters: Models.PrivateEndpointConnection, resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { privateEndpointConnectionName, @@ -210,8 +140,7 @@ export class SignalRPrivateEndpointConnections { options }, updateOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -223,18 +152,9 @@ export class SignalRPrivateEndpointConnections { * @param [options] The optional parameters * @returns Promise */ - deleteMethod( - privateEndpointConnectionName: string, - resourceGroupName: string, - resourceName: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginDeleteMethod( - privateEndpointConnectionName, - resourceGroupName, - resourceName, - options - ).then((lroPoller) => lroPoller.pollUntilFinished()); + deleteMethod(privateEndpointConnectionName: string, resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(privateEndpointConnectionName,resourceGroupName,resourceName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); } /** @@ -246,12 +166,7 @@ export class SignalRPrivateEndpointConnections { * @param [options] The optional parameters * @returns Promise */ - beginDeleteMethod( - privateEndpointConnectionName: string, - resourceGroupName: string, - resourceName: string, - options?: msRest.RequestOptionsBase - ): Promise { + beginDeleteMethod(privateEndpointConnectionName: string, resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise { return this.client.sendLRORequest( { privateEndpointConnectionName, @@ -260,8 +175,7 @@ export class SignalRPrivateEndpointConnections { options }, beginDeleteMethodOperationSpec, - options - ); + options); } /** @@ -270,43 +184,26 @@ export class SignalRPrivateEndpointConnections { * @param [options] The optional parameters * @returns Promise */ - listNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase - ): Promise; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - listNext( - nextPageLink: string, - callback: msRest.ServiceCallback - ): void; + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param options The optional parameters * @param callback The callback */ - listNext( - nextPageLink: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listNext( - nextPageLink: string, - options?: - | msRest.RequestOptionsBase - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, listNextOperationSpec, - callback - ) as Promise; + callback) as Promise; } } @@ -314,11 +211,18 @@ export class SignalRPrivateEndpointConnections { const serializer = new msRest.Serializer(Mappers); const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/privateEndpointConnections", - urlParameters: [Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.resourceName], - queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/privateEndpointConnections", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.PrivateEndpointConnectionList @@ -332,16 +236,19 @@ const listOperationSpec: msRest.OperationSpec = { const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", urlParameters: [ Parameters.privateEndpointConnectionName, Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.resourceName ], - queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.PrivateEndpointConnection @@ -355,16 +262,19 @@ const getOperationSpec: msRest.OperationSpec = { const updateOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", urlParameters: [ Parameters.privateEndpointConnectionName, Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.resourceName ], - queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], requestBody: { parameterPath: "parameters", mapper: { @@ -385,16 +295,19 @@ const updateOperationSpec: msRest.OperationSpec = { const beginDeleteMethodOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", urlParameters: [ Parameters.privateEndpointConnectionName, Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.resourceName ], - queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: {}, 202: {}, @@ -410,9 +323,15 @@ const listNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", - urlParameters: [Parameters.nextPageLink], - queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.PrivateEndpointConnectionList diff --git a/sdk/signalr/arm-signalr/src/operations/signalRPrivateLinkResources.ts b/sdk/signalr/arm-signalr/src/operations/signalRPrivateLinkResources.ts index 4a2b0e86aed5..244c6518f569 100644 --- a/sdk/signalr/arm-signalr/src/operations/signalRPrivateLinkResources.ts +++ b/sdk/signalr/arm-signalr/src/operations/signalRPrivateLinkResources.ts @@ -33,22 +33,14 @@ export class SignalRPrivateLinkResources { * @param [options] The optional parameters * @returns Promise */ - list( - resourceGroupName: string, - resourceName: string, - options?: msRest.RequestOptionsBase - ): Promise; + list(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName The name of the resource group that contains the resource. You can * obtain this value from the Azure Resource Manager API or the portal. * @param resourceName The name of the resource. * @param callback The callback */ - list( - resourceGroupName: string, - resourceName: string, - callback: msRest.ServiceCallback - ): void; + list(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The name of the resource group that contains the resource. You can * obtain this value from the Azure Resource Manager API or the portal. @@ -56,18 +48,8 @@ export class SignalRPrivateLinkResources { * @param options The optional parameters * @param callback The callback */ - list( - resourceGroupName: string, - resourceName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - list( - resourceGroupName: string, - resourceName: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + list(resourceGroupName: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, @@ -75,8 +57,7 @@ export class SignalRPrivateLinkResources { options }, listOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -85,41 +66,26 @@ export class SignalRPrivateLinkResources { * @param [options] The optional parameters * @returns Promise */ - listNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase - ): Promise; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - listNext( - nextPageLink: string, - callback: msRest.ServiceCallback - ): void; + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param options The optional parameters * @param callback The callback */ - listNext( - nextPageLink: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, listNextOperationSpec, - callback - ) as Promise; + callback) as Promise; } } @@ -127,11 +93,18 @@ export class SignalRPrivateLinkResources { const serializer = new msRest.Serializer(Mappers); const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/privateLinkResources", - urlParameters: [Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.resourceName], - queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/privateLinkResources", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.PrivateLinkResourceList @@ -147,9 +120,15 @@ const listNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", - urlParameters: [Parameters.nextPageLink], - queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.PrivateLinkResourceList diff --git a/sdk/signalr/arm-signalr/src/operations/signalRSharedPrivateLinkResources.ts b/sdk/signalr/arm-signalr/src/operations/signalRSharedPrivateLinkResources.ts index 8f55d84f534c..9380b43bfa72 100644 --- a/sdk/signalr/arm-signalr/src/operations/signalRSharedPrivateLinkResources.ts +++ b/sdk/signalr/arm-signalr/src/operations/signalRSharedPrivateLinkResources.ts @@ -34,22 +34,14 @@ export class SignalRSharedPrivateLinkResources { * @param [options] The optional parameters * @returns Promise */ - list( - resourceGroupName: string, - resourceName: string, - options?: msRest.RequestOptionsBase - ): Promise; + list(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName The name of the resource group that contains the resource. You can * obtain this value from the Azure Resource Manager API or the portal. * @param resourceName The name of the resource. * @param callback The callback */ - list( - resourceGroupName: string, - resourceName: string, - callback: msRest.ServiceCallback - ): void; + list(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The name of the resource group that contains the resource. You can * obtain this value from the Azure Resource Manager API or the portal. @@ -57,20 +49,8 @@ export class SignalRSharedPrivateLinkResources { * @param options The optional parameters * @param callback The callback */ - list( - resourceGroupName: string, - resourceName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - list( - resourceGroupName: string, - resourceName: string, - options?: - | msRest.RequestOptionsBase - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + list(resourceGroupName: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, @@ -78,8 +58,7 @@ export class SignalRSharedPrivateLinkResources { options }, listOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -91,12 +70,7 @@ export class SignalRSharedPrivateLinkResources { * @param [options] The optional parameters * @returns Promise */ - get( - sharedPrivateLinkResourceName: string, - resourceGroupName: string, - resourceName: string, - options?: msRest.RequestOptionsBase - ): Promise; + get(sharedPrivateLinkResourceName: string, resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param sharedPrivateLinkResourceName The name of the shared private link resource * @param resourceGroupName The name of the resource group that contains the resource. You can @@ -104,12 +78,7 @@ export class SignalRSharedPrivateLinkResources { * @param resourceName The name of the resource. * @param callback The callback */ - get( - sharedPrivateLinkResourceName: string, - resourceGroupName: string, - resourceName: string, - callback: msRest.ServiceCallback - ): void; + get(sharedPrivateLinkResourceName: string, resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; /** * @param sharedPrivateLinkResourceName The name of the shared private link resource * @param resourceGroupName The name of the resource group that contains the resource. You can @@ -118,20 +87,8 @@ export class SignalRSharedPrivateLinkResources { * @param options The optional parameters * @param callback The callback */ - get( - sharedPrivateLinkResourceName: string, - resourceGroupName: string, - resourceName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - get( - sharedPrivateLinkResourceName: string, - resourceGroupName: string, - resourceName: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + get(sharedPrivateLinkResourceName: string, resourceGroupName: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(sharedPrivateLinkResourceName: string, resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { sharedPrivateLinkResourceName, @@ -140,8 +97,7 @@ export class SignalRSharedPrivateLinkResources { options }, getOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -154,22 +110,9 @@ export class SignalRSharedPrivateLinkResources { * @param [options] The optional parameters * @returns Promise */ - createOrUpdate( - sharedPrivateLinkResourceName: string, - parameters: Models.SharedPrivateLinkResource, - resourceGroupName: string, - resourceName: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginCreateOrUpdate( - sharedPrivateLinkResourceName, - parameters, - resourceGroupName, - resourceName, - options - ).then((lroPoller) => lroPoller.pollUntilFinished()) as Promise< - Models.SignalRSharedPrivateLinkResourcesCreateOrUpdateResponse - >; + createOrUpdate(sharedPrivateLinkResourceName: string, parameters: Models.SharedPrivateLinkResource, resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(sharedPrivateLinkResourceName,parameters,resourceGroupName,resourceName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } /** @@ -181,18 +124,9 @@ export class SignalRSharedPrivateLinkResources { * @param [options] The optional parameters * @returns Promise */ - deleteMethod( - sharedPrivateLinkResourceName: string, - resourceGroupName: string, - resourceName: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginDeleteMethod( - sharedPrivateLinkResourceName, - resourceGroupName, - resourceName, - options - ).then((lroPoller) => lroPoller.pollUntilFinished()); + deleteMethod(sharedPrivateLinkResourceName: string, resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(sharedPrivateLinkResourceName,resourceGroupName,resourceName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); } /** @@ -205,13 +139,7 @@ export class SignalRSharedPrivateLinkResources { * @param [options] The optional parameters * @returns Promise */ - beginCreateOrUpdate( - sharedPrivateLinkResourceName: string, - parameters: Models.SharedPrivateLinkResource, - resourceGroupName: string, - resourceName: string, - options?: msRest.RequestOptionsBase - ): Promise { + beginCreateOrUpdate(sharedPrivateLinkResourceName: string, parameters: Models.SharedPrivateLinkResource, resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise { return this.client.sendLRORequest( { sharedPrivateLinkResourceName, @@ -221,8 +149,7 @@ export class SignalRSharedPrivateLinkResources { options }, beginCreateOrUpdateOperationSpec, - options - ); + options); } /** @@ -234,12 +161,7 @@ export class SignalRSharedPrivateLinkResources { * @param [options] The optional parameters * @returns Promise */ - beginDeleteMethod( - sharedPrivateLinkResourceName: string, - resourceGroupName: string, - resourceName: string, - options?: msRest.RequestOptionsBase - ): Promise { + beginDeleteMethod(sharedPrivateLinkResourceName: string, resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise { return this.client.sendLRORequest( { sharedPrivateLinkResourceName, @@ -248,8 +170,7 @@ export class SignalRSharedPrivateLinkResources { options }, beginDeleteMethodOperationSpec, - options - ); + options); } /** @@ -258,43 +179,26 @@ export class SignalRSharedPrivateLinkResources { * @param [options] The optional parameters * @returns Promise */ - listNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase - ): Promise; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - listNext( - nextPageLink: string, - callback: msRest.ServiceCallback - ): void; + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param options The optional parameters * @param callback The callback */ - listNext( - nextPageLink: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listNext( - nextPageLink: string, - options?: - | msRest.RequestOptionsBase - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, listNextOperationSpec, - callback - ) as Promise; + callback) as Promise; } } @@ -302,11 +206,18 @@ export class SignalRSharedPrivateLinkResources { const serializer = new msRest.Serializer(Mappers); const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/sharedPrivateLinkResources", - urlParameters: [Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.resourceName], - queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/sharedPrivateLinkResources", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.SharedPrivateLinkResourceList @@ -320,16 +231,19 @@ const listOperationSpec: msRest.OperationSpec = { const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/sharedPrivateLinkResources/{sharedPrivateLinkResourceName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/sharedPrivateLinkResources/{sharedPrivateLinkResourceName}", urlParameters: [ Parameters.sharedPrivateLinkResourceName, Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.resourceName ], - queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.SharedPrivateLinkResource @@ -343,16 +257,19 @@ const getOperationSpec: msRest.OperationSpec = { const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/sharedPrivateLinkResources/{sharedPrivateLinkResourceName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/sharedPrivateLinkResources/{sharedPrivateLinkResourceName}", urlParameters: [ Parameters.sharedPrivateLinkResourceName, Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.resourceName ], - queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], requestBody: { parameterPath: "parameters", mapper: { @@ -376,16 +293,19 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { const beginDeleteMethodOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/sharedPrivateLinkResources/{sharedPrivateLinkResourceName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/sharedPrivateLinkResources/{sharedPrivateLinkResourceName}", urlParameters: [ Parameters.sharedPrivateLinkResourceName, Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.resourceName ], - queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: {}, 202: {}, @@ -401,9 +321,15 @@ const listNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", - urlParameters: [Parameters.nextPageLink], - queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.SharedPrivateLinkResourceList diff --git a/sdk/signalr/arm-signalr/src/operations/usages.ts b/sdk/signalr/arm-signalr/src/operations/usages.ts index f3fddd234648..282817bef03f 100644 --- a/sdk/signalr/arm-signalr/src/operations/usages.ts +++ b/sdk/signalr/arm-signalr/src/operations/usages.ts @@ -42,24 +42,15 @@ export class Usages { * @param options The optional parameters * @param callback The callback */ - list( - location: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - list( - location: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + list(location: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(location: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { location, options }, listOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -68,10 +59,7 @@ export class Usages { * @param [options] The optional parameters * @returns Promise */ - listNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase - ): Promise; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback @@ -82,24 +70,15 @@ export class Usages { * @param options The optional parameters * @param callback The callback */ - listNext( - nextPageLink: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, listNextOperationSpec, - callback - ) as Promise; + callback) as Promise; } } @@ -107,11 +86,17 @@ export class Usages { const serializer = new msRest.Serializer(Mappers); const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: - "subscriptions/{subscriptionId}/providers/Microsoft.SignalRService/locations/{location}/usages", - urlParameters: [Parameters.location, Parameters.subscriptionId], - queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + path: "subscriptions/{subscriptionId}/providers/Microsoft.SignalRService/locations/{location}/usages", + urlParameters: [ + Parameters.location, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.SignalRUsageList @@ -127,9 +112,15 @@ const listNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", - urlParameters: [Parameters.nextPageLink], - queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.SignalRUsageList diff --git a/sdk/signalr/arm-signalr/src/signalRManagementClient.ts b/sdk/signalr/arm-signalr/src/signalRManagementClient.ts index 8d164ba3d84f..6880eb577d4b 100644 --- a/sdk/signalr/arm-signalr/src/signalRManagementClient.ts +++ b/sdk/signalr/arm-signalr/src/signalRManagementClient.ts @@ -14,6 +14,7 @@ import * as Mappers from "./models/mappers"; import * as operations from "./operations"; import { SignalRManagementClientContext } from "./signalRManagementClientContext"; + class SignalRManagementClient extends SignalRManagementClientContext { // Operation groups operations: operations.Operations; @@ -35,11 +36,7 @@ class SignalRManagementClient extends SignalRManagementClientContext { * subscription. The subscription ID forms part of the URI for every service call. * @param [options] The parameter options */ - constructor( - credentials: msRest.ServiceClientCredentials | TokenCredential, - subscriptionId: string, - options?: Models.SignalRManagementClientOptions - ) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.SignalRManagementClientOptions) { super(credentials, subscriptionId, options); this.operations = new operations.Operations(this); this.signalR = new operations.SignalR(this); diff --git a/sdk/signalr/arm-signalr/src/signalRManagementClientContext.ts b/sdk/signalr/arm-signalr/src/signalRManagementClientContext.ts index d087e8bdb6ae..02ccc1d28438 100644 --- a/sdk/signalr/arm-signalr/src/signalRManagementClientContext.ts +++ b/sdk/signalr/arm-signalr/src/signalRManagementClientContext.ts @@ -9,11 +9,11 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; -import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; +import { TokenCredential } from "@azure/core-auth"; const packageName = "@azure/arm-signalr"; -const packageVersion = "4.1.0"; +const packageVersion = "4.2.0"; export class SignalRManagementClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials | TokenCredential; @@ -32,16 +32,12 @@ export class SignalRManagementClientContext extends msRestAzure.AzureServiceClie * subscription. The subscription ID forms part of the URI for every service call. * @param [options] The parameter options */ - constructor( - credentials: msRest.ServiceClientCredentials | TokenCredential, - subscriptionId: string, - options?: Models.SignalRManagementClientOptions - ) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.SignalRManagementClientOptions) { if (credentials == undefined) { - throw new Error("'credentials' cannot be null."); + throw new Error('\'credentials\' cannot be null.'); } if (subscriptionId == undefined) { - throw new Error("'subscriptionId' cannot be null."); + throw new Error('\'subscriptionId\' cannot be null.'); } if (!options) { @@ -54,8 +50,8 @@ export class SignalRManagementClientContext extends msRestAzure.AzureServiceClie super(credentials, options); - this.apiVersion = "2021-04-01-preview"; - this.acceptLanguage = "en-US"; + this.apiVersion = '2021-06-01-preview'; + this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; this.requestContentType = "application/json; charset=utf-8"; @@ -65,10 +61,7 @@ export class SignalRManagementClientContext extends msRestAzure.AzureServiceClie if (options.acceptLanguage !== null && options.acceptLanguage !== undefined) { this.acceptLanguage = options.acceptLanguage; } - if ( - options.longRunningOperationRetryTimeout !== null && - options.longRunningOperationRetryTimeout !== undefined - ) { + if (options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout; } } From f5b1f588c93a319ceae5897b9e311ca8d03ed20f Mon Sep 17 00:00:00 2001 From: colawwj <70128817+colawwj@users.noreply.github.com> Date: Fri, 23 Jul 2021 17:34:09 +0800 Subject: [PATCH 25/28] arm-postgresql-flexibleserver-release (#16473) --- .../arm-postgresql-flexible/package.json | 2 +- .../src/operations/checkNameAvailability.ts | 2 +- .../src/operations/configurations.ts | 8 ++++---- .../src/operations/databases.ts | 8 ++++---- .../src/operations/firewallRules.ts | 8 ++++---- .../src/operations/getPrivateDnsZoneSuffix.ts | 2 +- .../operations/locationBasedCapabilities.ts | 2 +- .../src/operations/operations.ts | 2 +- .../src/operations/servers.ts | 18 +++++++++--------- .../operations/virtualNetworkSubnetUsage.ts | 2 +- .../src/postgreSQLManagementClientContext.ts | 2 +- 11 files changed, 28 insertions(+), 28 deletions(-) diff --git a/sdk/postgresql/arm-postgresql-flexible/package.json b/sdk/postgresql/arm-postgresql-flexible/package.json index 04750712d11c..52a91db57acb 100644 --- a/sdk/postgresql/arm-postgresql-flexible/package.json +++ b/sdk/postgresql/arm-postgresql-flexible/package.json @@ -2,7 +2,7 @@ "name": "@azure/arm-postgresql-flexible", "author": "Microsoft Corporation", "description": "PostgreSQLManagementClient Library with typescript type definitions for node.js and browser.", - "version": "3.0.0", + "version": "3.1.0", "dependencies": { "@azure/ms-rest-azure-js": "^2.1.0", "@azure/ms-rest-js": "^2.2.0", diff --git a/sdk/postgresql/arm-postgresql-flexible/src/operations/checkNameAvailability.ts b/sdk/postgresql/arm-postgresql-flexible/src/operations/checkNameAvailability.ts index b91464de1da5..9f020ca094cc 100644 --- a/sdk/postgresql/arm-postgresql-flexible/src/operations/checkNameAvailability.ts +++ b/sdk/postgresql/arm-postgresql-flexible/src/operations/checkNameAvailability.ts @@ -61,7 +61,7 @@ export class CheckNameAvailability { const serializer = new msRest.Serializer(Mappers); const executeOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: "subscriptions/{subscriptionId}/providers/Microsoft.DBForPostgreSql/checkNameAvailability", + path: "subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/checkNameAvailability", urlParameters: [ Parameters.subscriptionId ], diff --git a/sdk/postgresql/arm-postgresql-flexible/src/operations/configurations.ts b/sdk/postgresql/arm-postgresql-flexible/src/operations/configurations.ts index 3c43d0482b49..20f14d23c6cd 100644 --- a/sdk/postgresql/arm-postgresql-flexible/src/operations/configurations.ts +++ b/sdk/postgresql/arm-postgresql-flexible/src/operations/configurations.ts @@ -199,7 +199,7 @@ export class Configurations { const serializer = new msRest.Serializer(Mappers); const listByServerOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/flexibleServers/{serverName}/configurations", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/configurations", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -224,7 +224,7 @@ const listByServerOperationSpec: msRest.OperationSpec = { const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/flexibleServers/{serverName}/configurations/{configurationName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/configurations/{configurationName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -250,7 +250,7 @@ const getOperationSpec: msRest.OperationSpec = { const beginUpdateOperationSpec: msRest.OperationSpec = { httpMethod: "PATCH", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/flexibleServers/{serverName}/configurations/{configurationName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/configurations/{configurationName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -284,7 +284,7 @@ const beginUpdateOperationSpec: msRest.OperationSpec = { const beginPutOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/flexibleServers/{serverName}/configurations/{configurationName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/configurations/{configurationName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, diff --git a/sdk/postgresql/arm-postgresql-flexible/src/operations/databases.ts b/sdk/postgresql/arm-postgresql-flexible/src/operations/databases.ts index 92c5fdc95bd9..bebe28f36f75 100644 --- a/sdk/postgresql/arm-postgresql-flexible/src/operations/databases.ts +++ b/sdk/postgresql/arm-postgresql-flexible/src/operations/databases.ts @@ -196,7 +196,7 @@ export class Databases { const serializer = new msRest.Serializer(Mappers); const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/flexibleServers/{serverName}/databases/{databaseName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/databases/{databaseName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -222,7 +222,7 @@ const getOperationSpec: msRest.OperationSpec = { const listByServerOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/flexibleServers/{serverName}/databases", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/databases", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -247,7 +247,7 @@ const listByServerOperationSpec: msRest.OperationSpec = { const beginCreateOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/flexibleServers/{serverName}/databases/{databaseName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/databases/{databaseName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -284,7 +284,7 @@ const beginCreateOperationSpec: msRest.OperationSpec = { const beginDeleteMethodOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/flexibleServers/{serverName}/databases/{databaseName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/databases/{databaseName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, diff --git a/sdk/postgresql/arm-postgresql-flexible/src/operations/firewallRules.ts b/sdk/postgresql/arm-postgresql-flexible/src/operations/firewallRules.ts index 82417e785e5b..2151076e3a5e 100644 --- a/sdk/postgresql/arm-postgresql-flexible/src/operations/firewallRules.ts +++ b/sdk/postgresql/arm-postgresql-flexible/src/operations/firewallRules.ts @@ -196,7 +196,7 @@ export class FirewallRules { const serializer = new msRest.Serializer(Mappers); const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/flexibleServers/{serverName}/firewallRules/{firewallRuleName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/firewallRules/{firewallRuleName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -222,7 +222,7 @@ const getOperationSpec: msRest.OperationSpec = { const listByServerOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/flexibleServers/{serverName}/firewallRules", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/firewallRules", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -247,7 +247,7 @@ const listByServerOperationSpec: msRest.OperationSpec = { const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/flexibleServers/{serverName}/firewallRules/{firewallRuleName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/firewallRules/{firewallRuleName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -284,7 +284,7 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { const beginDeleteMethodOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/flexibleServers/{serverName}/firewallRules/{firewallRuleName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/firewallRules/{firewallRuleName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, diff --git a/sdk/postgresql/arm-postgresql-flexible/src/operations/getPrivateDnsZoneSuffix.ts b/sdk/postgresql/arm-postgresql-flexible/src/operations/getPrivateDnsZoneSuffix.ts index cf523a0e02fd..7dea398a3c1e 100644 --- a/sdk/postgresql/arm-postgresql-flexible/src/operations/getPrivateDnsZoneSuffix.ts +++ b/sdk/postgresql/arm-postgresql-flexible/src/operations/getPrivateDnsZoneSuffix.ts @@ -54,7 +54,7 @@ export class GetPrivateDnsZoneSuffix { const serializer = new msRest.Serializer(Mappers); const executeOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: "providers/Microsoft.DBForPostgreSql/getPrivateDnsZoneSuffix", + path: "providers/Microsoft.DBforPostgreSQL/getPrivateDnsZoneSuffix", queryParameters: [ Parameters.apiVersion ], diff --git a/sdk/postgresql/arm-postgresql-flexible/src/operations/locationBasedCapabilities.ts b/sdk/postgresql/arm-postgresql-flexible/src/operations/locationBasedCapabilities.ts index 0bafacc33c84..e5bca6f1f56f 100644 --- a/sdk/postgresql/arm-postgresql-flexible/src/operations/locationBasedCapabilities.ts +++ b/sdk/postgresql/arm-postgresql-flexible/src/operations/locationBasedCapabilities.ts @@ -86,7 +86,7 @@ export class LocationBasedCapabilities { const serializer = new msRest.Serializer(Mappers); const executeOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.DBForPostgreSql/locations/{locationName}/capabilities", + path: "subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/locations/{locationName}/capabilities", urlParameters: [ Parameters.subscriptionId, Parameters.locationName diff --git a/sdk/postgresql/arm-postgresql-flexible/src/operations/operations.ts b/sdk/postgresql/arm-postgresql-flexible/src/operations/operations.ts index 155dbe32fe3d..daaf8cd717c7 100644 --- a/sdk/postgresql/arm-postgresql-flexible/src/operations/operations.ts +++ b/sdk/postgresql/arm-postgresql-flexible/src/operations/operations.ts @@ -54,7 +54,7 @@ export class Operations { const serializer = new msRest.Serializer(Mappers); const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "providers/Microsoft.DBForPostgreSql/operations", + path: "providers/Microsoft.DBforPostgreSQL/operations", queryParameters: [ Parameters.apiVersion ], diff --git a/sdk/postgresql/arm-postgresql-flexible/src/operations/servers.ts b/sdk/postgresql/arm-postgresql-flexible/src/operations/servers.ts index 03f8a8b190f3..13fc5c8cbb20 100644 --- a/sdk/postgresql/arm-postgresql-flexible/src/operations/servers.ts +++ b/sdk/postgresql/arm-postgresql-flexible/src/operations/servers.ts @@ -359,7 +359,7 @@ export class Servers { const serializer = new msRest.Serializer(Mappers); const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/flexibleServers/{serverName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -384,7 +384,7 @@ const getOperationSpec: msRest.OperationSpec = { const listByResourceGroupOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/flexibleServers", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName @@ -408,7 +408,7 @@ const listByResourceGroupOperationSpec: msRest.OperationSpec = { const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.DBForPostgreSql/flexibleServers", + path: "subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/flexibleServers", urlParameters: [ Parameters.subscriptionId ], @@ -431,7 +431,7 @@ const listOperationSpec: msRest.OperationSpec = { const beginCreateOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/flexibleServers/{serverName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -467,7 +467,7 @@ const beginCreateOperationSpec: msRest.OperationSpec = { const beginUpdateOperationSpec: msRest.OperationSpec = { httpMethod: "PATCH", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/flexibleServers/{serverName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -500,7 +500,7 @@ const beginUpdateOperationSpec: msRest.OperationSpec = { const beginDeleteMethodOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/flexibleServers/{serverName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -525,7 +525,7 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { const beginRestartOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/flexibleServers/{serverName}/restart", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/restart", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -556,7 +556,7 @@ const beginRestartOperationSpec: msRest.OperationSpec = { const beginStartOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/flexibleServers/{serverName}/start", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/start", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -580,7 +580,7 @@ const beginStartOperationSpec: msRest.OperationSpec = { const beginStopOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/flexibleServers/{serverName}/stop", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/stop", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, diff --git a/sdk/postgresql/arm-postgresql-flexible/src/operations/virtualNetworkSubnetUsage.ts b/sdk/postgresql/arm-postgresql-flexible/src/operations/virtualNetworkSubnetUsage.ts index dbd7f7574e1f..7ecdd2732e82 100644 --- a/sdk/postgresql/arm-postgresql-flexible/src/operations/virtualNetworkSubnetUsage.ts +++ b/sdk/postgresql/arm-postgresql-flexible/src/operations/virtualNetworkSubnetUsage.ts @@ -62,7 +62,7 @@ export class VirtualNetworkSubnetUsage { const serializer = new msRest.Serializer(Mappers); const executeOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: "subscriptions/{subscriptionId}/providers/Microsoft.DBForPostgreSql/locations/{locationName}/checkVirtualNetworkSubnetUsage", + path: "subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/locations/{locationName}/checkVirtualNetworkSubnetUsage", urlParameters: [ Parameters.subscriptionId, Parameters.locationName diff --git a/sdk/postgresql/arm-postgresql-flexible/src/postgreSQLManagementClientContext.ts b/sdk/postgresql/arm-postgresql-flexible/src/postgreSQLManagementClientContext.ts index 5366ffd5f270..df6a4bf10937 100644 --- a/sdk/postgresql/arm-postgresql-flexible/src/postgreSQLManagementClientContext.ts +++ b/sdk/postgresql/arm-postgresql-flexible/src/postgreSQLManagementClientContext.ts @@ -13,7 +13,7 @@ import * as msRestAzure from "@azure/ms-rest-azure-js"; import { TokenCredential } from "@azure/core-auth"; const packageName = "@azure/arm-postgresql-flexible"; -const packageVersion = "3.0.0"; +const packageVersion = "3.1.0"; export class PostgreSQLManagementClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials | TokenCredential; From a234e09f01f4b5a2f170e0a078df74c7b0aedb5d Mon Sep 17 00:00:00 2001 From: colawwj <70128817+colawwj@users.noreply.github.com> Date: Wed, 28 Jul 2021 08:57:08 +0800 Subject: [PATCH 26/28] arm-mediaservices-release (#16421) --- sdk/mediaservices/arm-mediaservices/README.md | 20 +- .../arm-mediaservices/package.json | 4 +- .../src/azureMediaServices.ts | 4 +- .../src/azureMediaServicesContext.ts | 6 +- .../src/models/accountFiltersMappers.ts | 10 +- .../src/models/assetFiltersMappers.ts | 10 +- .../src/models/assetsMappers.ts | 10 +- .../src/models/contentKeyPoliciesMappers.ts | 10 +- .../arm-mediaservices/src/models/index.ts | 1074 +++++++----- .../src/models/jobsMappers.ts | 10 +- .../src/models/liveEventsMappers.ts | 10 +- .../src/models/liveOutputsMappers.ts | 10 +- .../src/models/locationsMappers.ts | 5 +- .../arm-mediaservices/src/models/mappers.ts | 1534 ++++++++++------- .../src/models/mediaservicesMappers.ts | 11 +- .../src/models/operationsMappers.ts | 5 +- .../privateEndpointConnectionsMappers.ts | 10 +- .../src/models/privateLinkResourcesMappers.ts | 10 +- .../src/models/streamingEndpointsMappers.ts | 10 +- .../src/models/streamingLocatorsMappers.ts | 10 +- .../src/models/streamingPoliciesMappers.ts | 10 +- .../src/models/transformsMappers.ts | 10 +- .../src/operations/accountFilters.ts | 13 +- .../src/operations/assetFilters.ts | 13 +- .../src/operations/assets.ts | 19 +- .../src/operations/contentKeyPolicies.ts | 16 +- .../arm-mediaservices/src/operations/index.ts | 2 +- .../arm-mediaservices/src/operations/jobs.ts | 15 +- .../src/operations/liveEvents.ts | 21 +- .../src/operations/liveOutputs.ts | 11 +- .../src/operations/locations.ts | 2 +- .../src/operations/mediaservices.ts | 83 +- .../src/operations/operations.ts | 55 +- .../operations/privateEndpointConnections.ts | 9 +- .../src/operations/privateLinkResources.ts | 4 +- .../src/operations/streamingEndpoints.ts | 19 +- .../src/operations/streamingLocators.ts | 15 +- .../src/operations/streamingPolicies.ts | 11 +- .../src/operations/transforms.ts | 13 +- 39 files changed, 1830 insertions(+), 1284 deletions(-) diff --git a/sdk/mediaservices/arm-mediaservices/README.md b/sdk/mediaservices/arm-mediaservices/README.md index 3c961aee4d08..4f0d31548ef1 100644 --- a/sdk/mediaservices/arm-mediaservices/README.md +++ b/sdk/mediaservices/arm-mediaservices/README.md @@ -1,11 +1,11 @@ ## Azure AzureMediaServices SDK for JavaScript -This package contains an isomorphic SDK (runs both in Node.js and in browsers) for AzureMediaServices. +This package contains an isomorphic SDK (runs both in node.js and in browsers) for AzureMediaServices. ### Currently supported environments - [LTS versions of Node.js](https://nodejs.org/about/releases/) -- Latest versions of Safari, Chrome, Edge, and Firefox. +- Latest versions of Safari, Chrome, Edge and Firefox. ### Prerequisites @@ -21,7 +21,6 @@ Install both packages using the below command: ```bash npm install --save @azure/arm-mediaservices @azure/identity ``` - > **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. @@ -37,8 +36,7 @@ If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/ In the below samples, we pass the credential and the Azure subscription id to instantiate the client. Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. - -#### nodejs - Authentication, client creation, and list accountFilters as an example written in JavaScript. +#### nodejs - Authentication, client creation, and list operations as an example written in JavaScript. ##### Sample code @@ -51,9 +49,7 @@ const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; // Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. const creds = new DefaultAzureCredential(); const client = new AzureMediaServices(creds, subscriptionId); -const resourceGroupName = "testresourceGroupName"; -const accountName = "testaccountName"; -client.accountFilters.list(resourceGroupName, accountName).then((result) => { +client.operations.list().then((result) => { console.log("The result is:"); console.log(result); }).catch((err) => { @@ -62,7 +58,7 @@ client.accountFilters.list(resourceGroupName, accountName).then((result) => { }); ``` -#### browser - Authentication, client creation, and list accountFilters as an example written in JavaScript. +#### browser - Authentication, client creation, and list operations as an example written in JavaScript. In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. @@ -87,12 +83,10 @@ In browser applications, we recommend using the `InteractiveBrowserCredential` t const credential = new InteractiveBrowserCredential( { clientId: "", - tenantId: "" + tenant: "" }); const client = new Azure.ArmMediaservices.AzureMediaServices(creds, subscriptionId); - const resourceGroupName = "testresourceGroupName"; - const accountName = "testaccountName"; - client.accountFilters.list(resourceGroupName, accountName).then((result) => { + client.operations.list().then((result) => { console.log("The result is:"); console.log(result); }).catch((err) => { diff --git a/sdk/mediaservices/arm-mediaservices/package.json b/sdk/mediaservices/arm-mediaservices/package.json index a419ba2f8db6..4d0bc3598bcf 100644 --- a/sdk/mediaservices/arm-mediaservices/package.json +++ b/sdk/mediaservices/arm-mediaservices/package.json @@ -2,7 +2,7 @@ "name": "@azure/arm-mediaservices", "author": "Microsoft Corporation", "description": "AzureMediaServices Library with typescript type definitions for node.js and browser.", - "version": "8.2.0", + "version": "9.0.0", "dependencies": { "@azure/ms-rest-azure-js": "^2.1.0", "@azure/ms-rest-js": "^2.2.0", @@ -27,7 +27,7 @@ "rollup-plugin-sourcemaps": "^0.4.2", "uglify-js": "^3.6.0" }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/mediaservices/arm-mediaservices", + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/feature/v4/sdk/mediaservices/arm-mediaservices", "repository": { "type": "git", "url": "https://github.com/Azure/azure-sdk-for-js.git" diff --git a/sdk/mediaservices/arm-mediaservices/src/azureMediaServices.ts b/sdk/mediaservices/arm-mediaservices/src/azureMediaServices.ts index 126a25b0934f..076ed4d2aa10 100644 --- a/sdk/mediaservices/arm-mediaservices/src/azureMediaServices.ts +++ b/sdk/mediaservices/arm-mediaservices/src/azureMediaServices.ts @@ -17,12 +17,12 @@ import { AzureMediaServicesContext } from "./azureMediaServicesContext"; class AzureMediaServices extends AzureMediaServicesContext { // Operation groups - accountFilters: operations.AccountFilters; operations: operations.Operations; mediaservices: operations.Mediaservices; privateLinkResources: operations.PrivateLinkResources; privateEndpointConnections: operations.PrivateEndpointConnections; locations: operations.Locations; + accountFilters: operations.AccountFilters; assets: operations.Assets; assetFilters: operations.AssetFilters; contentKeyPolicies: operations.ContentKeyPolicies; @@ -47,12 +47,12 @@ class AzureMediaServices extends AzureMediaServicesContext { */ constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.AzureMediaServicesOptions) { super(credentials, subscriptionId, options); - this.accountFilters = new operations.AccountFilters(this); this.operations = new operations.Operations(this); this.mediaservices = new operations.Mediaservices(this); this.privateLinkResources = new operations.PrivateLinkResources(this); this.privateEndpointConnections = new operations.PrivateEndpointConnections(this); this.locations = new operations.Locations(this); + this.accountFilters = new operations.AccountFilters(this); this.assets = new operations.Assets(this); this.assetFilters = new operations.AssetFilters(this); this.contentKeyPolicies = new operations.ContentKeyPolicies(this); diff --git a/sdk/mediaservices/arm-mediaservices/src/azureMediaServicesContext.ts b/sdk/mediaservices/arm-mediaservices/src/azureMediaServicesContext.ts index 2184590a3d49..460275873a85 100644 --- a/sdk/mediaservices/arm-mediaservices/src/azureMediaServicesContext.ts +++ b/sdk/mediaservices/arm-mediaservices/src/azureMediaServicesContext.ts @@ -9,11 +9,11 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; -import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; +import { TokenCredential } from "@azure/core-auth"; const packageName = "@azure/arm-mediaservices"; -const packageVersion = "8.2.0"; +const packageVersion = "9.0.0"; export class AzureMediaServicesContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials | TokenCredential; @@ -49,7 +49,7 @@ export class AzureMediaServicesContext extends msRestAzure.AzureServiceClient { super(credentials, options); - this.apiVersion = '2020-05-01'; + this.apiVersion = '2021-06-01'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; diff --git a/sdk/mediaservices/arm-mediaservices/src/models/accountFiltersMappers.ts b/sdk/mediaservices/arm-mediaservices/src/models/accountFiltersMappers.ts index d60c29f2effc..a55729948798 100644 --- a/sdk/mediaservices/arm-mediaservices/src/models/accountFiltersMappers.ts +++ b/sdk/mediaservices/arm-mediaservices/src/models/accountFiltersMappers.ts @@ -10,12 +10,12 @@ export { discriminators, AacAudio, AbsoluteClipTime, + AccessControl, AccountEncryption, AccountFilter, AccountFilterCollection, AkamaiAccessControl, AkamaiSignatureHeaderAuthenticationKey, - ApiError, Asset, AssetFilter, Audio, @@ -62,6 +62,9 @@ export { Deinterlace, EnabledProtocols, EnvelopeEncryption, + ErrorAdditionalInfo, + ErrorDetail, + ErrorResponse, FaceDetectorPreset, Filters, FilterTrackPropertyCondition, @@ -96,6 +99,7 @@ export { JpgFormat, JpgImage, JpgLayer, + KeyDelivery, KeyVaultProperties, Layer, LiveEvent, @@ -114,7 +118,6 @@ export { Mp4Format, MultiBitrateFormat, NoEncryption, - ODataError, OutputFile, Overlay, PngFormat, @@ -122,6 +125,7 @@ export { PngLayer, PresentationTimeRange, Preset, + PresetConfigurations, PrivateEndpoint, PrivateEndpointConnection, PrivateLinkResource, @@ -129,6 +133,7 @@ export { ProxyResource, Rectangle, Resource, + ResourceIdentity, SelectAudioTrackByAttribute, SelectAudioTrackById, SelectVideoTrackByAttribute, @@ -153,6 +158,7 @@ export { Transform, TransformOutput, TransportStreamFormat, + UserAssignedManagedIdentity, UtcClipTime, Video, VideoAnalyzerPreset, diff --git a/sdk/mediaservices/arm-mediaservices/src/models/assetFiltersMappers.ts b/sdk/mediaservices/arm-mediaservices/src/models/assetFiltersMappers.ts index 697cf82d0937..606952a2c530 100644 --- a/sdk/mediaservices/arm-mediaservices/src/models/assetFiltersMappers.ts +++ b/sdk/mediaservices/arm-mediaservices/src/models/assetFiltersMappers.ts @@ -10,11 +10,11 @@ export { discriminators, AacAudio, AbsoluteClipTime, + AccessControl, AccountEncryption, AccountFilter, AkamaiAccessControl, AkamaiSignatureHeaderAuthenticationKey, - ApiError, Asset, AssetFilter, AssetFilterCollection, @@ -62,6 +62,9 @@ export { Deinterlace, EnabledProtocols, EnvelopeEncryption, + ErrorAdditionalInfo, + ErrorDetail, + ErrorResponse, FaceDetectorPreset, Filters, FilterTrackPropertyCondition, @@ -96,6 +99,7 @@ export { JpgFormat, JpgImage, JpgLayer, + KeyDelivery, KeyVaultProperties, Layer, LiveEvent, @@ -114,7 +118,6 @@ export { Mp4Format, MultiBitrateFormat, NoEncryption, - ODataError, OutputFile, Overlay, PngFormat, @@ -122,6 +125,7 @@ export { PngLayer, PresentationTimeRange, Preset, + PresetConfigurations, PrivateEndpoint, PrivateEndpointConnection, PrivateLinkResource, @@ -129,6 +133,7 @@ export { ProxyResource, Rectangle, Resource, + ResourceIdentity, SelectAudioTrackByAttribute, SelectAudioTrackById, SelectVideoTrackByAttribute, @@ -153,6 +158,7 @@ export { Transform, TransformOutput, TransportStreamFormat, + UserAssignedManagedIdentity, UtcClipTime, Video, VideoAnalyzerPreset, diff --git a/sdk/mediaservices/arm-mediaservices/src/models/assetsMappers.ts b/sdk/mediaservices/arm-mediaservices/src/models/assetsMappers.ts index fb80963b65ee..afcc66926381 100644 --- a/sdk/mediaservices/arm-mediaservices/src/models/assetsMappers.ts +++ b/sdk/mediaservices/arm-mediaservices/src/models/assetsMappers.ts @@ -10,11 +10,11 @@ export { discriminators, AacAudio, AbsoluteClipTime, + AccessControl, AccountEncryption, AccountFilter, AkamaiAccessControl, AkamaiSignatureHeaderAuthenticationKey, - ApiError, Asset, AssetCollection, AssetContainerSas, @@ -65,6 +65,9 @@ export { Deinterlace, EnabledProtocols, EnvelopeEncryption, + ErrorAdditionalInfo, + ErrorDetail, + ErrorResponse, FaceDetectorPreset, Filters, FilterTrackPropertyCondition, @@ -99,6 +102,7 @@ export { JpgFormat, JpgImage, JpgLayer, + KeyDelivery, KeyVaultProperties, Layer, ListContainerSasInput, @@ -119,7 +123,6 @@ export { Mp4Format, MultiBitrateFormat, NoEncryption, - ODataError, OutputFile, Overlay, PngFormat, @@ -127,6 +130,7 @@ export { PngLayer, PresentationTimeRange, Preset, + PresetConfigurations, PrivateEndpoint, PrivateEndpointConnection, PrivateLinkResource, @@ -134,6 +138,7 @@ export { ProxyResource, Rectangle, Resource, + ResourceIdentity, SelectAudioTrackByAttribute, SelectAudioTrackById, SelectVideoTrackByAttribute, @@ -159,6 +164,7 @@ export { Transform, TransformOutput, TransportStreamFormat, + UserAssignedManagedIdentity, UtcClipTime, Video, VideoAnalyzerPreset, diff --git a/sdk/mediaservices/arm-mediaservices/src/models/contentKeyPoliciesMappers.ts b/sdk/mediaservices/arm-mediaservices/src/models/contentKeyPoliciesMappers.ts index 942f779596d7..734862c3a662 100644 --- a/sdk/mediaservices/arm-mediaservices/src/models/contentKeyPoliciesMappers.ts +++ b/sdk/mediaservices/arm-mediaservices/src/models/contentKeyPoliciesMappers.ts @@ -10,11 +10,11 @@ export { discriminators, AacAudio, AbsoluteClipTime, + AccessControl, AccountEncryption, AccountFilter, AkamaiAccessControl, AkamaiSignatureHeaderAuthenticationKey, - ApiError, Asset, AssetFilter, Audio, @@ -63,6 +63,9 @@ export { Deinterlace, EnabledProtocols, EnvelopeEncryption, + ErrorAdditionalInfo, + ErrorDetail, + ErrorResponse, FaceDetectorPreset, Filters, FilterTrackPropertyCondition, @@ -97,6 +100,7 @@ export { JpgFormat, JpgImage, JpgLayer, + KeyDelivery, KeyVaultProperties, Layer, LiveEvent, @@ -115,7 +119,6 @@ export { Mp4Format, MultiBitrateFormat, NoEncryption, - ODataError, OutputFile, Overlay, PngFormat, @@ -123,6 +126,7 @@ export { PngLayer, PresentationTimeRange, Preset, + PresetConfigurations, PrivateEndpoint, PrivateEndpointConnection, PrivateLinkResource, @@ -130,6 +134,7 @@ export { ProxyResource, Rectangle, Resource, + ResourceIdentity, SelectAudioTrackByAttribute, SelectAudioTrackById, SelectVideoTrackByAttribute, @@ -154,6 +159,7 @@ export { Transform, TransformOutput, TransportStreamFormat, + UserAssignedManagedIdentity, UtcClipTime, Video, VideoAnalyzerPreset, diff --git a/sdk/mediaservices/arm-mediaservices/src/models/index.ts b/sdk/mediaservices/arm-mediaservices/src/models/index.ts index b95d6945fcc0..53dd506f390c 100644 --- a/sdk/mediaservices/arm-mediaservices/src/models/index.ts +++ b/sdk/mediaservices/arm-mediaservices/src/models/index.ts @@ -11,233 +11,6 @@ import * as msRest from "@azure/ms-rest-js"; export { BaseResource, CloudError }; -/** - * The presentation time range, this is asset related and not recommended for Account Filter. - */ -export interface PresentationTimeRange { - /** - * The absolute start time boundary. - */ - startTimestamp?: number; - /** - * The absolute end time boundary. - */ - endTimestamp?: number; - /** - * The relative to end sliding window. - */ - presentationWindowDuration?: number; - /** - * The relative to end right edge. - */ - liveBackoffDuration?: number; - /** - * The time scale of time stamps. - */ - timescale?: number; - /** - * The indicator of forcing existing of end time stamp. - */ - forceEndTimestamp?: boolean; -} - -/** - * The class to specify one track property condition. - */ -export interface FilterTrackPropertyCondition { - /** - * The track property type. Possible values include: 'Unknown', 'Type', 'Name', 'Language', - * 'FourCC', 'Bitrate' - */ - property: FilterTrackPropertyType; - /** - * The track property value. - */ - value: string; - /** - * The track property condition operation. Possible values include: 'Equal', 'NotEqual' - */ - operation: FilterTrackPropertyCompareOperation; -} - -/** - * Filter First Quality - */ -export interface FirstQuality { - /** - * The first quality bitrate. - */ - bitrate: number; -} - -/** - * Representing a list of FilterTrackPropertyConditions to select a track. The filters are - * combined using a logical AND operation. - */ -export interface FilterTrackSelection { - /** - * The track selections. - */ - trackSelections: FilterTrackPropertyCondition[]; -} - -/** - * 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. Possible values include: 'User', - * 'Application', 'ManagedIdentity', 'Key' - */ - 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. Possible values include: 'User', - * 'Application', 'ManagedIdentity', 'Key' - */ - lastModifiedByType?: CreatedByType; - /** - * The timestamp of resource last modification (UTC) - */ - lastModifiedAt?: Date; -} - -/** - * Common fields that are returned in the response for all Azure Resource Manager resources - * @summary Resource - */ -export interface Resource extends BaseResource { - /** - * Fully qualified resource ID for the resource. Ex - - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly id?: string; - /** - * The name of the resource - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly name?: string; - /** - * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - * "Microsoft.Storage/storageAccounts" - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly type?: string; -} - -/** - * The resource model definition for a Azure Resource Manager proxy resource. It will not have tags - * and a location - * @summary Proxy Resource - */ -export interface ProxyResource extends Resource { -} - -/** - * An Account Filter. - */ -export interface AccountFilter extends ProxyResource { - /** - * The presentation time range. - */ - presentationTimeRange?: PresentationTimeRange; - /** - * The first quality. - */ - firstQuality?: FirstQuality; - /** - * The tracks selection conditions. - */ - tracks?: FilterTrackSelection[]; - /** - * The system metadata relating to this resource. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly systemData?: SystemData; -} - -/** - * Information about an error. - */ -export interface ODataError { - /** - * A language-independent error name. - */ - code?: string; - /** - * The error message. - */ - message?: string; - /** - * The target of the error (for example, the name of the property in error). - */ - target?: string; - /** - * The error details. - */ - details?: ODataError[]; -} - -/** - * The API error. - */ -export interface ApiError { - /** - * The error properties. - */ - error?: ODataError; -} - -/** - * The resource model definition for an Azure Resource Manager tracked top level resource which has - * 'tags' and a 'location' - * @summary Tracked Resource - */ -export interface TrackedResource extends Resource { - /** - * Resource tags. - */ - tags?: { [propertyName: string]: string }; - /** - * The geo-location where the resource lives - */ - location: string; -} - -/** - * The resource model definition for an Azure Resource Manager resource with an etag. - * @summary Entity Resource - */ -export interface AzureEntityResource extends Resource { - /** - * Resource Etag. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly etag?: string; -} - -/** - * A resource provider. - */ -export interface Provider { - /** - * The provider name. - */ - providerName: string; -} - /** * Operation details. */ @@ -324,6 +97,26 @@ export interface MetricSpecification { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly dimensions?: MetricDimension[]; + /** + * Indicates whether regional MDM account is enabled. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly enableRegionalMdmAccount?: boolean; + /** + * The source MDM account. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly sourceMdmAccount?: string; + /** + * The source MDM namespace. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly sourceMdmNamespace?: string; + /** + * The supported time grain types. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly supportedTimeGrainTypes?: string[]; } /** @@ -394,13 +187,14 @@ export interface Operation { * Operation properties format. */ properties?: Properties; -} - -/** - * An interface representing Location. - */ -export interface Location { - name: string; + /** + * Whether the operation applies to data-plane. + */ + isDataAction?: boolean; + /** + * Indicates the action type. Possible values include: 'Internal' + */ + actionType?: ActionType; } /** @@ -421,6 +215,21 @@ export interface EntityNameAvailabilityCheckOutput { message?: string; } +/** + * An interface representing ResourceIdentity. + */ +export interface ResourceIdentity { + /** + * The user assigned managed identity's ARM ID to use when accessing a resource. + */ + userAssignedIdentity?: string; + /** + * Indicates whether to use System Assigned Managed Identity. Mutual exclusive with User Assigned + * Managed Identity. + */ + useSystemAssignedIdentity: boolean; +} + /** * The storage account details. */ @@ -436,6 +245,15 @@ export interface StorageAccount { * The type of the storage account. Possible values include: 'Primary', 'Secondary' */ type: StorageAccountType; + /** + * The storage account identity. + */ + identity?: ResourceIdentity; + /** + * The current status of the storage account mapping. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly status?: string; } /** @@ -445,65 +263,236 @@ export interface SyncStorageKeysInput { /** * The ID of the storage account resource. */ - id?: string; + id?: string; +} + +/** + * An interface representing KeyVaultProperties. + */ +export interface KeyVaultProperties { + /** + * The URL of the Key Vault key used to encrypt the account. The key may either be versioned (for + * example https://vault/keys/mykey/version1) or reference a key without a version (for example + * https://vault/keys/mykey). + */ + keyIdentifier?: string; + /** + * The current key used to encrypt the Media Services account, including the key version. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly currentKeyIdentifier?: string; +} + +/** + * An interface representing AccountEncryption. + */ +export interface AccountEncryption { + /** + * The type of key used to encrypt the Account Key. Possible values include: 'SystemKey', + * 'CustomerKey' + */ + type: AccountEncryptionKeyType; + /** + * The properties of the key used to encrypt the account. + */ + keyVaultProperties?: KeyVaultProperties; + /** + * The Key Vault identity. + */ + identity?: ResourceIdentity; + /** + * The current status of the Key Vault mapping. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly status?: string; +} + +/** + * An interface representing AccessControl. + */ +export interface AccessControl { + /** + * The behavior for IP access control in Key Delivery. Possible values include: 'Allow', 'Deny' + */ + defaultAction?: DefaultAction; + /** + * The IP allow list for access control in Key Delivery. If the default action is set to 'Allow', + * the IP allow list must be empty. + */ + ipAllowList?: string[]; +} + +/** + * An interface representing KeyDelivery. + */ +export interface KeyDelivery { + /** + * The access control properties for Key Delivery. + */ + accessControl?: AccessControl; +} + +/** + * An interface representing UserAssignedManagedIdentity. + */ +export interface UserAssignedManagedIdentity { + /** + * The client ID. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly clientId?: string; + /** + * The principal ID. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly principalId?: string; +} + +/** + * An interface representing MediaServiceIdentity. + */ +export interface MediaServiceIdentity { + /** + * The identity type. + */ + type: string; + /** + * The Principal ID of the identity. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly principalId?: string; + /** + * The Tenant ID of the identity. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly tenantId?: string; + /** + * The user assigned managed identities. + */ + userAssignedIdentities?: { [propertyName: string]: UserAssignedManagedIdentity }; +} + +/** + * 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. Possible values include: 'User', + * 'Application', 'ManagedIdentity', 'Key' + */ + 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. Possible values include: 'User', + * 'Application', 'ManagedIdentity', 'Key' + */ + lastModifiedByType?: CreatedByType; + /** + * The timestamp of resource last modification (UTC) + */ + lastModifiedAt?: Date; +} + +/** + * Common fields that are returned in the response for all Azure Resource Manager resources + * @summary Resource + */ +export interface Resource extends BaseResource { + /** + * Fully qualified resource ID for the resource. Ex - + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * The name of the resource + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + * "Microsoft.Storage/storageAccounts" + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; } /** - * An interface representing KeyVaultProperties. + * The resource model definition for an Azure Resource Manager tracked top level resource which has + * 'tags' and a 'location' + * @summary Tracked Resource */ -export interface KeyVaultProperties { +export interface TrackedResource extends Resource { /** - * The URL of the Key Vault key used to encrypt the account. The key may either be versioned (for - * example https://vault/keys/mykey/version1) or reference a key without a version (for example - * https://vault/keys/mykey). + * Resource tags. */ - keyIdentifier?: string; + tags?: { [propertyName: string]: string }; /** - * The current key used to encrypt the Media Services account, including the key version. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The geo-location where the resource lives */ - readonly currentKeyIdentifier?: string; + location: string; } /** - * An interface representing AccountEncryption. + * A Media Services account. */ -export interface AccountEncryption { +export interface MediaService extends TrackedResource { /** - * The type of key used to encrypt the Account Key. Possible values include: 'SystemKey', - * 'CustomerKey' + * The Media Services account ID. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - type: AccountEncryptionKeyType; + readonly mediaServiceId?: string; /** - * The properties of the key used to encrypt the account. + * The storage accounts for this resource. */ - keyVaultProperties?: KeyVaultProperties; -} - -/** - * An interface representing MediaServiceIdentity. - */ -export interface MediaServiceIdentity { + storageAccounts?: StorageAccount[]; /** - * The identity type. Possible values include: 'SystemAssigned', 'None' + * Possible values include: 'System', 'ManagedIdentity' */ - type: ManagedIdentityType; + storageAuthentication?: StorageAuthentication; /** - * The Principal ID of the identity. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The account encryption properties. */ - readonly principalId?: string; + encryption?: AccountEncryption; /** - * The Tenant ID of the identity. + * The Key Delivery properties for Media Services account. + */ + keyDelivery?: KeyDelivery; + /** + * Whether or not public network access is allowed for resources under the Media Services + * account. Possible values include: 'Enabled', 'Disabled' + */ + publicNetworkAccess?: PublicNetworkAccess; + /** + * The Managed Identity for the Media Services account. + */ + identity?: MediaServiceIdentity; + /** + * The system metadata relating to this resource. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly tenantId?: string; + readonly systemData?: SystemData; } /** - * A Media Services account. + * A Media Services account update. */ -export interface MediaService extends TrackedResource { +export interface MediaServiceUpdate { + /** + * Resource tags. + */ + tags?: { [propertyName: string]: string }; /** * The Media Services account ID. * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -522,14 +511,18 @@ export interface MediaService extends TrackedResource { */ encryption?: AccountEncryption; /** - * The Managed Identity for the Media Services account. + * The Key Delivery properties for Media Services account. */ - identity?: MediaServiceIdentity; + keyDelivery?: KeyDelivery; /** - * The system metadata relating to this resource. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Whether or not public network access is allowed for resources under the Media Services + * account. Possible values include: 'Enabled', 'Disabled' */ - readonly systemData?: SystemData; + publicNetworkAccess?: PublicNetworkAccess; + /** + * The Managed Identity for the Media Services account. + */ + identity?: MediaServiceIdentity; } /** @@ -590,6 +583,16 @@ export interface EdgePolicies { usageDataCollectionPolicy?: EdgeUsageDataCollectionPolicy; } +/** + * A collection of Operation items. + */ +export interface OperationCollection { + /** + * A collection of Operation items. + */ + value?: Operation[]; +} + /** * The input to the check name availability request. */ @@ -604,6 +607,85 @@ export interface CheckNameAvailabilityInput { type?: string; } +/** + * The resource management error additional info. + */ +export interface ErrorAdditionalInfo { + /** + * The additional info type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * The additional info. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly info?: any; +} + +/** + * The error detail. + */ +export interface ErrorDetail { + /** + * The error code. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly code?: string; + /** + * The error message. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly message?: string; + /** + * The error target. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly target?: string; + /** + * The error details. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly details?: ErrorDetail[]; + /** + * The error additional info. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly additionalInfo?: ErrorAdditionalInfo[]; +} + +/** + * Common error response for all Azure Resource Manager APIs to return error details for failed + * operations. (This also follows the OData error response format.). + * @summary Error response + */ +export interface ErrorResponse { + /** + * The error object. + */ + error?: ErrorDetail; +} + +/** + * The resource model definition for a Azure Resource Manager proxy resource. It will not have tags + * and a location + * @summary Proxy Resource + */ +export interface ProxyResource extends Resource { +} + +/** + * The resource model definition for an Azure Resource Manager resource with an etag. + * @summary Entity Resource + */ +export interface AzureEntityResource extends Resource { + /** + * Resource Etag. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly etag?: string; +} + /** * A collection of information about the state of the connection between service consumer and * provider. @@ -695,6 +777,99 @@ export interface PrivateLinkResourceListResult { value?: PrivateLinkResource[]; } +/** + * The presentation time range, this is asset related and not recommended for Account Filter. + */ +export interface PresentationTimeRange { + /** + * The absolute start time boundary. + */ + startTimestamp?: number; + /** + * The absolute end time boundary. + */ + endTimestamp?: number; + /** + * The relative to end sliding window. + */ + presentationWindowDuration?: number; + /** + * The relative to end right edge. + */ + liveBackoffDuration?: number; + /** + * The time scale of time stamps. + */ + timescale?: number; + /** + * The indicator of forcing existing of end time stamp. + */ + forceEndTimestamp?: boolean; +} + +/** + * The class to specify one track property condition. + */ +export interface FilterTrackPropertyCondition { + /** + * The track property type. Possible values include: 'Unknown', 'Type', 'Name', 'Language', + * 'FourCC', 'Bitrate' + */ + property: FilterTrackPropertyType; + /** + * The track property value. + */ + value: string; + /** + * The track property condition operation. Possible values include: 'Equal', 'NotEqual' + */ + operation: FilterTrackPropertyCompareOperation; +} + +/** + * Filter First Quality + */ +export interface FirstQuality { + /** + * The first quality bitrate. + */ + bitrate: number; +} + +/** + * Representing a list of FilterTrackPropertyConditions to select a track. The filters are + * combined using a logical AND operation. + */ +export interface FilterTrackSelection { + /** + * The track selections. + */ + trackSelections: FilterTrackPropertyCondition[]; +} + +/** + * An Account Filter. + */ +export interface AccountFilter extends ProxyResource { + /** + * The presentation time range. + */ + presentationTimeRange?: PresentationTimeRange; + /** + * The first quality. + */ + firstQuality?: FirstQuality; + /** + * The tracks selection conditions. + */ + tracks?: FilterTrackSelection[]; + /** + * The system metadata relating to this resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly systemData?: SystemData; +} + /** * The Asset Storage container SAS URLs. */ @@ -2835,11 +3010,61 @@ export interface PngImage { * at half of stream duration from start time). The default value is 100%, which means to stop at * the end of the stream. */ - range?: string; + range?: string; + /** + * A collection of output PNG image layers to be produced by the encoder. + */ + layers?: PngLayer[]; +} + +/** + * An object of optional configuration settings for encoder. + */ +export interface PresetConfigurations { + /** + * Allows you to configure the encoder settings to control the balance between speed and quality. + * Example: set Complexity as Speed for faster encoding but less compression efficiency. Possible + * values include: 'Speed', 'Balanced', 'Quality' + */ + complexity?: Complexity; + /** + * Sets the interleave mode of the output to control how audio and video are stored in the + * container format. Example: set InterleavedOutput as NonInterleavedOutput to produce audio-only + * and video-only outputs in separate MP4 files. Possible values include: 'NonInterleavedOutput', + * 'InterleavedOutput' + */ + interleaveOutput?: InterleaveOutput; + /** + * The key frame interval in seconds. Example: set KeyFrameIntervalInSeconds as 2 to reduce the + * playback buffering for some players. + */ + keyFrameIntervalInSeconds?: number; + /** + * The maximum bitrate in bits per second (threshold for the top video layer). Example: set + * MaxBitrateBps as 6000000 to avoid producing very high bitrate outputs for contents with high + * complexity. + */ + maxBitrateBps?: number; + /** + * The maximum height of output video layers. Example: set MaxHeight as 720 to produce output + * layers up to 720P even if the input is 4K. + */ + maxHeight?: number; + /** + * The maximum number of output video layers. Example: set MaxLayers as 4 to make sure at most 4 + * output layers are produced to control the overall cost of the encoding job. + */ + maxLayers?: number; + /** + * The minimum bitrate in bits per second (threshold for the bottom video layer). Example: set + * MinBitrateBps as 200000 to have a bottom layer that covers users with low network bandwidth. + */ + minBitrateBps?: number; /** - * A collection of output PNG image layers to be produced by the encoder. + * The minimum height of output video layers. Example: set MinHeight as 360 to avoid output + * layers of smaller resolutions like 180P. */ - layers?: PngLayer[]; + minHeight?: number; } /** @@ -2850,6 +3075,12 @@ export interface BuiltInStandardEncoderPreset { * Polymorphic Discriminator */ odatatype: "#Microsoft.Media.BuiltInStandardEncoderPreset"; + /** + * PresetConfigurations are only supported for the ContentAwareEncoding and + * H265ContentAwareEncoding built-in presets. These settings will not affect other built-in or + * custom defined presets. + */ + configurations?: PresetConfigurations; /** * The built-in preset to be used for encoding videos. Possible values include: * 'H264SingleBitrateSD', 'H264SingleBitrate720p', 'H264SingleBitrate1080p', 'AdaptiveStreaming', @@ -3174,7 +3405,8 @@ export interface JobInputClip { */ odatatype: "#Microsoft.Media.JobInputClip"; /** - * List of files. Required for JobInputHttp. Maximum of 4000 characters each. + * List of files. Required for JobInputHttp. Maximum of 4000 characters each. Query strings will + * not be returned in service responses to prevent sensitive data exposure. */ files?: string[]; /** @@ -3257,7 +3489,8 @@ export interface JobInputAsset { */ odatatype: "#Microsoft.Media.JobInputAsset"; /** - * List of files. Required for JobInputHttp. Maximum of 4000 characters each. + * List of files. Required for JobInputHttp. Maximum of 4000 characters each. Query strings will + * not be returned in service responses to prevent sensitive data exposure. */ files?: string[]; /** @@ -3298,7 +3531,8 @@ export interface JobInputHttp { */ odatatype: "#Microsoft.Media.JobInputHttp"; /** - * List of files. Required for JobInputHttp. Maximum of 4000 characters each. + * List of files. Required for JobInputHttp. Maximum of 4000 characters each. Query strings will + * not be returned in service responses to prevent sensitive data exposure. */ files?: string[]; /** @@ -3327,7 +3561,8 @@ export interface JobInputHttp { /** * Base URI for HTTPS job input. It will be concatenated with provided file names. If no base uri * is given, then the provided file list is assumed to be fully qualified uris. Maximum length of - * 4000 characters. + * 4000 characters. The query strings will not be returned in service responses to prevent + * sensitive data exposure. */ baseUri?: string; } @@ -3402,6 +3637,10 @@ export interface JobOutput { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly error?: JobError; + /** + * A preset used to override the preset in the corresponding transform output. + */ + presetOverride?: PresetUnion; /** * Describes the state of the JobOutput. Possible values include: 'Canceled', 'Canceling', * 'Error', 'Finished', 'Processing', 'Queued', 'Scheduled' @@ -3453,6 +3692,10 @@ export interface JobOutputAsset { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly error?: JobError; + /** + * A preset used to override the preset in the corresponding transform output. + */ + presetOverride?: PresetUnion; /** * Describes the state of the JobOutput. Possible values include: 'Canceled', 'Canceling', * 'Error', 'Finished', 'Processing', 'Queued', 'Scheduled' @@ -4068,6 +4311,11 @@ export interface LiveOutput extends ProxyResource { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly resourceState?: LiveOutputResourceState; + /** + * The system metadata relating to this resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly systemData?: SystemData; } /** @@ -4205,7 +4453,7 @@ export interface LiveEventEncoding { * Premium1080p, a live encoder transcodes the incoming stream into multiple bitrates or layers. * See https://go.microsoft.com/fwlink/?linkid=2095101 for more information. This property cannot * be modified after the live event is created. Possible values include: 'None', 'Standard', - * 'Premium1080p' + * 'Premium1080p', 'PassthroughBasic', 'PassthroughStandard' */ encodingType?: LiveEventEncodingType; /** @@ -4795,23 +5043,10 @@ export interface AzureMediaServicesOptions extends AzureServiceClientOptions { /** * @interface - * A collection of AccountFilter items. - * @extends Array - */ -export interface AccountFilterCollection extends Array { - /** - * A link to the next page of the collection (when the collection contains too many results to - * return in one response). - */ - odatanextLink?: string; -} - -/** - * @interface - * A collection of Operation items. - * @extends Array + * A collection of MediaService items. + * @extends Array */ -export interface OperationCollection extends Array { +export interface MediaServiceCollection extends Array { /** * A link to the next page of the collection (when the collection contains too many results to * return in one response). @@ -4821,10 +5056,10 @@ export interface OperationCollection extends Array { /** * @interface - * A collection of MediaService items. - * @extends Array + * A collection of AccountFilter items. + * @extends Array */ -export interface MediaServiceCollection extends Array { +export interface AccountFilterCollection extends Array { /** * A link to the next page of the collection (when the collection contains too many results to * return in one response). @@ -4977,30 +5212,6 @@ export interface StreamingEndpointListResult extends Array { odatanextLink?: string; } -/** - * Defines values for FilterTrackPropertyType. - * Possible values include: 'Unknown', 'Type', 'Name', 'Language', 'FourCC', 'Bitrate' - * @readonly - * @enum {string} - */ -export type FilterTrackPropertyType = 'Unknown' | 'Type' | 'Name' | 'Language' | 'FourCC' | 'Bitrate'; - -/** - * Defines values for FilterTrackPropertyCompareOperation. - * Possible values include: 'Equal', 'NotEqual' - * @readonly - * @enum {string} - */ -export type FilterTrackPropertyCompareOperation = 'Equal' | 'NotEqual'; - -/** - * Defines values for CreatedByType. - * Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' - * @readonly - * @enum {string} - */ -export type CreatedByType = 'User' | 'Application' | 'ManagedIdentity' | 'Key'; - /** * Defines values for MetricUnit. * Possible values include: 'Bytes', 'Count', 'Milliseconds' @@ -5017,6 +5228,14 @@ export type MetricUnit = 'Bytes' | 'Count' | 'Milliseconds'; */ export type MetricAggregationType = 'Average' | 'Count' | 'Total'; +/** + * Defines values for ActionType. + * Possible values include: 'Internal' + * @readonly + * @enum {string} + */ +export type ActionType = 'Internal'; + /** * Defines values for StorageAccountType. * Possible values include: 'Primary', 'Secondary' @@ -5042,12 +5261,28 @@ export type StorageAuthentication = 'System' | 'ManagedIdentity'; export type AccountEncryptionKeyType = 'SystemKey' | 'CustomerKey'; /** - * Defines values for ManagedIdentityType. - * Possible values include: 'SystemAssigned', 'None' + * Defines values for DefaultAction. + * Possible values include: 'Allow', 'Deny' + * @readonly + * @enum {string} + */ +export type DefaultAction = 'Allow' | 'Deny'; + +/** + * Defines values for PublicNetworkAccess. + * Possible values include: 'Enabled', 'Disabled' * @readonly * @enum {string} */ -export type ManagedIdentityType = 'SystemAssigned' | 'None'; +export type PublicNetworkAccess = 'Enabled' | 'Disabled'; + +/** + * Defines values for CreatedByType. + * Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' + * @readonly + * @enum {string} + */ +export type CreatedByType = 'User' | 'Application' | 'ManagedIdentity' | 'Key'; /** * Defines values for PrivateEndpointConnectionProvisioningState. @@ -5065,6 +5300,22 @@ export type PrivateEndpointConnectionProvisioningState = 'Succeeded' | 'Creating */ export type PrivateEndpointServiceConnectionStatus = 'Pending' | 'Approved' | 'Rejected'; +/** + * Defines values for FilterTrackPropertyType. + * Possible values include: 'Unknown', 'Type', 'Name', 'Language', 'FourCC', 'Bitrate' + * @readonly + * @enum {string} + */ +export type FilterTrackPropertyType = 'Unknown' | 'Type' | 'Name' | 'Language' | 'FourCC' | 'Bitrate'; + +/** + * Defines values for FilterTrackPropertyCompareOperation. + * Possible values include: 'Equal', 'NotEqual' + * @readonly + * @enum {string} + */ +export type FilterTrackPropertyCompareOperation = 'Equal' | 'NotEqual'; + /** * Defines values for AssetStorageEncryptionFormat. * Possible values include: 'None', 'MediaStorageClientEncryption' @@ -5267,6 +5518,22 @@ export type EntropyMode = 'Cabac' | 'Cavlc'; */ export type H264Complexity = 'Speed' | 'Balanced' | 'Quality'; +/** + * Defines values for Complexity. + * Possible values include: 'Speed', 'Balanced', 'Quality' + * @readonly + * @enum {string} + */ +export type Complexity = 'Speed' | 'Balanced' | 'Quality'; + +/** + * Defines values for InterleaveOutput. + * Possible values include: 'NonInterleavedOutput', 'InterleavedOutput' + * @readonly + * @enum {string} + */ +export type InterleaveOutput = 'NonInterleavedOutput' | 'InterleavedOutput'; + /** * Defines values for EncoderNamedPreset. * Possible values include: 'H264SingleBitrateSD', 'H264SingleBitrate720p', @@ -5398,11 +5665,12 @@ export type LiveEventInputProtocol = 'FragmentedMP4' | 'RTMP'; /** * Defines values for LiveEventEncodingType. - * Possible values include: 'None', 'Standard', 'Premium1080p' + * Possible values include: 'None', 'Standard', 'Premium1080p', 'PassthroughBasic', + * 'PassthroughStandard' * @readonly * @enum {string} */ -export type LiveEventEncodingType = 'None' | 'Standard' | 'Premium1080p'; +export type LiveEventEncodingType = 'None' | 'Standard' | 'Premium1080p' | 'PassthroughBasic' | 'PassthroughStandard'; /** * Defines values for LiveEventResourceState. @@ -5432,27 +5700,7 @@ export type StreamingEndpointResourceState = 'Stopped' | 'Starting' | 'Running' /** * Contains response data for the list operation. */ -export type AccountFiltersListResponse = AccountFilterCollection & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: AccountFilterCollection; - }; -}; - -/** - * Contains response data for the get operation. - */ -export type AccountFiltersGetResponse = AccountFilter & { +export type OperationsListResponse = OperationCollection & { /** * The underlying HTTP response. */ @@ -5465,14 +5713,14 @@ export type AccountFiltersGetResponse = AccountFilter & { /** * The response body as parsed JSON or XML */ - parsedBody: AccountFilter; + parsedBody: OperationCollection; }; }; /** - * Contains response data for the createOrUpdate operation. + * Contains response data for the list operation. */ -export type AccountFiltersCreateOrUpdateResponse = AccountFilter & { +export type MediaservicesListResponse = MediaServiceCollection & { /** * The underlying HTTP response. */ @@ -5485,14 +5733,14 @@ export type AccountFiltersCreateOrUpdateResponse = AccountFilter & { /** * The response body as parsed JSON or XML */ - parsedBody: AccountFilter; + parsedBody: MediaServiceCollection; }; }; /** - * Contains response data for the update operation. + * Contains response data for the get operation. */ -export type AccountFiltersUpdateResponse = AccountFilter & { +export type MediaservicesGetResponse = MediaService & { /** * The underlying HTTP response. */ @@ -5505,14 +5753,14 @@ export type AccountFiltersUpdateResponse = AccountFilter & { /** * The response body as parsed JSON or XML */ - parsedBody: AccountFilter; + parsedBody: MediaService; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the createOrUpdate operation. */ -export type AccountFiltersListNextResponse = AccountFilterCollection & { +export type MediaservicesCreateOrUpdateResponse = MediaService & { /** * The underlying HTTP response. */ @@ -5525,14 +5773,14 @@ export type AccountFiltersListNextResponse = AccountFilterCollection & { /** * The response body as parsed JSON or XML */ - parsedBody: AccountFilterCollection; + parsedBody: MediaService; }; }; /** - * Contains response data for the list operation. + * Contains response data for the update operation. */ -export type OperationsListResponse = OperationCollection & { +export type MediaservicesUpdateResponse = MediaService & { /** * The underlying HTTP response. */ @@ -5545,14 +5793,14 @@ export type OperationsListResponse = OperationCollection & { /** * The response body as parsed JSON or XML */ - parsedBody: OperationCollection; + parsedBody: MediaService; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the listEdgePolicies operation. */ -export type OperationsListNextResponse = OperationCollection & { +export type MediaservicesListEdgePoliciesResponse = EdgePolicies & { /** * The underlying HTTP response. */ @@ -5565,14 +5813,14 @@ export type OperationsListNextResponse = OperationCollection & { /** * The response body as parsed JSON or XML */ - parsedBody: OperationCollection; + parsedBody: EdgePolicies; }; }; /** - * Contains response data for the list operation. + * Contains response data for the listBySubscription operation. */ -export type MediaservicesListResponse = MediaServiceCollection & { +export type MediaservicesListBySubscriptionResponse = MediaServiceCollection & { /** * The underlying HTTP response. */ @@ -5590,9 +5838,9 @@ export type MediaservicesListResponse = MediaServiceCollection & { }; /** - * Contains response data for the get operation. + * Contains response data for the listNext operation. */ -export type MediaservicesGetResponse = MediaService & { +export type MediaservicesListNextResponse = MediaServiceCollection & { /** * The underlying HTTP response. */ @@ -5605,14 +5853,14 @@ export type MediaservicesGetResponse = MediaService & { /** * The response body as parsed JSON or XML */ - parsedBody: MediaService; + parsedBody: MediaServiceCollection; }; }; /** - * Contains response data for the createOrUpdate operation. + * Contains response data for the listBySubscriptionNext operation. */ -export type MediaservicesCreateOrUpdateResponse = MediaService & { +export type MediaservicesListBySubscriptionNextResponse = MediaServiceCollection & { /** * The underlying HTTP response. */ @@ -5625,14 +5873,14 @@ export type MediaservicesCreateOrUpdateResponse = MediaService & { /** * The response body as parsed JSON or XML */ - parsedBody: MediaService; + parsedBody: MediaServiceCollection; }; }; /** - * Contains response data for the update operation. + * Contains response data for the list operation. */ -export type MediaservicesUpdateResponse = MediaService & { +export type PrivateLinkResourcesListResponse = PrivateLinkResourceListResult & { /** * The underlying HTTP response. */ @@ -5645,14 +5893,14 @@ export type MediaservicesUpdateResponse = MediaService & { /** * The response body as parsed JSON or XML */ - parsedBody: MediaService; + parsedBody: PrivateLinkResourceListResult; }; }; /** - * Contains response data for the listEdgePolicies operation. + * Contains response data for the get operation. */ -export type MediaservicesListEdgePoliciesResponse = EdgePolicies & { +export type PrivateLinkResourcesGetResponse = PrivateLinkResource & { /** * The underlying HTTP response. */ @@ -5665,14 +5913,14 @@ export type MediaservicesListEdgePoliciesResponse = EdgePolicies & { /** * The response body as parsed JSON or XML */ - parsedBody: EdgePolicies; + parsedBody: PrivateLinkResource; }; }; /** - * Contains response data for the listBySubscription operation. + * Contains response data for the list operation. */ -export type MediaservicesListBySubscriptionResponse = MediaServiceCollection & { +export type PrivateEndpointConnectionsListResponse = PrivateEndpointConnectionListResult & { /** * The underlying HTTP response. */ @@ -5685,14 +5933,14 @@ export type MediaservicesListBySubscriptionResponse = MediaServiceCollection & { /** * The response body as parsed JSON or XML */ - parsedBody: MediaServiceCollection; + parsedBody: PrivateEndpointConnectionListResult; }; }; /** - * Contains response data for the getBySubscription operation. + * Contains response data for the get operation. */ -export type MediaservicesGetBySubscriptionResponse = MediaService & { +export type PrivateEndpointConnectionsGetResponse = PrivateEndpointConnection & { /** * The underlying HTTP response. */ @@ -5705,14 +5953,14 @@ export type MediaservicesGetBySubscriptionResponse = MediaService & { /** * The response body as parsed JSON or XML */ - parsedBody: MediaService; + parsedBody: PrivateEndpointConnection; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the createOrUpdate operation. */ -export type MediaservicesListNextResponse = MediaServiceCollection & { +export type PrivateEndpointConnectionsCreateOrUpdateResponse = PrivateEndpointConnection & { /** * The underlying HTTP response. */ @@ -5725,14 +5973,14 @@ export type MediaservicesListNextResponse = MediaServiceCollection & { /** * The response body as parsed JSON or XML */ - parsedBody: MediaServiceCollection; + parsedBody: PrivateEndpointConnection; }; }; /** - * Contains response data for the listBySubscriptionNext operation. + * Contains response data for the checkNameAvailability operation. */ -export type MediaservicesListBySubscriptionNextResponse = MediaServiceCollection & { +export type LocationsCheckNameAvailabilityResponse = EntityNameAvailabilityCheckOutput & { /** * The underlying HTTP response. */ @@ -5745,14 +5993,14 @@ export type MediaservicesListBySubscriptionNextResponse = MediaServiceCollection /** * The response body as parsed JSON or XML */ - parsedBody: MediaServiceCollection; + parsedBody: EntityNameAvailabilityCheckOutput; }; }; /** * Contains response data for the list operation. */ -export type PrivateLinkResourcesListResponse = PrivateLinkResourceListResult & { +export type AccountFiltersListResponse = AccountFilterCollection & { /** * The underlying HTTP response. */ @@ -5765,34 +6013,14 @@ export type PrivateLinkResourcesListResponse = PrivateLinkResourceListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: PrivateLinkResourceListResult; + parsedBody: AccountFilterCollection; }; }; /** * Contains response data for the get operation. */ -export type PrivateLinkResourcesGetResponse = PrivateLinkResource & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: PrivateLinkResource; - }; -}; - -/** - * Contains response data for the list operation. - */ -export type PrivateEndpointConnectionsListResponse = PrivateEndpointConnectionListResult & { +export type AccountFiltersGetResponse = AccountFilter & { /** * The underlying HTTP response. */ @@ -5805,14 +6033,14 @@ export type PrivateEndpointConnectionsListResponse = PrivateEndpointConnectionLi /** * The response body as parsed JSON or XML */ - parsedBody: PrivateEndpointConnectionListResult; + parsedBody: AccountFilter; }; }; /** - * Contains response data for the get operation. + * Contains response data for the createOrUpdate operation. */ -export type PrivateEndpointConnectionsGetResponse = PrivateEndpointConnection & { +export type AccountFiltersCreateOrUpdateResponse = AccountFilter & { /** * The underlying HTTP response. */ @@ -5825,14 +6053,14 @@ export type PrivateEndpointConnectionsGetResponse = PrivateEndpointConnection & /** * The response body as parsed JSON or XML */ - parsedBody: PrivateEndpointConnection; + parsedBody: AccountFilter; }; }; /** - * Contains response data for the createOrUpdate operation. + * Contains response data for the update operation. */ -export type PrivateEndpointConnectionsCreateOrUpdateResponse = PrivateEndpointConnection & { +export type AccountFiltersUpdateResponse = AccountFilter & { /** * The underlying HTTP response. */ @@ -5845,14 +6073,14 @@ export type PrivateEndpointConnectionsCreateOrUpdateResponse = PrivateEndpointCo /** * The response body as parsed JSON or XML */ - parsedBody: PrivateEndpointConnection; + parsedBody: AccountFilter; }; }; /** - * Contains response data for the checkNameAvailability operation. + * Contains response data for the listNext operation. */ -export type LocationsCheckNameAvailabilityResponse = EntityNameAvailabilityCheckOutput & { +export type AccountFiltersListNextResponse = AccountFilterCollection & { /** * The underlying HTTP response. */ @@ -5865,7 +6093,7 @@ export type LocationsCheckNameAvailabilityResponse = EntityNameAvailabilityCheck /** * The response body as parsed JSON or XML */ - parsedBody: EntityNameAvailabilityCheckOutput; + parsedBody: AccountFilterCollection; }; }; diff --git a/sdk/mediaservices/arm-mediaservices/src/models/jobsMappers.ts b/sdk/mediaservices/arm-mediaservices/src/models/jobsMappers.ts index b01438de2b6d..09bee2f2db8f 100644 --- a/sdk/mediaservices/arm-mediaservices/src/models/jobsMappers.ts +++ b/sdk/mediaservices/arm-mediaservices/src/models/jobsMappers.ts @@ -10,11 +10,11 @@ export { discriminators, AacAudio, AbsoluteClipTime, + AccessControl, AccountEncryption, AccountFilter, AkamaiAccessControl, AkamaiSignatureHeaderAuthenticationKey, - ApiError, Asset, AssetFilter, Audio, @@ -61,6 +61,9 @@ export { Deinterlace, EnabledProtocols, EnvelopeEncryption, + ErrorAdditionalInfo, + ErrorDetail, + ErrorResponse, FaceDetectorPreset, Filters, FilterTrackPropertyCondition, @@ -96,6 +99,7 @@ export { JpgFormat, JpgImage, JpgLayer, + KeyDelivery, KeyVaultProperties, Layer, LiveEvent, @@ -114,7 +118,6 @@ export { Mp4Format, MultiBitrateFormat, NoEncryption, - ODataError, OutputFile, Overlay, PngFormat, @@ -122,6 +125,7 @@ export { PngLayer, PresentationTimeRange, Preset, + PresetConfigurations, PrivateEndpoint, PrivateEndpointConnection, PrivateLinkResource, @@ -129,6 +133,7 @@ export { ProxyResource, Rectangle, Resource, + ResourceIdentity, SelectAudioTrackByAttribute, SelectAudioTrackById, SelectVideoTrackByAttribute, @@ -153,6 +158,7 @@ export { Transform, TransformOutput, TransportStreamFormat, + UserAssignedManagedIdentity, UtcClipTime, Video, VideoAnalyzerPreset, diff --git a/sdk/mediaservices/arm-mediaservices/src/models/liveEventsMappers.ts b/sdk/mediaservices/arm-mediaservices/src/models/liveEventsMappers.ts index e14199eb259b..132e70b92419 100644 --- a/sdk/mediaservices/arm-mediaservices/src/models/liveEventsMappers.ts +++ b/sdk/mediaservices/arm-mediaservices/src/models/liveEventsMappers.ts @@ -10,11 +10,11 @@ export { discriminators, AacAudio, AbsoluteClipTime, + AccessControl, AccountEncryption, AccountFilter, AkamaiAccessControl, AkamaiSignatureHeaderAuthenticationKey, - ApiError, Asset, AssetFilter, Audio, @@ -61,6 +61,9 @@ export { Deinterlace, EnabledProtocols, EnvelopeEncryption, + ErrorAdditionalInfo, + ErrorDetail, + ErrorResponse, FaceDetectorPreset, Filters, FilterTrackPropertyCondition, @@ -95,6 +98,7 @@ export { JpgFormat, JpgImage, JpgLayer, + KeyDelivery, KeyVaultProperties, Layer, LiveEvent, @@ -115,7 +119,6 @@ export { Mp4Format, MultiBitrateFormat, NoEncryption, - ODataError, OutputFile, Overlay, PngFormat, @@ -123,6 +126,7 @@ export { PngLayer, PresentationTimeRange, Preset, + PresetConfigurations, PrivateEndpoint, PrivateEndpointConnection, PrivateLinkResource, @@ -130,6 +134,7 @@ export { ProxyResource, Rectangle, Resource, + ResourceIdentity, SelectAudioTrackByAttribute, SelectAudioTrackById, SelectVideoTrackByAttribute, @@ -154,6 +159,7 @@ export { Transform, TransformOutput, TransportStreamFormat, + UserAssignedManagedIdentity, UtcClipTime, Video, VideoAnalyzerPreset, diff --git a/sdk/mediaservices/arm-mediaservices/src/models/liveOutputsMappers.ts b/sdk/mediaservices/arm-mediaservices/src/models/liveOutputsMappers.ts index 215091bc028d..0382de32a1c8 100644 --- a/sdk/mediaservices/arm-mediaservices/src/models/liveOutputsMappers.ts +++ b/sdk/mediaservices/arm-mediaservices/src/models/liveOutputsMappers.ts @@ -10,11 +10,11 @@ export { discriminators, AacAudio, AbsoluteClipTime, + AccessControl, AccountEncryption, AccountFilter, AkamaiAccessControl, AkamaiSignatureHeaderAuthenticationKey, - ApiError, Asset, AssetFilter, Audio, @@ -61,6 +61,9 @@ export { Deinterlace, EnabledProtocols, EnvelopeEncryption, + ErrorAdditionalInfo, + ErrorDetail, + ErrorResponse, FaceDetectorPreset, Filters, FilterTrackPropertyCondition, @@ -95,6 +98,7 @@ export { JpgFormat, JpgImage, JpgLayer, + KeyDelivery, KeyVaultProperties, Layer, LiveEvent, @@ -114,7 +118,6 @@ export { Mp4Format, MultiBitrateFormat, NoEncryption, - ODataError, OutputFile, Overlay, PngFormat, @@ -122,6 +125,7 @@ export { PngLayer, PresentationTimeRange, Preset, + PresetConfigurations, PrivateEndpoint, PrivateEndpointConnection, PrivateLinkResource, @@ -129,6 +133,7 @@ export { ProxyResource, Rectangle, Resource, + ResourceIdentity, SelectAudioTrackByAttribute, SelectAudioTrackById, SelectVideoTrackByAttribute, @@ -153,6 +158,7 @@ export { Transform, TransformOutput, TransportStreamFormat, + UserAssignedManagedIdentity, UtcClipTime, Video, VideoAnalyzerPreset, diff --git a/sdk/mediaservices/arm-mediaservices/src/models/locationsMappers.ts b/sdk/mediaservices/arm-mediaservices/src/models/locationsMappers.ts index 3d5c8bf8086b..412d8e6a350d 100644 --- a/sdk/mediaservices/arm-mediaservices/src/models/locationsMappers.ts +++ b/sdk/mediaservices/arm-mediaservices/src/models/locationsMappers.ts @@ -8,8 +8,9 @@ export { discriminators, - ApiError, CheckNameAvailabilityInput, EntityNameAvailabilityCheckOutput, - ODataError + ErrorAdditionalInfo, + ErrorDetail, + ErrorResponse } from "../models/mappers"; diff --git a/sdk/mediaservices/arm-mediaservices/src/models/mappers.ts b/sdk/mediaservices/arm-mediaservices/src/models/mappers.ts index a1cf2b3374b7..d6acbffae08b 100644 --- a/sdk/mediaservices/arm-mediaservices/src/models/mappers.ts +++ b/sdk/mediaservices/arm-mediaservices/src/models/mappers.ts @@ -12,44 +12,64 @@ import * as msRest from "@azure/ms-rest-js"; export const CloudError = CloudErrorMapper; export const BaseResource = BaseResourceMapper; -export const PresentationTimeRange: msRest.CompositeMapper = { - serializedName: "PresentationTimeRange", +export const OperationDisplay: msRest.CompositeMapper = { + serializedName: "OperationDisplay", type: { name: "Composite", - className: "PresentationTimeRange", + className: "OperationDisplay", modelProperties: { - startTimestamp: { - serializedName: "startTimestamp", + provider: { + serializedName: "provider", type: { - name: "Number" + name: "String" } }, - endTimestamp: { - serializedName: "endTimestamp", + resource: { + serializedName: "resource", type: { - name: "Number" + name: "String" } }, - presentationWindowDuration: { - serializedName: "presentationWindowDuration", + operation: { + serializedName: "operation", type: { - name: "Number" + name: "String" } }, - liveBackoffDuration: { - serializedName: "liveBackoffDuration", + description: { + serializedName: "description", type: { - name: "Number" + name: "String" + } + } + } + } +}; + +export const MetricDimension: msRest.CompositeMapper = { + serializedName: "MetricDimension", + type: { + name: "Composite", + className: "MetricDimension", + modelProperties: { + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" } }, - timescale: { - serializedName: "timescale", + displayName: { + readOnly: true, + serializedName: "displayName", type: { - name: "Number" + name: "String" } }, - forceEndTimestamp: { - serializedName: "forceEndTimestamp", + toBeExportedForShoebox: { + nullable: false, + readOnly: true, + serializedName: "toBeExportedForShoebox", type: { name: "Boolean" } @@ -58,69 +78,178 @@ export const PresentationTimeRange: msRest.CompositeMapper = { } }; -export const FilterTrackPropertyCondition: msRest.CompositeMapper = { - serializedName: "FilterTrackPropertyCondition", +export const MetricSpecification: msRest.CompositeMapper = { + serializedName: "MetricSpecification", type: { name: "Composite", - className: "FilterTrackPropertyCondition", + className: "MetricSpecification", modelProperties: { - property: { - required: true, - serializedName: "property", + name: { + readOnly: true, + serializedName: "name", type: { name: "String" } }, - value: { - required: true, - serializedName: "value", + displayName: { + readOnly: true, + serializedName: "displayName", type: { name: "String" } }, - operation: { - required: true, - serializedName: "operation", + displayDescription: { + readOnly: true, + serializedName: "displayDescription", type: { name: "String" } + }, + unit: { + nullable: false, + readOnly: true, + serializedName: "unit", + type: { + name: "String" + } + }, + aggregationType: { + nullable: false, + readOnly: true, + serializedName: "aggregationType", + type: { + name: "String" + } + }, + lockAggregationType: { + nullable: true, + readOnly: true, + serializedName: "lockAggregationType", + type: { + name: "String" + } + }, + supportedAggregationTypes: { + serializedName: "supportedAggregationTypes", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + dimensions: { + readOnly: true, + serializedName: "dimensions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MetricDimension" + } + } + } + }, + enableRegionalMdmAccount: { + nullable: false, + readOnly: true, + serializedName: "enableRegionalMdmAccount", + type: { + name: "Boolean" + } + }, + sourceMdmAccount: { + readOnly: true, + serializedName: "sourceMdmAccount", + type: { + name: "String" + } + }, + sourceMdmNamespace: { + readOnly: true, + serializedName: "sourceMdmNamespace", + type: { + name: "String" + } + }, + supportedTimeGrainTypes: { + readOnly: true, + serializedName: "supportedTimeGrainTypes", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } } } } }; -export const FirstQuality: msRest.CompositeMapper = { - serializedName: "FirstQuality", +export const LogSpecification: msRest.CompositeMapper = { + serializedName: "LogSpecification", type: { name: "Composite", - className: "FirstQuality", + className: "LogSpecification", modelProperties: { - bitrate: { - required: true, - serializedName: "bitrate", + name: { + readOnly: true, + serializedName: "name", type: { - name: "Number" + name: "String" + } + }, + displayName: { + readOnly: true, + serializedName: "displayName", + type: { + name: "String" + } + }, + blobDuration: { + readOnly: true, + serializedName: "blobDuration", + type: { + name: "String" } } } } }; -export const FilterTrackSelection: msRest.CompositeMapper = { - serializedName: "FilterTrackSelection", +export const ServiceSpecification: msRest.CompositeMapper = { + serializedName: "ServiceSpecification", type: { name: "Composite", - className: "FilterTrackSelection", + className: "ServiceSpecification", modelProperties: { - trackSelections: { - required: true, - serializedName: "trackSelections", + logSpecifications: { + readOnly: true, + serializedName: "logSpecifications", type: { name: "Sequence", element: { type: { name: "Composite", - className: "FilterTrackPropertyCondition" + className: "LogSpecification" + } + } + } + }, + metricSpecifications: { + readOnly: true, + serializedName: "metricSpecifications", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MetricSpecification" } } } @@ -129,75 +258,156 @@ export const FilterTrackSelection: msRest.CompositeMapper = { } }; -export const SystemData: msRest.CompositeMapper = { - serializedName: "systemData", +export const Properties: msRest.CompositeMapper = { + serializedName: "Properties", type: { name: "Composite", - className: "SystemData", + className: "Properties", modelProperties: { - createdBy: { - serializedName: "createdBy", + serviceSpecification: { + readOnly: true, + serializedName: "serviceSpecification", + type: { + name: "Composite", + className: "ServiceSpecification" + } + } + } + } +}; + +export const Operation: msRest.CompositeMapper = { + serializedName: "Operation", + type: { + name: "Composite", + className: "Operation", + modelProperties: { + name: { + required: true, + serializedName: "name", type: { name: "String" } }, - createdByType: { - serializedName: "createdByType", + display: { + serializedName: "display", + type: { + name: "Composite", + className: "OperationDisplay" + } + }, + origin: { + serializedName: "origin", type: { name: "String" } }, - createdAt: { - serializedName: "createdAt", + properties: { + serializedName: "properties", type: { - name: "DateTime" + name: "Composite", + className: "Properties" } }, - lastModifiedBy: { - serializedName: "lastModifiedBy", + isDataAction: { + nullable: true, + serializedName: "isDataAction", + type: { + name: "Boolean" + } + }, + actionType: { + nullable: true, + serializedName: "actionType", type: { name: "String" } + } + } + } +}; + +export const EntityNameAvailabilityCheckOutput: msRest.CompositeMapper = { + serializedName: "EntityNameAvailabilityCheckOutput", + type: { + name: "Composite", + className: "EntityNameAvailabilityCheckOutput", + modelProperties: { + nameAvailable: { + required: true, + serializedName: "nameAvailable", + type: { + name: "Boolean" + } }, - lastModifiedByType: { - serializedName: "lastModifiedByType", + reason: { + serializedName: "reason", type: { name: "String" } }, - lastModifiedAt: { - serializedName: "lastModifiedAt", + message: { + serializedName: "message", type: { - name: "DateTime" + name: "String" } } } } }; -export const Resource: msRest.CompositeMapper = { - serializedName: "Resource", +export const ResourceIdentity: msRest.CompositeMapper = { + serializedName: "ResourceIdentity", type: { name: "Composite", - className: "Resource", + className: "ResourceIdentity", + modelProperties: { + userAssignedIdentity: { + serializedName: "userAssignedIdentity", + type: { + name: "String" + } + }, + useSystemAssignedIdentity: { + required: true, + serializedName: "useSystemAssignedIdentity", + type: { + name: "Boolean" + } + } + } + } +}; + +export const StorageAccount: msRest.CompositeMapper = { + serializedName: "StorageAccount", + type: { + name: "Composite", + className: "StorageAccount", modelProperties: { id: { - readOnly: true, serializedName: "id", type: { name: "String" } }, - name: { - readOnly: true, - serializedName: "name", + type: { + required: true, + serializedName: "type", type: { name: "String" } }, - type: { + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "ResourceIdentity" + } + }, + status: { readOnly: true, - serializedName: "type", + serializedName: "status", type: { name: "String" } @@ -206,94 +416,102 @@ export const Resource: msRest.CompositeMapper = { } }; -export const ProxyResource: msRest.CompositeMapper = { - serializedName: "ProxyResource", +export const SyncStorageKeysInput: msRest.CompositeMapper = { + serializedName: "SyncStorageKeysInput", type: { name: "Composite", - className: "ProxyResource", + className: "SyncStorageKeysInput", modelProperties: { - ...Resource.type.modelProperties + id: { + serializedName: "id", + type: { + name: "String" + } + } } } }; -export const AccountFilter: msRest.CompositeMapper = { - serializedName: "AccountFilter", +export const KeyVaultProperties: msRest.CompositeMapper = { + serializedName: "KeyVaultProperties", type: { name: "Composite", - className: "AccountFilter", + className: "KeyVaultProperties", modelProperties: { - ...ProxyResource.type.modelProperties, - presentationTimeRange: { - serializedName: "properties.presentationTimeRange", + keyIdentifier: { + serializedName: "keyIdentifier", type: { - name: "Composite", - className: "PresentationTimeRange" + name: "String" } }, - firstQuality: { - serializedName: "properties.firstQuality", + currentKeyIdentifier: { + readOnly: true, + serializedName: "currentKeyIdentifier", + type: { + name: "String" + } + } + } + } +}; + +export const AccountEncryption: msRest.CompositeMapper = { + serializedName: "AccountEncryption", + type: { + name: "Composite", + className: "AccountEncryption", + modelProperties: { + type: { + required: true, + serializedName: "type", + type: { + name: "String" + } + }, + keyVaultProperties: { + serializedName: "keyVaultProperties", type: { name: "Composite", - className: "FirstQuality" + className: "KeyVaultProperties" } }, - tracks: { - serializedName: "properties.tracks", + identity: { + serializedName: "identity", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "FilterTrackSelection" - } - } + name: "Composite", + className: "ResourceIdentity" } }, - systemData: { + status: { readOnly: true, - serializedName: "systemData", + serializedName: "status", type: { - name: "Composite", - className: "SystemData" + name: "String" } } } } }; -export const ODataError: msRest.CompositeMapper = { - serializedName: "ODataError", +export const AccessControl: msRest.CompositeMapper = { + serializedName: "AccessControl", type: { name: "Composite", - className: "ODataError", + className: "AccessControl", modelProperties: { - code: { - serializedName: "code", - type: { - name: "String" - } - }, - message: { - serializedName: "message", + defaultAction: { + serializedName: "defaultAction", type: { name: "String" } }, - target: { - serializedName: "target", - type: { - name: "String" - } - }, - details: { - serializedName: "details", + ipAllowList: { + serializedName: "ipAllowList", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "ODataError" + name: "String" } } } @@ -302,414 +520,481 @@ export const ODataError: msRest.CompositeMapper = { } }; -export const ApiError: msRest.CompositeMapper = { - serializedName: "ApiError", +export const KeyDelivery: msRest.CompositeMapper = { + serializedName: "KeyDelivery", type: { name: "Composite", - className: "ApiError", + className: "KeyDelivery", modelProperties: { - error: { - serializedName: "error", + accessControl: { + serializedName: "accessControl", type: { name: "Composite", - className: "ODataError" + className: "AccessControl" } } } } }; -export const TrackedResource: msRest.CompositeMapper = { - serializedName: "TrackedResource", +export const UserAssignedManagedIdentity: msRest.CompositeMapper = { + serializedName: "UserAssignedManagedIdentity", type: { name: "Composite", - className: "TrackedResource", + className: "UserAssignedManagedIdentity", modelProperties: { - ...Resource.type.modelProperties, - tags: { - serializedName: "tags", + clientId: { + nullable: true, + readOnly: true, + serializedName: "clientId", type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } + name: "Uuid" } }, - location: { - required: true, - serializedName: "location", - type: { - name: "String" - } - } - } - } -}; - -export const AzureEntityResource: msRest.CompositeMapper = { - serializedName: "AzureEntityResource", - type: { - name: "Composite", - className: "AzureEntityResource", - modelProperties: { - ...Resource.type.modelProperties, - etag: { + principalId: { + nullable: true, readOnly: true, - serializedName: "etag", + serializedName: "principalId", type: { - name: "String" + name: "Uuid" } } } } }; -export const Provider: msRest.CompositeMapper = { - serializedName: "Provider", +export const MediaServiceIdentity: msRest.CompositeMapper = { + serializedName: "MediaServiceIdentity", type: { name: "Composite", - className: "Provider", + className: "MediaServiceIdentity", modelProperties: { - providerName: { + type: { required: true, - serializedName: "providerName", + serializedName: "type", type: { name: "String" } + }, + principalId: { + nullable: true, + readOnly: true, + serializedName: "principalId", + type: { + name: "Uuid" + } + }, + tenantId: { + nullable: true, + readOnly: true, + serializedName: "tenantId", + type: { + name: "Uuid" + } + }, + userAssignedIdentities: { + serializedName: "userAssignedIdentities", + type: { + name: "Dictionary", + value: { + type: { + name: "Composite", + className: "UserAssignedManagedIdentity" + } + } + } } } } }; -export const OperationDisplay: msRest.CompositeMapper = { - serializedName: "OperationDisplay", +export const SystemData: msRest.CompositeMapper = { + serializedName: "systemData", type: { name: "Composite", - className: "OperationDisplay", + className: "SystemData", modelProperties: { - provider: { - serializedName: "provider", + createdBy: { + serializedName: "createdBy", type: { name: "String" } }, - resource: { - serializedName: "resource", + createdByType: { + serializedName: "createdByType", type: { name: "String" } }, - operation: { - serializedName: "operation", + createdAt: { + serializedName: "createdAt", + type: { + name: "DateTime" + } + }, + lastModifiedBy: { + serializedName: "lastModifiedBy", type: { name: "String" } }, - description: { - serializedName: "description", + lastModifiedByType: { + serializedName: "lastModifiedByType", type: { name: "String" } + }, + lastModifiedAt: { + serializedName: "lastModifiedAt", + type: { + name: "DateTime" + } } } } }; -export const MetricDimension: msRest.CompositeMapper = { - serializedName: "MetricDimension", +export const Resource: msRest.CompositeMapper = { + serializedName: "Resource", type: { name: "Composite", - className: "MetricDimension", + className: "Resource", modelProperties: { - name: { + id: { readOnly: true, - serializedName: "name", + serializedName: "id", type: { name: "String" } }, - displayName: { + name: { readOnly: true, - serializedName: "displayName", + serializedName: "name", type: { name: "String" } }, - toBeExportedForShoebox: { - nullable: false, + type: { readOnly: true, - serializedName: "toBeExportedForShoebox", + serializedName: "type", type: { - name: "Boolean" + name: "String" } } } } }; -export const MetricSpecification: msRest.CompositeMapper = { - serializedName: "MetricSpecification", +export const TrackedResource: msRest.CompositeMapper = { + serializedName: "TrackedResource", type: { name: "Composite", - className: "MetricSpecification", + className: "TrackedResource", modelProperties: { - name: { - readOnly: true, - serializedName: "name", - type: { - name: "String" - } - }, - displayName: { - readOnly: true, - serializedName: "displayName", - type: { - name: "String" - } - }, - displayDescription: { - readOnly: true, - serializedName: "displayDescription", + ...Resource.type.modelProperties, + tags: { + serializedName: "tags", type: { - name: "String" + name: "Dictionary", + value: { + type: { + name: "String" + } + } } }, - unit: { - nullable: false, - readOnly: true, - serializedName: "unit", + location: { + required: true, + serializedName: "location", type: { name: "String" } - }, - aggregationType: { + } + } + } +}; + +export const MediaService: msRest.CompositeMapper = { + serializedName: "MediaService", + type: { + name: "Composite", + className: "MediaService", + modelProperties: { + ...TrackedResource.type.modelProperties, + mediaServiceId: { nullable: false, readOnly: true, - serializedName: "aggregationType", - type: { - name: "String" - } - }, - lockAggregationType: { - nullable: true, - readOnly: true, - serializedName: "lockAggregationType", - type: { - name: "String" - } - }, - supportedAggregationTypes: { - serializedName: "supportedAggregationTypes", + serializedName: "properties.mediaServiceId", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "Uuid" } }, - dimensions: { - readOnly: true, - serializedName: "dimensions", + storageAccounts: { + serializedName: "properties.storageAccounts", type: { name: "Sequence", element: { type: { name: "Composite", - className: "MetricDimension" + className: "StorageAccount" } } } - } - } - } -}; - -export const LogSpecification: msRest.CompositeMapper = { - serializedName: "LogSpecification", - type: { - name: "Composite", - className: "LogSpecification", - modelProperties: { - name: { - readOnly: true, - serializedName: "name", + }, + storageAuthentication: { + nullable: true, + serializedName: "properties.storageAuthentication", type: { name: "String" } }, - displayName: { - readOnly: true, - serializedName: "displayName", + encryption: { + serializedName: "properties.encryption", + type: { + name: "Composite", + className: "AccountEncryption" + } + }, + keyDelivery: { + serializedName: "properties.keyDelivery", + type: { + name: "Composite", + className: "KeyDelivery" + } + }, + publicNetworkAccess: { + nullable: true, + serializedName: "properties.publicNetworkAccess", type: { name: "String" } }, - blobDuration: { + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "MediaServiceIdentity" + } + }, + systemData: { readOnly: true, - serializedName: "blobDuration", + serializedName: "systemData", type: { - name: "String" + name: "Composite", + className: "SystemData" } } } } }; -export const ServiceSpecification: msRest.CompositeMapper = { - serializedName: "ServiceSpecification", +export const MediaServiceUpdate: msRest.CompositeMapper = { + serializedName: "MediaServiceUpdate", type: { name: "Composite", - className: "ServiceSpecification", + className: "MediaServiceUpdate", modelProperties: { - logSpecifications: { - readOnly: true, - serializedName: "logSpecifications", + tags: { + serializedName: "tags", type: { - name: "Sequence", - element: { + name: "Dictionary", + value: { type: { - name: "Composite", - className: "LogSpecification" + name: "String" } } } }, - metricSpecifications: { + mediaServiceId: { + nullable: false, readOnly: true, - serializedName: "metricSpecifications", + serializedName: "properties.mediaServiceId", + type: { + name: "Uuid" + } + }, + storageAccounts: { + serializedName: "properties.storageAccounts", type: { name: "Sequence", element: { type: { name: "Composite", - className: "MetricSpecification" + className: "StorageAccount" } } } + }, + storageAuthentication: { + nullable: true, + serializedName: "properties.storageAuthentication", + type: { + name: "String" + } + }, + encryption: { + serializedName: "properties.encryption", + type: { + name: "Composite", + className: "AccountEncryption" + } + }, + keyDelivery: { + serializedName: "properties.keyDelivery", + type: { + name: "Composite", + className: "KeyDelivery" + } + }, + publicNetworkAccess: { + nullable: true, + serializedName: "properties.publicNetworkAccess", + type: { + name: "String" + } + }, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "MediaServiceIdentity" + } } } } }; -export const Properties: msRest.CompositeMapper = { - serializedName: "Properties", +export const ListEdgePoliciesInput: msRest.CompositeMapper = { + serializedName: "ListEdgePoliciesInput", type: { name: "Composite", - className: "Properties", + className: "ListEdgePoliciesInput", modelProperties: { - serviceSpecification: { - readOnly: true, - serializedName: "serviceSpecification", + deviceId: { + serializedName: "deviceId", type: { - name: "Composite", - className: "ServiceSpecification" + name: "String" } } } } }; -export const Operation: msRest.CompositeMapper = { - serializedName: "Operation", +export const EdgeUsageDataEventHub: msRest.CompositeMapper = { + serializedName: "EdgeUsageDataEventHub", type: { name: "Composite", - className: "Operation", + className: "EdgeUsageDataEventHub", modelProperties: { name: { - required: true, serializedName: "name", type: { name: "String" } }, - display: { - serializedName: "display", + namespace: { + serializedName: "namespace", type: { - name: "Composite", - className: "OperationDisplay" + name: "String" } }, - origin: { - serializedName: "origin", + token: { + serializedName: "token", + type: { + name: "String" + } + } + } + } +}; + +export const EdgeUsageDataCollectionPolicy: msRest.CompositeMapper = { + serializedName: "EdgeUsageDataCollectionPolicy", + type: { + name: "Composite", + className: "EdgeUsageDataCollectionPolicy", + modelProperties: { + dataCollectionFrequency: { + serializedName: "dataCollectionFrequency", type: { name: "String" } }, - properties: { - serializedName: "properties", + dataReportingFrequency: { + serializedName: "dataReportingFrequency", + type: { + name: "String" + } + }, + maxAllowedUnreportedUsageDuration: { + serializedName: "maxAllowedUnreportedUsageDuration", + type: { + name: "String" + } + }, + eventHubDetails: { + serializedName: "eventHubDetails", type: { name: "Composite", - className: "Properties" + className: "EdgeUsageDataEventHub" } } } } }; -export const Location: msRest.CompositeMapper = { - serializedName: "Location", +export const EdgePolicies: msRest.CompositeMapper = { + serializedName: "EdgePolicies", type: { name: "Composite", - className: "Location", + className: "EdgePolicies", modelProperties: { - name: { - required: true, - serializedName: "name", + usageDataCollectionPolicy: { + serializedName: "usageDataCollectionPolicy", type: { - name: "String" + name: "Composite", + className: "EdgeUsageDataCollectionPolicy" } } } } }; -export const EntityNameAvailabilityCheckOutput: msRest.CompositeMapper = { - serializedName: "EntityNameAvailabilityCheckOutput", +export const OperationCollection: msRest.CompositeMapper = { + serializedName: "OperationCollection", type: { name: "Composite", - className: "EntityNameAvailabilityCheckOutput", + className: "OperationCollection", modelProperties: { - nameAvailable: { - required: true, - serializedName: "nameAvailable", - type: { - name: "Boolean" - } - }, - reason: { - serializedName: "reason", - type: { - name: "String" - } - }, - message: { - serializedName: "message", + value: { + serializedName: "value", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Operation" + } + } } } } } }; -export const StorageAccount: msRest.CompositeMapper = { - serializedName: "StorageAccount", +export const CheckNameAvailabilityInput: msRest.CompositeMapper = { + serializedName: "CheckNameAvailabilityInput", type: { name: "Composite", - className: "StorageAccount", + className: "CheckNameAvailabilityInput", modelProperties: { - id: { - serializedName: "id", + name: { + serializedName: "name", type: { name: "String" } }, type: { - required: true, serializedName: "type", type: { name: "String" @@ -719,92 +1004,125 @@ export const StorageAccount: msRest.CompositeMapper = { } }; -export const SyncStorageKeysInput: msRest.CompositeMapper = { - serializedName: "SyncStorageKeysInput", +export const ErrorAdditionalInfo: msRest.CompositeMapper = { + serializedName: "ErrorAdditionalInfo", type: { name: "Composite", - className: "SyncStorageKeysInput", + className: "ErrorAdditionalInfo", modelProperties: { - id: { - serializedName: "id", + type: { + readOnly: true, + serializedName: "type", type: { name: "String" } + }, + info: { + readOnly: true, + serializedName: "info", + type: { + name: "Object" + } } } } }; -export const KeyVaultProperties: msRest.CompositeMapper = { - serializedName: "KeyVaultProperties", +export const ErrorDetail: msRest.CompositeMapper = { + serializedName: "ErrorDetail", type: { name: "Composite", - className: "KeyVaultProperties", + className: "ErrorDetail", modelProperties: { - keyIdentifier: { - serializedName: "keyIdentifier", + code: { + readOnly: true, + serializedName: "code", type: { name: "String" } }, - currentKeyIdentifier: { + message: { readOnly: true, - serializedName: "currentKeyIdentifier", + serializedName: "message", + type: { + name: "String" + } + }, + target: { + readOnly: true, + serializedName: "target", + type: { + name: "String" + } + }, + details: { + readOnly: true, + serializedName: "details", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorDetail" + } + } + } + }, + additionalInfo: { + readOnly: true, + serializedName: "additionalInfo", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorAdditionalInfo" + } + } } } } } }; -export const AccountEncryption: msRest.CompositeMapper = { - serializedName: "AccountEncryption", +export const ErrorResponse: msRest.CompositeMapper = { + serializedName: "ErrorResponse", type: { name: "Composite", - className: "AccountEncryption", + className: "ErrorResponse", modelProperties: { - type: { - required: true, - serializedName: "type", - type: { - name: "String" - } - }, - keyVaultProperties: { - serializedName: "keyVaultProperties", + error: { + serializedName: "error", type: { name: "Composite", - className: "KeyVaultProperties" + className: "ErrorDetail" } } } } }; -export const MediaServiceIdentity: msRest.CompositeMapper = { - serializedName: "MediaServiceIdentity", +export const ProxyResource: msRest.CompositeMapper = { + serializedName: "ProxyResource", type: { name: "Composite", - className: "MediaServiceIdentity", + className: "ProxyResource", modelProperties: { - type: { - required: true, - serializedName: "type", - type: { - name: "String" - } - }, - principalId: { - readOnly: true, - serializedName: "principalId", - type: { - name: "String" - } - }, - tenantId: { + ...Resource.type.modelProperties + } + } +}; + +export const AzureEntityResource: msRest.CompositeMapper = { + serializedName: "AzureEntityResource", + type: { + name: "Composite", + className: "AzureEntityResource", + modelProperties: { + ...Resource.type.modelProperties, + etag: { readOnly: true, - serializedName: "tenantId", + serializedName: "etag", type: { name: "String" } @@ -813,74 +1131,43 @@ export const MediaServiceIdentity: msRest.CompositeMapper = { } }; -export const MediaService: msRest.CompositeMapper = { - serializedName: "MediaService", +export const PrivateLinkServiceConnectionState: msRest.CompositeMapper = { + serializedName: "PrivateLinkServiceConnectionState", type: { name: "Composite", - className: "MediaService", + className: "PrivateLinkServiceConnectionState", modelProperties: { - ...TrackedResource.type.modelProperties, - mediaServiceId: { - nullable: false, - readOnly: true, - serializedName: "properties.mediaServiceId", - type: { - name: "Uuid" - } - }, - storageAccounts: { - serializedName: "properties.storageAccounts", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "StorageAccount" - } - } - } - }, - storageAuthentication: { - nullable: true, - serializedName: "properties.storageAuthentication", + status: { + serializedName: "status", type: { name: "String" } }, - encryption: { - serializedName: "properties.encryption", - type: { - name: "Composite", - className: "AccountEncryption" - } - }, - identity: { - serializedName: "identity", + description: { + serializedName: "description", type: { - name: "Composite", - className: "MediaServiceIdentity" + name: "String" } }, - systemData: { - readOnly: true, - serializedName: "systemData", + actionsRequired: { + serializedName: "actionsRequired", type: { - name: "Composite", - className: "SystemData" + name: "String" } } } } }; -export const ListEdgePoliciesInput: msRest.CompositeMapper = { - serializedName: "ListEdgePoliciesInput", +export const PrivateEndpoint: msRest.CompositeMapper = { + serializedName: "PrivateEndpoint", type: { name: "Composite", - className: "ListEdgePoliciesInput", + className: "PrivateEndpoint", modelProperties: { - deviceId: { - serializedName: "deviceId", + id: { + readOnly: true, + serializedName: "id", type: { name: "String" } @@ -889,26 +1176,30 @@ export const ListEdgePoliciesInput: msRest.CompositeMapper = { } }; -export const EdgeUsageDataEventHub: msRest.CompositeMapper = { - serializedName: "EdgeUsageDataEventHub", +export const PrivateEndpointConnection: msRest.CompositeMapper = { + serializedName: "PrivateEndpointConnection", type: { name: "Composite", - className: "EdgeUsageDataEventHub", + className: "PrivateEndpointConnection", modelProperties: { - name: { - serializedName: "name", + ...Resource.type.modelProperties, + privateEndpoint: { + serializedName: "properties.privateEndpoint", type: { - name: "String" + name: "Composite", + className: "PrivateEndpoint" } }, - namespace: { - serializedName: "namespace", + privateLinkServiceConnectionState: { + required: true, + serializedName: "properties.privateLinkServiceConnectionState", type: { - name: "String" + name: "Composite", + className: "PrivateLinkServiceConnectionState" } }, - token: { - serializedName: "token", + provisioningState: { + serializedName: "properties.provisioningState", type: { name: "String" } @@ -917,117 +1208,160 @@ export const EdgeUsageDataEventHub: msRest.CompositeMapper = { } }; -export const EdgeUsageDataCollectionPolicy: msRest.CompositeMapper = { - serializedName: "EdgeUsageDataCollectionPolicy", +export const PrivateEndpointConnectionListResult: msRest.CompositeMapper = { + serializedName: "PrivateEndpointConnectionListResult", type: { name: "Composite", - className: "EdgeUsageDataCollectionPolicy", + className: "PrivateEndpointConnectionListResult", modelProperties: { - dataCollectionFrequency: { - serializedName: "dataCollectionFrequency", + value: { + serializedName: "value", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateEndpointConnection" + } + } } - }, - dataReportingFrequency: { - serializedName: "dataReportingFrequency", + } + } + } +}; + +export const PrivateLinkResource: msRest.CompositeMapper = { + serializedName: "PrivateLinkResource", + type: { + name: "Composite", + className: "PrivateLinkResource", + modelProperties: { + ...Resource.type.modelProperties, + groupId: { + readOnly: true, + serializedName: "properties.groupId", type: { name: "String" } }, - maxAllowedUnreportedUsageDuration: { - serializedName: "maxAllowedUnreportedUsageDuration", + requiredMembers: { + readOnly: true, + serializedName: "properties.requiredMembers", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - eventHubDetails: { - serializedName: "eventHubDetails", + requiredZoneNames: { + serializedName: "properties.requiredZoneNames", type: { - name: "Composite", - className: "EdgeUsageDataEventHub" + name: "Sequence", + element: { + type: { + name: "String" + } + } } } } } }; -export const EdgePolicies: msRest.CompositeMapper = { - serializedName: "EdgePolicies", +export const PrivateLinkResourceListResult: msRest.CompositeMapper = { + serializedName: "PrivateLinkResourceListResult", type: { name: "Composite", - className: "EdgePolicies", + className: "PrivateLinkResourceListResult", modelProperties: { - usageDataCollectionPolicy: { - serializedName: "usageDataCollectionPolicy", + value: { + serializedName: "value", type: { - name: "Composite", - className: "EdgeUsageDataCollectionPolicy" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateLinkResource" + } + } } } } } }; -export const CheckNameAvailabilityInput: msRest.CompositeMapper = { - serializedName: "CheckNameAvailabilityInput", +export const PresentationTimeRange: msRest.CompositeMapper = { + serializedName: "PresentationTimeRange", type: { name: "Composite", - className: "CheckNameAvailabilityInput", + className: "PresentationTimeRange", modelProperties: { - name: { - serializedName: "name", + startTimestamp: { + serializedName: "startTimestamp", + type: { + name: "Number" + } + }, + endTimestamp: { + serializedName: "endTimestamp", + type: { + name: "Number" + } + }, + presentationWindowDuration: { + serializedName: "presentationWindowDuration", + type: { + name: "Number" + } + }, + liveBackoffDuration: { + serializedName: "liveBackoffDuration", type: { - name: "String" + name: "Number" } }, - type: { - serializedName: "type", + timescale: { + serializedName: "timescale", type: { - name: "String" + name: "Number" + } + }, + forceEndTimestamp: { + serializedName: "forceEndTimestamp", + type: { + name: "Boolean" } } } } }; -export const PrivateLinkServiceConnectionState: msRest.CompositeMapper = { - serializedName: "PrivateLinkServiceConnectionState", +export const FilterTrackPropertyCondition: msRest.CompositeMapper = { + serializedName: "FilterTrackPropertyCondition", type: { name: "Composite", - className: "PrivateLinkServiceConnectionState", + className: "FilterTrackPropertyCondition", modelProperties: { - status: { - serializedName: "status", + property: { + required: true, + serializedName: "property", type: { name: "String" } }, - description: { - serializedName: "description", + value: { + required: true, + serializedName: "value", type: { name: "String" } }, - actionsRequired: { - serializedName: "actionsRequired", - type: { - name: "String" - } - } - } - } -}; - -export const PrivateEndpoint: msRest.CompositeMapper = { - serializedName: "PrivateEndpoint", - type: { - name: "Composite", - className: "PrivateEndpoint", - modelProperties: { - id: { - readOnly: true, - serializedName: "id", + operation: { + required: true, + serializedName: "operation", type: { name: "String" } @@ -1036,52 +1370,38 @@ export const PrivateEndpoint: msRest.CompositeMapper = { } }; -export const PrivateEndpointConnection: msRest.CompositeMapper = { - serializedName: "PrivateEndpointConnection", +export const FirstQuality: msRest.CompositeMapper = { + serializedName: "FirstQuality", type: { name: "Composite", - className: "PrivateEndpointConnection", + className: "FirstQuality", modelProperties: { - ...Resource.type.modelProperties, - privateEndpoint: { - serializedName: "properties.privateEndpoint", - type: { - name: "Composite", - className: "PrivateEndpoint" - } - }, - privateLinkServiceConnectionState: { + bitrate: { required: true, - serializedName: "properties.privateLinkServiceConnectionState", - type: { - name: "Composite", - className: "PrivateLinkServiceConnectionState" - } - }, - provisioningState: { - serializedName: "properties.provisioningState", + serializedName: "bitrate", type: { - name: "String" + name: "Number" } } } } }; -export const PrivateEndpointConnectionListResult: msRest.CompositeMapper = { - serializedName: "PrivateEndpointConnectionListResult", +export const FilterTrackSelection: msRest.CompositeMapper = { + serializedName: "FilterTrackSelection", type: { name: "Composite", - className: "PrivateEndpointConnectionListResult", + className: "FilterTrackSelection", modelProperties: { - value: { - serializedName: "value", + trackSelections: { + required: true, + serializedName: "trackSelections", type: { name: "Sequence", element: { type: { name: "Composite", - className: "PrivateEndpointConnection" + className: "FilterTrackPropertyCondition" } } } @@ -1090,63 +1410,45 @@ export const PrivateEndpointConnectionListResult: msRest.CompositeMapper = { } }; -export const PrivateLinkResource: msRest.CompositeMapper = { - serializedName: "PrivateLinkResource", +export const AccountFilter: msRest.CompositeMapper = { + serializedName: "AccountFilter", type: { name: "Composite", - className: "PrivateLinkResource", + className: "AccountFilter", modelProperties: { - ...Resource.type.modelProperties, - groupId: { - readOnly: true, - serializedName: "properties.groupId", + ...ProxyResource.type.modelProperties, + presentationTimeRange: { + serializedName: "properties.presentationTimeRange", type: { - name: "String" + name: "Composite", + className: "PresentationTimeRange" } }, - requiredMembers: { - readOnly: true, - serializedName: "properties.requiredMembers", + firstQuality: { + serializedName: "properties.firstQuality", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "Composite", + className: "FirstQuality" } }, - requiredZoneNames: { - serializedName: "properties.requiredZoneNames", + tracks: { + serializedName: "properties.tracks", type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "FilterTrackSelection" } } } - } - } - } -}; - -export const PrivateLinkResourceListResult: msRest.CompositeMapper = { - serializedName: "PrivateLinkResourceListResult", - type: { - name: "Composite", - className: "PrivateLinkResourceListResult", - modelProperties: { - value: { - serializedName: "value", + }, + systemData: { + readOnly: true, + serializedName: "systemData", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PrivateLinkResource" - } - } + name: "Composite", + className: "SystemData" } } } @@ -3407,6 +3709,64 @@ export const PngImage: msRest.CompositeMapper = { } }; +export const PresetConfigurations: msRest.CompositeMapper = { + serializedName: "PresetConfigurations", + type: { + name: "Composite", + className: "PresetConfigurations", + modelProperties: { + complexity: { + serializedName: "complexity", + type: { + name: "String" + } + }, + interleaveOutput: { + serializedName: "interleaveOutput", + type: { + name: "String" + } + }, + keyFrameIntervalInSeconds: { + serializedName: "keyFrameIntervalInSeconds", + type: { + name: "Number" + } + }, + maxBitrateBps: { + serializedName: "maxBitrateBps", + type: { + name: "Number" + } + }, + maxHeight: { + serializedName: "maxHeight", + type: { + name: "Number" + } + }, + maxLayers: { + serializedName: "maxLayers", + type: { + name: "Number" + } + }, + minBitrateBps: { + serializedName: "minBitrateBps", + type: { + name: "Number" + } + }, + minHeight: { + serializedName: "minHeight", + type: { + name: "Number" + } + } + } + } +}; + export const BuiltInStandardEncoderPreset: msRest.CompositeMapper = { serializedName: "#Microsoft.Media.BuiltInStandardEncoderPreset", type: { @@ -3416,6 +3776,13 @@ export const BuiltInStandardEncoderPreset: msRest.CompositeMapper = { className: "BuiltInStandardEncoderPreset", modelProperties: { ...Preset.type.modelProperties, + configurations: { + serializedName: "configurations", + type: { + name: "Composite", + className: "PresetConfigurations" + } + }, presetName: { required: true, serializedName: "presetName", @@ -3989,6 +4356,13 @@ export const JobOutput: msRest.CompositeMapper = { className: "JobError" } }, + presetOverride: { + serializedName: "presetOverride", + type: { + name: "Composite", + className: "Preset" + } + }, state: { nullable: false, readOnly: true, @@ -5013,6 +5387,14 @@ export const LiveOutput: msRest.CompositeMapper = { type: { name: "String" } + }, + systemData: { + readOnly: true, + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } } } } @@ -5707,39 +6089,11 @@ export const StreamingEndpoint: msRest.CompositeMapper = { } }; -export const AccountFilterCollection: msRest.CompositeMapper = { - serializedName: "AccountFilterCollection", - type: { - name: "Composite", - className: "AccountFilterCollection", - modelProperties: { - value: { - serializedName: "", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AccountFilter" - } - } - } - }, - odatanextLink: { - serializedName: "@odata\\.nextLink", - type: { - name: "String" - } - } - } - } -}; - -export const OperationCollection: msRest.CompositeMapper = { - serializedName: "OperationCollection", +export const MediaServiceCollection: msRest.CompositeMapper = { + serializedName: "MediaServiceCollection", type: { name: "Composite", - className: "OperationCollection", + className: "MediaServiceCollection", modelProperties: { value: { serializedName: "", @@ -5748,7 +6102,7 @@ export const OperationCollection: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "Operation" + className: "MediaService" } } } @@ -5763,11 +6117,11 @@ export const OperationCollection: msRest.CompositeMapper = { } }; -export const MediaServiceCollection: msRest.CompositeMapper = { - serializedName: "MediaServiceCollection", +export const AccountFilterCollection: msRest.CompositeMapper = { + serializedName: "AccountFilterCollection", type: { name: "Composite", - className: "MediaServiceCollection", + className: "AccountFilterCollection", modelProperties: { value: { serializedName: "", @@ -5776,7 +6130,7 @@ export const MediaServiceCollection: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "MediaService" + className: "AccountFilter" } } } diff --git a/sdk/mediaservices/arm-mediaservices/src/models/mediaservicesMappers.ts b/sdk/mediaservices/arm-mediaservices/src/models/mediaservicesMappers.ts index 927b349e984f..b6950312972e 100644 --- a/sdk/mediaservices/arm-mediaservices/src/models/mediaservicesMappers.ts +++ b/sdk/mediaservices/arm-mediaservices/src/models/mediaservicesMappers.ts @@ -10,11 +10,11 @@ export { discriminators, AacAudio, AbsoluteClipTime, + AccessControl, AccountEncryption, AccountFilter, AkamaiAccessControl, AkamaiSignatureHeaderAuthenticationKey, - ApiError, Asset, AssetFilter, Audio, @@ -64,6 +64,9 @@ export { EdgeUsageDataEventHub, EnabledProtocols, EnvelopeEncryption, + ErrorAdditionalInfo, + ErrorDetail, + ErrorResponse, FaceDetectorPreset, Filters, FilterTrackPropertyCondition, @@ -98,6 +101,7 @@ export { JpgFormat, JpgImage, JpgLayer, + KeyDelivery, KeyVaultProperties, Layer, ListEdgePoliciesInput, @@ -115,10 +119,10 @@ export { MediaService, MediaServiceCollection, MediaServiceIdentity, + MediaServiceUpdate, Mp4Format, MultiBitrateFormat, NoEncryption, - ODataError, OutputFile, Overlay, PngFormat, @@ -126,6 +130,7 @@ export { PngLayer, PresentationTimeRange, Preset, + PresetConfigurations, PrivateEndpoint, PrivateEndpointConnection, PrivateLinkResource, @@ -133,6 +138,7 @@ export { ProxyResource, Rectangle, Resource, + ResourceIdentity, SelectAudioTrackByAttribute, SelectAudioTrackById, SelectVideoTrackByAttribute, @@ -158,6 +164,7 @@ export { Transform, TransformOutput, TransportStreamFormat, + UserAssignedManagedIdentity, UtcClipTime, Video, VideoAnalyzerPreset, diff --git a/sdk/mediaservices/arm-mediaservices/src/models/operationsMappers.ts b/sdk/mediaservices/arm-mediaservices/src/models/operationsMappers.ts index 452f60a3526c..580ccfeafd49 100644 --- a/sdk/mediaservices/arm-mediaservices/src/models/operationsMappers.ts +++ b/sdk/mediaservices/arm-mediaservices/src/models/operationsMappers.ts @@ -8,11 +8,12 @@ export { discriminators, - ApiError, + ErrorAdditionalInfo, + ErrorDetail, + ErrorResponse, LogSpecification, MetricDimension, MetricSpecification, - ODataError, Operation, OperationCollection, OperationDisplay, diff --git a/sdk/mediaservices/arm-mediaservices/src/models/privateEndpointConnectionsMappers.ts b/sdk/mediaservices/arm-mediaservices/src/models/privateEndpointConnectionsMappers.ts index 662a758fa623..12c222a82833 100644 --- a/sdk/mediaservices/arm-mediaservices/src/models/privateEndpointConnectionsMappers.ts +++ b/sdk/mediaservices/arm-mediaservices/src/models/privateEndpointConnectionsMappers.ts @@ -10,11 +10,11 @@ export { discriminators, AacAudio, AbsoluteClipTime, + AccessControl, AccountEncryption, AccountFilter, AkamaiAccessControl, AkamaiSignatureHeaderAuthenticationKey, - ApiError, Asset, AssetFilter, Audio, @@ -61,6 +61,9 @@ export { Deinterlace, EnabledProtocols, EnvelopeEncryption, + ErrorAdditionalInfo, + ErrorDetail, + ErrorResponse, FaceDetectorPreset, Filters, FilterTrackPropertyCondition, @@ -95,6 +98,7 @@ export { JpgFormat, JpgImage, JpgLayer, + KeyDelivery, KeyVaultProperties, Layer, LiveEvent, @@ -113,7 +117,6 @@ export { Mp4Format, MultiBitrateFormat, NoEncryption, - ODataError, OutputFile, Overlay, PngFormat, @@ -121,6 +124,7 @@ export { PngLayer, PresentationTimeRange, Preset, + PresetConfigurations, PrivateEndpoint, PrivateEndpointConnection, PrivateEndpointConnectionListResult, @@ -129,6 +133,7 @@ export { ProxyResource, Rectangle, Resource, + ResourceIdentity, SelectAudioTrackByAttribute, SelectAudioTrackById, SelectVideoTrackByAttribute, @@ -153,6 +158,7 @@ export { Transform, TransformOutput, TransportStreamFormat, + UserAssignedManagedIdentity, UtcClipTime, Video, VideoAnalyzerPreset, diff --git a/sdk/mediaservices/arm-mediaservices/src/models/privateLinkResourcesMappers.ts b/sdk/mediaservices/arm-mediaservices/src/models/privateLinkResourcesMappers.ts index 347373bdd190..8d2e6e7af2e9 100644 --- a/sdk/mediaservices/arm-mediaservices/src/models/privateLinkResourcesMappers.ts +++ b/sdk/mediaservices/arm-mediaservices/src/models/privateLinkResourcesMappers.ts @@ -10,11 +10,11 @@ export { discriminators, AacAudio, AbsoluteClipTime, + AccessControl, AccountEncryption, AccountFilter, AkamaiAccessControl, AkamaiSignatureHeaderAuthenticationKey, - ApiError, Asset, AssetFilter, Audio, @@ -61,6 +61,9 @@ export { Deinterlace, EnabledProtocols, EnvelopeEncryption, + ErrorAdditionalInfo, + ErrorDetail, + ErrorResponse, FaceDetectorPreset, Filters, FilterTrackPropertyCondition, @@ -95,6 +98,7 @@ export { JpgFormat, JpgImage, JpgLayer, + KeyDelivery, KeyVaultProperties, Layer, LiveEvent, @@ -113,7 +117,6 @@ export { Mp4Format, MultiBitrateFormat, NoEncryption, - ODataError, OutputFile, Overlay, PngFormat, @@ -121,6 +124,7 @@ export { PngLayer, PresentationTimeRange, Preset, + PresetConfigurations, PrivateEndpoint, PrivateEndpointConnection, PrivateLinkResource, @@ -129,6 +133,7 @@ export { ProxyResource, Rectangle, Resource, + ResourceIdentity, SelectAudioTrackByAttribute, SelectAudioTrackById, SelectVideoTrackByAttribute, @@ -153,6 +158,7 @@ export { Transform, TransformOutput, TransportStreamFormat, + UserAssignedManagedIdentity, UtcClipTime, Video, VideoAnalyzerPreset, diff --git a/sdk/mediaservices/arm-mediaservices/src/models/streamingEndpointsMappers.ts b/sdk/mediaservices/arm-mediaservices/src/models/streamingEndpointsMappers.ts index 036f82669b0c..9f4a9decc6d2 100644 --- a/sdk/mediaservices/arm-mediaservices/src/models/streamingEndpointsMappers.ts +++ b/sdk/mediaservices/arm-mediaservices/src/models/streamingEndpointsMappers.ts @@ -10,11 +10,11 @@ export { discriminators, AacAudio, AbsoluteClipTime, + AccessControl, AccountEncryption, AccountFilter, AkamaiAccessControl, AkamaiSignatureHeaderAuthenticationKey, - ApiError, Asset, AssetFilter, Audio, @@ -61,6 +61,9 @@ export { Deinterlace, EnabledProtocols, EnvelopeEncryption, + ErrorAdditionalInfo, + ErrorDetail, + ErrorResponse, FaceDetectorPreset, Filters, FilterTrackPropertyCondition, @@ -95,6 +98,7 @@ export { JpgFormat, JpgImage, JpgLayer, + KeyDelivery, KeyVaultProperties, Layer, LiveEvent, @@ -113,7 +117,6 @@ export { Mp4Format, MultiBitrateFormat, NoEncryption, - ODataError, OutputFile, Overlay, PngFormat, @@ -121,6 +124,7 @@ export { PngLayer, PresentationTimeRange, Preset, + PresetConfigurations, PrivateEndpoint, PrivateEndpointConnection, PrivateLinkResource, @@ -128,6 +132,7 @@ export { ProxyResource, Rectangle, Resource, + ResourceIdentity, SelectAudioTrackByAttribute, SelectAudioTrackById, SelectVideoTrackByAttribute, @@ -154,6 +159,7 @@ export { Transform, TransformOutput, TransportStreamFormat, + UserAssignedManagedIdentity, UtcClipTime, Video, VideoAnalyzerPreset, diff --git a/sdk/mediaservices/arm-mediaservices/src/models/streamingLocatorsMappers.ts b/sdk/mediaservices/arm-mediaservices/src/models/streamingLocatorsMappers.ts index 97a5f8af7940..6228e85d899e 100644 --- a/sdk/mediaservices/arm-mediaservices/src/models/streamingLocatorsMappers.ts +++ b/sdk/mediaservices/arm-mediaservices/src/models/streamingLocatorsMappers.ts @@ -10,11 +10,11 @@ export { discriminators, AacAudio, AbsoluteClipTime, + AccessControl, AccountEncryption, AccountFilter, AkamaiAccessControl, AkamaiSignatureHeaderAuthenticationKey, - ApiError, Asset, AssetFilter, Audio, @@ -61,6 +61,9 @@ export { Deinterlace, EnabledProtocols, EnvelopeEncryption, + ErrorAdditionalInfo, + ErrorDetail, + ErrorResponse, FaceDetectorPreset, Filters, FilterTrackPropertyCondition, @@ -95,6 +98,7 @@ export { JpgFormat, JpgImage, JpgLayer, + KeyDelivery, KeyVaultProperties, Layer, ListContentKeysResponse, @@ -115,7 +119,6 @@ export { Mp4Format, MultiBitrateFormat, NoEncryption, - ODataError, OutputFile, Overlay, PngFormat, @@ -123,6 +126,7 @@ export { PngLayer, PresentationTimeRange, Preset, + PresetConfigurations, PrivateEndpoint, PrivateEndpointConnection, PrivateLinkResource, @@ -130,6 +134,7 @@ export { ProxyResource, Rectangle, Resource, + ResourceIdentity, SelectAudioTrackByAttribute, SelectAudioTrackById, SelectVideoTrackByAttribute, @@ -156,6 +161,7 @@ export { Transform, TransformOutput, TransportStreamFormat, + UserAssignedManagedIdentity, UtcClipTime, Video, VideoAnalyzerPreset, diff --git a/sdk/mediaservices/arm-mediaservices/src/models/streamingPoliciesMappers.ts b/sdk/mediaservices/arm-mediaservices/src/models/streamingPoliciesMappers.ts index a07f09fd345e..cd96e9e9e0ca 100644 --- a/sdk/mediaservices/arm-mediaservices/src/models/streamingPoliciesMappers.ts +++ b/sdk/mediaservices/arm-mediaservices/src/models/streamingPoliciesMappers.ts @@ -10,11 +10,11 @@ export { discriminators, AacAudio, AbsoluteClipTime, + AccessControl, AccountEncryption, AccountFilter, AkamaiAccessControl, AkamaiSignatureHeaderAuthenticationKey, - ApiError, Asset, AssetFilter, Audio, @@ -61,6 +61,9 @@ export { Deinterlace, EnabledProtocols, EnvelopeEncryption, + ErrorAdditionalInfo, + ErrorDetail, + ErrorResponse, FaceDetectorPreset, Filters, FilterTrackPropertyCondition, @@ -95,6 +98,7 @@ export { JpgFormat, JpgImage, JpgLayer, + KeyDelivery, KeyVaultProperties, Layer, LiveEvent, @@ -113,7 +117,6 @@ export { Mp4Format, MultiBitrateFormat, NoEncryption, - ODataError, OutputFile, Overlay, PngFormat, @@ -121,6 +124,7 @@ export { PngLayer, PresentationTimeRange, Preset, + PresetConfigurations, PrivateEndpoint, PrivateEndpointConnection, PrivateLinkResource, @@ -128,6 +132,7 @@ export { ProxyResource, Rectangle, Resource, + ResourceIdentity, SelectAudioTrackByAttribute, SelectAudioTrackById, SelectVideoTrackByAttribute, @@ -153,6 +158,7 @@ export { Transform, TransformOutput, TransportStreamFormat, + UserAssignedManagedIdentity, UtcClipTime, Video, VideoAnalyzerPreset, diff --git a/sdk/mediaservices/arm-mediaservices/src/models/transformsMappers.ts b/sdk/mediaservices/arm-mediaservices/src/models/transformsMappers.ts index 8c3c5aed4f33..d6ddd79f0e5b 100644 --- a/sdk/mediaservices/arm-mediaservices/src/models/transformsMappers.ts +++ b/sdk/mediaservices/arm-mediaservices/src/models/transformsMappers.ts @@ -10,11 +10,11 @@ export { discriminators, AacAudio, AbsoluteClipTime, + AccessControl, AccountEncryption, AccountFilter, AkamaiAccessControl, AkamaiSignatureHeaderAuthenticationKey, - ApiError, Asset, AssetFilter, Audio, @@ -61,6 +61,9 @@ export { Deinterlace, EnabledProtocols, EnvelopeEncryption, + ErrorAdditionalInfo, + ErrorDetail, + ErrorResponse, FaceDetectorPreset, Filters, FilterTrackPropertyCondition, @@ -95,6 +98,7 @@ export { JpgFormat, JpgImage, JpgLayer, + KeyDelivery, KeyVaultProperties, Layer, LiveEvent, @@ -113,7 +117,6 @@ export { Mp4Format, MultiBitrateFormat, NoEncryption, - ODataError, OutputFile, Overlay, PngFormat, @@ -121,6 +124,7 @@ export { PngLayer, PresentationTimeRange, Preset, + PresetConfigurations, PrivateEndpoint, PrivateEndpointConnection, PrivateLinkResource, @@ -128,6 +132,7 @@ export { ProxyResource, Rectangle, Resource, + ResourceIdentity, SelectAudioTrackByAttribute, SelectAudioTrackById, SelectVideoTrackByAttribute, @@ -153,6 +158,7 @@ export { TransformCollection, TransformOutput, TransportStreamFormat, + UserAssignedManagedIdentity, UtcClipTime, Video, VideoAnalyzerPreset, diff --git a/sdk/mediaservices/arm-mediaservices/src/operations/accountFilters.ts b/sdk/mediaservices/arm-mediaservices/src/operations/accountFilters.ts index 1ca769099015..6c75fe01ee68 100644 --- a/sdk/mediaservices/arm-mediaservices/src/operations/accountFilters.ts +++ b/sdk/mediaservices/arm-mediaservices/src/operations/accountFilters.ts @@ -265,7 +265,7 @@ const listOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.AccountFilterCollection }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -290,9 +290,8 @@ const getOperationSpec: msRest.OperationSpec = { 200: { bodyMapper: Mappers.AccountFilter }, - 404: {}, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -328,7 +327,7 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.AccountFilter }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -353,7 +352,7 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { 200: {}, 204: {}, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -386,7 +385,7 @@ const updateOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.AccountFilter }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -410,7 +409,7 @@ const listNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.AccountFilterCollection }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer diff --git a/sdk/mediaservices/arm-mediaservices/src/operations/assetFilters.ts b/sdk/mediaservices/arm-mediaservices/src/operations/assetFilters.ts index 50d272e306cc..19080c8a4e21 100644 --- a/sdk/mediaservices/arm-mediaservices/src/operations/assetFilters.ts +++ b/sdk/mediaservices/arm-mediaservices/src/operations/assetFilters.ts @@ -286,7 +286,7 @@ const listOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.AssetFilterCollection }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -312,9 +312,8 @@ const getOperationSpec: msRest.OperationSpec = { 200: { bodyMapper: Mappers.AssetFilter }, - 404: {}, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -351,7 +350,7 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.AssetFilter }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -377,7 +376,7 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { 200: {}, 204: {}, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -411,7 +410,7 @@ const updateOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.AssetFilter }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -435,7 +434,7 @@ const listNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.AssetFilterCollection }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer diff --git a/sdk/mediaservices/arm-mediaservices/src/operations/assets.ts b/sdk/mediaservices/arm-mediaservices/src/operations/assets.ts index 5f17f10bf0f5..f371503db8af 100644 --- a/sdk/mediaservices/arm-mediaservices/src/operations/assets.ts +++ b/sdk/mediaservices/arm-mediaservices/src/operations/assets.ts @@ -385,7 +385,7 @@ const listOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.AssetCollection }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -410,9 +410,8 @@ const getOperationSpec: msRest.OperationSpec = { 200: { bodyMapper: Mappers.Asset }, - 404: {}, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -448,7 +447,7 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.Asset }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -473,7 +472,7 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { 200: {}, 204: {}, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -506,7 +505,7 @@ const updateOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.Asset }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -539,7 +538,7 @@ const listContainerSasOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.AssetContainerSas }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -565,7 +564,7 @@ const getEncryptionKeyOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.StorageEncryptedAssetDecryptionData }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -591,7 +590,7 @@ const listStreamingLocatorsOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.ListStreamingLocatorsResponse }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -618,7 +617,7 @@ const listNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.AssetCollection }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer diff --git a/sdk/mediaservices/arm-mediaservices/src/operations/contentKeyPolicies.ts b/sdk/mediaservices/arm-mediaservices/src/operations/contentKeyPolicies.ts index df39bdd2432c..83e8133d6014 100644 --- a/sdk/mediaservices/arm-mediaservices/src/operations/contentKeyPolicies.ts +++ b/sdk/mediaservices/arm-mediaservices/src/operations/contentKeyPolicies.ts @@ -305,7 +305,7 @@ const listOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.ContentKeyPolicyCollection }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -330,9 +330,8 @@ const getOperationSpec: msRest.OperationSpec = { 200: { bodyMapper: Mappers.ContentKeyPolicy }, - 404: {}, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -368,7 +367,7 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.ContentKeyPolicy }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -393,7 +392,7 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { 200: {}, 204: {}, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -426,7 +425,7 @@ const updateOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.ContentKeyPolicy }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -451,9 +450,8 @@ const getPolicyPropertiesWithSecretsOperationSpec: msRest.OperationSpec = { 200: { bodyMapper: Mappers.ContentKeyPolicyProperties }, - 404: {}, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -480,7 +478,7 @@ const listNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.ContentKeyPolicyCollection }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer diff --git a/sdk/mediaservices/arm-mediaservices/src/operations/index.ts b/sdk/mediaservices/arm-mediaservices/src/operations/index.ts index 445034cf4aac..e227eb3e6de7 100644 --- a/sdk/mediaservices/arm-mediaservices/src/operations/index.ts +++ b/sdk/mediaservices/arm-mediaservices/src/operations/index.ts @@ -7,12 +7,12 @@ * regenerated. */ -export * from "./accountFilters"; export * from "./operations"; export * from "./mediaservices"; export * from "./privateLinkResources"; export * from "./privateEndpointConnections"; export * from "./locations"; +export * from "./accountFilters"; export * from "./assets"; export * from "./assetFilters"; export * from "./contentKeyPolicies"; diff --git a/sdk/mediaservices/arm-mediaservices/src/operations/jobs.ts b/sdk/mediaservices/arm-mediaservices/src/operations/jobs.ts index ad8a37fbfc06..3477005b851a 100644 --- a/sdk/mediaservices/arm-mediaservices/src/operations/jobs.ts +++ b/sdk/mediaservices/arm-mediaservices/src/operations/jobs.ts @@ -331,7 +331,7 @@ const listOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.JobCollection }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -357,9 +357,8 @@ const getOperationSpec: msRest.OperationSpec = { 200: { bodyMapper: Mappers.Job }, - 404: {}, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -393,7 +392,7 @@ const createOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.Job }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -419,7 +418,7 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { 200: {}, 204: {}, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -453,7 +452,7 @@ const updateOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.Job }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -478,7 +477,7 @@ const cancelJobOperationSpec: msRest.OperationSpec = { responses: { 200: {}, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -504,7 +503,7 @@ const listNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.JobCollection }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer diff --git a/sdk/mediaservices/arm-mediaservices/src/operations/liveEvents.ts b/sdk/mediaservices/arm-mediaservices/src/operations/liveEvents.ts index acac36900336..7f55d795cb9f 100644 --- a/sdk/mediaservices/arm-mediaservices/src/operations/liveEvents.ts +++ b/sdk/mediaservices/arm-mediaservices/src/operations/liveEvents.ts @@ -405,7 +405,7 @@ const listOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.LiveEventListResult }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -430,9 +430,8 @@ const getOperationSpec: msRest.OperationSpec = { 200: { bodyMapper: Mappers.LiveEvent }, - 404: {}, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -469,7 +468,7 @@ const beginCreateOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.LiveEvent }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -505,7 +504,7 @@ const beginUpdateOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.LiveEvent }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -531,7 +530,7 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { 202: {}, 204: {}, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -556,7 +555,7 @@ const beginAllocateOperationSpec: msRest.OperationSpec = { 200: {}, 202: {}, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -581,7 +580,7 @@ const beginStartOperationSpec: msRest.OperationSpec = { 200: {}, 202: {}, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -613,7 +612,7 @@ const beginStopOperationSpec: msRest.OperationSpec = { 200: {}, 202: {}, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -638,7 +637,7 @@ const beginResetOperationSpec: msRest.OperationSpec = { 200: {}, 202: {}, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -662,7 +661,7 @@ const listNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.LiveEventListResult }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer diff --git a/sdk/mediaservices/arm-mediaservices/src/operations/liveOutputs.ts b/sdk/mediaservices/arm-mediaservices/src/operations/liveOutputs.ts index 1095155e5564..2c13da03c949 100644 --- a/sdk/mediaservices/arm-mediaservices/src/operations/liveOutputs.ts +++ b/sdk/mediaservices/arm-mediaservices/src/operations/liveOutputs.ts @@ -237,7 +237,7 @@ const listOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.LiveOutputListResult }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -263,9 +263,8 @@ const getOperationSpec: msRest.OperationSpec = { 200: { bodyMapper: Mappers.LiveOutput }, - 404: {}, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -302,7 +301,7 @@ const beginCreateOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.LiveOutput }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -329,7 +328,7 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { 202: {}, 204: {}, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -353,7 +352,7 @@ const listNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.LiveOutputListResult }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer diff --git a/sdk/mediaservices/arm-mediaservices/src/operations/locations.ts b/sdk/mediaservices/arm-mediaservices/src/operations/locations.ts index 3cf7b35e32bc..534cfed7cef2 100644 --- a/sdk/mediaservices/arm-mediaservices/src/operations/locations.ts +++ b/sdk/mediaservices/arm-mediaservices/src/operations/locations.ts @@ -86,7 +86,7 @@ const checkNameAvailabilityOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.EntityNameAvailabilityCheckOutput }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer diff --git a/sdk/mediaservices/arm-mediaservices/src/operations/mediaservices.ts b/sdk/mediaservices/arm-mediaservices/src/operations/mediaservices.ts index db9cec462b4a..df0324f3169d 100644 --- a/sdk/mediaservices/arm-mediaservices/src/operations/mediaservices.ts +++ b/sdk/mediaservices/arm-mediaservices/src/operations/mediaservices.ts @@ -166,14 +166,14 @@ export class Mediaservices { * @param [options] The optional parameters * @returns Promise */ - update(resourceGroupName: string, accountName: string, parameters: Models.MediaService, options?: msRest.RequestOptionsBase): Promise; + update(resourceGroupName: string, accountName: string, parameters: Models.MediaServiceUpdate, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. * @param parameters The request parameters * @param callback The callback */ - update(resourceGroupName: string, accountName: string, parameters: Models.MediaService, callback: msRest.ServiceCallback): void; + update(resourceGroupName: string, accountName: string, parameters: Models.MediaServiceUpdate, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. @@ -181,8 +181,8 @@ export class Mediaservices { * @param options The optional parameters * @param callback The callback */ - update(resourceGroupName: string, accountName: string, parameters: Models.MediaService, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - update(resourceGroupName: string, accountName: string, parameters: Models.MediaService, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + update(resourceGroupName: string, accountName: string, parameters: Models.MediaServiceUpdate, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + update(resourceGroupName: string, accountName: string, parameters: Models.MediaServiceUpdate, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, @@ -294,35 +294,6 @@ export class Mediaservices { callback) as Promise; } - /** - * Get the details of a Media Services account - * @summary Get a Media Services account - * @param accountName The Media Services account name. - * @param [options] The optional parameters - * @returns Promise - */ - getBySubscription(accountName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param accountName The Media Services account name. - * @param callback The callback - */ - getBySubscription(accountName: string, callback: msRest.ServiceCallback): void; - /** - * @param accountName The Media Services account name. - * @param options The optional parameters - * @param callback The callback - */ - getBySubscription(accountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getBySubscription(accountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - accountName, - options - }, - getBySubscriptionOperationSpec, - callback) as Promise; - } - /** * List Media Services accounts in the resource group * @summary List Media Services accounts @@ -402,7 +373,7 @@ const listOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.MediaServiceCollection }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -427,7 +398,7 @@ const getOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.MediaService }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -462,7 +433,7 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.MediaService }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -486,7 +457,7 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { 200: {}, 204: {}, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -509,7 +480,7 @@ const updateOperationSpec: msRest.OperationSpec = { requestBody: { parameterPath: "parameters", mapper: { - ...Mappers.MediaService, + ...Mappers.MediaServiceUpdate, required: true } }, @@ -518,7 +489,7 @@ const updateOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.MediaService }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -548,7 +519,7 @@ const syncStorageKeysOperationSpec: msRest.OperationSpec = { responses: { 200: {}, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -580,7 +551,7 @@ const listEdgePoliciesOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.EdgePolicies }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -603,31 +574,7 @@ const listBySubscriptionOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.MediaServiceCollection }, default: { - bodyMapper: Mappers.ApiError - } - }, - serializer -}; - -const getBySubscriptionOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Media/mediaservices/{accountName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.accountName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.MediaService - }, - default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -651,7 +598,7 @@ const listNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.MediaServiceCollection }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -675,7 +622,7 @@ const listBySubscriptionNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.MediaServiceCollection }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer diff --git a/sdk/mediaservices/arm-mediaservices/src/operations/operations.ts b/sdk/mediaservices/arm-mediaservices/src/operations/operations.ts index a7969c95e738..bd037269f947 100644 --- a/sdk/mediaservices/arm-mediaservices/src/operations/operations.ts +++ b/sdk/mediaservices/arm-mediaservices/src/operations/operations.ts @@ -49,35 +49,6 @@ export class Operations { listOperationSpec, callback) as Promise; } - - /** - * Lists all the Media Services operations. - * @summary List Operations - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback - */ - listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listNextOperationSpec, - callback) as Promise; - } } // Operation Specifications @@ -96,31 +67,7 @@ const listOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.OperationCollection }, default: { - bodyMapper: Mappers.ApiError - } - }, - serializer -}; - -const listNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.OperationCollection - }, - default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer diff --git a/sdk/mediaservices/arm-mediaservices/src/operations/privateEndpointConnections.ts b/sdk/mediaservices/arm-mediaservices/src/operations/privateEndpointConnections.ts index beff05393c8c..e4865d0a54ae 100644 --- a/sdk/mediaservices/arm-mediaservices/src/operations/privateEndpointConnections.ts +++ b/sdk/mediaservices/arm-mediaservices/src/operations/privateEndpointConnections.ts @@ -195,7 +195,7 @@ const listOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.PrivateEndpointConnectionListResult }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -221,7 +221,7 @@ const getOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.PrivateEndpointConnection }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -254,7 +254,7 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.PrivateEndpointConnection }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -277,8 +277,9 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { ], responses: { 200: {}, + 204: {}, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer diff --git a/sdk/mediaservices/arm-mediaservices/src/operations/privateLinkResources.ts b/sdk/mediaservices/arm-mediaservices/src/operations/privateLinkResources.ts index 1e61dc2033d8..ee0d880f6230 100644 --- a/sdk/mediaservices/arm-mediaservices/src/operations/privateLinkResources.ts +++ b/sdk/mediaservices/arm-mediaservices/src/operations/privateLinkResources.ts @@ -117,7 +117,7 @@ const listOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.PrivateLinkResourceListResult }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -143,7 +143,7 @@ const getOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.PrivateLinkResource }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer diff --git a/sdk/mediaservices/arm-mediaservices/src/operations/streamingEndpoints.ts b/sdk/mediaservices/arm-mediaservices/src/operations/streamingEndpoints.ts index 64f3f9595a4f..436725e8ed5c 100644 --- a/sdk/mediaservices/arm-mediaservices/src/operations/streamingEndpoints.ts +++ b/sdk/mediaservices/arm-mediaservices/src/operations/streamingEndpoints.ts @@ -366,7 +366,7 @@ const listOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.StreamingEndpointListResult }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -391,9 +391,8 @@ const getOperationSpec: msRest.OperationSpec = { 200: { bodyMapper: Mappers.StreamingEndpoint }, - 404: {}, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -430,7 +429,7 @@ const beginCreateOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.StreamingEndpoint }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -466,7 +465,7 @@ const beginUpdateOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.StreamingEndpoint }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -492,7 +491,7 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { 202: {}, 204: {}, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -517,7 +516,7 @@ const beginStartOperationSpec: msRest.OperationSpec = { 200: {}, 202: {}, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -542,7 +541,7 @@ const beginStopOperationSpec: msRest.OperationSpec = { 200: {}, 202: {}, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -574,7 +573,7 @@ const beginScaleOperationSpec: msRest.OperationSpec = { 200: {}, 202: {}, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -598,7 +597,7 @@ const listNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.StreamingEndpointListResult }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer diff --git a/sdk/mediaservices/arm-mediaservices/src/operations/streamingLocators.ts b/sdk/mediaservices/arm-mediaservices/src/operations/streamingLocators.ts index f61eb89a23e6..0685671dc73c 100644 --- a/sdk/mediaservices/arm-mediaservices/src/operations/streamingLocators.ts +++ b/sdk/mediaservices/arm-mediaservices/src/operations/streamingLocators.ts @@ -301,7 +301,7 @@ const listOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.StreamingLocatorCollection }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -326,9 +326,8 @@ const getOperationSpec: msRest.OperationSpec = { 200: { bodyMapper: Mappers.StreamingLocator }, - 404: {}, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -361,7 +360,7 @@ const createOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.StreamingLocator }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -386,7 +385,7 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { 200: {}, 204: {}, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -412,7 +411,7 @@ const listContentKeysOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.ListContentKeysResponse }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -438,7 +437,7 @@ const listPathsOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.ListPathsResponse }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -465,7 +464,7 @@ const listNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.StreamingLocatorCollection }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer diff --git a/sdk/mediaservices/arm-mediaservices/src/operations/streamingPolicies.ts b/sdk/mediaservices/arm-mediaservices/src/operations/streamingPolicies.ts index 064a4e0a6a66..0a740433401b 100644 --- a/sdk/mediaservices/arm-mediaservices/src/operations/streamingPolicies.ts +++ b/sdk/mediaservices/arm-mediaservices/src/operations/streamingPolicies.ts @@ -227,7 +227,7 @@ const listOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.StreamingPolicyCollection }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -252,9 +252,8 @@ const getOperationSpec: msRest.OperationSpec = { 200: { bodyMapper: Mappers.StreamingPolicy }, - 404: {}, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -287,7 +286,7 @@ const createOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.StreamingPolicy }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -312,7 +311,7 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { 200: {}, 204: {}, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -339,7 +338,7 @@ const listNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.StreamingPolicyCollection }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer diff --git a/sdk/mediaservices/arm-mediaservices/src/operations/transforms.ts b/sdk/mediaservices/arm-mediaservices/src/operations/transforms.ts index 4bb59b8402b1..42aa1654d46f 100644 --- a/sdk/mediaservices/arm-mediaservices/src/operations/transforms.ts +++ b/sdk/mediaservices/arm-mediaservices/src/operations/transforms.ts @@ -267,7 +267,7 @@ const listOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.TransformCollection }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -292,9 +292,8 @@ const getOperationSpec: msRest.OperationSpec = { 200: { bodyMapper: Mappers.Transform }, - 404: {}, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -330,7 +329,7 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.Transform }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -355,7 +354,7 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { 200: {}, 204: {}, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -388,7 +387,7 @@ const updateOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.Transform }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -414,7 +413,7 @@ const listNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.TransformCollection }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.ErrorResponse } }, serializer From 33602ffe73abe54cf4c4e232ee60057d0ab3395e Mon Sep 17 00:00:00 2001 From: colawwj <70128817+colawwj@users.noreply.github.com> Date: Wed, 28 Jul 2021 10:00:53 +0800 Subject: [PATCH 27/28] arm-botservice (#16597) * arm-botservice * arm-botservice --- sdk/botservice/arm-botservice/LICENSE.txt | 2 +- sdk/botservice/arm-botservice/README.md | 8 +- sdk/botservice/arm-botservice/package.json | 4 +- .../arm-botservice/rollup.config.js | 4 +- .../arm-botservice/src/azureBotService.ts | 7 +- .../src/azureBotServiceContext.ts | 11 +- .../src/models/botConnectionMappers.ts | 4 +- .../arm-botservice/src/models/botsMappers.ts | 4 +- .../src/models/channelsMappers.ts | 4 +- .../src/models/directLineMappers.ts | 4 +- .../src/models/hostSettingsMappers.ts | 14 +++ .../arm-botservice/src/models/index.ts | 115 +++++++++++++++--- .../arm-botservice/src/models/mappers.ts | 106 ++++++++++++++-- .../src/models/operationsMappers.ts | 7 +- .../arm-botservice/src/models/parameters.ts | 5 +- .../src/operations/botConnection.ts | 18 +-- .../arm-botservice/src/operations/bots.ts | 11 +- .../arm-botservice/src/operations/channels.ts | 8 +- .../src/operations/directLine.ts | 5 +- .../src/operations/hostSettings.ts | 76 ++++++++++++ .../arm-botservice/src/operations/index.ts | 6 +- .../src/operations/operations.ts | 12 +- 22 files changed, 346 insertions(+), 89 deletions(-) create mode 100644 sdk/botservice/arm-botservice/src/models/hostSettingsMappers.ts create mode 100644 sdk/botservice/arm-botservice/src/operations/hostSettings.ts diff --git a/sdk/botservice/arm-botservice/LICENSE.txt b/sdk/botservice/arm-botservice/LICENSE.txt index ea8fb1516028..2d3163745319 100644 --- a/sdk/botservice/arm-botservice/LICENSE.txt +++ b/sdk/botservice/arm-botservice/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2020 Microsoft +Copyright (c) 2021 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/botservice/arm-botservice/README.md b/sdk/botservice/arm-botservice/README.md index 0ee386505106..e9bf67944f86 100644 --- a/sdk/botservice/arm-botservice/README.md +++ b/sdk/botservice/arm-botservice/README.md @@ -1,11 +1,11 @@ ## Azure AzureBotService SDK for JavaScript -This package contains an isomorphic SDK (runs both in Node.js and in browsers) for AzureBotService. +This package contains an isomorphic SDK (runs both in node.js and in browsers) for AzureBotService. ### Currently supported environments - [LTS versions of Node.js](https://nodejs.org/about/releases/) -- Latest versions of Safari, Chrome, Edge, and Firefox. +- Latest versions of Safari, Chrome, Edge and Firefox. ### Prerequisites @@ -21,7 +21,6 @@ Install both packages using the below command: ```bash npm install --save @azure/arm-botservice @azure/identity ``` - > **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. @@ -37,7 +36,6 @@ If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/ In the below samples, we pass the credential and the Azure subscription id to instantiate the client. Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. - #### nodejs - Authentication, client creation, and get bots as an example written in JavaScript. ##### Sample code @@ -87,7 +85,7 @@ In browser applications, we recommend using the `InteractiveBrowserCredential` t const credential = new InteractiveBrowserCredential( { clientId: "", - tenantId: "" + tenant: "" }); const client = new Azure.ArmBotservice.AzureBotService(creds, subscriptionId); const resourceGroupName = "testresourceGroupName"; diff --git a/sdk/botservice/arm-botservice/package.json b/sdk/botservice/arm-botservice/package.json index b7a3d0fead4f..df4fa73884c6 100644 --- a/sdk/botservice/arm-botservice/package.json +++ b/sdk/botservice/arm-botservice/package.json @@ -2,7 +2,7 @@ "name": "@azure/arm-botservice", "author": "Microsoft Corporation", "description": "AzureBotService Library with typescript type definitions for node.js and browser.", - "version": "2.1.0", + "version": "3.0.0", "dependencies": { "@azure/ms-rest-azure-js": "^2.1.0", "@azure/ms-rest-js": "^2.2.0", @@ -27,7 +27,7 @@ "rollup-plugin-sourcemaps": "^0.4.2", "uglify-js": "^3.6.0" }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/botservice/arm-botservice", + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/feature/v4/sdk/botservice/arm-botservice", "repository": { "type": "git", "url": "https://github.com/Azure/azure-sdk-for-js.git" diff --git a/sdk/botservice/arm-botservice/rollup.config.js b/sdk/botservice/arm-botservice/rollup.config.js index b8625979d3b4..6543f70a0a0b 100644 --- a/sdk/botservice/arm-botservice/rollup.config.js +++ b/sdk/botservice/arm-botservice/rollup.config.js @@ -21,8 +21,8 @@ const config = { "@azure/ms-rest-azure-js": "msRestAzure" }, banner: `/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. diff --git a/sdk/botservice/arm-botservice/src/azureBotService.ts b/sdk/botservice/arm-botservice/src/azureBotService.ts index 771e3e36fec4..2d37e1ef8f88 100644 --- a/sdk/botservice/arm-botservice/src/azureBotService.ts +++ b/sdk/botservice/arm-botservice/src/azureBotService.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -23,6 +22,7 @@ class AzureBotService extends AzureBotServiceContext { directLine: operations.DirectLine; operations: operations.Operations; botConnection: operations.BotConnection; + hostSettings: operations.HostSettings; /** * Initializes a new instance of the AzureBotService class. @@ -42,6 +42,7 @@ class AzureBotService extends AzureBotServiceContext { this.directLine = new operations.DirectLine(this); this.operations = new operations.Operations(this); this.botConnection = new operations.BotConnection(this); + this.hostSettings = new operations.HostSettings(this); } } diff --git a/sdk/botservice/arm-botservice/src/azureBotServiceContext.ts b/sdk/botservice/arm-botservice/src/azureBotServiceContext.ts index 3261b8039599..68e7802e1cbc 100644 --- a/sdk/botservice/arm-botservice/src/azureBotServiceContext.ts +++ b/sdk/botservice/arm-botservice/src/azureBotServiceContext.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -10,11 +9,11 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; -import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; +import { TokenCredential } from "@azure/core-auth"; const packageName = "@azure/arm-botservice"; -const packageVersion = "2.1.0"; +const packageVersion = "3.0.0"; export class AzureBotServiceContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials | TokenCredential; @@ -50,7 +49,7 @@ export class AzureBotServiceContext extends msRestAzure.AzureServiceClient { super(credentials, options); - this.apiVersion = '2020-06-02'; + this.apiVersion = '2021-03-01'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; diff --git a/sdk/botservice/arm-botservice/src/models/botConnectionMappers.ts b/sdk/botservice/arm-botservice/src/models/botConnectionMappers.ts index 8fd5b0040848..823620fac9fd 100644 --- a/sdk/botservice/arm-botservice/src/models/botConnectionMappers.ts +++ b/sdk/botservice/arm-botservice/src/models/botConnectionMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. diff --git a/sdk/botservice/arm-botservice/src/models/botsMappers.ts b/sdk/botservice/arm-botservice/src/models/botsMappers.ts index 4e14c4629175..6e2b8090090e 100644 --- a/sdk/botservice/arm-botservice/src/models/botsMappers.ts +++ b/sdk/botservice/arm-botservice/src/models/botsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. diff --git a/sdk/botservice/arm-botservice/src/models/channelsMappers.ts b/sdk/botservice/arm-botservice/src/models/channelsMappers.ts index 068826fddb11..014c1bd59b8d 100644 --- a/sdk/botservice/arm-botservice/src/models/channelsMappers.ts +++ b/sdk/botservice/arm-botservice/src/models/channelsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. diff --git a/sdk/botservice/arm-botservice/src/models/directLineMappers.ts b/sdk/botservice/arm-botservice/src/models/directLineMappers.ts index 68e686658063..fd8d98fc3334 100644 --- a/sdk/botservice/arm-botservice/src/models/directLineMappers.ts +++ b/sdk/botservice/arm-botservice/src/models/directLineMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. diff --git a/sdk/botservice/arm-botservice/src/models/hostSettingsMappers.ts b/sdk/botservice/arm-botservice/src/models/hostSettingsMappers.ts new file mode 100644 index 000000000000..95cf18592cd1 --- /dev/null +++ b/sdk/botservice/arm-botservice/src/models/hostSettingsMappers.ts @@ -0,0 +1,14 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + ErrorBody, + ErrorModel, + HostSettingsResponse +} from "../models/mappers"; diff --git a/sdk/botservice/arm-botservice/src/models/index.ts b/sdk/botservice/arm-botservice/src/models/index.ts index 191a2d329da5..b8f46f52a980 100644 --- a/sdk/botservice/arm-botservice/src/models/index.ts +++ b/sdk/botservice/arm-botservice/src/models/index.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -59,7 +59,7 @@ export interface Resource extends BaseResource { sku?: Sku; /** * Required. Gets or sets the Kind of the resource. Possible values include: 'sdk', 'designer', - * 'bot', 'function' + * 'bot', 'function', 'azurebot' */ kind?: Kind; /** @@ -127,6 +127,22 @@ export interface BotProperties { * The LUIS Key */ luisKey?: string; + /** + * Whether Cmek is enabled + */ + isCmekEnabled?: boolean; + /** + * The CMK Url + */ + cmekKeyVaultUrl?: string; + /** + * Whether the bot is in an isolated network + */ + isIsolated?: boolean; + /** + * The channel schema transformation version for the bot + */ + schemaTransformationVersion?: string; } /** @@ -214,7 +230,7 @@ export interface FacebookPage { * Facebook application access token. Value only returned through POST to the action Channel List * API, otherwise empty. */ - accessToken: string; + accessToken?: string; } /** @@ -239,7 +255,7 @@ export interface FacebookChannelProperties { * Facebook application secret. Value only returned through POST to the action Channel List API, * otherwise empty. */ - appSecret: string; + appSecret?: string; /** * Callback Url * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -277,7 +293,7 @@ export interface EmailChannelProperties { * The password for the email address. Value only returned through POST to the action Channel * List API, otherwise empty. */ - password: string; + password?: string; /** * Whether this channel is enabled for the bot */ @@ -397,7 +413,7 @@ export interface KikChannelProperties { /** * Kik API key. Value only returned through POST to the action Channel List API, otherwise empty. */ - apiKey: string; + apiKey?: string; /** * Whether this channel is validated for the bot */ @@ -564,7 +580,7 @@ export interface TelegramChannelProperties { * The Telegram access token. Value only returned through POST to the action Channel List API, * otherwise empty. */ - accessToken: string; + accessToken?: string; /** * Whether this channel is validated for the bot */ @@ -606,7 +622,7 @@ export interface SmsChannelProperties { * The Sms auth token. Value only returned through POST to the action Channel List API, otherwise * empty. */ - authToken: string; + authToken?: string; /** * Whether this channel is validated for the bot */ @@ -638,17 +654,17 @@ export interface SlackChannelProperties { /** * The Slack client id */ - clientId: string; + clientId?: string; /** * The Slack client secret. Value only returned through POST to the action Channel List API, * otherwise empty. */ - clientSecret: string; + clientSecret?: string; /** * The Slack verification token. Value only returned through POST to the action Channel List API, * otherwise empty. */ - verificationToken: string; + verificationToken?: string; /** * The Slack landing page Url */ @@ -755,9 +771,13 @@ export interface LineChannel { */ export interface DirectLineSpeechChannelProperties { /** - * The cognitive service subscription ID to use with this channel registration. + * The cognitive service region with this channel registration. */ - cognitiveServicesSubscriptionId: string; + cognitiveServiceRegion: string; + /** + * The cognitive service subscription key to use with this channel registration. + */ + cognitiveServiceSubscriptionKey: string; /** * Whether this channel is enabled or not. */ @@ -1069,6 +1089,45 @@ export interface CheckNameAvailabilityResponseBody { message?: string; } +/** + * The response body returned for a request to Bot Service Management to check per subscription + * hostSettings + */ +export interface HostSettingsResponse { + /** + * For in-conversation bot user authentication + */ + oAuthUrl?: string; + /** + * For verifying incoming tokens from the channels + */ + toBotFromChannelOpenIdMetadataUrl?: string; + /** + * For verifying incoming tokens from the channels + */ + toBotFromChannelTokenIssuer?: string; + /** + * For verifying incoming tokens from bot emulator + */ + toBotFromEmulatorOpenIdMetadataUrl?: string; + /** + * For getting access token to channels from bot host + */ + toChannelFromBotLoginUrl?: string; + /** + * For getting access token to channels from bot host + */ + toChannelFromBotOAuthScope?: string; + /** + * Per cloud OAuth setting on whether authority is validated + */ + validateAuthority?: boolean; + /** + * Same as ToBotFromChannelOpenIdMetadataUrl, used by SDK < v4.12 + */ + botOpenIdMetadata?: string; +} + /** * Optional Parameters. */ @@ -1087,7 +1146,7 @@ export interface BotsUpdateOptionalParams extends msRest.RequestOptionsBase { sku?: Sku; /** * Required. Gets or sets the Kind of the resource. Possible values include: 'sdk', 'designer', - * 'bot', 'function' + * 'bot', 'function', 'azurebot' */ kind?: Kind; /** @@ -1118,7 +1177,7 @@ export interface ChannelsUpdateOptionalParams extends msRest.RequestOptionsBase sku?: Sku; /** * Required. Gets or sets the Kind of the resource. Possible values include: 'sdk', 'designer', - * 'bot', 'function' + * 'bot', 'function', 'azurebot' */ kind?: Kind; /** @@ -1204,11 +1263,11 @@ export type SkuTier = 'Free' | 'Standard'; /** * Defines values for Kind. - * Possible values include: 'sdk', 'designer', 'bot', 'function' + * Possible values include: 'sdk', 'designer', 'bot', 'function', 'azurebot' * @readonly * @enum {string} */ -export type Kind = 'sdk' | 'designer' | 'bot' | 'function'; +export type Kind = 'sdk' | 'designer' | 'bot' | 'function' | 'azurebot'; /** * Defines values for Key. @@ -1715,3 +1774,23 @@ export type BotConnectionListByBotServiceNextResponse = ConnectionSettingRespons parsedBody: ConnectionSettingResponseList; }; }; + +/** + * Contains response data for the get operation. + */ +export type HostSettingsGetResponse = HostSettingsResponse & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: HostSettingsResponse; + }; +}; diff --git a/sdk/botservice/arm-botservice/src/models/mappers.ts b/sdk/botservice/arm-botservice/src/models/mappers.ts index 41feb438e31a..ef7976ee708c 100644 --- a/sdk/botservice/arm-botservice/src/models/mappers.ts +++ b/sdk/botservice/arm-botservice/src/models/mappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -207,6 +207,30 @@ export const BotProperties: msRest.CompositeMapper = { type: { name: "String" } + }, + isCmekEnabled: { + serializedName: "isCmekEnabled", + type: { + name: "Boolean" + } + }, + cmekKeyVaultUrl: { + serializedName: "cmekKeyVaultUrl", + type: { + name: "String" + } + }, + isIsolated: { + serializedName: "isIsolated", + type: { + name: "Boolean" + } + }, + schemaTransformationVersion: { + serializedName: "schemaTransformationVersion", + type: { + name: "String" + } } } } @@ -342,7 +366,6 @@ export const FacebookPage: msRest.CompositeMapper = { } }, accessToken: { - required: true, serializedName: "accessToken", type: { name: "String" @@ -385,7 +408,6 @@ export const FacebookChannelProperties: msRest.CompositeMapper = { } }, appSecret: { - required: true, serializedName: "appSecret", type: { name: "String" @@ -443,7 +465,6 @@ export const EmailChannelProperties: msRest.CompositeMapper = { } }, password: { - required: true, serializedName: "password", type: { name: "String" @@ -628,7 +649,6 @@ export const KikChannelProperties: msRest.CompositeMapper = { } }, apiKey: { - required: true, serializedName: "apiKey", type: { name: "String" @@ -897,7 +917,6 @@ export const TelegramChannelProperties: msRest.CompositeMapper = { className: "TelegramChannelProperties", modelProperties: { accessToken: { - required: true, serializedName: "accessToken", type: { name: "String" @@ -961,7 +980,6 @@ export const SmsChannelProperties: msRest.CompositeMapper = { } }, authToken: { - required: true, serializedName: "authToken", type: { name: "String" @@ -1011,21 +1029,18 @@ export const SlackChannelProperties: msRest.CompositeMapper = { className: "SlackChannelProperties", modelProperties: { clientId: { - required: true, serializedName: "clientId", type: { name: "String" } }, clientSecret: { - required: true, serializedName: "clientSecret", type: { name: "String" } }, verificationToken: { - required: true, serializedName: "verificationToken", type: { name: "String" @@ -1194,9 +1209,16 @@ export const DirectLineSpeechChannelProperties: msRest.CompositeMapper = { name: "Composite", className: "DirectLineSpeechChannelProperties", modelProperties: { - cognitiveServicesSubscriptionId: { + cognitiveServiceRegion: { required: true, - serializedName: "cognitiveServicesSubscriptionId", + serializedName: "cognitiveServiceRegion", + type: { + name: "String" + } + }, + cognitiveServiceSubscriptionKey: { + required: true, + serializedName: "cognitiveServiceSubscriptionKey", type: { name: "String" } @@ -1702,6 +1724,64 @@ export const CheckNameAvailabilityResponseBody: msRest.CompositeMapper = { } }; +export const HostSettingsResponse: msRest.CompositeMapper = { + serializedName: "HostSettingsResponse", + type: { + name: "Composite", + className: "HostSettingsResponse", + modelProperties: { + oAuthUrl: { + serializedName: "OAuthUrl", + type: { + name: "String" + } + }, + toBotFromChannelOpenIdMetadataUrl: { + serializedName: "ToBotFromChannelOpenIdMetadataUrl", + type: { + name: "String" + } + }, + toBotFromChannelTokenIssuer: { + serializedName: "ToBotFromChannelTokenIssuer", + type: { + name: "String" + } + }, + toBotFromEmulatorOpenIdMetadataUrl: { + serializedName: "ToBotFromEmulatorOpenIdMetadataUrl", + type: { + name: "String" + } + }, + toChannelFromBotLoginUrl: { + serializedName: "ToChannelFromBotLoginUrl", + type: { + name: "String" + } + }, + toChannelFromBotOAuthScope: { + serializedName: "ToChannelFromBotOAuthScope", + type: { + name: "String" + } + }, + validateAuthority: { + serializedName: "ValidateAuthority", + type: { + name: "Boolean" + } + }, + botOpenIdMetadata: { + serializedName: "BotOpenIdMetadata", + type: { + name: "String" + } + } + } + } +}; + export const BotResponseList: msRest.CompositeMapper = { serializedName: "BotResponseList", type: { diff --git a/sdk/botservice/arm-botservice/src/models/operationsMappers.ts b/sdk/botservice/arm-botservice/src/models/operationsMappers.ts index cafd02e8a5f7..a1e45fe4f853 100644 --- a/sdk/botservice/arm-botservice/src/models/operationsMappers.ts +++ b/sdk/botservice/arm-botservice/src/models/operationsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -8,7 +8,8 @@ export { discriminators, - CloudError, + ErrorBody, + ErrorModel, OperationDisplayInfo, OperationEntity, OperationEntityListResult diff --git a/sdk/botservice/arm-botservice/src/models/parameters.ts b/sdk/botservice/arm-botservice/src/models/parameters.ts index e16378974344..8c2fb567b13c 100644 --- a/sdk/botservice/arm-botservice/src/models/parameters.ts +++ b/sdk/botservice/arm-botservice/src/models/parameters.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is diff --git a/sdk/botservice/arm-botservice/src/operations/botConnection.ts b/sdk/botservice/arm-botservice/src/operations/botConnection.ts index b6baaf2edfc3..9f0dcdee121a 100644 --- a/sdk/botservice/arm-botservice/src/operations/botConnection.ts +++ b/sdk/botservice/arm-botservice/src/operations/botConnection.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -326,7 +325,7 @@ const listServiceProvidersOperationSpec: msRest.OperationSpec = { const listWithSecretsOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/Connections/{connectionName}/listWithSecrets", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/connections/{connectionName}/listWithSecrets", urlParameters: [ Parameters.resourceGroupName, Parameters.resourceName, @@ -352,7 +351,7 @@ const listWithSecretsOperationSpec: msRest.OperationSpec = { const createOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/Connections/{connectionName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/connections/{connectionName}", urlParameters: [ Parameters.resourceGroupName, Parameters.resourceName, @@ -388,7 +387,7 @@ const createOperationSpec: msRest.OperationSpec = { const updateOperationSpec: msRest.OperationSpec = { httpMethod: "PATCH", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/Connections/{connectionName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/connections/{connectionName}", urlParameters: [ Parameters.resourceGroupName, Parameters.resourceName, @@ -424,7 +423,7 @@ const updateOperationSpec: msRest.OperationSpec = { const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/Connections/{connectionName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/connections/{connectionName}", urlParameters: [ Parameters.resourceGroupName, Parameters.resourceName, @@ -450,7 +449,7 @@ const getOperationSpec: msRest.OperationSpec = { const deleteMethodOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/Connections/{connectionName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/connections/{connectionName}", urlParameters: [ Parameters.resourceGroupName, Parameters.resourceName, @@ -505,6 +504,9 @@ const listByBotServiceNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/botservice/arm-botservice/src/operations/bots.ts b/sdk/botservice/arm-botservice/src/operations/bots.ts index c16d188081f9..59813052e6a9 100644 --- a/sdk/botservice/arm-botservice/src/operations/bots.ts +++ b/sdk/botservice/arm-botservice/src/operations/bots.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -522,6 +521,9 @@ const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], @@ -543,6 +545,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/botservice/arm-botservice/src/operations/channels.ts b/sdk/botservice/arm-botservice/src/operations/channels.ts index f54e613f0a2b..566ccb3119c8 100644 --- a/sdk/botservice/arm-botservice/src/operations/channels.ts +++ b/sdk/botservice/arm-botservice/src/operations/channels.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -506,6 +505,9 @@ const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/botservice/arm-botservice/src/operations/directLine.ts b/sdk/botservice/arm-botservice/src/operations/directLine.ts index 324c434c7724..2b44cb9f82ca 100644 --- a/sdk/botservice/arm-botservice/src/operations/directLine.ts +++ b/sdk/botservice/arm-botservice/src/operations/directLine.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is diff --git a/sdk/botservice/arm-botservice/src/operations/hostSettings.ts b/sdk/botservice/arm-botservice/src/operations/hostSettings.ts new file mode 100644 index 000000000000..7ddc6a14b292 --- /dev/null +++ b/sdk/botservice/arm-botservice/src/operations/hostSettings.ts @@ -0,0 +1,76 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/hostSettingsMappers"; +import * as Parameters from "../models/parameters"; +import { AzureBotServiceContext } from "../azureBotServiceContext"; + +/** Class representing a HostSettings. */ +export class HostSettings { + private readonly client: AzureBotServiceContext; + + /** + * Create a HostSettings. + * @param {AzureBotServiceContext} client Reference to the service client. + */ + constructor(client: AzureBotServiceContext) { + this.client = client; + } + + /** + * Get per subscription settings needed to host bot in compute resource such as Azure App Service + * @param [options] The optional parameters + * @returns Promise + */ + get(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + get(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + get(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + getOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.BotService/hostSettings", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.HostSettingsResponse + }, + default: { + bodyMapper: Mappers.ErrorModel + } + }, + serializer +}; diff --git a/sdk/botservice/arm-botservice/src/operations/index.ts b/sdk/botservice/arm-botservice/src/operations/index.ts index d4f8c52a2296..0e31ffa72008 100644 --- a/sdk/botservice/arm-botservice/src/operations/index.ts +++ b/sdk/botservice/arm-botservice/src/operations/index.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -13,3 +12,4 @@ export * from "./channels"; export * from "./directLine"; export * from "./operations"; export * from "./botConnection"; +export * from "./hostSettings"; diff --git a/sdk/botservice/arm-botservice/src/operations/operations.ts b/sdk/botservice/arm-botservice/src/operations/operations.ts index 276bd6996cdd..ca90ce0113f8 100644 --- a/sdk/botservice/arm-botservice/src/operations/operations.ts +++ b/sdk/botservice/arm-botservice/src/operations/operations.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -95,7 +94,7 @@ const listOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.OperationEntityListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorModel } }, serializer @@ -108,6 +107,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], @@ -116,7 +118,7 @@ const listNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.OperationEntityListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorModel } }, serializer From b14c628d76c6688650a16388cb5e859d85e35744 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Fri, 30 Jul 2021 06:18:50 +0000 Subject: [PATCH 28/28] CodeGen from PR 14749 in Azure/azure-rest-api-specs Merge 6a5f970e9f7e2ed91bf0c11289daa8743f28e131 into 682c9680fd6ac7746d701bcf0c69948a3199671a --- sdk/signalr/arm-signalr/package.json | 2 +- sdk/signalr/arm-signalr/src/models/index.ts | 23 ++----------------- sdk/signalr/arm-signalr/src/models/mappers.ts | 22 ------------------ .../src/signalRManagementClientContext.ts | 2 +- 4 files changed, 4 insertions(+), 45 deletions(-) diff --git a/sdk/signalr/arm-signalr/package.json b/sdk/signalr/arm-signalr/package.json index 11f4fda185f6..30cb259172ee 100644 --- a/sdk/signalr/arm-signalr/package.json +++ b/sdk/signalr/arm-signalr/package.json @@ -27,7 +27,7 @@ "rollup-plugin-sourcemaps": "^0.4.2", "uglify-js": "^3.6.0" }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/feature/v4/sdk/signalr/arm-signalr", + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/signalr/arm-signalr", "repository": { "type": "git", "url": "https://github.com/Azure/azure-sdk-for-js.git" diff --git a/sdk/signalr/arm-signalr/src/models/index.ts b/sdk/signalr/arm-signalr/src/models/index.ts index 9e953f655da4..d87983ff5b6f 100644 --- a/sdk/signalr/arm-signalr/src/models/index.ts +++ b/sdk/signalr/arm-signalr/src/models/index.ts @@ -618,7 +618,7 @@ export interface SignalRCorsSettings { } /** - * Feature of a resource, which controls the runtime behavior. + * Feature of a SignalR resource, which controls the SignalR runtime behavior. */ export interface SignalRFeature { /** @@ -695,7 +695,7 @@ export interface SignalRNetworkACLs { */ export interface SignalRTlsSettings { /** - * Request client certificate during TLS handshake if enabled. Default value: true. + * Request client certificate during TLS handshake if enabled */ clientCertEnabled?: boolean; } @@ -791,25 +791,6 @@ export interface SignalRResource extends TrackedResource { * Network ACLs */ networkACLs?: SignalRNetworkACLs; - /** - * Enable or disable public network access. Default to "Enabled". - * When it's Enabled, network ACLs still apply. - * When it's Disabled, public network access is always disabled no matter what you set in network - * ACLs. Default value: 'Enabled'. - */ - publicNetworkAccess?: string; - /** - * DisableLocalAuth - * Enable or disable local auth with AccessKey - * When set as true, connection with AccessKey=xxx won't work. Default value: false. - */ - disableLocalAuth?: boolean; - /** - * DisableLocalAuth - * Enable or disable aad auth - * When set as true, connection with AuthType=aad won't work. Default value: false. - */ - disableAadAuth?: boolean; /** * The kind of the service - e.g. "SignalR" for "Microsoft.SignalRService/SignalR". Possible * values include: 'SignalR', 'RawWebSockets' diff --git a/sdk/signalr/arm-signalr/src/models/mappers.ts b/sdk/signalr/arm-signalr/src/models/mappers.ts index df732de5189d..83f2e14af57d 100644 --- a/sdk/signalr/arm-signalr/src/models/mappers.ts +++ b/sdk/signalr/arm-signalr/src/models/mappers.ts @@ -1053,7 +1053,6 @@ export const SignalRTlsSettings: msRest.CompositeMapper = { modelProperties: { clientCertEnabled: { serializedName: "clientCertEnabled", - defaultValue: true, type: { name: "Boolean" } @@ -1212,27 +1211,6 @@ export const SignalRResource: msRest.CompositeMapper = { className: "SignalRNetworkACLs" } }, - publicNetworkAccess: { - serializedName: "properties.publicNetworkAccess", - defaultValue: 'Enabled', - type: { - name: "String" - } - }, - disableLocalAuth: { - serializedName: "properties.disableLocalAuth", - defaultValue: false, - type: { - name: "Boolean" - } - }, - disableAadAuth: { - serializedName: "properties.disableAadAuth", - defaultValue: false, - type: { - name: "Boolean" - } - }, kind: { serializedName: "kind", type: { diff --git a/sdk/signalr/arm-signalr/src/signalRManagementClientContext.ts b/sdk/signalr/arm-signalr/src/signalRManagementClientContext.ts index 02ccc1d28438..d046dad73f8a 100644 --- a/sdk/signalr/arm-signalr/src/signalRManagementClientContext.ts +++ b/sdk/signalr/arm-signalr/src/signalRManagementClientContext.ts @@ -50,7 +50,7 @@ export class SignalRManagementClientContext extends msRestAzure.AzureServiceClie super(credentials, options); - this.apiVersion = '2021-06-01-preview'; + this.apiVersion = '2021-04-01-preview'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com";