From 7e6d07db340d568cdb1c3493bcdc9b6260990b2b Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Mon, 21 Feb 2022 14:01:02 +0000 Subject: [PATCH] CodeGen from PR 17927 in Azure/azure-rest-api-specs Merge bf9ec63c99beaacf56bbc7353b6f9829d18aef33 into efd3d669a86d2e123f57ac3a43e5af4bb9e3a29f --- common/config/rush/pnpm-lock.yaml | 17 ++++---- sdk/security/arm-security/CHANGELOG.md | 22 +++++----- sdk/security/arm-security/LICENSE | 2 +- sdk/security/arm-security/README.md | 2 +- sdk/security/arm-security/_meta.json | 6 +-- sdk/security/arm-security/api-extractor.json | 25 +++++++++--- sdk/security/arm-security/package.json | 8 ++-- .../arm-security/review/arm-security.api.md | 25 +++++++++--- sdk/security/arm-security/src/models/index.ts | 34 ++++++++++++---- .../arm-security/src/models/mappers.ts | 40 ++++++++++++++++++- .../arm-security/src/securityCenter.ts | 2 +- sdk/security/arm-security/tsconfig.json | 16 ++++++-- 12 files changed, 145 insertions(+), 54 deletions(-) diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index a09de01d5d0d..ffbf117e150c 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -8883,7 +8883,7 @@ packages: dev: false file:projects/ai-text-analytics.tgz: - resolution: {integrity: sha512-o7nTFUp/He8mxChlJgVsEQGvMSgBwZ3Q0cA3IwYAEgFxksGNGDqirKVX14ixCFXZ4WccvZ7N4k7cRVsDsLJO4g==, tarball: file:projects/ai-text-analytics.tgz} + resolution: {integrity: sha512-negpkvINfMedZMo/5L1bUc1Jurs3pGS6PuodsviCc+XynPV3SHz+/TtOJD49pu7VzkDnSKEU7Yz1DpaV083KQQ==, tarball: file:projects/ai-text-analytics.tgz} name: '@rush-temp/ai-text-analytics' version: 0.0.0 dependencies: @@ -8929,7 +8929,6 @@ packages: - '@swc/wasm' - bufferutil - debug - - encoding - supports-color - utf-8-validate dev: false @@ -11816,22 +11815,22 @@ packages: dev: false file:projects/arm-security.tgz: - resolution: {integrity: sha512-wpcTbI+NbsXZV8weUCWcziRc9vOKNnijbDYBNMx1gYH3fDEvVStwcvfiOhFaTJF60/6G3TXxUAMidLr/z4axRQ==, tarball: file:projects/arm-security.tgz} + resolution: {integrity: sha512-X/nlLia9k75M0GhNEY+gfzOYiyQKI6xhf6iaTdMDKCYijqt8UTqiZfGvk3V1DkZzW3aJI6Rr0Uqp/nFs9pAggg==, tarball: file:projects/arm-security.tgz} name: '@rush-temp/arm-security' version: 0.0.0 dependencies: '@azure-tools/test-recorder': 1.0.2 '@microsoft/api-extractor': 7.19.4 - '@rollup/plugin-commonjs': 21.0.1_rollup@2.67.1 - '@rollup/plugin-json': 4.1.0_rollup@2.67.1 - '@rollup/plugin-multi-entry': 3.0.1_rollup@2.67.1 - '@rollup/plugin-node-resolve': 8.4.0_rollup@2.67.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.67.1 - rollup-plugin-sourcemaps: 0.4.2_rollup@2.67.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.1 diff --git a/sdk/security/arm-security/CHANGELOG.md b/sdk/security/arm-security/CHANGELOG.md index 6a435b72be0d..9bfeb7d618e9 100644 --- a/sdk/security/arm-security/CHANGELOG.md +++ b/sdk/security/arm-security/CHANGELOG.md @@ -1,15 +1,15 @@ # Release History - -## 4.0.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - + +## 4.1.0-beta.1 (2022-02-21) + +**Features** + + - Added Interface InformationProtectionAwsOfferingInformationProtection + - Added Type Alias InformationProtectionAwsOffering + - Enum KnownOfferingType has a new value InformationProtectionAws + - Enum KnownSupportedCloudEnum has a new value GCP + + ## 4.0.0 (2021-12-14) The package of @azure/arm-security is using our next generation design principles since version 4.0.0, which contains breaking changes. diff --git a/sdk/security/arm-security/LICENSE b/sdk/security/arm-security/LICENSE index ccb63b166732..5d1d36e0af80 100644 --- a/sdk/security/arm-security/LICENSE +++ b/sdk/security/arm-security/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2021 Microsoft +Copyright (c) 2022 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 a54f7902e8d8..52eb7db80de6 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) | +[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-security?view=azure-node-preview) | [Samples](https://github.com/Azure-Samples/azure-samples-js-management) ## Getting started diff --git a/sdk/security/arm-security/_meta.json b/sdk/security/arm-security/_meta.json index 6ffc255b94f2..81592ffc38e2 100644 --- a/sdk/security/arm-security/_meta.json +++ b/sdk/security/arm-security/_meta.json @@ -1,7 +1,7 @@ { - "commit": "ea0f7b072ad3aaff203ea9003246b9e584b819ff", + "commit": "022faba0e571338920201cfdbdf4d7e9ce4c395d", "readme": "specification/security/resource-manager/readme.md", - "autorest_command": "autorest --version=3.1.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\mydev\\azure-sdk-for-js ../azure-rest-api-specs/specification/security/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20211207.1", + "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=/home/vsts/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", - "use": "@autorest/typescript@6.0.0-alpha.16.20211207.1" + "use": "@autorest/typescript@6.0.0-alpha.16.20220105.1" } \ No newline at end of file diff --git a/sdk/security/arm-security/api-extractor.json b/sdk/security/arm-security/api-extractor.json index 7fa251be5abb..d866cd3a63ba 100644 --- a/sdk/security/arm-security/api-extractor.json +++ b/sdk/security/arm-security/api-extractor.json @@ -1,18 +1,31 @@ { "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", "mainEntryPointFilePath": "./dist-esm/src/index.d.ts", - "docModel": { "enabled": true }, - "apiReport": { "enabled": true, "reportFolder": "./review" }, + "docModel": { + "enabled": true + }, + "apiReport": { + "enabled": true, + "reportFolder": "./review" + }, "dtsRollup": { "enabled": true, "untrimmedFilePath": "", "publicTrimmedFilePath": "./types/arm-security.d.ts" }, "messages": { - "tsdocMessageReporting": { "default": { "logLevel": "none" } }, + "tsdocMessageReporting": { + "default": { + "logLevel": "none" + } + }, "extractorMessageReporting": { - "ae-missing-release-tag": { "logLevel": "none" }, - "ae-unresolved-link": { "logLevel": "none" } + "ae-missing-release-tag": { + "logLevel": "none" + }, + "ae-unresolved-link": { + "logLevel": "none" + } } } -} +} \ No newline at end of file diff --git a/sdk/security/arm-security/package.json b/sdk/security/arm-security/package.json index edfaaeb9e235..c2049e491f27 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": "4.0.1", + "version": "1.0.0-beta.1", "engines": { "node": ">=12.0.0" }, @@ -29,12 +29,12 @@ "types": "./types/arm-security.d.ts", "devDependencies": { "@microsoft/api-extractor": "^7.18.11", - "@rollup/plugin-commonjs": "^21.0.1", + "@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.0.0", + "rollup": "^1.16.3", "rollup-plugin-sourcemaps": "^0.4.2", "typescript": "~4.2.0", "uglify-js": "^3.4.9", @@ -99,4 +99,4 @@ }, "sideEffects": false, "autoPublish": true -} +} \ No newline at end of file diff --git a/sdk/security/arm-security/review/arm-security.api.md b/sdk/security/arm-security/review/arm-security.api.md index 9819bf594342..cd329696c8ea 100644 --- a/sdk/security/arm-security/review/arm-security.api.md +++ b/sdk/security/arm-security/review/arm-security.api.md @@ -988,11 +988,11 @@ export type CloudName = string; // @public export interface CloudOffering { readonly description?: string; - offeringType: "CspmMonitorAws" | "DefenderForContainersAws" | "DefenderForServersAWS"; + offeringType: "CspmMonitorAws" | "DefenderForContainersAws" | "DefenderForServersAws" | "InformationProtectionAws"; } // @public (undocumented) -export type CloudOfferingUnion = CloudOffering | CspmMonitorAwsOffering | DefenderForContainersAwsOffering | DefenderForServersAwsOffering; +export type CloudOfferingUnion = CloudOffering | CspmMonitorAwsOffering | DefenderForContainersAwsOffering | DefenderForServersAwsOffering | InformationProtectionAwsOffering; // @public export type Compliance = Resource & { @@ -1420,7 +1420,7 @@ export interface DefenderForContainersAwsOfferingKubernetesService { // @public export type DefenderForServersAwsOffering = CloudOffering & { - offeringType: "DefenderForServersAWS"; + offeringType: "DefenderForServersAws"; defenderForServers?: DefenderForServersAwsOfferingDefenderForServers; arcAutoProvisioning?: DefenderForServersAwsOfferingArcAutoProvisioning; }; @@ -1749,6 +1749,17 @@ export interface HybridComputeSettingsProperties { // @public export type ImplementationEffort = string; +// @public +export type InformationProtectionAwsOffering = CloudOffering & { + offeringType: "InformationProtectionAws"; + informationProtection?: InformationProtectionAwsOfferingInformationProtection; +}; + +// @public +export interface InformationProtectionAwsOfferingInformationProtection { + cloudRoleArn?: string; +} + // @public export interface InformationProtectionKeyword { canBeNumeric?: boolean; @@ -2759,7 +2770,9 @@ export enum KnownOfferingType { // (undocumented) DefenderForContainersAws = "DefenderForContainersAws", // (undocumented) - DefenderForServersAws = "DefenderForServersAws" + DefenderForServersAws = "DefenderForServersAws", + // (undocumented) + InformationProtectionAws = "InformationProtectionAws" } // @public @@ -3066,7 +3079,9 @@ export enum KnownSubAssessmentStatusCode { // @public export enum KnownSupportedCloudEnum { // (undocumented) - AWS = "AWS" + AWS = "AWS", + // (undocumented) + GCP = "GCP" } // @public diff --git a/sdk/security/arm-security/src/models/index.ts b/sdk/security/arm-security/src/models/index.ts index 770058a2edc7..4488c3a48d62 100644 --- a/sdk/security/arm-security/src/models/index.ts +++ b/sdk/security/arm-security/src/models/index.ts @@ -42,7 +42,8 @@ export type CloudOfferingUnion = | CloudOffering | CspmMonitorAwsOffering | DefenderForContainersAwsOffering - | DefenderForServersAwsOffering; + | DefenderForServersAwsOffering + | InformationProtectionAwsOffering; export type ExternalSecuritySolutionUnion = | ExternalSecuritySolution | CefExternalSecuritySolution @@ -1742,7 +1743,8 @@ export interface CloudOffering { offeringType: | "CspmMonitorAws" | "DefenderForContainersAws" - | "DefenderForServersAWS"; + | "DefenderForServersAws" + | "InformationProtectionAws"; /** * The offering description. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -1894,6 +1896,12 @@ export interface DefenderForServersAwsOfferingArcAutoProvisioningServicePrincipa parameterNameInStore?: string; } +/** The native cloud connection configuration */ +export interface InformationProtectionAwsOfferingInformationProtection { + /** The cloud role ARN in AWS for this feature */ + cloudRoleArn?: string; +} + /** The resource of the configuration or data needed to onboard the machine to MDE */ export type MdeOnboardingData = Resource & { /** The onboarding package used to onboard Windows machines to MDE, coded in base64. This can also be used for onboarding using the dedicated VM Extension */ @@ -3332,13 +3340,21 @@ export type DefenderForContainersAwsOffering = CloudOffering & { /** The Defender for Servers AWS offering configurations */ export type DefenderForServersAwsOffering = CloudOffering & { /** Polymorphic discriminator, which specifies the different types this object can be */ - offeringType: "DefenderForServersAWS"; + offeringType: "DefenderForServersAws"; /** The Defender for servers connection configuration */ defenderForServers?: DefenderForServersAwsOfferingDefenderForServers; /** The ARC autoprovisioning configuration */ arcAutoProvisioning?: DefenderForServersAwsOfferingArcAutoProvisioning; }; +/** The information protection for AWS offering configurations */ +export type InformationProtectionAwsOffering = CloudOffering & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + offeringType: "InformationProtectionAws"; + /** The native cloud connection configuration */ + informationProtection?: InformationProtectionAwsOfferingInformationProtection; +}; + /** The external security solution properties for CEF solutions */ export type CefSolutionProperties = ExternalSecuritySolutionProperties & { hostname?: string; @@ -3614,7 +3630,8 @@ export type CreatedByType = string; /** Known values of {@link SupportedCloudEnum} that the service accepts. */ export enum KnownSupportedCloudEnum { - AWS = "AWS" + AWS = "AWS", + GCP = "GCP" } /** @@ -3622,7 +3639,8 @@ export enum KnownSupportedCloudEnum { * {@link KnownSupportedCloudEnum} can be used interchangeably with SupportedCloudEnum, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **AWS** + * **AWS** \ + * **GCP** */ export type SupportedCloudEnum = string; @@ -5407,7 +5425,8 @@ export type CloudName = string; export enum KnownOfferingType { CspmMonitorAws = "CspmMonitorAws", DefenderForContainersAws = "DefenderForContainersAws", - DefenderForServersAws = "DefenderForServersAws" + DefenderForServersAws = "DefenderForServersAws", + InformationProtectionAws = "InformationProtectionAws" } /** @@ -5417,7 +5436,8 @@ export enum KnownOfferingType { * ### Known values supported by the service * **CspmMonitorAws** \ * **DefenderForContainersAws** \ - * **DefenderForServersAws** + * **DefenderForServersAws** \ + * **InformationProtectionAws** */ export type OfferingType = string; diff --git a/sdk/security/arm-security/src/models/mappers.ts b/sdk/security/arm-security/src/models/mappers.ts index 320b08d4c50f..ee8378a4892a 100644 --- a/sdk/security/arm-security/src/models/mappers.ts +++ b/sdk/security/arm-security/src/models/mappers.ts @@ -4718,6 +4718,21 @@ export const DefenderForServersAwsOfferingArcAutoProvisioningServicePrincipalSec } }; +export const InformationProtectionAwsOfferingInformationProtection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "InformationProtectionAwsOfferingInformationProtection", + modelProperties: { + cloudRoleArn: { + serializedName: "cloudRoleArn", + type: { + name: "String" + } + } + } + } +}; + export const MdeOnboardingData: coreClient.CompositeMapper = { type: { name: "Composite", @@ -8028,7 +8043,7 @@ export const DefenderForContainersAwsOffering: coreClient.CompositeMapper = { }; export const DefenderForServersAwsOffering: coreClient.CompositeMapper = { - serializedName: "DefenderForServersAWS", + serializedName: "DefenderForServersAws", type: { name: "Composite", className: "DefenderForServersAwsOffering", @@ -8054,6 +8069,26 @@ export const DefenderForServersAwsOffering: coreClient.CompositeMapper = { } }; +export const InformationProtectionAwsOffering: coreClient.CompositeMapper = { + serializedName: "InformationProtectionAws", + type: { + name: "Composite", + className: "InformationProtectionAwsOffering", + uberParent: "CloudOffering", + polymorphicDiscriminator: CloudOffering.type.polymorphicDiscriminator, + modelProperties: { + ...CloudOffering.type.modelProperties, + informationProtection: { + serializedName: "informationProtection", + type: { + name: "Composite", + className: "InformationProtectionAwsOfferingInformationProtection" + } + } + } + } +}; + export const CefSolutionProperties: coreClient.CompositeMapper = { type: { name: "Composite", @@ -8708,7 +8743,8 @@ export let discriminators = { "AlertSimulatorRequestProperties.Bundles": AlertSimulatorBundlesRequestProperties, "CloudOffering.CspmMonitorAws": CspmMonitorAwsOffering, "CloudOffering.DefenderForContainersAws": DefenderForContainersAwsOffering, - "CloudOffering.DefenderForServersAWS": DefenderForServersAwsOffering, + "CloudOffering.DefenderForServersAws": DefenderForServersAwsOffering, + "CloudOffering.InformationProtectionAws": InformationProtectionAwsOffering, "Resource.CEF": CefExternalSecuritySolution, "Resource.ATA": AtaExternalSecuritySolution, "Resource.AAD": AadExternalSecuritySolution, diff --git a/sdk/security/arm-security/src/securityCenter.ts b/sdk/security/arm-security/src/securityCenter.ts index 43425ff4cc8b..56a42e122bf4 100644 --- a/sdk/security/arm-security/src/securityCenter.ts +++ b/sdk/security/arm-security/src/securityCenter.ts @@ -150,7 +150,7 @@ export class SecurityCenter extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-security/4.0.0`; + const packageDetails = `azsdk-js-arm-security/4.1.0-beta.1`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` diff --git a/sdk/security/arm-security/tsconfig.json b/sdk/security/arm-security/tsconfig.json index 6e3251194117..3e6ae96443f3 100644 --- a/sdk/security/arm-security/tsconfig.json +++ b/sdk/security/arm-security/tsconfig.json @@ -9,11 +9,19 @@ "esModuleInterop": true, "allowSyntheticDefaultImports": true, "forceConsistentCasingInFileNames": true, - "lib": ["es6", "dom"], + "lib": [ + "es6", + "dom" + ], "declaration": true, "outDir": "./dist-esm", "importHelpers": true }, - "include": ["./src/**/*.ts", "./test/**/*.ts"], - "exclude": ["node_modules"] -} + "include": [ + "./src/**/*.ts", + "./test/**/*.ts" + ], + "exclude": [ + "node_modules" + ] +} \ No newline at end of file