From 0f09317c96dd9c1048ffa9b915532d0d1f0f384e Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 13 Apr 2022 03:33:37 +0000 Subject: [PATCH] CodeGen from PR 18477 in Azure/azure-rest-api-specs Traz rozner/rebranding api docs from asc to mdfc (#18477) * changed 'Azure Security Center' to 'Microsoft Defenders for Cloud' in the relevant defender's descriptions * another brand name to 'Microsoft Defenders for Cloud' * change brand name to 'Microsoft Defenders for Cloud' in locations.json * changed 'title' fields from 'Security Center' to 'Microsoft Defender for Cloud' Co-authored-by: Tuval Rozner --- common/config/rush/pnpm-lock.yaml | 17 ++-- sdk/security/arm-security/README.md | 13 +--- sdk/security/arm-security/_meta.json | 8 +- sdk/security/arm-security/package.json | 34 +++----- sdk/security/arm-security/rollup.config.js | 78 +++++++++++++++++-- sdk/security/arm-security/src/models/index.ts | 38 ++++----- .../operations/adaptiveNetworkHardenings.ts | 4 +- .../arm-security/src/operations/pricings.ts | 6 +- .../src/operations/secureScores.ts | 8 +- ...serverVulnerabilityAssessmentOperations.ts | 4 +- .../arm-security/src/operations/settings.ts | 8 +- .../src/operationsInterfaces/pricings.ts | 6 +- .../src/operationsInterfaces/secureScores.ts | 6 +- .../src/operationsInterfaces/settings.ts | 6 +- .../arm-security/src/securityCenter.ts | 5 +- sdk/security/arm-security/tsconfig.json | 10 +-- 16 files changed, 139 insertions(+), 112 deletions(-) diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 49df5b517a33..c47690862a01 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -12684,28 +12684,27 @@ packages: dev: false file:projects/arm-security.tgz: - resolution: {integrity: sha512-j/Plp7yL9w2UNzRaKK1P2c9PSzowhLFUTBBAT22F4JlG7vKQd+C1tEf2n21O7ML4F4DcDjo/2G/1WbrFh8DzBw==, tarball: file:projects/arm-security.tgz} + resolution: {integrity: sha512-EFl1g3+q0KxjJLX23npsPXhMFZTvgtcJVyURA8RLe6XfsXxjnTPEcpAOGL0JK/8A4fkhf8FvSxLCou9Tq1fk7w==, tarball: file:projects/arm-security.tgz} name: '@rush-temp/arm-security' version: 0.0.0 dependencies: '@azure-tools/test-recorder': 1.0.2 '@azure/identity': 2.0.4 '@microsoft/api-extractor': 7.20.0 - '@rollup/plugin-commonjs': 21.0.3_rollup@2.70.1 - '@rollup/plugin-json': 4.1.0_rollup@2.70.1 - '@rollup/plugin-multi-entry': 4.1.0_rollup@2.70.1 - '@rollup/plugin-node-resolve': 13.1.3_rollup@2.70.1 + '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 + '@rollup/plugin-json': 4.1.0_rollup@1.32.1 + '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 cross-env: 7.0.3 mkdirp: 1.0.4 mocha: 7.2.0 rimraf: 3.0.2 - rollup: 2.70.1 - rollup-plugin-sourcemaps: 0.6.3_rollup@2.70.1 + rollup: 1.32.1 + rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 tslib: 2.3.1 typescript: 4.2.4 uglify-js: 3.15.3 transitivePeerDependencies: - - '@types/node' - debug - encoding - supports-color @@ -14926,7 +14925,7 @@ packages: dev: false file:projects/eventgrid.tgz: - resolution: {integrity: sha512-TYTy+XdoTR3dMR16kLw6A6S6bmsy/p6pVqspQSAPRPLUpCvWo8wqpPJIjpj8cV2kTEvQ1BFQu0C+VSNnoOgwyw==, tarball: file:projects/eventgrid.tgz} + resolution: {integrity: sha512-AQubC+PetnbX+gBI9ppDIuWdMl/qpU8vSc6GJxgzKWqaATuK23qn3XUljongEBQjjZhCah+4fdIVQr9X4axsLw==, tarball: file:projects/eventgrid.tgz} name: '@rush-temp/eventgrid' version: 0.0.0 dependencies: diff --git a/sdk/security/arm-security/README.md b/sdk/security/arm-security/README.md index b6c689c2d612..a54f7902e8d8 100644 --- a/sdk/security/arm-security/README.md +++ b/sdk/security/arm-security/README.md @@ -6,7 +6,7 @@ API spec for Microsoft.Security (Azure Security Center) resource provider [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/security/arm-security) | [Package (NPM)](https://www.npmjs.com/package/@azure/arm-security) | -[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-security?view=azure-node-preview) | +[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-security) | [Samples](https://github.com/Azure-Samples/azure-samples-js-management) ## Getting started @@ -16,8 +16,6 @@ API spec for Microsoft.Security (Azure Security Center) resource provider - [LTS versions of Node.js](https://nodejs.org/about/releases/) - Latest versions of Safari, Chrome, Edge and Firefox. -See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details. - ### Prerequisites - An [Azure subscription][azure_sub]. @@ -51,17 +49,8 @@ For more information about how to create an Azure AD Application check out [this ```javascript const { SecurityCenter } = require("@azure/arm-security"); const { DefaultAzureCredential } = require("@azure/identity"); -// For client-side applications running in the browser, use InteractiveBrowserCredential instead of DefaultAzureCredential. See https://aka.ms/azsdk/js/identity/examples for more details. - const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new SecurityCenter(new DefaultAzureCredential(), subscriptionId); - -// For client-side applications running in the browser, use this code instead: -// const credential = new InteractiveBrowserCredential({ -// tenantId: "", -// clientId: "" -// }); -// const client = new SecurityCenter(credential, subscriptionId); ``` diff --git a/sdk/security/arm-security/_meta.json b/sdk/security/arm-security/_meta.json index c47a1003ea69..4b77989e035f 100644 --- a/sdk/security/arm-security/_meta.json +++ b/sdk/security/arm-security/_meta.json @@ -1,8 +1,8 @@ { - "commit": "3c1da29166fe1306071c939ac1344b092bafd0ce", + "commit": "880394b28e0f4e7925f4ecb3edc46b651ab58129", "readme": "specification/security/resource-manager/readme.md", - "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\work\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\security\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-alpha.18.20220329.1 --generate-sample=true", + "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/security/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20220105.1", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.2.1", - "use": "@autorest/typescript@6.0.0-alpha.18.20220329.1" + "release_tool": "@azure-tools/js-sdk-release-tools@2.2.6", + "use": "@autorest/typescript@6.0.0-alpha.16.20220105.1" } \ No newline at end of file diff --git a/sdk/security/arm-security/package.json b/sdk/security/arm-security/package.json index 504986e5c875..7b1c06eba531 100644 --- a/sdk/security/arm-security/package.json +++ b/sdk/security/arm-security/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for SecurityCenter.", - "version": "5.0.1", + "version": "5.0.2", "engines": { "node": ">=12.0.0" }, @@ -29,13 +29,13 @@ "types": "./types/arm-security.d.ts", "devDependencies": { "@microsoft/api-extractor": "^7.18.11", - "@rollup/plugin-commonjs": "^21.0.1", - "@rollup/plugin-json": "^4.1.0", - "@rollup/plugin-multi-entry": "^4.1.0", - "@rollup/plugin-node-resolve": "^13.1.3", + "@rollup/plugin-commonjs": "11.0.2", + "@rollup/plugin-json": "^4.0.0", + "@rollup/plugin-multi-entry": "^3.0.0", + "@rollup/plugin-node-resolve": "^8.0.0", "mkdirp": "^1.0.4", - "rollup": "^2.66.1", - "rollup-plugin-sourcemaps": "^0.6.3", + "rollup": "^1.16.3", + "rollup-plugin-sourcemaps": "^0.4.2", "typescript": "~4.2.0", "uglify-js": "^3.4.9", "rimraf": "^3.0.0", @@ -98,21 +98,5 @@ "docs": "echo skipped" }, "sideEffects": false, - "//metadata": { - "constantPaths": [ - { - "path": "src/securityCenter.ts", - "prefix": "packageDetails" - } - ] - }, - "autoPublish": true, - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-security?view=azure-node-preview" - } -} + "autoPublish": true +} \ No newline at end of file diff --git a/sdk/security/arm-security/rollup.config.js b/sdk/security/arm-security/rollup.config.js index 3f89d7309da5..9be1955eb7f1 100644 --- a/sdk/security/arm-security/rollup.config.js +++ b/sdk/security/arm-security/rollup.config.js @@ -14,14 +14,62 @@ import json from "@rollup/plugin-json"; import nodeBuiltins from "builtin-modules"; +/** + * Gets the proper configuration needed for rollup's commonJS plugin for @opentelemetry/api. + * + * NOTE: this manual configuration is only needed because OpenTelemetry uses an + * __exportStar downleveled helper function to declare its exports which confuses + * rollup's automatic discovery mechanism. + * + * @returns an object reference that can be `...`'d into your cjs() configuration. + */ +export function openTelemetryCommonJs() { + const namedExports = {}; + + for (const key of [ + "@opentelemetry/api", + "@azure/core-tracing/node_modules/@opentelemetry/api" + ]) { + namedExports[key] = [ + "SpanKind", + "TraceFlags", + "getSpan", + "setSpan", + "SpanStatusCode", + "getSpanContext", + "setSpanContext" + ]; + } + + const releasedOpenTelemetryVersions = ["0.10.2", "1.0.0-rc.0"]; + + for (const version of releasedOpenTelemetryVersions) { + namedExports[ + // working around a limitation in the rollup common.js plugin - it's not able to resolve these modules so the named exports listed above will not get applied. We have to drill down to the actual path. + `../../../common/temp/node_modules/.pnpm/@opentelemetry/api@${version}/node_modules/@opentelemetry/api/build/src/index.js` + ] = [ + "SpanKind", + "TraceFlags", + "getSpan", + "setSpan", + "StatusCode", + "CanonicalCode", + "getSpanContext", + "setSpanContext" + ]; + } + + return namedExports; +} + // #region Warning Handler /** - * A function that can determine whether a rollup warning should be ignored. If + * A function that can determine whether a rollupwarning should be ignored. If * the function returns `true`, then the warning will not be displayed. */ -function ignoreNiseSinonEval(warning) { +function ignoreNiseSinonEvalWarnings(warning) { return ( warning.code === "EVAL" && warning.id && @@ -30,14 +78,17 @@ function ignoreNiseSinonEval(warning) { ); } -function ignoreChaiCircularDependency(warning) { +function ignoreChaiCircularDependencyWarnings(warning) { return ( warning.code === "CIRCULAR_DEPENDENCY" && warning.importer && warning.importer.includes("node_modules/chai") === true ); } -const warningInhibitors = [ignoreChaiCircularDependency, ignoreNiseSinonEval]; +const warningInhibitors = [ + ignoreChaiCircularDependencyWarnings, + ignoreNiseSinonEvalWarnings +]; /** * Construct a warning handler for the shared rollup configuration @@ -71,7 +122,22 @@ function makeBrowserTestConfig() { nodeResolve({ mainFields: ["module", "browser"] }), - cjs(), + cjs({ + namedExports: { + // Chai's strange internal architecture makes it impossible to statically + // analyze its exports. + chai: [ + "version", + "use", + "util", + "config", + "expect", + "should", + "assert" + ], + ...openTelemetryCommonJs() + } + }), json(), sourcemaps() //viz({ filename: "dist-test/browser-stats.html", sourcemap: true }) @@ -107,7 +173,7 @@ export function makeConfig(pkg, options) { ], output: { file: "dist/index.js", format: "cjs", sourcemap: true }, preserveSymlinks: false, - plugins: [sourcemaps(), nodeResolve()] + plugins: [sourcemaps(), nodeResolve(), cjs()] }; const config = [baseConfig]; diff --git a/sdk/security/arm-security/src/models/index.ts b/sdk/security/arm-security/src/models/index.ts index d1c8614ffa3d..2c77ed5a78ab 100644 --- a/sdk/security/arm-security/src/models/index.ts +++ b/sdk/security/arm-security/src/models/index.ts @@ -1971,9 +1971,9 @@ export type ComplianceResult = Resource & { readonly resourceStatus?: ResourceStatus; }; -/** 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, while the free tier offers basic security features. */ +/** Microsoft Defender for Cloud 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, while the free tier offers basic security features. */ export type Pricing = Resource & { - /** The pricing tier value. 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, while the free tier offers basic security features. */ + /** The pricing tier value. Microsoft Defender for Cloud 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, while the free tier offers basic security features. */ pricingTier?: PricingTier; /** The sub-plan selected for a Standard pricing configuration, when more than one sub-plan is available. Each sub-plan enables a set of security features. When not specified, full plan is applied. */ subPlan?: string; @@ -3147,7 +3147,7 @@ export type ServerVulnerabilityProperties = AdditionalData & { readonly vendorReferences?: VendorReference[]; }; -/** The logic app action that should be triggered. To learn more about Security Center's Workflow Automation capabilities, visit https://aka.ms/ASCWorkflowAutomationLearnMore */ +/** The logic app action that should be triggered. To learn more about Microsoft Defender for Cloud's Workflow Automation capabilities, visit https://aka.ms/ASCWorkflowAutomationLearnMore */ export type AutomationActionLogicApp = AutomationAction & { /** Polymorphic discriminator, which specifies the different types this object can be */ actionType: "LogicApp"; @@ -3157,7 +3157,7 @@ export type AutomationActionLogicApp = AutomationAction & { uri?: string; }; -/** The target Event Hub to which event data will be exported. To learn more about Security Center continuous export capabilities, visit https://aka.ms/ASCExportLearnMore */ +/** The target Event Hub to which event data will be exported. To learn more about Microsoft Defender for Cloud continuous export capabilities, visit https://aka.ms/ASCExportLearnMore */ export type AutomationActionEventHub = AutomationAction & { /** Polymorphic discriminator, which specifies the different types this object can be */ actionType: "EventHub"; @@ -3172,7 +3172,7 @@ export type AutomationActionEventHub = AutomationAction & { connectionString?: string; }; -/** The Log Analytics Workspace to which event data will be exported. Security alerts data will reside in the 'SecurityAlert' table and the assessments data will reside in the 'SecurityRecommendation' table (under the 'Security'/'SecurityCenterFree' solutions). Note that in order to view the data in the workspace, the Security Center Log Analytics free/standard solution needs to be enabled on that workspace. To learn more about Security Center continuous export capabilities, visit https://aka.ms/ASCExportLearnMore */ +/** The Log Analytics Workspace to which event data will be exported. Security alerts data will reside in the 'SecurityAlert' table and the assessments data will reside in the 'SecurityRecommendation' table (under the 'Security'/'SecurityCenterFree' solutions). Note that in order to view the data in the workspace, the Security Center Log Analytics free/standard solution needs to be enabled on that workspace. To learn more about Microsoft Defender for Cloud continuous export capabilities, visit https://aka.ms/ASCExportLearnMore */ export type AutomationActionWorkspace = AutomationAction & { /** Polymorphic discriminator, which specifies the different types this object can be */ actionType: "Workspace"; @@ -3690,9 +3690,9 @@ export type ResourceStatus = string; /** Known values of {@link PricingTier} that the service accepts. */ export enum KnownPricingTier { - /** Get free Azure security center experience with basic security features */ + /** Get free Microsoft Defender for Cloud experience with basic security features */ Free = "Free", - /** Get the standard Azure security center experience with advanced security features */ + /** Get the standard Microsoft Defender for Cloud experience with advanced security features */ Standard = "Standard" } @@ -3701,8 +3701,8 @@ export enum KnownPricingTier { * {@link KnownPricingTier} can be used interchangeably with PricingTier, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **Free**: Get free Azure security center experience with basic security features \ - * **Standard**: Get the standard Azure security center experience with advanced security features + * **Free**: Get free Microsoft Defender for Cloud experience with basic security features \ + * **Standard**: Get the standard Microsoft Defender for Cloud experience with advanced security features */ export type PricingTier = string; @@ -4589,11 +4589,11 @@ export type Threats = string; /** Known values of {@link AssessmentType} that the service accepts. */ export enum KnownAssessmentType { - /** Azure Security Center managed assessments */ + /** Microsoft Defender for Cloud managed assessments */ BuiltIn = "BuiltIn", - /** User defined policies that are automatically ingested from Azure Policy to Azure Security Center */ + /** User defined policies that are automatically ingested from Azure Policy to Microsoft Defender for Cloud */ CustomPolicy = "CustomPolicy", - /** User assessments pushed directly by the user or other third party to Azure Security Center */ + /** User assessments pushed directly by the user or other third party to Microsoft Defender for Cloud */ CustomerManaged = "CustomerManaged", /** An assessment that was created by a verified 3rd party if the user connected it to ASC */ VerifiedPartner = "VerifiedPartner" @@ -4604,9 +4604,9 @@ export enum KnownAssessmentType { * {@link KnownAssessmentType} can be used interchangeably with AssessmentType, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **BuiltIn**: Azure Security Center managed assessments \ - * **CustomPolicy**: User defined policies that are automatically ingested from Azure Policy to Azure Security Center \ - * **CustomerManaged**: User assessments pushed directly by the user or other third party to Azure Security Center \ + * **BuiltIn**: Microsoft Defender for Cloud managed assessments \ + * **CustomPolicy**: User defined policies that are automatically ingested from Azure Policy to Microsoft Defender for Cloud \ + * **CustomerManaged**: User assessments pushed directly by the user or other third party to Microsoft Defender for Cloud \ * **VerifiedPartner**: An assessment that was created by a verified 3rd party if the user connected it to ASC */ export type AssessmentType = string; @@ -4971,9 +4971,9 @@ export type ExpandControlsEnum = string; /** Known values of {@link ControlType} that the service accepts. */ export enum KnownControlType { - /** Azure Security Center managed assessments */ + /** Microsoft Defender for Cloud managed assessments */ BuiltIn = "BuiltIn", - /** Non Azure Security Center managed assessments */ + /** Non Microsoft Defender for Cloud managed assessments */ Custom = "Custom" } @@ -4982,8 +4982,8 @@ export enum KnownControlType { * {@link KnownControlType} can be used interchangeably with ControlType, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **BuiltIn**: Azure Security Center managed assessments \ - * **Custom**: Non Azure Security Center managed assessments + * **BuiltIn**: Microsoft Defender for Cloud managed assessments \ + * **Custom**: Non Microsoft Defender for Cloud managed assessments */ export type ControlType = string; diff --git a/sdk/security/arm-security/src/operations/adaptiveNetworkHardenings.ts b/sdk/security/arm-security/src/operations/adaptiveNetworkHardenings.ts index b6756e894f98..cbeaaa9630c6 100644 --- a/sdk/security/arm-security/src/operations/adaptiveNetworkHardenings.ts +++ b/sdk/security/arm-security/src/operations/adaptiveNetworkHardenings.ts @@ -261,12 +261,10 @@ export class AdaptiveNetworkHardeningsImpl }, enforceOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); - await poller.poll(); - return poller; } /** diff --git a/sdk/security/arm-security/src/operations/pricings.ts b/sdk/security/arm-security/src/operations/pricings.ts index a89af1e257a5..9957b4ce9fdd 100644 --- a/sdk/security/arm-security/src/operations/pricings.ts +++ b/sdk/security/arm-security/src/operations/pricings.ts @@ -34,7 +34,7 @@ export class PricingsImpl implements Pricings { } /** - * Lists Security Center pricing configurations in the subscription. + * Lists Microsoft Defender for Cloud pricing configurations in the subscription. * @param options The options parameters. */ list(options?: PricingsListOptionalParams): Promise { @@ -42,7 +42,7 @@ export class PricingsImpl implements Pricings { } /** - * Gets a provided Security Center pricing configuration in the subscription. + * Gets a provided Microsoft Defender for Cloud pricing configuration in the subscription. * @param pricingName name of the pricing configuration * @param options The options parameters. */ @@ -57,7 +57,7 @@ export class PricingsImpl implements Pricings { } /** - * Updates a provided Security Center pricing configuration in the subscription. + * Updates a provided Microsoft Defender for Cloud pricing configuration in the subscription. * @param pricingName name of the pricing configuration * @param pricing Pricing object * @param options The options parameters. diff --git a/sdk/security/arm-security/src/operations/secureScores.ts b/sdk/security/arm-security/src/operations/secureScores.ts index bd34e4e27c61..017754ad8b3d 100644 --- a/sdk/security/arm-security/src/operations/secureScores.ts +++ b/sdk/security/arm-security/src/operations/secureScores.ts @@ -36,7 +36,7 @@ export class SecureScoresImpl implements SecureScores { } /** - * List secure scores for all your Security Center initiatives within your current scope. + * List secure scores for all your Microsoft Defender for Cloud initiatives within your current scope. * @param options The options parameters. */ public list( @@ -78,7 +78,7 @@ export class SecureScoresImpl implements SecureScores { } /** - * List secure scores for all your Security Center initiatives within your current scope. + * List secure scores for all your Microsoft Defender for Cloud initiatives within your current scope. * @param options The options parameters. */ private _list( @@ -88,8 +88,8 @@ export class SecureScoresImpl implements SecureScores { } /** - * Get secure score for a specific Security Center initiative within your current scope. For the ASC - * Default initiative, use 'ascScore'. + * Get secure score for a specific Microsoft Defender for Cloud 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 options parameters. diff --git a/sdk/security/arm-security/src/operations/serverVulnerabilityAssessmentOperations.ts b/sdk/security/arm-security/src/operations/serverVulnerabilityAssessmentOperations.ts index 9bc83898c5e3..247c6b58cbc0 100644 --- a/sdk/security/arm-security/src/operations/serverVulnerabilityAssessmentOperations.ts +++ b/sdk/security/arm-security/src/operations/serverVulnerabilityAssessmentOperations.ts @@ -187,13 +187,11 @@ export class ServerVulnerabilityAssessmentOperationsImpl }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/security/arm-security/src/operations/settings.ts b/sdk/security/arm-security/src/operations/settings.ts index 710b095ffea5..05fac13160e0 100644 --- a/sdk/security/arm-security/src/operations/settings.ts +++ b/sdk/security/arm-security/src/operations/settings.ts @@ -39,7 +39,7 @@ export class SettingsImpl implements Settings { } /** - * Settings about different configurations in security center + * Settings about different configurations in Microsoft Defender for Cloud * @param options The options parameters. */ public list( @@ -81,7 +81,7 @@ export class SettingsImpl implements Settings { } /** - * Settings about different configurations in security center + * Settings about different configurations in Microsoft Defender for Cloud * @param options The options parameters. */ private _list( @@ -91,7 +91,7 @@ export class SettingsImpl implements Settings { } /** - * Settings of different configurations in security center + * Settings of different configurations in Microsoft Defender for Cloud * @param settingName The name of the setting * @param options The options parameters. */ @@ -106,7 +106,7 @@ export class SettingsImpl implements Settings { } /** - * updating settings about different configurations in security center + * updating settings about different configurations in Microsoft Defender for Cloud * @param settingName The name of the setting * @param setting Setting object * @param options The options parameters. diff --git a/sdk/security/arm-security/src/operationsInterfaces/pricings.ts b/sdk/security/arm-security/src/operationsInterfaces/pricings.ts index 913551099d5a..14dc0160e6ed 100644 --- a/sdk/security/arm-security/src/operationsInterfaces/pricings.ts +++ b/sdk/security/arm-security/src/operationsInterfaces/pricings.ts @@ -19,12 +19,12 @@ import { /** Interface representing a Pricings. */ export interface Pricings { /** - * Lists Security Center pricing configurations in the subscription. + * Lists Microsoft Defender for Cloud pricing configurations in the subscription. * @param options The options parameters. */ list(options?: PricingsListOptionalParams): Promise; /** - * Gets a provided Security Center pricing configuration in the subscription. + * Gets a provided Microsoft Defender for Cloud pricing configuration in the subscription. * @param pricingName name of the pricing configuration * @param options The options parameters. */ @@ -33,7 +33,7 @@ export interface Pricings { options?: PricingsGetOptionalParams ): Promise; /** - * Updates a provided Security Center pricing configuration in the subscription. + * Updates a provided Microsoft Defender for Cloud pricing configuration in the subscription. * @param pricingName name of the pricing configuration * @param pricing Pricing object * @param options The options parameters. diff --git a/sdk/security/arm-security/src/operationsInterfaces/secureScores.ts b/sdk/security/arm-security/src/operationsInterfaces/secureScores.ts index a7a0e56cfed2..316216383ab6 100644 --- a/sdk/security/arm-security/src/operationsInterfaces/secureScores.ts +++ b/sdk/security/arm-security/src/operationsInterfaces/secureScores.ts @@ -18,15 +18,15 @@ import { /** Interface representing a SecureScores. */ export interface SecureScores { /** - * List secure scores for all your Security Center initiatives within your current scope. + * List secure scores for all your Microsoft Defender for Cloud initiatives within your current scope. * @param options The options parameters. */ list( options?: SecureScoresListOptionalParams ): PagedAsyncIterableIterator; /** - * Get secure score for a specific Security Center initiative within your current scope. For the ASC - * Default initiative, use 'ascScore'. + * Get secure score for a specific Microsoft Defender for Cloud 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 options parameters. diff --git a/sdk/security/arm-security/src/operationsInterfaces/settings.ts b/sdk/security/arm-security/src/operationsInterfaces/settings.ts index 28c3ca38bfce..2d2a5bbb1773 100644 --- a/sdk/security/arm-security/src/operationsInterfaces/settings.ts +++ b/sdk/security/arm-security/src/operationsInterfaces/settings.ts @@ -21,14 +21,14 @@ import { /** Interface representing a Settings. */ export interface Settings { /** - * Settings about different configurations in security center + * Settings about different configurations in Microsoft Defender for Cloud * @param options The options parameters. */ list( options?: SettingsListOptionalParams ): PagedAsyncIterableIterator; /** - * Settings of different configurations in security center + * Settings of different configurations in Microsoft Defender for Cloud * @param settingName The name of the setting * @param options The options parameters. */ @@ -37,7 +37,7 @@ export interface Settings { options?: SettingsGetOptionalParams ): Promise; /** - * updating settings about different configurations in security center + * updating settings about different configurations in Microsoft Defender for Cloud * @param settingName The name of the setting * @param setting Setting object * @param options The options parameters. diff --git a/sdk/security/arm-security/src/securityCenter.ts b/sdk/security/arm-security/src/securityCenter.ts index 3967c4a6e986..513192fc6f09 100644 --- a/sdk/security/arm-security/src/securityCenter.ts +++ b/sdk/security/arm-security/src/securityCenter.ts @@ -143,7 +143,7 @@ export class SecurityCenter extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-security/5.0.1`; + const packageDetails = `azsdk-js-arm-security/5.0.2`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -158,8 +158,7 @@ export class SecurityCenter extends coreClient.ServiceClient { userAgentOptions: { userAgentPrefix }, - baseUri: - options.endpoint ?? options.baseUri ?? "https://management.azure.com" + baseUri: options.endpoint || "https://management.azure.com" }; super(optionsWithDefaults); // Parameter assignments diff --git a/sdk/security/arm-security/tsconfig.json b/sdk/security/arm-security/tsconfig.json index 3f5144384125..3e6ae96443f3 100644 --- a/sdk/security/arm-security/tsconfig.json +++ b/sdk/security/arm-security/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-security": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"