diff --git a/sdk/security/arm-security/CHANGELOG.md b/sdk/security/arm-security/CHANGELOG.md index 431afe6f7aa4..1efb1f4fd00e 100644 --- a/sdk/security/arm-security/CHANGELOG.md +++ b/sdk/security/arm-security/CHANGELOG.md @@ -1,16 +1,6 @@ # Release History - -## 6.0.0-beta.5 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - -## 6.0.0-beta.4 (2023-04-11) + +## 6.0.0-beta.5 (2023-06-19) **Features** @@ -21,11 +11,12 @@ - Added operation group Applications - Added operation group GovernanceAssignments - Added operation group GovernanceRules - - Added operation group HealthReportOperations - Added operation group HealthReports - Added operation group SecurityConnectorApplication - Added operation group SecurityConnectorApplications - Added operation group SecurityOperators + - Added operation group SensitivitySettings + - Added operation group ServerVulnerabilityAssessmentsSettings - Added operation Alerts.beginSimulate - Added operation Alerts.beginSimulateAndWait - Added operation Alerts.updateResourceGroupLevelStateToInProgress @@ -81,6 +72,8 @@ - Added Interface AzureDevOpsScopeEnvironmentData - Added Interface AzureResourceDetails - Added Interface AzureResourceIdentifier + - Added Interface AzureServersSetting + - Added Interface BuiltInInfoType - Added Interface CefExternalSecuritySolution - Added Interface CefSolutionProperties - Added Interface Compliance @@ -163,6 +156,11 @@ - Added Interface GcpOrganizationalDataOrganization - Added Interface GcpProjectDetails - Added Interface GcpProjectEnvironmentData + - Added Interface GetSensitivitySettingsListResponse + - Added Interface GetSensitivitySettingsOptionalParams + - Added Interface GetSensitivitySettingsResponse + - Added Interface GetSensitivitySettingsResponseProperties + - Added Interface GetSensitivitySettingsResponsePropertiesMipInformation - Added Interface GithubScopeEnvironmentData - Added Interface GitlabScopeEnvironmentData - Added Interface GovernanceAssignment @@ -191,7 +189,7 @@ - Added Interface GovernanceRulesOperationResultsOptionalParams - Added Interface HealthDataClassification - Added Interface HealthReport - - Added Interface HealthReportGetOptionalParams + - Added Interface HealthReportsGetOptionalParams - Added Interface HealthReportsList - Added Interface HealthReportsListNextOptionalParams - Added Interface HealthReportsListOptionalParams @@ -201,6 +199,7 @@ - Added Interface Identity - Added Interface InformationProtectionAwsOffering - Added Interface InformationProtectionPolicy + - Added Interface InfoType - Added Interface IngestionSetting - Added Interface IoTSecurityAggregatedAlert - Added Interface IoTSecurityAggregatedRecommendation @@ -208,6 +207,7 @@ - Added Interface IoTSecuritySolutionModel - Added Interface Issue - Added Interface JitNetworkAccessPolicy + - Added Interface Label - Added Interface ListCustomAlertRule - Added Interface LocalUserNotAllowed - Added Interface LogAnalyticsIdentifier @@ -226,6 +226,7 @@ - Added Interface RegulatoryComplianceControl - Added Interface RegulatoryComplianceStandard - Added Interface RemediationEta + - Added Interface ResourceAutoGenerated - Added Interface ResourceDetailsAutoGenerated - Added Interface RuleResults - Added Interface Scan @@ -259,7 +260,15 @@ - Added Interface SecuritySolutionsReferenceData - Added Interface SecuritySubAssessment - Added Interface SecurityTask + - Added Interface SensitivitySettingsListOptionalParams - Added Interface ServerVulnerabilityAssessment + - Added Interface ServerVulnerabilityAssessmentsSetting + - Added Interface ServerVulnerabilityAssessmentsSettingsCreateOrUpdateOptionalParams + - Added Interface ServerVulnerabilityAssessmentsSettingsDeleteOptionalParams + - Added Interface ServerVulnerabilityAssessmentsSettingsGetOptionalParams + - Added Interface ServerVulnerabilityAssessmentsSettingsList + - Added Interface ServerVulnerabilityAssessmentsSettingsListBySubscriptionNextOptionalParams + - Added Interface ServerVulnerabilityAssessmentsSettingsListBySubscriptionOptionalParams - Added Interface ServerVulnerabilityProperties - Added Interface Setting - Added Interface Software @@ -272,6 +281,8 @@ - Added Interface TwinUpdatesNotInAllowedRange - Added Interface UnauthorizedOperationsNotInAllowedRange - Added Interface UpdateIotSecuritySolutionData + - Added Interface UpdateSensitivitySettingsOptionalParams + - Added Interface UpdateSensitivitySettingsRequest - Added Interface WorkspaceSetting - Added Type Alias APICollectionGetResponse - Added Type Alias APICollectionListNextResponse @@ -289,6 +300,7 @@ - Added Type Alias EnvironmentDataUnion - Added Type Alias EnvironmentType - Added Type Alias GcpOrganizationalDataUnion + - Added Type Alias GetSensitivitySettingsOperationResponse - Added Type Alias GovernanceAssignmentsCreateOrUpdateResponse - Added Type Alias GovernanceAssignmentsGetResponse - Added Type Alias GovernanceAssignmentsListNextResponse @@ -303,15 +315,15 @@ - Added Type Alias GovernanceRulesOperationResultsResponse - Added Type Alias GovernanceRuleSourceResourceType - Added Type Alias GovernanceRuleType - - Added Type Alias HealthReportGetResponse + - Added Type Alias HealthReportsGetResponse - Added Type Alias HealthReportsListNextResponse - Added Type Alias HealthReportsListResponse - Added Type Alias IsEnabled - Added Type Alias MinimalSeverity + - Added Type Alias MipIntegrationStatus - Added Type Alias OperationResult - Added Type Alias Roles - Added Type Alias ScanningMode - - Added Type Alias ScopeName - Added Type Alias SecurityConnectorApplicationCreateOrUpdateResponse - Added Type Alias SecurityConnectorApplicationGetResponse - Added Type Alias SecurityConnectorApplicationsListNextResponse @@ -319,9 +331,19 @@ - Added Type Alias SecurityOperatorsCreateOrUpdateResponse - Added Type Alias SecurityOperatorsGetResponse - Added Type Alias SecurityOperatorsListResponse + - Added Type Alias SensitivitySettingsListResponse + - Added Type Alias ServerVulnerabilityAssessmentsAzureSettingSelectedProvider + - Added Type Alias ServerVulnerabilityAssessmentsSettingKind + - Added Type Alias ServerVulnerabilityAssessmentsSettingKindName + - Added Type Alias ServerVulnerabilityAssessmentsSettingsCreateOrUpdateResponse + - Added Type Alias ServerVulnerabilityAssessmentsSettingsGetResponse + - Added Type Alias ServerVulnerabilityAssessmentsSettingsListBySubscriptionNextResponse + - Added Type Alias ServerVulnerabilityAssessmentsSettingsListBySubscriptionResponse + - Added Type Alias ServerVulnerabilityAssessmentsSettingUnion - Added Type Alias StatusName - Added Type Alias SubPlan - Added Type Alias Type + - Added Type Alias UpdateSensitivitySettingsResponse - Interface AlertsSimulateOptionalParams has a new optional parameter resumeFrom - Interface AlertsSimulateOptionalParams has a new optional parameter updateIntervalInMs - Interface DefenderForServersAwsOfferingArcAutoProvisioning has a new optional parameter cloudRoleArn @@ -338,10 +360,13 @@ - Added Enum KnownGovernanceRuleType - Added Enum KnownIsEnabled - Added Enum KnownMinimalSeverity + - Added Enum KnownMipIntegrationStatus - Added Enum KnownOperationResult - Added Enum KnownRoles - Added Enum KnownScanningMode - - Added Enum KnownScopeName + - Added Enum KnownServerVulnerabilityAssessmentsAzureSettingSelectedProvider + - Added Enum KnownServerVulnerabilityAssessmentsSettingKind + - Added Enum KnownServerVulnerabilityAssessmentsSettingKindName - Added Enum KnownStatusName - Added Enum KnownSubPlan - Added Enum KnownType @@ -371,6 +396,7 @@ - Removed operation Alerts.simulate - Removed operation SecurityContacts.update - Operation AllowedConnections.get has a new signature + - Class SecurityCenter has a new signature - Interface AlertsSuppressionRulesListNextOptionalParams no longer has parameter alertType - Interface DefenderForServersAwsOfferingArcAutoProvisioning no longer has parameter servicePrincipalSecretMetadata - Interface IotSecuritySolutionListByResourceGroupNextOptionalParams no longer has parameter filter diff --git a/sdk/security/arm-security/_meta.json b/sdk/security/arm-security/_meta.json index 1206f6811cb9..4a71fe0c0541 100644 --- a/sdk/security/arm-security/_meta.json +++ b/sdk/security/arm-security/_meta.json @@ -1,8 +1,8 @@ { - "commit": "7561be58288fad1433038db3f1ccd9794773a03e", + "commit": "ac5d9572898ab4e5415c051afbfc0464d962c07a", "readme": "specification/security/resource-manager/readme.md", - "autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\security\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.10 --generate-sample=true", + "autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/security/resource-manager/readme.md --use=@autorest/typescript@^6.0.4", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.6.2", - "use": "@autorest/typescript@6.0.0-rc.10" + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.1", + "use": "@autorest/typescript@^6.0.4" } \ No newline at end of file diff --git a/sdk/security/arm-security/package.json b/sdk/security/arm-security/package.json index dea760841a0b..ba517ecee3d2 100644 --- a/sdk/security/arm-security/package.json +++ b/sdk/security/arm-security/package.json @@ -8,7 +8,7 @@ "node": ">=14.0.0" }, "dependencies": { - "@azure/core-lro": "^2.5.0", + "@azure/core-lro": "^2.5.3", "@azure/abort-controller": "^1.0.0", "@azure/core-paging": "^1.2.0", "@azure/core-client": "^1.7.0", @@ -111,13 +111,5 @@ ] }, "autoPublish": true, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/security/arm-security", - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-security?view=azure-node-preview" - } -} + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/security/arm-security" +} \ No newline at end of file diff --git a/sdk/security/arm-security/review/arm-security.api.md b/sdk/security/arm-security/review/arm-security.api.md index 142e3d7c90b7..8b96df4e4a12 100644 --- a/sdk/security/arm-security/review/arm-security.api.md +++ b/sdk/security/arm-security/review/arm-security.api.md @@ -1106,6 +1106,12 @@ export interface AzureResourceLink { readonly id?: string; } +// @public +export interface AzureServersSetting extends ServerVulnerabilityAssessmentsSetting { + kind: "AzureServersSetting"; + selectedProvider?: ServerVulnerabilityAssessmentsAzureSettingSelectedProvider; +} + // @public export interface AzureTrackedResourceLocation { location?: string; @@ -1131,6 +1137,13 @@ export interface BenchmarkReference { reference?: string; } +// @public +export interface BuiltInInfoType { + id?: string; + name?: string; + type?: string; +} + // @public export type BundleType = string; @@ -2294,6 +2307,43 @@ export interface GcpProjectEnvironmentData extends EnvironmentData { // @public export function getContinuationToken(page: unknown): string | undefined; +// @public +export interface GetSensitivitySettingsListResponse { + // (undocumented) + value?: GetSensitivitySettingsResponse[]; +} + +// @public +export type GetSensitivitySettingsOperationResponse = GetSensitivitySettingsResponse; + +// @public +export interface GetSensitivitySettingsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface GetSensitivitySettingsResponse { + readonly id?: string; + readonly name?: string; + properties?: GetSensitivitySettingsResponseProperties; + readonly type?: string; +} + +// @public +export interface GetSensitivitySettingsResponseProperties { + mipInformation?: GetSensitivitySettingsResponsePropertiesMipInformation; + sensitiveInfoTypesIds?: string[]; + sensitivityThresholdLabelId?: string; + sensitivityThresholdLabelOrder?: number; +} + +// @public +export interface GetSensitivitySettingsResponsePropertiesMipInformation { + builtInInfoTypes?: BuiltInInfoType[]; + customInfoTypes?: InfoType[]; + labels?: Label[]; + mipIntegrationStatus?: MipIntegrationStatus; +} + // @public export interface GithubScopeEnvironmentData extends EnvironmentData { environmentType: "GithubScope"; @@ -2512,35 +2562,35 @@ export type GovernanceRuleType = string; export interface HealthDataClassification { component?: string; scenario?: string; - scope?: ScopeName; + scope?: string; } // @public export interface HealthReport extends Resource { affectedDefendersPlans?: string[]; + affectedDefendersSubPlans?: string[]; environmentDetails?: EnvironmentDetails; healthDataClassification?: HealthDataClassification; issues?: Issue[]; + readonly reportAdditionalData?: { + [propertyName: string]: string; + }; resourceDetails?: ResourceDetailsAutoGenerated; status?: StatusAutoGenerated; } // @public -export interface HealthReportGetOptionalParams extends coreClient.OperationOptions { +export interface HealthReports { + get(resourceId: string, healthReportName: string, options?: HealthReportsGetOptionalParams): Promise; + list(scope: string, options?: HealthReportsListOptionalParams): PagedAsyncIterableIterator; } // @public -export type HealthReportGetResponse = HealthReport; - -// @public -export interface HealthReportOperations { - get(resourceId: string, healthReportName: string, options?: HealthReportGetOptionalParams): Promise; +export interface HealthReportsGetOptionalParams extends coreClient.OperationOptions { } // @public -export interface HealthReports { - list(scope: string, options?: HealthReportsListOptionalParams): PagedAsyncIterableIterator; -} +export type HealthReportsGetResponse = HealthReport; // @public export interface HealthReportsList { @@ -2686,6 +2736,13 @@ export interface InformationType { recommendedLabelId?: string; } +// @public +export interface InfoType { + description?: string; + id?: string; + name?: string; +} + // @public export interface IngestionConnectionString { readonly location?: string; @@ -3577,6 +3634,14 @@ export enum KnownMinimalSeverity { Medium = "Medium" } +// @public +export enum KnownMipIntegrationStatus { + NoAutoLabelingRules = "noAutoLabelingRules", + NoConsent = "noConsent", + NoMipLabels = "noMipLabels", + Ok = "Ok" +} + // @public export enum KnownOfferingType { CspmMonitorAws = "CspmMonitorAws", @@ -3774,14 +3839,6 @@ export enum KnownScanTriggerType { Recurring = "Recurring" } -// @public -export enum KnownScopeName { - Clusters = "Clusters", - Connectors = "Connectors", - Unknown = "Unknown", - VirtualMachines = "VirtualMachines" -} - // @public export enum KnownSecurityFamily { Ngfw = "Ngfw", @@ -3805,6 +3862,21 @@ export enum KnownServerVulnerabilityAssessmentPropertiesProvisioningState { Succeeded = "Succeeded" } +// @public +export enum KnownServerVulnerabilityAssessmentsAzureSettingSelectedProvider { + MdeTvm = "MdeTvm" +} + +// @public +export enum KnownServerVulnerabilityAssessmentsSettingKind { + AzureServersSetting = "AzureServersSetting" +} + +// @public +export enum KnownServerVulnerabilityAssessmentsSettingKindName { + AzureServersSetting = "azureServersSetting" +} + // @public export enum KnownSettingKind { AlertSuppressionSetting = "AlertSuppressionSetting", @@ -4076,6 +4148,13 @@ export enum KnownValueType { String = "String" } +// @public +export interface Label { + id?: string; + name?: string; + order?: number; +} + // @public export interface ListCustomAlertRule extends CustomAlertRule { ruleType: "ListCustomAlertRule" | "AllowlistCustomAlertRule" | "DenylistCustomAlertRule" | "ConnectionToIpNotAllowed" | "ConnectionFromIpNotAllowed" | "LocalUserNotAllowed" | "ProcessNotAllowed"; @@ -4166,6 +4245,9 @@ export type MdeOnboardingsListResponse = MdeOnboardingDataList; // @public export type MinimalSeverity = string; +// @public +export type MipIntegrationStatus = string; + // @public export interface MqttC2DMessagesNotInAllowedRange extends TimeWindowCustomAlertRule { ruleType: "MqttC2DMessagesNotInAllowedRange"; @@ -4556,6 +4638,14 @@ export interface Resource { readonly type?: string; } +// @public +export interface ResourceAutoGenerated { + readonly id?: string; + readonly name?: string; + readonly systemData?: SystemData; + readonly type?: string; +} + // @public export interface ResourceDetails { source: "Azure" | "OnPremise" | "OnPremiseSql"; @@ -4703,9 +4793,6 @@ export interface ScopeElement { field?: string; } -// @public -export type ScopeName = string; - // @public export interface SecureScoreControlDefinitionItem extends Resource { readonly assessmentDefinitions?: AzureResourceLink[]; @@ -5024,6 +5111,7 @@ export class SecurityCenter extends coreClient.ServiceClient { // (undocumented) $host: string; constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: SecurityCenterOptionalParams); + constructor(credentials: coreAuth.TokenCredential, options?: SecurityCenterOptionalParams); // (undocumented) adaptiveApplicationControls: AdaptiveApplicationControls; // (undocumented) @@ -5070,13 +5158,12 @@ export class SecurityCenter extends coreClient.ServiceClient { discoveredSecuritySolutions: DiscoveredSecuritySolutions; // (undocumented) externalSecuritySolutions: ExternalSecuritySolutions; + getSensitivitySettings(options?: GetSensitivitySettingsOptionalParams): Promise; // (undocumented) governanceAssignments: GovernanceAssignments; // (undocumented) governanceRules: GovernanceRules; // (undocumented) - healthReportOperations: HealthReportOperations; - // (undocumented) healthReports: HealthReports; // (undocumented) informationProtectionPolicies: InformationProtectionPolicies; @@ -5127,8 +5214,12 @@ export class SecurityCenter extends coreClient.ServiceClient { // (undocumented) securitySolutionsReferenceDataOperations: SecuritySolutionsReferenceDataOperations; // (undocumented) + sensitivitySettings: SensitivitySettings; + // (undocumented) serverVulnerabilityAssessmentOperations: ServerVulnerabilityAssessmentOperations; // (undocumented) + serverVulnerabilityAssessmentsSettings: ServerVulnerabilityAssessmentsSettings; + // (undocumented) settings: Settings; // (undocumented) softwareInventories: SoftwareInventories; @@ -5141,11 +5232,12 @@ export class SecurityCenter extends coreClient.ServiceClient { // (undocumented) subAssessments: SubAssessments; // (undocumented) - subscriptionId: string; + subscriptionId?: string; // (undocumented) tasks: Tasks; // (undocumented) topology: Topology; + updateSensitivitySettings(sensitivitySettings: UpdateSensitivitySettingsRequest, options?: UpdateSensitivitySettingsOptionalParams): Promise; // (undocumented) workspaceSettings: WorkspaceSettings; } @@ -5523,6 +5615,18 @@ export interface SensitivityLabel { rank?: Rank; } +// @public +export interface SensitivitySettings { + list(options?: SensitivitySettingsListOptionalParams): Promise; +} + +// @public +export interface SensitivitySettingsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SensitivitySettingsListResponse = GetSensitivitySettingsListResponse; + // @public export interface ServerVulnerabilityAssessment extends Resource { readonly provisioningState?: ServerVulnerabilityAssessmentPropertiesProvisioningState; @@ -5567,12 +5671,75 @@ export interface ServerVulnerabilityAssessmentOperations { // @public export type ServerVulnerabilityAssessmentPropertiesProvisioningState = string; +// @public +export type ServerVulnerabilityAssessmentsAzureSettingSelectedProvider = string; + // @public export interface ServerVulnerabilityAssessmentsList { // (undocumented) value?: ServerVulnerabilityAssessment[]; } +// @public +export interface ServerVulnerabilityAssessmentsSetting extends ResourceAutoGenerated { + kind: ServerVulnerabilityAssessmentsSettingKind; +} + +// @public +export type ServerVulnerabilityAssessmentsSettingKind = string; + +// @public +export type ServerVulnerabilityAssessmentsSettingKindName = string; + +// @public +export interface ServerVulnerabilityAssessmentsSettings { + createOrUpdate(settingKind: ServerVulnerabilityAssessmentsSettingKindName, serverVulnerabilityAssessmentsSetting: ServerVulnerabilityAssessmentsSettingUnion, options?: ServerVulnerabilityAssessmentsSettingsCreateOrUpdateOptionalParams): Promise; + delete(settingKind: ServerVulnerabilityAssessmentsSettingKindName, options?: ServerVulnerabilityAssessmentsSettingsDeleteOptionalParams): Promise; + get(settingKind: ServerVulnerabilityAssessmentsSettingKindName, options?: ServerVulnerabilityAssessmentsSettingsGetOptionalParams): Promise; + listBySubscription(options?: ServerVulnerabilityAssessmentsSettingsListBySubscriptionOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface ServerVulnerabilityAssessmentsSettingsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ServerVulnerabilityAssessmentsSettingsCreateOrUpdateResponse = ServerVulnerabilityAssessmentsSettingUnion; + +// @public +export interface ServerVulnerabilityAssessmentsSettingsDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface ServerVulnerabilityAssessmentsSettingsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ServerVulnerabilityAssessmentsSettingsGetResponse = ServerVulnerabilityAssessmentsSettingUnion; + +// @public +export interface ServerVulnerabilityAssessmentsSettingsList { + readonly nextLink?: string; + readonly value?: ServerVulnerabilityAssessmentsSettingUnion[]; +} + +// @public +export interface ServerVulnerabilityAssessmentsSettingsListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ServerVulnerabilityAssessmentsSettingsListBySubscriptionNextResponse = ServerVulnerabilityAssessmentsSettingsList; + +// @public +export interface ServerVulnerabilityAssessmentsSettingsListBySubscriptionOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ServerVulnerabilityAssessmentsSettingsListBySubscriptionResponse = ServerVulnerabilityAssessmentsSettingsList; + +// @public (undocumented) +export type ServerVulnerabilityAssessmentsSettingUnion = ServerVulnerabilityAssessmentsSetting | AzureServersSetting; + // @public export interface ServerVulnerabilityProperties extends AdditionalData { assessedResourceType: "ServerVulnerabilityAssessment"; @@ -5822,6 +5989,8 @@ export type Status = string; export interface StatusAutoGenerated { code?: StatusName; readonly firstEvaluationDate?: Date; + readonly lastScannedDate?: Date; + readonly reason?: string; readonly statusChangeDate?: Date; } @@ -6133,6 +6302,20 @@ export interface UpdateIotSecuritySolutionData extends TagsResource { userDefinedResources?: UserDefinedResourcesProperties; } +// @public +export interface UpdateSensitivitySettingsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface UpdateSensitivitySettingsRequest { + sensitiveInfoTypesIds: string[]; + sensitivityThresholdLabelId?: string; + sensitivityThresholdLabelOrder?: number; +} + +// @public +export type UpdateSensitivitySettingsResponse = GetSensitivitySettingsResponse; + // @public export interface UserDefinedResourcesProperties { query: string | null; diff --git a/sdk/security/arm-security/src/models/index.ts b/sdk/security/arm-security/src/models/index.ts index d0148a6bb102..3b48d04f6eee 100644 --- a/sdk/security/arm-security/src/models/index.ts +++ b/sdk/security/arm-security/src/models/index.ts @@ -83,6 +83,9 @@ export type ListCustomAlertRuleUnion = export type OnPremiseResourceDetailsUnion = | OnPremiseResourceDetails | OnPremiseSqlResourceDetails; +export type ServerVulnerabilityAssessmentsSettingUnion = + | ServerVulnerabilityAssessmentsSetting + | AzureServersSetting; export type TimeWindowCustomAlertRuleUnion = | TimeWindowCustomAlertRule | ActiveConnectionsNotInAllowedRange @@ -1520,6 +1523,96 @@ export interface AuthenticationDetailsProperties { readonly grantedPermissions?: PermissionProperty[]; } +/** Request to update data sensitivity settings for sensitive data discovery */ +export interface UpdateSensitivitySettingsRequest { + /** List of selected sensitive info types' IDs. */ + sensitiveInfoTypesIds: string[]; + /** The order of the sensitivity threshold label. Any label at or above this order will be considered sensitive. If set to -1, sensitivity by labels is turned off */ + sensitivityThresholdLabelOrder?: number; + /** The id of the sensitivity threshold label. Any label at or above this rank will be considered sensitive. */ + sensitivityThresholdLabelId?: string; +} + +/** Data sensitivity settings for sensitive data discovery */ +export interface GetSensitivitySettingsResponse { + /** + * The ID of the sensitivity settings + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * The type of the sensitivity settings + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** + * The name of the sensitivity settings + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** The sensitivity settings properties */ + properties?: GetSensitivitySettingsResponseProperties; +} + +/** The sensitivity settings properties */ +export interface GetSensitivitySettingsResponseProperties { + /** List of selected sensitive info types' IDs. */ + sensitiveInfoTypesIds?: string[]; + /** The order of the sensitivity threshold label. Any label at or above this order will be considered sensitive. If set to -1, sensitivity by labels is turned off */ + sensitivityThresholdLabelOrder?: number; + /** The id of the sensitivity threshold label. Any label at or above this rank will be considered sensitive. */ + sensitivityThresholdLabelId?: string; + /** Microsoft information protection built-in and custom information types, labels, and integration status. */ + mipInformation?: GetSensitivitySettingsResponsePropertiesMipInformation; +} + +/** Microsoft information protection built-in and custom information types, labels, and integration status. */ +export interface GetSensitivitySettingsResponsePropertiesMipInformation { + /** Microsoft information protection integration status */ + mipIntegrationStatus?: MipIntegrationStatus; + /** List of Microsoft information protection sensitivity labels */ + labels?: Label[]; + /** List of custom user-defined information types */ + customInfoTypes?: InfoType[]; + /** List of pre-configured sensitive information types */ + builtInInfoTypes?: BuiltInInfoType[]; +} + +/** Microsoft information protection sensitivity label */ +export interface Label { + /** The display name of the label */ + name?: string; + /** The ID of the label */ + id?: string; + /** Labels are ordered by sensitivity level. The higher the order of the label, the more sensitive it is. */ + order?: number; +} + +/** Custom user-defined information type */ +export interface InfoType { + /** Display name of the info type */ + name?: string; + /** Id of the info type */ + id?: string; + /** Description of the info type */ + description?: string; +} + +/** Pre-configured sensitive information type */ +export interface BuiltInInfoType { + /** Display name of the info type */ + name?: string; + /** Id of the info type */ + id?: string; + /** Category of the built-in info type */ + type?: string; +} + +/** A list with a single sensitivity settings resource */ +export interface GetSensitivitySettingsListResponse { + value?: GetSensitivitySettingsResponse[]; +} + /** List of security alerts */ export interface AlertList { /** describes security alert properties. */ @@ -1809,129 +1902,6 @@ export interface ErrorDetail { readonly additionalInfo?: ErrorAdditionalInfo[]; } -/** Page of health reports list */ -export interface HealthReportsList { - /** - * Collection of health reports in this page - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: HealthReport[]; - /** - * 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; -} - -/** The resource details of the health report */ -export interface ResourceDetailsAutoGenerated { - /** The status of the health report */ - source?: Source; - /** - * The azure id of the resource - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** - * The id of the connector - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly connectorId?: string; -} - -/** The environment details of the resource */ -export interface EnvironmentDetails { - /** The native resource id of the resource (in case of Azure - the resource Id, in case of MC - the native resource id) */ - nativeResourceId?: string; - /** The hierarchy id of the connector (in case of Azure - the subscription Id, in case of MC - the hierarchyId id) */ - environmentHierarchyId?: string; - /** The organizational hierarchy id of the connector (in case of Azure - the subscription Id, in case of MC - the organizational hierarchyId id) */ - organizationalHierarchyId?: string; - /** The subscription Id */ - subscriptionId?: string; - /** The tenant Id */ - tenantId?: string; -} - -/** The classification of the health report */ -export interface HealthDataClassification { - /** The component describes the name of the agent/service that scans the issue */ - component?: string; - /** The scenario describes the health scenario issue of the component */ - scenario?: string; - /** The resource scope of the health report */ - scope?: ScopeName; -} - -/** The status of the health report */ -export interface StatusAutoGenerated { - /** The status of the health report */ - code?: StatusName; - /** - * The date of when the status of the health report was changed in the last time - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly statusChangeDate?: Date; - /** - * The date of when the resource of the health report was scanned in the first time - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly firstEvaluationDate?: Date; -} - -/** The issue that caused the resource to by unhealthy */ -export interface Issue { - /** The unique issue key */ - issueKey: string; - /** The issue name */ - issueName?: string; - /** The affected security values that MDC offers that will be affected by the issue, for example: recommendations, alerts, etc */ - securityValues?: string[]; - /** The issue description */ - issueDescription?: string; - /** Human readable description of what you should do to mitigate this health issue */ - remediationSteps?: string; - /** The remediation script to solve this issue */ - remediationScript?: string; - /** Additional data for the given issue. The additional data depends on the issue type */ - issueAdditionalData?: { [propertyName: string]: string }; -} - -/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */ -export interface ErrorResponseAutoGenerated { - /** The error object. */ - error?: ErrorDetailAutoGenerated; -} - -/** The error detail. */ -export interface ErrorDetailAutoGenerated { - /** - * The error code. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly code?: string; - /** - * The error message. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly message?: string; - /** - * The error target. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly target?: string; - /** - * The error details. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly details?: ErrorDetailAutoGenerated[]; - /** - * The error additional info. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly additionalInfo?: ErrorAdditionalInfo[]; -} - /** A vulnerability assessment scan record properties. */ export interface ScanProperties { /** The scan trigger type. */ @@ -2174,6 +2144,177 @@ export interface Identity { type?: "SystemAssigned"; } +/** A page of a server vulnerability assessments settings list */ +export interface ServerVulnerabilityAssessmentsSettingsList { + /** + * A collection of server vulnerability assessments settings in this page + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: ServerVulnerabilityAssessmentsSettingUnion[]; + /** + * 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; +} + +/** Common fields that are returned in the response for all Azure Resource Manager resources */ +export interface ResourceAutoGenerated { + /** + * Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * The name of the resource + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; +} + +/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */ +export interface ErrorResponseAutoGenerated { + /** The error object. */ + error?: ErrorDetailAutoGenerated; +} + +/** The error detail. */ +export interface ErrorDetailAutoGenerated { + /** + * The error code. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly code?: string; + /** + * The error message. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly message?: string; + /** + * The error target. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly target?: string; + /** + * The error details. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly details?: ErrorDetailAutoGenerated[]; + /** + * The error additional info. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly additionalInfo?: ErrorAdditionalInfo[]; +} + +/** Page of health reports list */ +export interface HealthReportsList { + /** + * Collection of health reports in this page + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: HealthReport[]; + /** + * 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; +} + +/** The resource details of the health report */ +export interface ResourceDetailsAutoGenerated { + /** The status of the health report */ + source?: Source; + /** + * The azure id of the resource + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * The id of the connector + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly connectorId?: string; +} + +/** The environment details of the resource */ +export interface EnvironmentDetails { + /** The native resource id of the resource (in case of Azure - the resource Id, in case of MC - the native resource id) */ + nativeResourceId?: string; + /** The hierarchy id of the connector (in case of Azure - the subscription Id, in case of MC - the hierarchyId id) */ + environmentHierarchyId?: string; + /** The organizational hierarchy id of the connector (in case of Azure - the subscription Id, in case of MC - the organizational hierarchyId id) */ + organizationalHierarchyId?: string; + /** The subscription Id */ + subscriptionId?: string; + /** The tenant Id */ + tenantId?: string; +} + +/** The classification of the health report */ +export interface HealthDataClassification { + /** The component describes the name of the agent/service that scans the issue */ + component?: string; + /** The scenario describes the health scenario issue of the component */ + scenario?: string; + /** The resource scope of the health report */ + scope?: string; +} + +/** The status of the health report */ +export interface StatusAutoGenerated { + /** The status of the health report */ + code?: StatusName; + /** + * The reason of the given status + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly reason?: string; + /** + * The date of when the resource was scanned in the last time + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly lastScannedDate?: Date; + /** + * The date of when the status of the health report was changed in the last time + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly statusChangeDate?: Date; + /** + * The date of when the resource of the health report was scanned in the first time + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly firstEvaluationDate?: Date; +} + +/** The issue that caused the resource to by unhealthy */ +export interface Issue { + /** The unique issue key */ + issueKey: string; + /** The issue name */ + issueName?: string; + /** The affected security values that MDC offers that will be affected by the issue, for example: recommendations, alerts, etc */ + securityValues?: string[]; + /** The issue description */ + issueDescription?: string; + /** Human readable description of what you should do to mitigate this health issue */ + remediationSteps?: string; + /** The remediation script to solve this issue */ + remediationScript?: string; + /** Additional data for the given issue. The additional data depends on the issue type */ + issueAdditionalData?: { [propertyName: string]: string }; +} + /** CVSS details */ export interface Cvss { /** @@ -3730,22 +3871,6 @@ export interface ApiCollectionResponse extends Resource { additionalData?: { [propertyName: string]: string }; } -/** The health report resource */ -export interface HealthReport extends Resource { - /** The resource details of the health report */ - resourceDetails?: ResourceDetailsAutoGenerated; - /** The environment details of the resource */ - environmentDetails?: EnvironmentDetails; - /** The classification of the health report */ - healthDataClassification?: HealthDataClassification; - /** The status of the health report */ - status?: StatusAutoGenerated; - /** The affected defenders plans by unhealthy report */ - affectedDefendersPlans?: string[]; - /** A collection of the issues in the report */ - issues?: Issue[]; -} - /** A vulnerability assessment scan record. */ export interface Scan extends Resource { /** A vulnerability assessment scan record properties. */ @@ -3770,6 +3895,29 @@ export interface SecurityOperator extends Resource { identity?: Identity; } +/** The health report resource */ +export interface HealthReport extends Resource { + /** The resource details of the health report */ + resourceDetails?: ResourceDetailsAutoGenerated; + /** The environment details of the resource */ + environmentDetails?: EnvironmentDetails; + /** The classification of the health report */ + healthDataClassification?: HealthDataClassification; + /** The status of the health report */ + status?: StatusAutoGenerated; + /** The affected defenders plans by unhealthy report */ + affectedDefendersPlans?: string[]; + /** The affected defenders sub plans by unhealthy report */ + affectedDefendersSubPlans?: string[]; + /** + * Additional data for the given health report, this field can include more details on the resource and the health scenario. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly reportAdditionalData?: { [propertyName: string]: string }; + /** A collection of the issues in the report */ + issues?: Issue[]; +} + /** Security assessment metadata */ export interface SecurityAssessmentMetadata extends Resource { /** User friendly display name of the assessment */ @@ -4373,6 +4521,13 @@ export interface GitlabScopeEnvironmentData extends EnvironmentData { environmentType: "GitlabScope"; } +/** A base vulnerability assessments setting on servers in the defined scope. */ +export interface ServerVulnerabilityAssessmentsSetting + extends ResourceAutoGenerated { + /** The kind of the server vulnerability assessments setting. */ + kind: ServerVulnerabilityAssessmentsSettingKind; +} + /** The external security solution properties for CEF solutions */ export interface CefSolutionProperties extends ExternalSecuritySolutionProperties { @@ -4564,6 +4719,15 @@ export interface OnPremiseSqlResourceDetails extends OnPremiseResourceDetails { databaseName: string; } +/** A vulnerability assessments setting on Azure servers in the defined scope. */ +export interface AzureServersSetting + extends ServerVulnerabilityAssessmentsSetting { + /** Polymorphic discriminator, which specifies the different types this object can be */ + kind: "AzureServersSetting"; + /** The selected vulnerability assessments provider on Azure servers in the defined scope. */ + selectedProvider?: ServerVulnerabilityAssessmentsAzureSettingSelectedProvider; +} + /** Number of active connections is not in allowed range. */ export interface ActiveConnectionsNotInAllowedRange extends TimeWindowCustomAlertRule { @@ -6500,6 +6664,30 @@ export enum KnownAuthenticationType { */ export type AuthenticationType = string; +/** Known values of {@link MipIntegrationStatus} that the service accepts. */ +export enum KnownMipIntegrationStatus { + /** Ok */ + Ok = "Ok", + /** NoConsent */ + NoConsent = "noConsent", + /** NoAutoLabelingRules */ + NoAutoLabelingRules = "noAutoLabelingRules", + /** NoMipLabels */ + NoMipLabels = "noMipLabels" +} + +/** + * Defines values for MipIntegrationStatus. \ + * {@link KnownMipIntegrationStatus} can be used interchangeably with MipIntegrationStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Ok** \ + * **noConsent** \ + * **noAutoLabelingRules** \ + * **noMipLabels** + */ +export type MipIntegrationStatus = string; + /** Known values of {@link AlertSeverity} that the service accepts. */ export enum KnownAlertSeverity { /** Informational */ @@ -6803,51 +6991,6 @@ export enum KnownApplicationSourceResourceType { */ export type ApplicationSourceResourceType = string; -/** Known values of {@link ScopeName} that the service accepts. */ -export enum KnownScopeName { - /** Connectors */ - Connectors = "Connectors", - /** Clusters */ - Clusters = "Clusters", - /** VirtualMachines */ - VirtualMachines = "VirtualMachines", - /** Unknown */ - Unknown = "Unknown" -} - -/** - * Defines values for ScopeName. \ - * {@link KnownScopeName} can be used interchangeably with ScopeName, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Connectors** \ - * **Clusters** \ - * **VirtualMachines** \ - * **Unknown** - */ -export type ScopeName = string; - -/** Known values of {@link StatusName} that the service accepts. */ -export enum KnownStatusName { - /** Healthy */ - Healthy = "Healthy", - /** NotHealthy */ - NotHealthy = "NotHealthy", - /** NotApplicable */ - NotApplicable = "NotApplicable" -} - -/** - * Defines values for StatusName. \ - * {@link KnownStatusName} can be used interchangeably with StatusName, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Healthy** \ - * **NotHealthy** \ - * **NotApplicable** - */ -export type StatusName = string; - /** Known values of {@link ScanTriggerType} that the service accepts. */ export enum KnownScanTriggerType { /** OnDemand */ @@ -7082,6 +7225,57 @@ export enum KnownEnvironmentType { */ export type EnvironmentType = string; +/** Known values of {@link ServerVulnerabilityAssessmentsSettingKind} that the service accepts. */ +export enum KnownServerVulnerabilityAssessmentsSettingKind { + /** AzureServersSetting */ + AzureServersSetting = "AzureServersSetting" +} + +/** + * Defines values for ServerVulnerabilityAssessmentsSettingKind. \ + * {@link KnownServerVulnerabilityAssessmentsSettingKind} can be used interchangeably with ServerVulnerabilityAssessmentsSettingKind, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **AzureServersSetting** + */ +export type ServerVulnerabilityAssessmentsSettingKind = string; + +/** Known values of {@link ServerVulnerabilityAssessmentsSettingKindName} that the service accepts. */ +export enum KnownServerVulnerabilityAssessmentsSettingKindName { + /** AzureServersSetting */ + AzureServersSetting = "azureServersSetting" +} + +/** + * Defines values for ServerVulnerabilityAssessmentsSettingKindName. \ + * {@link KnownServerVulnerabilityAssessmentsSettingKindName} can be used interchangeably with ServerVulnerabilityAssessmentsSettingKindName, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **azureServersSetting** + */ +export type ServerVulnerabilityAssessmentsSettingKindName = string; + +/** Known values of {@link StatusName} that the service accepts. */ +export enum KnownStatusName { + /** Healthy */ + Healthy = "Healthy", + /** NotHealthy */ + NotHealthy = "NotHealthy", + /** NotApplicable */ + NotApplicable = "NotApplicable" +} + +/** + * Defines values for StatusName. \ + * {@link KnownStatusName} can be used interchangeably with StatusName, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Healthy** \ + * **NotHealthy** \ + * **NotApplicable** + */ +export type StatusName = string; + /** Known values of {@link AadConnectivityState} that the service accepts. */ export enum KnownAadConnectivityState { /** Discovered */ @@ -7249,6 +7443,21 @@ export enum KnownScanningMode { * **Default** */ export type ScanningMode = string; + +/** Known values of {@link ServerVulnerabilityAssessmentsAzureSettingSelectedProvider} that the service accepts. */ +export enum KnownServerVulnerabilityAssessmentsAzureSettingSelectedProvider { + /** Microsoft Defender for Endpoints threat and vulnerability management. */ + MdeTvm = "MdeTvm" +} + +/** + * Defines values for ServerVulnerabilityAssessmentsAzureSettingSelectedProvider. \ + * {@link KnownServerVulnerabilityAssessmentsAzureSettingSelectedProvider} can be used interchangeably with ServerVulnerabilityAssessmentsAzureSettingSelectedProvider, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **MdeTvm**: Microsoft Defender for Endpoints threat and vulnerability management. + */ +export type ServerVulnerabilityAssessmentsAzureSettingSelectedProvider = string; /** Defines values for Rank. */ export type Rank = "None" | "Low" | "Medium" | "High" | "Critical"; /** Defines values for RuleState. */ @@ -8572,6 +8781,27 @@ export interface ConnectorsListNextOptionalParams /** Contains response data for the listNext operation. */ export type ConnectorsListNextResponse = ConnectorSettingList; +/** Optional parameters. */ +export interface UpdateSensitivitySettingsOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the updateSensitivitySettings operation. */ +export type UpdateSensitivitySettingsResponse = GetSensitivitySettingsResponse; + +/** Optional parameters. */ +export interface GetSensitivitySettingsOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getSensitivitySettings operation. */ +export type GetSensitivitySettingsOperationResponse = GetSensitivitySettingsResponse; + +/** Optional parameters. */ +export interface SensitivitySettingsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type SensitivitySettingsListResponse = GetSensitivitySettingsListResponse; + /** Optional parameters. */ export interface AlertsListOptionalParams extends coreClient.OperationOptions {} @@ -8977,27 +9207,6 @@ export type APICollectionOnboardingCreateResponse = ApiCollectionResponse; export interface APICollectionOffboardingDeleteOptionalParams extends coreClient.OperationOptions {} -/** Optional parameters. */ -export interface HealthReportsListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type HealthReportsListResponse = HealthReportsList; - -/** Optional parameters. */ -export interface HealthReportsListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type HealthReportsListNextResponse = HealthReportsList; - -/** Optional parameters. */ -export interface HealthReportGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type HealthReportGetResponse = HealthReport; - /** Optional parameters. */ export interface SqlVulnerabilityAssessmentScansGetOptionalParams extends coreClient.OperationOptions {} @@ -9142,6 +9351,59 @@ export type SecurityOperatorsCreateOrUpdateResponse = SecurityOperator; export interface SecurityOperatorsDeleteOptionalParams extends coreClient.OperationOptions {} +/** Optional parameters. */ +export interface ServerVulnerabilityAssessmentsSettingsListBySubscriptionOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscription operation. */ +export type ServerVulnerabilityAssessmentsSettingsListBySubscriptionResponse = ServerVulnerabilityAssessmentsSettingsList; + +/** Optional parameters. */ +export interface ServerVulnerabilityAssessmentsSettingsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ServerVulnerabilityAssessmentsSettingsGetResponse = ServerVulnerabilityAssessmentsSettingUnion; + +/** Optional parameters. */ +export interface ServerVulnerabilityAssessmentsSettingsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the createOrUpdate operation. */ +export type ServerVulnerabilityAssessmentsSettingsCreateOrUpdateResponse = ServerVulnerabilityAssessmentsSettingUnion; + +/** Optional parameters. */ +export interface ServerVulnerabilityAssessmentsSettingsDeleteOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface ServerVulnerabilityAssessmentsSettingsListBySubscriptionNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscriptionNext operation. */ +export type ServerVulnerabilityAssessmentsSettingsListBySubscriptionNextResponse = ServerVulnerabilityAssessmentsSettingsList; + +/** Optional parameters. */ +export interface HealthReportsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type HealthReportsListResponse = HealthReportsList; + +/** Optional parameters. */ +export interface HealthReportsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type HealthReportsGetResponse = HealthReport; + +/** Optional parameters. */ +export interface HealthReportsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type HealthReportsListNextResponse = HealthReportsList; + /** Optional parameters. */ export interface SecurityCenterOptionalParams extends coreClient.ServiceClientOptions { diff --git a/sdk/security/arm-security/src/models/mappers.ts b/sdk/security/arm-security/src/models/mappers.ts index 99464b1fe025..00c697678005 100644 --- a/sdk/security/arm-security/src/models/mappers.ts +++ b/sdk/security/arm-security/src/models/mappers.ts @@ -3609,6 +3609,268 @@ export const AuthenticationDetailsProperties: coreClient.CompositeMapper = { } }; +export const UpdateSensitivitySettingsRequest: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "UpdateSensitivitySettingsRequest", + modelProperties: { + sensitiveInfoTypesIds: { + serializedName: "sensitiveInfoTypesIds", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Uuid" + } + } + } + }, + sensitivityThresholdLabelOrder: { + serializedName: "sensitivityThresholdLabelOrder", + type: { + name: "Number" + } + }, + sensitivityThresholdLabelId: { + serializedName: "sensitivityThresholdLabelId", + type: { + name: "Uuid" + } + } + } + } +}; + +export const GetSensitivitySettingsResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GetSensitivitySettingsResponse", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "GetSensitivitySettingsResponseProperties" + } + } + } + } +}; + +export const GetSensitivitySettingsResponseProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GetSensitivitySettingsResponseProperties", + modelProperties: { + sensitiveInfoTypesIds: { + serializedName: "sensitiveInfoTypesIds", + type: { + name: "Sequence", + element: { + type: { + name: "Uuid" + } + } + } + }, + sensitivityThresholdLabelOrder: { + serializedName: "sensitivityThresholdLabelOrder", + type: { + name: "Number" + } + }, + sensitivityThresholdLabelId: { + serializedName: "sensitivityThresholdLabelId", + type: { + name: "Uuid" + } + }, + mipInformation: { + serializedName: "mipInformation", + type: { + name: "Composite", + className: "GetSensitivitySettingsResponsePropertiesMipInformation" + } + } + } + } +}; + +export const GetSensitivitySettingsResponsePropertiesMipInformation: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GetSensitivitySettingsResponsePropertiesMipInformation", + modelProperties: { + mipIntegrationStatus: { + serializedName: "mipIntegrationStatus", + type: { + name: "String" + } + }, + labels: { + serializedName: "labels", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Label" + } + } + } + }, + customInfoTypes: { + serializedName: "customInfoTypes", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "InfoType" + } + } + } + }, + builtInInfoTypes: { + serializedName: "builtInInfoTypes", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BuiltInInfoType" + } + } + } + } + } + } +}; + +export const Label: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Label", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + id: { + serializedName: "id", + type: { + name: "Uuid" + } + }, + order: { + serializedName: "order", + type: { + name: "Number" + } + } + } + } +}; + +export const InfoType: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "InfoType", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + id: { + serializedName: "id", + type: { + name: "Uuid" + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + } + } + } +}; + +export const BuiltInInfoType: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "BuiltInInfoType", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + id: { + serializedName: "id", + type: { + name: "Uuid" + } + }, + type: { + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const GetSensitivitySettingsListResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GetSensitivitySettingsListResponse", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "GetSensitivitySettingsResponse" + } + } + } + } + } + } +}; + export const AlertList: coreClient.CompositeMapper = { type: { name: "Composite", @@ -4249,281 +4511,274 @@ export const ErrorDetail: coreClient.CompositeMapper = { } }; -export const HealthReportsList: coreClient.CompositeMapper = { +export const ScanProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "HealthReportsList", + className: "ScanProperties", modelProperties: { - value: { - serializedName: "value", - readOnly: true, + triggerType: { + serializedName: "triggerType", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "HealthReport" - } - } + name: "String" } }, - nextLink: { - serializedName: "nextLink", - readOnly: true, + state: { + serializedName: "state", type: { name: "String" } - } - } - } -}; - -export const ResourceDetailsAutoGenerated: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ResourceDetailsAutoGenerated", - modelProperties: { - source: { - serializedName: "source", + }, + server: { + serializedName: "server", type: { name: "String" } }, - id: { - serializedName: "id", - readOnly: true, + database: { + serializedName: "database", type: { name: "String" } }, - connectorId: { - serializedName: "connectorId", - readOnly: true, + sqlVersion: { + serializedName: "sqlVersion", type: { name: "String" } - } - } - } -}; - -export const EnvironmentDetails: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "EnvironmentDetails", - modelProperties: { - nativeResourceId: { - serializedName: "nativeResourceId", + }, + startTime: { + serializedName: "startTime", type: { - name: "String" + name: "DateTime" } }, - environmentHierarchyId: { - serializedName: "environmentHierarchyId", + endTime: { + serializedName: "endTime", type: { - name: "String" + name: "DateTime" } }, - organizationalHierarchyId: { - serializedName: "organizationalHierarchyId", + highSeverityFailedRulesCount: { + serializedName: "highSeverityFailedRulesCount", type: { - name: "String" + name: "Number" } }, - subscriptionId: { - serializedName: "subscriptionId", + mediumSeverityFailedRulesCount: { + serializedName: "mediumSeverityFailedRulesCount", type: { - name: "String" + name: "Number" } }, - tenantId: { - serializedName: "tenantId", + lowSeverityFailedRulesCount: { + serializedName: "lowSeverityFailedRulesCount", type: { - name: "String" + name: "Number" } - } - } - } -}; - -export const HealthDataClassification: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "HealthDataClassification", - modelProperties: { - component: { - serializedName: "component", + }, + totalPassedRulesCount: { + serializedName: "totalPassedRulesCount", type: { - name: "String" + name: "Number" } }, - scenario: { - serializedName: "scenario", + totalFailedRulesCount: { + serializedName: "totalFailedRulesCount", type: { - name: "String" + name: "Number" } }, - scope: { - serializedName: "scope", + totalRulesCount: { + serializedName: "totalRulesCount", type: { - name: "String" + name: "Number" + } + }, + isBaselineApplied: { + serializedName: "isBaselineApplied", + type: { + name: "Boolean" + } + }, + lastScanTime: { + serializedName: "lastScanTime", + type: { + name: "DateTime" } } } } }; -export const StatusAutoGenerated: coreClient.CompositeMapper = { +export const Scans: coreClient.CompositeMapper = { type: { name: "Composite", - className: "StatusAutoGenerated", + className: "Scans", modelProperties: { - code: { - serializedName: "code", - type: { - name: "String" - } - }, - statusChangeDate: { - serializedName: "statusChangeDate", - readOnly: true, - type: { - name: "DateTime" - } - }, - firstEvaluationDate: { - serializedName: "firstEvaluationDate", - readOnly: true, + value: { + serializedName: "value", type: { - name: "DateTime" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Scan" + } + } } } } } }; -export const Issue: coreClient.CompositeMapper = { +export const ScanResultProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Issue", + className: "ScanResultProperties", modelProperties: { - issueKey: { - serializedName: "issueKey", - required: true, + ruleId: { + serializedName: "ruleId", type: { name: "String" } }, - issueName: { - serializedName: "issueName", + status: { + serializedName: "status", type: { name: "String" } }, - securityValues: { - serializedName: "securityValues", + isTrimmed: { + serializedName: "isTrimmed", + type: { + name: "Boolean" + } + }, + queryResults: { + serializedName: "queryResults", type: { name: "Sequence", element: { type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } } } }, - issueDescription: { - serializedName: "issueDescription", - type: { - name: "String" - } - }, - remediationSteps: { - serializedName: "remediationSteps", + remediation: { + serializedName: "remediation", type: { - name: "String" + name: "Composite", + className: "Remediation" } }, - remediationScript: { - serializedName: "remediationScript", + baselineAdjustedResult: { + serializedName: "baselineAdjustedResult", type: { - name: "String" + name: "Composite", + className: "BaselineAdjustedResult" } }, - issueAdditionalData: { - serializedName: "issueAdditionalData", + ruleMetadata: { + serializedName: "ruleMetadata", type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "Composite", + className: "VaRule" } } } } }; -export const ErrorResponseAutoGenerated: coreClient.CompositeMapper = { +export const Remediation: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ErrorResponseAutoGenerated", + className: "Remediation", modelProperties: { - error: { - serializedName: "error", + description: { + serializedName: "description", type: { - name: "Composite", - className: "ErrorDetailAutoGenerated" + name: "String" + } + }, + scripts: { + serializedName: "scripts", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + automated: { + serializedName: "automated", + type: { + name: "Boolean" + } + }, + portalLink: { + serializedName: "portalLink", + type: { + name: "String" } } } } }; -export const ErrorDetailAutoGenerated: coreClient.CompositeMapper = { +export const BaselineAdjustedResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ErrorDetailAutoGenerated", + className: "BaselineAdjustedResult", modelProperties: { - code: { - serializedName: "code", - readOnly: true, - type: { - name: "String" - } - }, - message: { - serializedName: "message", - readOnly: true, + baseline: { + serializedName: "baseline", type: { - name: "String" + name: "Composite", + className: "Baseline" } }, - target: { - serializedName: "target", - readOnly: true, + status: { + serializedName: "status", type: { name: "String" } }, - details: { - serializedName: "details", - readOnly: true, + resultsNotInBaseline: { + serializedName: "resultsNotInBaseline", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "ErrorDetailAutoGenerated" + name: "Sequence", + element: { + type: { + name: "String" + } + } } } } }, - additionalInfo: { - serializedName: "additionalInfo", - readOnly: true, + resultsOnlyInBaseline: { + serializedName: "resultsOnlyInBaseline", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "ErrorAdditionalInfo" + name: "Sequence", + element: { + type: { + name: "String" + } + } } } } @@ -4532,118 +4787,99 @@ export const ErrorDetailAutoGenerated: coreClient.CompositeMapper = { } }; -export const ScanProperties: coreClient.CompositeMapper = { +export const Baseline: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ScanProperties", + className: "Baseline", modelProperties: { - triggerType: { - serializedName: "triggerType", + expectedResults: { + serializedName: "expectedResults", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } } }, - state: { - serializedName: "state", + updatedTime: { + serializedName: "updatedTime", type: { - name: "String" + name: "DateTime" } - }, - server: { - serializedName: "server", + } + } + } +}; + +export const VaRule: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VaRule", + modelProperties: { + ruleId: { + serializedName: "ruleId", type: { name: "String" } }, - database: { - serializedName: "database", + severity: { + serializedName: "severity", type: { name: "String" } }, - sqlVersion: { - serializedName: "sqlVersion", + category: { + serializedName: "category", type: { name: "String" } }, - startTime: { - serializedName: "startTime", - type: { - name: "DateTime" - } - }, - endTime: { - serializedName: "endTime", - type: { - name: "DateTime" - } - }, - highSeverityFailedRulesCount: { - serializedName: "highSeverityFailedRulesCount", - type: { - name: "Number" - } - }, - mediumSeverityFailedRulesCount: { - serializedName: "mediumSeverityFailedRulesCount", - type: { - name: "Number" - } - }, - lowSeverityFailedRulesCount: { - serializedName: "lowSeverityFailedRulesCount", + ruleType: { + serializedName: "ruleType", type: { - name: "Number" + name: "String" } }, - totalPassedRulesCount: { - serializedName: "totalPassedRulesCount", + title: { + serializedName: "title", type: { - name: "Number" + name: "String" } }, - totalFailedRulesCount: { - serializedName: "totalFailedRulesCount", + description: { + serializedName: "description", type: { - name: "Number" + name: "String" } }, - totalRulesCount: { - serializedName: "totalRulesCount", + rationale: { + serializedName: "rationale", type: { - name: "Number" + name: "String" } }, - isBaselineApplied: { - serializedName: "isBaselineApplied", + queryCheck: { + serializedName: "queryCheck", type: { - name: "Boolean" + name: "Composite", + className: "QueryCheck" } }, - lastScanTime: { - serializedName: "lastScanTime", - type: { - name: "DateTime" - } - } - } - } -}; - -export const Scans: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Scans", - modelProperties: { - value: { - serializedName: "value", + benchmarkReferences: { + serializedName: "benchmarkReferences", type: { name: "Sequence", element: { type: { name: "Composite", - className: "Scan" + className: "BenchmarkReference" } } } @@ -4652,31 +4888,19 @@ export const Scans: coreClient.CompositeMapper = { } }; -export const ScanResultProperties: coreClient.CompositeMapper = { +export const QueryCheck: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ScanResultProperties", + className: "QueryCheck", modelProperties: { - ruleId: { - serializedName: "ruleId", - type: { - name: "String" - } - }, - status: { - serializedName: "status", + query: { + serializedName: "query", type: { name: "String" } }, - isTrimmed: { - serializedName: "isTrimmed", - type: { - name: "Boolean" - } - }, - queryResults: { - serializedName: "queryResults", + expectedResult: { + serializedName: "expectedResult", type: { name: "Sequence", element: { @@ -4691,89 +4915,76 @@ export const ScanResultProperties: coreClient.CompositeMapper = { } } }, - remediation: { - serializedName: "remediation", + columnNames: { + serializedName: "columnNames", type: { - name: "Composite", - className: "Remediation" + name: "Sequence", + element: { + type: { + name: "String" + } + } } - }, - baselineAdjustedResult: { - serializedName: "baselineAdjustedResult", + } + } + } +}; + +export const BenchmarkReference: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "BenchmarkReference", + modelProperties: { + benchmark: { + serializedName: "benchmark", type: { - name: "Composite", - className: "BaselineAdjustedResult" + name: "String" } }, - ruleMetadata: { - serializedName: "ruleMetadata", - type: { - name: "Composite", - className: "VaRule" + reference: { + serializedName: "reference", + type: { + name: "String" } } } } }; -export const Remediation: coreClient.CompositeMapper = { +export const ScanResults: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Remediation", + className: "ScanResults", modelProperties: { - description: { - serializedName: "description", - type: { - name: "String" - } - }, - scripts: { - serializedName: "scripts", + value: { + serializedName: "value", type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "ScanResult" } } } - }, - automated: { - serializedName: "automated", - type: { - name: "Boolean" - } - }, - portalLink: { - serializedName: "portalLink", - type: { - name: "String" - } } } } }; -export const BaselineAdjustedResult: coreClient.CompositeMapper = { +export const RuleResultsInput: coreClient.CompositeMapper = { type: { name: "Composite", - className: "BaselineAdjustedResult", + className: "RuleResultsInput", modelProperties: { - baseline: { - serializedName: "baseline", - type: { - name: "Composite", - className: "Baseline" - } - }, - status: { - serializedName: "status", + latestScan: { + serializedName: "latestScan", type: { - name: "String" + name: "Boolean" } }, - resultsNotInBaseline: { - serializedName: "resultsNotInBaseline", + results: { + serializedName: "results", type: { name: "Sequence", element: { @@ -4787,9 +4998,18 @@ export const BaselineAdjustedResult: coreClient.CompositeMapper = { } } } - }, - resultsOnlyInBaseline: { - serializedName: "resultsOnlyInBaseline", + } + } + } +}; + +export const RuleResultsProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RuleResultsProperties", + modelProperties: { + results: { + serializedName: "results", type: { name: "Sequence", element: { @@ -4808,99 +5028,151 @@ export const BaselineAdjustedResult: coreClient.CompositeMapper = { } }; -export const Baseline: coreClient.CompositeMapper = { +export const RulesResults: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Baseline", + className: "RulesResults", modelProperties: { - expectedResults: { - serializedName: "expectedResults", + value: { + serializedName: "value", type: { name: "Sequence", element: { type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "Composite", + className: "RuleResults" } } } - }, - updatedTime: { - serializedName: "updatedTime", - type: { - name: "DateTime" - } } } } }; -export const VaRule: coreClient.CompositeMapper = { +export const RulesResultsInput: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VaRule", + className: "RulesResultsInput", modelProperties: { - ruleId: { - serializedName: "ruleId", + latestScan: { + serializedName: "latestScan", type: { - name: "String" + name: "Boolean" } }, - severity: { - serializedName: "severity", + results: { + serializedName: "results", type: { - name: "String" + name: "Dictionary", + value: { + type: { + name: "Sequence", + element: { + type: { + name: "Sequence", + element: { type: { name: "String" } } + } + } + } + } } - }, - category: { - serializedName: "category", + } + } + } +}; + +export const SecurityConnectorsList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SecurityConnectorsList", + modelProperties: { + value: { + serializedName: "value", + required: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SecurityConnector" + } + } } }, - ruleType: { - serializedName: "ruleType", + nextLink: { + serializedName: "nextLink", + readOnly: true, type: { name: "String" } - }, - title: { - serializedName: "title", + } + } + } +}; + +export const CloudOffering: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CloudOffering", + uberParent: "CloudOffering", + polymorphicDiscriminator: { + serializedName: "offeringType", + clientName: "offeringType" + }, + modelProperties: { + offeringType: { + serializedName: "offeringType", + required: true, type: { name: "String" } }, description: { serializedName: "description", + readOnly: true, type: { name: "String" } - }, - rationale: { - serializedName: "rationale", + } + } + } +}; + +export const EnvironmentData: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "EnvironmentData", + uberParent: "EnvironmentData", + polymorphicDiscriminator: { + serializedName: "environmentType", + clientName: "environmentType" + }, + modelProperties: { + environmentType: { + serializedName: "environmentType", + required: true, type: { name: "String" } - }, - queryCheck: { - serializedName: "queryCheck", - type: { - name: "Composite", - className: "QueryCheck" - } - }, - benchmarkReferences: { - serializedName: "benchmarkReferences", + } + } + } +}; + +export const SecurityOperatorList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SecurityOperatorList", + modelProperties: { + value: { + serializedName: "value", + required: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "BenchmarkReference" + className: "SecurityOperator" } } } @@ -4909,138 +5181,167 @@ export const VaRule: coreClient.CompositeMapper = { } }; -export const QueryCheck: coreClient.CompositeMapper = { +export const Identity: coreClient.CompositeMapper = { type: { name: "Composite", - className: "QueryCheck", + className: "Identity", modelProperties: { - query: { - serializedName: "query", + principalId: { + serializedName: "principalId", + readOnly: true, type: { name: "String" } }, - expectedResult: { - serializedName: "expectedResult", + tenantId: { + serializedName: "tenantId", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } + name: "String" } }, - columnNames: { - serializedName: "columnNames", + type: { + defaultValue: "SystemAssigned", + isConstant: true, + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const ServerVulnerabilityAssessmentsSettingsList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ServerVulnerabilityAssessmentsSettingsList", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "ServerVulnerabilityAssessmentsSetting" } } } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } } } } }; -export const BenchmarkReference: coreClient.CompositeMapper = { +export const ResourceAutoGenerated: coreClient.CompositeMapper = { type: { name: "Composite", - className: "BenchmarkReference", + className: "ResourceAutoGenerated", modelProperties: { - benchmark: { - serializedName: "benchmark", + id: { + serializedName: "id", + readOnly: true, type: { name: "String" } }, - reference: { - serializedName: "reference", + name: { + serializedName: "name", + readOnly: true, type: { name: "String" } + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } } } } }; -export const ScanResults: coreClient.CompositeMapper = { +export const ErrorResponseAutoGenerated: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ScanResults", + className: "ErrorResponseAutoGenerated", modelProperties: { - value: { - serializedName: "value", + error: { + serializedName: "error", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ScanResult" - } - } + name: "Composite", + className: "ErrorDetailAutoGenerated" } } } } }; -export const RuleResultsInput: coreClient.CompositeMapper = { +export const ErrorDetailAutoGenerated: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RuleResultsInput", + className: "ErrorDetailAutoGenerated", modelProperties: { - latestScan: { - serializedName: "latestScan", + code: { + serializedName: "code", + readOnly: true, type: { - name: "Boolean" + name: "String" } }, - results: { - serializedName: "results", + message: { + serializedName: "message", + readOnly: true, + type: { + name: "String" + } + }, + target: { + serializedName: "target", + readOnly: true, + type: { + name: "String" + } + }, + details: { + serializedName: "details", + readOnly: true, type: { name: "Sequence", element: { type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "Composite", + className: "ErrorDetailAutoGenerated" } } } - } - } - } -}; - -export const RuleResultsProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RuleResultsProperties", - modelProperties: { - results: { - serializedName: "results", + }, + additionalInfo: { + serializedName: "additionalInfo", + readOnly: true, type: { name: "Sequence", element: { type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "Composite", + className: "ErrorAdditionalInfo" } } } @@ -5049,80 +5350,95 @@ export const RuleResultsProperties: coreClient.CompositeMapper = { } }; -export const RulesResults: coreClient.CompositeMapper = { +export const HealthReportsList: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RulesResults", + className: "HealthReportsList", modelProperties: { value: { serializedName: "value", + readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "RuleResults" + className: "HealthReport" } } } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } } } } }; -export const RulesResultsInput: coreClient.CompositeMapper = { +export const ResourceDetailsAutoGenerated: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RulesResultsInput", + className: "ResourceDetailsAutoGenerated", modelProperties: { - latestScan: { - serializedName: "latestScan", + source: { + serializedName: "source", type: { - name: "Boolean" + name: "String" } }, - results: { - serializedName: "results", + id: { + serializedName: "id", + readOnly: true, type: { - name: "Dictionary", - value: { - type: { - name: "Sequence", - element: { - type: { - name: "Sequence", - element: { type: { name: "String" } } - } - } - } - } + name: "String" + } + }, + connectorId: { + serializedName: "connectorId", + readOnly: true, + type: { + name: "String" } } } } }; -export const SecurityConnectorsList: coreClient.CompositeMapper = { +export const EnvironmentDetails: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SecurityConnectorsList", + className: "EnvironmentDetails", modelProperties: { - value: { - serializedName: "value", - required: true, + nativeResourceId: { + serializedName: "nativeResourceId", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SecurityConnector" - } - } + name: "String" } }, - nextLink: { - serializedName: "nextLink", - readOnly: true, + environmentHierarchyId: { + serializedName: "environmentHierarchyId", + type: { + name: "String" + } + }, + organizationalHierarchyId: { + serializedName: "organizationalHierarchyId", + type: { + name: "String" + } + }, + subscriptionId: { + serializedName: "subscriptionId", + type: { + name: "String" + } + }, + tenantId: { + serializedName: "tenantId", type: { name: "String" } @@ -5131,103 +5447,129 @@ export const SecurityConnectorsList: coreClient.CompositeMapper = { } }; -export const CloudOffering: coreClient.CompositeMapper = { +export const HealthDataClassification: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CloudOffering", - uberParent: "CloudOffering", - polymorphicDiscriminator: { - serializedName: "offeringType", - clientName: "offeringType" - }, + className: "HealthDataClassification", modelProperties: { - offeringType: { - serializedName: "offeringType", - required: true, + component: { + serializedName: "component", + type: { + name: "String" + } + }, + scenario: { + serializedName: "scenario", + type: { + name: "String" + } + }, + scope: { + serializedName: "scope", + type: { + name: "String" + } + } + } + } +}; + +export const StatusAutoGenerated: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "StatusAutoGenerated", + modelProperties: { + code: { + serializedName: "code", + type: { + name: "String" + } + }, + reason: { + serializedName: "reason", + readOnly: true, + type: { + name: "String" + } + }, + lastScannedDate: { + serializedName: "lastScannedDate", + readOnly: true, type: { - name: "String" + name: "DateTime" } }, - description: { - serializedName: "description", + statusChangeDate: { + serializedName: "statusChangeDate", readOnly: true, type: { - name: "String" + name: "DateTime" + } + }, + firstEvaluationDate: { + serializedName: "firstEvaluationDate", + readOnly: true, + type: { + name: "DateTime" } } } } }; -export const EnvironmentData: coreClient.CompositeMapper = { +export const Issue: coreClient.CompositeMapper = { type: { name: "Composite", - className: "EnvironmentData", - uberParent: "EnvironmentData", - polymorphicDiscriminator: { - serializedName: "environmentType", - clientName: "environmentType" - }, + className: "Issue", modelProperties: { - environmentType: { - serializedName: "environmentType", + issueKey: { + serializedName: "issueKey", required: true, type: { name: "String" } - } - } - } -}; - -export const SecurityOperatorList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SecurityOperatorList", - modelProperties: { - value: { - serializedName: "value", - required: true, + }, + issueName: { + serializedName: "issueName", + type: { + name: "String" + } + }, + securityValues: { + serializedName: "securityValues", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "SecurityOperator" + name: "String" } } } - } - } - } -}; - -export const Identity: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Identity", - modelProperties: { - principalId: { - serializedName: "principalId", - readOnly: true, + }, + issueDescription: { + serializedName: "issueDescription", type: { name: "String" } }, - tenantId: { - serializedName: "tenantId", - readOnly: true, + remediationSteps: { + serializedName: "remediationSteps", type: { name: "String" } }, - type: { - defaultValue: "SystemAssigned", - isConstant: true, - serializedName: "type", + remediationScript: { + serializedName: "remediationScript", type: { name: "String" } + }, + issueAdditionalData: { + serializedName: "issueAdditionalData", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } } } } @@ -8991,67 +9333,6 @@ export const ApiCollectionResponse: coreClient.CompositeMapper = { } }; -export const HealthReport: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "HealthReport", - modelProperties: { - ...Resource.type.modelProperties, - resourceDetails: { - serializedName: "properties.resourceDetails", - type: { - name: "Composite", - className: "ResourceDetailsAutoGenerated" - } - }, - environmentDetails: { - serializedName: "properties.environmentDetails", - type: { - name: "Composite", - className: "EnvironmentDetails" - } - }, - healthDataClassification: { - serializedName: "properties.healthDataClassification", - type: { - name: "Composite", - className: "HealthDataClassification" - } - }, - status: { - serializedName: "properties.status", - type: { - name: "Composite", - className: "StatusAutoGenerated" - } - }, - affectedDefendersPlans: { - serializedName: "properties.affectedDefendersPlans", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - issues: { - serializedName: "properties.issues", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Issue" - } - } - } - } - } - } -}; - export const Scan: coreClient.CompositeMapper = { type: { name: "Composite", @@ -9120,6 +9401,86 @@ export const SecurityOperator: coreClient.CompositeMapper = { } }; +export const HealthReport: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "HealthReport", + modelProperties: { + ...Resource.type.modelProperties, + resourceDetails: { + serializedName: "properties.resourceDetails", + type: { + name: "Composite", + className: "ResourceDetailsAutoGenerated" + } + }, + environmentDetails: { + serializedName: "properties.environmentDetails", + type: { + name: "Composite", + className: "EnvironmentDetails" + } + }, + healthDataClassification: { + serializedName: "properties.healthDataClassification", + type: { + name: "Composite", + className: "HealthDataClassification" + } + }, + status: { + serializedName: "properties.status", + type: { + name: "Composite", + className: "StatusAutoGenerated" + } + }, + affectedDefendersPlans: { + serializedName: "properties.affectedDefendersPlans", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + affectedDefendersSubPlans: { + serializedName: "properties.affectedDefendersSubPlans", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + reportAdditionalData: { + serializedName: "properties.reportAdditionalData", + readOnly: true, + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + issues: { + serializedName: "properties.issues", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Issue" + } + } + } + } + } + } +}; + export const SecurityAssessmentMetadata: coreClient.CompositeMapper = { type: { name: "Composite", @@ -10567,6 +10928,29 @@ export const GitlabScopeEnvironmentData: coreClient.CompositeMapper = { } }; +export const ServerVulnerabilityAssessmentsSetting: coreClient.CompositeMapper = { + serializedName: "ServerVulnerabilityAssessmentsSetting", + type: { + name: "Composite", + className: "ServerVulnerabilityAssessmentsSetting", + uberParent: "ResourceAutoGenerated", + polymorphicDiscriminator: { + serializedName: "kind", + clientName: "kind" + }, + modelProperties: { + ...ResourceAutoGenerated.type.modelProperties, + kind: { + serializedName: "kind", + required: true, + type: { + name: "String" + } + } + } + } +}; + export const CefSolutionProperties: coreClient.CompositeMapper = { type: { name: "Composite", @@ -11064,6 +11448,26 @@ export const OnPremiseSqlResourceDetails: coreClient.CompositeMapper = { } }; +export const AzureServersSetting: coreClient.CompositeMapper = { + serializedName: "AzureServersSetting", + type: { + name: "Composite", + className: "AzureServersSetting", + uberParent: "ServerVulnerabilityAssessmentsSetting", + polymorphicDiscriminator: + ServerVulnerabilityAssessmentsSetting.type.polymorphicDiscriminator, + modelProperties: { + ...ServerVulnerabilityAssessmentsSetting.type.modelProperties, + selectedProvider: { + serializedName: "properties.selectedProvider", + type: { + name: "String" + } + } + } + } +}; + export const ActiveConnectionsNotInAllowedRange: coreClient.CompositeMapper = { serializedName: "ActiveConnectionsNotInAllowedRange", type: { @@ -11440,6 +11844,7 @@ export let discriminators = { "EnvironmentData.GithubScope": GithubScopeEnvironmentData, "EnvironmentData.AzureDevOpsScope": AzureDevOpsScopeEnvironmentData, "EnvironmentData.GitlabScope": GitlabScopeEnvironmentData, + "ResourceAutoGenerated.ServerVulnerabilityAssessmentsSetting": ServerVulnerabilityAssessmentsSetting, "AwsOrganizationalData.Organization": AwsOrganizationalDataMaster, "AwsOrganizationalData.Member": AwsOrganizationalDataMember, "GcpOrganizationalData.Organization": GcpOrganizationalDataOrganization, @@ -11453,6 +11858,7 @@ export let discriminators = { "ListCustomAlertRule.AllowlistCustomAlertRule": AllowlistCustomAlertRule, "ListCustomAlertRule.DenylistCustomAlertRule": DenylistCustomAlertRule, "OnPremiseResourceDetails.OnPremiseSql": OnPremiseSqlResourceDetails, + "ServerVulnerabilityAssessmentsSetting.AzureServersSetting": AzureServersSetting, "TimeWindowCustomAlertRule.ActiveConnectionsNotInAllowedRange": ActiveConnectionsNotInAllowedRange, "TimeWindowCustomAlertRule.AmqpC2DMessagesNotInAllowedRange": AmqpC2DMessagesNotInAllowedRange, "TimeWindowCustomAlertRule.MqttC2DMessagesNotInAllowedRange": MqttC2DMessagesNotInAllowedRange, diff --git a/sdk/security/arm-security/src/models/parameters.ts b/sdk/security/arm-security/src/models/parameters.ts index a5a30de44eca..cddba028efcd 100644 --- a/sdk/security/arm-security/src/models/parameters.ts +++ b/sdk/security/arm-security/src/models/parameters.ts @@ -32,6 +32,7 @@ import { JitNetworkAccessPolicy as JitNetworkAccessPolicyMapper, JitNetworkAccessPolicyInitiateRequest as JitNetworkAccessPolicyInitiateRequestMapper, ConnectorSetting as ConnectorSettingMapper, + UpdateSensitivitySettingsRequest as UpdateSensitivitySettingsRequestMapper, AlertSimulatorRequestBody as AlertSimulatorRequestBodyMapper, Setting as SettingMapper, IngestionSetting as IngestionSettingMapper, @@ -41,7 +42,8 @@ import { Application as ApplicationMapper, RuleResultsInput as RuleResultsInputMapper, RulesResultsInput as RulesResultsInputMapper, - SecurityConnector as SecurityConnectorMapper + SecurityConnector as SecurityConnectorMapper, + ServerVulnerabilityAssessmentsSetting as ServerVulnerabilityAssessmentsSettingMapper } from "../models/mappers"; export const accept: OperationParameter = { @@ -917,7 +919,24 @@ export const connectorSetting: OperationParameter = { mapper: ConnectorSettingMapper }; +export const sensitivitySettings: OperationParameter = { + parameterPath: "sensitivitySettings", + mapper: UpdateSensitivitySettingsRequestMapper +}; + export const apiVersion12: OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + defaultValue: "2023-02-15-preview", + isConstant: true, + serializedName: "api-version", + type: { + name: "String" + } + } +}; + +export const apiVersion13: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { defaultValue: "2022-01-01", @@ -945,7 +964,7 @@ export const alertSimulatorRequestBody: OperationParameter = { mapper: AlertSimulatorRequestBodyMapper }; -export const apiVersion13: OperationQueryParameter = { +export const apiVersion14: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { defaultValue: "2022-05-01", @@ -973,7 +992,7 @@ export const setting1: OperationParameter = { mapper: SettingMapper }; -export const apiVersion14: OperationQueryParameter = { +export const apiVersion15: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { defaultValue: "2021-01-15-preview", @@ -1001,7 +1020,7 @@ export const ingestionSetting: OperationParameter = { mapper: IngestionSettingMapper }; -export const apiVersion15: OperationQueryParameter = { +export const apiVersion16: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { defaultValue: "2021-05-01-preview", @@ -1024,7 +1043,7 @@ export const softwareName: OperationURLParameter = { } }; -export const apiVersion16: OperationQueryParameter = { +export const apiVersion17: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { defaultValue: "2022-01-01-preview", @@ -1109,7 +1128,7 @@ export const governanceAssignment: OperationParameter = { mapper: GovernanceAssignmentMapper }; -export const apiVersion17: OperationQueryParameter = { +export const apiVersion18: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { defaultValue: "2022-07-01-preview", @@ -1179,7 +1198,7 @@ export const serviceName: OperationURLParameter = { } }; -export const apiVersion18: OperationQueryParameter = { +export const apiVersion19: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { defaultValue: "2022-11-20-preview", @@ -1206,43 +1225,10 @@ export const apiCollectionId: OperationURLParameter = { } }; -export const apiVersion19: OperationQueryParameter = { - parameterPath: "apiVersion", - mapper: { - defaultValue: "2023-02-01-preview", - isConstant: true, - serializedName: "api-version", - type: { - name: "String" - } - } -}; - -export const scope2: OperationURLParameter = { - parameterPath: "scope", - mapper: { - constraints: { - MaxLength: 90, - MinLength: 1 - }, - serializedName: "scope", - required: true, - type: { - name: "String" - } - }, - skipEncoding: true -}; - -export const healthReportName: OperationURLParameter = { - parameterPath: "healthReportName", +export const scanId: OperationURLParameter = { + parameterPath: "scanId", mapper: { - constraints: { - Pattern: new RegExp( - "[{]?[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}[}]?$" - ) - }, - serializedName: "healthReportName", + serializedName: "scanId", required: true, type: { name: "String" @@ -1250,10 +1236,10 @@ export const healthReportName: OperationURLParameter = { } }; -export const scanId: OperationURLParameter = { - parameterPath: "scanId", +export const workspaceId: OperationQueryParameter = { + parameterPath: "workspaceId", mapper: { - serializedName: "scanId", + serializedName: "workspaceId", required: true, type: { name: "String" @@ -1261,11 +1247,12 @@ export const scanId: OperationURLParameter = { } }; -export const workspaceId: OperationQueryParameter = { - parameterPath: "workspaceId", +export const apiVersion20: OperationQueryParameter = { + parameterPath: "apiVersion", mapper: { - serializedName: "workspaceId", - required: true, + defaultValue: "2023-02-01-preview", + isConstant: true, + serializedName: "api-version", type: { name: "String" } @@ -1293,7 +1280,7 @@ export const body5: OperationParameter = { mapper: RulesResultsInputMapper }; -export const apiVersion20: OperationQueryParameter = { +export const apiVersion21: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { defaultValue: "2023-03-01-preview", @@ -1310,7 +1297,7 @@ export const securityConnector: OperationParameter = { mapper: SecurityConnectorMapper }; -export const apiVersion21: OperationQueryParameter = { +export const apiVersion22: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { defaultValue: "2023-01-01-preview", @@ -1353,3 +1340,75 @@ export const securityOperatorName: OperationURLParameter = { } } }; + +export const apiVersion23: OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + defaultValue: "2023-05-01", + isConstant: true, + serializedName: "api-version", + type: { + name: "String" + } + } +}; + +export const settingKind: OperationURLParameter = { + parameterPath: "settingKind", + mapper: { + serializedName: "settingKind", + required: true, + type: { + name: "String" + } + } +}; + +export const serverVulnerabilityAssessmentsSetting: OperationParameter = { + parameterPath: "serverVulnerabilityAssessmentsSetting", + mapper: ServerVulnerabilityAssessmentsSettingMapper +}; + +export const apiVersion24: OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + defaultValue: "2023-05-01-preview", + isConstant: true, + serializedName: "api-version", + type: { + name: "String" + } + } +}; + +export const scope2: OperationURLParameter = { + parameterPath: "scope", + mapper: { + constraints: { + MaxLength: 90, + MinLength: 1 + }, + serializedName: "scope", + required: true, + type: { + name: "String" + } + }, + skipEncoding: true +}; + +export const healthReportName: OperationURLParameter = { + parameterPath: "healthReportName", + mapper: { + constraints: { + Pattern: new RegExp( + "[{]?[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}[}]?$" + ) + }, + serializedName: "healthReportName", + required: true, + type: { + name: "String" + } + } +}; diff --git a/sdk/security/arm-security/src/operations/aPICollection.ts b/sdk/security/arm-security/src/operations/aPICollection.ts index 297e9bdc923f..57857ac33435 100644 --- a/sdk/security/arm-security/src/operations/aPICollection.ts +++ b/sdk/security/arm-security/src/operations/aPICollection.ts @@ -192,7 +192,7 @@ const listOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion18], + queryParameters: [Parameters.apiVersion19], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -214,7 +214,7 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion18], + queryParameters: [Parameters.apiVersion19], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/security/arm-security/src/operations/aPICollectionOffboarding.ts b/sdk/security/arm-security/src/operations/aPICollectionOffboarding.ts index 57611f1a24ea..5600ed33f41b 100644 --- a/sdk/security/arm-security/src/operations/aPICollectionOffboarding.ts +++ b/sdk/security/arm-security/src/operations/aPICollectionOffboarding.ts @@ -60,7 +60,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion18], + queryParameters: [Parameters.apiVersion19], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/security/arm-security/src/operations/aPICollectionOnboarding.ts b/sdk/security/arm-security/src/operations/aPICollectionOnboarding.ts index 17794b34b23b..4382f2e663d6 100644 --- a/sdk/security/arm-security/src/operations/aPICollectionOnboarding.ts +++ b/sdk/security/arm-security/src/operations/aPICollectionOnboarding.ts @@ -65,7 +65,7 @@ const createOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion18], + queryParameters: [Parameters.apiVersion19], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/security/arm-security/src/operations/alerts.ts b/sdk/security/arm-security/src/operations/alerts.ts index 9d1230722faf..4b340a33f0a9 100644 --- a/sdk/security/arm-security/src/operations/alerts.ts +++ b/sdk/security/arm-security/src/operations/alerts.ts @@ -780,7 +780,7 @@ const listOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion12], + queryParameters: [Parameters.apiVersion13], urlParameters: [Parameters.$host, Parameters.subscriptionId], headerParameters: [Parameters.accept], serializer @@ -797,7 +797,7 @@ const listByResourceGroupOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion12], + queryParameters: [Parameters.apiVersion13], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -818,7 +818,7 @@ const listSubscriptionLevelByRegionOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion12], + queryParameters: [Parameters.apiVersion13], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -839,7 +839,7 @@ const listResourceGroupLevelByRegionOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion12], + queryParameters: [Parameters.apiVersion13], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -861,7 +861,7 @@ const getSubscriptionLevelOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion12], + queryParameters: [Parameters.apiVersion13], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -883,7 +883,7 @@ const getResourceGroupLevelOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion12], + queryParameters: [Parameters.apiVersion13], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -904,7 +904,7 @@ const updateSubscriptionLevelStateToDismissOperationSpec: coreClient.OperationSp bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion12], + queryParameters: [Parameters.apiVersion13], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -924,7 +924,7 @@ const updateSubscriptionLevelStateToResolveOperationSpec: coreClient.OperationSp bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion12], + queryParameters: [Parameters.apiVersion13], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -944,7 +944,7 @@ const updateSubscriptionLevelStateToActivateOperationSpec: coreClient.OperationS bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion12], + queryParameters: [Parameters.apiVersion13], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -964,7 +964,7 @@ const updateSubscriptionLevelStateToInProgressOperationSpec: coreClient.Operatio bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion12], + queryParameters: [Parameters.apiVersion13], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -984,7 +984,7 @@ const updateResourceGroupLevelStateToResolveOperationSpec: coreClient.OperationS bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion12], + queryParameters: [Parameters.apiVersion13], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -1005,7 +1005,7 @@ const updateResourceGroupLevelStateToDismissOperationSpec: coreClient.OperationS bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion12], + queryParameters: [Parameters.apiVersion13], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -1026,7 +1026,7 @@ const updateResourceGroupLevelStateToActivateOperationSpec: coreClient.Operation bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion12], + queryParameters: [Parameters.apiVersion13], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -1047,7 +1047,7 @@ const updateResourceGroupLevelStateToInProgressOperationSpec: coreClient.Operati bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion12], + queryParameters: [Parameters.apiVersion13], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -1072,7 +1072,7 @@ const simulateOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.alertSimulatorRequestBody, - queryParameters: [Parameters.apiVersion12], + queryParameters: [Parameters.apiVersion13], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/security/arm-security/src/operations/applicationOperations.ts b/sdk/security/arm-security/src/operations/applicationOperations.ts index 6f1598633b85..19a1a9952c56 100644 --- a/sdk/security/arm-security/src/operations/applicationOperations.ts +++ b/sdk/security/arm-security/src/operations/applicationOperations.ts @@ -94,7 +94,7 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion17], + queryParameters: [Parameters.apiVersion18], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -119,7 +119,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.application, - queryParameters: [Parameters.apiVersion17], + queryParameters: [Parameters.apiVersion18], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -134,7 +134,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/providers/Microsoft.Security/applications/{applicationId}", httpMethod: "DELETE", responses: { 200: {}, 204: {}, default: {} }, - queryParameters: [Parameters.apiVersion17], + queryParameters: [Parameters.apiVersion18], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/security/arm-security/src/operations/applications.ts b/sdk/security/arm-security/src/operations/applications.ts index 94a125f6492b..09accc073ad4 100644 --- a/sdk/security/arm-security/src/operations/applications.ts +++ b/sdk/security/arm-security/src/operations/applications.ts @@ -128,7 +128,7 @@ const listOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion17], + queryParameters: [Parameters.apiVersion18], urlParameters: [Parameters.$host, Parameters.subscriptionId], headerParameters: [Parameters.accept], serializer diff --git a/sdk/security/arm-security/src/operations/governanceAssignments.ts b/sdk/security/arm-security/src/operations/governanceAssignments.ts index 98f9a1885cde..c119c7fe7130 100644 --- a/sdk/security/arm-security/src/operations/governanceAssignments.ts +++ b/sdk/security/arm-security/src/operations/governanceAssignments.ts @@ -235,7 +235,7 @@ const listOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion16], + queryParameters: [Parameters.apiVersion17], urlParameters: [ Parameters.$host, Parameters.scope1, @@ -256,7 +256,7 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion16], + queryParameters: [Parameters.apiVersion17], urlParameters: [ Parameters.$host, Parameters.scope1, @@ -282,7 +282,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.governanceAssignment, - queryParameters: [Parameters.apiVersion16], + queryParameters: [Parameters.apiVersion17], urlParameters: [ Parameters.$host, Parameters.scope1, @@ -298,7 +298,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { "/{scope}/providers/Microsoft.Security/assessments/{assessmentName}/governanceAssignments/{assignmentKey}", httpMethod: "DELETE", responses: { 200: {}, 204: {}, default: {} }, - queryParameters: [Parameters.apiVersion16], + queryParameters: [Parameters.apiVersion17], urlParameters: [ Parameters.$host, Parameters.scope1, diff --git a/sdk/security/arm-security/src/operations/governanceRules.ts b/sdk/security/arm-security/src/operations/governanceRules.ts index eb65637f832a..56abcf8c680a 100644 --- a/sdk/security/arm-security/src/operations/governanceRules.ts +++ b/sdk/security/arm-security/src/operations/governanceRules.ts @@ -404,7 +404,7 @@ const listOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion16], + queryParameters: [Parameters.apiVersion17], urlParameters: [Parameters.$host, Parameters.scope1], headerParameters: [Parameters.accept], serializer @@ -420,7 +420,7 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion16], + queryParameters: [Parameters.apiVersion17], urlParameters: [Parameters.$host, Parameters.scope1, Parameters.ruleId], headerParameters: [Parameters.accept], serializer @@ -440,7 +440,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.governanceRule, - queryParameters: [Parameters.apiVersion16], + queryParameters: [Parameters.apiVersion17], urlParameters: [Parameters.$host, Parameters.scope1, Parameters.ruleId], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", @@ -450,7 +450,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { path: "/{scope}/providers/Microsoft.Security/governanceRules/{ruleId}", httpMethod: "DELETE", responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, - queryParameters: [Parameters.apiVersion16], + queryParameters: [Parameters.apiVersion17], urlParameters: [Parameters.$host, Parameters.scope1, Parameters.ruleId], serializer }; @@ -476,7 +476,7 @@ const executeOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.executeGovernanceRuleParams, - queryParameters: [Parameters.apiVersion16], + queryParameters: [Parameters.apiVersion17], urlParameters: [Parameters.$host, Parameters.scope1, Parameters.ruleId], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", @@ -497,7 +497,7 @@ const operationResultsOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion16], + queryParameters: [Parameters.apiVersion17], urlParameters: [ Parameters.$host, Parameters.scope1, diff --git a/sdk/security/arm-security/src/operations/healthReportOperations.ts b/sdk/security/arm-security/src/operations/healthReportOperations.ts deleted file mode 100644 index ed8525397864..000000000000 --- a/sdk/security/arm-security/src/operations/healthReportOperations.ts +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { HealthReportOperations } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { SecurityCenter } from "../securityCenter"; -import { - HealthReportGetOptionalParams, - HealthReportGetResponse -} from "../models"; - -/** Class containing HealthReportOperations operations. */ -export class HealthReportOperationsImpl implements HealthReportOperations { - private readonly client: SecurityCenter; - - /** - * Initialize a new instance of the class HealthReportOperations class. - * @param client Reference to the service client - */ - constructor(client: SecurityCenter) { - this.client = client; - } - - /** - * Get health report of resource - * @param resourceId The identifier of the resource. - * @param healthReportName The health report Key - Unique key for the health report type - * @param options The options parameters. - */ - get( - resourceId: string, - healthReportName: string, - options?: HealthReportGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceId, healthReportName, options }, - getOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: - "/{resourceId}/providers/Microsoft.Security/healthReports/{healthReportName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.HealthReport - }, - default: { - bodyMapper: Mappers.ErrorResponseAutoGenerated - } - }, - queryParameters: [Parameters.apiVersion19], - urlParameters: [ - Parameters.$host, - Parameters.resourceId, - Parameters.healthReportName - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/security/arm-security/src/operations/healthReports.ts b/sdk/security/arm-security/src/operations/healthReports.ts index 5d2a17a24404..a2d50a4b781e 100644 --- a/sdk/security/arm-security/src/operations/healthReports.ts +++ b/sdk/security/arm-security/src/operations/healthReports.ts @@ -18,6 +18,8 @@ import { HealthReportsListNextOptionalParams, HealthReportsListOptionalParams, HealthReportsListResponse, + HealthReportsGetOptionalParams, + HealthReportsGetResponse, HealthReportsListNextResponse } from "../models"; @@ -111,6 +113,23 @@ export class HealthReportsImpl implements HealthReports { ); } + /** + * Get health report of resource + * @param resourceId The identifier of the resource. + * @param healthReportName The health report Key - Unique key for the health report type + * @param options The options parameters. + */ + get( + resourceId: string, + healthReportName: string, + options?: HealthReportsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceId, healthReportName, options }, + getOperationSpec + ); + } + /** * ListNext * @param scope The scope at which the operation is performed. @@ -142,11 +161,32 @@ const listOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponseAutoGenerated } }, - queryParameters: [Parameters.apiVersion19], + queryParameters: [Parameters.apiVersion24], urlParameters: [Parameters.$host, Parameters.scope2], headerParameters: [Parameters.accept], serializer }; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/{resourceId}/providers/Microsoft.Security/healthReports/{healthReportName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.HealthReport + }, + default: { + bodyMapper: Mappers.ErrorResponseAutoGenerated + } + }, + queryParameters: [Parameters.apiVersion24], + urlParameters: [ + Parameters.$host, + Parameters.resourceId, + Parameters.healthReportName + ], + headerParameters: [Parameters.accept], + serializer +}; const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", diff --git a/sdk/security/arm-security/src/operations/index.ts b/sdk/security/arm-security/src/operations/index.ts index 34ac4c6ae693..6a68cb061343 100644 --- a/sdk/security/arm-security/src/operations/index.ts +++ b/sdk/security/arm-security/src/operations/index.ts @@ -47,6 +47,7 @@ export * from "./secureScoreControls"; export * from "./secureScoreControlDefinitions"; export * from "./securitySolutions"; export * from "./connectors"; +export * from "./sensitivitySettings"; export * from "./alerts"; export * from "./settings"; export * from "./ingestionSettings"; @@ -60,10 +61,10 @@ export * from "./securityConnectorApplication"; export * from "./aPICollection"; export * from "./aPICollectionOnboarding"; export * from "./aPICollectionOffboarding"; -export * from "./healthReports"; -export * from "./healthReportOperations"; export * from "./sqlVulnerabilityAssessmentScans"; export * from "./sqlVulnerabilityAssessmentScanResults"; export * from "./sqlVulnerabilityAssessmentBaselineRules"; export * from "./securityConnectors"; export * from "./securityOperators"; +export * from "./serverVulnerabilityAssessmentsSettings"; +export * from "./healthReports"; diff --git a/sdk/security/arm-security/src/operations/ingestionSettings.ts b/sdk/security/arm-security/src/operations/ingestionSettings.ts index ec5e8d1b26c4..a5a70435a413 100644 --- a/sdk/security/arm-security/src/operations/ingestionSettings.ts +++ b/sdk/security/arm-security/src/operations/ingestionSettings.ts @@ -219,7 +219,7 @@ const listOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion14], + queryParameters: [Parameters.apiVersion15], urlParameters: [Parameters.$host, Parameters.subscriptionId], headerParameters: [Parameters.accept], serializer @@ -236,7 +236,7 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion14], + queryParameters: [Parameters.apiVersion15], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -258,7 +258,7 @@ const createOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.ingestionSetting, - queryParameters: [Parameters.apiVersion14], + queryParameters: [Parameters.apiVersion15], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -279,7 +279,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion14], + queryParameters: [Parameters.apiVersion15], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -300,7 +300,7 @@ const listTokensOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion14], + queryParameters: [Parameters.apiVersion15], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -321,7 +321,7 @@ const listConnectionStringsOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion14], + queryParameters: [Parameters.apiVersion15], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/security/arm-security/src/operations/securityConnectorApplication.ts b/sdk/security/arm-security/src/operations/securityConnectorApplication.ts index 86e2dfb5ae2a..370d6c5a50f3 100644 --- a/sdk/security/arm-security/src/operations/securityConnectorApplication.ts +++ b/sdk/security/arm-security/src/operations/securityConnectorApplication.ts @@ -116,7 +116,7 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion17], + queryParameters: [Parameters.apiVersion18], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -143,7 +143,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.application, - queryParameters: [Parameters.apiVersion17], + queryParameters: [Parameters.apiVersion18], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -160,7 +160,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/providers/Microsoft.Security/applications/{applicationId}", httpMethod: "DELETE", responses: { 200: {}, 204: {}, default: {} }, - queryParameters: [Parameters.apiVersion17], + queryParameters: [Parameters.apiVersion18], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/security/arm-security/src/operations/securityConnectorApplications.ts b/sdk/security/arm-security/src/operations/securityConnectorApplications.ts index c76c79f3b9e7..9436d7a1e731 100644 --- a/sdk/security/arm-security/src/operations/securityConnectorApplications.ts +++ b/sdk/security/arm-security/src/operations/securityConnectorApplications.ts @@ -173,7 +173,7 @@ const listOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion17], + queryParameters: [Parameters.apiVersion18], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/security/arm-security/src/operations/securityConnectors.ts b/sdk/security/arm-security/src/operations/securityConnectors.ts index e2ebfbc44bf9..1a139139581e 100644 --- a/sdk/security/arm-security/src/operations/securityConnectors.ts +++ b/sdk/security/arm-security/src/operations/securityConnectors.ts @@ -324,7 +324,7 @@ const listOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion20], + queryParameters: [Parameters.apiVersion21], urlParameters: [Parameters.$host, Parameters.subscriptionId], headerParameters: [Parameters.accept], serializer @@ -341,7 +341,7 @@ const listByResourceGroupOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion20], + queryParameters: [Parameters.apiVersion21], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -362,7 +362,7 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion20], + queryParameters: [Parameters.apiVersion21], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -388,7 +388,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.securityConnector, - queryParameters: [Parameters.apiVersion20], + queryParameters: [Parameters.apiVersion21], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -412,7 +412,7 @@ const updateOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.securityConnector, - queryParameters: [Parameters.apiVersion20], + queryParameters: [Parameters.apiVersion21], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -434,7 +434,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion20], + queryParameters: [Parameters.apiVersion21], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/security/arm-security/src/operations/securityOperators.ts b/sdk/security/arm-security/src/operations/securityOperators.ts index 91a76d6caaa5..81604abe5f64 100644 --- a/sdk/security/arm-security/src/operations/securityOperators.ts +++ b/sdk/security/arm-security/src/operations/securityOperators.ts @@ -114,7 +114,7 @@ const listOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion21], + queryParameters: [Parameters.apiVersion22], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -135,7 +135,7 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion21], + queryParameters: [Parameters.apiVersion22], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -157,7 +157,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion21], + queryParameters: [Parameters.apiVersion22], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -178,7 +178,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion21], + queryParameters: [Parameters.apiVersion22], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/security/arm-security/src/operations/sensitivitySettings.ts b/sdk/security/arm-security/src/operations/sensitivitySettings.ts new file mode 100644 index 000000000000..f5c5d059edf7 --- /dev/null +++ b/sdk/security/arm-security/src/operations/sensitivitySettings.ts @@ -0,0 +1,59 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { SensitivitySettings } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { SecurityCenter } from "../securityCenter"; +import { + SensitivitySettingsListOptionalParams, + SensitivitySettingsListResponse +} from "../models"; + +/** Class containing SensitivitySettings operations. */ +export class SensitivitySettingsImpl implements SensitivitySettings { + private readonly client: SecurityCenter; + + /** + * Initialize a new instance of the class SensitivitySettings class. + * @param client Reference to the service client + */ + constructor(client: SecurityCenter) { + this.client = client; + } + + /** + * Gets a list with a single sensitivity settings resource + * @param options The options parameters. + */ + list( + options?: SensitivitySettingsListOptionalParams + ): Promise { + return this.client.sendOperationRequest({ options }, listOperationSpec); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: "/providers/Microsoft.Security/sensitivitySettings", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GetSensitivitySettingsListResponse + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion12], + urlParameters: [Parameters.$host], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/security/arm-security/src/operations/serverVulnerabilityAssessmentsSettings.ts b/sdk/security/arm-security/src/operations/serverVulnerabilityAssessmentsSettings.ts new file mode 100644 index 000000000000..f4b89556fddd --- /dev/null +++ b/sdk/security/arm-security/src/operations/serverVulnerabilityAssessmentsSettings.ts @@ -0,0 +1,283 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { ServerVulnerabilityAssessmentsSettings } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { SecurityCenter } from "../securityCenter"; +import { + ServerVulnerabilityAssessmentsSettingUnion, + ServerVulnerabilityAssessmentsSettingsListBySubscriptionNextOptionalParams, + ServerVulnerabilityAssessmentsSettingsListBySubscriptionOptionalParams, + ServerVulnerabilityAssessmentsSettingsListBySubscriptionResponse, + ServerVulnerabilityAssessmentsSettingKindName, + ServerVulnerabilityAssessmentsSettingsGetOptionalParams, + ServerVulnerabilityAssessmentsSettingsGetResponse, + ServerVulnerabilityAssessmentsSettingsCreateOrUpdateOptionalParams, + ServerVulnerabilityAssessmentsSettingsCreateOrUpdateResponse, + ServerVulnerabilityAssessmentsSettingsDeleteOptionalParams, + ServerVulnerabilityAssessmentsSettingsListBySubscriptionNextResponse +} from "../models"; + +/// +/** Class containing ServerVulnerabilityAssessmentsSettings operations. */ +export class ServerVulnerabilityAssessmentsSettingsImpl + implements ServerVulnerabilityAssessmentsSettings { + private readonly client: SecurityCenter; + + /** + * Initialize a new instance of the class ServerVulnerabilityAssessmentsSettings class. + * @param client Reference to the service client + */ + constructor(client: SecurityCenter) { + this.client = client; + } + + /** + * Get a list of all the server vulnerability assessments settings over a subscription level scope + * @param options The options parameters. + */ + public listBySubscription( + options?: ServerVulnerabilityAssessmentsSettingsListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listBySubscriptionPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listBySubscriptionPagingPage(options, settings); + } + }; + } + + private async *listBySubscriptionPagingPage( + options?: ServerVulnerabilityAssessmentsSettingsListBySubscriptionOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ServerVulnerabilityAssessmentsSettingsListBySubscriptionResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listBySubscription(options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listBySubscriptionNext(continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listBySubscriptionPagingAll( + options?: ServerVulnerabilityAssessmentsSettingsListBySubscriptionOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listBySubscriptionPagingPage(options)) { + yield* page; + } + } + + /** + * Get a list of all the server vulnerability assessments settings over a subscription level scope + * @param options The options parameters. + */ + private _listBySubscription( + options?: ServerVulnerabilityAssessmentsSettingsListBySubscriptionOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { options }, + listBySubscriptionOperationSpec + ); + } + + /** + * Get a server vulnerability assessments setting of the requested kind, that is set on the + * subscription + * @param settingKind The kind of the server vulnerability assessments setting + * @param options The options parameters. + */ + get( + settingKind: ServerVulnerabilityAssessmentsSettingKindName, + options?: ServerVulnerabilityAssessmentsSettingsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { settingKind, options }, + getOperationSpec + ); + } + + /** + * Create or update a server vulnerability assessments setting of the requested kind on the + * subscription + * @param settingKind The kind of the server vulnerability assessments setting + * @param serverVulnerabilityAssessmentsSetting A server vulnerability assessments setting over a + * predefined scope + * @param options The options parameters. + */ + createOrUpdate( + settingKind: ServerVulnerabilityAssessmentsSettingKindName, + serverVulnerabilityAssessmentsSetting: ServerVulnerabilityAssessmentsSettingUnion, + options?: ServerVulnerabilityAssessmentsSettingsCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { settingKind, serverVulnerabilityAssessmentsSetting, options }, + createOrUpdateOperationSpec + ); + } + + /** + * Delete the server vulnerability assessments setting of the requested kind from the subscription + * @param settingKind The kind of the server vulnerability assessments setting + * @param options The options parameters. + */ + delete( + settingKind: ServerVulnerabilityAssessmentsSettingKindName, + options?: ServerVulnerabilityAssessmentsSettingsDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { settingKind, options }, + deleteOperationSpec + ); + } + + /** + * ListBySubscriptionNext + * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. + * @param options The options parameters. + */ + private _listBySubscriptionNext( + nextLink: string, + options?: ServerVulnerabilityAssessmentsSettingsListBySubscriptionNextOptionalParams + ): Promise< + ServerVulnerabilityAssessmentsSettingsListBySubscriptionNextResponse + > { + return this.client.sendOperationRequest( + { nextLink, options }, + listBySubscriptionNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listBySubscriptionOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.Security/serverVulnerabilityAssessmentsSettings", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ServerVulnerabilityAssessmentsSettingsList + }, + default: { + bodyMapper: Mappers.ErrorResponseAutoGenerated + } + }, + queryParameters: [Parameters.apiVersion23], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.Security/serverVulnerabilityAssessmentsSettings/{settingKind}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ServerVulnerabilityAssessmentsSetting + }, + default: { + bodyMapper: Mappers.ErrorResponseAutoGenerated + } + }, + queryParameters: [Parameters.apiVersion23], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.settingKind + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.Security/serverVulnerabilityAssessmentsSettings/{settingKind}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ServerVulnerabilityAssessmentsSetting + }, + 201: { + bodyMapper: Mappers.ServerVulnerabilityAssessmentsSetting + }, + default: { + bodyMapper: Mappers.ErrorResponseAutoGenerated + } + }, + requestBody: Parameters.serverVulnerabilityAssessmentsSetting, + queryParameters: [Parameters.apiVersion23], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.settingKind + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.Security/serverVulnerabilityAssessmentsSettings/{settingKind}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponseAutoGenerated + } + }, + queryParameters: [Parameters.apiVersion23], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.settingKind + ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ServerVulnerabilityAssessmentsSettingsList + }, + default: { + bodyMapper: Mappers.ErrorResponseAutoGenerated + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/security/arm-security/src/operations/settings.ts b/sdk/security/arm-security/src/operations/settings.ts index 656fedf1aea4..028a8cd55c8e 100644 --- a/sdk/security/arm-security/src/operations/settings.ts +++ b/sdk/security/arm-security/src/operations/settings.ts @@ -164,7 +164,7 @@ const listOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion13], + queryParameters: [Parameters.apiVersion14], urlParameters: [Parameters.$host, Parameters.subscriptionId], headerParameters: [Parameters.accept], serializer @@ -181,7 +181,7 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion13], + queryParameters: [Parameters.apiVersion14], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -203,7 +203,7 @@ const updateOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.setting1, - queryParameters: [Parameters.apiVersion13], + queryParameters: [Parameters.apiVersion14], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/security/arm-security/src/operations/softwareInventories.ts b/sdk/security/arm-security/src/operations/softwareInventories.ts index c27168e8f7f0..f4814c85e2bd 100644 --- a/sdk/security/arm-security/src/operations/softwareInventories.ts +++ b/sdk/security/arm-security/src/operations/softwareInventories.ts @@ -330,7 +330,7 @@ const listByExtendedResourceOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion15], + queryParameters: [Parameters.apiVersion16], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -354,7 +354,7 @@ const listBySubscriptionOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion15], + queryParameters: [Parameters.apiVersion16], urlParameters: [Parameters.$host, Parameters.subscriptionId], headerParameters: [Parameters.accept], serializer @@ -371,7 +371,7 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion15], + queryParameters: [Parameters.apiVersion16], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/security/arm-security/src/operations/sqlVulnerabilityAssessmentBaselineRules.ts b/sdk/security/arm-security/src/operations/sqlVulnerabilityAssessmentBaselineRules.ts index 978b404987ae..973378d453e2 100644 --- a/sdk/security/arm-security/src/operations/sqlVulnerabilityAssessmentBaselineRules.ts +++ b/sdk/security/arm-security/src/operations/sqlVulnerabilityAssessmentBaselineRules.ts @@ -143,7 +143,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.body4, - queryParameters: [Parameters.apiVersion19, Parameters.workspaceId], + queryParameters: [Parameters.workspaceId, Parameters.apiVersion20], urlParameters: [Parameters.$host, Parameters.resourceId, Parameters.ruleId], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", @@ -161,7 +161,7 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion19, Parameters.workspaceId], + queryParameters: [Parameters.workspaceId, Parameters.apiVersion20], urlParameters: [Parameters.$host, Parameters.resourceId, Parameters.ruleId], headerParameters: [Parameters.accept], serializer @@ -177,7 +177,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion19, Parameters.workspaceId], + queryParameters: [Parameters.workspaceId, Parameters.apiVersion20], urlParameters: [Parameters.$host, Parameters.resourceId, Parameters.ruleId], headerParameters: [Parameters.accept], serializer @@ -194,7 +194,7 @@ const listOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion19, Parameters.workspaceId], + queryParameters: [Parameters.workspaceId, Parameters.apiVersion20], urlParameters: [Parameters.$host, Parameters.resourceId], headerParameters: [Parameters.accept], serializer @@ -212,7 +212,7 @@ const addOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.body5, - queryParameters: [Parameters.apiVersion19, Parameters.workspaceId], + queryParameters: [Parameters.workspaceId, Parameters.apiVersion20], urlParameters: [Parameters.$host, Parameters.resourceId], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", diff --git a/sdk/security/arm-security/src/operations/sqlVulnerabilityAssessmentScanResults.ts b/sdk/security/arm-security/src/operations/sqlVulnerabilityAssessmentScanResults.ts index 66291f56d2cc..25fd6803623d 100644 --- a/sdk/security/arm-security/src/operations/sqlVulnerabilityAssessmentScanResults.ts +++ b/sdk/security/arm-security/src/operations/sqlVulnerabilityAssessmentScanResults.ts @@ -86,7 +86,7 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion19, Parameters.workspaceId], + queryParameters: [Parameters.workspaceId, Parameters.apiVersion20], urlParameters: [ Parameters.$host, Parameters.resourceId, @@ -108,7 +108,7 @@ const listOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion19, Parameters.workspaceId], + queryParameters: [Parameters.workspaceId, Parameters.apiVersion20], urlParameters: [Parameters.$host, Parameters.resourceId, Parameters.scanId], headerParameters: [Parameters.accept], serializer diff --git a/sdk/security/arm-security/src/operations/sqlVulnerabilityAssessmentScans.ts b/sdk/security/arm-security/src/operations/sqlVulnerabilityAssessmentScans.ts index 61fb5937f737..bc77aa9b6805 100644 --- a/sdk/security/arm-security/src/operations/sqlVulnerabilityAssessmentScans.ts +++ b/sdk/security/arm-security/src/operations/sqlVulnerabilityAssessmentScans.ts @@ -82,7 +82,7 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion19, Parameters.workspaceId], + queryParameters: [Parameters.workspaceId, Parameters.apiVersion20], urlParameters: [Parameters.$host, Parameters.resourceId, Parameters.scanId], headerParameters: [Parameters.accept], serializer @@ -99,7 +99,7 @@ const listOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion19, Parameters.workspaceId], + queryParameters: [Parameters.workspaceId, Parameters.apiVersion20], urlParameters: [Parameters.$host, Parameters.resourceId], headerParameters: [Parameters.accept], serializer diff --git a/sdk/security/arm-security/src/operationsInterfaces/healthReportOperations.ts b/sdk/security/arm-security/src/operationsInterfaces/healthReportOperations.ts deleted file mode 100644 index 240b79319a78..000000000000 --- a/sdk/security/arm-security/src/operationsInterfaces/healthReportOperations.ts +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { - HealthReportGetOptionalParams, - HealthReportGetResponse -} from "../models"; - -/** Interface representing a HealthReportOperations. */ -export interface HealthReportOperations { - /** - * Get health report of resource - * @param resourceId The identifier of the resource. - * @param healthReportName The health report Key - Unique key for the health report type - * @param options The options parameters. - */ - get( - resourceId: string, - healthReportName: string, - options?: HealthReportGetOptionalParams - ): Promise; -} diff --git a/sdk/security/arm-security/src/operationsInterfaces/healthReports.ts b/sdk/security/arm-security/src/operationsInterfaces/healthReports.ts index 2126939b24b8..19c9d8b3fd5a 100644 --- a/sdk/security/arm-security/src/operationsInterfaces/healthReports.ts +++ b/sdk/security/arm-security/src/operationsInterfaces/healthReports.ts @@ -7,7 +7,12 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { HealthReport, HealthReportsListOptionalParams } from "../models"; +import { + HealthReport, + HealthReportsListOptionalParams, + HealthReportsGetOptionalParams, + HealthReportsGetResponse +} from "../models"; /// /** Interface representing a HealthReports. */ @@ -23,4 +28,15 @@ export interface HealthReports { scope: string, options?: HealthReportsListOptionalParams ): PagedAsyncIterableIterator; + /** + * Get health report of resource + * @param resourceId The identifier of the resource. + * @param healthReportName The health report Key - Unique key for the health report type + * @param options The options parameters. + */ + get( + resourceId: string, + healthReportName: string, + options?: HealthReportsGetOptionalParams + ): Promise; } diff --git a/sdk/security/arm-security/src/operationsInterfaces/index.ts b/sdk/security/arm-security/src/operationsInterfaces/index.ts index 34ac4c6ae693..6a68cb061343 100644 --- a/sdk/security/arm-security/src/operationsInterfaces/index.ts +++ b/sdk/security/arm-security/src/operationsInterfaces/index.ts @@ -47,6 +47,7 @@ export * from "./secureScoreControls"; export * from "./secureScoreControlDefinitions"; export * from "./securitySolutions"; export * from "./connectors"; +export * from "./sensitivitySettings"; export * from "./alerts"; export * from "./settings"; export * from "./ingestionSettings"; @@ -60,10 +61,10 @@ export * from "./securityConnectorApplication"; export * from "./aPICollection"; export * from "./aPICollectionOnboarding"; export * from "./aPICollectionOffboarding"; -export * from "./healthReports"; -export * from "./healthReportOperations"; export * from "./sqlVulnerabilityAssessmentScans"; export * from "./sqlVulnerabilityAssessmentScanResults"; export * from "./sqlVulnerabilityAssessmentBaselineRules"; export * from "./securityConnectors"; export * from "./securityOperators"; +export * from "./serverVulnerabilityAssessmentsSettings"; +export * from "./healthReports"; diff --git a/sdk/security/arm-security/src/operationsInterfaces/sensitivitySettings.ts b/sdk/security/arm-security/src/operationsInterfaces/sensitivitySettings.ts new file mode 100644 index 000000000000..cbef9da20be0 --- /dev/null +++ b/sdk/security/arm-security/src/operationsInterfaces/sensitivitySettings.ts @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + SensitivitySettingsListOptionalParams, + SensitivitySettingsListResponse +} from "../models"; + +/** Interface representing a SensitivitySettings. */ +export interface SensitivitySettings { + /** + * Gets a list with a single sensitivity settings resource + * @param options The options parameters. + */ + list( + options?: SensitivitySettingsListOptionalParams + ): Promise; +} diff --git a/sdk/security/arm-security/src/operationsInterfaces/serverVulnerabilityAssessmentsSettings.ts b/sdk/security/arm-security/src/operationsInterfaces/serverVulnerabilityAssessmentsSettings.ts new file mode 100644 index 000000000000..2263f7712e18 --- /dev/null +++ b/sdk/security/arm-security/src/operationsInterfaces/serverVulnerabilityAssessmentsSettings.ts @@ -0,0 +1,63 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + ServerVulnerabilityAssessmentsSettingUnion, + ServerVulnerabilityAssessmentsSettingsListBySubscriptionOptionalParams, + ServerVulnerabilityAssessmentsSettingKindName, + ServerVulnerabilityAssessmentsSettingsGetOptionalParams, + ServerVulnerabilityAssessmentsSettingsGetResponse, + ServerVulnerabilityAssessmentsSettingsCreateOrUpdateOptionalParams, + ServerVulnerabilityAssessmentsSettingsCreateOrUpdateResponse, + ServerVulnerabilityAssessmentsSettingsDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a ServerVulnerabilityAssessmentsSettings. */ +export interface ServerVulnerabilityAssessmentsSettings { + /** + * Get a list of all the server vulnerability assessments settings over a subscription level scope + * @param options The options parameters. + */ + listBySubscription( + options?: ServerVulnerabilityAssessmentsSettingsListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get a server vulnerability assessments setting of the requested kind, that is set on the + * subscription + * @param settingKind The kind of the server vulnerability assessments setting + * @param options The options parameters. + */ + get( + settingKind: ServerVulnerabilityAssessmentsSettingKindName, + options?: ServerVulnerabilityAssessmentsSettingsGetOptionalParams + ): Promise; + /** + * Create or update a server vulnerability assessments setting of the requested kind on the + * subscription + * @param settingKind The kind of the server vulnerability assessments setting + * @param serverVulnerabilityAssessmentsSetting A server vulnerability assessments setting over a + * predefined scope + * @param options The options parameters. + */ + createOrUpdate( + settingKind: ServerVulnerabilityAssessmentsSettingKindName, + serverVulnerabilityAssessmentsSetting: ServerVulnerabilityAssessmentsSettingUnion, + options?: ServerVulnerabilityAssessmentsSettingsCreateOrUpdateOptionalParams + ): Promise; + /** + * Delete the server vulnerability assessments setting of the requested kind from the subscription + * @param settingKind The kind of the server vulnerability assessments setting + * @param options The options parameters. + */ + delete( + settingKind: ServerVulnerabilityAssessmentsSettingKindName, + options?: ServerVulnerabilityAssessmentsSettingsDeleteOptionalParams + ): Promise; +} diff --git a/sdk/security/arm-security/src/securityCenter.ts b/sdk/security/arm-security/src/securityCenter.ts index 2a9d8ca7353f..067833ee3109 100644 --- a/sdk/security/arm-security/src/securityCenter.ts +++ b/sdk/security/arm-security/src/securityCenter.ts @@ -51,6 +51,7 @@ import { SecureScoreControlDefinitionsImpl, SecuritySolutionsImpl, ConnectorsImpl, + SensitivitySettingsImpl, AlertsImpl, SettingsImpl, IngestionSettingsImpl, @@ -64,13 +65,13 @@ import { APICollectionImpl, APICollectionOnboardingImpl, APICollectionOffboardingImpl, - HealthReportsImpl, - HealthReportOperationsImpl, SqlVulnerabilityAssessmentScansImpl, SqlVulnerabilityAssessmentScanResultsImpl, SqlVulnerabilityAssessmentBaselineRulesImpl, SecurityConnectorsImpl, - SecurityOperatorsImpl + SecurityOperatorsImpl, + ServerVulnerabilityAssessmentsSettingsImpl, + HealthReportsImpl } from "./operations"; import { MdeOnboardings, @@ -114,6 +115,7 @@ import { SecureScoreControlDefinitions, SecuritySolutions, Connectors, + SensitivitySettings, Alerts, Settings, IngestionSettings, @@ -127,19 +129,28 @@ import { APICollection, APICollectionOnboarding, APICollectionOffboarding, - HealthReports, - HealthReportOperations, SqlVulnerabilityAssessmentScans, SqlVulnerabilityAssessmentScanResults, SqlVulnerabilityAssessmentBaselineRules, SecurityConnectors, - SecurityOperators + SecurityOperators, + ServerVulnerabilityAssessmentsSettings, + HealthReports } from "./operationsInterfaces"; -import { SecurityCenterOptionalParams } from "./models"; +import * as Parameters from "./models/parameters"; +import * as Mappers from "./models/mappers"; +import { + SecurityCenterOptionalParams, + UpdateSensitivitySettingsRequest, + UpdateSensitivitySettingsOptionalParams, + UpdateSensitivitySettingsResponse, + GetSensitivitySettingsOptionalParams, + GetSensitivitySettingsOperationResponse +} from "./models"; export class SecurityCenter extends coreClient.ServiceClient { $host: string; - subscriptionId: string; + subscriptionId?: string; /** * Initializes a new instance of the SecurityCenter class. @@ -151,12 +162,26 @@ export class SecurityCenter extends coreClient.ServiceClient { credentials: coreAuth.TokenCredential, subscriptionId: string, options?: SecurityCenterOptionalParams + ); + constructor( + credentials: coreAuth.TokenCredential, + options?: SecurityCenterOptionalParams + ); + constructor( + credentials: coreAuth.TokenCredential, + subscriptionIdOrOptions?: SecurityCenterOptionalParams | string, + options?: SecurityCenterOptionalParams ) { if (credentials === undefined) { throw new Error("'credentials' cannot be null"); } - if (subscriptionId === undefined) { - throw new Error("'subscriptionId' cannot be null"); + + let subscriptionId: string | undefined; + + if (typeof subscriptionIdOrOptions === "string") { + subscriptionId = subscriptionIdOrOptions; + } else if (typeof subscriptionIdOrOptions === "object") { + options = subscriptionIdOrOptions; } // Initializing default values for options @@ -290,6 +315,7 @@ export class SecurityCenter extends coreClient.ServiceClient { ); this.securitySolutions = new SecuritySolutionsImpl(this); this.connectors = new ConnectorsImpl(this); + this.sensitivitySettings = new SensitivitySettingsImpl(this); this.alerts = new AlertsImpl(this); this.settings = new SettingsImpl(this); this.ingestionSettings = new IngestionSettingsImpl(this); @@ -307,8 +333,6 @@ export class SecurityCenter extends coreClient.ServiceClient { this.aPICollection = new APICollectionImpl(this); this.aPICollectionOnboarding = new APICollectionOnboardingImpl(this); this.aPICollectionOffboarding = new APICollectionOffboardingImpl(this); - this.healthReports = new HealthReportsImpl(this); - this.healthReportOperations = new HealthReportOperationsImpl(this); this.sqlVulnerabilityAssessmentScans = new SqlVulnerabilityAssessmentScansImpl( this ); @@ -320,6 +344,38 @@ export class SecurityCenter extends coreClient.ServiceClient { ); this.securityConnectors = new SecurityConnectorsImpl(this); this.securityOperators = new SecurityOperatorsImpl(this); + this.serverVulnerabilityAssessmentsSettings = new ServerVulnerabilityAssessmentsSettingsImpl( + this + ); + this.healthReports = new HealthReportsImpl(this); + } + + /** + * Updates data sensitivity settings for sensitive data discovery + * @param sensitivitySettings The data sensitivity settings to update + * @param options The options parameters. + */ + updateSensitivitySettings( + sensitivitySettings: UpdateSensitivitySettingsRequest, + options?: UpdateSensitivitySettingsOptionalParams + ): Promise { + return this.sendOperationRequest( + { sensitivitySettings, options }, + updateSensitivitySettingsOperationSpec + ); + } + + /** + * Gets data sensitivity settings for sensitive data discovery + * @param options The options parameters. + */ + getSensitivitySettings( + options?: GetSensitivitySettingsOptionalParams + ): Promise { + return this.sendOperationRequest( + { options }, + getSensitivitySettingsOperationSpec + ); } mdeOnboardings: MdeOnboardings; @@ -363,6 +419,7 @@ export class SecurityCenter extends coreClient.ServiceClient { secureScoreControlDefinitions: SecureScoreControlDefinitions; securitySolutions: SecuritySolutions; connectors: Connectors; + sensitivitySettings: SensitivitySettings; alerts: Alerts; settings: Settings; ingestionSettings: IngestionSettings; @@ -376,11 +433,48 @@ export class SecurityCenter extends coreClient.ServiceClient { aPICollection: APICollection; aPICollectionOnboarding: APICollectionOnboarding; aPICollectionOffboarding: APICollectionOffboarding; - healthReports: HealthReports; - healthReportOperations: HealthReportOperations; sqlVulnerabilityAssessmentScans: SqlVulnerabilityAssessmentScans; sqlVulnerabilityAssessmentScanResults: SqlVulnerabilityAssessmentScanResults; sqlVulnerabilityAssessmentBaselineRules: SqlVulnerabilityAssessmentBaselineRules; securityConnectors: SecurityConnectors; securityOperators: SecurityOperators; + serverVulnerabilityAssessmentsSettings: ServerVulnerabilityAssessmentsSettings; + healthReports: HealthReports; } +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const updateSensitivitySettingsOperationSpec: coreClient.OperationSpec = { + path: "/providers/Microsoft.Security/sensitivitySettings/current", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.GetSensitivitySettingsResponse + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + requestBody: Parameters.sensitivitySettings, + queryParameters: [Parameters.apiVersion12], + urlParameters: [Parameters.$host], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const getSensitivitySettingsOperationSpec: coreClient.OperationSpec = { + path: "/providers/Microsoft.Security/sensitivitySettings/current", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GetSensitivitySettingsResponse + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion12], + urlParameters: [Parameters.$host], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/security/arm-security/test/sampleTest.ts b/sdk/security/arm-security/test/sampleTest.ts new file mode 100644 index 000000000000..25aeb3ebcc36 --- /dev/null +++ b/sdk/security/arm-security/test/sampleTest.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + Recorder, + RecorderStartOptions, + env +} from "@azure-tools/test-recorder"; +import { assert } from "chai"; +import { Context } from "mocha"; + +const replaceableVariables: Record = { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id" +}; + +const recorderOptions: RecorderStartOptions = { + envSetupForPlayback: replaceableVariables +}; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async function(this: Context) { + recorder = new Recorder(this.currentTest); + await recorder.start(recorderOptions); + }); + + afterEach(async function() { + await recorder.stop(); + }); + + it("sample test", async function() { + console.log("Hi, I'm a test!"); + }); +}); diff --git a/sdk/security/arm-security/tsconfig.json b/sdk/security/arm-security/tsconfig.json index 3f5144384125..3e6ae96443f3 100644 --- a/sdk/security/arm-security/tsconfig.json +++ b/sdk/security/arm-security/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-security": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"