diff --git a/sdk/security/arm-security/LICENSE.txt b/sdk/security/arm-security/LICENSE.txt new file mode 100644 index 000000000000..b73b4a1293c3 --- /dev/null +++ b/sdk/security/arm-security/LICENSE.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +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 +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/sdk/security/arm-security/README.md b/sdk/security/arm-security/README.md new file mode 100644 index 000000000000..0992d26e24ae --- /dev/null +++ b/sdk/security/arm-security/README.md @@ -0,0 +1,96 @@ +## Azure SecurityCenter SDK for JavaScript + +This package contains an isomorphic SDK for SecurityCenter. + +### Currently supported environments + +- Node.js version 6.x.x or higher +- Browser JavaScript + +### 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. + +##### Install @azure/ms-rest-nodeauth + +```bash +npm install @azure/ms-rest-nodeauth +``` + +##### Sample code + +```typescript +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; +import { SecurityCenter, SecurityCenterModels, SecurityCenterMappers } from "@azure/arm-security"; +const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; + +msRestNodeAuth.interactiveLogin().then((creds) => { + const client = new SecurityCenter(creds, subscriptionId); + client.pricings.list().then((result) => { + console.log("The result is:"); + console.log(result); + }); +}).catch((err) => { + console.error(err); +}); +``` + +#### browser - Authentication, client creation and list pricings as an example written in JavaScript. + +##### Install @azure/ms-rest-browserauth + +```bash +npm install @azure/ms-rest-browserauth +``` + +##### Sample code + +See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. + +- index.html +```html + + + + @azure/arm-security sample + + + + + + + + +``` + +## Related projects + +- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) diff --git a/sdk/security/arm-security/lib/models/advancedThreatProtectionMappers.ts b/sdk/security/arm-security/lib/models/advancedThreatProtectionMappers.ts new file mode 100644 index 000000000000..d515a487ff55 --- /dev/null +++ b/sdk/security/arm-security/lib/models/advancedThreatProtectionMappers.ts @@ -0,0 +1,40 @@ +/* + * 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. + */ + +export { + discriminators, + AdvancedThreatProtectionSetting, + Resource, + BaseResource, + CloudError, + Pricing, + AscLocation, + Alert, + AlertEntity, + AlertConfidenceReason, + SettingResource, + SecurityTask, + SecurityTaskParameters, + AutoProvisioningSetting, + Compliance, + ComplianceSegment, + InformationProtectionPolicy, + SensitivityLabel, + InformationType, + InformationProtectionKeyword, + SecurityContact, + WorkspaceSetting, + RegulatoryComplianceStandard, + RegulatoryComplianceControl, + RegulatoryComplianceAssessment, + Setting, + DataExportSetting +} from "../models/mappers"; + diff --git a/sdk/security/arm-security/lib/models/alertsMappers.ts b/sdk/security/arm-security/lib/models/alertsMappers.ts new file mode 100644 index 000000000000..b8b5ebb4db94 --- /dev/null +++ b/sdk/security/arm-security/lib/models/alertsMappers.ts @@ -0,0 +1,41 @@ +/* + * 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. + */ + +export { + discriminators, + AlertList, + Alert, + Resource, + BaseResource, + AlertEntity, + AlertConfidenceReason, + CloudError, + Pricing, + AscLocation, + SettingResource, + SecurityTask, + SecurityTaskParameters, + AdvancedThreatProtectionSetting, + AutoProvisioningSetting, + Compliance, + ComplianceSegment, + InformationProtectionPolicy, + SensitivityLabel, + InformationType, + InformationProtectionKeyword, + SecurityContact, + WorkspaceSetting, + RegulatoryComplianceStandard, + RegulatoryComplianceControl, + RegulatoryComplianceAssessment, + Setting, + DataExportSetting +} from "../models/mappers"; + diff --git a/sdk/security/arm-security/lib/models/allowedConnectionsMappers.ts b/sdk/security/arm-security/lib/models/allowedConnectionsMappers.ts new file mode 100644 index 000000000000..d8a8951a7057 --- /dev/null +++ b/sdk/security/arm-security/lib/models/allowedConnectionsMappers.ts @@ -0,0 +1,19 @@ +/* + * 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. + */ + +export { + discriminators, + AllowedConnectionsList, + AllowedConnectionsResource, + ConnectableResource, + ConnectedResource, + CloudError +} from "../models/mappers"; + diff --git a/sdk/security/arm-security/lib/models/autoProvisioningSettingsMappers.ts b/sdk/security/arm-security/lib/models/autoProvisioningSettingsMappers.ts new file mode 100644 index 000000000000..664fce0844a4 --- /dev/null +++ b/sdk/security/arm-security/lib/models/autoProvisioningSettingsMappers.ts @@ -0,0 +1,41 @@ +/* + * 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. + */ + +export { + discriminators, + AutoProvisioningSettingList, + AutoProvisioningSetting, + Resource, + BaseResource, + CloudError, + Pricing, + AscLocation, + Alert, + AlertEntity, + AlertConfidenceReason, + SettingResource, + SecurityTask, + SecurityTaskParameters, + AdvancedThreatProtectionSetting, + Compliance, + ComplianceSegment, + InformationProtectionPolicy, + SensitivityLabel, + InformationType, + InformationProtectionKeyword, + SecurityContact, + WorkspaceSetting, + RegulatoryComplianceStandard, + RegulatoryComplianceControl, + RegulatoryComplianceAssessment, + Setting, + DataExportSetting +} from "../models/mappers"; + diff --git a/sdk/security/arm-security/lib/models/compliancesMappers.ts b/sdk/security/arm-security/lib/models/compliancesMappers.ts new file mode 100644 index 000000000000..d8431e31cc90 --- /dev/null +++ b/sdk/security/arm-security/lib/models/compliancesMappers.ts @@ -0,0 +1,41 @@ +/* + * 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. + */ + +export { + discriminators, + ComplianceList, + Compliance, + Resource, + BaseResource, + ComplianceSegment, + CloudError, + Pricing, + AscLocation, + Alert, + AlertEntity, + AlertConfidenceReason, + SettingResource, + SecurityTask, + SecurityTaskParameters, + AdvancedThreatProtectionSetting, + AutoProvisioningSetting, + InformationProtectionPolicy, + SensitivityLabel, + InformationType, + InformationProtectionKeyword, + SecurityContact, + WorkspaceSetting, + RegulatoryComplianceStandard, + RegulatoryComplianceControl, + RegulatoryComplianceAssessment, + Setting, + DataExportSetting +} from "../models/mappers"; + diff --git a/sdk/security/arm-security/lib/models/discoveredSecuritySolutionsMappers.ts b/sdk/security/arm-security/lib/models/discoveredSecuritySolutionsMappers.ts new file mode 100644 index 000000000000..fbd7462a6323 --- /dev/null +++ b/sdk/security/arm-security/lib/models/discoveredSecuritySolutionsMappers.ts @@ -0,0 +1,17 @@ +/* + * 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. + */ + +export { + discriminators, + DiscoveredSecuritySolutionList, + DiscoveredSecuritySolution, + CloudError +} from "../models/mappers"; + diff --git a/sdk/security/arm-security/lib/models/externalSecuritySolutionsMappers.ts b/sdk/security/arm-security/lib/models/externalSecuritySolutionsMappers.ts new file mode 100644 index 000000000000..16f85ea6d5ae --- /dev/null +++ b/sdk/security/arm-security/lib/models/externalSecuritySolutionsMappers.ts @@ -0,0 +1,25 @@ +/* + * 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. + */ + +export { + discriminators, + ExternalSecuritySolutionList, + ExternalSecuritySolution, + CloudError, + CefExternalSecuritySolution, + CefSolutionProperties, + ExternalSecuritySolutionProperties, + ConnectedWorkspace, + AtaSolutionProperties, + AtaExternalSecuritySolution, + AadExternalSecuritySolution, + AadSolutionProperties +} from "../models/mappers"; + diff --git a/sdk/security/arm-security/lib/models/index.ts b/sdk/security/arm-security/lib/models/index.ts new file mode 100644 index 000000000000..f85081227843 --- /dev/null +++ b/sdk/security/arm-security/lib/models/index.ts @@ -0,0 +1,4098 @@ +/* + * 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 { BaseResource, CloudError, AzureServiceClientOptions } from "@azure/ms-rest-azure-js"; +import * as msRest from "@azure/ms-rest-js"; + +export { BaseResource, CloudError }; + + +/** + * @interface + * An interface representing Resource. + * Describes an Azure resource. + * + * @extends BaseResource + */ +export interface Resource extends BaseResource { + /** + * @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; +} + +/** + * @interface + * An interface representing Pricing. + * Pricing tier will be applied for the scope based on the resource ID + * + * @extends Resource + */ +export interface Pricing extends Resource { + /** + * @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 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. + * Changing set of properties depending on the entity type. + * + */ +export interface AlertEntity { + /** + * @member {string} [type] Type of entity + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly type?: string; + /** + * @property Describes unknown properties. The value of an unknown property + * can be of "any" type. + */ + [property: string]: any; +} + +/** + * @interface + * An interface representing AlertConfidenceReason. + * Factors that increase our confidence that the alert is a true positive + * + */ +export interface AlertConfidenceReason { + /** + * @member {string} [type] Type of confidence factor + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly type?: string; + /** + * @member {string} [reason] description of the confidence reason + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly reason?: string; +} + +/** + * @interface + * An interface representing Alert. + * Security alert + * + * @extends Resource + */ +export interface Alert extends Resource { + /** + * @member {string} [state] State of the alert (Active, Dismissed etc.) + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly state?: string; + /** + * @member {Date} [reportedTimeUtc] The time the incident was reported to + * Microsoft.Security in UTC + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly reportedTimeUtc?: Date; + /** + * @member {string} [vendorName] Name of the vendor that discovered the + * incident + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly vendorName?: string; + /** + * @member {string} [alertName] Name of the alert type + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly alertName?: string; + /** + * @member {string} [alertDisplayName] Display name of the alert type + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly alertDisplayName?: string; + /** + * @member {Date} [detectedTimeUtc] The time the incident was detected by the + * vendor + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly detectedTimeUtc?: Date; + /** + * @member {string} [description] Description of the incident and what it + * means + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly description?: string; + /** + * @member {string} [remediationSteps] Recommended steps to reradiate the + * incident + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly remediationSteps?: string; + /** + * @member {string} [actionTaken] The action that was taken as a response to + * the alert (Active, Blocked etc.) + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly actionTaken?: string; + /** + * @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?: ReportedSeverity; + /** + * @member {string} [compromisedEntity] The entity that the incident happened + * on + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly compromisedEntity?: string; + /** + * @member {string} [associatedResource] Azure resource ID of the associated + * resource + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly associatedResource?: string; + /** + * @member {{ [propertyName: string]: any }} [extendedProperties] + */ + extendedProperties?: { [propertyName: string]: any }; + /** + * @member {string} [systemSource] The type of the alerted resource (Azure, + * Non-Azure) + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly systemSource?: string; + /** + * @member {boolean} [canBeInvestigated] Whether this alert can be + * investigated with Azure Security Center + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly canBeInvestigated?: boolean; + /** + * @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 + */ + entities?: AlertEntity[]; + /** + * @member {number} [confidenceScore] level of confidence we have on the + * alert + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly confidenceScore?: number; + /** + * @member {AlertConfidenceReason[]} [confidenceReasons] reasons the alert + * got the confidenceScore value + */ + confidenceReasons?: AlertConfidenceReason[]; + /** + * @member {string} [subscriptionId] Azure subscription ID of the resource + * that had the security alert or the subscription ID of the workspace that + * this resource reports to + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly subscriptionId?: string; + /** + * @member {string} [instanceId] Instance ID of the alert. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly instanceId?: string; + /** + * @member {string} [workspaceArmId] Azure resource ID of the workspace that + * the alert was reported to. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly workspaceArmId?: string; + /** + * @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; +} + +/** + * @interface + * An interface representing SettingResource. + * The kind of the security setting + * + * @extends Resource + */ +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 extends SettingResource { +} + +/** + * @interface + * An interface representing DataExportSetting. + * Represents a data export setting + * + * @extends Setting + */ +export interface DataExportSetting extends Setting { + /** + * @member {boolean} enabled Is the data export setting is enabled + */ + enabled: boolean; +} + +/** + * @interface + * An interface representing ConnectedResource. + * Describes properties of a connected resource + * + */ +export interface ConnectedResource { + /** + * @member {string} [connectedResourceId] The Azure resource id of the + * connected resource + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly connectedResourceId?: string; + /** + * @member {string} [tcpPorts] The allowed tcp ports + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly tcpPorts?: string; + /** + * @member {string} [udpPorts] The allowed udp ports + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly udpPorts?: string; +} + +/** + * @interface + * An interface representing ConnectableResource. + * Describes the allowed inbound and outbound traffic of an Azure resource + * + */ +export interface ConnectableResource { + /** + * @member {string} [id] The Azure resource id + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; + /** + * @member {ConnectedResource[]} [inboundConnectedResources] The list of + * Azure resources that the resource has inbound allowed connection from + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly inboundConnectedResources?: ConnectedResource[]; + /** + * @member {ConnectedResource[]} [outboundConnectedResources] The list of + * Azure resources that the resource has outbound allowed connection to + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly outboundConnectedResources?: ConnectedResource[]; +} + +/** + * @interface + * An interface representing AllowedConnectionsResource. + * The resource whose properties describes the allowed traffic between Azure + * resources + * + */ +export interface AllowedConnectionsResource { + /** + * @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 allowed + * connections resource was calculated + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly calculatedDateTime?: Date; + /** + * @member {ConnectableResource[]} [connectableResources] List of connectable + * resources + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly connectableResources?: ConnectableResource[]; +} + +/** + * @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 DiscoveredSecuritySolution. + */ +export interface DiscoveredSecuritySolution { + /** + * @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 {SecurityFamily} securityFamily The security family of the + * discovered solution. Possible values include: 'Waf', 'Ngfw', 'SaasWaf', + * 'Va' + */ + securityFamily: SecurityFamily; + /** + * @member {string} offer The security solutions' image offer + */ + offer: string; + /** + * @member {string} publisher The security solutions' image publisher + */ + publisher: string; + /** + * @member {string} sku The security solutions' image sku + */ + sku: string; +} + +/** + * Contains the possible cases for ExternalSecuritySolution. + */ +export type ExternalSecuritySolutionUnion = ExternalSecuritySolution | CefExternalSecuritySolution | AtaExternalSecuritySolution | AadExternalSecuritySolution; + +/** + * @interface + * An interface representing ExternalSecuritySolution. + * Represents a security solution external to Azure Security Center which sends + * information to an OMS workspace and whose data is displayed by Azure + * Security Center. + * + */ +export interface ExternalSecuritySolution { + /** + * @member {string} kind Polymorphic Discriminator + */ + kind: "ExternalSecuritySolution"; + /** + * @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; +} + +/** + * @interface + * An interface representing ExternalSecuritySolutionProperties. + * The solution properties (correspond to the solution kind) + * + */ +export interface ExternalSecuritySolutionProperties { + /** + * @member {string} [deviceVendor] + */ + deviceVendor?: string; + /** + * @member {string} [deviceType] + */ + deviceType?: string; + /** + * @member {ConnectedWorkspace} [workspace] + */ + workspace?: ConnectedWorkspace; + /** + * @property Describes unknown properties. The value of an unknown property + * can be of "any" type. + */ + [property: string]: any; +} + +/** + * @interface + * An interface representing CefSolutionProperties. + * @summary The external security solution properties for CEF solutions + * + * @extends ExternalSecuritySolutionProperties + */ +export interface CefSolutionProperties extends ExternalSecuritySolutionProperties { + /** + * @member {string} [hostname] + */ + hostname?: string; + /** + * @member {string} [agent] + */ + agent?: string; + /** + * @member {string} [lastEventReceived] + */ + lastEventReceived?: string; +} + +/** + * @interface + * An interface representing CefExternalSecuritySolution. + * Represents a security solution which sends CEF logs to an OMS workspace + * + */ +export interface CefExternalSecuritySolution { + /** + * @member {string} kind Polymorphic Discriminator + */ + kind: "CEF"; + /** + * @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 {CefSolutionProperties} [properties] + */ + properties?: CefSolutionProperties; +} + +/** + * @interface + * An interface representing AtaSolutionProperties. + * @summary The external security solution properties for ATA solutions + * + * @extends ExternalSecuritySolutionProperties + */ +export interface AtaSolutionProperties extends ExternalSecuritySolutionProperties { + /** + * @member {string} [lastEventReceived] + */ + lastEventReceived?: string; +} + +/** + * @interface + * An interface representing AtaExternalSecuritySolution. + * Represents an ATA security solution which sends logs to an OMS workspace + * + */ +export interface AtaExternalSecuritySolution { + /** + * @member {string} kind Polymorphic Discriminator + */ + kind: "ATA"; + /** + * @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 {AtaSolutionProperties} [properties] + */ + properties?: AtaSolutionProperties; +} + +/** + * @interface + * An interface representing ConnectedWorkspace. + * @summary Represents an OMS workspace to which the solution is connected + * + */ +export interface ConnectedWorkspace { + /** + * @member {string} [id] Azure resource ID of the connected OMS workspace + */ + id?: string; +} + +/** + * @interface + * An interface representing AadSolutionProperties. + * @summary The external security solution properties for AAD solutions + * + */ +export interface AadSolutionProperties { + /** + * @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 JitNetworkAccessPortRule. + */ +export interface JitNetworkAccessPortRule { + /** + * @member {number} number + */ + number: number; + /** + * @member {Protocol} protocol Possible values include: 'TCP', 'UDP', 'All' + */ + protocol: Protocol; + /** + * @member {string} [allowedSourceAddressPrefix] Mutually exclusive with the + * "allowedSourceAddressPrefixes" parameter. Should be an IP address or CIDR, + * for example "192.168.0.3" or "192.168.0.0/16". + */ + allowedSourceAddressPrefix?: string; + /** + * @member {string[]} [allowedSourceAddressPrefixes] Mutually exclusive with + * the "allowedSourceAddressPrefix" parameter. + */ + allowedSourceAddressPrefixes?: string[]; + /** + * @member {string} maxRequestAccessDuration Maximum duration requests can be + * made for. In ISO 8601 duration format. Minimum 5 minutes, maximum 1 day + */ + maxRequestAccessDuration: string; +} + +/** + * @interface + * An interface representing JitNetworkAccessPolicyVirtualMachine. + */ +export interface JitNetworkAccessPolicyVirtualMachine { + /** + * @member {string} id Resource ID of the virtual machine that is linked to + * this policy + */ + id: string; + /** + * @member {JitNetworkAccessPortRule[]} ports Port configurations for the + * virtual machine + */ + ports: JitNetworkAccessPortRule[]; +} + +/** + * @interface + * An interface representing JitNetworkAccessRequestPort. + */ +export interface JitNetworkAccessRequestPort { + /** + * @member {number} number + */ + number: number; + /** + * @member {string} [allowedSourceAddressPrefix] Mutually exclusive with the + * "allowedSourceAddressPrefixes" parameter. Should be an IP address or CIDR, + * for example "192.168.0.3" or "192.168.0.0/16". + */ + allowedSourceAddressPrefix?: string; + /** + * @member {string[]} [allowedSourceAddressPrefixes] Mutually exclusive with + * the "allowedSourceAddressPrefix" parameter. + */ + allowedSourceAddressPrefixes?: string[]; + /** + * @member {Date} endTimeUtc The date & time at which the request ends in UTC + */ + endTimeUtc: Date; + /** + * @member {Status} status The status of the port. Possible values include: + * 'Revoked', 'Initiated' + */ + status: Status; + /** + * @member {StatusReason} statusReason A description of why the `status` has + * its value. Possible values include: 'Expired', 'UserRequested', + * 'NewerRequestInitiated' + */ + statusReason: StatusReason; +} + +/** + * @interface + * An interface representing JitNetworkAccessRequestVirtualMachine. + */ +export interface JitNetworkAccessRequestVirtualMachine { + /** + * @member {string} id Resource ID of the virtual machine that is linked to + * this policy + */ + id: string; + /** + * @member {JitNetworkAccessRequestPort[]} ports The ports that were opened + * for the virtual machine + */ + ports: JitNetworkAccessRequestPort[]; +} + +/** + * @interface + * An interface representing JitNetworkAccessRequest. + */ +export interface JitNetworkAccessRequest { + /** + * @member {JitNetworkAccessRequestVirtualMachine[]} virtualMachines + */ + virtualMachines: JitNetworkAccessRequestVirtualMachine[]; + /** + * @member {Date} startTimeUtc The start time of the request in UTC + */ + startTimeUtc: Date; + /** + * @member {string} requestor The identity of the person who made the request + */ + requestor: string; +} + +/** + * @interface + * An interface representing JitNetworkAccessPolicy. + */ +export interface JitNetworkAccessPolicy { + /** + * @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} [kind] Kind of the resource + */ + kind?: 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 {JitNetworkAccessPolicyVirtualMachine[]} virtualMachines + * Configurations for Microsoft.Compute/virtualMachines resource type. + */ + virtualMachines: JitNetworkAccessPolicyVirtualMachine[]; + /** + * @member {JitNetworkAccessRequest[]} [requests] + */ + requests?: JitNetworkAccessRequest[]; + /** + * @member {string} [provisioningState] Gets the provisioning state of the + * Just-in-Time policy. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly provisioningState?: string; +} + +/** + * @interface + * An interface representing JitNetworkAccessPolicyInitiatePort. + */ +export interface JitNetworkAccessPolicyInitiatePort { + /** + * @member {number} number + */ + number: number; + /** + * @member {string} [allowedSourceAddressPrefix] Source of the allowed + * traffic. If omitted, the request will be for the source IP address of the + * initiate request. + */ + allowedSourceAddressPrefix?: string; + /** + * @member {Date} endTimeUtc The time to close the request in UTC + */ + endTimeUtc: Date; +} + +/** + * @interface + * An interface representing JitNetworkAccessPolicyInitiateVirtualMachine. + */ +export interface JitNetworkAccessPolicyInitiateVirtualMachine { + /** + * @member {string} id Resource ID of the virtual machine that is linked to + * this policy + */ + id: string; + /** + * @member {JitNetworkAccessPolicyInitiatePort[]} ports The ports to open for + * the resource with the `id` + */ + ports: JitNetworkAccessPolicyInitiatePort[]; +} + +/** + * @interface + * An interface representing JitNetworkAccessPolicyInitiateRequest. + */ +export interface JitNetworkAccessPolicyInitiateRequest { + /** + * @member {JitNetworkAccessPolicyInitiateVirtualMachine[]} virtualMachines A + * list of virtual machines & ports to open access for + */ + 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; +} + +/** + * @interface + * An interface representing OperationDisplay. + * Security operation display + * + */ +export interface OperationDisplay { + /** + * @member {string} [provider] The resource provider for the operation. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly provider?: string; + /** + * @member {string} [resource] The display name of the resource the operation + * applies to. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly resource?: string; + /** + * @member {string} [operation] The display name of the security operation. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly operation?: string; + /** + * @member {string} [description] The description of the operation. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly description?: string; +} + +/** + * @interface + * An interface representing Operation. + * Possible operation in the REST API of Microsoft.Security + * + */ +export interface Operation { + /** + * @member {string} [name] Name of the operation + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly name?: string; + /** + * @member {string} [origin] Where the operation is originated + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly origin?: string; + /** + * @member {OperationDisplay} [display] + */ + display?: OperationDisplay; +} + +/** + * @interface + * An interface representing SecurityTaskParameters. + * Changing set of properties, depending on the task type that is derived from + * the name field + * + */ +export interface SecurityTaskParameters { + /** + * @member {string} [name] Name of the task type + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly name?: string; + /** + * @property Describes unknown properties. The value of an unknown property + * can be of "any" type. + */ + [property: string]: any; +} + +/** + * @interface + * An interface representing SecurityTask. + * Security task that we recommend to do in order to strengthen security + * + * @extends Resource + */ +export interface SecurityTask extends Resource { + /** + * @member {string} [state] State of the task (Active, Resolved etc.) + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly state?: string; + /** + * @member {Date} [creationTimeUtc] The time this task was discovered in UTC + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly creationTimeUtc?: Date; + /** + * @member {SecurityTaskParameters} [securityTaskParameters] + */ + securityTaskParameters?: SecurityTaskParameters; + /** + * @member {Date} [lastStateChangeTimeUtc] The time this task's details were + * last changed in UTC + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly lastStateChangeTimeUtc?: Date; + /** + * @member {string} [subState] Additional data on the state of the task + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly subState?: string; +} + +/** + * @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.** + */ + 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 AdvancedThreatProtectionSetting. + * The Advanced Threat Protection resource. + * + * @extends Resource + */ +export interface AdvancedThreatProtectionSetting extends Resource { + /** + * @member {boolean} [isEnabled] Indicates whether Advanced Threat Protection + * is enabled. + */ + isEnabled?: boolean; +} + +/** + * @interface + * An interface representing AutoProvisioningSetting. + * Auto provisioning setting + * + * @extends Resource + */ +export interface AutoProvisioningSetting extends Resource { + /** + * @member {AutoProvision} autoProvision Describes what kind of security + * agent provisioning action to take. Possible values include: 'On', 'Off' + */ + autoProvision: AutoProvision; +} + +/** + * @interface + * An interface representing ComplianceSegment. + * A segment of a compliance assessment. + * + */ +export interface ComplianceSegment { + /** + * @member {string} [segmentType] The segment type, e.g. compliant, + * non-compliance, insufficient coverage, N/A, etc. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly segmentType?: string; + /** + * @member {number} [percentage] The size (%) of the segment. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly percentage?: number; +} + +/** + * @interface + * An interface representing Compliance. + * Compliance of a scope + * + * @extends Resource + */ +export interface Compliance extends Resource { + /** + * @member {Date} [assessmentTimestampUtcDate] The timestamp when the + * Compliance calculation was conducted. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly assessmentTimestampUtcDate?: Date; + /** + * @member {number} [resourceCount] The resource count of the given + * subscription for which the Compliance calculation was conducted (needed + * for Management Group Compliance calculation). + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly resourceCount?: number; + /** + * @member {ComplianceSegment[]} [assessmentResult] An array of segment, + * which is the actually the compliance assessment. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly assessmentResult?: ComplianceSegment[]; +} + +/** + * @interface + * An interface representing SensitivityLabel. + * The sensitivity label. + * + */ +export interface SensitivityLabel { + /** + * @member {string} [displayName] The name of the sensitivity label. + */ + displayName?: string; + /** + * @member {number} [order] The order of the sensitivity label. + */ + order?: number; + /** + * @member {boolean} [enabled] Indicates whether the label is enabled or not. + */ + enabled?: boolean; +} + +/** + * @interface + * An interface representing InformationProtectionKeyword. + * The information type keyword. + * + */ +export interface InformationProtectionKeyword { + /** + * @member {string} [pattern] The keyword pattern. + */ + pattern?: string; + /** + * @member {boolean} [custom] Indicates whether the keyword is custom or not. + */ + custom?: boolean; + /** + * @member {boolean} [canBeNumeric] Indicates whether the keyword can be + * applied on numeric types or not. + */ + canBeNumeric?: boolean; + /** + * @member {boolean} [excluded] Indicates whether the keyword is excluded or + * not. + */ + excluded?: boolean; +} + +/** + * @interface + * An interface representing InformationType. + * The information type. + * + */ +export interface InformationType { + /** + * @member {string} [displayName] The name of the information type. + */ + displayName?: string; + /** + * @member {number} [order] The order of the information type. + */ + order?: number; + /** + * @member {string} [recommendedLabelId] The recommended label id to be + * associated with this information type. + */ + recommendedLabelId?: string; + /** + * @member {boolean} [enabled] Indicates whether the information type is + * enabled or not. + */ + enabled?: boolean; + /** + * @member {boolean} [custom] Indicates whether the information type is + * custom or not. + */ + custom?: boolean; + /** + * @member {InformationProtectionKeyword[]} [keywords] The information type + * keywords. + */ + keywords?: InformationProtectionKeyword[]; +} + +/** + * @interface + * An interface representing InformationProtectionPolicy. + * Information protection policy. + * + * @extends Resource + */ +export interface InformationProtectionPolicy extends Resource { + /** + * @member {Date} [lastModifiedUtc] Describes the last UTC time the policy + * was modified. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly lastModifiedUtc?: Date; + /** + * @member {{ [propertyName: string]: SensitivityLabel }} [labels] Dictionary + * of sensitivity labels. + */ + labels?: { [propertyName: string]: SensitivityLabel }; + /** + * @member {{ [propertyName: string]: InformationType }} [informationTypes] + * The sensitivity information types. + */ + informationTypes?: { [propertyName: string]: InformationType }; +} + +/** + * @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; +} + +/** + * @interface + * An interface representing WorkspaceSetting. + * Configures where to store the OMS agent data for workspaces under a scope + * + * @extends Resource + */ +export interface WorkspaceSetting extends Resource { + /** + * @member {string} workspaceId The full Azure ID of the workspace to save + * the data in + */ + workspaceId: string; + /** + * @member {string} scope All the VMs in this scope will send their security + * data to the mentioned workspace unless overridden by a setting with more + * specific scope + */ + scope: string; +} + +/** + * @interface + * An interface representing RegulatoryComplianceStandard. + * Regulatory compliance standard details and state + * + * @extends Resource + */ +export interface RegulatoryComplianceStandard extends Resource { + /** + * @member {State} [state] Aggregative state based on the standard's + * supported controls states. Possible values include: 'Passed', 'Failed', + * 'Skipped', 'Unsupported' + */ + 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 RegulatoryComplianceControl. + * Regulatory compliance control details and state + * + * @extends Resource + */ +export interface RegulatoryComplianceControl extends Resource { + /** + * @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.** + */ + readonly description?: string; + /** + * @member {State} [state] Aggregative state based on the control's supported + * assessments states. Possible values include: 'Passed', 'Failed', + * 'Skipped', 'Unsupported' + */ + state?: State; + /** + * @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.** + */ + readonly passedAssessments?: number; + /** + * @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.** + */ + 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 AlertsListOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface AlertsListOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {string} [filter] OData filter. Optional. + */ + filter?: string; + /** + * @member {string} [select] OData select. Optional. + */ + select?: string; + /** + * @member {string} [expand] OData expand. Optional. + */ + expand?: string; +} + +/** + * @interface + * An interface representing AlertsListByResourceGroupOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface AlertsListByResourceGroupOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {string} [filter] OData filter. Optional. + */ + filter?: string; + /** + * @member {string} [select] OData select. Optional. + */ + select?: string; + /** + * @member {string} [expand] OData expand. Optional. + */ + expand?: string; +} + +/** + * @interface + * An interface representing AlertsListSubscriptionLevelAlertsByRegionOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface AlertsListSubscriptionLevelAlertsByRegionOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {string} [filter] OData filter. Optional. + */ + filter?: string; + /** + * @member {string} [select] OData select. Optional. + */ + select?: string; + /** + * @member {string} [expand] OData expand. Optional. + */ + expand?: string; +} + +/** + * @interface + * An interface representing AlertsListResourceGroupLevelAlertsByRegionOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface AlertsListResourceGroupLevelAlertsByRegionOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {string} [filter] OData filter. Optional. + */ + filter?: string; + /** + * @member {string} [select] OData select. Optional. + */ + select?: string; + /** + * @member {string} [expand] OData expand. Optional. + */ + expand?: string; +} + +/** + * @interface + * An interface representing TasksListOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface TasksListOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {string} [filter] OData filter. Optional. + */ + filter?: string; +} + +/** + * @interface + * An interface representing TasksListByHomeRegionOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface TasksListByHomeRegionOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {string} [filter] OData filter. Optional. + */ + filter?: string; +} + +/** + * @interface + * An interface representing TasksListByResourceGroupOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface TasksListByResourceGroupOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {string} [filter] OData filter. Optional. + */ + filter?: string; +} + +/** + * @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 SecurityCenterOptions. + * @extends AzureServiceClientOptions + */ +export interface SecurityCenterOptions extends AzureServiceClientOptions { + /** + * @member {string} [baseUri] + */ + baseUri?: string; +} + + +/** + * @interface + * An interface representing the AlertList. + * List of security alerts + * + * @extends Array + */ +export interface AlertList 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 SettingsList. + * Subscription settings list. + * + * @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 + * the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing the AllowedConnectionsList. + * List of all possible traffic between Azure resources + * + * @extends Array + */ +export interface AllowedConnectionsList 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 DiscoveredSecuritySolutionList. + * @extends Array + */ +export interface DiscoveredSecuritySolutionList 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 ExternalSecuritySolutionList. + * @extends Array + */ +export interface ExternalSecuritySolutionList 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 JitNetworkAccessPoliciesList. + * @extends Array + */ +export interface JitNetworkAccessPoliciesList 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 AscLocationList. + * List of locations where ASC saves your data + * + * @extends Array + */ +export interface AscLocationList 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 OperationList. + * List of possible operations for Microsoft.Security resource provider + * + * @extends Array + */ +export interface OperationList 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 SecurityTaskList. + * List of security task recommendations + * + * @extends Array + */ +export interface SecurityTaskList 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 TopologyList. + * @extends Array + */ +export interface TopologyList 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 AutoProvisioningSettingList. + * List of all the auto provisioning settings response + * + * @extends Array + */ +export interface AutoProvisioningSettingList 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 ComplianceList. + * List of Compliance objects response + * + * @extends Array + */ +export interface ComplianceList 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 InformationProtectionPolicyList. + * Information protection policies response. + * + * @extends Array + */ +export interface InformationProtectionPolicyList 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 SecurityContactList. + * List of security contacts response + * + * @extends Array + */ +export interface SecurityContactList 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 WorkspaceSettingList. + * List of workspace settings response + * + * @extends Array + */ +export interface WorkspaceSettingList 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 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 + */ +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 + * the server.** + */ + readonly nextLink?: string; +} + +/** + * Defines values for PricingTier. + * Possible values include: 'Free', 'Standard' + * @readonly + * @enum {string} + */ +export type PricingTier = 'Free' | 'Standard'; + +/** + * Defines values for ReportedSeverity. + * Possible values include: 'Informational', 'Low', 'Medium', 'High' + * @readonly + * @enum {string} + */ +export type ReportedSeverity = 'Informational' | 'Low' | 'Medium' | 'High'; + +/** + * Defines values for SettingKind. + * Possible values include: 'DataExportSetting', 'AlertSuppressionSetting' + * @readonly + * @enum {string} + */ +export type SettingKind = 'DataExportSetting' | 'AlertSuppressionSetting'; + +/** + * Defines values for SecurityFamily. + * Possible values include: 'Waf', 'Ngfw', 'SaasWaf', 'Va' + * @readonly + * @enum {string} + */ +export type SecurityFamily = 'Waf' | 'Ngfw' | 'SaasWaf' | 'Va'; + +/** + * Defines values for AadConnectivityState. + * Possible values include: 'Discovered', 'NotLicensed', 'Connected' + * @readonly + * @enum {string} + */ +export type AadConnectivityState = 'Discovered' | 'NotLicensed' | 'Connected'; + +/** + * Defines values for ExternalSecuritySolutionKind. + * Possible values include: 'CEF', 'ATA', 'AAD' + * @readonly + * @enum {string} + */ +export type ExternalSecuritySolutionKind = 'CEF' | 'ATA' | 'AAD'; + +/** + * Defines values for Protocol. + * Possible values include: 'TCP', 'UDP', 'All' + * @readonly + * @enum {string} + */ +export type Protocol = 'TCP' | 'UDP' | '*'; + +/** + * Defines values for Status. + * Possible values include: 'Revoked', 'Initiated' + * @readonly + * @enum {string} + */ +export type Status = 'Revoked' | 'Initiated'; + +/** + * Defines values for StatusReason. + * Possible values include: 'Expired', 'UserRequested', 'NewerRequestInitiated' + * @readonly + * @enum {string} + */ +export type StatusReason = 'Expired' | 'UserRequested' | 'NewerRequestInitiated'; + +/** + * Defines values for AutoProvision. + * Possible values include: 'On', 'Off' + * @readonly + * @enum {string} + */ +export type AutoProvision = 'On' | 'Off'; + +/** + * Defines values for AlertNotifications. + * Possible values include: 'On', 'Off' + * @readonly + * @enum {string} + */ +export type AlertNotifications = 'On' | 'Off'; + +/** + * Defines values for AlertsToAdmins. + * Possible values include: 'On', 'Off' + * @readonly + * @enum {string} + */ +export type AlertsToAdmins = 'On' | 'Off'; + +/** + * Defines values for State. + * Possible values include: 'Passed', 'Failed', 'Skipped', 'Unsupported' + * @readonly + * @enum {string} + */ +export type State = 'Passed' | 'Failed' | 'Skipped' | 'Unsupported'; + +/** + * Defines values for ConnectionType. + * Possible values include: 'Internal', 'External' + * @readonly + * @enum {string} + */ +export type ConnectionType = 'Internal' | 'External'; + +/** + * Defines values for AlertUpdateActionType. + * Possible values include: 'Dismiss', 'Reactivate' + * @readonly + * @enum {string} + */ +export type AlertUpdateActionType = 'Dismiss' | 'Reactivate'; + +/** + * Defines values for AlertUpdateActionType1. + * Possible values include: 'Dismiss', 'Reactivate' + * @readonly + * @enum {string} + */ +export type AlertUpdateActionType1 = 'Dismiss' | 'Reactivate'; + +/** + * Defines values for SettingName. + * Possible values include: 'MCAS', 'WDATP' + * @readonly + * @enum {string} + */ +export type SettingName = 'MCAS' | 'WDATP'; + +/** + * Defines values for SettingName1. + * Possible values include: 'MCAS', 'WDATP' + * @readonly + * @enum {string} + */ +export type SettingName1 = 'MCAS' | 'WDATP'; + +/** + * Defines values for TaskUpdateActionType. + * Possible values include: 'Activate', 'Dismiss', 'Start', 'Resolve', 'Close' + * @readonly + * @enum {string} + */ +export type TaskUpdateActionType = 'Activate' | 'Dismiss' | 'Start' | 'Resolve' | 'Close'; + +/** + * Defines values for TaskUpdateActionType1. + * Possible values include: 'Activate', 'Dismiss', 'Start', 'Resolve', 'Close' + * @readonly + * @enum {string} + */ +export type TaskUpdateActionType1 = 'Activate' | 'Dismiss' | 'Start' | 'Resolve' | 'Close'; + +/** + * Defines values for InformationProtectionPolicyName. + * Possible values include: 'effective', 'custom' + * @readonly + * @enum {string} + */ +export type InformationProtectionPolicyName = 'effective' | 'custom'; + +/** + * Defines values for InformationProtectionPolicyName1. + * Possible values include: 'effective', 'custom' + * @readonly + * @enum {string} + */ +export type InformationProtectionPolicyName1 = 'effective' | 'custom'; + +/** + * Contains response data for the list operation. + */ +export type PricingsListResponse = PricingList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: PricingList; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type PricingsGetResponse = Pricing & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: Pricing; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type PricingsUpdateResponse = Pricing & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: Pricing; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type AlertsListResponse = AlertList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: AlertList; + }; +}; + +/** + * Contains response data for the listByResourceGroup operation. + */ +export type AlertsListByResourceGroupResponse = AlertList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: AlertList; + }; +}; + +/** + * Contains response data for the listSubscriptionLevelAlertsByRegion operation. + */ +export type AlertsListSubscriptionLevelAlertsByRegionResponse = AlertList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: AlertList; + }; +}; + +/** + * Contains response data for the listResourceGroupLevelAlertsByRegion operation. + */ +export type AlertsListResourceGroupLevelAlertsByRegionResponse = AlertList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: AlertList; + }; +}; + +/** + * Contains response data for the getSubscriptionLevelAlert operation. + */ +export type AlertsGetSubscriptionLevelAlertResponse = Alert & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: Alert; + }; +}; + +/** + * Contains response data for the getResourceGroupLevelAlerts operation. + */ +export type AlertsGetResourceGroupLevelAlertsResponse = Alert & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: Alert; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type AlertsListNextResponse = AlertList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: AlertList; + }; +}; + +/** + * Contains response data for the listByResourceGroupNext operation. + */ +export type AlertsListByResourceGroupNextResponse = AlertList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: AlertList; + }; +}; + +/** + * Contains response data for the listSubscriptionLevelAlertsByRegionNext operation. + */ +export type AlertsListSubscriptionLevelAlertsByRegionNextResponse = AlertList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: AlertList; + }; +}; + +/** + * Contains response data for the listResourceGroupLevelAlertsByRegionNext operation. + */ +export type AlertsListResourceGroupLevelAlertsByRegionNextResponse = AlertList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: AlertList; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type SettingsListResponse = SettingsList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SettingsList; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type SettingsGetResponse = Setting & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: Setting; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type SettingsUpdateResponse = Setting & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: Setting; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type SettingsListNextResponse = SettingsList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SettingsList; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type AllowedConnectionsListResponse = AllowedConnectionsList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: AllowedConnectionsList; + }; +}; + +/** + * Contains response data for the listByHomeRegion operation. + */ +export type AllowedConnectionsListByHomeRegionResponse = AllowedConnectionsList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: AllowedConnectionsList; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type AllowedConnectionsGetResponse = AllowedConnectionsResource & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: AllowedConnectionsResource; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type AllowedConnectionsListNextResponse = AllowedConnectionsList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: AllowedConnectionsList; + }; +}; + +/** + * Contains response data for the listByHomeRegionNext operation. + */ +export type AllowedConnectionsListByHomeRegionNextResponse = AllowedConnectionsList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: AllowedConnectionsList; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type DiscoveredSecuritySolutionsListResponse = DiscoveredSecuritySolutionList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: DiscoveredSecuritySolutionList; + }; +}; + +/** + * Contains response data for the listByHomeRegion operation. + */ +export type DiscoveredSecuritySolutionsListByHomeRegionResponse = DiscoveredSecuritySolutionList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: DiscoveredSecuritySolutionList; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type DiscoveredSecuritySolutionsGetResponse = DiscoveredSecuritySolution & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: DiscoveredSecuritySolution; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type DiscoveredSecuritySolutionsListNextResponse = DiscoveredSecuritySolutionList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: DiscoveredSecuritySolutionList; + }; +}; + +/** + * Contains response data for the listByHomeRegionNext operation. + */ +export type DiscoveredSecuritySolutionsListByHomeRegionNextResponse = DiscoveredSecuritySolutionList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: DiscoveredSecuritySolutionList; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type ExternalSecuritySolutionsListResponse = ExternalSecuritySolutionList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ExternalSecuritySolutionList; + }; +}; + +/** + * Contains response data for the listByHomeRegion operation. + */ +export type ExternalSecuritySolutionsListByHomeRegionResponse = ExternalSecuritySolutionList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ExternalSecuritySolutionList; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type ExternalSecuritySolutionsGetResponse = ExternalSecuritySolutionUnion & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ExternalSecuritySolutionUnion; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type ExternalSecuritySolutionsListNextResponse = ExternalSecuritySolutionList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ExternalSecuritySolutionList; + }; +}; + +/** + * Contains response data for the listByHomeRegionNext operation. + */ +export type ExternalSecuritySolutionsListByHomeRegionNextResponse = ExternalSecuritySolutionList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ExternalSecuritySolutionList; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type JitNetworkAccessPoliciesListResponse = JitNetworkAccessPoliciesList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: JitNetworkAccessPoliciesList; + }; +}; + +/** + * Contains response data for the listByRegion operation. + */ +export type JitNetworkAccessPoliciesListByRegionResponse = JitNetworkAccessPoliciesList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: JitNetworkAccessPoliciesList; + }; +}; + +/** + * Contains response data for the listByResourceGroup operation. + */ +export type JitNetworkAccessPoliciesListByResourceGroupResponse = JitNetworkAccessPoliciesList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: JitNetworkAccessPoliciesList; + }; +}; + +/** + * Contains response data for the listByResourceGroupAndRegion operation. + */ +export type JitNetworkAccessPoliciesListByResourceGroupAndRegionResponse = JitNetworkAccessPoliciesList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: JitNetworkAccessPoliciesList; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type JitNetworkAccessPoliciesGetResponse = JitNetworkAccessPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: JitNetworkAccessPolicy; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type JitNetworkAccessPoliciesCreateOrUpdateResponse = JitNetworkAccessPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: JitNetworkAccessPolicy; + }; +}; + +/** + * Contains response data for the initiate operation. + */ +export type JitNetworkAccessPoliciesInitiateResponse = JitNetworkAccessRequest & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: JitNetworkAccessRequest; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type JitNetworkAccessPoliciesListNextResponse = JitNetworkAccessPoliciesList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: JitNetworkAccessPoliciesList; + }; +}; + +/** + * Contains response data for the listByRegionNext operation. + */ +export type JitNetworkAccessPoliciesListByRegionNextResponse = JitNetworkAccessPoliciesList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: JitNetworkAccessPoliciesList; + }; +}; + +/** + * Contains response data for the listByResourceGroupNext operation. + */ +export type JitNetworkAccessPoliciesListByResourceGroupNextResponse = JitNetworkAccessPoliciesList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: JitNetworkAccessPoliciesList; + }; +}; + +/** + * Contains response data for the listByResourceGroupAndRegionNext operation. + */ +export type JitNetworkAccessPoliciesListByResourceGroupAndRegionNextResponse = JitNetworkAccessPoliciesList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: JitNetworkAccessPoliciesList; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type LocationsListResponse = AscLocationList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: AscLocationList; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type LocationsGetResponse = AscLocation & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: AscLocation; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type LocationsListNextResponse = AscLocationList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: AscLocationList; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type OperationsListResponse = OperationList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationList; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type OperationsListNextResponse = OperationList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationList; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type TasksListResponse = SecurityTaskList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SecurityTaskList; + }; +}; + +/** + * Contains response data for the listByHomeRegion operation. + */ +export type TasksListByHomeRegionResponse = SecurityTaskList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SecurityTaskList; + }; +}; + +/** + * Contains response data for the getSubscriptionLevelTask operation. + */ +export type TasksGetSubscriptionLevelTaskResponse = SecurityTask & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SecurityTask; + }; +}; + +/** + * Contains response data for the listByResourceGroup operation. + */ +export type TasksListByResourceGroupResponse = SecurityTaskList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SecurityTaskList; + }; +}; + +/** + * Contains response data for the getResourceGroupLevelTask operation. + */ +export type TasksGetResourceGroupLevelTaskResponse = SecurityTask & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SecurityTask; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type TasksListNextResponse = SecurityTaskList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SecurityTaskList; + }; +}; + +/** + * Contains response data for the listByHomeRegionNext operation. + */ +export type TasksListByHomeRegionNextResponse = SecurityTaskList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SecurityTaskList; + }; +}; + +/** + * Contains response data for the listByResourceGroupNext operation. + */ +export type TasksListByResourceGroupNextResponse = SecurityTaskList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SecurityTaskList; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type TopologyListResponse = TopologyList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: TopologyList; + }; +}; + +/** + * Contains response data for the listByHomeRegion operation. + */ +export type TopologyListByHomeRegionResponse = TopologyList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: TopologyList; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type TopologyGetResponse = TopologyResource & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: TopologyResource; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type TopologyListNextResponse = TopologyList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: TopologyList; + }; +}; + +/** + * Contains response data for the listByHomeRegionNext operation. + */ +export type TopologyListByHomeRegionNextResponse = TopologyList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: TopologyList; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type AdvancedThreatProtectionGetResponse = AdvancedThreatProtectionSetting & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: AdvancedThreatProtectionSetting; + }; +}; + +/** + * Contains response data for the create operation. + */ +export type AdvancedThreatProtectionCreateResponse = AdvancedThreatProtectionSetting & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: AdvancedThreatProtectionSetting; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type AutoProvisioningSettingsListResponse = AutoProvisioningSettingList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: AutoProvisioningSettingList; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type AutoProvisioningSettingsGetResponse = AutoProvisioningSetting & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: AutoProvisioningSetting; + }; +}; + +/** + * Contains response data for the create operation. + */ +export type AutoProvisioningSettingsCreateResponse = AutoProvisioningSetting & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: AutoProvisioningSetting; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type AutoProvisioningSettingsListNextResponse = AutoProvisioningSettingList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: AutoProvisioningSettingList; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type CompliancesListResponse = ComplianceList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ComplianceList; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type CompliancesGetResponse = Compliance & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: Compliance; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type CompliancesListNextResponse = ComplianceList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ComplianceList; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type InformationProtectionPoliciesGetResponse = InformationProtectionPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: InformationProtectionPolicy; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type InformationProtectionPoliciesCreateOrUpdateResponse = InformationProtectionPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: InformationProtectionPolicy; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type InformationProtectionPoliciesListResponse = InformationProtectionPolicyList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: InformationProtectionPolicyList; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type InformationProtectionPoliciesListNextResponse = InformationProtectionPolicyList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: InformationProtectionPolicyList; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type SecurityContactsListResponse = SecurityContactList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SecurityContactList; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type SecurityContactsGetResponse = SecurityContact & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SecurityContact; + }; +}; + +/** + * Contains response data for the create operation. + */ +export type SecurityContactsCreateResponse = SecurityContact & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SecurityContact; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type SecurityContactsUpdateResponse = SecurityContact & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SecurityContact; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type SecurityContactsListNextResponse = SecurityContactList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SecurityContactList; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type WorkspaceSettingsListResponse = WorkspaceSettingList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: WorkspaceSettingList; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type WorkspaceSettingsGetResponse = WorkspaceSetting & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: WorkspaceSetting; + }; +}; + +/** + * Contains response data for the create operation. + */ +export type WorkspaceSettingsCreateResponse = WorkspaceSetting & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: WorkspaceSetting; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type WorkspaceSettingsUpdateResponse = WorkspaceSetting & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: WorkspaceSetting; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type WorkspaceSettingsListNextResponse = WorkspaceSettingList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: WorkspaceSettingList; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type RegulatoryComplianceStandardsListResponse = RegulatoryComplianceStandardList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: RegulatoryComplianceStandardList; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type RegulatoryComplianceStandardsGetResponse = RegulatoryComplianceStandard & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: RegulatoryComplianceStandard; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type RegulatoryComplianceStandardsListNextResponse = RegulatoryComplianceStandardList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: RegulatoryComplianceStandardList; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type RegulatoryComplianceControlsListResponse = RegulatoryComplianceControlList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: RegulatoryComplianceControlList; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type RegulatoryComplianceControlsGetResponse = RegulatoryComplianceControl & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: RegulatoryComplianceControl; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type RegulatoryComplianceControlsListNextResponse = RegulatoryComplianceControlList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: RegulatoryComplianceControlList; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type RegulatoryComplianceAssessmentsListResponse = RegulatoryComplianceAssessmentList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: RegulatoryComplianceAssessmentList; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type RegulatoryComplianceAssessmentsGetResponse = RegulatoryComplianceAssessment & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: RegulatoryComplianceAssessment; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type RegulatoryComplianceAssessmentsListNextResponse = RegulatoryComplianceAssessmentList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: RegulatoryComplianceAssessmentList; + }; +}; diff --git a/sdk/security/arm-security/lib/models/informationProtectionPoliciesMappers.ts b/sdk/security/arm-security/lib/models/informationProtectionPoliciesMappers.ts new file mode 100644 index 000000000000..a61caced228d --- /dev/null +++ b/sdk/security/arm-security/lib/models/informationProtectionPoliciesMappers.ts @@ -0,0 +1,41 @@ +/* + * 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. + */ + +export { + discriminators, + InformationProtectionPolicy, + Resource, + BaseResource, + SensitivityLabel, + InformationType, + InformationProtectionKeyword, + CloudError, + InformationProtectionPolicyList, + Pricing, + AscLocation, + Alert, + AlertEntity, + AlertConfidenceReason, + SettingResource, + SecurityTask, + SecurityTaskParameters, + AdvancedThreatProtectionSetting, + AutoProvisioningSetting, + Compliance, + ComplianceSegment, + SecurityContact, + WorkspaceSetting, + RegulatoryComplianceStandard, + RegulatoryComplianceControl, + RegulatoryComplianceAssessment, + Setting, + DataExportSetting +} from "../models/mappers"; + diff --git a/sdk/security/arm-security/lib/models/jitNetworkAccessPoliciesMappers.ts b/sdk/security/arm-security/lib/models/jitNetworkAccessPoliciesMappers.ts new file mode 100644 index 000000000000..c7f8d5b68006 --- /dev/null +++ b/sdk/security/arm-security/lib/models/jitNetworkAccessPoliciesMappers.ts @@ -0,0 +1,25 @@ +/* + * 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. + */ + +export { + discriminators, + JitNetworkAccessPoliciesList, + JitNetworkAccessPolicy, + JitNetworkAccessPolicyVirtualMachine, + JitNetworkAccessPortRule, + JitNetworkAccessRequest, + JitNetworkAccessRequestVirtualMachine, + JitNetworkAccessRequestPort, + CloudError, + JitNetworkAccessPolicyInitiateRequest, + JitNetworkAccessPolicyInitiateVirtualMachine, + JitNetworkAccessPolicyInitiatePort +} from "../models/mappers"; + diff --git a/sdk/security/arm-security/lib/models/locationsMappers.ts b/sdk/security/arm-security/lib/models/locationsMappers.ts new file mode 100644 index 000000000000..32e81d4f2f60 --- /dev/null +++ b/sdk/security/arm-security/lib/models/locationsMappers.ts @@ -0,0 +1,41 @@ +/* + * 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. + */ + +export { + discriminators, + AscLocationList, + AscLocation, + Resource, + BaseResource, + CloudError, + Pricing, + Alert, + AlertEntity, + AlertConfidenceReason, + SettingResource, + SecurityTask, + SecurityTaskParameters, + AdvancedThreatProtectionSetting, + AutoProvisioningSetting, + Compliance, + ComplianceSegment, + InformationProtectionPolicy, + SensitivityLabel, + InformationType, + InformationProtectionKeyword, + SecurityContact, + WorkspaceSetting, + RegulatoryComplianceStandard, + RegulatoryComplianceControl, + RegulatoryComplianceAssessment, + Setting, + DataExportSetting +} from "../models/mappers"; + diff --git a/sdk/security/arm-security/lib/models/mappers.ts b/sdk/security/arm-security/lib/models/mappers.ts new file mode 100644 index 000000000000..42c8fdf0a25f --- /dev/null +++ b/sdk/security/arm-security/lib/models/mappers.ts @@ -0,0 +1,2588 @@ +/* + * 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 { CloudErrorMapper, BaseResourceMapper } from "@azure/ms-rest-azure-js"; +import * as msRest from "@azure/ms-rest-js"; + +export const CloudError = CloudErrorMapper; +export const BaseResource = BaseResourceMapper; + +export const Resource: msRest.CompositeMapper = { + serializedName: "Resource", + type: { + name: "Composite", + className: "Resource", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const Pricing: msRest.CompositeMapper = { + serializedName: "Pricing", + type: { + name: "Composite", + className: "Pricing", + modelProperties: { + ...Resource.type.modelProperties, + pricingTier: { + required: true, + serializedName: "properties.pricingTier", + type: { + name: "String" + } + }, + freeTrialRemainingTime: { + readOnly: true, + serializedName: "properties.freeTrialRemainingTime", + type: { + name: "TimeSpan" + } + } + } + } +}; + +export const PricingList: msRest.CompositeMapper = { + serializedName: "PricingList", + type: { + name: "Composite", + className: "PricingList", + modelProperties: { + value: { + required: true, + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Pricing" + } + } + } + } + } + } +}; + +export const AscLocation: msRest.CompositeMapper = { + serializedName: "AscLocation", + type: { + name: "Composite", + className: "AscLocation", + modelProperties: { + ...Resource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Object" + } + } + } + } +}; + +export const AlertEntity: msRest.CompositeMapper = { + serializedName: "AlertEntity", + type: { + name: "Composite", + className: "AlertEntity", + modelProperties: { + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + } + }, + additionalProperties: { + type: { + name: "Object" + } + } + } +}; + +export const AlertConfidenceReason: msRest.CompositeMapper = { + serializedName: "AlertConfidenceReason", + type: { + name: "Composite", + className: "AlertConfidenceReason", + modelProperties: { + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + reason: { + readOnly: true, + serializedName: "reason", + type: { + name: "String" + } + } + } + } +}; + +export const Alert: msRest.CompositeMapper = { + serializedName: "Alert", + type: { + name: "Composite", + className: "Alert", + modelProperties: { + ...Resource.type.modelProperties, + state: { + readOnly: true, + serializedName: "properties.state", + type: { + name: "String" + } + }, + reportedTimeUtc: { + readOnly: true, + serializedName: "properties.reportedTimeUtc", + type: { + name: "DateTime" + } + }, + vendorName: { + readOnly: true, + serializedName: "properties.vendorName", + type: { + name: "String" + } + }, + alertName: { + readOnly: true, + serializedName: "properties.alertName", + type: { + name: "String" + } + }, + alertDisplayName: { + readOnly: true, + serializedName: "properties.alertDisplayName", + type: { + name: "String" + } + }, + detectedTimeUtc: { + readOnly: true, + serializedName: "properties.detectedTimeUtc", + type: { + name: "DateTime" + } + }, + description: { + readOnly: true, + serializedName: "properties.description", + type: { + name: "String" + } + }, + remediationSteps: { + readOnly: true, + serializedName: "properties.remediationSteps", + type: { + name: "String" + } + }, + actionTaken: { + readOnly: true, + serializedName: "properties.actionTaken", + type: { + name: "String" + } + }, + reportedSeverity: { + readOnly: true, + serializedName: "properties.reportedSeverity", + type: { + name: "String" + } + }, + compromisedEntity: { + readOnly: true, + serializedName: "properties.compromisedEntity", + type: { + name: "String" + } + }, + associatedResource: { + readOnly: true, + serializedName: "properties.associatedResource", + type: { + name: "String" + } + }, + extendedProperties: { + serializedName: "properties.extendedProperties", + type: { + name: "Dictionary", + value: { + type: { + name: "Object" + } + } + } + }, + systemSource: { + readOnly: true, + serializedName: "properties.systemSource", + type: { + name: "String" + } + }, + canBeInvestigated: { + readOnly: true, + serializedName: "properties.canBeInvestigated", + type: { + name: "Boolean" + } + }, + isIncident: { + readOnly: true, + serializedName: "properties.isIncident", + type: { + name: "Boolean" + } + }, + entities: { + serializedName: "properties.entities", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AlertEntity", + additionalProperties: { + type: { + name: "Object" + } + } + } + } + } + }, + confidenceScore: { + readOnly: true, + serializedName: "properties.confidenceScore", + constraints: { + InclusiveMaximum: 1, + InclusiveMinimum: 0 + }, + type: { + name: "Number" + } + }, + confidenceReasons: { + serializedName: "properties.confidenceReasons", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AlertConfidenceReason" + } + } + } + }, + subscriptionId: { + readOnly: true, + serializedName: "properties.subscriptionId", + type: { + name: "String" + } + }, + instanceId: { + readOnly: true, + serializedName: "properties.instanceId", + type: { + name: "String" + } + }, + workspaceArmId: { + readOnly: true, + serializedName: "properties.workspaceArmId", + type: { + name: "String" + } + }, + correlationKey: { + readOnly: true, + serializedName: "properties.correlationKey", + type: { + name: "String" + } + } + } + } +}; + +export const SettingResource: msRest.CompositeMapper = { + serializedName: "SettingResource", + type: { + name: "Composite", + className: "SettingResource", + modelProperties: { + ...Resource.type.modelProperties, + kind: { + required: true, + serializedName: "kind", + type: { + name: "String" + } + } + } + } +}; + +export const Setting: msRest.CompositeMapper = { + serializedName: "Setting", + type: { + name: "Composite", + className: "Setting", + modelProperties: { + ...SettingResource.type.modelProperties + } + } +}; + +export const DataExportSetting: msRest.CompositeMapper = { + serializedName: "DataExportSetting", + type: { + name: "Composite", + className: "DataExportSetting", + modelProperties: { + ...Setting.type.modelProperties, + enabled: { + required: true, + serializedName: "properties.enabled", + type: { + name: "Boolean" + } + } + } + } +}; + +export const ConnectedResource: msRest.CompositeMapper = { + serializedName: "ConnectedResource", + type: { + name: "Composite", + className: "ConnectedResource", + modelProperties: { + connectedResourceId: { + readOnly: true, + serializedName: "connectedResourceId", + type: { + name: "String" + } + }, + tcpPorts: { + readOnly: true, + serializedName: "tcpPorts", + type: { + name: "String" + } + }, + udpPorts: { + readOnly: true, + serializedName: "udpPorts", + type: { + name: "String" + } + } + } + } +}; + +export const ConnectableResource: msRest.CompositeMapper = { + serializedName: "ConnectableResource", + type: { + name: "Composite", + className: "ConnectableResource", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + inboundConnectedResources: { + readOnly: true, + serializedName: "inboundConnectedResources", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ConnectedResource" + } + } + } + }, + outboundConnectedResources: { + readOnly: true, + serializedName: "outboundConnectedResources", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ConnectedResource" + } + } + } + } + } + } +}; + +export const AllowedConnectionsResource: msRest.CompositeMapper = { + serializedName: "AllowedConnectionsResource", + type: { + name: "Composite", + className: "AllowedConnectionsResource", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + location: { + readOnly: true, + serializedName: "location", + type: { + name: "String" + } + }, + calculatedDateTime: { + readOnly: true, + serializedName: "properties.calculatedDateTime", + type: { + name: "DateTime" + } + }, + connectableResources: { + readOnly: true, + serializedName: "properties.connectableResources", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ConnectableResource" + } + } + } + } + } + } +}; + +export const Location: msRest.CompositeMapper = { + serializedName: "Location", + type: { + name: "Composite", + className: "Location", + modelProperties: { + location: { + readOnly: true, + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const DiscoveredSecuritySolution: msRest.CompositeMapper = { + serializedName: "DiscoveredSecuritySolution", + type: { + name: "Composite", + className: "DiscoveredSecuritySolution", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + location: { + readOnly: true, + serializedName: "location", + type: { + name: "String" + } + }, + securityFamily: { + required: true, + serializedName: "properties.securityFamily", + type: { + name: "String" + } + }, + offer: { + required: true, + serializedName: "properties.offer", + type: { + name: "String" + } + }, + publisher: { + required: true, + serializedName: "properties.publisher", + type: { + name: "String" + } + }, + sku: { + required: true, + serializedName: "properties.sku", + type: { + name: "String" + } + } + } + } +}; + +export const ExternalSecuritySolution: msRest.CompositeMapper = { + serializedName: "ExternalSecuritySolution", + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "kind", + clientName: "kind" + }, + uberParent: "ExternalSecuritySolution", + className: "ExternalSecuritySolution", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + location: { + readOnly: true, + serializedName: "location", + type: { + name: "String" + } + }, + kind: { + required: true, + serializedName: "kind", + type: { + name: "String" + } + } + } + } +}; + +export const ExternalSecuritySolutionProperties: msRest.CompositeMapper = { + serializedName: "ExternalSecuritySolutionProperties", + type: { + name: "Composite", + className: "ExternalSecuritySolutionProperties", + modelProperties: { + deviceVendor: { + serializedName: "deviceVendor", + type: { + name: "String" + } + }, + deviceType: { + serializedName: "deviceType", + type: { + name: "String" + } + }, + workspace: { + serializedName: "workspace", + type: { + name: "Composite", + className: "ConnectedWorkspace" + } + } + }, + additionalProperties: { + type: { + name: "Object" + } + } + } +}; + +export const CefSolutionProperties: msRest.CompositeMapper = { + serializedName: "CefSolutionProperties", + type: { + name: "Composite", + className: "CefSolutionProperties", + modelProperties: { + ...ExternalSecuritySolutionProperties.type.modelProperties, + hostname: { + serializedName: "hostname", + type: { + name: "String" + } + }, + agent: { + serializedName: "agent", + type: { + name: "String" + } + }, + lastEventReceived: { + serializedName: "lastEventReceived", + type: { + name: "String" + } + } + }, + additionalProperties: ExternalSecuritySolutionProperties.type.additionalProperties + } +}; + +export const CefExternalSecuritySolution: msRest.CompositeMapper = { + serializedName: "CEF", + type: { + name: "Composite", + polymorphicDiscriminator: ExternalSecuritySolution.type.polymorphicDiscriminator, + uberParent: "ExternalSecuritySolution", + className: "CefExternalSecuritySolution", + modelProperties: { + ...ExternalSecuritySolution.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "CefSolutionProperties", + additionalProperties: ExternalSecuritySolutionProperties.type.additionalProperties + } + } + } + } +}; + +export const AtaSolutionProperties: msRest.CompositeMapper = { + serializedName: "AtaSolutionProperties", + type: { + name: "Composite", + className: "AtaSolutionProperties", + modelProperties: { + ...ExternalSecuritySolutionProperties.type.modelProperties, + lastEventReceived: { + serializedName: "lastEventReceived", + type: { + name: "String" + } + } + }, + additionalProperties: ExternalSecuritySolutionProperties.type.additionalProperties + } +}; + +export const AtaExternalSecuritySolution: msRest.CompositeMapper = { + serializedName: "ATA", + type: { + name: "Composite", + polymorphicDiscriminator: ExternalSecuritySolution.type.polymorphicDiscriminator, + uberParent: "ExternalSecuritySolution", + className: "AtaExternalSecuritySolution", + modelProperties: { + ...ExternalSecuritySolution.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "AtaSolutionProperties", + additionalProperties: ExternalSecuritySolutionProperties.type.additionalProperties + } + } + } + } +}; + +export const ConnectedWorkspace: msRest.CompositeMapper = { + serializedName: "ConnectedWorkspace", + type: { + name: "Composite", + className: "ConnectedWorkspace", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + } + } + } +}; + +export const AadSolutionProperties: msRest.CompositeMapper = { + serializedName: "AadSolutionProperties", + type: { + name: "Composite", + className: "AadSolutionProperties", + modelProperties: { + deviceVendor: { + serializedName: "deviceVendor", + type: { + name: "String" + } + }, + deviceType: { + serializedName: "deviceType", + type: { + name: "String" + } + }, + workspace: { + serializedName: "workspace", + type: { + name: "Composite", + className: "ConnectedWorkspace" + } + }, + connectivityState: { + serializedName: "connectivityState", + type: { + name: "String" + } + } + } + } +}; + +export const AadExternalSecuritySolution: msRest.CompositeMapper = { + serializedName: "AAD", + type: { + name: "Composite", + polymorphicDiscriminator: ExternalSecuritySolution.type.polymorphicDiscriminator, + uberParent: "ExternalSecuritySolution", + className: "AadExternalSecuritySolution", + modelProperties: { + ...ExternalSecuritySolution.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "AadSolutionProperties" + } + } + } + } +}; + +export const ExternalSecuritySolutionKind1: msRest.CompositeMapper = { + serializedName: "ExternalSecuritySolutionKind", + type: { + name: "Composite", + className: "ExternalSecuritySolutionKind1", + modelProperties: { + kind: { + serializedName: "kind", + type: { + name: "String" + } + } + } + } +}; + +export const AadConnectivityState1: msRest.CompositeMapper = { + serializedName: "AadConnectivityState", + type: { + name: "Composite", + className: "AadConnectivityState1", + modelProperties: { + connectivityState: { + serializedName: "connectivityState", + type: { + name: "String" + } + } + } + } +}; + +export const JitNetworkAccessPortRule: msRest.CompositeMapper = { + serializedName: "JitNetworkAccessPortRule", + type: { + name: "Composite", + className: "JitNetworkAccessPortRule", + modelProperties: { + number: { + required: true, + serializedName: "number", + type: { + name: "Number" + } + }, + protocol: { + required: true, + serializedName: "protocol", + type: { + name: "String" + } + }, + allowedSourceAddressPrefix: { + serializedName: "allowedSourceAddressPrefix", + type: { + name: "String" + } + }, + allowedSourceAddressPrefixes: { + serializedName: "allowedSourceAddressPrefixes", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + maxRequestAccessDuration: { + required: true, + serializedName: "maxRequestAccessDuration", + type: { + name: "String" + } + } + } + } +}; + +export const JitNetworkAccessPolicyVirtualMachine: msRest.CompositeMapper = { + serializedName: "JitNetworkAccessPolicyVirtualMachine", + type: { + name: "Composite", + className: "JitNetworkAccessPolicyVirtualMachine", + modelProperties: { + id: { + required: true, + serializedName: "id", + type: { + name: "String" + } + }, + ports: { + required: true, + serializedName: "ports", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "JitNetworkAccessPortRule" + } + } + } + } + } + } +}; + +export const JitNetworkAccessRequestPort: msRest.CompositeMapper = { + serializedName: "JitNetworkAccessRequestPort", + type: { + name: "Composite", + className: "JitNetworkAccessRequestPort", + modelProperties: { + number: { + required: true, + serializedName: "number", + type: { + name: "Number" + } + }, + allowedSourceAddressPrefix: { + serializedName: "allowedSourceAddressPrefix", + type: { + name: "String" + } + }, + allowedSourceAddressPrefixes: { + serializedName: "allowedSourceAddressPrefixes", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + endTimeUtc: { + required: true, + serializedName: "endTimeUtc", + type: { + name: "DateTime" + } + }, + status: { + required: true, + serializedName: "status", + type: { + name: "String" + } + }, + statusReason: { + required: true, + serializedName: "statusReason", + type: { + name: "String" + } + } + } + } +}; + +export const JitNetworkAccessRequestVirtualMachine: msRest.CompositeMapper = { + serializedName: "JitNetworkAccessRequestVirtualMachine", + type: { + name: "Composite", + className: "JitNetworkAccessRequestVirtualMachine", + modelProperties: { + id: { + required: true, + serializedName: "id", + type: { + name: "String" + } + }, + ports: { + required: true, + serializedName: "ports", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "JitNetworkAccessRequestPort" + } + } + } + } + } + } +}; + +export const JitNetworkAccessRequest: msRest.CompositeMapper = { + serializedName: "JitNetworkAccessRequest", + type: { + name: "Composite", + className: "JitNetworkAccessRequest", + modelProperties: { + virtualMachines: { + required: true, + serializedName: "virtualMachines", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "JitNetworkAccessRequestVirtualMachine" + } + } + } + }, + startTimeUtc: { + required: true, + serializedName: "startTimeUtc", + type: { + name: "DateTime" + } + }, + requestor: { + required: true, + serializedName: "requestor", + type: { + name: "String" + } + } + } + } +}; + +export const JitNetworkAccessPolicy: msRest.CompositeMapper = { + serializedName: "JitNetworkAccessPolicy", + type: { + name: "Composite", + className: "JitNetworkAccessPolicy", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + kind: { + serializedName: "kind", + type: { + name: "String" + } + }, + location: { + readOnly: true, + serializedName: "location", + type: { + name: "String" + } + }, + virtualMachines: { + required: true, + serializedName: "properties.virtualMachines", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "JitNetworkAccessPolicyVirtualMachine" + } + } + } + }, + requests: { + serializedName: "properties.requests", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "JitNetworkAccessRequest" + } + } + } + }, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + } + } + } +}; + +export const JitNetworkAccessPolicyInitiatePort: msRest.CompositeMapper = { + serializedName: "JitNetworkAccessPolicyInitiatePort", + type: { + name: "Composite", + className: "JitNetworkAccessPolicyInitiatePort", + modelProperties: { + number: { + required: true, + serializedName: "number", + type: { + name: "Number" + } + }, + allowedSourceAddressPrefix: { + serializedName: "allowedSourceAddressPrefix", + type: { + name: "String" + } + }, + endTimeUtc: { + required: true, + serializedName: "endTimeUtc", + type: { + name: "DateTime" + } + } + } + } +}; + +export const JitNetworkAccessPolicyInitiateVirtualMachine: msRest.CompositeMapper = { + serializedName: "JitNetworkAccessPolicyInitiateVirtualMachine", + type: { + name: "Composite", + className: "JitNetworkAccessPolicyInitiateVirtualMachine", + modelProperties: { + id: { + required: true, + serializedName: "id", + type: { + name: "String" + } + }, + ports: { + required: true, + serializedName: "ports", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "JitNetworkAccessPolicyInitiatePort" + } + } + } + } + } + } +}; + +export const JitNetworkAccessPolicyInitiateRequest: msRest.CompositeMapper = { + serializedName: "JitNetworkAccessPolicyInitiateRequest", + type: { + name: "Composite", + className: "JitNetworkAccessPolicyInitiateRequest", + modelProperties: { + virtualMachines: { + required: true, + serializedName: "virtualMachines", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "JitNetworkAccessPolicyInitiateVirtualMachine" + } + } + } + } + } + } +}; + +export const Kind: msRest.CompositeMapper = { + serializedName: "Kind", + type: { + name: "Composite", + className: "Kind", + modelProperties: { + kind: { + serializedName: "kind", + type: { + name: "String" + } + } + } + } +}; + +export const OperationDisplay: msRest.CompositeMapper = { + serializedName: "OperationDisplay", + type: { + name: "Composite", + className: "OperationDisplay", + modelProperties: { + provider: { + readOnly: true, + serializedName: "provider", + type: { + name: "String" + } + }, + resource: { + readOnly: true, + serializedName: "resource", + type: { + name: "String" + } + }, + operation: { + readOnly: true, + serializedName: "operation", + type: { + name: "String" + } + }, + description: { + readOnly: true, + serializedName: "description", + type: { + name: "String" + } + } + } + } +}; + +export const Operation: msRest.CompositeMapper = { + serializedName: "Operation", + type: { + name: "Composite", + className: "Operation", + modelProperties: { + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + origin: { + readOnly: true, + serializedName: "origin", + type: { + name: "String" + } + }, + display: { + serializedName: "display", + type: { + name: "Composite", + className: "OperationDisplay" + } + } + } + } +}; + +export const SecurityTaskParameters: msRest.CompositeMapper = { + serializedName: "SecurityTaskParameters", + type: { + name: "Composite", + className: "SecurityTaskParameters", + modelProperties: { + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + } + }, + additionalProperties: { + type: { + name: "Object" + } + } + } +}; + +export const SecurityTask: msRest.CompositeMapper = { + serializedName: "SecurityTask", + type: { + name: "Composite", + className: "SecurityTask", + modelProperties: { + ...Resource.type.modelProperties, + state: { + readOnly: true, + serializedName: "properties.state", + type: { + name: "String" + } + }, + creationTimeUtc: { + readOnly: true, + serializedName: "properties.creationTimeUtc", + type: { + name: "DateTime" + } + }, + securityTaskParameters: { + serializedName: "properties.securityTaskParameters", + type: { + name: "Composite", + className: "SecurityTaskParameters", + additionalProperties: { + type: { + name: "Object" + } + } + } + }, + lastStateChangeTimeUtc: { + readOnly: true, + serializedName: "properties.lastStateChangeTimeUtc", + type: { + name: "DateTime" + } + }, + subState: { + readOnly: true, + serializedName: "properties.subState", + type: { + name: "String" + } + } + } + } +}; + +export const TopologySingleResourceParent: msRest.CompositeMapper = { + serializedName: "TopologySingleResourceParent", + type: { + name: "Composite", + className: "TopologySingleResourceParent", + modelProperties: { + resourceId: { + readOnly: true, + serializedName: "resourceId", + type: { + name: "String" + } + } + } + } +}; + +export const TopologySingleResourceChild: msRest.CompositeMapper = { + serializedName: "TopologySingleResourceChild", + type: { + name: "Composite", + className: "TopologySingleResourceChild", + modelProperties: { + resourceId: { + readOnly: true, + serializedName: "resourceId", + type: { + name: "String" + } + } + } + } +}; + +export const TopologySingleResource: msRest.CompositeMapper = { + serializedName: "TopologySingleResource", + type: { + name: "Composite", + className: "TopologySingleResource", + modelProperties: { + resourceId: { + readOnly: true, + serializedName: "resourceId", + type: { + name: "String" + } + }, + severity: { + readOnly: true, + serializedName: "severity", + type: { + name: "String" + } + }, + recommendationsExist: { + readOnly: true, + serializedName: "recommendationsExist", + type: { + name: "Boolean" + } + }, + networkZones: { + readOnly: true, + serializedName: "networkZones", + type: { + name: "String" + } + }, + topologyScore: { + readOnly: true, + serializedName: "topologyScore", + type: { + name: "Number" + } + }, + location: { + readOnly: true, + serializedName: "location", + type: { + name: "String" + } + }, + parents: { + readOnly: true, + serializedName: "parents", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TopologySingleResourceParent" + } + } + } + }, + children: { + readOnly: true, + serializedName: "children", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TopologySingleResourceChild" + } + } + } + } + } + } +}; + +export const TopologyResource: msRest.CompositeMapper = { + serializedName: "TopologyResource", + type: { + name: "Composite", + className: "TopologyResource", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + location: { + readOnly: true, + serializedName: "location", + type: { + name: "String" + } + }, + calculatedDateTime: { + readOnly: true, + serializedName: "properties.calculatedDateTime", + type: { + name: "DateTime" + } + }, + topologyResources: { + readOnly: true, + serializedName: "properties.topologyResources", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TopologySingleResource" + } + } + } + } + } + } +}; + +export const AdvancedThreatProtectionSetting: msRest.CompositeMapper = { + serializedName: "AdvancedThreatProtectionSetting", + type: { + name: "Composite", + className: "AdvancedThreatProtectionSetting", + modelProperties: { + ...Resource.type.modelProperties, + isEnabled: { + serializedName: "properties.isEnabled", + type: { + name: "Boolean" + } + } + } + } +}; + +export const AutoProvisioningSetting: msRest.CompositeMapper = { + serializedName: "AutoProvisioningSetting", + type: { + name: "Composite", + className: "AutoProvisioningSetting", + modelProperties: { + ...Resource.type.modelProperties, + autoProvision: { + required: true, + serializedName: "properties.autoProvision", + type: { + name: "String" + } + } + } + } +}; + +export const ComplianceSegment: msRest.CompositeMapper = { + serializedName: "ComplianceSegment", + type: { + name: "Composite", + className: "ComplianceSegment", + modelProperties: { + segmentType: { + readOnly: true, + serializedName: "segmentType", + type: { + name: "String" + } + }, + percentage: { + readOnly: true, + serializedName: "percentage", + type: { + name: "Number" + } + } + } + } +}; + +export const Compliance: msRest.CompositeMapper = { + serializedName: "Compliance", + type: { + name: "Composite", + className: "Compliance", + modelProperties: { + ...Resource.type.modelProperties, + assessmentTimestampUtcDate: { + readOnly: true, + serializedName: "properties.assessmentTimestampUtcDate", + type: { + name: "DateTime" + } + }, + resourceCount: { + readOnly: true, + serializedName: "properties.resourceCount", + type: { + name: "Number" + } + }, + assessmentResult: { + readOnly: true, + serializedName: "properties.assessmentResult", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ComplianceSegment" + } + } + } + } + } + } +}; + +export const SensitivityLabel: msRest.CompositeMapper = { + serializedName: "SensitivityLabel", + type: { + name: "Composite", + className: "SensitivityLabel", + modelProperties: { + displayName: { + serializedName: "displayName", + type: { + name: "String" + } + }, + order: { + serializedName: "order", + type: { + name: "Number" + } + }, + enabled: { + serializedName: "enabled", + type: { + name: "Boolean" + } + } + } + } +}; + +export const InformationProtectionKeyword: msRest.CompositeMapper = { + serializedName: "InformationProtectionKeyword", + type: { + name: "Composite", + className: "InformationProtectionKeyword", + modelProperties: { + pattern: { + serializedName: "pattern", + type: { + name: "String" + } + }, + custom: { + serializedName: "custom", + type: { + name: "Boolean" + } + }, + canBeNumeric: { + serializedName: "canBeNumeric", + type: { + name: "Boolean" + } + }, + excluded: { + serializedName: "excluded", + type: { + name: "Boolean" + } + } + } + } +}; + +export const InformationType: msRest.CompositeMapper = { + serializedName: "InformationType", + type: { + name: "Composite", + className: "InformationType", + modelProperties: { + displayName: { + serializedName: "displayName", + type: { + name: "String" + } + }, + order: { + serializedName: "order", + type: { + name: "Number" + } + }, + recommendedLabelId: { + serializedName: "recommendedLabelId", + type: { + name: "Uuid" + } + }, + enabled: { + serializedName: "enabled", + type: { + name: "Boolean" + } + }, + custom: { + serializedName: "custom", + type: { + name: "Boolean" + } + }, + keywords: { + serializedName: "keywords", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "InformationProtectionKeyword" + } + } + } + } + } + } +}; + +export const InformationProtectionPolicy: msRest.CompositeMapper = { + serializedName: "InformationProtectionPolicy", + type: { + name: "Composite", + className: "InformationProtectionPolicy", + modelProperties: { + ...Resource.type.modelProperties, + lastModifiedUtc: { + readOnly: true, + serializedName: "properties.lastModifiedUtc", + type: { + name: "DateTime" + } + }, + labels: { + serializedName: "properties.labels", + type: { + name: "Dictionary", + value: { + type: { + name: "Composite", + className: "SensitivityLabel" + } + } + } + }, + informationTypes: { + serializedName: "properties.informationTypes", + type: { + name: "Dictionary", + value: { + type: { + name: "Composite", + className: "InformationType" + } + } + } + } + } + } +}; + +export const SecurityContact: msRest.CompositeMapper = { + serializedName: "SecurityContact", + type: { + name: "Composite", + className: "SecurityContact", + modelProperties: { + ...Resource.type.modelProperties, + email: { + required: true, + serializedName: "properties.email", + type: { + name: "String" + } + }, + phone: { + serializedName: "properties.phone", + type: { + name: "String" + } + }, + alertNotifications: { + required: true, + serializedName: "properties.alertNotifications", + type: { + name: "String" + } + }, + alertsToAdmins: { + required: true, + serializedName: "properties.alertsToAdmins", + type: { + name: "String" + } + } + } + } +}; + +export const WorkspaceSetting: msRest.CompositeMapper = { + serializedName: "WorkspaceSetting", + type: { + name: "Composite", + className: "WorkspaceSetting", + modelProperties: { + ...Resource.type.modelProperties, + workspaceId: { + required: true, + serializedName: "properties.workspaceId", + type: { + name: "String" + } + }, + scope: { + required: true, + serializedName: "properties.scope", + type: { + name: "String" + } + } + } + } +}; + +export const RegulatoryComplianceStandard: msRest.CompositeMapper = { + serializedName: "RegulatoryComplianceStandard", + type: { + name: "Composite", + className: "RegulatoryComplianceStandard", + modelProperties: { + ...Resource.type.modelProperties, + state: { + serializedName: "properties.state", + type: { + name: "String" + } + }, + passedControls: { + readOnly: true, + serializedName: "properties.passedControls", + type: { + name: "Number" + } + }, + failedControls: { + readOnly: true, + serializedName: "properties.failedControls", + type: { + name: "Number" + } + }, + skippedControls: { + readOnly: true, + serializedName: "properties.skippedControls", + type: { + name: "Number" + } + }, + unsupportedControls: { + readOnly: true, + serializedName: "properties.unsupportedControls", + type: { + name: "Number" + } + } + } + } +}; + +export const RegulatoryComplianceControl: msRest.CompositeMapper = { + serializedName: "RegulatoryComplianceControl", + type: { + name: "Composite", + className: "RegulatoryComplianceControl", + modelProperties: { + ...Resource.type.modelProperties, + description: { + readOnly: true, + serializedName: "properties.description", + type: { + name: "String" + } + }, + state: { + serializedName: "properties.state", + type: { + name: "String" + } + }, + passedAssessments: { + readOnly: true, + serializedName: "properties.passedAssessments", + type: { + name: "Number" + } + }, + failedAssessments: { + readOnly: true, + serializedName: "properties.failedAssessments", + type: { + name: "Number" + } + }, + skippedAssessments: { + readOnly: true, + serializedName: "properties.skippedAssessments", + type: { + name: "Number" + } + } + } + } +}; + +export const RegulatoryComplianceAssessment: msRest.CompositeMapper = { + serializedName: "RegulatoryComplianceAssessment", + type: { + name: "Composite", + className: "RegulatoryComplianceAssessment", + modelProperties: { + ...Resource.type.modelProperties, + description: { + readOnly: true, + serializedName: "properties.description", + type: { + name: "String" + } + }, + assessmentType: { + readOnly: true, + serializedName: "properties.assessmentType", + type: { + name: "String" + } + }, + assessmentDetailsLink: { + readOnly: true, + serializedName: "properties.assessmentDetailsLink", + type: { + name: "String" + } + }, + state: { + serializedName: "properties.state", + type: { + name: "String" + } + }, + passedResources: { + readOnly: true, + serializedName: "properties.passedResources", + type: { + name: "Number" + } + }, + failedResources: { + readOnly: true, + serializedName: "properties.failedResources", + type: { + name: "Number" + } + }, + skippedResources: { + readOnly: true, + serializedName: "properties.skippedResources", + type: { + name: "Number" + } + }, + unsupportedResources: { + readOnly: true, + serializedName: "properties.unsupportedResources", + type: { + name: "Number" + } + } + } + } +}; + +export const AlertList: msRest.CompositeMapper = { + serializedName: "AlertList", + type: { + name: "Composite", + className: "AlertList", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Alert" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const SettingsList: msRest.CompositeMapper = { + serializedName: "SettingsList", + type: { + name: "Composite", + className: "SettingsList", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Setting" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const AllowedConnectionsList: msRest.CompositeMapper = { + serializedName: "AllowedConnectionsList", + type: { + name: "Composite", + className: "AllowedConnectionsList", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AllowedConnectionsResource" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const DiscoveredSecuritySolutionList: msRest.CompositeMapper = { + serializedName: "DiscoveredSecuritySolutionList", + type: { + name: "Composite", + className: "DiscoveredSecuritySolutionList", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DiscoveredSecuritySolution" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const ExternalSecuritySolutionList: msRest.CompositeMapper = { + serializedName: "ExternalSecuritySolutionList", + type: { + name: "Composite", + className: "ExternalSecuritySolutionList", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ExternalSecuritySolution" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const JitNetworkAccessPoliciesList: msRest.CompositeMapper = { + serializedName: "JitNetworkAccessPoliciesList", + type: { + name: "Composite", + className: "JitNetworkAccessPoliciesList", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "JitNetworkAccessPolicy" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const AscLocationList: msRest.CompositeMapper = { + serializedName: "AscLocationList", + type: { + name: "Composite", + className: "AscLocationList", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AscLocation" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const OperationList: msRest.CompositeMapper = { + serializedName: "OperationList", + type: { + name: "Composite", + className: "OperationList", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Operation" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const SecurityTaskList: msRest.CompositeMapper = { + serializedName: "SecurityTaskList", + type: { + name: "Composite", + className: "SecurityTaskList", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SecurityTask" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const TopologyList: msRest.CompositeMapper = { + serializedName: "TopologyList", + type: { + name: "Composite", + className: "TopologyList", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TopologyResource" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const AutoProvisioningSettingList: msRest.CompositeMapper = { + serializedName: "AutoProvisioningSettingList", + type: { + name: "Composite", + className: "AutoProvisioningSettingList", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AutoProvisioningSetting" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const ComplianceList: msRest.CompositeMapper = { + serializedName: "ComplianceList", + type: { + name: "Composite", + className: "ComplianceList", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Compliance" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const InformationProtectionPolicyList: msRest.CompositeMapper = { + serializedName: "InformationProtectionPolicyList", + type: { + name: "Composite", + className: "InformationProtectionPolicyList", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "InformationProtectionPolicy" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const SecurityContactList: msRest.CompositeMapper = { + serializedName: "SecurityContactList", + type: { + name: "Composite", + className: "SecurityContactList", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SecurityContact" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const WorkspaceSettingList: msRest.CompositeMapper = { + serializedName: "WorkspaceSettingList", + type: { + name: "Composite", + className: "WorkspaceSettingList", + modelProperties: { + value: { + required: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "WorkspaceSetting" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const RegulatoryComplianceStandardList: msRest.CompositeMapper = { + serializedName: "RegulatoryComplianceStandardList", + type: { + name: "Composite", + className: "RegulatoryComplianceStandardList", + modelProperties: { + value: { + required: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RegulatoryComplianceStandard" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const RegulatoryComplianceControlList: msRest.CompositeMapper = { + serializedName: "RegulatoryComplianceControlList", + type: { + name: "Composite", + className: "RegulatoryComplianceControlList", + modelProperties: { + value: { + required: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RegulatoryComplianceControl" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const RegulatoryComplianceAssessmentList: msRest.CompositeMapper = { + serializedName: "RegulatoryComplianceAssessmentList", + type: { + name: "Composite", + className: "RegulatoryComplianceAssessmentList", + modelProperties: { + value: { + required: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RegulatoryComplianceAssessment" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const discriminators = { + 'ExternalSecuritySolution' : ExternalSecuritySolution, + 'ExternalSecuritySolution.CEF' : CefExternalSecuritySolution, + 'ExternalSecuritySolution.ATA' : AtaExternalSecuritySolution, + 'ExternalSecuritySolution.AAD' : AadExternalSecuritySolution +}; diff --git a/sdk/security/arm-security/lib/models/operationsMappers.ts b/sdk/security/arm-security/lib/models/operationsMappers.ts new file mode 100644 index 000000000000..f2e907d82125 --- /dev/null +++ b/sdk/security/arm-security/lib/models/operationsMappers.ts @@ -0,0 +1,18 @@ +/* + * 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. + */ + +export { + discriminators, + OperationList, + Operation, + OperationDisplay, + CloudError +} from "../models/mappers"; + diff --git a/sdk/security/arm-security/lib/models/parameters.ts b/sdk/security/arm-security/lib/models/parameters.ts new file mode 100644 index 000000000000..23a28cc6f03e --- /dev/null +++ b/sdk/security/arm-security/lib/models/parameters.ts @@ -0,0 +1,391 @@ +/* + * 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"; + +export const acceptLanguage: msRest.OperationParameter = { + parameterPath: "acceptLanguage", + mapper: { + serializedName: "accept-language", + defaultValue: 'en-US', + type: { + name: "String" + } + } +}; +export const alertName: msRest.OperationURLParameter = { + parameterPath: "alertName", + mapper: { + required: true, + serializedName: "alertName", + type: { + name: "String" + } + } +}; +export const alertUpdateActionType: msRest.OperationURLParameter = { + parameterPath: "alertUpdateActionType", + mapper: { + required: true, + serializedName: "alertUpdateActionType", + type: { + name: "String" + } + } +}; +export const apiVersion0: msRest.OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + required: true, + isConstant: true, + serializedName: "api-version", + defaultValue: '2018-06-01', + type: { + name: "String" + } + } +}; +export const apiVersion1: msRest.OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + required: true, + isConstant: true, + serializedName: "api-version", + defaultValue: '2019-01-01', + type: { + name: "String" + } + } +}; +export const apiVersion2: msRest.OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + required: true, + isConstant: true, + serializedName: "api-version", + defaultValue: '2015-06-01-preview', + type: { + name: "String" + } + } +}; +export const apiVersion3: msRest.OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + required: true, + isConstant: true, + serializedName: "api-version", + defaultValue: '2017-08-01-preview', + type: { + name: "String" + } + } +}; +export const apiVersion4: msRest.OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + required: true, + isConstant: true, + serializedName: "api-version", + defaultValue: '2019-01-01-preview', + type: { + name: "String" + } + } +}; +export const ascLocation: msRest.OperationURLParameter = { + parameterPath: "ascLocation", + mapper: { + required: true, + serializedName: "ascLocation", + type: { + name: "String" + } + } +}; +export const complianceName: msRest.OperationURLParameter = { + parameterPath: "complianceName", + mapper: { + required: true, + serializedName: "complianceName", + type: { + name: "String" + } + } +}; +export const connectionType: msRest.OperationURLParameter = { + parameterPath: "connectionType", + mapper: { + required: true, + serializedName: "connectionType", + type: { + name: "String" + } + } +}; +export const discoveredSecuritySolutionName: msRest.OperationURLParameter = { + parameterPath: "discoveredSecuritySolutionName", + mapper: { + required: true, + serializedName: "discoveredSecuritySolutionName", + type: { + name: "String" + } + } +}; +export const expand: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "expand" + ], + mapper: { + serializedName: "$expand", + type: { + name: "String" + } + } +}; +export const externalSecuritySolutionsName: msRest.OperationURLParameter = { + parameterPath: "externalSecuritySolutionsName", + mapper: { + required: true, + serializedName: "externalSecuritySolutionsName", + type: { + name: "String" + } + } +}; +export const filter: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "filter" + ], + mapper: { + serializedName: "$filter", + type: { + name: "String" + } + } +}; +export const informationProtectionPolicyName: msRest.OperationURLParameter = { + parameterPath: "informationProtectionPolicyName", + mapper: { + required: true, + serializedName: "informationProtectionPolicyName", + type: { + name: "String" + } + } +}; +export const jitNetworkAccessPolicyInitiateType: msRest.OperationURLParameter = { + parameterPath: "jitNetworkAccessPolicyInitiateType", + mapper: { + required: true, + isConstant: true, + serializedName: "jitNetworkAccessPolicyInitiateType", + defaultValue: 'initiate', + type: { + name: "String" + } + } +}; +export const jitNetworkAccessPolicyName: msRest.OperationURLParameter = { + parameterPath: "jitNetworkAccessPolicyName", + mapper: { + required: true, + serializedName: "jitNetworkAccessPolicyName", + type: { + name: "String" + } + } +}; +export const nextPageLink: msRest.OperationURLParameter = { + parameterPath: "nextPageLink", + mapper: { + required: true, + serializedName: "nextLink", + type: { + name: "String" + } + }, + skipEncoding: true +}; +export const pricingName: msRest.OperationURLParameter = { + parameterPath: "pricingName", + mapper: { + required: true, + serializedName: "pricingName", + type: { + name: "String" + } + } +}; +export const regulatoryComplianceAssessmentName: msRest.OperationURLParameter = { + parameterPath: "regulatoryComplianceAssessmentName", + mapper: { + required: true, + serializedName: "regulatoryComplianceAssessmentName", + type: { + name: "String" + } + } +}; +export const regulatoryComplianceControlName: msRest.OperationURLParameter = { + parameterPath: "regulatoryComplianceControlName", + mapper: { + required: true, + serializedName: "regulatoryComplianceControlName", + type: { + name: "String" + } + } +}; +export const regulatoryComplianceStandardName: msRest.OperationURLParameter = { + parameterPath: "regulatoryComplianceStandardName", + mapper: { + required: true, + serializedName: "regulatoryComplianceStandardName", + type: { + name: "String" + } + } +}; +export const resourceGroupName: msRest.OperationURLParameter = { + parameterPath: "resourceGroupName", + mapper: { + required: true, + serializedName: "resourceGroupName", + constraints: { + MaxLength: 90, + MinLength: 1, + Pattern: /^[-\w\._\(\)]+$/ + }, + type: { + name: "String" + } + } +}; +export const resourceId: msRest.OperationURLParameter = { + parameterPath: "resourceId", + mapper: { + required: true, + serializedName: "resourceId", + type: { + name: "String" + } + } +}; +export const scope: msRest.OperationURLParameter = { + parameterPath: "scope", + mapper: { + required: true, + serializedName: "scope", + type: { + name: "String" + } + } +}; +export const securityContactName: msRest.OperationURLParameter = { + parameterPath: "securityContactName", + mapper: { + required: true, + serializedName: "securityContactName", + type: { + name: "String" + } + } +}; +export const select: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "select" + ], + mapper: { + serializedName: "$select", + type: { + name: "String" + } + } +}; +export const settingName0: msRest.OperationURLParameter = { + parameterPath: "settingName", + mapper: { + required: true, + serializedName: "settingName", + type: { + name: "String" + } + } +}; +export const settingName1: msRest.OperationURLParameter = { + parameterPath: "settingName", + mapper: { + required: true, + isConstant: true, + serializedName: "settingName", + defaultValue: 'current', + type: { + name: "String" + } + } +}; +export const subscriptionId: msRest.OperationURLParameter = { + parameterPath: "subscriptionId", + mapper: { + required: true, + serializedName: "subscriptionId", + constraints: { + Pattern: /^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$/ + }, + type: { + name: "String" + } + } +}; +export const taskName: msRest.OperationURLParameter = { + parameterPath: "taskName", + mapper: { + required: true, + serializedName: "taskName", + type: { + name: "String" + } + } +}; +export const taskUpdateActionType: msRest.OperationURLParameter = { + parameterPath: "taskUpdateActionType", + mapper: { + required: true, + serializedName: "taskUpdateActionType", + type: { + name: "String" + } + } +}; +export const topologyResourceName: msRest.OperationURLParameter = { + parameterPath: "topologyResourceName", + mapper: { + required: true, + serializedName: "topologyResourceName", + type: { + name: "String" + } + } +}; +export const workspaceSettingName: msRest.OperationURLParameter = { + parameterPath: "workspaceSettingName", + mapper: { + required: true, + serializedName: "workspaceSettingName", + type: { + name: "String" + } + } +}; diff --git a/sdk/security/arm-security/lib/models/pricingsMappers.ts b/sdk/security/arm-security/lib/models/pricingsMappers.ts new file mode 100644 index 000000000000..d3de34097ea0 --- /dev/null +++ b/sdk/security/arm-security/lib/models/pricingsMappers.ts @@ -0,0 +1,41 @@ +/* + * 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. + */ + +export { + discriminators, + PricingList, + Pricing, + Resource, + BaseResource, + CloudError, + AscLocation, + Alert, + AlertEntity, + AlertConfidenceReason, + SettingResource, + SecurityTask, + SecurityTaskParameters, + AdvancedThreatProtectionSetting, + AutoProvisioningSetting, + Compliance, + ComplianceSegment, + InformationProtectionPolicy, + SensitivityLabel, + InformationType, + InformationProtectionKeyword, + SecurityContact, + WorkspaceSetting, + RegulatoryComplianceStandard, + RegulatoryComplianceControl, + RegulatoryComplianceAssessment, + Setting, + DataExportSetting +} from "../models/mappers"; + diff --git a/sdk/security/arm-security/lib/models/regulatoryComplianceAssessmentsMappers.ts b/sdk/security/arm-security/lib/models/regulatoryComplianceAssessmentsMappers.ts new file mode 100644 index 000000000000..de1c3585fe14 --- /dev/null +++ b/sdk/security/arm-security/lib/models/regulatoryComplianceAssessmentsMappers.ts @@ -0,0 +1,41 @@ +/* + * 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. + */ + +export { + discriminators, + RegulatoryComplianceAssessmentList, + RegulatoryComplianceAssessment, + Resource, + BaseResource, + CloudError, + Pricing, + AscLocation, + Alert, + AlertEntity, + AlertConfidenceReason, + SettingResource, + SecurityTask, + SecurityTaskParameters, + AdvancedThreatProtectionSetting, + AutoProvisioningSetting, + Compliance, + ComplianceSegment, + InformationProtectionPolicy, + SensitivityLabel, + InformationType, + InformationProtectionKeyword, + SecurityContact, + WorkspaceSetting, + RegulatoryComplianceStandard, + RegulatoryComplianceControl, + Setting, + DataExportSetting +} from "../models/mappers"; + diff --git a/sdk/security/arm-security/lib/models/regulatoryComplianceControlsMappers.ts b/sdk/security/arm-security/lib/models/regulatoryComplianceControlsMappers.ts new file mode 100644 index 000000000000..99424e17bdc5 --- /dev/null +++ b/sdk/security/arm-security/lib/models/regulatoryComplianceControlsMappers.ts @@ -0,0 +1,41 @@ +/* + * 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. + */ + +export { + discriminators, + RegulatoryComplianceControlList, + RegulatoryComplianceControl, + Resource, + BaseResource, + CloudError, + Pricing, + AscLocation, + Alert, + AlertEntity, + AlertConfidenceReason, + SettingResource, + SecurityTask, + SecurityTaskParameters, + AdvancedThreatProtectionSetting, + AutoProvisioningSetting, + Compliance, + ComplianceSegment, + InformationProtectionPolicy, + SensitivityLabel, + InformationType, + InformationProtectionKeyword, + SecurityContact, + WorkspaceSetting, + RegulatoryComplianceStandard, + RegulatoryComplianceAssessment, + Setting, + DataExportSetting +} from "../models/mappers"; + diff --git a/sdk/security/arm-security/lib/models/regulatoryComplianceStandardsMappers.ts b/sdk/security/arm-security/lib/models/regulatoryComplianceStandardsMappers.ts new file mode 100644 index 000000000000..b0776f5a60d1 --- /dev/null +++ b/sdk/security/arm-security/lib/models/regulatoryComplianceStandardsMappers.ts @@ -0,0 +1,41 @@ +/* + * 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. + */ + +export { + discriminators, + RegulatoryComplianceStandardList, + RegulatoryComplianceStandard, + Resource, + BaseResource, + CloudError, + Pricing, + AscLocation, + Alert, + AlertEntity, + AlertConfidenceReason, + SettingResource, + SecurityTask, + SecurityTaskParameters, + AdvancedThreatProtectionSetting, + AutoProvisioningSetting, + Compliance, + ComplianceSegment, + InformationProtectionPolicy, + SensitivityLabel, + InformationType, + InformationProtectionKeyword, + SecurityContact, + WorkspaceSetting, + RegulatoryComplianceControl, + RegulatoryComplianceAssessment, + Setting, + DataExportSetting +} from "../models/mappers"; + diff --git a/sdk/security/arm-security/lib/models/securityContactsMappers.ts b/sdk/security/arm-security/lib/models/securityContactsMappers.ts new file mode 100644 index 000000000000..4a98ced26f42 --- /dev/null +++ b/sdk/security/arm-security/lib/models/securityContactsMappers.ts @@ -0,0 +1,41 @@ +/* + * 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. + */ + +export { + discriminators, + SecurityContactList, + SecurityContact, + Resource, + BaseResource, + CloudError, + Pricing, + AscLocation, + Alert, + AlertEntity, + AlertConfidenceReason, + SettingResource, + SecurityTask, + SecurityTaskParameters, + AdvancedThreatProtectionSetting, + AutoProvisioningSetting, + Compliance, + ComplianceSegment, + InformationProtectionPolicy, + SensitivityLabel, + InformationType, + InformationProtectionKeyword, + WorkspaceSetting, + RegulatoryComplianceStandard, + RegulatoryComplianceControl, + RegulatoryComplianceAssessment, + Setting, + DataExportSetting +} from "../models/mappers"; + diff --git a/sdk/security/arm-security/lib/models/settingsMappers.ts b/sdk/security/arm-security/lib/models/settingsMappers.ts new file mode 100644 index 000000000000..9694f37752d5 --- /dev/null +++ b/sdk/security/arm-security/lib/models/settingsMappers.ts @@ -0,0 +1,41 @@ +/* + * 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. + */ + +export { + discriminators, + SettingsList, + Setting, + SettingResource, + Resource, + BaseResource, + CloudError, + Pricing, + AscLocation, + Alert, + AlertEntity, + AlertConfidenceReason, + DataExportSetting, + SecurityTask, + SecurityTaskParameters, + AdvancedThreatProtectionSetting, + AutoProvisioningSetting, + Compliance, + ComplianceSegment, + InformationProtectionPolicy, + SensitivityLabel, + InformationType, + InformationProtectionKeyword, + SecurityContact, + WorkspaceSetting, + RegulatoryComplianceStandard, + RegulatoryComplianceControl, + RegulatoryComplianceAssessment +} from "../models/mappers"; + diff --git a/sdk/security/arm-security/lib/models/tasksMappers.ts b/sdk/security/arm-security/lib/models/tasksMappers.ts new file mode 100644 index 000000000000..3b3ee4834d42 --- /dev/null +++ b/sdk/security/arm-security/lib/models/tasksMappers.ts @@ -0,0 +1,41 @@ +/* + * 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. + */ + +export { + discriminators, + SecurityTaskList, + SecurityTask, + Resource, + BaseResource, + SecurityTaskParameters, + CloudError, + Pricing, + AscLocation, + Alert, + AlertEntity, + AlertConfidenceReason, + SettingResource, + AdvancedThreatProtectionSetting, + AutoProvisioningSetting, + Compliance, + ComplianceSegment, + InformationProtectionPolicy, + SensitivityLabel, + InformationType, + InformationProtectionKeyword, + SecurityContact, + WorkspaceSetting, + RegulatoryComplianceStandard, + RegulatoryComplianceControl, + RegulatoryComplianceAssessment, + Setting, + DataExportSetting +} from "../models/mappers"; + diff --git a/sdk/security/arm-security/lib/models/topologyMappers.ts b/sdk/security/arm-security/lib/models/topologyMappers.ts new file mode 100644 index 000000000000..2f721b7b6c8b --- /dev/null +++ b/sdk/security/arm-security/lib/models/topologyMappers.ts @@ -0,0 +1,20 @@ +/* + * 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. + */ + +export { + discriminators, + TopologyList, + TopologyResource, + TopologySingleResource, + TopologySingleResourceParent, + TopologySingleResourceChild, + CloudError +} from "../models/mappers"; + diff --git a/sdk/security/arm-security/lib/models/workspaceSettingsMappers.ts b/sdk/security/arm-security/lib/models/workspaceSettingsMappers.ts new file mode 100644 index 000000000000..8fca344f4d07 --- /dev/null +++ b/sdk/security/arm-security/lib/models/workspaceSettingsMappers.ts @@ -0,0 +1,41 @@ +/* + * 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. + */ + +export { + discriminators, + WorkspaceSettingList, + WorkspaceSetting, + Resource, + BaseResource, + CloudError, + Pricing, + AscLocation, + Alert, + AlertEntity, + AlertConfidenceReason, + SettingResource, + SecurityTask, + SecurityTaskParameters, + AdvancedThreatProtectionSetting, + AutoProvisioningSetting, + Compliance, + ComplianceSegment, + InformationProtectionPolicy, + SensitivityLabel, + InformationType, + InformationProtectionKeyword, + SecurityContact, + RegulatoryComplianceStandard, + RegulatoryComplianceControl, + RegulatoryComplianceAssessment, + Setting, + DataExportSetting +} from "../models/mappers"; + diff --git a/sdk/security/arm-security/lib/operations/advancedThreatProtection.ts b/sdk/security/arm-security/lib/operations/advancedThreatProtection.ts new file mode 100644 index 000000000000..34247324cc15 --- /dev/null +++ b/sdk/security/arm-security/lib/operations/advancedThreatProtection.ts @@ -0,0 +1,145 @@ +/* + * 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/advancedThreatProtectionMappers"; +import * as Parameters from "../models/parameters"; +import { SecurityCenterContext } from "../securityCenterContext"; + +/** Class representing a AdvancedThreatProtection. */ +export class AdvancedThreatProtection { + private readonly client: SecurityCenterContext; + + /** + * Create a AdvancedThreatProtection. + * @param {SecurityCenterContext} client Reference to the service client. + */ + constructor(client: SecurityCenterContext) { + this.client = client; + } + + /** + * Gets the Advanced Threat Protection settings for the specified resource. + * @param resourceId The identifier of the resource. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceId The identifier of the resource. + * @param callback The callback + */ + get(resourceId: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceId The identifier of the resource. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceId, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates the Advanced Threat Protection settings on a specified resource. + * @param resourceId The identifier of the resource. + * @param advancedThreatProtectionSetting Advanced Threat Protection Settings + * @param [options] The optional parameters + * @returns Promise + */ + create(resourceId: string, advancedThreatProtectionSetting: Models.AdvancedThreatProtectionSetting, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceId The identifier of the resource. + * @param advancedThreatProtectionSetting Advanced Threat Protection Settings + * @param callback The callback + */ + create(resourceId: string, advancedThreatProtectionSetting: Models.AdvancedThreatProtectionSetting, callback: msRest.ServiceCallback): void; + /** + * @param resourceId The identifier of the resource. + * @param advancedThreatProtectionSetting Advanced Threat Protection Settings + * @param options The optional parameters + * @param callback The callback + */ + create(resourceId: string, advancedThreatProtectionSetting: Models.AdvancedThreatProtectionSetting, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + create(resourceId: string, advancedThreatProtectionSetting: Models.AdvancedThreatProtectionSetting, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceId, + advancedThreatProtectionSetting, + options + }, + createOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "{resourceId}/providers/Microsoft.Security/advancedThreatProtectionSettings/{settingName}", + urlParameters: [ + Parameters.resourceId, + Parameters.settingName1 + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AdvancedThreatProtectionSetting + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const createOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "{resourceId}/providers/Microsoft.Security/advancedThreatProtectionSettings/{settingName}", + urlParameters: [ + Parameters.resourceId, + Parameters.settingName1 + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "advancedThreatProtectionSetting", + mapper: { + ...Mappers.AdvancedThreatProtectionSetting, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.AdvancedThreatProtectionSetting + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/security/arm-security/lib/operations/alerts.ts b/sdk/security/arm-security/lib/operations/alerts.ts new file mode 100644 index 000000000000..73df8ef66164 --- /dev/null +++ b/sdk/security/arm-security/lib/operations/alerts.ts @@ -0,0 +1,688 @@ +/* + * 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/alertsMappers"; +import * as Parameters from "../models/parameters"; +import { SecurityCenterContext } from "../securityCenterContext"; + +/** Class representing a Alerts. */ +export class Alerts { + private readonly client: SecurityCenterContext; + + /** + * Create a Alerts. + * @param {SecurityCenterContext} client Reference to the service client. + */ + constructor(client: SecurityCenterContext) { + this.client = client; + } + + /** + * List all the alerts that are associated with the subscription + * @param [options] The optional parameters + * @returns Promise + */ + list(options?: Models.AlertsListOptionalParams): Promise; + /** + * @param callback The callback + */ + list(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + list(options: Models.AlertsListOptionalParams, callback: msRest.ServiceCallback): void; + list(options?: Models.AlertsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * List all the alerts that are associated with 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?: Models.AlertsListByResourceGroupOptionalParams): 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: Models.AlertsListByResourceGroupOptionalParams, callback: msRest.ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, options?: Models.AlertsListByResourceGroupOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + options + }, + listByResourceGroupOperationSpec, + callback) as Promise; + } + + /** + * List all the alerts that are associated with the subscription that are stored in a specific + * location + * @param [options] The optional parameters + * @returns Promise + */ + listSubscriptionLevelAlertsByRegion(options?: Models.AlertsListSubscriptionLevelAlertsByRegionOptionalParams): Promise; + /** + * @param callback The callback + */ + listSubscriptionLevelAlertsByRegion(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + listSubscriptionLevelAlertsByRegion(options: Models.AlertsListSubscriptionLevelAlertsByRegionOptionalParams, callback: msRest.ServiceCallback): void; + listSubscriptionLevelAlertsByRegion(options?: Models.AlertsListSubscriptionLevelAlertsByRegionOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listSubscriptionLevelAlertsByRegionOperationSpec, + callback) as Promise; + } + + /** + * List all the alerts that are associated with the resource group that are stored in a specific + * location + * @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 + */ + listResourceGroupLevelAlertsByRegion(resourceGroupName: string, options?: Models.AlertsListResourceGroupLevelAlertsByRegionOptionalParams): Promise; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param callback The callback + */ + listResourceGroupLevelAlertsByRegion(resourceGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param options The optional parameters + * @param callback The callback + */ + listResourceGroupLevelAlertsByRegion(resourceGroupName: string, options: Models.AlertsListResourceGroupLevelAlertsByRegionOptionalParams, callback: msRest.ServiceCallback): void; + listResourceGroupLevelAlertsByRegion(resourceGroupName: string, options?: Models.AlertsListResourceGroupLevelAlertsByRegionOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + options + }, + listResourceGroupLevelAlertsByRegionOperationSpec, + callback) as Promise; + } + + /** + * Get an alert that is associated with a subscription + * @param alertName Name of the alert object + * @param [options] The optional parameters + * @returns Promise + */ + getSubscriptionLevelAlert(alertName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param alertName Name of the alert object + * @param callback The callback + */ + getSubscriptionLevelAlert(alertName: string, callback: msRest.ServiceCallback): void; + /** + * @param alertName Name of the alert object + * @param options The optional parameters + * @param callback The callback + */ + getSubscriptionLevelAlert(alertName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getSubscriptionLevelAlert(alertName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + alertName, + options + }, + getSubscriptionLevelAlertOperationSpec, + callback) as Promise; + } + + /** + * Get an alert that is associated a resource group or a resource in a resource group + * @param alertName Name of the alert object + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param [options] The optional parameters + * @returns Promise + */ + getResourceGroupLevelAlerts(alertName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param alertName Name of the alert object + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param callback The callback + */ + getResourceGroupLevelAlerts(alertName: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param alertName Name of the alert object + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param options The optional parameters + * @param callback The callback + */ + getResourceGroupLevelAlerts(alertName: string, resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getResourceGroupLevelAlerts(alertName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + alertName, + resourceGroupName, + options + }, + getResourceGroupLevelAlertsOperationSpec, + callback) as Promise; + } + + /** + * Update the alert's state + * @param alertName Name of the alert object + * @param alertUpdateActionType Type of the action to do on the alert. Possible values include: + * 'Dismiss', 'Reactivate' + * @param [options] The optional parameters + * @returns Promise + */ + updateSubscriptionLevelAlertState(alertName: string, alertUpdateActionType: Models.AlertUpdateActionType, options?: msRest.RequestOptionsBase): Promise; + /** + * @param alertName Name of the alert object + * @param alertUpdateActionType Type of the action to do on the alert. Possible values include: + * 'Dismiss', 'Reactivate' + * @param callback The callback + */ + updateSubscriptionLevelAlertState(alertName: string, alertUpdateActionType: Models.AlertUpdateActionType, callback: msRest.ServiceCallback): void; + /** + * @param alertName Name of the alert object + * @param alertUpdateActionType Type of the action to do on the alert. Possible values include: + * 'Dismiss', 'Reactivate' + * @param options The optional parameters + * @param callback The callback + */ + updateSubscriptionLevelAlertState(alertName: string, alertUpdateActionType: Models.AlertUpdateActionType, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + updateSubscriptionLevelAlertState(alertName: string, alertUpdateActionType: Models.AlertUpdateActionType, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + alertName, + alertUpdateActionType, + options + }, + updateSubscriptionLevelAlertStateOperationSpec, + callback); + } + + /** + * Update the alert's state + * @param alertName Name of the alert object + * @param alertUpdateActionType Type of the action to do on the alert. Possible values include: + * 'Dismiss', 'Reactivate' + * @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 + */ + updateResourceGroupLevelAlertState(alertName: string, alertUpdateActionType: Models.AlertUpdateActionType1, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param alertName Name of the alert object + * @param alertUpdateActionType Type of the action to do on the alert. Possible values include: + * 'Dismiss', 'Reactivate' + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param callback The callback + */ + updateResourceGroupLevelAlertState(alertName: string, alertUpdateActionType: Models.AlertUpdateActionType1, resourceGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param alertName Name of the alert object + * @param alertUpdateActionType Type of the action to do on the alert. Possible values include: + * 'Dismiss', 'Reactivate' + * @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 + */ + updateResourceGroupLevelAlertState(alertName: string, alertUpdateActionType: Models.AlertUpdateActionType1, resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + updateResourceGroupLevelAlertState(alertName: string, alertUpdateActionType: Models.AlertUpdateActionType1, resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + alertName, + alertUpdateActionType, + resourceGroupName, + options + }, + updateResourceGroupLevelAlertStateOperationSpec, + callback); + } + + /** + * List all the alerts that are associated with the subscription + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } + + /** + * List all the alerts that are associated with 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; + } + + /** + * List all the alerts that are associated with the subscription that are stored in a specific + * location + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listSubscriptionLevelAlertsByRegionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listSubscriptionLevelAlertsByRegionNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listSubscriptionLevelAlertsByRegionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listSubscriptionLevelAlertsByRegionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listSubscriptionLevelAlertsByRegionNextOperationSpec, + callback) as Promise; + } + + /** + * List all the alerts that are associated with the resource group that are stored in a specific + * location + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listResourceGroupLevelAlertsByRegionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listResourceGroupLevelAlertsByRegionNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listResourceGroupLevelAlertsByRegionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listResourceGroupLevelAlertsByRegionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listResourceGroupLevelAlertsByRegionNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/alerts", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1, + Parameters.filter, + Parameters.select, + Parameters.expand + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AlertList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByResourceGroupOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/alerts", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion1, + Parameters.filter, + Parameters.select, + Parameters.expand + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AlertList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listSubscriptionLevelAlertsByRegionOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/alerts", + urlParameters: [ + Parameters.subscriptionId, + Parameters.ascLocation + ], + queryParameters: [ + Parameters.apiVersion1, + Parameters.filter, + Parameters.select, + Parameters.expand + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AlertList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listResourceGroupLevelAlertsByRegionOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/alerts", + urlParameters: [ + Parameters.subscriptionId, + Parameters.ascLocation, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion1, + Parameters.filter, + Parameters.select, + Parameters.expand + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AlertList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getSubscriptionLevelAlertOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.ascLocation, + Parameters.alertName + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Alert + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getResourceGroupLevelAlertsOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.ascLocation, + Parameters.alertName, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Alert + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const updateSubscriptionLevelAlertStateOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/{alertUpdateActionType}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.ascLocation, + Parameters.alertName, + Parameters.alertUpdateActionType + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const updateResourceGroupLevelAlertStateOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/{alertUpdateActionType}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.ascLocation, + Parameters.alertName, + Parameters.alertUpdateActionType, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 204: {}, + 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.AlertList + }, + 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.AlertList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listSubscriptionLevelAlertsByRegionNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AlertList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listResourceGroupLevelAlertsByRegionNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AlertList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/security/arm-security/lib/operations/allowedConnections.ts b/sdk/security/arm-security/lib/operations/allowedConnections.ts new file mode 100644 index 000000000000..98eb68b742ac --- /dev/null +++ b/sdk/security/arm-security/lib/operations/allowedConnections.ts @@ -0,0 +1,288 @@ +/* + * 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/allowedConnectionsMappers"; +import * as Parameters from "../models/parameters"; +import { SecurityCenterContext } from "../securityCenterContext"; + +/** Class representing a AllowedConnections. */ +export class AllowedConnections { + private readonly client: SecurityCenterContext; + + /** + * Create a AllowedConnections. + * @param {SecurityCenterContext} client Reference to the service client. + */ + constructor(client: SecurityCenterContext) { + this.client = client; + } + + /** + * Gets the list of all possible traffic between resources for the subscription + * @param [options] The optional parameters + * @returns Promise + */ + list(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + list(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Gets the list of all possible traffic between resources for the subscription and location. + * @param [options] The optional parameters + * @returns Promise + */ + listByHomeRegion(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + listByHomeRegion(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + listByHomeRegion(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByHomeRegion(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listByHomeRegionOperationSpec, + callback) as Promise; + } + + /** + * Gets the list of all possible traffic between resources for the subscription and location, based + * on connection type. + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param connectionType The type of allowed connections (Internal, External). Possible values + * include: 'Internal', 'External' + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, connectionType: Models.ConnectionType, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param connectionType The type of allowed connections (Internal, External). Possible values + * include: 'Internal', 'External' + * @param callback The callback + */ + get(resourceGroupName: string, connectionType: Models.ConnectionType, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param connectionType The type of allowed connections (Internal, External). Possible values + * include: 'Internal', 'External' + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, connectionType: Models.ConnectionType, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, connectionType: Models.ConnectionType, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + connectionType, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Gets the list of all possible traffic between resources for the subscription + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } + + /** + * Gets the list of all possible traffic between resources for the subscription and location. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByHomeRegionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByHomeRegionNext(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 + */ + listByHomeRegionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByHomeRegionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByHomeRegionNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/allowedConnections", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AllowedConnectionsList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByHomeRegionOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/allowedConnections", + urlParameters: [ + Parameters.subscriptionId, + Parameters.ascLocation + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AllowedConnectionsList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/allowedConnections/{connectionType}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.ascLocation, + Parameters.connectionType + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AllowedConnectionsResource + }, + 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.AllowedConnectionsList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByHomeRegionNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AllowedConnectionsList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/security/arm-security/lib/operations/autoProvisioningSettings.ts b/sdk/security/arm-security/lib/operations/autoProvisioningSettings.ts new file mode 100644 index 000000000000..675ffe7a63f9 --- /dev/null +++ b/sdk/security/arm-security/lib/operations/autoProvisioningSettings.ts @@ -0,0 +1,241 @@ +/* + * 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/autoProvisioningSettingsMappers"; +import * as Parameters from "../models/parameters"; +import { SecurityCenterContext } from "../securityCenterContext"; + +/** Class representing a AutoProvisioningSettings. */ +export class AutoProvisioningSettings { + private readonly client: SecurityCenterContext; + + /** + * Create a AutoProvisioningSettings. + * @param {SecurityCenterContext} client Reference to the service client. + */ + constructor(client: SecurityCenterContext) { + this.client = client; + } + + /** + * Exposes the auto provisioning settings of the subscriptions + * @param [options] The optional parameters + * @returns Promise + */ + list(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + list(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Details of a specific setting + * @param settingName Auto provisioning setting key + * @param [options] The optional parameters + * @returns Promise + */ + get(settingName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param settingName Auto provisioning setting key + * @param callback The callback + */ + get(settingName: string, callback: msRest.ServiceCallback): void; + /** + * @param settingName Auto provisioning setting key + * @param options The optional parameters + * @param callback The callback + */ + get(settingName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(settingName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + settingName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Details of a specific setting + * @param settingName Auto provisioning setting key + * @param setting Auto provisioning setting key + * @param [options] The optional parameters + * @returns Promise + */ + create(settingName: string, setting: Models.AutoProvisioningSetting, options?: msRest.RequestOptionsBase): Promise; + /** + * @param settingName Auto provisioning setting key + * @param setting Auto provisioning setting key + * @param callback The callback + */ + create(settingName: string, setting: Models.AutoProvisioningSetting, callback: msRest.ServiceCallback): void; + /** + * @param settingName Auto provisioning setting key + * @param setting Auto provisioning setting key + * @param options The optional parameters + * @param callback The callback + */ + create(settingName: string, setting: Models.AutoProvisioningSetting, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + create(settingName: string, setting: Models.AutoProvisioningSetting, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + settingName, + setting, + options + }, + createOperationSpec, + callback) as Promise; + } + + /** + * Exposes the auto provisioning settings of the subscriptions + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/autoProvisioningSettings", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AutoProvisioningSettingList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/autoProvisioningSettings/{settingName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.settingName0 + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AutoProvisioningSetting + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const createOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/autoProvisioningSettings/{settingName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.settingName0 + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "setting", + mapper: { + ...Mappers.AutoProvisioningSetting, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.AutoProvisioningSetting + }, + 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.AutoProvisioningSettingList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/security/arm-security/lib/operations/compliances.ts b/sdk/security/arm-security/lib/operations/compliances.ts new file mode 100644 index 000000000000..b08289a129d2 --- /dev/null +++ b/sdk/security/arm-security/lib/operations/compliances.ts @@ -0,0 +1,198 @@ +/* + * 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/compliancesMappers"; +import * as Parameters from "../models/parameters"; +import { SecurityCenterContext } from "../securityCenterContext"; + +/** Class representing a Compliances. */ +export class Compliances { + private readonly client: SecurityCenterContext; + + /** + * Create a Compliances. + * @param {SecurityCenterContext} client Reference to the service client. + */ + constructor(client: SecurityCenterContext) { + this.client = client; + } + + /** + * The Compliance scores of the specific management group. + * @param scope Scope of the query, can be subscription + * (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group + * (/providers/Microsoft.Management/managementGroups/mgName). + * @param [options] The optional parameters + * @returns Promise + */ + list(scope: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param scope Scope of the query, can be subscription + * (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group + * (/providers/Microsoft.Management/managementGroups/mgName). + * @param callback The callback + */ + list(scope: string, callback: msRest.ServiceCallback): void; + /** + * @param scope Scope of the query, can be subscription + * (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group + * (/providers/Microsoft.Management/managementGroups/mgName). + * @param options The optional parameters + * @param callback The callback + */ + list(scope: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(scope: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scope, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Details of a specific Compliance. + * @param scope Scope of the query, can be subscription + * (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group + * (/providers/Microsoft.Management/managementGroups/mgName). + * @param complianceName name of the Compliance + * @param [options] The optional parameters + * @returns Promise + */ + get(scope: string, complianceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param scope Scope of the query, can be subscription + * (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group + * (/providers/Microsoft.Management/managementGroups/mgName). + * @param complianceName name of the Compliance + * @param callback The callback + */ + get(scope: string, complianceName: string, callback: msRest.ServiceCallback): void; + /** + * @param scope Scope of the query, can be subscription + * (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group + * (/providers/Microsoft.Management/managementGroups/mgName). + * @param complianceName name of the Compliance + * @param options The optional parameters + * @param callback The callback + */ + get(scope: string, complianceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(scope: string, complianceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scope, + complianceName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * The Compliance scores of the specific management group. + * @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: "{scope}/providers/Microsoft.Security/compliances", + urlParameters: [ + Parameters.scope + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ComplianceList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "{scope}/providers/Microsoft.Security/compliances/{complianceName}", + urlParameters: [ + Parameters.scope, + Parameters.complianceName + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Compliance + }, + 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.ComplianceList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/security/arm-security/lib/operations/discoveredSecuritySolutions.ts b/sdk/security/arm-security/lib/operations/discoveredSecuritySolutions.ts new file mode 100644 index 000000000000..dfc79f411549 --- /dev/null +++ b/sdk/security/arm-security/lib/operations/discoveredSecuritySolutions.ts @@ -0,0 +1,284 @@ +/* + * 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/discoveredSecuritySolutionsMappers"; +import * as Parameters from "../models/parameters"; +import { SecurityCenterContext } from "../securityCenterContext"; + +/** Class representing a DiscoveredSecuritySolutions. */ +export class DiscoveredSecuritySolutions { + private readonly client: SecurityCenterContext; + + /** + * Create a DiscoveredSecuritySolutions. + * @param {SecurityCenterContext} client Reference to the service client. + */ + constructor(client: SecurityCenterContext) { + this.client = client; + } + + /** + * Gets a list of discovered Security Solutions for the subscription. + * @param [options] The optional parameters + * @returns Promise + */ + list(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + list(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Gets a list of discovered Security Solutions for the subscription and location. + * @param [options] The optional parameters + * @returns Promise + */ + listByHomeRegion(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + listByHomeRegion(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + listByHomeRegion(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByHomeRegion(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listByHomeRegionOperationSpec, + callback) as Promise; + } + + /** + * Gets a specific discovered Security Solution. + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param discoveredSecuritySolutionName Name of a discovered security solution. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, discoveredSecuritySolutionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param discoveredSecuritySolutionName Name of a discovered security solution. + * @param callback The callback + */ + get(resourceGroupName: string, discoveredSecuritySolutionName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param discoveredSecuritySolutionName Name of a discovered security solution. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, discoveredSecuritySolutionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, discoveredSecuritySolutionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + discoveredSecuritySolutionName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Gets a list of discovered Security Solutions for the subscription. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } + + /** + * Gets a list of discovered Security Solutions for the subscription and location. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByHomeRegionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByHomeRegionNext(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 + */ + listByHomeRegionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByHomeRegionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByHomeRegionNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/discoveredSecuritySolutions", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DiscoveredSecuritySolutionList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByHomeRegionOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/discoveredSecuritySolutions", + urlParameters: [ + Parameters.subscriptionId, + Parameters.ascLocation + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DiscoveredSecuritySolutionList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/discoveredSecuritySolutions/{discoveredSecuritySolutionName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.ascLocation, + Parameters.discoveredSecuritySolutionName + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DiscoveredSecuritySolution + }, + 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.DiscoveredSecuritySolutionList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByHomeRegionNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DiscoveredSecuritySolutionList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/security/arm-security/lib/operations/externalSecuritySolutions.ts b/sdk/security/arm-security/lib/operations/externalSecuritySolutions.ts new file mode 100644 index 000000000000..2980dde3c9b9 --- /dev/null +++ b/sdk/security/arm-security/lib/operations/externalSecuritySolutions.ts @@ -0,0 +1,284 @@ +/* + * 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/externalSecuritySolutionsMappers"; +import * as Parameters from "../models/parameters"; +import { SecurityCenterContext } from "../securityCenterContext"; + +/** Class representing a ExternalSecuritySolutions. */ +export class ExternalSecuritySolutions { + private readonly client: SecurityCenterContext; + + /** + * Create a ExternalSecuritySolutions. + * @param {SecurityCenterContext} client Reference to the service client. + */ + constructor(client: SecurityCenterContext) { + this.client = client; + } + + /** + * Gets a list of external security solutions for the subscription. + * @param [options] The optional parameters + * @returns Promise + */ + list(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + list(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Gets a list of external Security Solutions for the subscription and location. + * @param [options] The optional parameters + * @returns Promise + */ + listByHomeRegion(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + listByHomeRegion(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + listByHomeRegion(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByHomeRegion(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listByHomeRegionOperationSpec, + callback) as Promise; + } + + /** + * Gets a specific external Security Solution. + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param externalSecuritySolutionsName Name of an external security solution. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, externalSecuritySolutionsName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param externalSecuritySolutionsName Name of an external security solution. + * @param callback The callback + */ + get(resourceGroupName: string, externalSecuritySolutionsName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param externalSecuritySolutionsName Name of an external security solution. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, externalSecuritySolutionsName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, externalSecuritySolutionsName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + externalSecuritySolutionsName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Gets a list of external security solutions for the subscription. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } + + /** + * Gets a list of external Security Solutions for the subscription and location. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByHomeRegionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByHomeRegionNext(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 + */ + listByHomeRegionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByHomeRegionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByHomeRegionNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/externalSecuritySolutions", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ExternalSecuritySolutionList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByHomeRegionOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/ExternalSecuritySolutions", + urlParameters: [ + Parameters.subscriptionId, + Parameters.ascLocation + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ExternalSecuritySolutionList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/ExternalSecuritySolutions/{externalSecuritySolutionsName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.ascLocation, + Parameters.externalSecuritySolutionsName + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ExternalSecuritySolution + }, + 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.ExternalSecuritySolutionList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByHomeRegionNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ExternalSecuritySolutionList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/security/arm-security/lib/operations/index.ts b/sdk/security/arm-security/lib/operations/index.ts new file mode 100644 index 000000000000..08b1b9d448d1 --- /dev/null +++ b/sdk/security/arm-security/lib/operations/index.ts @@ -0,0 +1,30 @@ +/* + * 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. + */ + +export * from "./pricings"; +export * from "./alerts"; +export * from "./settings"; +export * from "./allowedConnections"; +export * from "./discoveredSecuritySolutions"; +export * from "./externalSecuritySolutions"; +export * from "./jitNetworkAccessPolicies"; +export * from "./locations"; +export * from "./operations"; +export * from "./tasks"; +export * from "./topology"; +export * from "./advancedThreatProtection"; +export * from "./autoProvisioningSettings"; +export * from "./compliances"; +export * from "./informationProtectionPolicies"; +export * from "./securityContacts"; +export * from "./workspaceSettings"; +export * from "./regulatoryComplianceStandards"; +export * from "./regulatoryComplianceControls"; +export * from "./regulatoryComplianceAssessments"; diff --git a/sdk/security/arm-security/lib/operations/informationProtectionPolicies.ts b/sdk/security/arm-security/lib/operations/informationProtectionPolicies.ts new file mode 100644 index 000000000000..596418391a0b --- /dev/null +++ b/sdk/security/arm-security/lib/operations/informationProtectionPolicies.ts @@ -0,0 +1,269 @@ +/* + * 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/informationProtectionPoliciesMappers"; +import * as Parameters from "../models/parameters"; +import { SecurityCenterContext } from "../securityCenterContext"; + +/** Class representing a InformationProtectionPolicies. */ +export class InformationProtectionPolicies { + private readonly client: SecurityCenterContext; + + /** + * Create a InformationProtectionPolicies. + * @param {SecurityCenterContext} client Reference to the service client. + */ + constructor(client: SecurityCenterContext) { + this.client = client; + } + + /** + * Details of the information protection policy. + * @param scope Scope of the query, can be subscription + * (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group + * (/providers/Microsoft.Management/managementGroups/mgName). + * @param informationProtectionPolicyName Name of the information protection policy. Possible + * values include: 'effective', 'custom' + * @param [options] The optional parameters + * @returns Promise + */ + get(scope: string, informationProtectionPolicyName: Models.InformationProtectionPolicyName, options?: msRest.RequestOptionsBase): Promise; + /** + * @param scope Scope of the query, can be subscription + * (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group + * (/providers/Microsoft.Management/managementGroups/mgName). + * @param informationProtectionPolicyName Name of the information protection policy. Possible + * values include: 'effective', 'custom' + * @param callback The callback + */ + get(scope: string, informationProtectionPolicyName: Models.InformationProtectionPolicyName, callback: msRest.ServiceCallback): void; + /** + * @param scope Scope of the query, can be subscription + * (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group + * (/providers/Microsoft.Management/managementGroups/mgName). + * @param informationProtectionPolicyName Name of the information protection policy. Possible + * values include: 'effective', 'custom' + * @param options The optional parameters + * @param callback The callback + */ + get(scope: string, informationProtectionPolicyName: Models.InformationProtectionPolicyName, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(scope: string, informationProtectionPolicyName: Models.InformationProtectionPolicyName, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scope, + informationProtectionPolicyName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Details of the information protection policy. + * @param scope Scope of the query, can be subscription + * (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group + * (/providers/Microsoft.Management/managementGroups/mgName). + * @param informationProtectionPolicyName Name of the information protection policy. Possible + * values include: 'effective', 'custom' + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(scope: string, informationProtectionPolicyName: Models.InformationProtectionPolicyName1, options?: msRest.RequestOptionsBase): Promise; + /** + * @param scope Scope of the query, can be subscription + * (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group + * (/providers/Microsoft.Management/managementGroups/mgName). + * @param informationProtectionPolicyName Name of the information protection policy. Possible + * values include: 'effective', 'custom' + * @param callback The callback + */ + createOrUpdate(scope: string, informationProtectionPolicyName: Models.InformationProtectionPolicyName1, callback: msRest.ServiceCallback): void; + /** + * @param scope Scope of the query, can be subscription + * (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group + * (/providers/Microsoft.Management/managementGroups/mgName). + * @param informationProtectionPolicyName Name of the information protection policy. Possible + * values include: 'effective', 'custom' + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdate(scope: string, informationProtectionPolicyName: Models.InformationProtectionPolicyName1, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(scope: string, informationProtectionPolicyName: Models.InformationProtectionPolicyName1, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scope, + informationProtectionPolicyName, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; + } + + /** + * Information protection policies of a specific management group. + * @param scope Scope of the query, can be subscription + * (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group + * (/providers/Microsoft.Management/managementGroups/mgName). + * @param [options] The optional parameters + * @returns Promise + */ + list(scope: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param scope Scope of the query, can be subscription + * (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group + * (/providers/Microsoft.Management/managementGroups/mgName). + * @param callback The callback + */ + list(scope: string, callback: msRest.ServiceCallback): void; + /** + * @param scope Scope of the query, can be subscription + * (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group + * (/providers/Microsoft.Management/managementGroups/mgName). + * @param options The optional parameters + * @param callback The callback + */ + list(scope: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(scope: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scope, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Information protection policies of a specific management group. + * @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 getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "{scope}/providers/Microsoft.Security/informationProtectionPolicies/{informationProtectionPolicyName}", + urlParameters: [ + Parameters.scope, + Parameters.informationProtectionPolicyName + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.InformationProtectionPolicy + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "{scope}/providers/Microsoft.Security/informationProtectionPolicies/{informationProtectionPolicyName}", + urlParameters: [ + Parameters.scope, + Parameters.informationProtectionPolicyName + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.InformationProtectionPolicy + }, + 201: { + bodyMapper: Mappers.InformationProtectionPolicy + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "{scope}/providers/Microsoft.Security/informationProtectionPolicies", + urlParameters: [ + Parameters.scope + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.InformationProtectionPolicyList + }, + 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.InformationProtectionPolicyList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/security/arm-security/lib/operations/jitNetworkAccessPolicies.ts b/sdk/security/arm-security/lib/operations/jitNetworkAccessPolicies.ts new file mode 100644 index 000000000000..723636a8e43f --- /dev/null +++ b/sdk/security/arm-security/lib/operations/jitNetworkAccessPolicies.ts @@ -0,0 +1,705 @@ +/* + * 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/jitNetworkAccessPoliciesMappers"; +import * as Parameters from "../models/parameters"; +import { SecurityCenterContext } from "../securityCenterContext"; + +/** Class representing a JitNetworkAccessPolicies. */ +export class JitNetworkAccessPolicies { + private readonly client: SecurityCenterContext; + + /** + * Create a JitNetworkAccessPolicies. + * @param {SecurityCenterContext} client Reference to the service client. + */ + constructor(client: SecurityCenterContext) { + this.client = client; + } + + /** + * Policies for protecting resources using Just-in-Time access control. + * @param [options] The optional parameters + * @returns Promise + */ + list(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + list(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Policies for protecting resources using Just-in-Time access control for the subscription, + * location + * @param [options] The optional parameters + * @returns Promise + */ + listByRegion(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + listByRegion(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + listByRegion(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByRegion(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listByRegionOperationSpec, + callback) as Promise; + } + + /** + * Policies for protecting resources using Just-in-Time access control for the subscription, + * location + * @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; + } + + /** + * Policies for protecting resources using Just-in-Time access control for the subscription, + * location + * @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 + */ + listByResourceGroupAndRegion(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 + */ + listByResourceGroupAndRegion(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 + */ + listByResourceGroupAndRegion(resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResourceGroupAndRegion(resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + options + }, + listByResourceGroupAndRegionOperationSpec, + callback) as Promise; + } + + /** + * Policies for protecting resources using Just-in-Time access control for the subscription, + * location + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param jitNetworkAccessPolicyName Name of a Just-in-Time access configuration policy. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, jitNetworkAccessPolicyName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param jitNetworkAccessPolicyName Name of a Just-in-Time access configuration policy. + * @param callback The callback + */ + get(resourceGroupName: string, jitNetworkAccessPolicyName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param jitNetworkAccessPolicyName Name of a Just-in-Time access configuration policy. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, jitNetworkAccessPolicyName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, jitNetworkAccessPolicyName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + jitNetworkAccessPolicyName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Create a policy for protecting resources using Just-in-Time access control + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param jitNetworkAccessPolicyName Name of a Just-in-Time access configuration policy. + * @param body + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, jitNetworkAccessPolicyName: string, body: Models.JitNetworkAccessPolicy, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param jitNetworkAccessPolicyName Name of a Just-in-Time access configuration policy. + * @param body + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, jitNetworkAccessPolicyName: string, body: Models.JitNetworkAccessPolicy, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param jitNetworkAccessPolicyName Name of a Just-in-Time access configuration policy. + * @param body + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, jitNetworkAccessPolicyName: string, body: Models.JitNetworkAccessPolicy, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, jitNetworkAccessPolicyName: string, body: Models.JitNetworkAccessPolicy, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + jitNetworkAccessPolicyName, + body, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; + } + + /** + * Delete a Just-in-Time access control policy. + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param jitNetworkAccessPolicyName Name of a Just-in-Time access configuration policy. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, jitNetworkAccessPolicyName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param jitNetworkAccessPolicyName Name of a Just-in-Time access configuration policy. + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, jitNetworkAccessPolicyName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param jitNetworkAccessPolicyName Name of a Just-in-Time access configuration policy. + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, jitNetworkAccessPolicyName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, jitNetworkAccessPolicyName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + jitNetworkAccessPolicyName, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * Initiate a JIT access from a specific Just-in-Time policy configuration. + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param jitNetworkAccessPolicyName Name of a Just-in-Time access configuration policy. + * @param body + * @param [options] The optional parameters + * @returns Promise + */ + initiate(resourceGroupName: string, jitNetworkAccessPolicyName: string, body: Models.JitNetworkAccessPolicyInitiateRequest, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param jitNetworkAccessPolicyName Name of a Just-in-Time access configuration policy. + * @param body + * @param callback The callback + */ + initiate(resourceGroupName: string, jitNetworkAccessPolicyName: string, body: Models.JitNetworkAccessPolicyInitiateRequest, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param jitNetworkAccessPolicyName Name of a Just-in-Time access configuration policy. + * @param body + * @param options The optional parameters + * @param callback The callback + */ + initiate(resourceGroupName: string, jitNetworkAccessPolicyName: string, body: Models.JitNetworkAccessPolicyInitiateRequest, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + initiate(resourceGroupName: string, jitNetworkAccessPolicyName: string, body: Models.JitNetworkAccessPolicyInitiateRequest, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + jitNetworkAccessPolicyName, + body, + options + }, + initiateOperationSpec, + callback) as Promise; + } + + /** + * Policies for protecting resources using Just-in-Time access 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; + } + + /** + * Policies for protecting resources using Just-in-Time access control for the subscription, + * location + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByRegionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByRegionNext(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 + */ + listByRegionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByRegionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByRegionNextOperationSpec, + callback) as Promise; + } + + /** + * Policies for protecting resources using Just-in-Time access control for the subscription, + * location + * @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; + } + + /** + * Policies for protecting resources using Just-in-Time access control for the subscription, + * location + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByResourceGroupAndRegionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByResourceGroupAndRegionNext(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 + */ + listByResourceGroupAndRegionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResourceGroupAndRegionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByResourceGroupAndRegionNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/jitNetworkAccessPolicies", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.JitNetworkAccessPoliciesList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByRegionOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/jitNetworkAccessPolicies", + urlParameters: [ + Parameters.subscriptionId, + Parameters.ascLocation + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.JitNetworkAccessPoliciesList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByResourceGroupOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/jitNetworkAccessPolicies", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.JitNetworkAccessPoliciesList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByResourceGroupAndRegionOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/jitNetworkAccessPolicies", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.ascLocation + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.JitNetworkAccessPoliciesList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/jitNetworkAccessPolicies/{jitNetworkAccessPolicyName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.ascLocation, + Parameters.jitNetworkAccessPolicyName + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.JitNetworkAccessPolicy + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/jitNetworkAccessPolicies/{jitNetworkAccessPolicyName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.ascLocation, + Parameters.jitNetworkAccessPolicyName + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "body", + mapper: { + ...Mappers.JitNetworkAccessPolicy, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.JitNetworkAccessPolicy + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/jitNetworkAccessPolicies/{jitNetworkAccessPolicyName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.ascLocation, + Parameters.jitNetworkAccessPolicyName + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const initiateOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/jitNetworkAccessPolicies/{jitNetworkAccessPolicyName}/{jitNetworkAccessPolicyInitiateType}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.ascLocation, + Parameters.jitNetworkAccessPolicyName, + Parameters.jitNetworkAccessPolicyInitiateType + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "body", + mapper: { + ...Mappers.JitNetworkAccessPolicyInitiateRequest, + required: true + } + }, + responses: { + 202: { + bodyMapper: Mappers.JitNetworkAccessRequest + }, + 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.JitNetworkAccessPoliciesList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByRegionNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.JitNetworkAccessPoliciesList + }, + 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.JitNetworkAccessPoliciesList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByResourceGroupAndRegionNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.JitNetworkAccessPoliciesList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/security/arm-security/lib/operations/locations.ts b/sdk/security/arm-security/lib/operations/locations.ts new file mode 100644 index 000000000000..07abce747f32 --- /dev/null +++ b/sdk/security/arm-security/lib/operations/locations.ts @@ -0,0 +1,178 @@ +/* + * 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/locationsMappers"; +import * as Parameters from "../models/parameters"; +import { SecurityCenterContext } from "../securityCenterContext"; + +/** Class representing a Locations. */ +export class Locations { + private readonly client: SecurityCenterContext; + + /** + * Create a Locations. + * @param {SecurityCenterContext} client Reference to the service client. + */ + constructor(client: SecurityCenterContext) { + this.client = client; + } + + /** + * The location of the responsible ASC of the specific subscription (home region). For each + * subscription there is only one responsible location. The location in the response should be used + * to read or write other resources in ASC according to their ID. + * @param [options] The optional parameters + * @returns Promise + */ + list(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + list(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Details of a specific location + * @param [options] The optional parameters + * @returns Promise + */ + get(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + get(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + get(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * The location of the responsible ASC of the specific subscription (home region). For each + * subscription there is only one responsible location. The location in the response should be used + * to read or write other resources in ASC according to their ID. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/locations", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AscLocationList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.ascLocation + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AscLocation + }, + 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.AscLocationList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/security/arm-security/lib/operations/operations.ts b/sdk/security/arm-security/lib/operations/operations.ts new file mode 100644 index 000000000000..9f462e729344 --- /dev/null +++ b/sdk/security/arm-security/lib/operations/operations.ts @@ -0,0 +1,123 @@ +/* + * 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/operationsMappers"; +import * as Parameters from "../models/parameters"; +import { SecurityCenterContext } from "../securityCenterContext"; + +/** Class representing a Operations. */ +export class Operations { + private readonly client: SecurityCenterContext; + + /** + * Create a Operations. + * @param {SecurityCenterContext} client Reference to the service client. + */ + constructor(client: SecurityCenterContext) { + this.client = client; + } + + /** + * Exposes all available operations for discovery purposes. + * @param [options] The optional parameters + * @returns Promise + */ + list(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + list(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Exposes all available operations for discovery purposes. + * @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: "providers/Microsoft.Security/operations", + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.OperationList + }, + 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.OperationList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/security/arm-security/lib/operations/pricings.ts b/sdk/security/arm-security/lib/operations/pricings.ts new file mode 100644 index 000000000000..e08acd1a4309 --- /dev/null +++ b/sdk/security/arm-security/lib/operations/pricings.ts @@ -0,0 +1,192 @@ +/* + * 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/pricingsMappers"; +import * as Parameters from "../models/parameters"; +import { SecurityCenterContext } from "../securityCenterContext"; + +/** Class representing a Pricings. */ +export class Pricings { + private readonly client: SecurityCenterContext; + + /** + * Create a Pricings. + * @param {SecurityCenterContext} client Reference to the service client. + */ + constructor(client: SecurityCenterContext) { + this.client = client; + } + + /** + * Security pricing configurations in the subscription + * @param [options] The optional parameters + * @returns Promise + */ + list(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + list(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Security pricing configuration in the subscription + * @param pricingName name of the pricing configuration + * @param [options] The optional parameters + * @returns Promise + */ + get(pricingName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param pricingName name of the pricing configuration + * @param callback The callback + */ + get(pricingName: string, callback: msRest.ServiceCallback): void; + /** + * @param pricingName name of the pricing configuration + * @param options The optional parameters + * @param callback The callback + */ + 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, + options + }, + getOperationSpec, + 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 + */ + update(pricingName: string, pricing: Models.Pricing, options?: msRest.RequestOptionsBase): Promise; + /** + * @param pricingName name of the pricing configuration + * @param pricing Pricing object + * @param callback The callback + */ + update(pricingName: string, pricing: Models.Pricing, callback: msRest.ServiceCallback): void; + /** + * @param pricingName name of the pricing configuration + * @param pricing Pricing object + * @param options The optional parameters + * @param callback The callback + */ + 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( + { + pricingName, + pricing, + options + }, + updateOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/pricings", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PricingList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/pricings/{pricingName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.pricingName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Pricing + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const updateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/pricings/{pricingName}", + urlParameters: [ + Parameters.subscriptionId, + 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 +}; diff --git a/sdk/security/arm-security/lib/operations/regulatoryComplianceAssessments.ts b/sdk/security/arm-security/lib/operations/regulatoryComplianceAssessments.ts new file mode 100644 index 000000000000..3ab39835023e --- /dev/null +++ b/sdk/security/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.apiVersion4, + 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.apiVersion4 + ], + 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/sdk/security/arm-security/lib/operations/regulatoryComplianceControls.ts b/sdk/security/arm-security/lib/operations/regulatoryComplianceControls.ts new file mode 100644 index 000000000000..5d538cf9dfa0 --- /dev/null +++ b/sdk/security/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.apiVersion4, + 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.apiVersion4 + ], + 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/sdk/security/arm-security/lib/operations/regulatoryComplianceStandards.ts b/sdk/security/arm-security/lib/operations/regulatoryComplianceStandards.ts new file mode 100644 index 000000000000..753dad30b925 --- /dev/null +++ b/sdk/security/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.apiVersion4, + 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.apiVersion4 + ], + 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/sdk/security/arm-security/lib/operations/securityContacts.ts b/sdk/security/arm-security/lib/operations/securityContacts.ts new file mode 100644 index 000000000000..c41fda48b7e5 --- /dev/null +++ b/sdk/security/arm-security/lib/operations/securityContacts.ts @@ -0,0 +1,354 @@ +/* + * 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/securityContactsMappers"; +import * as Parameters from "../models/parameters"; +import { SecurityCenterContext } from "../securityCenterContext"; + +/** Class representing a SecurityContacts. */ +export class SecurityContacts { + private readonly client: SecurityCenterContext; + + /** + * Create a SecurityContacts. + * @param {SecurityCenterContext} client Reference to the service client. + */ + constructor(client: SecurityCenterContext) { + this.client = client; + } + + /** + * Security contact configurations for the subscription + * @param [options] The optional parameters + * @returns Promise + */ + list(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + list(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Security contact configurations for the subscription + * @param securityContactName Name of the security contact object + * @param [options] The optional parameters + * @returns Promise + */ + get(securityContactName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param securityContactName Name of the security contact object + * @param callback The callback + */ + get(securityContactName: string, callback: msRest.ServiceCallback): void; + /** + * @param securityContactName Name of the security contact object + * @param options The optional parameters + * @param callback The callback + */ + get(securityContactName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(securityContactName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + securityContactName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Security contact configurations for the subscription + * @param securityContactName Name of the security contact object + * @param securityContact Security contact object + * @param [options] The optional parameters + * @returns Promise + */ + create(securityContactName: string, securityContact: Models.SecurityContact, options?: msRest.RequestOptionsBase): Promise; + /** + * @param securityContactName Name of the security contact object + * @param securityContact Security contact object + * @param callback The callback + */ + create(securityContactName: string, securityContact: Models.SecurityContact, callback: msRest.ServiceCallback): void; + /** + * @param securityContactName Name of the security contact object + * @param securityContact Security contact object + * @param options The optional parameters + * @param callback The callback + */ + create(securityContactName: string, securityContact: Models.SecurityContact, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + create(securityContactName: string, securityContact: Models.SecurityContact, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + securityContactName, + securityContact, + options + }, + createOperationSpec, + callback) as Promise; + } + + /** + * Security contact configurations for the subscription + * @param securityContactName Name of the security contact object + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(securityContactName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param securityContactName Name of the security contact object + * @param callback The callback + */ + deleteMethod(securityContactName: string, callback: msRest.ServiceCallback): void; + /** + * @param securityContactName Name of the security contact object + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(securityContactName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(securityContactName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + securityContactName, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * Security contact configurations for the subscription + * @param securityContactName Name of the security contact object + * @param securityContact Security contact object + * @param [options] The optional parameters + * @returns Promise + */ + update(securityContactName: string, securityContact: Models.SecurityContact, options?: msRest.RequestOptionsBase): Promise; + /** + * @param securityContactName Name of the security contact object + * @param securityContact Security contact object + * @param callback The callback + */ + update(securityContactName: string, securityContact: Models.SecurityContact, callback: msRest.ServiceCallback): void; + /** + * @param securityContactName Name of the security contact object + * @param securityContact Security contact object + * @param options The optional parameters + * @param callback The callback + */ + update(securityContactName: string, securityContact: Models.SecurityContact, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + update(securityContactName: string, securityContact: Models.SecurityContact, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + securityContactName, + securityContact, + options + }, + updateOperationSpec, + callback) as Promise; + } + + /** + * Security contact configurations for the subscription + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/securityContacts", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SecurityContactList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/securityContacts/{securityContactName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.securityContactName + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SecurityContact + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const createOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/securityContacts/{securityContactName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.securityContactName + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "securityContact", + mapper: { + ...Mappers.SecurityContact, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.SecurityContact + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/securityContacts/{securityContactName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.securityContactName + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const updateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/securityContacts/{securityContactName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.securityContactName + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "securityContact", + mapper: { + ...Mappers.SecurityContact, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.SecurityContact + }, + 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.SecurityContactList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/security/arm-security/lib/operations/settings.ts b/sdk/security/arm-security/lib/operations/settings.ts new file mode 100644 index 000000000000..91a1db8e3418 --- /dev/null +++ b/sdk/security/arm-security/lib/operations/settings.ts @@ -0,0 +1,241 @@ +/* + * 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/settingsMappers"; +import * as Parameters from "../models/parameters"; +import { SecurityCenterContext } from "../securityCenterContext"; + +/** Class representing a Settings. */ +export class Settings { + private readonly client: SecurityCenterContext; + + /** + * Create a Settings. + * @param {SecurityCenterContext} client Reference to the service client. + */ + constructor(client: SecurityCenterContext) { + this.client = client; + } + + /** + * Settings about different configurations in security center + * @param [options] The optional parameters + * @returns Promise + */ + list(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + list(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Settings of different configurations in security center + * @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: (MCAS/WDATP). Possible values include: 'MCAS', 'WDATP' + * @param callback The callback + */ + get(settingName: Models.SettingName, callback: msRest.ServiceCallback): void; + /** + * @param settingName Name of setting: (MCAS/WDATP). Possible values include: 'MCAS', 'WDATP' + * @param 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 { + return this.client.sendOperationRequest( + { + settingName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * updating settings about different configurations in security center + * @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.Setting, options?: msRest.RequestOptionsBase): Promise; + /** + * @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.Setting, callback: msRest.ServiceCallback): void; + /** + * @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.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, + setting, + options + }, + updateOperationSpec, + callback) as Promise; + } + + /** + * Settings about different configurations in security center + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/settings", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SettingsList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/settings/{settingName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.settingName0 + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Setting + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const updateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/settings/{settingName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.settingName0 + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "setting", + mapper: { + ...Mappers.Setting, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.Setting + }, + 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.SettingsList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/security/arm-security/lib/operations/tasks.ts b/sdk/security/arm-security/lib/operations/tasks.ts new file mode 100644 index 000000000000..07b65eecb202 --- /dev/null +++ b/sdk/security/arm-security/lib/operations/tasks.ts @@ -0,0 +1,571 @@ +/* + * 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/tasksMappers"; +import * as Parameters from "../models/parameters"; +import { SecurityCenterContext } from "../securityCenterContext"; + +/** Class representing a Tasks. */ +export class Tasks { + private readonly client: SecurityCenterContext; + + /** + * Create a Tasks. + * @param {SecurityCenterContext} client Reference to the service client. + */ + constructor(client: SecurityCenterContext) { + this.client = client; + } + + /** + * Recommended tasks that will help improve the security of the subscription proactively + * @param [options] The optional parameters + * @returns Promise + */ + list(options?: Models.TasksListOptionalParams): Promise; + /** + * @param callback The callback + */ + list(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + list(options: Models.TasksListOptionalParams, callback: msRest.ServiceCallback): void; + list(options?: Models.TasksListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Recommended tasks that will help improve the security of the subscription proactively + * @param [options] The optional parameters + * @returns Promise + */ + listByHomeRegion(options?: Models.TasksListByHomeRegionOptionalParams): Promise; + /** + * @param callback The callback + */ + listByHomeRegion(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + listByHomeRegion(options: Models.TasksListByHomeRegionOptionalParams, callback: msRest.ServiceCallback): void; + listByHomeRegion(options?: Models.TasksListByHomeRegionOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listByHomeRegionOperationSpec, + callback) as Promise; + } + + /** + * Recommended tasks that will help improve the security of the subscription proactively + * @param taskName Name of the task object, will be a GUID + * @param [options] The optional parameters + * @returns Promise + */ + getSubscriptionLevelTask(taskName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param taskName Name of the task object, will be a GUID + * @param callback The callback + */ + getSubscriptionLevelTask(taskName: string, callback: msRest.ServiceCallback): void; + /** + * @param taskName Name of the task object, will be a GUID + * @param options The optional parameters + * @param callback The callback + */ + getSubscriptionLevelTask(taskName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getSubscriptionLevelTask(taskName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + taskName, + options + }, + getSubscriptionLevelTaskOperationSpec, + callback) as Promise; + } + + /** + * Recommended tasks that will help improve the security of the subscription proactively + * @param taskName Name of the task object, will be a GUID + * @param taskUpdateActionType Type of the action to do on the task. Possible values include: + * 'Activate', 'Dismiss', 'Start', 'Resolve', 'Close' + * @param [options] The optional parameters + * @returns Promise + */ + updateSubscriptionLevelTaskState(taskName: string, taskUpdateActionType: Models.TaskUpdateActionType, options?: msRest.RequestOptionsBase): Promise; + /** + * @param taskName Name of the task object, will be a GUID + * @param taskUpdateActionType Type of the action to do on the task. Possible values include: + * 'Activate', 'Dismiss', 'Start', 'Resolve', 'Close' + * @param callback The callback + */ + updateSubscriptionLevelTaskState(taskName: string, taskUpdateActionType: Models.TaskUpdateActionType, callback: msRest.ServiceCallback): void; + /** + * @param taskName Name of the task object, will be a GUID + * @param taskUpdateActionType Type of the action to do on the task. Possible values include: + * 'Activate', 'Dismiss', 'Start', 'Resolve', 'Close' + * @param options The optional parameters + * @param callback The callback + */ + updateSubscriptionLevelTaskState(taskName: string, taskUpdateActionType: Models.TaskUpdateActionType, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + updateSubscriptionLevelTaskState(taskName: string, taskUpdateActionType: Models.TaskUpdateActionType, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + taskName, + taskUpdateActionType, + options + }, + updateSubscriptionLevelTaskStateOperationSpec, + callback); + } + + /** + * Recommended tasks that will help improve the security of the subscription proactively + * @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?: Models.TasksListByResourceGroupOptionalParams): 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: Models.TasksListByResourceGroupOptionalParams, callback: msRest.ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, options?: Models.TasksListByResourceGroupOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + options + }, + listByResourceGroupOperationSpec, + callback) as Promise; + } + + /** + * Recommended tasks that will help improve the security of the subscription proactively + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param taskName Name of the task object, will be a GUID + * @param [options] The optional parameters + * @returns Promise + */ + getResourceGroupLevelTask(resourceGroupName: string, taskName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param taskName Name of the task object, will be a GUID + * @param callback The callback + */ + getResourceGroupLevelTask(resourceGroupName: string, taskName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param taskName Name of the task object, will be a GUID + * @param options The optional parameters + * @param callback The callback + */ + getResourceGroupLevelTask(resourceGroupName: string, taskName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getResourceGroupLevelTask(resourceGroupName: string, taskName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + taskName, + options + }, + getResourceGroupLevelTaskOperationSpec, + callback) as Promise; + } + + /** + * Recommended tasks that will help improve the security of the subscription proactively + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param taskName Name of the task object, will be a GUID + * @param taskUpdateActionType Type of the action to do on the task. Possible values include: + * 'Activate', 'Dismiss', 'Start', 'Resolve', 'Close' + * @param [options] The optional parameters + * @returns Promise + */ + updateResourceGroupLevelTaskState(resourceGroupName: string, taskName: string, taskUpdateActionType: Models.TaskUpdateActionType1, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param taskName Name of the task object, will be a GUID + * @param taskUpdateActionType Type of the action to do on the task. Possible values include: + * 'Activate', 'Dismiss', 'Start', 'Resolve', 'Close' + * @param callback The callback + */ + updateResourceGroupLevelTaskState(resourceGroupName: string, taskName: string, taskUpdateActionType: Models.TaskUpdateActionType1, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param taskName Name of the task object, will be a GUID + * @param taskUpdateActionType Type of the action to do on the task. Possible values include: + * 'Activate', 'Dismiss', 'Start', 'Resolve', 'Close' + * @param options The optional parameters + * @param callback The callback + */ + updateResourceGroupLevelTaskState(resourceGroupName: string, taskName: string, taskUpdateActionType: Models.TaskUpdateActionType1, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + updateResourceGroupLevelTaskState(resourceGroupName: string, taskName: string, taskUpdateActionType: Models.TaskUpdateActionType1, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + taskName, + taskUpdateActionType, + options + }, + updateResourceGroupLevelTaskStateOperationSpec, + callback); + } + + /** + * Recommended tasks that will help improve the security of the subscription proactively + * @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; + } + + /** + * Recommended tasks that will help improve the security of the subscription proactively + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByHomeRegionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByHomeRegionNext(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 + */ + listByHomeRegionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByHomeRegionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByHomeRegionNextOperationSpec, + callback) as Promise; + } + + /** + * Recommended tasks that will help improve the security of the subscription proactively + * @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; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/tasks", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion2, + Parameters.filter + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SecurityTaskList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByHomeRegionOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/tasks", + urlParameters: [ + Parameters.subscriptionId, + Parameters.ascLocation + ], + queryParameters: [ + Parameters.apiVersion2, + Parameters.filter + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SecurityTaskList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getSubscriptionLevelTaskOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/tasks/{taskName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.ascLocation, + Parameters.taskName + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SecurityTask + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const updateSubscriptionLevelTaskStateOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/tasks/{taskName}/{taskUpdateActionType}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.ascLocation, + Parameters.taskName, + Parameters.taskUpdateActionType + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByResourceGroupOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/tasks", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.ascLocation + ], + queryParameters: [ + Parameters.apiVersion2, + Parameters.filter + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SecurityTaskList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getResourceGroupLevelTaskOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/tasks/{taskName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.ascLocation, + Parameters.taskName + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SecurityTask + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const updateResourceGroupLevelTaskStateOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/tasks/{taskName}/{taskUpdateActionType}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.ascLocation, + Parameters.taskName, + Parameters.taskUpdateActionType + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 204: {}, + 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.SecurityTaskList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByHomeRegionNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SecurityTaskList + }, + 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.SecurityTaskList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/security/arm-security/lib/operations/topology.ts b/sdk/security/arm-security/lib/operations/topology.ts new file mode 100644 index 000000000000..88cfa453f69e --- /dev/null +++ b/sdk/security/arm-security/lib/operations/topology.ts @@ -0,0 +1,284 @@ +/* + * 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/topologyMappers"; +import * as Parameters from "../models/parameters"; +import { SecurityCenterContext } from "../securityCenterContext"; + +/** Class representing a Topology. */ +export class Topology { + private readonly client: SecurityCenterContext; + + /** + * Create a Topology. + * @param {SecurityCenterContext} client Reference to the service client. + */ + constructor(client: SecurityCenterContext) { + this.client = client; + } + + /** + * Gets a list that allows to build a topology view of a subscription. + * @param [options] The optional parameters + * @returns Promise + */ + list(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + list(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Gets a list that allows to build a topology view of a subscription and location. + * @param [options] The optional parameters + * @returns Promise + */ + listByHomeRegion(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + listByHomeRegion(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + listByHomeRegion(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByHomeRegion(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listByHomeRegionOperationSpec, + callback) as Promise; + } + + /** + * Gets a specific topology component. + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param topologyResourceName Name of a topology resources collection. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, topologyResourceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param topologyResourceName Name of a topology resources collection. + * @param callback The callback + */ + get(resourceGroupName: string, topologyResourceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param topologyResourceName Name of a topology resources collection. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, topologyResourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, topologyResourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + topologyResourceName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Gets a list that allows to build a topology view of a subscription. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } + + /** + * Gets a list that allows to build a topology view of a subscription and location. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByHomeRegionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByHomeRegionNext(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 + */ + listByHomeRegionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByHomeRegionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByHomeRegionNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/topologies", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.TopologyList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByHomeRegionOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/topologies", + urlParameters: [ + Parameters.subscriptionId, + Parameters.ascLocation + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.TopologyList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/topologies/{topologyResourceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.ascLocation, + Parameters.topologyResourceName + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.TopologyResource + }, + 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.TopologyList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByHomeRegionNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.TopologyList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/security/arm-security/lib/operations/workspaceSettings.ts b/sdk/security/arm-security/lib/operations/workspaceSettings.ts new file mode 100644 index 000000000000..0877ddec81a6 --- /dev/null +++ b/sdk/security/arm-security/lib/operations/workspaceSettings.ts @@ -0,0 +1,358 @@ +/* + * 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/workspaceSettingsMappers"; +import * as Parameters from "../models/parameters"; +import { SecurityCenterContext } from "../securityCenterContext"; + +/** Class representing a WorkspaceSettings. */ +export class WorkspaceSettings { + private readonly client: SecurityCenterContext; + + /** + * Create a WorkspaceSettings. + * @param {SecurityCenterContext} client Reference to the service client. + */ + constructor(client: SecurityCenterContext) { + this.client = client; + } + + /** + * 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 + */ + list(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + list(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Settings 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 + */ + get(workspaceSettingName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param workspaceSettingName Name of the security setting + * @param callback The callback + */ + get(workspaceSettingName: string, callback: msRest.ServiceCallback): void; + /** + * @param workspaceSettingName Name of the security setting + * @param options The optional parameters + * @param callback The callback + */ + get(workspaceSettingName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(workspaceSettingName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + workspaceSettingName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * creating settings about where we should store your security data and logs + * @param workspaceSettingName Name of the security setting + * @param workspaceSetting Security data setting object + * @param [options] The optional parameters + * @returns Promise + */ + create(workspaceSettingName: string, workspaceSetting: Models.WorkspaceSetting, options?: msRest.RequestOptionsBase): Promise; + /** + * @param workspaceSettingName Name of the security setting + * @param workspaceSetting Security data setting object + * @param callback The callback + */ + create(workspaceSettingName: string, workspaceSetting: Models.WorkspaceSetting, callback: msRest.ServiceCallback): void; + /** + * @param workspaceSettingName Name of the security setting + * @param workspaceSetting Security data setting object + * @param options The optional parameters + * @param callback The callback + */ + create(workspaceSettingName: string, workspaceSetting: Models.WorkspaceSetting, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + create(workspaceSettingName: string, workspaceSetting: Models.WorkspaceSetting, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + workspaceSettingName, + workspaceSetting, + options + }, + createOperationSpec, + callback) as Promise; + } + + /** + * Settings about where we should store your security data and logs + * @param workspaceSettingName Name of the security setting + * @param workspaceSetting Security data setting object + * @param [options] The optional parameters + * @returns Promise + */ + update(workspaceSettingName: string, workspaceSetting: Models.WorkspaceSetting, options?: msRest.RequestOptionsBase): Promise; + /** + * @param workspaceSettingName Name of the security setting + * @param workspaceSetting Security data setting object + * @param callback The callback + */ + update(workspaceSettingName: string, workspaceSetting: Models.WorkspaceSetting, callback: msRest.ServiceCallback): void; + /** + * @param workspaceSettingName Name of the security setting + * @param workspaceSetting Security data setting object + * @param options The optional parameters + * @param callback The callback + */ + update(workspaceSettingName: string, workspaceSetting: Models.WorkspaceSetting, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + update(workspaceSettingName: string, workspaceSetting: Models.WorkspaceSetting, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + workspaceSettingName, + workspaceSetting, + options + }, + updateOperationSpec, + callback) as Promise; + } + + /** + * Deletes the custom workspace settings for this subscription. new VMs will report to the default + * workspace + * @param workspaceSettingName Name of the security setting + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(workspaceSettingName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param workspaceSettingName Name of the security setting + * @param callback The callback + */ + deleteMethod(workspaceSettingName: string, callback: msRest.ServiceCallback): void; + /** + * @param workspaceSettingName Name of the security setting + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(workspaceSettingName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(workspaceSettingName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + workspaceSettingName, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * 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 + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/workspaceSettings", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.WorkspaceSettingList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/workspaceSettings/{workspaceSettingName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.workspaceSettingName + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.WorkspaceSetting + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const createOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/workspaceSettings/{workspaceSettingName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.workspaceSettingName + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "workspaceSetting", + mapper: { + ...Mappers.WorkspaceSetting, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.WorkspaceSetting + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const updateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/workspaceSettings/{workspaceSettingName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.workspaceSettingName + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "workspaceSetting", + mapper: { + ...Mappers.WorkspaceSetting, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.WorkspaceSetting + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/workspaceSettings/{workspaceSettingName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.workspaceSettingName + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 204: {}, + 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.WorkspaceSettingList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/security/arm-security/lib/securityCenter.ts b/sdk/security/arm-security/lib/securityCenter.ts new file mode 100644 index 000000000000..fc61e46c5d1d --- /dev/null +++ b/sdk/security/arm-security/lib/securityCenter.ts @@ -0,0 +1,82 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "./models"; +import * as Mappers from "./models/mappers"; +import * as operations from "./operations"; +import { SecurityCenterContext } from "./securityCenterContext"; + + +class SecurityCenter extends SecurityCenterContext { + // Operation groups + pricings: operations.Pricings; + alerts: operations.Alerts; + settings: operations.Settings; + allowedConnections: operations.AllowedConnections; + discoveredSecuritySolutions: operations.DiscoveredSecuritySolutions; + externalSecuritySolutions: operations.ExternalSecuritySolutions; + jitNetworkAccessPolicies: operations.JitNetworkAccessPolicies; + locations: operations.Locations; + operations: operations.Operations; + tasks: operations.Tasks; + topology: operations.Topology; + advancedThreatProtection: operations.AdvancedThreatProtection; + autoProvisioningSettings: operations.AutoProvisioningSettings; + compliances: operations.Compliances; + informationProtectionPolicies: operations.InformationProtectionPolicies; + securityContacts: operations.SecurityContacts; + workspaceSettings: operations.WorkspaceSettings; + regulatoryComplianceStandards: operations.RegulatoryComplianceStandards; + regulatoryComplianceControls: operations.RegulatoryComplianceControls; + regulatoryComplianceAssessments: operations.RegulatoryComplianceAssessments; + + /** + * Initializes a new instance of the SecurityCenter class. + * @param credentials Credentials needed for the client to connect to Azure. + * @param subscriptionId Azure subscription ID + * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved + * from Get locations + * @param [options] The parameter options + */ + constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, ascLocation: string, options?: Models.SecurityCenterOptions) { + super(credentials, subscriptionId, ascLocation, options); + this.pricings = new operations.Pricings(this); + this.alerts = new operations.Alerts(this); + this.settings = new operations.Settings(this); + this.allowedConnections = new operations.AllowedConnections(this); + this.discoveredSecuritySolutions = new operations.DiscoveredSecuritySolutions(this); + this.externalSecuritySolutions = new operations.ExternalSecuritySolutions(this); + this.jitNetworkAccessPolicies = new operations.JitNetworkAccessPolicies(this); + this.locations = new operations.Locations(this); + this.operations = new operations.Operations(this); + this.tasks = new operations.Tasks(this); + this.topology = new operations.Topology(this); + this.advancedThreatProtection = new operations.AdvancedThreatProtection(this); + this.autoProvisioningSettings = new operations.AutoProvisioningSettings(this); + this.compliances = new operations.Compliances(this); + this.informationProtectionPolicies = new operations.InformationProtectionPolicies(this); + this.securityContacts = new operations.SecurityContacts(this); + this.workspaceSettings = new operations.WorkspaceSettings(this); + this.regulatoryComplianceStandards = new operations.RegulatoryComplianceStandards(this); + this.regulatoryComplianceControls = new operations.RegulatoryComplianceControls(this); + this.regulatoryComplianceAssessments = new operations.RegulatoryComplianceAssessments(this); + } +} + +// Operation Specifications + +export { + SecurityCenter, + SecurityCenterContext, + Models as SecurityCenterModels, + Mappers as SecurityCenterMappers +}; +export * from "./operations"; diff --git a/sdk/security/arm-security/lib/securityCenterContext.ts b/sdk/security/arm-security/lib/securityCenterContext.ts new file mode 100644 index 000000000000..3cbbd0dd847c --- /dev/null +++ b/sdk/security/arm-security/lib/securityCenterContext.ts @@ -0,0 +1,67 @@ +/* + * 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 Models from "./models"; +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; + +const packageName = "@azure/arm-security"; +const packageVersion = "1.2.0"; + +export class SecurityCenterContext extends msRestAzure.AzureServiceClient { + credentials: msRest.ServiceClientCredentials; + subscriptionId: string; + ascLocation: string; + + /** + * Initializes a new instance of the SecurityCenter class. + * @param credentials Credentials needed for the client to connect to Azure. + * @param subscriptionId Azure subscription ID + * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved + * from Get locations + * @param [options] The parameter options + */ + constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, ascLocation: string, options?: Models.SecurityCenterOptions) { + if (credentials == undefined) { + throw new Error('\'credentials\' cannot be null.'); + } + if (subscriptionId == undefined) { + throw new Error('\'subscriptionId\' cannot be null.'); + } + if (ascLocation == undefined) { + throw new Error('\'ascLocation\' cannot be null.'); + } + + if (!options) { + options = {}; + } + if(!options.userAgent) { + const defaultUserAgent = msRestAzure.getDefaultUserAgentValue(); + options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`; + } + + super(credentials, options); + + this.acceptLanguage = 'en-US'; + this.longRunningOperationRetryTimeout = 30; + this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; + this.requestContentType = "application/json; charset=utf-8"; + this.credentials = credentials; + this.subscriptionId = subscriptionId; + this.ascLocation = ascLocation; + + if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) { + this.acceptLanguage = options.acceptLanguage; + } + if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { + this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout; + } + } +} diff --git a/sdk/security/arm-security/package.json b/sdk/security/arm-security/package.json new file mode 100644 index 000000000000..c71513df9c70 --- /dev/null +++ b/sdk/security/arm-security/package.json @@ -0,0 +1,56 @@ +{ + "name": "@azure/arm-security", + "author": "Microsoft Corporation", + "description": "SecurityCenter Library with typescript type definitions for node.js and browser.", + "version": "1.2.0", + "dependencies": { + "@azure/ms-rest-azure-js": "^1.2.0", + "@azure/ms-rest-js": "^1.2.0", + "tslib": "^1.9.3" + }, + "keywords": [ + "node", + "azure", + "typescript", + "browser", + "isomorphic" + ], + "license": "MIT", + "main": "./dist/arm-security.js", + "module": "./esm/securityCenter.js", + "types": "./esm/securityCenter.d.ts", + "devDependencies": { + "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", + "repository": { + "type": "git", + "url": "https://github.com/azure/azure-sdk-for-js.git" + }, + "bugs": { + "url": "https://github.com/azure/azure-sdk-for-js/issues" + }, + "files": [ + "dist/**/*.js", + "dist/**/*.js.map", + "dist/**/*.d.ts", + "dist/**/*.d.ts.map", + "esm/**/*.js", + "esm/**/*.js.map", + "esm/**/*.d.ts", + "esm/**/*.d.ts.map", + "lib/**/*.ts", + "rollup.config.js", + "tsconfig.json" + ], + "scripts": { + "build": "tsc && rollup -c rollup.config.js && npm run minify", + "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 +} diff --git a/sdk/security/arm-security/rollup.config.js b/sdk/security/arm-security/rollup.config.js new file mode 100644 index 000000000000..43a7bd9aa064 --- /dev/null +++ b/sdk/security/arm-security/rollup.config.js @@ -0,0 +1,37 @@ +import rollup from "rollup"; +import nodeResolve from "rollup-plugin-node-resolve"; +import sourcemaps from "rollup-plugin-sourcemaps"; + +/** + * @type {rollup.RollupFileOptions} + */ +const config = { + input: "./esm/securityCenter.js", + external: [ + "@azure/ms-rest-js", + "@azure/ms-rest-azure-js" + ], + output: { + file: "./dist/arm-security.js", + format: "umd", + name: "Azure.ArmSecurity", + sourcemap: true, + globals: { + "@azure/ms-rest-js": "msRest", + "@azure/ms-rest-azure-js": "msRestAzure" + }, + banner: `/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */` + }, + plugins: [ + nodeResolve({ module: true }), + sourcemaps() + ] +}; + +export default config; diff --git a/sdk/security/arm-security/tsconfig.json b/sdk/security/arm-security/tsconfig.json new file mode 100644 index 000000000000..51ea90961ce5 --- /dev/null +++ b/sdk/security/arm-security/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "es6", + "moduleResolution": "node", + "strict": true, + "target": "es5", + "sourceMap": true, + "declarationMap": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "forceConsistentCasingInFileNames": true, + "lib": ["es6"], + "declaration": true, + "outDir": "./esm", + "importHelpers": true + }, + "include": ["./lib/**/*.ts"], + "exclude": ["node_modules"] +}