diff --git a/packages/@azure/arm-security/LICENSE.txt b/packages/@azure/arm-security/LICENSE.txt index 5431ba98b936..8f3d856145c5 100644 --- a/packages/@azure/arm-security/LICENSE.txt +++ b/packages/@azure/arm-security/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2018 Microsoft +Copyright (c) 2019 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/packages/@azure/arm-security/README.md b/packages/@azure/arm-security/README.md index 9a44b7efe4b5..fc8cebf6c190 100644 --- a/packages/@azure/arm-security/README.md +++ b/packages/@azure/arm-security/README.md @@ -9,23 +9,23 @@ This package contains an isomorphic SDK for SecurityCenter. ### How to Install -``` +```bash npm install @azure/arm-security ``` ### How to use -#### nodejs - Authentication, client creation and list pricings as an example written in TypeScript. +#### nodejs - Authentication, client creation and list regulatoryComplianceStandards as an example written in TypeScript. ##### Install @azure/ms-rest-nodeauth -``` +```bash npm install @azure/ms-rest-nodeauth ``` ##### Sample code -```ts +```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"; @@ -34,7 +34,9 @@ const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; msRestNodeAuth.interactiveLogin().then((creds) => { const client = new SecurityCenter(creds, subscriptionId); - client.pricings.list().then((result) => { + const resourceGroupName = "testresourceGroupName"; + const filter = "testfilter"; + client.regulatoryComplianceStandards.list(resourceGroupName, filter).then((result) => { console.log("The result is:"); console.log(result); }); @@ -43,11 +45,11 @@ msRestNodeAuth.interactiveLogin().then((creds) => { }); ``` -#### browser - Authentication, client creation and list pricings as an example written in JavaScript. +#### browser - Authentication, client creation and list regulatoryComplianceStandards as an example written in JavaScript. ##### Install @azure/ms-rest-browserauth -``` +```bash npm install @azure/ms-rest-browserauth ``` @@ -77,7 +79,9 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to authManager.login(); } const client = new Azure.ArmSecurity.SecurityCenter(res.creds, subscriptionId); - client.pricings.list().then((result) => { + const resourceGroupName = "testresourceGroupName"; + const filter = "testfilter"; + client.regulatoryComplianceStandards.list(resourceGroupName, filter).then((result) => { console.log("The result is:"); console.log(result); }).catch((err) => { @@ -94,6 +98,3 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to ## Related projects - [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%2Fpackages%2F%40azure%2Farm-security%2FREADME.png) diff --git a/packages/@azure/arm-security/lib/models/advancedThreatProtectionMappers.ts b/packages/@azure/arm-security/lib/models/advancedThreatProtectionMappers.ts index a5728932eabf..16ee00a654ef 100644 --- a/packages/@azure/arm-security/lib/models/advancedThreatProtectionMappers.ts +++ b/packages/@azure/arm-security/lib/models/advancedThreatProtectionMappers.ts @@ -14,21 +14,27 @@ export { Resource, BaseResource, CloudError, - SecurityContact, + RegulatoryComplianceStandard, + RegulatoryComplianceControl, + RegulatoryComplianceAssessment, + AscLocation, Pricing, + SecurityContact, WorkspaceSetting, AutoProvisioningSetting, Compliance, ComplianceSegment, + SettingResource, InformationProtectionPolicy, SensitivityLabel, InformationType, InformationProtectionKeyword, SecurityTask, SecurityTaskParameters, - AscLocation, Alert, AlertEntity, - AlertConfidenceReason + AlertConfidenceReason, + Setting, + DataExportSetting } from "../models/mappers"; diff --git a/packages/@azure/arm-security/lib/models/alertsMappers.ts b/packages/@azure/arm-security/lib/models/alertsMappers.ts index db7d75be9704..b7f3eb2642e0 100644 --- a/packages/@azure/arm-security/lib/models/alertsMappers.ts +++ b/packages/@azure/arm-security/lib/models/alertsMappers.ts @@ -17,19 +17,25 @@ export { AlertEntity, AlertConfidenceReason, CloudError, - SecurityContact, + RegulatoryComplianceStandard, + RegulatoryComplianceControl, + RegulatoryComplianceAssessment, + AscLocation, Pricing, + SecurityContact, WorkspaceSetting, AutoProvisioningSetting, Compliance, ComplianceSegment, AdvancedThreatProtectionSetting, + SettingResource, InformationProtectionPolicy, SensitivityLabel, InformationType, InformationProtectionKeyword, SecurityTask, SecurityTaskParameters, - AscLocation + Setting, + DataExportSetting } from "../models/mappers"; diff --git a/packages/@azure/arm-security/lib/models/autoProvisioningSettingsMappers.ts b/packages/@azure/arm-security/lib/models/autoProvisioningSettingsMappers.ts index 8c012f3647a2..cf8bbe9f36d8 100644 --- a/packages/@azure/arm-security/lib/models/autoProvisioningSettingsMappers.ts +++ b/packages/@azure/arm-security/lib/models/autoProvisioningSettingsMappers.ts @@ -15,21 +15,27 @@ export { Resource, BaseResource, CloudError, - SecurityContact, + RegulatoryComplianceStandard, + RegulatoryComplianceControl, + RegulatoryComplianceAssessment, + AscLocation, Pricing, + SecurityContact, WorkspaceSetting, Compliance, ComplianceSegment, AdvancedThreatProtectionSetting, + SettingResource, InformationProtectionPolicy, SensitivityLabel, InformationType, InformationProtectionKeyword, SecurityTask, SecurityTaskParameters, - AscLocation, Alert, AlertEntity, - AlertConfidenceReason + AlertConfidenceReason, + Setting, + DataExportSetting } from "../models/mappers"; diff --git a/packages/@azure/arm-security/lib/models/compliancesMappers.ts b/packages/@azure/arm-security/lib/models/compliancesMappers.ts index a38fc6ae8046..2f00d98eb15f 100644 --- a/packages/@azure/arm-security/lib/models/compliancesMappers.ts +++ b/packages/@azure/arm-security/lib/models/compliancesMappers.ts @@ -16,20 +16,26 @@ export { BaseResource, ComplianceSegment, CloudError, - SecurityContact, + RegulatoryComplianceStandard, + RegulatoryComplianceControl, + RegulatoryComplianceAssessment, + AscLocation, Pricing, + SecurityContact, WorkspaceSetting, AutoProvisioningSetting, AdvancedThreatProtectionSetting, + SettingResource, InformationProtectionPolicy, SensitivityLabel, InformationType, InformationProtectionKeyword, SecurityTask, SecurityTaskParameters, - AscLocation, Alert, AlertEntity, - AlertConfidenceReason + AlertConfidenceReason, + Setting, + DataExportSetting } from "../models/mappers"; diff --git a/packages/@azure/arm-security/lib/models/index.ts b/packages/@azure/arm-security/lib/models/index.ts index dc38e6a5aba6..943b39e349ba 100644 --- a/packages/@azure/arm-security/lib/models/index.ts +++ b/packages/@azure/arm-security/lib/models/index.ts @@ -44,44 +44,171 @@ export interface Resource extends BaseResource { /** * @interface - * An interface representing Kind. - * Describes an Azure resource with kind + * An interface representing RegulatoryComplianceStandard. + * Regulatory compliance standard details and state * + * @extends Resource */ -export interface Kind { +export interface RegulatoryComplianceStandard extends Resource { /** - * @member {string} [kind] Kind of the resource + * @member {State} [state] Aggregative state based on the standard's + * supported controls states. Possible values include: 'Passed', 'Failed', + * 'Skipped', 'Unsupported' */ - kind?: string; + state?: State; + /** + * @member {number} [passedControls] The number of supported regulatory + * compliance controls of the given standard with a passed state + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly passedControls?: number; + /** + * @member {number} [failedControls] The number of supported regulatory + * compliance controls of the given standard with a failed state + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly failedControls?: number; + /** + * @member {number} [skippedControls] The number of supported regulatory + * compliance controls of the given standard with a skipped state + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly skippedControls?: number; + /** + * @member {number} [unsupportedControls] The number of regulatory compliance + * controls of the given standard which are unsupported by automated + * assessments + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly unsupportedControls?: number; } /** * @interface - * An interface representing SecurityContact. - * Contact details for security issues + * An interface representing RegulatoryComplianceControl. + * Regulatory compliance control details and state * * @extends Resource */ -export interface SecurityContact extends Resource { +export interface RegulatoryComplianceControl extends Resource { /** - * @member {string} email The email of this security contact + * @member {string} [description] The description of the regulatory + * compliance control + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** */ - email: string; + readonly description?: string; /** - * @member {string} [phone] The phone number of this security contact + * @member {State} [state] Aggregative state based on the control's supported + * assessments states. Possible values include: 'Passed', 'Failed', + * 'Skipped', 'Unsupported' */ - phone?: string; + state?: State; /** - * @member {AlertNotifications} alertNotifications Whether to send security - * alerts notifications to the security contact. Possible values include: - * 'On', 'Off' + * @member {number} [passedAssessments] The number of supported regulatory + * compliance assessments of the given control with a passed state + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** */ - alertNotifications: AlertNotifications; + readonly passedAssessments?: number; /** - * @member {AlertsToAdmins} alertsToAdmins Whether to send security alerts - * notifications to subscription admins. Possible values include: 'On', 'Off' + * @member {number} [failedAssessments] The number of supported regulatory + * compliance assessments of the given control with a failed state + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** */ - alertsToAdmins: AlertsToAdmins; + readonly failedAssessments?: number; + /** + * @member {number} [skippedAssessments] The number of supported regulatory + * compliance assessments of the given control with a skipped state + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly skippedAssessments?: number; +} + +/** + * @interface + * An interface representing RegulatoryComplianceAssessment. + * Regulatory compliance assessment details and state + * + * @extends Resource + */ +export interface RegulatoryComplianceAssessment extends Resource { + /** + * @member {string} [description] The description of the regulatory + * compliance assessment + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly description?: string; + /** + * @member {string} [assessmentType] The expected type of assessment + * contained in the AssessmentDetailsLink + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly assessmentType?: string; + /** + * @member {string} [assessmentDetailsLink] Link to more detailed assessment + * results data. The response type will be according to the assessmentType + * field + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly assessmentDetailsLink?: string; + /** + * @member {State} [state] Aggregative state based on the assessment's + * scanned resources states. Possible values include: 'Passed', 'Failed', + * 'Skipped', 'Unsupported' + */ + state?: State; + /** + * @member {number} [passedResources] The given assessment's related + * resources count with passed state. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly passedResources?: number; + /** + * @member {number} [failedResources] The given assessment's related + * resources count with failed state. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly failedResources?: number; + /** + * @member {number} [skippedResources] The given assessment's related + * resources count with skipped state. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly skippedResources?: number; + /** + * @member {number} [unsupportedResources] The given assessment's related + * resources count with unsupported state. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly unsupportedResources?: number; +} + +/** + * @interface + * An interface representing AscLocation. + * The ASC location of the subscription is in the "name" field + * + * @extends Resource + */ +export interface AscLocation extends Resource { + /** + * @member {any} [properties] + */ + properties?: any; } /** @@ -93,10 +220,60 @@ export interface SecurityContact extends Resource { */ export interface Pricing extends Resource { /** - * @member {PricingTier} pricingTier Pricing tier type. Possible values + * @member {PricingTier} pricingTier The pricing tier value. Possible values * include: 'Free', 'Standard' */ pricingTier: PricingTier; + /** + * @member {string} [freeTrialRemainingTime] The duration left for the + * subscriptions free trial period - in ISO 8601 format (e.g. + * P3Y6M4DT12H30M5S). + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly freeTrialRemainingTime?: string; +} + +/** + * @interface + * An interface representing PricingList. + * List of pricing configurations response + * + */ +export interface PricingList { + /** + * @member {Pricing[]} value List of pricing configurations + */ + value: Pricing[]; +} + +/** + * @interface + * An interface representing SecurityContact. + * Contact details for security issues + * + * @extends Resource + */ +export interface SecurityContact extends Resource { + /** + * @member {string} email The email of this security contact + */ + email: string; + /** + * @member {string} [phone] The phone number of this security contact + */ + phone?: string; + /** + * @member {AlertNotifications} alertNotifications Whether to send security + * alerts notifications to the security contact. Possible values include: + * 'On', 'Off' + */ + alertNotifications: AlertNotifications; + /** + * @member {AlertsToAdmins} alertsToAdmins Whether to send security alerts + * notifications to subscription admins. Possible values include: 'On', 'Off' + */ + alertsToAdmins: AlertsToAdmins; } /** @@ -205,39 +382,29 @@ export interface AdvancedThreatProtectionSetting extends Resource { } /** - * Contains the possible cases for Setting. + * @interface + * An interface representing SettingResource. + * The kind of the security setting + * + * @extends Resource */ -export type SettingUnion = Setting | DataExportSetting; +export interface SettingResource extends Resource { + /** + * @member {SettingKind} kind the kind of the settings string + * (DataExportSetting). Possible values include: 'DataExportSetting', + * 'AlertSuppressionSetting' + */ + kind: SettingKind; +} /** * @interface * An interface representing Setting. * Represents a security setting in Azure Security Center. * + * @extends SettingResource */ -export interface Setting { - /** - * @member {string} kind Polymorphic Discriminator - */ - kind: "Setting"; - /** - * @member {string} [id] Resource Id - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly id?: string; - /** - * @member {string} [name] Resource name - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly name?: string; - /** - * @member {string} [type] Resource type - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly type?: string; +export interface Setting extends SettingResource { } /** @@ -245,50 +412,15 @@ export interface Setting { * An interface representing DataExportSetting. * Represents a data export setting * + * @extends Setting */ -export interface DataExportSetting { - /** - * @member {string} kind Polymorphic Discriminator - */ - kind: "DataExportSetting"; - /** - * @member {string} [id] Resource Id - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly id?: string; - /** - * @member {string} [name] Resource name - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly name?: string; - /** - * @member {string} [type] Resource type - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly type?: string; +export interface DataExportSetting extends Setting { /** * @member {boolean} enabled Is the data export setting is enabled */ enabled: boolean; } -/** - * @interface - * An interface representing SettingKind1. - * The kind of the security setting - * - */ -export interface SettingKind1 { - /** - * @member {SettingKind} [kind] the kind of the settings string. Possible - * values include: 'DataExportSetting' - */ - kind?: SettingKind; -} - /** * @interface * An interface representing SensitivityLabel. @@ -401,21 +533,6 @@ export interface InformationProtectionPolicy extends Resource { informationTypes?: { [propertyName: string]: InformationType }; } -/** - * @interface - * An interface representing Location. - * Describes an Azure resource with location - * - */ -export interface Location { - /** - * @member {string} [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; -} - /** * @interface * An interface representing OperationDisplay. @@ -535,20 +652,6 @@ export interface SecurityTask extends Resource { readonly subState?: string; } -/** - * @interface - * An interface representing AscLocation. - * The ASC location of the subscription is in the "name" field - * - * @extends Resource - */ -export interface AscLocation extends Resource { - /** - * @member {any} [properties] - */ - properties?: any; -} - /** * @interface * An interface representing AlertEntity. @@ -659,11 +762,12 @@ export interface Alert extends Resource { */ readonly actionTaken?: string; /** - * @member {string} [reportedSeverity] Estimated severity of this alert + * @member {ReportedSeverity} [reportedSeverity] 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?: string; + readonly reportedSeverity?: ReportedSeverity; /** * @member {string} [compromisedEntity] The entity that the incident happened * on @@ -696,6 +800,13 @@ export interface Alert extends Resource { * the server.** */ readonly canBeInvestigated?: boolean; + /** + * @member {boolean} [isIncident] 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; /** * @member {AlertEntity[]} [entities] objects that are related to this alerts */ @@ -733,6 +844,13 @@ export interface Alert extends Resource { * the server.** */ readonly workspaceArmId?: string; + /** + * @member {string} [correlationKey] 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; } /** @@ -786,144 +904,26 @@ export interface DiscoveredSecuritySolution { /** * @interface - * An interface representing TopologySingleResourceParent. + * An interface representing Location. + * Describes an Azure resource with location + * */ -export interface TopologySingleResourceParent { +export interface Location { /** - * @member {string} [resourceId] Azure resource id which serves as parent - * resource in topology view + * @member {string} [location] Location where the resource is stored * **NOTE: This property will not be serialized. It can only be populated by * the server.** */ - readonly resourceId?: string; + readonly location?: string; } /** * @interface - * An interface representing TopologySingleResourceChild. + * An interface representing JitNetworkAccessPortRule. */ -export interface TopologySingleResourceChild { +export interface JitNetworkAccessPortRule { /** - * @member {string} [resourceId] Azure resource id which serves as child - * resource in topology view - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly resourceId?: string; -} - -/** - * @interface - * An interface representing TopologySingleResource. - */ -export interface TopologySingleResource { - /** - * @member {string} [resourceId] Azure resource id - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly resourceId?: string; - /** - * @member {string} [severity] The security severity of the resource - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly severity?: string; - /** - * @member {boolean} [recommendationsExist] Indicates if the resource has - * security recommendations - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly recommendationsExist?: boolean; - /** - * @member {string} [networkZones] Indicates the resource connectivity level - * to the Internet (InternetFacing, Internal ,etc.) - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly networkZones?: string; - /** - * @member {number} [topologyScore] Score of the resource based on its - * security severity - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly topologyScore?: number; - /** - * @member {string} [location] The location of this resource - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly location?: string; - /** - * @member {TopologySingleResourceParent[]} [parents] Azure resources - * connected to this resource which are in higher level in the topology view - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly parents?: TopologySingleResourceParent[]; - /** - * @member {TopologySingleResourceChild[]} [children] Azure resources - * connected to this resource which are in lower level in the topology view - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly children?: TopologySingleResourceChild[]; -} - -/** - * @interface - * An interface representing TopologyResource. - */ -export interface TopologyResource { - /** - * @member {string} [id] Resource Id - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly id?: string; - /** - * @member {string} [name] Resource name - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly name?: string; - /** - * @member {string} [type] Resource type - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly type?: string; - /** - * @member {string} [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; - /** - * @member {Date} [calculatedDateTime] The UTC time on which the topology was - * calculated - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly calculatedDateTime?: Date; - /** - * @member {TopologySingleResource[]} [topologyResources] Azure resources - * which are part of this topology resource - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly topologyResources?: TopologySingleResource[]; -} - -/** - * @interface - * An interface representing JitNetworkAccessPortRule. - */ -export interface JitNetworkAccessPortRule { - /** - * @member {number} number + * @member {number} number */ number: number; /** @@ -1139,6 +1139,19 @@ export interface JitNetworkAccessPolicyInitiateRequest { virtualMachines: JitNetworkAccessPolicyInitiateVirtualMachine[]; } +/** + * @interface + * An interface representing Kind. + * Describes an Azure resource with kind + * + */ +export interface Kind { + /** + * @member {string} [kind] Kind of the resource + */ + kind?: string; +} + /** * Contains the possible cases for ExternalSecuritySolution. */ @@ -1148,8 +1161,8 @@ export type ExternalSecuritySolutionUnion = ExternalSecuritySolution | CefExtern * @interface * An interface representing ExternalSecuritySolution. * Represents a security solution external to Azure Security Center which sends - * information to an OMS workspace and whos data is displayed by Azure Security - * Center. + * information to an OMS workspace and whose data is displayed by Azure + * Security Center. * */ export interface ExternalSecuritySolution { @@ -1348,37 +1361,189 @@ export interface ConnectedWorkspace { */ export interface AadSolutionProperties { /** - * @member {string} [deviceVendor] + * @member {string} [deviceVendor] + */ + deviceVendor?: string; + /** + * @member {string} [deviceType] + */ + deviceType?: string; + /** + * @member {ConnectedWorkspace} [workspace] + */ + workspace?: ConnectedWorkspace; + /** + * @member {AadConnectivityState} [connectivityState] The connectivity state + * of the external AAD solution . Possible values include: 'Discovered', + * 'NotLicensed', 'Connected' + */ + connectivityState?: AadConnectivityState; +} + +/** + * @interface + * An interface representing AadExternalSecuritySolution. + * Represents an AAD identity protection solution which sends logs to an OMS + * workspace. + * + */ +export interface AadExternalSecuritySolution { + /** + * @member {string} kind Polymorphic Discriminator + */ + kind: "AAD"; + /** + * @member {string} [id] Resource Id + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; + /** + * @member {string} [name] Resource name + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly name?: string; + /** + * @member {string} [type] Resource type + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly type?: string; + /** + * @member {string} [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; + /** + * @member {AadSolutionProperties} [properties] + */ + properties?: AadSolutionProperties; +} + +/** + * @interface + * An interface representing ExternalSecuritySolutionKind1. + * Describes an Azure resource with kind + * + */ +export interface ExternalSecuritySolutionKind1 { + /** + * @member {ExternalSecuritySolutionKind} [kind] The kind of the external + * solution. Possible values include: 'CEF', 'ATA', 'AAD' + */ + kind?: ExternalSecuritySolutionKind; +} + +/** + * @interface + * An interface representing AadConnectivityState1. + * Describes an Azure resource with kind + * + */ +export interface AadConnectivityState1 { + /** + * @member {AadConnectivityState} [connectivityState] The connectivity state + * of the external AAD solution . Possible values include: 'Discovered', + * 'NotLicensed', 'Connected' + */ + connectivityState?: AadConnectivityState; +} + +/** + * @interface + * An interface representing TopologySingleResourceParent. + */ +export interface TopologySingleResourceParent { + /** + * @member {string} [resourceId] Azure resource id which serves as parent + * resource in topology view + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly resourceId?: string; +} + +/** + * @interface + * An interface representing TopologySingleResourceChild. + */ +export interface TopologySingleResourceChild { + /** + * @member {string} [resourceId] Azure resource id which serves as child + * resource in topology view + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly resourceId?: string; +} + +/** + * @interface + * An interface representing TopologySingleResource. + */ +export interface TopologySingleResource { + /** + * @member {string} [resourceId] Azure resource id + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly resourceId?: string; + /** + * @member {string} [severity] The security severity of the resource + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly severity?: string; + /** + * @member {boolean} [recommendationsExist] Indicates if the resource has + * security recommendations + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly recommendationsExist?: boolean; + /** + * @member {string} [networkZones] Indicates the resource connectivity level + * to the Internet (InternetFacing, Internal ,etc.) + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly networkZones?: string; + /** + * @member {number} [topologyScore] Score of the resource based on its + * security severity + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** */ - deviceVendor?: string; + readonly topologyScore?: number; /** - * @member {string} [deviceType] + * @member {string} [location] The location of this resource + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** */ - deviceType?: string; + readonly location?: string; /** - * @member {ConnectedWorkspace} [workspace] + * @member {TopologySingleResourceParent[]} [parents] Azure resources + * connected to this resource which are in higher level in the topology view + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** */ - workspace?: ConnectedWorkspace; + readonly parents?: TopologySingleResourceParent[]; /** - * @member {AadConnectivityState} [connectivityState] The connectivity state - * of the external AAD solution . Possible values include: 'Discovered', - * 'NotLicensed', 'Connected' + * @member {TopologySingleResourceChild[]} [children] Azure resources + * connected to this resource which are in lower level in the topology view + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** */ - connectivityState?: AadConnectivityState; + readonly children?: TopologySingleResourceChild[]; } /** * @interface - * An interface representing AadExternalSecuritySolution. - * Represents an AAD identity protection solution which sends logs to an OMS - * workspace. - * + * An interface representing TopologyResource. */ -export interface AadExternalSecuritySolution { - /** - * @member {string} kind Polymorphic Discriminator - */ - kind: "AAD"; +export interface TopologyResource { /** * @member {string} [id] Resource Id * **NOTE: This property will not be serialized. It can only be populated by @@ -1404,38 +1569,19 @@ export interface AadExternalSecuritySolution { */ readonly location?: string; /** - * @member {AadSolutionProperties} [properties] - */ - properties?: AadSolutionProperties; -} - -/** - * @interface - * An interface representing ExternalSecuritySolutionKind1. - * Describes an Azure resource with kind - * - */ -export interface ExternalSecuritySolutionKind1 { - /** - * @member {ExternalSecuritySolutionKind} [kind] The kind of the external - * solution. Possible values include: 'CEF', 'ATA', 'AAD' + * @member {Date} [calculatedDateTime] The UTC time on which the topology was + * calculated + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** */ - kind?: ExternalSecuritySolutionKind; -} - -/** - * @interface - * An interface representing AadConnectivityState1. - * Describes an Azure resource with kind - * - */ -export interface AadConnectivityState1 { + readonly calculatedDateTime?: Date; /** - * @member {AadConnectivityState} [connectivityState] The connectivity state - * of the external AAD solution . Possible values include: 'Discovered', - * 'NotLicensed', 'Connected' + * @member {TopologySingleResource[]} [topologyResources] Azure resources + * which are part of this topology resource + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** */ - connectivityState?: AadConnectivityState; + readonly topologyResources?: TopologySingleResource[]; } /** @@ -1543,6 +1689,48 @@ export interface AllowedConnectionsResource { readonly connectableResources?: ConnectableResource[]; } +/** + * @interface + * An interface representing RegulatoryComplianceStandardsListOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface RegulatoryComplianceStandardsListOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {string} [filter] OData filter. Optional. + */ + filter?: string; +} + +/** + * @interface + * An interface representing RegulatoryComplianceControlsListOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface RegulatoryComplianceControlsListOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {string} [filter] OData filter. Optional. + */ + filter?: string; +} + +/** + * @interface + * An interface representing RegulatoryComplianceAssessmentsListOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface RegulatoryComplianceAssessmentsListOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {string} [filter] OData filter. Optional. + */ + filter?: string; +} + /** * @interface * An interface representing TasksListOptionalParams. @@ -1688,12 +1876,44 @@ export interface SecurityCenterOptions extends AzureServiceClientOptions { /** * @interface - * An interface representing the PricingList. - * List of pricing configurations response + * An interface representing the RegulatoryComplianceStandardList. + * List of regulatory compliance standards response + * + * @extends Array + */ +export interface RegulatoryComplianceStandardList extends Array { + /** + * @member {string} [nextLink] 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 RegulatoryComplianceControlList. + * List of regulatory compliance controls response + * + * @extends Array + */ +export interface RegulatoryComplianceControlList extends Array { + /** + * @member {string} [nextLink] 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 RegulatoryComplianceAssessmentList. + * List of regulatory compliance assessment response * - * @extends Array + * @extends Array */ -export interface PricingList extends Array { +export interface RegulatoryComplianceAssessmentList extends Array { /** * @member {string} [nextLink] The URI to fetch the next page. * **NOTE: This property will not be serialized. It can only be populated by @@ -1771,9 +1991,9 @@ export interface ComplianceList extends Array { * An interface representing the SettingsList. * Subscription settings list. * - * @extends Array + * @extends Array */ -export interface SettingsList extends Array { +export interface SettingsList extends Array { /** * @member {string} [nextLink] The URI to fetch the next page. * **NOTE: This property will not be serialized. It can only be populated by @@ -1934,6 +2154,22 @@ export interface AllowedConnectionsList extends Array @@ -402,7 +402,7 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion1, + Parameters.apiVersion4, Parameters.filter, Parameters.select, Parameters.expand @@ -429,7 +429,7 @@ const listByResourceGroupOperationSpec: msRest.OperationSpec = { Parameters.resourceGroupName ], queryParameters: [ - Parameters.apiVersion1, + Parameters.apiVersion4, Parameters.filter, Parameters.select, Parameters.expand @@ -456,7 +456,7 @@ const listSubscriptionLevelAlertsByRegionOperationSpec: msRest.OperationSpec = { Parameters.ascLocation ], queryParameters: [ - Parameters.apiVersion1, + Parameters.apiVersion4, Parameters.filter, Parameters.select, Parameters.expand @@ -484,7 +484,7 @@ const listResourceGroupLevelAlertsByRegionOperationSpec: msRest.OperationSpec = Parameters.resourceGroupName ], queryParameters: [ - Parameters.apiVersion1, + Parameters.apiVersion4, Parameters.filter, Parameters.select, Parameters.expand @@ -512,7 +512,7 @@ const getSubscriptionLevelAlertOperationSpec: msRest.OperationSpec = { Parameters.alertName ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion4 ], headerParameters: [ Parameters.acceptLanguage @@ -538,7 +538,7 @@ const getResourceGroupLevelAlertsOperationSpec: msRest.OperationSpec = { Parameters.resourceGroupName ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion4 ], headerParameters: [ Parameters.acceptLanguage @@ -564,7 +564,7 @@ const updateSubscriptionLevelAlertStateOperationSpec: msRest.OperationSpec = { Parameters.alertUpdateActionType ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion4 ], headerParameters: [ Parameters.acceptLanguage @@ -589,7 +589,7 @@ const updateResourceGroupLevelAlertStateOperationSpec: msRest.OperationSpec = { Parameters.resourceGroupName ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion4 ], headerParameters: [ Parameters.acceptLanguage diff --git a/packages/@azure/arm-security/lib/operations/allowedConnections.ts b/packages/@azure/arm-security/lib/operations/allowedConnections.ts index b738cdb1d55a..b4a0a2c0d818 100644 --- a/packages/@azure/arm-security/lib/operations/allowedConnections.ts +++ b/packages/@azure/arm-security/lib/operations/allowedConnections.ts @@ -179,7 +179,7 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion3 ], headerParameters: [ Parameters.acceptLanguage @@ -203,7 +203,7 @@ const listByHomeRegionOperationSpec: msRest.OperationSpec = { Parameters.ascLocation ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion3 ], headerParameters: [ Parameters.acceptLanguage @@ -229,7 +229,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.connectionType ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion3 ], headerParameters: [ Parameters.acceptLanguage diff --git a/packages/@azure/arm-security/lib/operations/autoProvisioningSettings.ts b/packages/@azure/arm-security/lib/operations/autoProvisioningSettings.ts index be242ac19ac5..f856fa2a46ad 100644 --- a/packages/@azure/arm-security/lib/operations/autoProvisioningSettings.ts +++ b/packages/@azure/arm-security/lib/operations/autoProvisioningSettings.ts @@ -148,7 +148,7 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion2 ], headerParameters: [ Parameters.acceptLanguage @@ -172,7 +172,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.settingName0 ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion2 ], headerParameters: [ Parameters.acceptLanguage @@ -196,7 +196,7 @@ const createOperationSpec: msRest.OperationSpec = { Parameters.settingName0 ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion2 ], headerParameters: [ Parameters.acceptLanguage diff --git a/packages/@azure/arm-security/lib/operations/compliances.ts b/packages/@azure/arm-security/lib/operations/compliances.ts index 73cb750b550e..d1b0523449c4 100644 --- a/packages/@azure/arm-security/lib/operations/compliances.ts +++ b/packages/@azure/arm-security/lib/operations/compliances.ts @@ -136,7 +136,7 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.scope ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion2 ], headerParameters: [ Parameters.acceptLanguage @@ -160,7 +160,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.complianceName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion2 ], headerParameters: [ Parameters.acceptLanguage diff --git a/packages/@azure/arm-security/lib/operations/discoveredSecuritySolutions.ts b/packages/@azure/arm-security/lib/operations/discoveredSecuritySolutions.ts index 08ce2d37ee85..59ca5da504c7 100644 --- a/packages/@azure/arm-security/lib/operations/discoveredSecuritySolutions.ts +++ b/packages/@azure/arm-security/lib/operations/discoveredSecuritySolutions.ts @@ -175,7 +175,7 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion3 ], headerParameters: [ Parameters.acceptLanguage @@ -199,7 +199,7 @@ const listByHomeRegionOperationSpec: msRest.OperationSpec = { Parameters.ascLocation ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion3 ], headerParameters: [ Parameters.acceptLanguage @@ -225,7 +225,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.discoveredSecuritySolutionName ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion3 ], headerParameters: [ Parameters.acceptLanguage diff --git a/packages/@azure/arm-security/lib/operations/externalSecuritySolutions.ts b/packages/@azure/arm-security/lib/operations/externalSecuritySolutions.ts index 564bd6cab181..b88471034f9c 100644 --- a/packages/@azure/arm-security/lib/operations/externalSecuritySolutions.ts +++ b/packages/@azure/arm-security/lib/operations/externalSecuritySolutions.ts @@ -175,7 +175,7 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion3 ], headerParameters: [ Parameters.acceptLanguage @@ -199,7 +199,7 @@ const listByHomeRegionOperationSpec: msRest.OperationSpec = { Parameters.ascLocation ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion3 ], headerParameters: [ Parameters.acceptLanguage @@ -225,7 +225,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.externalSecuritySolutionsName ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion3 ], headerParameters: [ Parameters.acceptLanguage diff --git a/packages/@azure/arm-security/lib/operations/index.ts b/packages/@azure/arm-security/lib/operations/index.ts index dd820149dfa7..30fbb40b5a34 100644 --- a/packages/@azure/arm-security/lib/operations/index.ts +++ b/packages/@azure/arm-security/lib/operations/index.ts @@ -8,6 +8,9 @@ * regenerated. */ +export * from "./regulatoryComplianceStandards"; +export * from "./regulatoryComplianceControls"; +export * from "./regulatoryComplianceAssessments"; export * from "./pricings"; export * from "./securityContacts"; export * from "./workspaceSettings"; diff --git a/packages/@azure/arm-security/lib/operations/informationProtectionPolicies.ts b/packages/@azure/arm-security/lib/operations/informationProtectionPolicies.ts index 59e511fb0445..9327dadd7c9c 100644 --- a/packages/@azure/arm-security/lib/operations/informationProtectionPolicies.ts +++ b/packages/@azure/arm-security/lib/operations/informationProtectionPolicies.ts @@ -181,7 +181,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.informationProtectionPolicyName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion2 ], headerParameters: [ Parameters.acceptLanguage @@ -205,7 +205,7 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { Parameters.informationProtectionPolicyName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion2 ], headerParameters: [ Parameters.acceptLanguage @@ -231,7 +231,7 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.scope ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion2 ], headerParameters: [ Parameters.acceptLanguage diff --git a/packages/@azure/arm-security/lib/operations/jitNetworkAccessPolicies.ts b/packages/@azure/arm-security/lib/operations/jitNetworkAccessPolicies.ts index a9eca485751a..19de8e652b64 100644 --- a/packages/@azure/arm-security/lib/operations/jitNetworkAccessPolicies.ts +++ b/packages/@azure/arm-security/lib/operations/jitNetworkAccessPolicies.ts @@ -413,7 +413,7 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion3 ], headerParameters: [ Parameters.acceptLanguage @@ -437,7 +437,7 @@ const listByRegionOperationSpec: msRest.OperationSpec = { Parameters.ascLocation ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion3 ], headerParameters: [ Parameters.acceptLanguage @@ -461,7 +461,7 @@ const listByResourceGroupOperationSpec: msRest.OperationSpec = { Parameters.resourceGroupName ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion3 ], headerParameters: [ Parameters.acceptLanguage @@ -486,7 +486,7 @@ const listByResourceGroupAndRegionOperationSpec: msRest.OperationSpec = { Parameters.ascLocation ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion3 ], headerParameters: [ Parameters.acceptLanguage @@ -512,7 +512,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.jitNetworkAccessPolicyName ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion3 ], headerParameters: [ Parameters.acceptLanguage @@ -538,7 +538,7 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { Parameters.jitNetworkAccessPolicyName ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion3 ], headerParameters: [ Parameters.acceptLanguage @@ -571,7 +571,7 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { Parameters.jitNetworkAccessPolicyName ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion3 ], headerParameters: [ Parameters.acceptLanguage @@ -597,7 +597,7 @@ const initiateOperationSpec: msRest.OperationSpec = { Parameters.jitNetworkAccessPolicyInitiateType ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion3 ], headerParameters: [ Parameters.acceptLanguage diff --git a/packages/@azure/arm-security/lib/operations/locations.ts b/packages/@azure/arm-security/lib/operations/locations.ts index ca7e3a22f61b..55deb4222589 100644 --- a/packages/@azure/arm-security/lib/operations/locations.ts +++ b/packages/@azure/arm-security/lib/operations/locations.ts @@ -116,7 +116,7 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion3 ], headerParameters: [ Parameters.acceptLanguage @@ -140,7 +140,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.ascLocation ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion3 ], headerParameters: [ Parameters.acceptLanguage diff --git a/packages/@azure/arm-security/lib/operations/operations.ts b/packages/@azure/arm-security/lib/operations/operations.ts index 76388bc9221b..43d8b8fe4740 100644 --- a/packages/@azure/arm-security/lib/operations/operations.ts +++ b/packages/@azure/arm-security/lib/operations/operations.ts @@ -85,7 +85,7 @@ const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "providers/Microsoft.Security/operations", queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion3 ], headerParameters: [ Parameters.acceptLanguage diff --git a/packages/@azure/arm-security/lib/operations/pricings.ts b/packages/@azure/arm-security/lib/operations/pricings.ts index 835af87be06a..5d3e1abfd2da 100644 --- a/packages/@azure/arm-security/lib/operations/pricings.ts +++ b/packages/@azure/arm-security/lib/operations/pricings.ts @@ -50,226 +50,64 @@ export class Pricings { callback) as Promise; } - /** - * Security pricing configurations in the resource group - * @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 - */ - 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. - * @param callback The callback - */ - listByResourceGroup(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 - */ - 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; - } - - /** - * Security pricing configuration in the subscriptionSecurity pricing configuration in the - * subscription - * @param pricingName name of the pricing configuration - * @param [options] The optional parameters - * @returns Promise - */ - getSubscriptionPricing(pricingName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param pricingName name of the pricing configuration - * @param callback The callback - */ - getSubscriptionPricing(pricingName: string, callback: msRest.ServiceCallback): void; - /** - * @param pricingName name of the pricing configuration - * @param options The optional parameters - * @param callback The callback - */ - getSubscriptionPricing(pricingName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getSubscriptionPricing(pricingName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - pricingName, - options - }, - getSubscriptionPricingOperationSpec, - callback) as Promise; - } - /** * Security pricing configuration in the subscription * @param pricingName name of the pricing configuration - * @param pricing Pricing object * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - updateSubscriptionPricing(pricingName: string, pricing: Models.Pricing, options?: msRest.RequestOptionsBase): Promise; + get(pricingName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param pricingName name of the pricing configuration - * @param pricing Pricing object * @param callback The callback */ - updateSubscriptionPricing(pricingName: string, pricing: Models.Pricing, callback: msRest.ServiceCallback): void; + get(pricingName: string, callback: msRest.ServiceCallback): void; /** * @param pricingName name of the pricing configuration - * @param pricing Pricing object * @param options The optional parameters * @param callback The callback */ - updateSubscriptionPricing(pricingName: string, pricing: Models.Pricing, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - updateSubscriptionPricing(pricingName: string, pricing: Models.Pricing, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get(pricingName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(pricingName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { pricingName, - pricing, options }, - updateSubscriptionPricingOperationSpec, - callback) as Promise; + getOperationSpec, + callback) as Promise; } /** - * Security pricing configuration in the resource group - * @param resourceGroupName The name of the resource group within the user's subscription. The name - * is case insensitive. - * @param pricingName name of the pricing configuration - * @param [options] The optional parameters - * @returns Promise - */ - getResourceGroupPricing(resourceGroupName: string, pricingName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group within the user's subscription. The name - * is case insensitive. - * @param pricingName name of the pricing configuration - * @param callback The callback - */ - getResourceGroupPricing(resourceGroupName: string, pricingName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group within the user's subscription. The name - * is case insensitive. - * @param pricingName name of the pricing configuration - * @param options The optional parameters - * @param callback The callback - */ - getResourceGroupPricing(resourceGroupName: string, pricingName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getResourceGroupPricing(resourceGroupName: string, pricingName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - pricingName, - options - }, - getResourceGroupPricingOperationSpec, - callback) as Promise; - } - - /** - * Security pricing configuration in the resource group - * @param resourceGroupName The name of the resource group within the user's subscription. The name - * is case insensitive. + * Security pricing configuration in the subscription * @param pricingName name of the pricing configuration * @param pricing Pricing object * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - createOrUpdateResourceGroupPricing(resourceGroupName: string, pricingName: string, pricing: Models.Pricing, options?: msRest.RequestOptionsBase): Promise; + update(pricingName: string, pricing: Models.Pricing, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group within the user's subscription. The name - * is case insensitive. * @param pricingName name of the pricing configuration * @param pricing Pricing object * @param callback The callback */ - createOrUpdateResourceGroupPricing(resourceGroupName: string, pricingName: string, pricing: Models.Pricing, callback: msRest.ServiceCallback): void; + update(pricingName: string, pricing: Models.Pricing, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group within the user's subscription. The name - * is case insensitive. * @param pricingName name of the pricing configuration * @param pricing Pricing object * @param options The optional parameters * @param callback The callback */ - createOrUpdateResourceGroupPricing(resourceGroupName: string, pricingName: string, pricing: Models.Pricing, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - createOrUpdateResourceGroupPricing(resourceGroupName: string, pricingName: string, pricing: Models.Pricing, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + update(pricingName: string, pricing: Models.Pricing, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + update(pricingName: string, pricing: Models.Pricing, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { - resourceGroupName, pricingName, pricing, options }, - createOrUpdateResourceGroupPricingOperationSpec, - callback) as Promise; - } - - /** - * Security pricing configurations in 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; - } - - /** - * Security pricing configurations in the resource group - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns 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; - /** - * @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 { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listByResourceGroupNextOperationSpec, - callback) as Promise; + updateOperationSpec, + callback) as Promise; } } @@ -282,7 +120,7 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage @@ -298,31 +136,7 @@ const listOperationSpec: msRest.OperationSpec = { serializer }; -const listByResourceGroupOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/pricings", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.PricingList - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const getSubscriptionPricingOperationSpec: msRest.OperationSpec = { +const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/pricings/{pricingName}", urlParameters: [ @@ -330,7 +144,7 @@ const getSubscriptionPricingOperationSpec: msRest.OperationSpec = { Parameters.pricingName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage @@ -346,7 +160,7 @@ const getSubscriptionPricingOperationSpec: msRest.OperationSpec = { serializer }; -const updateSubscriptionPricingOperationSpec: msRest.OperationSpec = { +const updateOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/pricings/{pricingName}", urlParameters: [ @@ -354,64 +168,7 @@ const updateSubscriptionPricingOperationSpec: msRest.OperationSpec = { Parameters.pricingName ], queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "pricing", - mapper: { - ...Mappers.Pricing, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.Pricing - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const getResourceGroupPricingOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/pricings/{pricingName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.pricingName - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.Pricing - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const createOrUpdateResourceGroupPricingOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/pricings/{pricingName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.pricingName - ], - queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage @@ -433,45 +190,3 @@ const createOrUpdateResourceGroupPricingOperationSpec: msRest.OperationSpec = { }, serializer }; - -const listNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.PricingList - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.PricingList - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; diff --git a/packages/@azure/arm-security/lib/operations/regulatoryComplianceAssessments.ts b/packages/@azure/arm-security/lib/operations/regulatoryComplianceAssessments.ts new file mode 100644 index 000000000000..71654861454e --- /dev/null +++ b/packages/@azure/arm-security/lib/operations/regulatoryComplianceAssessments.ts @@ -0,0 +1,215 @@ +/* + * 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/regulatoryComplianceAssessmentsMappers"; +import * as Parameters from "../models/parameters"; +import { SecurityCenterContext } from "../securityCenterContext"; + +/** Class representing a RegulatoryComplianceAssessments. */ +export class RegulatoryComplianceAssessments { + private readonly client: SecurityCenterContext; + + /** + * Create a RegulatoryComplianceAssessments. + * @param {SecurityCenterContext} client Reference to the service client. + */ + constructor(client: SecurityCenterContext) { + this.client = client; + } + + /** + * Details and state of assessments mapped to selected regulatory compliance control + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param regulatoryComplianceStandardName Name of the regulatory compliance standard object + * @param regulatoryComplianceControlName Name of the regulatory compliance control object + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, regulatoryComplianceStandardName: string, regulatoryComplianceControlName: string, options?: Models.RegulatoryComplianceAssessmentsListOptionalParams): Promise; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param regulatoryComplianceStandardName Name of the regulatory compliance standard object + * @param regulatoryComplianceControlName Name of the regulatory compliance control object + * @param callback The callback + */ + list(resourceGroupName: string, regulatoryComplianceStandardName: string, regulatoryComplianceControlName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param regulatoryComplianceStandardName Name of the regulatory compliance standard object + * @param regulatoryComplianceControlName Name of the regulatory compliance control object + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, regulatoryComplianceStandardName: string, regulatoryComplianceControlName: string, options: Models.RegulatoryComplianceAssessmentsListOptionalParams, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, regulatoryComplianceStandardName: string, regulatoryComplianceControlName: string, options?: Models.RegulatoryComplianceAssessmentsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + regulatoryComplianceStandardName, + regulatoryComplianceControlName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Supported regulatory compliance details and state for selected assessment + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param regulatoryComplianceStandardName Name of the regulatory compliance standard object + * @param regulatoryComplianceControlName Name of the regulatory compliance control object + * @param regulatoryComplianceAssessmentName Name of the regulatory compliance assessment object + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, regulatoryComplianceStandardName: string, regulatoryComplianceControlName: string, regulatoryComplianceAssessmentName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param regulatoryComplianceStandardName Name of the regulatory compliance standard object + * @param regulatoryComplianceControlName Name of the regulatory compliance control object + * @param regulatoryComplianceAssessmentName Name of the regulatory compliance assessment object + * @param callback The callback + */ + get(resourceGroupName: string, regulatoryComplianceStandardName: string, regulatoryComplianceControlName: string, regulatoryComplianceAssessmentName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param regulatoryComplianceStandardName Name of the regulatory compliance standard object + * @param regulatoryComplianceControlName Name of the regulatory compliance control object + * @param regulatoryComplianceAssessmentName Name of the regulatory compliance assessment object + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, regulatoryComplianceStandardName: string, regulatoryComplianceControlName: string, regulatoryComplianceAssessmentName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, regulatoryComplianceStandardName: string, regulatoryComplianceControlName: string, regulatoryComplianceAssessmentName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + regulatoryComplianceStandardName, + regulatoryComplianceControlName, + regulatoryComplianceAssessmentName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Details and state of assessments mapped to selected regulatory compliance control + * @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.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}/regulatoryComplianceControls/{regulatoryComplianceControlName}/regulatoryComplianceAssessments", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.regulatoryComplianceStandardName, + Parameters.regulatoryComplianceControlName + ], + queryParameters: [ + Parameters.apiVersion0, + Parameters.filter + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RegulatoryComplianceAssessmentList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}/regulatoryComplianceControls/{regulatoryComplianceControlName}/regulatoryComplianceAssessments/{regulatoryComplianceAssessmentName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.regulatoryComplianceStandardName, + Parameters.regulatoryComplianceControlName, + Parameters.regulatoryComplianceAssessmentName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RegulatoryComplianceAssessment + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RegulatoryComplianceAssessmentList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-security/lib/operations/regulatoryComplianceControls.ts b/packages/@azure/arm-security/lib/operations/regulatoryComplianceControls.ts new file mode 100644 index 000000000000..7e270d70051d --- /dev/null +++ b/packages/@azure/arm-security/lib/operations/regulatoryComplianceControls.ts @@ -0,0 +1,205 @@ +/* + * 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/regulatoryComplianceControlsMappers"; +import * as Parameters from "../models/parameters"; +import { SecurityCenterContext } from "../securityCenterContext"; + +/** Class representing a RegulatoryComplianceControls. */ +export class RegulatoryComplianceControls { + private readonly client: SecurityCenterContext; + + /** + * Create a RegulatoryComplianceControls. + * @param {SecurityCenterContext} client Reference to the service client. + */ + constructor(client: SecurityCenterContext) { + this.client = client; + } + + /** + * All supported regulatory compliance controls details and state for selected standard + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param regulatoryComplianceStandardName Name of the regulatory compliance standard object + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, regulatoryComplianceStandardName: string, options?: Models.RegulatoryComplianceControlsListOptionalParams): Promise; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param regulatoryComplianceStandardName Name of the regulatory compliance standard object + * @param callback The callback + */ + list(resourceGroupName: string, regulatoryComplianceStandardName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param regulatoryComplianceStandardName Name of the regulatory compliance standard object + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, regulatoryComplianceStandardName: string, options: Models.RegulatoryComplianceControlsListOptionalParams, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, regulatoryComplianceStandardName: string, options?: Models.RegulatoryComplianceControlsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + regulatoryComplianceStandardName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Selected regulatory compliance control details and state + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param regulatoryComplianceStandardName Name of the regulatory compliance standard object + * @param regulatoryComplianceControlName Name of the regulatory compliance control object + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, regulatoryComplianceStandardName: string, regulatoryComplianceControlName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param regulatoryComplianceStandardName Name of the regulatory compliance standard object + * @param regulatoryComplianceControlName Name of the regulatory compliance control object + * @param callback The callback + */ + get(resourceGroupName: string, regulatoryComplianceStandardName: string, regulatoryComplianceControlName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param regulatoryComplianceStandardName Name of the regulatory compliance standard object + * @param regulatoryComplianceControlName Name of the regulatory compliance control object + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, regulatoryComplianceStandardName: string, regulatoryComplianceControlName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, regulatoryComplianceStandardName: string, regulatoryComplianceControlName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + regulatoryComplianceStandardName, + regulatoryComplianceControlName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * All supported regulatory compliance controls details and state for selected standard + * @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.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}/regulatoryComplianceControls", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.regulatoryComplianceStandardName + ], + queryParameters: [ + Parameters.apiVersion0, + Parameters.filter + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RegulatoryComplianceControlList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}/regulatoryComplianceControls/{regulatoryComplianceControlName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.regulatoryComplianceStandardName, + Parameters.regulatoryComplianceControlName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RegulatoryComplianceControl + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RegulatoryComplianceControlList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-security/lib/operations/regulatoryComplianceStandards.ts b/packages/@azure/arm-security/lib/operations/regulatoryComplianceStandards.ts new file mode 100644 index 000000000000..54ad45db61ad --- /dev/null +++ b/packages/@azure/arm-security/lib/operations/regulatoryComplianceStandards.ts @@ -0,0 +1,195 @@ +/* + * 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/regulatoryComplianceStandardsMappers"; +import * as Parameters from "../models/parameters"; +import { SecurityCenterContext } from "../securityCenterContext"; + +/** Class representing a RegulatoryComplianceStandards. */ +export class RegulatoryComplianceStandards { + private readonly client: SecurityCenterContext; + + /** + * Create a RegulatoryComplianceStandards. + * @param {SecurityCenterContext} client Reference to the service client. + */ + constructor(client: SecurityCenterContext) { + this.client = client; + } + + /** + * Supported regulatory compliance standards details and state + * @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 + */ + list(resourceGroupName: string, options?: Models.RegulatoryComplianceStandardsListOptionalParams): Promise; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param callback The callback + */ + list(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 + */ + list(resourceGroupName: string, options: Models.RegulatoryComplianceStandardsListOptionalParams, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, options?: Models.RegulatoryComplianceStandardsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Supported regulatory compliance details state for selected standard + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param regulatoryComplianceStandardName Name of the regulatory compliance standard object + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, regulatoryComplianceStandardName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param regulatoryComplianceStandardName Name of the regulatory compliance standard object + * @param callback The callback + */ + get(resourceGroupName: string, regulatoryComplianceStandardName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param regulatoryComplianceStandardName Name of the regulatory compliance standard object + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, regulatoryComplianceStandardName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, regulatoryComplianceStandardName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + regulatoryComplianceStandardName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Supported regulatory compliance standards details and state + * @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.Security/regulatoryComplianceStandards", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion0, + Parameters.filter + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RegulatoryComplianceStandardList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.regulatoryComplianceStandardName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RegulatoryComplianceStandard + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RegulatoryComplianceStandardList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-security/lib/operations/securityContacts.ts b/packages/@azure/arm-security/lib/operations/securityContacts.ts index d96d049f457f..92412bbd8ce4 100644 --- a/packages/@azure/arm-security/lib/operations/securityContacts.ts +++ b/packages/@azure/arm-security/lib/operations/securityContacts.ts @@ -208,7 +208,7 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion2 ], headerParameters: [ Parameters.acceptLanguage @@ -232,7 +232,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.securityContactName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion2 ], headerParameters: [ Parameters.acceptLanguage @@ -256,7 +256,7 @@ const createOperationSpec: msRest.OperationSpec = { Parameters.securityContactName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion2 ], headerParameters: [ Parameters.acceptLanguage @@ -287,7 +287,7 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { Parameters.securityContactName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion2 ], headerParameters: [ Parameters.acceptLanguage @@ -309,7 +309,7 @@ const updateOperationSpec: msRest.OperationSpec = { Parameters.securityContactName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion2 ], headerParameters: [ Parameters.acceptLanguage diff --git a/packages/@azure/arm-security/lib/operations/settings.ts b/packages/@azure/arm-security/lib/operations/settings.ts index b5d38a326868..78571824c8c0 100644 --- a/packages/@azure/arm-security/lib/operations/settings.ts +++ b/packages/@azure/arm-security/lib/operations/settings.ts @@ -52,23 +52,23 @@ export class Settings { /** * Settings of different configurations in security center - * @param settingName Name of setting. Possible values include: 'MCAS', 'WDATP' + * @param settingName Name of setting: (MCAS/WDATP). Possible values include: 'MCAS', 'WDATP' * @param [options] The optional parameters * @returns Promise */ get(settingName: Models.SettingName, options?: msRest.RequestOptionsBase): Promise; /** - * @param settingName Name of setting. Possible values include: 'MCAS', 'WDATP' + * @param settingName Name of setting: (MCAS/WDATP). Possible values include: 'MCAS', 'WDATP' * @param callback The callback */ - get(settingName: Models.SettingName, callback: msRest.ServiceCallback): void; + get(settingName: Models.SettingName, callback: msRest.ServiceCallback): void; /** - * @param settingName Name of setting. Possible values include: 'MCAS', 'WDATP' + * @param settingName Name of setting: (MCAS/WDATP). Possible values include: 'MCAS', 'WDATP' * @param options The optional parameters * @param callback The callback */ - get(settingName: Models.SettingName, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(settingName: Models.SettingName, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get(settingName: Models.SettingName, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(settingName: Models.SettingName, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { settingName, @@ -80,26 +80,26 @@ export class Settings { /** * updating settings about different configurations in security center - * @param settingName Name of setting. Possible values include: 'MCAS', 'WDATP' + * @param settingName Name of setting: (MCAS/WDATP). Possible values include: 'MCAS', 'WDATP' * @param setting Setting object * @param [options] The optional parameters * @returns Promise */ - update(settingName: Models.SettingName1, setting: Models.SettingUnion, options?: msRest.RequestOptionsBase): Promise; + update(settingName: Models.SettingName1, setting: Models.Setting, options?: msRest.RequestOptionsBase): Promise; /** - * @param settingName Name of setting. Possible values include: 'MCAS', 'WDATP' + * @param settingName Name of setting: (MCAS/WDATP). Possible values include: 'MCAS', 'WDATP' * @param setting Setting object * @param callback The callback */ - update(settingName: Models.SettingName1, setting: Models.SettingUnion, callback: msRest.ServiceCallback): void; + update(settingName: Models.SettingName1, setting: Models.Setting, callback: msRest.ServiceCallback): void; /** - * @param settingName Name of setting. Possible values include: 'MCAS', 'WDATP' + * @param settingName Name of setting: (MCAS/WDATP). Possible values include: 'MCAS', 'WDATP' * @param setting Setting object * @param options The optional parameters * @param callback The callback */ - update(settingName: Models.SettingName1, setting: Models.SettingUnion, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - update(settingName: Models.SettingName1, setting: Models.SettingUnion, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + update(settingName: Models.SettingName1, setting: Models.Setting, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + update(settingName: Models.SettingName1, setting: Models.Setting, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { settingName, @@ -148,7 +148,7 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion2 ], headerParameters: [ Parameters.acceptLanguage @@ -172,7 +172,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.settingName0 ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion2 ], headerParameters: [ Parameters.acceptLanguage @@ -196,7 +196,7 @@ const updateOperationSpec: msRest.OperationSpec = { Parameters.settingName0 ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion2 ], headerParameters: [ Parameters.acceptLanguage diff --git a/packages/@azure/arm-security/lib/operations/tasks.ts b/packages/@azure/arm-security/lib/operations/tasks.ts index cf2414a50cfe..e457fc13c2c5 100644 --- a/packages/@azure/arm-security/lib/operations/tasks.ts +++ b/packages/@azure/arm-security/lib/operations/tasks.ts @@ -339,7 +339,7 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion1, + Parameters.apiVersion3, Parameters.filter ], headerParameters: [ @@ -364,7 +364,7 @@ const listByHomeRegionOperationSpec: msRest.OperationSpec = { Parameters.ascLocation ], queryParameters: [ - Parameters.apiVersion1, + Parameters.apiVersion3, Parameters.filter ], headerParameters: [ @@ -390,7 +390,7 @@ const getSubscriptionLevelTaskOperationSpec: msRest.OperationSpec = { Parameters.taskName ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion3 ], headerParameters: [ Parameters.acceptLanguage @@ -416,7 +416,7 @@ const updateSubscriptionLevelTaskStateOperationSpec: msRest.OperationSpec = { Parameters.taskUpdateActionType ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion3 ], headerParameters: [ Parameters.acceptLanguage @@ -439,7 +439,7 @@ const listByResourceGroupOperationSpec: msRest.OperationSpec = { Parameters.ascLocation ], queryParameters: [ - Parameters.apiVersion1, + Parameters.apiVersion3, Parameters.filter ], headerParameters: [ @@ -466,7 +466,7 @@ const getResourceGroupLevelTaskOperationSpec: msRest.OperationSpec = { Parameters.taskName ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion3 ], headerParameters: [ Parameters.acceptLanguage @@ -493,7 +493,7 @@ const updateResourceGroupLevelTaskStateOperationSpec: msRest.OperationSpec = { Parameters.taskUpdateActionType ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion3 ], headerParameters: [ Parameters.acceptLanguage diff --git a/packages/@azure/arm-security/lib/operations/topology.ts b/packages/@azure/arm-security/lib/operations/topology.ts index 29881ed37736..598b206eeef2 100644 --- a/packages/@azure/arm-security/lib/operations/topology.ts +++ b/packages/@azure/arm-security/lib/operations/topology.ts @@ -175,7 +175,7 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion3 ], headerParameters: [ Parameters.acceptLanguage @@ -199,7 +199,7 @@ const listByHomeRegionOperationSpec: msRest.OperationSpec = { Parameters.ascLocation ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion3 ], headerParameters: [ Parameters.acceptLanguage @@ -225,7 +225,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.topologyResourceName ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion3 ], headerParameters: [ Parameters.acceptLanguage diff --git a/packages/@azure/arm-security/lib/operations/workspaceSettings.ts b/packages/@azure/arm-security/lib/operations/workspaceSettings.ts index 7aa4886714a4..5d89aa618107 100644 --- a/packages/@azure/arm-security/lib/operations/workspaceSettings.ts +++ b/packages/@azure/arm-security/lib/operations/workspaceSettings.ts @@ -27,7 +27,8 @@ export class WorkspaceSettings { } /** - * Settings about where we should store your security data and logs + * Settings about where we should store your security data and logs. If the result is empty, it + * means that no custom-workspace configuration was set * @param [options] The optional parameters * @returns Promise */ @@ -51,7 +52,8 @@ export class WorkspaceSettings { } /** - * Settings about where we should store your security data and logs + * Settings about where we should store your security data and logs. If the result is empty, it + * means that no custom-workspace configuration was set * @param workspaceSettingName Name of the security setting * @param [options] The optional parameters * @returns Promise @@ -172,7 +174,8 @@ export class WorkspaceSettings { } /** - * Settings about where we should store your security data and logs + * Settings about where we should store your security data and logs. If the result is empty, it + * means that no custom-workspace configuration was set * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters * @returns Promise @@ -209,7 +212,7 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion2 ], headerParameters: [ Parameters.acceptLanguage @@ -233,7 +236,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.workspaceSettingName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion2 ], headerParameters: [ Parameters.acceptLanguage @@ -257,7 +260,7 @@ const createOperationSpec: msRest.OperationSpec = { Parameters.workspaceSettingName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion2 ], headerParameters: [ Parameters.acceptLanguage @@ -288,7 +291,7 @@ const updateOperationSpec: msRest.OperationSpec = { Parameters.workspaceSettingName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion2 ], headerParameters: [ Parameters.acceptLanguage @@ -319,7 +322,7 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { Parameters.workspaceSettingName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion2 ], headerParameters: [ Parameters.acceptLanguage diff --git a/packages/@azure/arm-security/lib/securityCenter.ts b/packages/@azure/arm-security/lib/securityCenter.ts index 5b1f4c9ebf51..3db4f436036f 100644 --- a/packages/@azure/arm-security/lib/securityCenter.ts +++ b/packages/@azure/arm-security/lib/securityCenter.ts @@ -17,6 +17,9 @@ import { SecurityCenterContext } from "./securityCenterContext"; class SecurityCenter extends SecurityCenterContext { // Operation groups + regulatoryComplianceStandards: operations.RegulatoryComplianceStandards; + regulatoryComplianceControls: operations.RegulatoryComplianceControls; + regulatoryComplianceAssessments: operations.RegulatoryComplianceAssessments; pricings: operations.Pricings; securityContacts: operations.SecurityContacts; workspaceSettings: operations.WorkspaceSettings; @@ -45,6 +48,9 @@ class SecurityCenter extends SecurityCenterContext { */ constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, ascLocation: string, options?: Models.SecurityCenterOptions) { super(credentials, subscriptionId, ascLocation, options); + this.regulatoryComplianceStandards = new operations.RegulatoryComplianceStandards(this); + this.regulatoryComplianceControls = new operations.RegulatoryComplianceControls(this); + this.regulatoryComplianceAssessments = new operations.RegulatoryComplianceAssessments(this); this.pricings = new operations.Pricings(this); this.securityContacts = new operations.SecurityContacts(this); this.workspaceSettings = new operations.WorkspaceSettings(this); diff --git a/packages/@azure/arm-security/lib/securityCenterContext.ts b/packages/@azure/arm-security/lib/securityCenterContext.ts index 1456da91b8ae..3cbbd0dd847c 100644 --- a/packages/@azure/arm-security/lib/securityCenterContext.ts +++ b/packages/@azure/arm-security/lib/securityCenterContext.ts @@ -13,7 +13,7 @@ import * as msRest from "@azure/ms-rest-js"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-security"; -const packageVersion = "0.1.0"; +const packageVersion = "1.2.0"; export class SecurityCenterContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials; diff --git a/packages/@azure/arm-security/package.json b/packages/@azure/arm-security/package.json index f787f1cab990..bab4f254e9dc 100644 --- a/packages/@azure/arm-security/package.json +++ b/packages/@azure/arm-security/package.json @@ -4,8 +4,8 @@ "description": "SecurityCenter Library with typescript type definitions for node.js and browser.", "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.2.0", + "@azure/ms-rest-js": "^1.2.0", "tslib": "^1.9.3" }, "keywords": [ @@ -23,6 +23,7 @@ "typescript": "^3.1.1", "rollup": "^0.66.2", "rollup-plugin-node-resolve": "^3.4.0", + "rollup-plugin-sourcemaps": "^0.4.2", "uglify-js": "^3.4.9" }, "homepage": "https://github.com/azure/azure-sdk-for-js/tree/master/packages/@azure/arm-security", @@ -51,6 +52,5 @@ "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/arm-security.js.map'\" -o ./dist/arm-security.min.js ./dist/arm-security.js", "prepack": "npm install && npm run build" }, - "sideEffects": false, - "authPublish": true + "sideEffects": false } diff --git a/packages/@azure/arm-security/rollup.config.js b/packages/@azure/arm-security/rollup.config.js index 651c85e10ed3..43a7bd9aa064 100644 --- a/packages/@azure/arm-security/rollup.config.js +++ b/packages/@azure/arm-security/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/securityCenter.js', - external: ["@azure/ms-rest-js", "@azure/ms-rest-azure-js"], + input: "./esm/securityCenter.js", + external: [ + "@azure/ms-rest-js", + "@azure/ms-rest-azure-js" + ], output: { file: "./dist/arm-security.js", format: "umd", @@ -16,16 +22,16 @@ const config = { }, banner: `/* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */` }, plugins: [ - nodeResolve({ module: true }) + nodeResolve({ module: true }), + sourcemaps() ] }; + export default config;