From a9ca19b6c1247a8a3c21501483023a917e9acc30 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 20 Jul 2022 06:51:23 +0000 Subject: [PATCH] CodeGen from PR 19849 in Azure/azure-rest-api-specs Merge d10140de6aa54f3bf90fd7c686b1d82d681a8bbe into 3b2a6bb54c8834d64840caa1978bfceb5f9d4b00 --- sdk/security/arm-security/CHANGELOG.md | 200 +- sdk/security/arm-security/_meta.json | 8 +- sdk/security/arm-security/package.json | 26 +- .../arm-security/review/arm-security.api.md | 828 +++++++- sdk/security/arm-security/src/models/index.ts | 1107 +++++++++- .../arm-security/src/models/mappers.ts | 1879 +++++++++++++++-- .../arm-security/src/models/parameters.ts | 97 +- .../src/operations/applicationOperations.ts | 144 ++ .../src/operations/applications.ts | 142 ++ .../src/operations/governanceAssignments.ts | 317 +++ .../operations/governanceRuleOperations.ts | 142 ++ .../src/operations/governanceRules.ts | 404 ++++ .../arm-security/src/operations/index.ts | 11 + .../arm-security/src/operations/pricings.ts | 6 +- .../src/operations/secureScores.ts | 8 +- .../securityConnectorApplication.ts | 172 ++ .../securityConnectorApplications.ts | 193 ++ .../securityConnectorGovernanceRule.ts | 193 ++ .../securityConnectorGovernanceRules.ts | 172 ++ ...tyConnectorGovernanceRulesExecuteStatus.ts | 178 ++ .../src/operations/securityConnectors.ts | 16 +- .../arm-security/src/operations/settings.ts | 8 +- ...ubscriptionGovernanceRulesExecuteStatus.ts | 152 ++ .../applicationOperations.ts | 49 + .../src/operationsInterfaces/applications.ts | 22 + .../governanceAssignments.ts | 86 + .../governanceRuleOperations.ts | 22 + .../operationsInterfaces/governanceRules.ts | 114 + .../src/operationsInterfaces/index.ts | 11 + .../src/operationsInterfaces/pricings.ts | 6 +- .../src/operationsInterfaces/secureScores.ts | 6 +- .../securityConnectorApplication.ts | 64 + .../securityConnectorApplications.ts | 30 + .../securityConnectorGovernanceRule.ts | 30 + .../securityConnectorGovernanceRules.ts | 64 + ...tyConnectorGovernanceRulesExecuteStatus.ts | 58 + .../src/operationsInterfaces/settings.ts | 6 +- ...ubscriptionGovernanceRulesExecuteStatus.ts | 46 + .../arm-security/src/securityCenter.ts | 86 +- sdk/security/arm-security/test/sampleTest.ts | 39 +- sdk/security/arm-security/tsconfig.json | 10 +- 41 files changed, 6822 insertions(+), 330 deletions(-) create mode 100644 sdk/security/arm-security/src/operations/applicationOperations.ts create mode 100644 sdk/security/arm-security/src/operations/applications.ts create mode 100644 sdk/security/arm-security/src/operations/governanceAssignments.ts create mode 100644 sdk/security/arm-security/src/operations/governanceRuleOperations.ts create mode 100644 sdk/security/arm-security/src/operations/governanceRules.ts create mode 100644 sdk/security/arm-security/src/operations/securityConnectorApplication.ts create mode 100644 sdk/security/arm-security/src/operations/securityConnectorApplications.ts create mode 100644 sdk/security/arm-security/src/operations/securityConnectorGovernanceRule.ts create mode 100644 sdk/security/arm-security/src/operations/securityConnectorGovernanceRules.ts create mode 100644 sdk/security/arm-security/src/operations/securityConnectorGovernanceRulesExecuteStatus.ts create mode 100644 sdk/security/arm-security/src/operations/subscriptionGovernanceRulesExecuteStatus.ts create mode 100644 sdk/security/arm-security/src/operationsInterfaces/applicationOperations.ts create mode 100644 sdk/security/arm-security/src/operationsInterfaces/applications.ts create mode 100644 sdk/security/arm-security/src/operationsInterfaces/governanceAssignments.ts create mode 100644 sdk/security/arm-security/src/operationsInterfaces/governanceRuleOperations.ts create mode 100644 sdk/security/arm-security/src/operationsInterfaces/governanceRules.ts create mode 100644 sdk/security/arm-security/src/operationsInterfaces/securityConnectorApplication.ts create mode 100644 sdk/security/arm-security/src/operationsInterfaces/securityConnectorApplications.ts create mode 100644 sdk/security/arm-security/src/operationsInterfaces/securityConnectorGovernanceRule.ts create mode 100644 sdk/security/arm-security/src/operationsInterfaces/securityConnectorGovernanceRules.ts create mode 100644 sdk/security/arm-security/src/operationsInterfaces/securityConnectorGovernanceRulesExecuteStatus.ts create mode 100644 sdk/security/arm-security/src/operationsInterfaces/subscriptionGovernanceRulesExecuteStatus.ts diff --git a/sdk/security/arm-security/CHANGELOG.md b/sdk/security/arm-security/CHANGELOG.md index 18ccbd2091ee..1dca9efd0602 100644 --- a/sdk/security/arm-security/CHANGELOG.md +++ b/sdk/security/arm-security/CHANGELOG.md @@ -1,15 +1,199 @@ # Release History + +## 6.0.0-beta.1 (2022-07-20) + +**Features** -## 5.0.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed + - Added operation group ApplicationOperations + - Added operation group Applications + - Added operation group GovernanceAssignments + - Added operation group GovernanceRuleOperations + - Added operation group GovernanceRules + - Added operation group SecurityConnectorApplication + - Added operation group SecurityConnectorApplications + - Added operation group SecurityConnectorGovernanceRule + - Added operation group SecurityConnectorGovernanceRules + - Added operation group SecurityConnectorGovernanceRulesExecuteStatus + - Added operation group SubscriptionGovernanceRulesExecuteStatus + - Added Interface ApplicationCondition + - Added Interface ApplicationCreateOrUpdateOptionalParams + - Added Interface ApplicationDeleteOptionalParams + - Added Interface ApplicationGetOptionalParams + - Added Interface ApplicationsList + - Added Interface ApplicationsListNextOptionalParams + - Added Interface ApplicationsListOptionalParams + - Added Interface AwsOrganizationalData + - Added Interface Condition + - Added Interface CspmMonitorGcpOfferingNativeCloudConnection + - Added Interface DefenderFoDatabasesAwsOfferingArcAutoProvisioning + - Added Interface DefenderFoDatabasesAwsOfferingArcAutoProvisioningServicePrincipalSecretMetadata + - Added Interface DefenderForContainersAwsOfferingContainerVulnerabilityAssessment + - Added Interface DefenderForContainersAwsOfferingContainerVulnerabilityAssessmentTask + - Added Interface DefenderForContainersGcpOfferingDataPipelineNativeCloudConnection + - Added Interface DefenderForContainersGcpOfferingNativeCloudConnection + - Added Interface DefenderForDatabasesGcpOfferingArcAutoProvisioning + - Added Interface DefenderForDatabasesGcpOfferingArcAutoProvisioningConfiguration + - Added Interface DefenderForDatabasesGcpOfferingDefenderForDatabasesArcAutoProvisioning + - Added Interface DefenderForServersAwsOfferingMdeAutoProvisioning + - Added Interface DefenderForServersAwsOfferingSubPlan + - Added Interface DefenderForServersAwsOfferingVaAutoProvisioning + - Added Interface DefenderForServersAwsOfferingVaAutoProvisioningConfiguration + - Added Interface DefenderForServersAwsOfferingVmScanners + - Added Interface DefenderForServersAwsOfferingVmScannersConfiguration + - Added Interface DefenderForServersGcpOfferingArcAutoProvisioning + - Added Interface DefenderForServersGcpOfferingArcAutoProvisioningConfiguration + - Added Interface DefenderForServersGcpOfferingDefenderForServers + - Added Interface DefenderForServersGcpOfferingMdeAutoProvisioning + - Added Interface DefenderForServersGcpOfferingSubPlan + - Added Interface DefenderForServersGcpOfferingVaAutoProvisioning + - Added Interface DefenderForServersGcpOfferingVaAutoProvisioningConfiguration + - Added Interface EnvironmentData + - Added Interface ExecuteGovernanceRuleParams + - Added Interface ExecuteRuleStatus + - Added Interface GcpOrganizationalData + - Added Interface GcpProjectDetails + - Added Interface GovernanceAssignmentAdditionalData + - Added Interface GovernanceAssignmentsCreateOrUpdateOptionalParams + - Added Interface GovernanceAssignmentsDeleteOptionalParams + - Added Interface GovernanceAssignmentsGetOptionalParams + - Added Interface GovernanceAssignmentsList + - Added Interface GovernanceAssignmentsListNextOptionalParams + - Added Interface GovernanceAssignmentsListOptionalParams + - Added Interface GovernanceEmailNotification + - Added Interface GovernanceRuleEmailNotification + - Added Interface GovernanceRuleList + - Added Interface GovernanceRuleListNextOptionalParams + - Added Interface GovernanceRuleListOptionalParams + - Added Interface GovernanceRuleOwnerSource + - Added Interface GovernanceRulesCreateOrUpdateOptionalParams + - Added Interface GovernanceRulesDeleteOptionalParams + - Added Interface GovernanceRulesGetOptionalParams + - Added Interface GovernanceRulesRuleIdExecuteSingleSecurityConnectorHeaders + - Added Interface GovernanceRulesRuleIdExecuteSingleSecurityConnectorOptionalParams + - Added Interface GovernanceRulesRuleIdExecuteSingleSubscriptionHeaders + - Added Interface GovernanceRulesRuleIdExecuteSingleSubscriptionOptionalParams + - Added Interface RemediationEta + - Added Interface SecurityConnectorApplicationCreateOrUpdateOptionalParams + - Added Interface SecurityConnectorApplicationDeleteOptionalParams + - Added Interface SecurityConnectorApplicationGetOptionalParams + - Added Interface SecurityConnectorApplicationsListNextOptionalParams + - Added Interface SecurityConnectorApplicationsListOptionalParams + - Added Interface SecurityConnectorGovernanceRuleListNextOptionalParams + - Added Interface SecurityConnectorGovernanceRuleListOptionalParams + - Added Interface SecurityConnectorGovernanceRulesCreateOrUpdateOptionalParams + - Added Interface SecurityConnectorGovernanceRulesDeleteOptionalParams + - Added Interface SecurityConnectorGovernanceRulesExecuteStatusGetHeaders + - Added Interface SecurityConnectorGovernanceRulesExecuteStatusGetOptionalParams + - Added Interface SecurityConnectorGovernanceRulesGetOptionalParams + - Added Interface SubscriptionGovernanceRulesExecuteStatusGetHeaders + - Added Interface SubscriptionGovernanceRulesExecuteStatusGetOptionalParams + - Added Type Alias Application + - Added Type Alias ApplicationConditionOperator + - Added Type Alias ApplicationCreateOrUpdateResponse + - Added Type Alias ApplicationGetResponse + - Added Type Alias ApplicationsListNextResponse + - Added Type Alias ApplicationsListResponse + - Added Type Alias ApplicationSourceResourceType + - Added Type Alias AWSEnvironmentData + - Added Type Alias AwsOrganizationalDataMaster + - Added Type Alias AwsOrganizationalDataMember + - Added Type Alias AwsOrganizationalDataUnion + - Added Type Alias AzureDevOpsScopeEnvironmentData + - Added Type Alias CspmMonitorAzureDevOpsOffering + - Added Type Alias CspmMonitorGcpOffering + - Added Type Alias CspmMonitorGithubOffering + - Added Type Alias DefenderFoDatabasesAwsOffering + - Added Type Alias DefenderForContainersGcpOffering + - Added Type Alias DefenderForDatabasesGcpOffering + - Added Type Alias DefenderForServersGcpOffering + - Added Type Alias EnvironmentDataUnion + - Added Type Alias EnvironmentType + - Added Type Alias GcpOrganizationalDataMember + - Added Type Alias GcpOrganizationalDataOrganization + - Added Type Alias GcpOrganizationalDataUnion + - Added Type Alias GcpProjectEnvironmentData + - Added Type Alias GithubScopeEnvironmentData + - Added Type Alias GovernanceAssignment + - Added Type Alias GovernanceAssignmentsCreateOrUpdateResponse + - Added Type Alias GovernanceAssignmentsGetResponse + - Added Type Alias GovernanceAssignmentsListNextResponse + - Added Type Alias GovernanceAssignmentsListResponse + - Added Type Alias GovernanceRule + - Added Type Alias GovernanceRuleConditionOperator + - Added Type Alias GovernanceRuleListNextResponse + - Added Type Alias GovernanceRuleListResponse + - Added Type Alias GovernanceRuleOwnerSourceType + - Added Type Alias GovernanceRulesCreateOrUpdateResponse + - Added Type Alias GovernanceRulesGetResponse + - Added Type Alias GovernanceRuleSourceResourceType + - Added Type Alias GovernanceRulesRuleIdExecuteSingleSecurityConnectorResponse + - Added Type Alias GovernanceRulesRuleIdExecuteSingleSubscriptionResponse + - Added Type Alias GovernanceRuleType + - Added Type Alias ScanningMode + - Added Type Alias SecurityConnectorApplicationCreateOrUpdateResponse + - Added Type Alias SecurityConnectorApplicationGetResponse + - Added Type Alias SecurityConnectorApplicationsListNextResponse + - Added Type Alias SecurityConnectorApplicationsListResponse + - Added Type Alias SecurityConnectorGovernanceRuleListNextResponse + - Added Type Alias SecurityConnectorGovernanceRuleListResponse + - Added Type Alias SecurityConnectorGovernanceRulesCreateOrUpdateResponse + - Added Type Alias SecurityConnectorGovernanceRulesExecuteStatusGetResponse + - Added Type Alias SecurityConnectorGovernanceRulesGetResponse + - Added Type Alias SubPlan + - Added Type Alias SubscriptionGovernanceRulesExecuteStatusGetResponse + - Added Type Alias Type + - Interface DefenderForServersAwsOfferingArcAutoProvisioning has a new optional parameter cloudRoleArn + - Class SecurityCenter has a new parameter applicationOperations + - Class SecurityCenter has a new parameter applications + - Class SecurityCenter has a new parameter governanceAssignments + - Class SecurityCenter has a new parameter governanceRuleOperations + - Class SecurityCenter has a new parameter governanceRules + - Class SecurityCenter has a new parameter securityConnectorApplication + - Class SecurityCenter has a new parameter securityConnectorApplications + - Class SecurityCenter has a new parameter securityConnectorGovernanceRule + - Class SecurityCenter has a new parameter securityConnectorGovernanceRules + - Class SecurityCenter has a new parameter securityConnectorGovernanceRulesExecuteStatus + - Class SecurityCenter has a new parameter subscriptionGovernanceRulesExecuteStatus + - Type Alias DefenderForContainersAwsOffering has a new parameter containerVulnerabilityAssessment + - Type Alias DefenderForContainersAwsOffering has a new parameter containerVulnerabilityAssessmentTask + - Type Alias DefenderForContainersAwsOffering has a new parameter enableContainerVulnerabilityAssessment + - Type Alias DefenderForContainersAwsOffering has a new parameter autoProvisioning + - Type Alias DefenderForContainersAwsOffering has a new parameter kubeAuditRetentionTime + - Type Alias DefenderForContainersAwsOffering has a new parameter scubaExternalId + - Type Alias DefenderForServersAwsOffering has a new parameter vaAutoProvisioning + - Type Alias DefenderForServersAwsOffering has a new parameter mdeAutoProvisioning + - Type Alias DefenderForServersAwsOffering has a new parameter subPlan + - Type Alias DefenderForServersAwsOffering has a new parameter vmScanners + - Type Alias SecurityConnector has a new parameter hierarchyIdentifierTrialEndDate + - Type Alias SecurityConnector has a new parameter environmentName + - Type Alias SecurityConnector has a new parameter environmentData + - Added Enum KnownApplicationConditionOperator + - Added Enum KnownApplicationSourceResourceType + - Added Enum KnownEnvironmentType + - Added Enum KnownGovernanceRuleConditionOperator + - Added Enum KnownGovernanceRuleOwnerSourceType + - Added Enum KnownGovernanceRuleSourceResourceType + - Added Enum KnownGovernanceRuleType + - Added Enum KnownScanningMode + - Added Enum KnownSubPlan + - Added Enum KnownType + - Enum KnownCloudName has a new value AzureDevOps + - Enum KnownCloudName has a new value Github + - Enum KnownOfferingType has a new value CspmMonitorAzureDevOps + - Enum KnownOfferingType has a new value CspmMonitorGcp + - Enum KnownOfferingType has a new value CspmMonitorGithub + - Enum KnownOfferingType has a new value DefenderForContainersGcp + - Enum KnownOfferingType has a new value DefenderForDatabasesAws + - Enum KnownOfferingType has a new value DefenderForDatabasesGcp + - Enum KnownOfferingType has a new value DefenderForServersGcp + - Enum KnownSettingName has a new value WdatpUnifiedSolution -### Other Changes +**Breaking Changes** + - Type Alias SecurityConnector no longer has parameter cloudName + - Type Alias SecurityConnector no longer has parameter organizationalData + + ## 5.0.0 (2022-03-30) **Features** diff --git a/sdk/security/arm-security/_meta.json b/sdk/security/arm-security/_meta.json index c47a1003ea69..1bffea521d5c 100644 --- a/sdk/security/arm-security/_meta.json +++ b/sdk/security/arm-security/_meta.json @@ -1,8 +1,8 @@ { - "commit": "3c1da29166fe1306071c939ac1344b092bafd0ce", + "commit": "a8cac4886317b10030cfc757b4f56ef075418eab", "readme": "specification/security/resource-manager/readme.md", - "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\work\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\security\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-alpha.18.20220329.1 --generate-sample=true", + "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --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.0-alpha.19.20220425.1", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.2.1", - "use": "@autorest/typescript@6.0.0-alpha.18.20220329.1" + "release_tool": "@azure-tools/js-sdk-release-tools@2.4.0", + "use": "@autorest/typescript@6.0.0-alpha.19.20220425.1" } \ No newline at end of file diff --git a/sdk/security/arm-security/package.json b/sdk/security/arm-security/package.json index 6966564a276c..1a5fbc1ab3d8 100644 --- a/sdk/security/arm-security/package.json +++ b/sdk/security/arm-security/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for SecurityCenter.", - "version": "5.0.1", + "version": "6.0.0-beta.1", "engines": { "node": ">=12.0.0" }, @@ -11,9 +11,9 @@ "@azure/core-lro": "^2.2.0", "@azure/abort-controller": "^1.0.0", "@azure/core-paging": "^1.2.0", - "@azure/core-client": "^1.0.0", + "@azure/core-client": "^1.5.0", "@azure/core-auth": "^1.3.0", - "@azure/core-rest-pipeline": "^1.1.0", + "@azure/core-rest-pipeline": "^1.8.0", "tslib": "^2.2.0" }, "keywords": [ @@ -40,9 +40,11 @@ "uglify-js": "^3.4.9", "rimraf": "^3.0.0", "@azure/identity": "^2.0.1", - "@azure-tools/test-recorder": "^1.0.0", + "@azure-tools/test-recorder": "^2.0.0", + "@azure-tools/test-credential": "^1.0.0", "mocha": "^7.1.1", - "cross-env": "^7.0.2" + "cross-env": "^7.0.2", + "@azure/dev-tool": "^1.0.0" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/security/arm-security", "repository": { @@ -93,7 +95,7 @@ "unit-test:node": "cross-env TEST_MODE=playback npm run integration-test:node", "unit-test:browser": "echo skipped", "integration-test": "npm run integration-test:node && npm run integration-test:browser", - "integration-test:node": "mocha -r esm --require ts-node/register --timeout 1200000 --full-trace test/*.ts --reporter ../../../common/tools/mocha-multi-reporter.js", + "integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'", "integration-test:browser": "echo skipped", "docs": "echo skipped" }, @@ -106,13 +108,5 @@ } ] }, - "autoPublish": true, - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-security?view=azure-node-preview" - } -} + "autoPublish": true +} \ No newline at end of file diff --git a/sdk/security/arm-security/review/arm-security.api.md b/sdk/security/arm-security/review/arm-security.api.md index 9cb47bc36105..c7fb8dd45329 100644 --- a/sdk/security/arm-security/review/arm-security.api.md +++ b/sdk/security/arm-security/review/arm-security.api.md @@ -529,6 +529,77 @@ export type AmqpD2CMessagesNotInAllowedRange = TimeWindowCustomAlertRule & { ruleType: "AmqpD2CMessagesNotInAllowedRange"; }; +// @public +export type Application = Resource & { + displayName?: string; + description?: string; + sourceResourceType?: ApplicationSourceResourceType; + conditionSets?: Record[]; +}; + +// @public +export interface ApplicationCondition { + operator?: ApplicationConditionOperator; + property?: string; + value?: string; +} + +// @public +export type ApplicationConditionOperator = string; + +// @public +export interface ApplicationCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ApplicationCreateOrUpdateResponse = Application; + +// @public +export interface ApplicationDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface ApplicationGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ApplicationGetResponse = Application; + +// @public +export interface ApplicationOperations { + createOrUpdate(applicationId: string, application: Application, options?: ApplicationCreateOrUpdateOptionalParams): Promise; + delete(applicationId: string, options?: ApplicationDeleteOptionalParams): Promise; + get(applicationId: string, options?: ApplicationGetOptionalParams): Promise; +} + +// @public +export interface Applications { + list(options?: ApplicationsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface ApplicationsList { + readonly nextLink?: string; + readonly value?: Application[]; +} + +// @public +export interface ApplicationsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ApplicationsListNextResponse = ApplicationsList; + +// @public +export interface ApplicationsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ApplicationsListResponse = ApplicationsList; + +// @public +export type ApplicationSourceResourceType = string; + // @public export type AscLocation = Resource & { properties?: Record; @@ -901,6 +972,38 @@ export type AwsCredsAuthenticationDetailsProperties = AuthenticationDetailsPrope awsSecretAccessKey: string; }; +// @public +export type AWSEnvironmentData = EnvironmentData & { + environmentType: "AwsAccount"; + organizationalData?: AwsOrganizationalDataUnion; +}; + +// @public +export interface AwsOrganizationalData { + organizationMembershipType: "Organization" | "Member"; +} + +// @public +export type AwsOrganizationalDataMaster = AwsOrganizationalData & { + organizationMembershipType: "Organization"; + stacksetName?: string; + excludedAccountIds?: string[]; +}; + +// @public +export type AwsOrganizationalDataMember = AwsOrganizationalData & { + organizationMembershipType: "Member"; + parentHierarchyId?: string; +}; + +// @public (undocumented) +export type AwsOrganizationalDataUnion = AwsOrganizationalData | AwsOrganizationalDataMaster | AwsOrganizationalDataMember; + +// @public +export type AzureDevOpsScopeEnvironmentData = EnvironmentData & { + environmentType: "AzureDevOpsScope"; +}; + // @public export type AzureResourceDetails = ResourceDetails & { source: "Azure"; @@ -985,11 +1088,11 @@ export type CloudName = string; // @public export interface CloudOffering { readonly description?: string; - offeringType: "CspmMonitorAws" | "DefenderForContainersAws" | "DefenderForServersAws" | "InformationProtectionAws"; + offeringType: "CspmMonitorAws" | "DefenderForContainersAws" | "DefenderForServersAws" | "DefenderForDatabasesAws" | "InformationProtectionAws" | "CspmMonitorGcp" | "DefenderForServersGcp" | "DefenderForDatabasesGcp" | "DefenderForContainersGcp" | "CspmMonitorGithub" | "CspmMonitorAzureDevOps"; } // @public (undocumented) -export type CloudOfferingUnion = CloudOffering | CspmMonitorAwsOffering | DefenderForContainersAwsOffering | DefenderForServersAwsOffering | InformationProtectionAwsOffering; +export type CloudOfferingUnion = CloudOffering | CspmMonitorAwsOffering | DefenderForContainersAwsOffering | DefenderForServersAwsOffering | DefenderFoDatabasesAwsOffering | InformationProtectionAwsOffering | CspmMonitorGcpOffering | DefenderForServersGcpOffering | DefenderForDatabasesGcpOffering | DefenderForContainersGcpOffering | CspmMonitorGithubOffering | CspmMonitorAzureDevOpsOffering; // @public export type Compliance = Resource & { @@ -1075,6 +1178,13 @@ export interface CompliancesListOptionalParams extends coreClient.OperationOptio // @public export type CompliancesListResponse = ComplianceList; +// @public +export interface Condition { + operator?: GovernanceRuleConditionOperator; + property?: string; + value?: string; +} + // @public export type ConfigurationStatus = string; @@ -1200,6 +1310,28 @@ export interface CspmMonitorAwsOfferingNativeCloudConnection { cloudRoleArn?: string; } +// @public +export type CspmMonitorAzureDevOpsOffering = CloudOffering & { + offeringType: "CspmMonitorAzureDevOps"; +}; + +// @public +export type CspmMonitorGcpOffering = CloudOffering & { + offeringType: "CspmMonitorGcp"; + nativeCloudConnection?: CspmMonitorGcpOfferingNativeCloudConnection; +}; + +// @public +export interface CspmMonitorGcpOfferingNativeCloudConnection { + serviceAccountEmailAddress?: string; + workloadIdentityProviderId?: string; +} + +// @public +export type CspmMonitorGithubOffering = CloudOffering & { + offeringType: "CspmMonitorGithub"; +}; + // @public export interface CustomAlertRule { readonly description?: string; @@ -1386,6 +1518,26 @@ export type DataExportSettings = Setting & { // @public export type DataSource = string; +// @public +export type DefenderFoDatabasesAwsOffering = CloudOffering & { + offeringType: "DefenderForDatabasesAws"; + arcAutoProvisioning?: DefenderFoDatabasesAwsOfferingArcAutoProvisioning; +}; + +// @public +export interface DefenderFoDatabasesAwsOfferingArcAutoProvisioning { + cloudRoleArn?: string; + enabled?: boolean; + servicePrincipalSecretMetadata?: DefenderFoDatabasesAwsOfferingArcAutoProvisioningServicePrincipalSecretMetadata; +} + +// @public +export interface DefenderFoDatabasesAwsOfferingArcAutoProvisioningServicePrincipalSecretMetadata { + expiryDate?: Date; + parameterNameInStore?: string; + parameterStoreRegion?: string; +} + // @public export type DefenderForContainersAwsOffering = CloudOffering & { offeringType: "DefenderForContainersAws"; @@ -1393,6 +1545,12 @@ export type DefenderForContainersAwsOffering = CloudOffering & { kubernetesScubaReader?: DefenderForContainersAwsOfferingKubernetesScubaReader; cloudWatchToKinesis?: DefenderForContainersAwsOfferingCloudWatchToKinesis; kinesisToS3?: DefenderForContainersAwsOfferingKinesisToS3; + containerVulnerabilityAssessment?: DefenderForContainersAwsOfferingContainerVulnerabilityAssessment; + containerVulnerabilityAssessmentTask?: DefenderForContainersAwsOfferingContainerVulnerabilityAssessmentTask; + enableContainerVulnerabilityAssessment?: boolean; + autoProvisioning?: boolean; + kubeAuditRetentionTime?: number; + scubaExternalId?: string; }; // @public @@ -1400,6 +1558,16 @@ export interface DefenderForContainersAwsOfferingCloudWatchToKinesis { cloudRoleArn?: string; } +// @public +export interface DefenderForContainersAwsOfferingContainerVulnerabilityAssessment { + cloudRoleArn?: string; +} + +// @public +export interface DefenderForContainersAwsOfferingContainerVulnerabilityAssessmentTask { + cloudRoleArn?: string; +} + // @public export interface DefenderForContainersAwsOfferingKinesisToS3 { cloudRoleArn?: string; @@ -1415,15 +1583,67 @@ export interface DefenderForContainersAwsOfferingKubernetesService { cloudRoleArn?: string; } +// @public +export type DefenderForContainersGcpOffering = CloudOffering & { + offeringType: "DefenderForContainersGcp"; + nativeCloudConnection?: DefenderForContainersGcpOfferingNativeCloudConnection; + dataPipelineNativeCloudConnection?: DefenderForContainersGcpOfferingDataPipelineNativeCloudConnection; + auditLogsAutoProvisioningFlag?: boolean; + defenderAgentAutoProvisioningFlag?: boolean; + policyAgentAutoProvisioningFlag?: boolean; +}; + +// @public +export interface DefenderForContainersGcpOfferingDataPipelineNativeCloudConnection { + serviceAccountEmailAddress?: string; + workloadIdentityProviderId?: string; +} + +// @public +export interface DefenderForContainersGcpOfferingNativeCloudConnection { + serviceAccountEmailAddress?: string; + workloadIdentityProviderId?: string; +} + +// @public +export type DefenderForDatabasesGcpOffering = CloudOffering & { + offeringType: "DefenderForDatabasesGcp"; + arcAutoProvisioning?: DefenderForDatabasesGcpOfferingArcAutoProvisioning; + defenderForDatabasesArcAutoProvisioning?: DefenderForDatabasesGcpOfferingDefenderForDatabasesArcAutoProvisioning; +}; + +// @public +export interface DefenderForDatabasesGcpOfferingArcAutoProvisioning { + configuration?: DefenderForDatabasesGcpOfferingArcAutoProvisioningConfiguration; + enabled?: boolean; +} + +// @public +export interface DefenderForDatabasesGcpOfferingArcAutoProvisioningConfiguration { + agentOnboardingServiceAccountNumericId?: string; + clientId?: string; +} + +// @public +export interface DefenderForDatabasesGcpOfferingDefenderForDatabasesArcAutoProvisioning { + serviceAccountEmailAddress?: string; + workloadIdentityProviderId?: string; +} + // @public export type DefenderForServersAwsOffering = CloudOffering & { offeringType: "DefenderForServersAws"; defenderForServers?: DefenderForServersAwsOfferingDefenderForServers; arcAutoProvisioning?: DefenderForServersAwsOfferingArcAutoProvisioning; + vaAutoProvisioning?: DefenderForServersAwsOfferingVaAutoProvisioning; + mdeAutoProvisioning?: DefenderForServersAwsOfferingMdeAutoProvisioning; + subPlan?: DefenderForServersAwsOfferingSubPlan; + vmScanners?: DefenderForServersAwsOfferingVmScanners; }; // @public export interface DefenderForServersAwsOfferingArcAutoProvisioning { + cloudRoleArn?: string; enabled?: boolean; servicePrincipalSecretMetadata?: DefenderForServersAwsOfferingArcAutoProvisioningServicePrincipalSecretMetadata; } @@ -1440,6 +1660,91 @@ export interface DefenderForServersAwsOfferingDefenderForServers { cloudRoleArn?: string; } +// @public +export interface DefenderForServersAwsOfferingMdeAutoProvisioning { + configuration?: Record; + enabled?: boolean; +} + +// @public +export interface DefenderForServersAwsOfferingSubPlan { + type?: SubPlan; +} + +// @public +export interface DefenderForServersAwsOfferingVaAutoProvisioning { + configuration?: DefenderForServersAwsOfferingVaAutoProvisioningConfiguration; + enabled?: boolean; +} + +// @public +export interface DefenderForServersAwsOfferingVaAutoProvisioningConfiguration { + type?: Type; +} + +// @public +export interface DefenderForServersAwsOfferingVmScanners { + configuration?: DefenderForServersAwsOfferingVmScannersConfiguration; + enabled?: boolean; +} + +// @public +export interface DefenderForServersAwsOfferingVmScannersConfiguration { + cloudRoleArn?: string; + exclusionTags?: Record; + scanningMode?: ScanningMode; +} + +// @public +export type DefenderForServersGcpOffering = CloudOffering & { + offeringType: "DefenderForServersGcp"; + defenderForServers?: DefenderForServersGcpOfferingDefenderForServers; + arcAutoProvisioning?: DefenderForServersGcpOfferingArcAutoProvisioning; + vaAutoProvisioning?: DefenderForServersGcpOfferingVaAutoProvisioning; + mdeAutoProvisioning?: DefenderForServersGcpOfferingMdeAutoProvisioning; + subPlan?: DefenderForServersGcpOfferingSubPlan; +}; + +// @public +export interface DefenderForServersGcpOfferingArcAutoProvisioning { + configuration?: DefenderForServersGcpOfferingArcAutoProvisioningConfiguration; + enabled?: boolean; +} + +// @public +export interface DefenderForServersGcpOfferingArcAutoProvisioningConfiguration { + agentOnboardingServiceAccountNumericId?: string; + clientId?: string; +} + +// @public +export interface DefenderForServersGcpOfferingDefenderForServers { + serviceAccountEmailAddress?: string; + workloadIdentityProviderId?: string; +} + +// @public +export interface DefenderForServersGcpOfferingMdeAutoProvisioning { + configuration?: Record; + enabled?: boolean; +} + +// @public +export interface DefenderForServersGcpOfferingSubPlan { + type?: SubPlan; +} + +// @public +export interface DefenderForServersGcpOfferingVaAutoProvisioning { + configuration?: DefenderForServersGcpOfferingVaAutoProvisioningConfiguration; + enabled?: boolean; +} + +// @public +export interface DefenderForServersGcpOfferingVaAutoProvisioningConfiguration { + type?: Type; +} + // @public export type DenylistCustomAlertRule = ListCustomAlertRule & { ruleType: "DenylistCustomAlertRule"; @@ -1580,6 +1885,17 @@ export type EnforcementMode = string; // @public export type EnforcementSupport = string; +// @public +export interface EnvironmentData { + environmentType: "AwsAccount" | "GcpProject" | "GithubScope" | "AzureDevOpsScope"; +} + +// @public (undocumented) +export type EnvironmentDataUnion = EnvironmentData | AWSEnvironmentData | GcpProjectEnvironmentData | GithubScopeEnvironmentData | AzureDevOpsScopeEnvironmentData; + +// @public +export type EnvironmentType = string; + // @public export interface ErrorAdditionalInfo { readonly info?: Record; @@ -1595,6 +1911,16 @@ export interface ETag { type EventSource_2 = string; export { EventSource_2 as EventSource } +// @public +export interface ExecuteGovernanceRuleParams { + override?: boolean; +} + +// @public +export interface ExecuteRuleStatus { + readonly operationId?: string; +} + // @public export type ExpandControlsEnum = string; @@ -1706,6 +2032,240 @@ export type GcpCredentialsDetailsProperties = AuthenticationDetailsProperties & clientX509CertUrl: string; }; +// @public +export interface GcpOrganizationalData { + organizationMembershipType: "Organization" | "Member"; +} + +// @public +export type GcpOrganizationalDataMember = GcpOrganizationalData & { + organizationMembershipType: "Member"; + parentHierarchyId?: string; + managementProjectNumber?: string; +}; + +// @public +export type GcpOrganizationalDataOrganization = GcpOrganizationalData & { + organizationMembershipType: "Organization"; + excludedProjectNumbers?: string[]; + serviceAccountEmailAddress?: string; + workloadIdentityProviderId?: string; +}; + +// @public (undocumented) +export type GcpOrganizationalDataUnion = GcpOrganizationalData | GcpOrganizationalDataOrganization | GcpOrganizationalDataMember; + +// @public +export interface GcpProjectDetails { + projectId?: string; + projectNumber?: string; + readonly workloadIdentityPoolId?: string; +} + +// @public +export type GcpProjectEnvironmentData = EnvironmentData & { + environmentType: "GcpProject"; + organizationalData?: GcpOrganizationalDataUnion; + projectDetails?: GcpProjectDetails; +}; + +// @public +export type GithubScopeEnvironmentData = EnvironmentData & { + environmentType: "GithubScope"; +}; + +// @public +export type GovernanceAssignment = Resource & { + owner?: string; + remediationDueDate?: Date; + remediationEta?: RemediationEta; + isGracePeriod?: boolean; + governanceEmailNotification?: GovernanceEmailNotification; + additionalData?: GovernanceAssignmentAdditionalData; +}; + +// @public +export interface GovernanceAssignmentAdditionalData { + ticketLink?: string; + ticketNumber?: number; + ticketStatus?: string; +} + +// @public +export interface GovernanceAssignments { + createOrUpdate(scope: string, assessmentName: string, assignmentKey: string, governanceAssignment: GovernanceAssignment, options?: GovernanceAssignmentsCreateOrUpdateOptionalParams): Promise; + delete(scope: string, assessmentName: string, assignmentKey: string, options?: GovernanceAssignmentsDeleteOptionalParams): Promise; + get(scope: string, assessmentName: string, assignmentKey: string, options?: GovernanceAssignmentsGetOptionalParams): Promise; + list(scope: string, assessmentName: string, options?: GovernanceAssignmentsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface GovernanceAssignmentsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type GovernanceAssignmentsCreateOrUpdateResponse = GovernanceAssignment; + +// @public +export interface GovernanceAssignmentsDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface GovernanceAssignmentsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type GovernanceAssignmentsGetResponse = GovernanceAssignment; + +// @public +export interface GovernanceAssignmentsList { + readonly nextLink?: string; + readonly value?: GovernanceAssignment[]; +} + +// @public +export interface GovernanceAssignmentsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type GovernanceAssignmentsListNextResponse = GovernanceAssignmentsList; + +// @public +export interface GovernanceAssignmentsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type GovernanceAssignmentsListResponse = GovernanceAssignmentsList; + +// @public +export interface GovernanceEmailNotification { + disableManagerEmailNotification?: boolean; + disableOwnerEmailNotification?: boolean; +} + +// @public +export type GovernanceRule = Resource & { + displayName?: string; + description?: string; + remediationTimeframe?: string; + isGracePeriod?: boolean; + rulePriority?: number; + isDisabled?: boolean; + ruleType?: GovernanceRuleType; + sourceResourceType?: GovernanceRuleSourceResourceType; + conditionSets?: Record[]; + ownerSource?: GovernanceRuleOwnerSource; + governanceEmailNotification?: GovernanceRuleEmailNotification; +}; + +// @public +export type GovernanceRuleConditionOperator = string; + +// @public +export interface GovernanceRuleEmailNotification { + disableManagerEmailNotification?: boolean; + disableOwnerEmailNotification?: boolean; +} + +// @public +export interface GovernanceRuleList { + readonly nextLink?: string; + readonly value?: GovernanceRule[]; +} + +// @public +export interface GovernanceRuleListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type GovernanceRuleListNextResponse = GovernanceRuleList; + +// @public +export interface GovernanceRuleListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type GovernanceRuleListResponse = GovernanceRuleList; + +// @public +export interface GovernanceRuleOperations { + list(options?: GovernanceRuleListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface GovernanceRuleOwnerSource { + type?: GovernanceRuleOwnerSourceType; + value?: string; +} + +// @public +export type GovernanceRuleOwnerSourceType = string; + +// @public +export interface GovernanceRules { + beginRuleIdExecuteSingleSecurityConnector(resourceGroupName: string, securityConnectorName: string, ruleId: string, options?: GovernanceRulesRuleIdExecuteSingleSecurityConnectorOptionalParams): Promise, GovernanceRulesRuleIdExecuteSingleSecurityConnectorResponse>>; + beginRuleIdExecuteSingleSecurityConnectorAndWait(resourceGroupName: string, securityConnectorName: string, ruleId: string, options?: GovernanceRulesRuleIdExecuteSingleSecurityConnectorOptionalParams): Promise; + beginRuleIdExecuteSingleSubscription(ruleId: string, options?: GovernanceRulesRuleIdExecuteSingleSubscriptionOptionalParams): Promise, GovernanceRulesRuleIdExecuteSingleSubscriptionResponse>>; + beginRuleIdExecuteSingleSubscriptionAndWait(ruleId: string, options?: GovernanceRulesRuleIdExecuteSingleSubscriptionOptionalParams): Promise; + createOrUpdate(ruleId: string, governanceRule: GovernanceRule, options?: GovernanceRulesCreateOrUpdateOptionalParams): Promise; + delete(ruleId: string, options?: GovernanceRulesDeleteOptionalParams): Promise; + get(ruleId: string, options?: GovernanceRulesGetOptionalParams): Promise; +} + +// @public +export interface GovernanceRulesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type GovernanceRulesCreateOrUpdateResponse = GovernanceRule; + +// @public +export interface GovernanceRulesDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface GovernanceRulesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type GovernanceRulesGetResponse = GovernanceRule; + +// @public +export type GovernanceRuleSourceResourceType = string; + +// @public +export interface GovernanceRulesRuleIdExecuteSingleSecurityConnectorHeaders { + location?: string; +} + +// @public +export interface GovernanceRulesRuleIdExecuteSingleSecurityConnectorOptionalParams extends coreClient.OperationOptions { + executeGovernanceRuleParams?: ExecuteGovernanceRuleParams; + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type GovernanceRulesRuleIdExecuteSingleSecurityConnectorResponse = GovernanceRulesRuleIdExecuteSingleSecurityConnectorHeaders; + +// @public +export interface GovernanceRulesRuleIdExecuteSingleSubscriptionHeaders { + location?: string; +} + +// @public +export interface GovernanceRulesRuleIdExecuteSingleSubscriptionOptionalParams extends coreClient.OperationOptions { + executeGovernanceRuleParams?: ExecuteGovernanceRuleParams; + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type GovernanceRulesRuleIdExecuteSingleSubscriptionResponse = GovernanceRulesRuleIdExecuteSingleSubscriptionHeaders; + +// @public +export type GovernanceRuleType = string; + // @public export type HttpC2DMessagesNotInAllowedRange = TimeWindowCustomAlertRule & { ruleType: "HttpC2DMessagesNotInAllowedRange"; @@ -2433,6 +2993,17 @@ export enum KnownAlertsToAdmins { On = "On" } +// @public +export enum KnownApplicationConditionOperator { + Contains = "Contains", + In = "In" +} + +// @public +export enum KnownApplicationSourceResourceType { + Assessments = "Assessments" +} + // @public export enum KnownAssessedResourceType { // (undocumented) @@ -2520,7 +3091,11 @@ export enum KnownCloudName { // (undocumented) Azure = "Azure", // (undocumented) - GCP = "GCP" + AzureDevOps = "AzureDevOps", + // (undocumented) + GCP = "GCP", + // (undocumented) + Github = "Github" } // @public @@ -2610,6 +3185,18 @@ export enum KnownEnforcementSupport { Unknown = "Unknown" } +// @public +export enum KnownEnvironmentType { + // (undocumented) + AwsAccount = "AwsAccount", + // (undocumented) + AzureDevOpsScope = "AzureDevOpsScope", + // (undocumented) + GcpProject = "GcpProject", + // (undocumented) + GithubScope = "GithubScope" +} + // @public export enum KnownEventSource { // (undocumented) @@ -2678,6 +3265,29 @@ export enum KnownFileType { Unknown = "Unknown" } +// @public +export enum KnownGovernanceRuleConditionOperator { + Equals = "Equals", + In = "In" +} + +// @public +export enum KnownGovernanceRuleOwnerSourceType { + ByTag = "ByTag", + Manually = "Manually" +} + +// @public +export enum KnownGovernanceRuleSourceResourceType { + Assessments = "Assessments" +} + +// @public +export enum KnownGovernanceRuleType { + Integrated = "Integrated", + ServiceNow = "ServiceNow" +} + // @public export enum KnownHybridComputeProvisioningState { Expired = "Expired", @@ -2733,10 +3343,24 @@ export enum KnownOfferingType { // (undocumented) CspmMonitorAws = "CspmMonitorAws", // (undocumented) + CspmMonitorAzureDevOps = "CspmMonitorAzureDevOps", + // (undocumented) + CspmMonitorGcp = "CspmMonitorGcp", + // (undocumented) + CspmMonitorGithub = "CspmMonitorGithub", + // (undocumented) DefenderForContainersAws = "DefenderForContainersAws", // (undocumented) + DefenderForContainersGcp = "DefenderForContainersGcp", + // (undocumented) + DefenderForDatabasesAws = "DefenderForDatabasesAws", + // (undocumented) + DefenderForDatabasesGcp = "DefenderForDatabasesGcp", + // (undocumented) DefenderForServersAws = "DefenderForServersAws", // (undocumented) + DefenderForServersGcp = "DefenderForServersGcp", + // (undocumented) InformationProtectionAws = "InformationProtectionAws" } @@ -2909,6 +3533,12 @@ export enum KnownRuleType { PositiveList = "PositiveList" } +// @public +export enum KnownScanningMode { + // (undocumented) + Default = "Default" +} + // @public export enum KnownScanState { Failed = "Failed", @@ -2976,7 +3606,9 @@ export enum KnownSettingName { // (undocumented) Wdatp = "WDATP", // (undocumented) - WdatpExcludeLinuxPublicPreview = "WDATP_EXCLUDE_LINUX_PUBLIC_PREVIEW" + WdatpExcludeLinuxPublicPreview = "WDATP_EXCLUDE_LINUX_PUBLIC_PREVIEW", + // (undocumented) + WdatpUnifiedSolution = "WDATP_UNIFIED_SOLUTION" } // @public @@ -3053,6 +3685,14 @@ export enum KnownSubAssessmentStatusCode { Unhealthy = "Unhealthy" } +// @public +export enum KnownSubPlan { + // (undocumented) + P1 = "P1", + // (undocumented) + P2 = "P2" +} + // @public export enum KnownSupportedCloudEnum { // (undocumented) @@ -3347,6 +3987,14 @@ export enum KnownTransportProtocol { UDP = "UDP" } +// @public +export enum KnownType { + // (undocumented) + Qualys = "Qualys", + // (undocumented) + TVM = "TVM" +} + // @public export enum KnownUnmaskedIpLoggingStatus { Disabled = "Disabled", @@ -3815,6 +4463,12 @@ export interface Remediation { scripts?: string[]; } +// @public +export interface RemediationEta { + eta: Date; + justification: string; +} + // @public export type ReportedSeverity = string; @@ -3902,6 +4556,9 @@ export type Scan = Resource & { properties?: ScanProperties; }; +// @public +export type ScanningMode = string; + // @public export interface ScanProperties { database?: string; @@ -4279,6 +4936,10 @@ export class SecurityCenter extends coreClient.ServiceClient { // (undocumented) allowedConnections: AllowedConnections; // (undocumented) + applicationOperations: ApplicationOperations; + // (undocumented) + applications: Applications; + // (undocumented) assessments: Assessments; // (undocumented) assessmentsMetadata: AssessmentsMetadata; @@ -4303,6 +4964,12 @@ export class SecurityCenter extends coreClient.ServiceClient { // (undocumented) externalSecuritySolutions: ExternalSecuritySolutions; // (undocumented) + governanceAssignments: GovernanceAssignments; + // (undocumented) + governanceRuleOperations: GovernanceRuleOperations; + // (undocumented) + governanceRules: GovernanceRules; + // (undocumented) informationProtectionPolicies: InformationProtectionPolicies; // (undocumented) ingestionSettings: IngestionSettings; @@ -4337,6 +5004,16 @@ export class SecurityCenter extends coreClient.ServiceClient { // (undocumented) secureScores: SecureScores; // (undocumented) + securityConnectorApplication: SecurityConnectorApplication; + // (undocumented) + securityConnectorApplications: SecurityConnectorApplications; + // (undocumented) + securityConnectorGovernanceRule: SecurityConnectorGovernanceRule; + // (undocumented) + securityConnectorGovernanceRules: SecurityConnectorGovernanceRules; + // (undocumented) + securityConnectorGovernanceRulesExecuteStatus: SecurityConnectorGovernanceRulesExecuteStatus; + // (undocumented) securityConnectors: SecurityConnectors; // (undocumented) securityContacts: SecurityContacts; @@ -4359,6 +5036,8 @@ export class SecurityCenter extends coreClient.ServiceClient { // (undocumented) subAssessments: SubAssessments; // (undocumented) + subscriptionGovernanceRulesExecuteStatus: SubscriptionGovernanceRulesExecuteStatus; + // (undocumented) subscriptionId: string; // (undocumented) tasks: Tasks; @@ -4378,19 +5057,120 @@ export interface SecurityCenterOptionalParams extends coreClient.ServiceClientOp export type SecurityConnector = TrackedResource & { readonly systemData?: SystemData; hierarchyIdentifier?: string; - cloudName?: CloudName; + readonly hierarchyIdentifierTrialEndDate?: Date; + environmentName?: CloudName; offerings?: CloudOfferingUnion[]; - organizationalData?: SecurityConnectorPropertiesOrganizationalData; + environmentData?: EnvironmentDataUnion; }; // @public -export interface SecurityConnectorPropertiesOrganizationalData { - excludedAccountIds?: string[]; - organizationMembershipType?: OrganizationMembershipType; - parentHierarchyId?: string; - stacksetName?: string; +export interface SecurityConnectorApplication { + createOrUpdate(resourceGroupName: string, securityConnectorName: string, applicationId: string, application: Application, options?: SecurityConnectorApplicationCreateOrUpdateOptionalParams): Promise; + delete(resourceGroupName: string, securityConnectorName: string, applicationId: string, options?: SecurityConnectorApplicationDeleteOptionalParams): Promise; + get(resourceGroupName: string, securityConnectorName: string, applicationId: string, options?: SecurityConnectorApplicationGetOptionalParams): Promise; +} + +// @public +export interface SecurityConnectorApplicationCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SecurityConnectorApplicationCreateOrUpdateResponse = Application; + +// @public +export interface SecurityConnectorApplicationDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface SecurityConnectorApplicationGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SecurityConnectorApplicationGetResponse = Application; + +// @public +export interface SecurityConnectorApplications { + list(resourceGroupName: string, securityConnectorName: string, options?: SecurityConnectorApplicationsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface SecurityConnectorApplicationsListNextOptionalParams extends coreClient.OperationOptions { } +// @public +export type SecurityConnectorApplicationsListNextResponse = ApplicationsList; + +// @public +export interface SecurityConnectorApplicationsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SecurityConnectorApplicationsListResponse = ApplicationsList; + +// @public +export interface SecurityConnectorGovernanceRule { + list(resourceGroupName: string, securityConnectorName: string, options?: SecurityConnectorGovernanceRuleListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface SecurityConnectorGovernanceRuleListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SecurityConnectorGovernanceRuleListNextResponse = GovernanceRuleList; + +// @public +export interface SecurityConnectorGovernanceRuleListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SecurityConnectorGovernanceRuleListResponse = GovernanceRuleList; + +// @public +export interface SecurityConnectorGovernanceRules { + createOrUpdate(resourceGroupName: string, securityConnectorName: string, ruleId: string, governanceRule: GovernanceRule, options?: SecurityConnectorGovernanceRulesCreateOrUpdateOptionalParams): Promise; + delete(resourceGroupName: string, securityConnectorName: string, ruleId: string, options?: SecurityConnectorGovernanceRulesDeleteOptionalParams): Promise; + get(resourceGroupName: string, securityConnectorName: string, ruleId: string, options?: SecurityConnectorGovernanceRulesGetOptionalParams): Promise; +} + +// @public +export interface SecurityConnectorGovernanceRulesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SecurityConnectorGovernanceRulesCreateOrUpdateResponse = GovernanceRule; + +// @public +export interface SecurityConnectorGovernanceRulesDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface SecurityConnectorGovernanceRulesExecuteStatus { + beginGet(resourceGroupName: string, securityConnectorName: string, ruleId: string, operationId: string, options?: SecurityConnectorGovernanceRulesExecuteStatusGetOptionalParams): Promise, SecurityConnectorGovernanceRulesExecuteStatusGetResponse>>; + beginGetAndWait(resourceGroupName: string, securityConnectorName: string, ruleId: string, operationId: string, options?: SecurityConnectorGovernanceRulesExecuteStatusGetOptionalParams): Promise; +} + +// @public +export interface SecurityConnectorGovernanceRulesExecuteStatusGetHeaders { + location?: string; +} + +// @public +export interface SecurityConnectorGovernanceRulesExecuteStatusGetOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type SecurityConnectorGovernanceRulesExecuteStatusGetResponse = ExecuteRuleStatus; + +// @public +export interface SecurityConnectorGovernanceRulesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SecurityConnectorGovernanceRulesGetResponse = GovernanceRule; + // @public export interface SecurityConnectors { createOrUpdate(resourceGroupName: string, securityConnectorName: string, securityConnector: SecurityConnector, options?: SecurityConnectorsCreateOrUpdateOptionalParams): Promise; @@ -5008,6 +5788,29 @@ export interface SubAssessmentStatus { // @public export type SubAssessmentStatusCode = string; +// @public +export type SubPlan = string; + +// @public +export interface SubscriptionGovernanceRulesExecuteStatus { + beginGet(ruleId: string, operationId: string, options?: SubscriptionGovernanceRulesExecuteStatusGetOptionalParams): Promise, SubscriptionGovernanceRulesExecuteStatusGetResponse>>; + beginGetAndWait(ruleId: string, operationId: string, options?: SubscriptionGovernanceRulesExecuteStatusGetOptionalParams): Promise; +} + +// @public +export interface SubscriptionGovernanceRulesExecuteStatusGetHeaders { + location?: string; +} + +// @public +export interface SubscriptionGovernanceRulesExecuteStatusGetOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type SubscriptionGovernanceRulesExecuteStatusGetResponse = ExecuteRuleStatus; + // @public export type SupportedCloudEnum = string; @@ -5239,6 +6042,9 @@ export type TwinUpdatesNotInAllowedRange = TimeWindowCustomAlertRule & { ruleType: "TwinUpdatesNotInAllowedRange"; }; +// @public +export type Type = string; + // @public export type UnauthorizedOperationsNotInAllowedRange = TimeWindowCustomAlertRule & { ruleType: "UnauthorizedOperationsNotInAllowedRange"; diff --git a/sdk/security/arm-security/src/models/index.ts b/sdk/security/arm-security/src/models/index.ts index d1c8614ffa3d..f1f60003709c 100644 --- a/sdk/security/arm-security/src/models/index.ts +++ b/sdk/security/arm-security/src/models/index.ts @@ -43,7 +43,28 @@ export type CloudOfferingUnion = | CspmMonitorAwsOffering | DefenderForContainersAwsOffering | DefenderForServersAwsOffering - | InformationProtectionAwsOffering; + | DefenderFoDatabasesAwsOffering + | InformationProtectionAwsOffering + | CspmMonitorGcpOffering + | DefenderForServersGcpOffering + | DefenderForDatabasesGcpOffering + | DefenderForContainersGcpOffering + | CspmMonitorGithubOffering + | CspmMonitorAzureDevOpsOffering; +export type EnvironmentDataUnion = + | EnvironmentData + | AWSEnvironmentData + | GcpProjectEnvironmentData + | GithubScopeEnvironmentData + | AzureDevOpsScopeEnvironmentData; +export type AwsOrganizationalDataUnion = + | AwsOrganizationalData + | AwsOrganizationalDataMaster + | AwsOrganizationalDataMember; +export type GcpOrganizationalDataUnion = + | GcpOrganizationalData + | GcpOrganizationalDataOrganization + | GcpOrganizationalDataMember; export type ExternalSecuritySolutionUnion = | ExternalSecuritySolution | CefExternalSecuritySolution @@ -971,7 +992,7 @@ export interface SecurityAssessmentPartnerData { secret: string; } -/** Represents a list of machine groups and set of rules that are recommended by Azure Security Center to be allowed */ +/** Represents a list of VM/server groups and set of rules that are Recommended by Microsoft Defender for Cloud to be allowed */ export interface AdaptiveApplicationControlGroups { value?: AdaptiveApplicationControlGroup[]; } @@ -1744,7 +1765,14 @@ export interface CloudOffering { | "CspmMonitorAws" | "DefenderForContainersAws" | "DefenderForServersAws" - | "InformationProtectionAws"; + | "DefenderForDatabasesAws" + | "InformationProtectionAws" + | "CspmMonitorGcp" + | "DefenderForServersGcp" + | "DefenderForDatabasesGcp" + | "DefenderForContainersGcp" + | "CspmMonitorGithub" + | "CspmMonitorAzureDevOps"; /** * The offering description. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -1752,16 +1780,113 @@ export interface CloudOffering { readonly description?: string; } -/** The multi cloud account's organizational data */ -export interface SecurityConnectorPropertiesOrganizationalData { - /** The multi cloud account's membership type in the organization */ - organizationMembershipType?: OrganizationMembershipType; - /** If the multi cloud account is not of membership type organization, this will be the ID of the account's parent */ - parentHierarchyId?: string; - /** If the multi cloud account is of membership type organization, this will be the name of the onboarding stackset */ - stacksetName?: string; - /** If the multi cloud account is of membership type organization, list of accounts excluded from offering */ - excludedAccountIds?: string[]; +/** The security connector environment data. */ +export interface EnvironmentData { + /** Polymorphic discriminator, which specifies the different types this object can be */ + environmentType: + | "AwsAccount" + | "GcpProject" + | "GithubScope" + | "AzureDevOpsScope"; +} + +/** Page of a security governanceRules list */ +export interface GovernanceRuleList { + /** + * Collection of governanceRules in this page + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: GovernanceRule[]; + /** + * 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; +} + +/** Describe the owner source of governance rule */ +export interface GovernanceRuleOwnerSource { + /** The owner type for the governance rule owner source */ + type?: GovernanceRuleOwnerSourceType; + /** The source value e.g. tag key like owner name or email address */ + value?: string; +} + +/** The governance email weekly notification configuration. */ +export interface GovernanceRuleEmailNotification { + /** Defines whether manager email notifications are disabled. */ + disableManagerEmailNotification?: boolean; + /** Defines whether owner email notifications are disabled. */ + disableOwnerEmailNotification?: boolean; +} + +/** Governance rule execution parameters */ +export interface ExecuteGovernanceRuleParams { + /** Describe if governance rule should be override */ + override?: boolean; +} + +/** Execute status of Security GovernanceRule over a given scope */ +export interface ExecuteRuleStatus { + /** + * Unique key for the execution of GovernanceRule + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly operationId?: string; +} + +/** Page of a security governance assignments list */ +export interface GovernanceAssignmentsList { + /** + * Collection of governance assignments in this page + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: GovernanceAssignment[]; + /** + * 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 ETA (estimated time of arrival) for remediation */ +export interface RemediationEta { + /** ETA for remediation. */ + eta: Date; + /** Justification for change of Eta. */ + justification: string; +} + +/** The governance email weekly notification configuration. */ +export interface GovernanceEmailNotification { + /** Exclude manager from weekly email notification. */ + disableManagerEmailNotification?: boolean; + /** Exclude owner from weekly email notification. */ + disableOwnerEmailNotification?: boolean; +} + +/** Describe the additional data of GovernanceAssignment - optional */ +export interface GovernanceAssignmentAdditionalData { + /** Ticket number associated with this GovernanceAssignment */ + ticketNumber?: number; + /** Ticket link associated with this GovernanceAssignment - for example: https://snow.com */ + ticketLink?: string; + /** The ticket status associated with this GovernanceAssignment - for example: Active */ + ticketStatus?: string; +} + +/** Page of a security applications list */ +export interface ApplicationsList { + /** + * Collection of applications in this page + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: Application[]; + /** + * 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; } /** CVSS details */ @@ -1842,6 +1967,31 @@ export interface SecureScoreControlScore { readonly percentage?: number; } +/** The awsOrganization data */ +export interface AwsOrganizationalData { + /** Polymorphic discriminator, which specifies the different types this object can be */ + organizationMembershipType: "Organization" | "Member"; +} + +/** The gcpOrganization data */ +export interface GcpOrganizationalData { + /** Polymorphic discriminator, which specifies the different types this object can be */ + organizationMembershipType: "Organization" | "Member"; +} + +/** The details about the project represented by the security connector */ +export interface GcpProjectDetails { + /** The unique GCP Project number */ + projectNumber?: string; + /** The GCP Project id */ + projectId?: string; + /** + * The GCP workload identity federation pool id + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly workloadIdentityPoolId?: string; +} + /** The native cloud connection configuration */ export interface CspmMonitorAwsOfferingNativeCloudConnection { /** The cloud role ARN in AWS for this feature */ @@ -1850,24 +2000,36 @@ export interface CspmMonitorAwsOfferingNativeCloudConnection { /** The kubernetes service connection configuration */ export interface DefenderForContainersAwsOfferingKubernetesService { - /** The cloud role ARN in AWS for this feature */ + /** The cloud role ARN in AWS for this feature used for provisioning resources */ cloudRoleArn?: string; } /** The kubernetes to scuba connection configuration */ export interface DefenderForContainersAwsOfferingKubernetesScubaReader { - /** The cloud role ARN in AWS for this feature */ + /** The cloud role ARN in AWS for this feature used for reading data */ cloudRoleArn?: string; } /** The cloudwatch to kinesis connection configuration */ export interface DefenderForContainersAwsOfferingCloudWatchToKinesis { - /** The cloud role ARN in AWS for this feature */ + /** The cloud role ARN in AWS used by CloudWatch to transfer data into Kinesis */ cloudRoleArn?: string; } /** The kinesis to s3 connection configuration */ export interface DefenderForContainersAwsOfferingKinesisToS3 { + /** The cloud role ARN in AWS used by Kinesis to transfer data into S3 */ + cloudRoleArn?: string; +} + +/** The container vulnerability assessment configuration */ +export interface DefenderForContainersAwsOfferingContainerVulnerabilityAssessment { + /** The cloud role ARN in AWS for this feature */ + cloudRoleArn?: string; +} + +/** The container vulnerability assessment task configuration */ +export interface DefenderForContainersAwsOfferingContainerVulnerabilityAssessmentTask { /** The cloud role ARN in AWS for this feature */ cloudRoleArn?: string; } @@ -1882,6 +2044,8 @@ export interface DefenderForServersAwsOfferingDefenderForServers { export interface DefenderForServersAwsOfferingArcAutoProvisioning { /** Is arc auto provisioning enabled */ enabled?: boolean; + /** The cloud role ARN in AWS for this feature */ + cloudRoleArn?: string; /** Metadata of Service Principal secret for autoprovisioning */ servicePrincipalSecretMetadata?: DefenderForServersAwsOfferingArcAutoProvisioningServicePrincipalSecretMetadata; } @@ -1896,12 +2060,198 @@ export interface DefenderForServersAwsOfferingArcAutoProvisioningServicePrincipa parameterNameInStore?: string; } +/** The Vulnerability Assessment autoprovisioning configuration */ +export interface DefenderForServersAwsOfferingVaAutoProvisioning { + /** Is Vulnerability Assessment auto provisioning enabled */ + enabled?: boolean; + /** configuration for Vulnerability Assessment autoprovisioning */ + configuration?: DefenderForServersAwsOfferingVaAutoProvisioningConfiguration; +} + +/** configuration for Vulnerability Assessment autoprovisioning */ +export interface DefenderForServersAwsOfferingVaAutoProvisioningConfiguration { + /** The Vulnerability Assessment solution to be provisioned. Can be either 'TVM' or 'Qualys' */ + type?: Type; +} + +/** The Microsoft Defender for Endpoint autoprovisioning configuration */ +export interface DefenderForServersAwsOfferingMdeAutoProvisioning { + /** Is Microsoft Defender for Endpoint auto provisioning enabled */ + enabled?: boolean; + /** configuration for Microsoft Defender for Endpoint autoprovisioning */ + configuration?: Record; +} + +/** configuration for the servers offering subPlan */ +export interface DefenderForServersAwsOfferingSubPlan { + /** The available sub plans */ + type?: SubPlan; +} + +/** The Microsoft Defender for Server VM scanning configuration */ +export interface DefenderForServersAwsOfferingVmScanners { + /** Is Microsoft Defender for Server VM scanning enabled */ + enabled?: boolean; + /** configuration for Microsoft Defender for Server VM scanning */ + configuration?: DefenderForServersAwsOfferingVmScannersConfiguration; +} + +/** configuration for Microsoft Defender for Server VM scanning */ +export interface DefenderForServersAwsOfferingVmScannersConfiguration { + /** The cloud role ARN in AWS for this feature */ + cloudRoleArn?: string; + /** The scanning mode for the vm scan. */ + scanningMode?: ScanningMode; + /** VM tags that indicates that VM should not be scanned */ + exclusionTags?: Record; +} + +/** The ARC autoprovisioning configuration */ +export interface DefenderFoDatabasesAwsOfferingArcAutoProvisioning { + /** Is arc auto provisioning enabled */ + enabled?: boolean; + /** The cloud role ARN in AWS for this feature */ + cloudRoleArn?: string; + /** Metadata of Service Principal secret for autoprovisioning */ + servicePrincipalSecretMetadata?: DefenderFoDatabasesAwsOfferingArcAutoProvisioningServicePrincipalSecretMetadata; +} + +/** Metadata of Service Principal secret for autoprovisioning */ +export interface DefenderFoDatabasesAwsOfferingArcAutoProvisioningServicePrincipalSecretMetadata { + /** expiration date of service principal secret */ + expiryDate?: Date; + /** region of parameter store where secret is kept */ + parameterStoreRegion?: string; + /** name of secret resource in parameter store */ + parameterNameInStore?: string; +} + /** The native cloud connection configuration */ export interface InformationProtectionAwsOfferingInformationProtection { /** The cloud role ARN in AWS for this feature */ cloudRoleArn?: string; } +/** The native cloud connection configuration */ +export interface CspmMonitorGcpOfferingNativeCloudConnection { + /** The GCP workload identity provider id for the offering */ + workloadIdentityProviderId?: string; + /** The service account email address in GCP for this offering */ + serviceAccountEmailAddress?: string; +} + +/** The Defender for servers connection configuration */ +export interface DefenderForServersGcpOfferingDefenderForServers { + /** The workload identity provider id in GCP for this feature */ + workloadIdentityProviderId?: string; + /** The service account email address in GCP for this feature */ + serviceAccountEmailAddress?: string; +} + +/** The ARC autoprovisioning configuration */ +export interface DefenderForServersGcpOfferingArcAutoProvisioning { + /** Is arc auto provisioning enabled */ + enabled?: boolean; + /** Configuration for ARC autoprovisioning */ + configuration?: DefenderForServersGcpOfferingArcAutoProvisioningConfiguration; +} + +/** Configuration for ARC autoprovisioning */ +export interface DefenderForServersGcpOfferingArcAutoProvisioningConfiguration { + /** The Azure service principal client id for agent onboarding */ + clientId?: string; + /** The agent onboarding service account numeric id */ + agentOnboardingServiceAccountNumericId?: string; +} + +/** The Vulnerability Assessment autoprovisioning configuration */ +export interface DefenderForServersGcpOfferingVaAutoProvisioning { + /** Is Vulnerability Assessment auto provisioning enabled */ + enabled?: boolean; + /** configuration for Vulnerability Assessment autoprovisioning */ + configuration?: DefenderForServersGcpOfferingVaAutoProvisioningConfiguration; +} + +/** configuration for Vulnerability Assessment autoprovisioning */ +export interface DefenderForServersGcpOfferingVaAutoProvisioningConfiguration { + /** The Vulnerability Assessment solution to be provisioned. Can be either 'TVM' or 'Qualys' */ + type?: Type; +} + +/** The Microsoft Defender for Endpoint autoprovisioning configuration */ +export interface DefenderForServersGcpOfferingMdeAutoProvisioning { + /** Is Microsoft Defender for Endpoint auto provisioning enabled */ + enabled?: boolean; + /** configuration for Microsoft Defender for Endpoint autoprovisioning */ + configuration?: Record; +} + +/** configuration for the servers offering subPlan */ +export interface DefenderForServersGcpOfferingSubPlan { + /** The available sub plans */ + type?: SubPlan; +} + +/** The ARC autoprovisioning configuration */ +export interface DefenderForDatabasesGcpOfferingArcAutoProvisioning { + /** Is arc auto provisioning enabled */ + enabled?: boolean; + /** Configuration for ARC autoprovisioning */ + configuration?: DefenderForDatabasesGcpOfferingArcAutoProvisioningConfiguration; +} + +/** Configuration for ARC autoprovisioning */ +export interface DefenderForDatabasesGcpOfferingArcAutoProvisioningConfiguration { + /** The Azure service principal client id for agent onboarding */ + clientId?: string; + /** The agent onboarding service account numeric id */ + agentOnboardingServiceAccountNumericId?: string; +} + +/** The native cloud connection configuration */ +export interface DefenderForDatabasesGcpOfferingDefenderForDatabasesArcAutoProvisioning { + /** The service account email address in GCP for this offering */ + serviceAccountEmailAddress?: string; + /** The GCP workload identity provider id for this offering */ + workloadIdentityProviderId?: string; +} + +/** The native cloud connection configuration */ +export interface DefenderForContainersGcpOfferingNativeCloudConnection { + /** The service account email address in GCP for this offering */ + serviceAccountEmailAddress?: string; + /** The GCP workload identity provider id for this offering */ + workloadIdentityProviderId?: string; +} + +/** The native cloud connection configuration */ +export interface DefenderForContainersGcpOfferingDataPipelineNativeCloudConnection { + /** The data collection service account email address in GCP for this offering */ + serviceAccountEmailAddress?: string; + /** The data collection GCP workload identity provider id for this offering */ + workloadIdentityProviderId?: string; +} + +/** Governance rule's condition */ +export interface Condition { + /** The governance rule Condition's Property, e.g. Severity or AssessmentKey, see examples */ + property?: string; + /** The governance rule Condition's Value like severity Low, High or assessments keys, see examples */ + value?: string; + /** The governance rule Condition's Operator, for example Equals for severity or In for list of assessments, see examples */ + operator?: GovernanceRuleConditionOperator; +} + +/** Application's condition */ +export interface ApplicationCondition { + /** The application Condition's Property, e.g. ID, see examples */ + property?: string; + /** The application Condition's Value like IDs that contain some string, see examples */ + value?: string; + /** The application Condition's Operator, for example Contains for id or In for list of possible IDs, see examples */ + operator?: ApplicationConditionOperator; +} + /** The resource of the configuration or data needed to onboard the machine to MDE */ export type MdeOnboardingData = Resource & { /** The onboarding package used to onboard Windows machines to MDE, coded in base64. This can also be used for onboarding using the dedicated VM Extension */ @@ -1971,9 +2321,9 @@ export type ComplianceResult = Resource & { readonly resourceStatus?: ResourceStatus; }; -/** Azure Security Center is provided in two pricing tiers: free and standard, with the standard tier available with a trial period. The standard tier offers advanced security capabilities, while the free tier offers basic security features. */ +/** Microsoft Defender for Cloud is provided in two pricing tiers: free and standard, with the standard tier available with a trial period. The standard tier offers advanced security capabilities, while the free tier offers basic security features. */ export type Pricing = Resource & { - /** The pricing tier value. Azure Security Center is provided in two pricing tiers: free and standard, with the standard tier available with a trial period. The standard tier offers advanced security capabilities, while the free tier offers basic security features. */ + /** The pricing tier value. Microsoft Defender for Cloud is provided in two pricing tiers: free and standard, with the standard tier available with a trial period. The standard tier offers advanced security capabilities, while the free tier offers basic security features. */ pricingTier?: PricingTier; /** The sub-plan selected for a Standard pricing configuration, when more than one sub-plan is available. Each sub-plan enables a set of security features. When not specified, full plan is applied. */ subPlan?: string; @@ -2646,7 +2996,7 @@ export type SecuritySolutionsReferenceData = Resource & template: string; }; -/** Represents a security solution external to Azure Security Center which sends information to an OMS workspace and whose data is displayed by Azure Security Center. */ +/** Represents a security solution external to Microsoft Defender for Cloud which sends information to an OMS workspace and whose data is displayed by Microsoft Defender for Cloud. */ export type ExternalSecuritySolution = Resource & ExternalSecuritySolutionKindAutoGenerated & Location & {}; @@ -2943,6 +3293,60 @@ export type Software = Resource & { firstSeenAt?: string; }; +/** Security GovernanceRule over a given scope */ +export type GovernanceRule = Resource & { + /** display name of the governanceRule */ + displayName?: string; + /** description of the governanceRule */ + description?: string; + /** Governance rule remediation timeframe - this is the time that will affect on the grace-period duration e.g. 7.00:00:00 - means 7 days */ + remediationTimeframe?: string; + /** Defines whether there is a grace period on the governance rule */ + isGracePeriod?: boolean; + /** The governance rule priority, priority to the lower number. Rules with the same priority on the same subscription will not be allowed */ + rulePriority?: number; + /** Defines whether the rule is active/inactive */ + isDisabled?: boolean; + /** The rule type of the governance rule, defines the source of the rule e.g. Integrated */ + ruleType?: GovernanceRuleType; + /** The governance rule source, what the rule affects, e.g. Assessments */ + sourceResourceType?: GovernanceRuleSourceResourceType; + /** The governance rule conditionSets - see examples */ + conditionSets?: Record[]; + /** The Owner source for the governance rule - e.g. Manually by user@contoso.com - see example */ + ownerSource?: GovernanceRuleOwnerSource; + /** The email notifications settings for the governance rule, states whether to disable notifications for mangers and owners */ + governanceEmailNotification?: GovernanceRuleEmailNotification; +}; + +/** Security GovernanceAssignment over a given scope */ +export type GovernanceAssignment = Resource & { + /** The Owner for the governance assignment - e.g. user@contoso.com - see example */ + owner?: string; + /** The remediation due-date - after this date Secure Score will be affected (in case of active grace-period) */ + remediationDueDate?: Date; + /** The ETA (estimated time of arrival) for remediation (optional), see example */ + remediationEta?: RemediationEta; + /** Defines whether there is a grace period on the governance assignment */ + isGracePeriod?: boolean; + /** The email notifications settings for the governance rule, states whether to disable notifications for mangers and owners */ + governanceEmailNotification?: GovernanceEmailNotification; + /** The additional data for the governance assignment - e.g. links to ticket (optional), see example */ + additionalData?: GovernanceAssignmentAdditionalData; +}; + +/** Security Application over a given scope */ +export type Application = Resource & { + /** display name of the application */ + displayName?: string; + /** description of the application */ + description?: string; + /** The application source, what it affects, e.g. Assessments */ + sourceResourceType?: ApplicationSourceResourceType; + /** The application conditionSets - see examples */ + conditionSets?: Record[]; +}; + /** Security assessment metadata */ export type SecurityAssessmentMetadata = Resource & { /** User friendly display name of the assessment */ @@ -3147,7 +3551,7 @@ export type ServerVulnerabilityProperties = AdditionalData & { readonly vendorReferences?: VendorReference[]; }; -/** The logic app action that should be triggered. To learn more about Security Center's Workflow Automation capabilities, visit https://aka.ms/ASCWorkflowAutomationLearnMore */ +/** The logic app action that should be triggered. To learn more about Microsoft Defender for Cloud's Workflow Automation capabilities, visit https://aka.ms/ASCWorkflowAutomationLearnMore */ export type AutomationActionLogicApp = AutomationAction & { /** Polymorphic discriminator, which specifies the different types this object can be */ actionType: "LogicApp"; @@ -3157,7 +3561,7 @@ export type AutomationActionLogicApp = AutomationAction & { uri?: string; }; -/** The target Event Hub to which event data will be exported. To learn more about Security Center continuous export capabilities, visit https://aka.ms/ASCExportLearnMore */ +/** The target Event Hub to which event data will be exported. To learn more about Microsoft Defender for Cloud continuous export capabilities, visit https://aka.ms/ASCExportLearnMore */ export type AutomationActionEventHub = AutomationAction & { /** Polymorphic discriminator, which specifies the different types this object can be */ actionType: "EventHub"; @@ -3172,7 +3576,7 @@ export type AutomationActionEventHub = AutomationAction & { connectionString?: string; }; -/** The Log Analytics Workspace to which event data will be exported. Security alerts data will reside in the 'SecurityAlert' table and the assessments data will reside in the 'SecurityRecommendation' table (under the 'Security'/'SecurityCenterFree' solutions). Note that in order to view the data in the workspace, the Security Center Log Analytics free/standard solution needs to be enabled on that workspace. To learn more about Security Center continuous export capabilities, visit https://aka.ms/ASCExportLearnMore */ +/** The Log Analytics Workspace to which event data will be exported. Security alerts data will reside in the 'SecurityAlert' table and the assessments data will reside in the 'SecurityRecommendation' table (under the 'Security'/'SecurityCenterFree' solutions). Note that in order to view the data in the workspace, the Security Center Log Analytics free/standard solution needs to be enabled on that workspace. To learn more about Microsoft Defender for Cloud continuous export capabilities, visit https://aka.ms/ASCExportLearnMore */ export type AutomationActionWorkspace = AutomationAction & { /** Polymorphic discriminator, which specifies the different types this object can be */ actionType: "Workspace"; @@ -3317,7 +3721,7 @@ export type AlertSimulatorBundlesRequestProperties = AlertSimulatorRequestProper bundles?: BundleType[]; }; -/** The CSPM monitoring for AWS offering configurations */ +/** The CSPM monitoring for AWS offering */ export type CspmMonitorAwsOffering = CloudOffering & { /** Polymorphic discriminator, which specifies the different types this object can be */ offeringType: "CspmMonitorAws"; @@ -3325,7 +3729,7 @@ export type CspmMonitorAwsOffering = CloudOffering & { nativeCloudConnection?: CspmMonitorAwsOfferingNativeCloudConnection; }; -/** The Defender for Containers AWS offering configurations */ +/** The Defender for Containers AWS offering */ export type DefenderForContainersAwsOffering = CloudOffering & { /** Polymorphic discriminator, which specifies the different types this object can be */ offeringType: "DefenderForContainersAws"; @@ -3337,9 +3741,21 @@ export type DefenderForContainersAwsOffering = CloudOffering & { cloudWatchToKinesis?: DefenderForContainersAwsOfferingCloudWatchToKinesis; /** The kinesis to s3 connection configuration */ kinesisToS3?: DefenderForContainersAwsOfferingKinesisToS3; + /** The container vulnerability assessment configuration */ + containerVulnerabilityAssessment?: DefenderForContainersAwsOfferingContainerVulnerabilityAssessment; + /** The container vulnerability assessment task configuration */ + containerVulnerabilityAssessmentTask?: DefenderForContainersAwsOfferingContainerVulnerabilityAssessmentTask; + /** Enable container vulnerability assessment feature */ + enableContainerVulnerabilityAssessment?: boolean; + /** Is audit logs pipeline auto provisioning enabled */ + autoProvisioning?: boolean; + /** The retention time in days of kube audit logs set on the CloudWatch log group */ + kubeAuditRetentionTime?: number; + /** The externalId used by the data reader to prevent the confused deputy attack */ + scubaExternalId?: string; }; -/** The Defender for Servers AWS offering configurations */ +/** The Defender for Servers AWS offering */ export type DefenderForServersAwsOffering = CloudOffering & { /** Polymorphic discriminator, which specifies the different types this object can be */ offeringType: "DefenderForServersAws"; @@ -3347,9 +3763,25 @@ export type DefenderForServersAwsOffering = CloudOffering & { defenderForServers?: DefenderForServersAwsOfferingDefenderForServers; /** The ARC autoprovisioning configuration */ arcAutoProvisioning?: DefenderForServersAwsOfferingArcAutoProvisioning; + /** The Vulnerability Assessment autoprovisioning configuration */ + vaAutoProvisioning?: DefenderForServersAwsOfferingVaAutoProvisioning; + /** The Microsoft Defender for Endpoint autoprovisioning configuration */ + mdeAutoProvisioning?: DefenderForServersAwsOfferingMdeAutoProvisioning; + /** configuration for the servers offering subPlan */ + subPlan?: DefenderForServersAwsOfferingSubPlan; + /** The Microsoft Defender for Server VM scanning configuration */ + vmScanners?: DefenderForServersAwsOfferingVmScanners; }; -/** The information protection for AWS offering configurations */ +/** The Defender for Databases AWS offering */ +export type DefenderFoDatabasesAwsOffering = CloudOffering & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + offeringType: "DefenderForDatabasesAws"; + /** The ARC autoprovisioning configuration */ + arcAutoProvisioning?: DefenderFoDatabasesAwsOfferingArcAutoProvisioning; +}; + +/** The information protection for AWS offering */ export type InformationProtectionAwsOffering = CloudOffering & { /** Polymorphic discriminator, which specifies the different types this object can be */ offeringType: "InformationProtectionAws"; @@ -3357,6 +3789,98 @@ export type InformationProtectionAwsOffering = CloudOffering & { informationProtection?: InformationProtectionAwsOfferingInformationProtection; }; +/** The CSPM monitoring for GCP offering */ +export type CspmMonitorGcpOffering = CloudOffering & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + offeringType: "CspmMonitorGcp"; + /** The native cloud connection configuration */ + nativeCloudConnection?: CspmMonitorGcpOfferingNativeCloudConnection; +}; + +/** The Defender for Servers GCP offering configurations */ +export type DefenderForServersGcpOffering = CloudOffering & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + offeringType: "DefenderForServersGcp"; + /** The Defender for servers connection configuration */ + defenderForServers?: DefenderForServersGcpOfferingDefenderForServers; + /** The ARC autoprovisioning configuration */ + arcAutoProvisioning?: DefenderForServersGcpOfferingArcAutoProvisioning; + /** The Vulnerability Assessment autoprovisioning configuration */ + vaAutoProvisioning?: DefenderForServersGcpOfferingVaAutoProvisioning; + /** The Microsoft Defender for Endpoint autoprovisioning configuration */ + mdeAutoProvisioning?: DefenderForServersGcpOfferingMdeAutoProvisioning; + /** configuration for the servers offering subPlan */ + subPlan?: DefenderForServersGcpOfferingSubPlan; +}; + +/** The Defender for Databases GCP offering configurations */ +export type DefenderForDatabasesGcpOffering = CloudOffering & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + offeringType: "DefenderForDatabasesGcp"; + /** The ARC autoprovisioning configuration */ + arcAutoProvisioning?: DefenderForDatabasesGcpOfferingArcAutoProvisioning; + /** The native cloud connection configuration */ + defenderForDatabasesArcAutoProvisioning?: DefenderForDatabasesGcpOfferingDefenderForDatabasesArcAutoProvisioning; +}; + +/** The containers GCP offering */ +export type DefenderForContainersGcpOffering = CloudOffering & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + offeringType: "DefenderForContainersGcp"; + /** The native cloud connection configuration */ + nativeCloudConnection?: DefenderForContainersGcpOfferingNativeCloudConnection; + /** The native cloud connection configuration */ + dataPipelineNativeCloudConnection?: DefenderForContainersGcpOfferingDataPipelineNativeCloudConnection; + /** Is audit logs data collection enabled */ + auditLogsAutoProvisioningFlag?: boolean; + /** Is Microsoft Defender for Cloud Kubernetes agent auto provisioning enabled */ + defenderAgentAutoProvisioningFlag?: boolean; + /** Is Policy Kubernetes agent auto provisioning enabled */ + policyAgentAutoProvisioningFlag?: boolean; +}; + +/** The CSPM monitoring for github offering */ +export type CspmMonitorGithubOffering = CloudOffering & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + offeringType: "CspmMonitorGithub"; +}; + +/** The CSPM monitoring for AzureDevOps offering */ +export type CspmMonitorAzureDevOpsOffering = CloudOffering & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + offeringType: "CspmMonitorAzureDevOps"; +}; + +/** The aws connector environment data */ +export type AWSEnvironmentData = EnvironmentData & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + environmentType: "AwsAccount"; + /** The AWS account's organizational data */ + organizationalData?: AwsOrganizationalDataUnion; +}; + +/** The GCP project connector environment data */ +export type GcpProjectEnvironmentData = EnvironmentData & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + environmentType: "GcpProject"; + /** The Gcp project's organizational data */ + organizationalData?: GcpOrganizationalDataUnion; + /** The Gcp project's details */ + projectDetails?: GcpProjectDetails; +}; + +/** The github scope connector's environment data */ +export type GithubScopeEnvironmentData = EnvironmentData & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + environmentType: "GithubScope"; +}; + +/** The AzureDevOps scope connector's environment data */ +export type AzureDevOpsScopeEnvironmentData = EnvironmentData & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + environmentType: "AzureDevOpsScope"; +}; + /** The external security solution properties for CEF solutions */ export type CefSolutionProperties = ExternalSecuritySolutionProperties & { hostname?: string; @@ -3373,6 +3897,46 @@ export type AtaSolutionProperties = ExternalSecuritySolutionProperties & { export type AadSolutionProperties = ExternalSecuritySolutionProperties & AadConnectivityStateAutoGenerated & {}; +/** The awsOrganization data for the master account */ +export type AwsOrganizationalDataMaster = AwsOrganizationalData & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + organizationMembershipType: "Organization"; + /** If the multi cloud account is of membership type organization, this will be the name of the onboarding stackset */ + stacksetName?: string; + /** If the multi cloud account is of membership type organization, list of accounts excluded from offering */ + excludedAccountIds?: string[]; +}; + +/** The awsOrganization data for the member account */ +export type AwsOrganizationalDataMember = AwsOrganizationalData & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + organizationMembershipType: "Member"; + /** If the multi cloud account is not of membership type organization, this will be the ID of the account's parent */ + parentHierarchyId?: string; +}; + +/** The gcpOrganization data for the parent account */ +export type GcpOrganizationalDataOrganization = GcpOrganizationalData & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + organizationMembershipType: "Organization"; + /** If the multi cloud account is of membership type organization, list of accounts excluded from offering */ + excludedProjectNumbers?: string[]; + /** The service account email address which represents the organization level permissions container. */ + serviceAccountEmailAddress?: string; + /** The GCP workload identity provider id which represents the permissions required to auto provision security connectors */ + workloadIdentityProviderId?: string; +}; + +/** The gcpOrganization data for the member account */ +export type GcpOrganizationalDataMember = GcpOrganizationalData & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + organizationMembershipType: "Member"; + /** If the multi cloud account is not of membership type organization, this will be the ID of the project's parent */ + parentHierarchyId?: string; + /** The GCP management project number from organizational onboarding */ + managementProjectNumber?: string; +}; + /** The security automation resource. */ export type Automation = TrackedResource & { /** The security automation description. */ @@ -3394,14 +3958,19 @@ export type SecurityConnector = TrackedResource & { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly systemData?: SystemData; - /** The multi cloud resource identifier (account id in case of AWS connector). */ + /** The multi cloud resource identifier (account id in case of AWS connector, project number in case of GCP connector). */ hierarchyIdentifier?: string; + /** + * The date on which the trial period will end, if applicable. Trial period exists for 30 days after upgrading to payed offerings. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly hierarchyIdentifierTrialEndDate?: Date; /** The multi cloud resource's cloud name. */ - cloudName?: CloudName; + environmentName?: CloudName; /** A collection of offerings for the security connector. */ offerings?: CloudOfferingUnion[]; - /** The multi cloud account's organizational data */ - organizationalData?: SecurityConnectorPropertiesOrganizationalData; + /** The security connector environment data. */ + environmentData?: EnvironmentDataUnion; }; /** Represents a security solution which sends CEF logs to an OMS workspace */ @@ -3610,6 +4179,30 @@ export type ProcessNotAllowed = AllowlistCustomAlertRule & { ruleType: "ProcessNotAllowed"; }; +/** Defines headers for GovernanceRules_ruleIdExecuteSingleSubscription operation. */ +export interface GovernanceRulesRuleIdExecuteSingleSubscriptionHeaders { + /** Location URL for the execution status */ + location?: string; +} + +/** Defines headers for GovernanceRules_ruleIdExecuteSingleSecurityConnector operation. */ +export interface GovernanceRulesRuleIdExecuteSingleSecurityConnectorHeaders { + /** Location URL for the execution status */ + location?: string; +} + +/** Defines headers for SubscriptionGovernanceRulesExecuteStatus_get operation. */ +export interface SubscriptionGovernanceRulesExecuteStatusGetHeaders { + /** Location URL for the execution status */ + location?: string; +} + +/** Defines headers for SecurityConnectorGovernanceRulesExecuteStatus_get operation. */ +export interface SecurityConnectorGovernanceRulesExecuteStatusGetHeaders { + /** Location URL for the execution status */ + location?: string; +} + /** Known values of {@link CreatedByType} that the service accepts. */ export enum KnownCreatedByType { User = "User", @@ -3690,9 +4283,9 @@ export type ResourceStatus = string; /** Known values of {@link PricingTier} that the service accepts. */ export enum KnownPricingTier { - /** Get free Azure security center experience with basic security features */ + /** Get free Microsoft Defender for Cloud experience with basic security features */ Free = "Free", - /** Get the standard Azure security center experience with advanced security features */ + /** Get the standard Microsoft Defender for Cloud experience with advanced security features */ Standard = "Standard" } @@ -3701,8 +4294,8 @@ export enum KnownPricingTier { * {@link KnownPricingTier} can be used interchangeably with PricingTier, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **Free**: Get free Azure security center experience with basic security features \ - * **Standard**: Get the standard Azure security center experience with advanced security features + * **Free**: Get free Microsoft Defender for Cloud experience with basic security features \ + * **Standard**: Get the standard Microsoft Defender for Cloud experience with advanced security features */ export type PricingTier = string; @@ -4589,11 +5182,11 @@ export type Threats = string; /** Known values of {@link AssessmentType} that the service accepts. */ export enum KnownAssessmentType { - /** Azure Security Center managed assessments */ + /** Microsoft Defender for Cloud managed assessments */ BuiltIn = "BuiltIn", - /** User defined policies that are automatically ingested from Azure Policy to Azure Security Center */ + /** User defined policies that are automatically ingested from Azure Policy to Microsoft Defender for Cloud */ CustomPolicy = "CustomPolicy", - /** User assessments pushed directly by the user or other third party to Azure Security Center */ + /** User assessments pushed directly by the user or other third party to Microsoft Defender for Cloud */ CustomerManaged = "CustomerManaged", /** An assessment that was created by a verified 3rd party if the user connected it to ASC */ VerifiedPartner = "VerifiedPartner" @@ -4604,9 +5197,9 @@ export enum KnownAssessmentType { * {@link KnownAssessmentType} can be used interchangeably with AssessmentType, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **BuiltIn**: Azure Security Center managed assessments \ - * **CustomPolicy**: User defined policies that are automatically ingested from Azure Policy to Azure Security Center \ - * **CustomerManaged**: User assessments pushed directly by the user or other third party to Azure Security Center \ + * **BuiltIn**: Microsoft Defender for Cloud managed assessments \ + * **CustomPolicy**: User defined policies that are automatically ingested from Azure Policy to Microsoft Defender for Cloud \ + * **CustomerManaged**: User assessments pushed directly by the user or other third party to Microsoft Defender for Cloud \ * **VerifiedPartner**: An assessment that was created by a verified 3rd party if the user connected it to ASC */ export type AssessmentType = string; @@ -4971,9 +5564,9 @@ export type ExpandControlsEnum = string; /** Known values of {@link ControlType} that the service accepts. */ export enum KnownControlType { - /** Azure Security Center managed assessments */ + /** Microsoft Defender for Cloud managed assessments */ BuiltIn = "BuiltIn", - /** Non Azure Security Center managed assessments */ + /** Non Microsoft Defender for Cloud managed assessments */ Custom = "Custom" } @@ -4982,8 +5575,8 @@ export enum KnownControlType { * {@link KnownControlType} can be used interchangeably with ControlType, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **BuiltIn**: Azure Security Center managed assessments \ - * **Custom**: Non Azure Security Center managed assessments + * **BuiltIn**: Microsoft Defender for Cloud managed assessments \ + * **Custom**: Non Microsoft Defender for Cloud managed assessments */ export type ControlType = string; @@ -5368,6 +5961,7 @@ export enum KnownSettingName { Mcas = "MCAS", Wdatp = "WDATP", WdatpExcludeLinuxPublicPreview = "WDATP_EXCLUDE_LINUX_PUBLIC_PREVIEW", + WdatpUnifiedSolution = "WDATP_UNIFIED_SOLUTION", Sentinel = "Sentinel" } @@ -5379,6 +5973,7 @@ export enum KnownSettingName { * **MCAS** \ * **WDATP** \ * **WDATP_EXCLUDE_LINUX_PUBLIC_PREVIEW** \ + * **WDATP_UNIFIED_SOLUTION** \ * **Sentinel** */ export type SettingName = string; @@ -5409,7 +6004,9 @@ export type EndOfSupportStatus = string; export enum KnownCloudName { Azure = "Azure", AWS = "AWS", - GCP = "GCP" + GCP = "GCP", + Github = "Github", + AzureDevOps = "AzureDevOps" } /** @@ -5419,7 +6016,9 @@ export enum KnownCloudName { * ### Known values supported by the service * **Azure** \ * **AWS** \ - * **GCP** + * **GCP** \ + * **Github** \ + * **AzureDevOps** */ export type CloudName = string; @@ -5428,7 +6027,14 @@ export enum KnownOfferingType { CspmMonitorAws = "CspmMonitorAws", DefenderForContainersAws = "DefenderForContainersAws", DefenderForServersAws = "DefenderForServersAws", - InformationProtectionAws = "InformationProtectionAws" + DefenderForDatabasesAws = "DefenderForDatabasesAws", + InformationProtectionAws = "InformationProtectionAws", + CspmMonitorGcp = "CspmMonitorGcp", + CspmMonitorGithub = "CspmMonitorGithub", + CspmMonitorAzureDevOps = "CspmMonitorAzureDevOps", + DefenderForServersGcp = "DefenderForServersGcp", + DefenderForContainersGcp = "DefenderForContainersGcp", + DefenderForDatabasesGcp = "DefenderForDatabasesGcp" } /** @@ -5439,25 +6045,102 @@ export enum KnownOfferingType { * **CspmMonitorAws** \ * **DefenderForContainersAws** \ * **DefenderForServersAws** \ - * **InformationProtectionAws** + * **DefenderForDatabasesAws** \ + * **InformationProtectionAws** \ + * **CspmMonitorGcp** \ + * **CspmMonitorGithub** \ + * **CspmMonitorAzureDevOps** \ + * **DefenderForServersGcp** \ + * **DefenderForContainersGcp** \ + * **DefenderForDatabasesGcp** */ export type OfferingType = string; -/** Known values of {@link OrganizationMembershipType} that the service accepts. */ -export enum KnownOrganizationMembershipType { - Member = "Member", - Organization = "Organization" +/** Known values of {@link EnvironmentType} that the service accepts. */ +export enum KnownEnvironmentType { + AwsAccount = "AwsAccount", + GcpProject = "GcpProject", + GithubScope = "GithubScope", + AzureDevOpsScope = "AzureDevOpsScope" } /** - * Defines values for OrganizationMembershipType. \ - * {@link KnownOrganizationMembershipType} can be used interchangeably with OrganizationMembershipType, + * Defines values for EnvironmentType. \ + * {@link KnownEnvironmentType} can be used interchangeably with EnvironmentType, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **Member** \ - * **Organization** + * **AwsAccount** \ + * **GcpProject** \ + * **GithubScope** \ + * **AzureDevOpsScope** */ -export type OrganizationMembershipType = string; +export type EnvironmentType = string; + +/** Known values of {@link GovernanceRuleType} that the service accepts. */ +export enum KnownGovernanceRuleType { + /** The source of the rule type definition is integrated */ + Integrated = "Integrated", + /** The source of the rule type definition is ServiceNow */ + ServiceNow = "ServiceNow" +} + +/** + * Defines values for GovernanceRuleType. \ + * {@link KnownGovernanceRuleType} can be used interchangeably with GovernanceRuleType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Integrated**: The source of the rule type definition is integrated \ + * **ServiceNow**: The source of the rule type definition is ServiceNow + */ +export type GovernanceRuleType = string; + +/** Known values of {@link GovernanceRuleSourceResourceType} that the service accepts. */ +export enum KnownGovernanceRuleSourceResourceType { + /** The source of the governance rule is assessments */ + Assessments = "Assessments" +} + +/** + * Defines values for GovernanceRuleSourceResourceType. \ + * {@link KnownGovernanceRuleSourceResourceType} can be used interchangeably with GovernanceRuleSourceResourceType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Assessments**: The source of the governance rule is assessments + */ +export type GovernanceRuleSourceResourceType = string; + +/** Known values of {@link GovernanceRuleOwnerSourceType} that the service accepts. */ +export enum KnownGovernanceRuleOwnerSourceType { + /** The rule source type defined using resource tag */ + ByTag = "ByTag", + /** The rule source type defined manually */ + Manually = "Manually" +} + +/** + * Defines values for GovernanceRuleOwnerSourceType. \ + * {@link KnownGovernanceRuleOwnerSourceType} can be used interchangeably with GovernanceRuleOwnerSourceType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **ByTag**: The rule source type defined using resource tag \ + * **Manually**: The rule source type defined manually + */ +export type GovernanceRuleOwnerSourceType = string; + +/** Known values of {@link ApplicationSourceResourceType} that the service accepts. */ +export enum KnownApplicationSourceResourceType { + /** The source of the application is assessments */ + Assessments = "Assessments" +} + +/** + * Defines values for ApplicationSourceResourceType. \ + * {@link KnownApplicationSourceResourceType} can be used interchangeably with ApplicationSourceResourceType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Assessments**: The source of the application is assessments + */ +export type ApplicationSourceResourceType = string; /** Known values of {@link AadConnectivityState} that the service accepts. */ export enum KnownAadConnectivityState { @@ -5504,6 +6187,104 @@ export enum KnownBundleType { * **VirtualMachines** */ export type BundleType = string; + +/** Known values of {@link OrganizationMembershipType} that the service accepts. */ +export enum KnownOrganizationMembershipType { + Member = "Member", + Organization = "Organization" +} + +/** + * Defines values for OrganizationMembershipType. \ + * {@link KnownOrganizationMembershipType} can be used interchangeably with OrganizationMembershipType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Member** \ + * **Organization** + */ +export type OrganizationMembershipType = string; + +/** Known values of {@link Type} that the service accepts. */ +export enum KnownType { + Qualys = "Qualys", + TVM = "TVM" +} + +/** + * Defines values for Type. \ + * {@link KnownType} can be used interchangeably with Type, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Qualys** \ + * **TVM** + */ +export type Type = string; + +/** Known values of {@link SubPlan} that the service accepts. */ +export enum KnownSubPlan { + P1 = "P1", + P2 = "P2" +} + +/** + * Defines values for SubPlan. \ + * {@link KnownSubPlan} can be used interchangeably with SubPlan, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **P1** \ + * **P2** + */ +export type SubPlan = string; + +/** Known values of {@link ScanningMode} that the service accepts. */ +export enum KnownScanningMode { + Default = "Default" +} + +/** + * Defines values for ScanningMode. \ + * {@link KnownScanningMode} can be used interchangeably with ScanningMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Default** + */ +export type ScanningMode = string; + +/** Known values of {@link GovernanceRuleConditionOperator} that the service accepts. */ +export enum KnownGovernanceRuleConditionOperator { + /** Checks that the string value of the data defined in Property equals the given value - exact fit */ + Equals = "Equals", + /** Checks that the string value of the data defined in Property equals any of the given values (exact fit) */ + In = "In" +} + +/** + * Defines values for GovernanceRuleConditionOperator. \ + * {@link KnownGovernanceRuleConditionOperator} can be used interchangeably with GovernanceRuleConditionOperator, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Equals**: Checks that the string value of the data defined in Property equals the given value - exact fit \ + * **In**: Checks that the string value of the data defined in Property equals any of the given values (exact fit) + */ +export type GovernanceRuleConditionOperator = string; + +/** Known values of {@link ApplicationConditionOperator} that the service accepts. */ +export enum KnownApplicationConditionOperator { + /** Checks that the string value of the data defined in Property contains the given value */ + Contains = "Contains", + /** Checks that the string value of the data defined in Property equals any of the given values (exact fit) */ + In = "In" +} + +/** + * Defines values for ApplicationConditionOperator. \ + * {@link KnownApplicationConditionOperator} can be used interchangeably with ApplicationConditionOperator, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Contains**: Checks that the string value of the data defined in Property contains the given value \ + * **In**: Checks that the string value of the data defined in Property equals any of the given values (exact fit) + */ +export type ApplicationConditionOperator = string; /** Defines values for Rank. */ export type Rank = "None" | "Low" | "Medium" | "High" | "Critical"; /** Defines values for RuleState. */ @@ -7198,6 +7979,218 @@ export interface SecurityConnectorsListByResourceGroupNextOptionalParams /** Contains response data for the listByResourceGroupNext operation. */ export type SecurityConnectorsListByResourceGroupNextResponse = SecurityConnectorsList; +/** Optional parameters. */ +export interface GovernanceRuleListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type GovernanceRuleListResponse = GovernanceRuleList; + +/** Optional parameters. */ +export interface GovernanceRuleListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type GovernanceRuleListNextResponse = GovernanceRuleList; + +/** Optional parameters. */ +export interface GovernanceRulesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type GovernanceRulesGetResponse = GovernanceRule; + +/** Optional parameters. */ +export interface GovernanceRulesCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the createOrUpdate operation. */ +export type GovernanceRulesCreateOrUpdateResponse = GovernanceRule; + +/** Optional parameters. */ +export interface GovernanceRulesDeleteOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface GovernanceRulesRuleIdExecuteSingleSubscriptionOptionalParams + extends coreClient.OperationOptions { + /** GovernanceRule over a subscription scope */ + executeGovernanceRuleParams?: ExecuteGovernanceRuleParams; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the ruleIdExecuteSingleSubscription operation. */ +export type GovernanceRulesRuleIdExecuteSingleSubscriptionResponse = GovernanceRulesRuleIdExecuteSingleSubscriptionHeaders; + +/** Optional parameters. */ +export interface GovernanceRulesRuleIdExecuteSingleSecurityConnectorOptionalParams + extends coreClient.OperationOptions { + /** GovernanceRule over a subscription scope */ + executeGovernanceRuleParams?: ExecuteGovernanceRuleParams; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the ruleIdExecuteSingleSecurityConnector operation. */ +export type GovernanceRulesRuleIdExecuteSingleSecurityConnectorResponse = GovernanceRulesRuleIdExecuteSingleSecurityConnectorHeaders; + +/** Optional parameters. */ +export interface SecurityConnectorGovernanceRuleListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type SecurityConnectorGovernanceRuleListResponse = GovernanceRuleList; + +/** Optional parameters. */ +export interface SecurityConnectorGovernanceRuleListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type SecurityConnectorGovernanceRuleListNextResponse = GovernanceRuleList; + +/** Optional parameters. */ +export interface SecurityConnectorGovernanceRulesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type SecurityConnectorGovernanceRulesGetResponse = GovernanceRule; + +/** Optional parameters. */ +export interface SecurityConnectorGovernanceRulesCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the createOrUpdate operation. */ +export type SecurityConnectorGovernanceRulesCreateOrUpdateResponse = GovernanceRule; + +/** Optional parameters. */ +export interface SecurityConnectorGovernanceRulesDeleteOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface SubscriptionGovernanceRulesExecuteStatusGetOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the get operation. */ +export type SubscriptionGovernanceRulesExecuteStatusGetResponse = ExecuteRuleStatus; + +/** Optional parameters. */ +export interface SecurityConnectorGovernanceRulesExecuteStatusGetOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the get operation. */ +export type SecurityConnectorGovernanceRulesExecuteStatusGetResponse = ExecuteRuleStatus; + +/** Optional parameters. */ +export interface GovernanceAssignmentsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type GovernanceAssignmentsListResponse = GovernanceAssignmentsList; + +/** Optional parameters. */ +export interface GovernanceAssignmentsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type GovernanceAssignmentsGetResponse = GovernanceAssignment; + +/** Optional parameters. */ +export interface GovernanceAssignmentsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the createOrUpdate operation. */ +export type GovernanceAssignmentsCreateOrUpdateResponse = GovernanceAssignment; + +/** Optional parameters. */ +export interface GovernanceAssignmentsDeleteOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface GovernanceAssignmentsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type GovernanceAssignmentsListNextResponse = GovernanceAssignmentsList; + +/** Optional parameters. */ +export interface ApplicationsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type ApplicationsListResponse = ApplicationsList; + +/** Optional parameters. */ +export interface ApplicationsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type ApplicationsListNextResponse = ApplicationsList; + +/** Optional parameters. */ +export interface ApplicationGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ApplicationGetResponse = Application; + +/** Optional parameters. */ +export interface ApplicationCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the createOrUpdate operation. */ +export type ApplicationCreateOrUpdateResponse = Application; + +/** Optional parameters. */ +export interface ApplicationDeleteOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface SecurityConnectorApplicationsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type SecurityConnectorApplicationsListResponse = ApplicationsList; + +/** Optional parameters. */ +export interface SecurityConnectorApplicationsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type SecurityConnectorApplicationsListNextResponse = ApplicationsList; + +/** Optional parameters. */ +export interface SecurityConnectorApplicationGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type SecurityConnectorApplicationGetResponse = Application; + +/** Optional parameters. */ +export interface SecurityConnectorApplicationCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the createOrUpdate operation. */ +export type SecurityConnectorApplicationCreateOrUpdateResponse = Application; + +/** Optional parameters. */ +export interface SecurityConnectorApplicationDeleteOptionalParams + extends coreClient.OperationOptions {} + /** 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 6fe7cd68b59c..77d0904b1eda 100644 --- a/sdk/security/arm-security/src/models/mappers.ts +++ b/sdk/security/arm-security/src/models/mappers.ts @@ -4376,39 +4376,256 @@ export const CloudOffering: coreClient.CompositeMapper = { } }; -export const SecurityConnectorPropertiesOrganizationalData: coreClient.CompositeMapper = { +export const EnvironmentData: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SecurityConnectorPropertiesOrganizationalData", + className: "EnvironmentData", + uberParent: "EnvironmentData", + polymorphicDiscriminator: { + serializedName: "environmentType", + clientName: "environmentType" + }, modelProperties: { - organizationMembershipType: { - serializedName: "organizationMembershipType", + environmentType: { + serializedName: "environmentType", + required: true, type: { name: "String" } + } + } + } +}; + +export const GovernanceRuleList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GovernanceRuleList", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "GovernanceRule" + } + } + } }, - parentHierarchyId: { - serializedName: "parentHierarchyId", + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const GovernanceRuleOwnerSource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GovernanceRuleOwnerSource", + modelProperties: { + type: { + serializedName: "type", type: { name: "String" } }, - stacksetName: { - serializedName: "stacksetName", + value: { + serializedName: "value", type: { name: "String" } + } + } + } +}; + +export const GovernanceRuleEmailNotification: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GovernanceRuleEmailNotification", + modelProperties: { + disableManagerEmailNotification: { + serializedName: "disableManagerEmailNotification", + type: { + name: "Boolean" + } }, - excludedAccountIds: { - serializedName: "excludedAccountIds", + disableOwnerEmailNotification: { + serializedName: "disableOwnerEmailNotification", + type: { + name: "Boolean" + } + } + } + } +}; + +export const ExecuteGovernanceRuleParams: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ExecuteGovernanceRuleParams", + modelProperties: { + override: { + serializedName: "override", + type: { + name: "Boolean" + } + } + } + } +}; + +export const ExecuteRuleStatus: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ExecuteRuleStatus", + modelProperties: { + operationId: { + serializedName: "operationId", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const GovernanceAssignmentsList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GovernanceAssignmentsList", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "GovernanceAssignment" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const RemediationEta: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RemediationEta", + modelProperties: { + eta: { + serializedName: "eta", + required: true, + type: { + name: "DateTime" + } + }, + justification: { + serializedName: "justification", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const GovernanceEmailNotification: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GovernanceEmailNotification", + modelProperties: { + disableManagerEmailNotification: { + serializedName: "disableManagerEmailNotification", + type: { + name: "Boolean" + } + }, + disableOwnerEmailNotification: { + serializedName: "disableOwnerEmailNotification", + type: { + name: "Boolean" + } + } + } + } +}; + +export const GovernanceAssignmentAdditionalData: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GovernanceAssignmentAdditionalData", + modelProperties: { + ticketNumber: { + constraints: { + InclusiveMinimum: 0 + }, + serializedName: "ticketNumber", + type: { + name: "Number" + } + }, + ticketLink: { + serializedName: "ticketLink", + type: { + name: "String" + } + }, + ticketStatus: { + serializedName: "ticketStatus", + type: { + name: "String" + } + } + } + } +}; + +export const ApplicationsList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ApplicationsList", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Application" } } } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } } } } @@ -4525,8 +4742,620 @@ export const AadConnectivityStateAutoGenerated: coreClient.CompositeMapper = { name: "Composite", className: "AadConnectivityStateAutoGenerated", modelProperties: { - connectivityState: { - serializedName: "connectivityState", + connectivityState: { + serializedName: "connectivityState", + type: { + name: "String" + } + } + } + } +}; + +export const SecureScoreControlScore: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SecureScoreControlScore", + modelProperties: { + max: { + constraints: { + InclusiveMaximum: 10, + InclusiveMinimum: 0 + }, + serializedName: "max", + readOnly: true, + type: { + name: "Number" + } + }, + current: { + constraints: { + InclusiveMaximum: 10, + InclusiveMinimum: 0 + }, + serializedName: "current", + readOnly: true, + type: { + name: "Number" + } + }, + percentage: { + constraints: { + InclusiveMaximum: 1, + InclusiveMinimum: 0 + }, + serializedName: "percentage", + readOnly: true, + type: { + name: "Number" + } + } + } + } +}; + +export const AwsOrganizationalData: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AwsOrganizationalData", + uberParent: "AwsOrganizationalData", + polymorphicDiscriminator: { + serializedName: "organizationMembershipType", + clientName: "organizationMembershipType" + }, + modelProperties: { + organizationMembershipType: { + serializedName: "organizationMembershipType", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const GcpOrganizationalData: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GcpOrganizationalData", + uberParent: "GcpOrganizationalData", + polymorphicDiscriminator: { + serializedName: "organizationMembershipType", + clientName: "organizationMembershipType" + }, + modelProperties: { + organizationMembershipType: { + serializedName: "organizationMembershipType", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const GcpProjectDetails: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GcpProjectDetails", + modelProperties: { + projectNumber: { + serializedName: "projectNumber", + type: { + name: "String" + } + }, + projectId: { + serializedName: "projectId", + type: { + name: "String" + } + }, + workloadIdentityPoolId: { + serializedName: "workloadIdentityPoolId", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const CspmMonitorAwsOfferingNativeCloudConnection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CspmMonitorAwsOfferingNativeCloudConnection", + modelProperties: { + cloudRoleArn: { + serializedName: "cloudRoleArn", + type: { + name: "String" + } + } + } + } +}; + +export const DefenderForContainersAwsOfferingKubernetesService: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DefenderForContainersAwsOfferingKubernetesService", + modelProperties: { + cloudRoleArn: { + serializedName: "cloudRoleArn", + type: { + name: "String" + } + } + } + } +}; + +export const DefenderForContainersAwsOfferingKubernetesScubaReader: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DefenderForContainersAwsOfferingKubernetesScubaReader", + modelProperties: { + cloudRoleArn: { + serializedName: "cloudRoleArn", + type: { + name: "String" + } + } + } + } +}; + +export const DefenderForContainersAwsOfferingCloudWatchToKinesis: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DefenderForContainersAwsOfferingCloudWatchToKinesis", + modelProperties: { + cloudRoleArn: { + serializedName: "cloudRoleArn", + type: { + name: "String" + } + } + } + } +}; + +export const DefenderForContainersAwsOfferingKinesisToS3: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DefenderForContainersAwsOfferingKinesisToS3", + modelProperties: { + cloudRoleArn: { + serializedName: "cloudRoleArn", + type: { + name: "String" + } + } + } + } +}; + +export const DefenderForContainersAwsOfferingContainerVulnerabilityAssessment: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: + "DefenderForContainersAwsOfferingContainerVulnerabilityAssessment", + modelProperties: { + cloudRoleArn: { + serializedName: "cloudRoleArn", + type: { + name: "String" + } + } + } + } +}; + +export const DefenderForContainersAwsOfferingContainerVulnerabilityAssessmentTask: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: + "DefenderForContainersAwsOfferingContainerVulnerabilityAssessmentTask", + modelProperties: { + cloudRoleArn: { + serializedName: "cloudRoleArn", + type: { + name: "String" + } + } + } + } +}; + +export const DefenderForServersAwsOfferingDefenderForServers: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DefenderForServersAwsOfferingDefenderForServers", + modelProperties: { + cloudRoleArn: { + serializedName: "cloudRoleArn", + type: { + name: "String" + } + } + } + } +}; + +export const DefenderForServersAwsOfferingArcAutoProvisioning: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DefenderForServersAwsOfferingArcAutoProvisioning", + modelProperties: { + enabled: { + serializedName: "enabled", + type: { + name: "Boolean" + } + }, + cloudRoleArn: { + serializedName: "cloudRoleArn", + type: { + name: "String" + } + }, + servicePrincipalSecretMetadata: { + serializedName: "servicePrincipalSecretMetadata", + type: { + name: "Composite", + className: + "DefenderForServersAwsOfferingArcAutoProvisioningServicePrincipalSecretMetadata" + } + } + } + } +}; + +export const DefenderForServersAwsOfferingArcAutoProvisioningServicePrincipalSecretMetadata: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: + "DefenderForServersAwsOfferingArcAutoProvisioningServicePrincipalSecretMetadata", + modelProperties: { + expiryDate: { + serializedName: "expiryDate", + type: { + name: "String" + } + }, + parameterStoreRegion: { + serializedName: "parameterStoreRegion", + type: { + name: "String" + } + }, + parameterNameInStore: { + serializedName: "parameterNameInStore", + type: { + name: "String" + } + } + } + } +}; + +export const DefenderForServersAwsOfferingVaAutoProvisioning: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DefenderForServersAwsOfferingVaAutoProvisioning", + modelProperties: { + enabled: { + serializedName: "enabled", + type: { + name: "Boolean" + } + }, + configuration: { + serializedName: "configuration", + type: { + name: "Composite", + className: + "DefenderForServersAwsOfferingVaAutoProvisioningConfiguration" + } + } + } + } +}; + +export const DefenderForServersAwsOfferingVaAutoProvisioningConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DefenderForServersAwsOfferingVaAutoProvisioningConfiguration", + modelProperties: { + type: { + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const DefenderForServersAwsOfferingMdeAutoProvisioning: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DefenderForServersAwsOfferingMdeAutoProvisioning", + modelProperties: { + enabled: { + serializedName: "enabled", + type: { + name: "Boolean" + } + }, + configuration: { + serializedName: "configuration", + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + } + } + } +}; + +export const DefenderForServersAwsOfferingSubPlan: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DefenderForServersAwsOfferingSubPlan", + modelProperties: { + type: { + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const DefenderForServersAwsOfferingVmScanners: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DefenderForServersAwsOfferingVmScanners", + modelProperties: { + enabled: { + serializedName: "enabled", + type: { + name: "Boolean" + } + }, + configuration: { + serializedName: "configuration", + type: { + name: "Composite", + className: "DefenderForServersAwsOfferingVmScannersConfiguration" + } + } + } + } +}; + +export const DefenderForServersAwsOfferingVmScannersConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DefenderForServersAwsOfferingVmScannersConfiguration", + modelProperties: { + cloudRoleArn: { + serializedName: "cloudRoleArn", + type: { + name: "String" + } + }, + scanningMode: { + serializedName: "scanningMode", + type: { + name: "String" + } + }, + exclusionTags: { + serializedName: "exclusionTags", + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + } + } + } +}; + +export const DefenderFoDatabasesAwsOfferingArcAutoProvisioning: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DefenderFoDatabasesAwsOfferingArcAutoProvisioning", + modelProperties: { + enabled: { + serializedName: "enabled", + type: { + name: "Boolean" + } + }, + cloudRoleArn: { + serializedName: "cloudRoleArn", + type: { + name: "String" + } + }, + servicePrincipalSecretMetadata: { + serializedName: "servicePrincipalSecretMetadata", + type: { + name: "Composite", + className: + "DefenderFoDatabasesAwsOfferingArcAutoProvisioningServicePrincipalSecretMetadata" + } + } + } + } +}; + +export const DefenderFoDatabasesAwsOfferingArcAutoProvisioningServicePrincipalSecretMetadata: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: + "DefenderFoDatabasesAwsOfferingArcAutoProvisioningServicePrincipalSecretMetadata", + modelProperties: { + expiryDate: { + serializedName: "expiryDate", + type: { + name: "DateTime" + } + }, + parameterStoreRegion: { + serializedName: "parameterStoreRegion", + type: { + name: "String" + } + }, + parameterNameInStore: { + serializedName: "parameterNameInStore", + type: { + name: "String" + } + } + } + } +}; + +export const InformationProtectionAwsOfferingInformationProtection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "InformationProtectionAwsOfferingInformationProtection", + modelProperties: { + cloudRoleArn: { + serializedName: "cloudRoleArn", + type: { + name: "String" + } + } + } + } +}; + +export const CspmMonitorGcpOfferingNativeCloudConnection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CspmMonitorGcpOfferingNativeCloudConnection", + modelProperties: { + workloadIdentityProviderId: { + serializedName: "workloadIdentityProviderId", + type: { + name: "String" + } + }, + serviceAccountEmailAddress: { + serializedName: "serviceAccountEmailAddress", + type: { + name: "String" + } + } + } + } +}; + +export const DefenderForServersGcpOfferingDefenderForServers: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DefenderForServersGcpOfferingDefenderForServers", + modelProperties: { + workloadIdentityProviderId: { + serializedName: "workloadIdentityProviderId", + type: { + name: "String" + } + }, + serviceAccountEmailAddress: { + serializedName: "serviceAccountEmailAddress", + type: { + name: "String" + } + } + } + } +}; + +export const DefenderForServersGcpOfferingArcAutoProvisioning: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DefenderForServersGcpOfferingArcAutoProvisioning", + modelProperties: { + enabled: { + serializedName: "enabled", + type: { + name: "Boolean" + } + }, + configuration: { + serializedName: "configuration", + type: { + name: "Composite", + className: + "DefenderForServersGcpOfferingArcAutoProvisioningConfiguration" + } + } + } + } +}; + +export const DefenderForServersGcpOfferingArcAutoProvisioningConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DefenderForServersGcpOfferingArcAutoProvisioningConfiguration", + modelProperties: { + clientId: { + serializedName: "clientId", + type: { + name: "String" + } + }, + agentOnboardingServiceAccountNumericId: { + serializedName: "agentOnboardingServiceAccountNumericId", + type: { + name: "String" + } + } + } + } +}; + +export const DefenderForServersGcpOfferingVaAutoProvisioning: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DefenderForServersGcpOfferingVaAutoProvisioning", + modelProperties: { + enabled: { + serializedName: "enabled", + type: { + name: "Boolean" + } + }, + configuration: { + serializedName: "configuration", + type: { + name: "Composite", + className: + "DefenderForServersGcpOfferingVaAutoProvisioningConfiguration" + } + } + } + } +}; + +export const DefenderForServersGcpOfferingVaAutoProvisioningConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DefenderForServersGcpOfferingVaAutoProvisioningConfiguration", + modelProperties: { + type: { + serializedName: "type", type: { name: "String" } @@ -4535,55 +5364,35 @@ export const AadConnectivityStateAutoGenerated: coreClient.CompositeMapper = { } }; -export const SecureScoreControlScore: coreClient.CompositeMapper = { +export const DefenderForServersGcpOfferingMdeAutoProvisioning: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SecureScoreControlScore", + className: "DefenderForServersGcpOfferingMdeAutoProvisioning", modelProperties: { - max: { - constraints: { - InclusiveMaximum: 10, - InclusiveMinimum: 0 - }, - serializedName: "max", - readOnly: true, - type: { - name: "Number" - } - }, - current: { - constraints: { - InclusiveMaximum: 10, - InclusiveMinimum: 0 - }, - serializedName: "current", - readOnly: true, + enabled: { + serializedName: "enabled", type: { - name: "Number" + name: "Boolean" } }, - percentage: { - constraints: { - InclusiveMaximum: 1, - InclusiveMinimum: 0 - }, - serializedName: "percentage", - readOnly: true, + configuration: { + serializedName: "configuration", type: { - name: "Number" + name: "Dictionary", + value: { type: { name: "any" } } } } } } }; -export const CspmMonitorAwsOfferingNativeCloudConnection: coreClient.CompositeMapper = { +export const DefenderForServersGcpOfferingSubPlan: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CspmMonitorAwsOfferingNativeCloudConnection", + className: "DefenderForServersGcpOfferingSubPlan", modelProperties: { - cloudRoleArn: { - serializedName: "cloudRoleArn", + type: { + serializedName: "type", type: { name: "String" } @@ -4592,43 +5401,43 @@ export const CspmMonitorAwsOfferingNativeCloudConnection: coreClient.CompositeMa } }; -export const DefenderForContainersAwsOfferingKubernetesService: coreClient.CompositeMapper = { +export const DefenderForDatabasesGcpOfferingArcAutoProvisioning: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DefenderForContainersAwsOfferingKubernetesService", + className: "DefenderForDatabasesGcpOfferingArcAutoProvisioning", modelProperties: { - cloudRoleArn: { - serializedName: "cloudRoleArn", + enabled: { + serializedName: "enabled", type: { - name: "String" + name: "Boolean" + } + }, + configuration: { + serializedName: "configuration", + type: { + name: "Composite", + className: + "DefenderForDatabasesGcpOfferingArcAutoProvisioningConfiguration" } } } } }; -export const DefenderForContainersAwsOfferingKubernetesScubaReader: coreClient.CompositeMapper = { +export const DefenderForDatabasesGcpOfferingArcAutoProvisioningConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DefenderForContainersAwsOfferingKubernetesScubaReader", + className: + "DefenderForDatabasesGcpOfferingArcAutoProvisioningConfiguration", modelProperties: { - cloudRoleArn: { - serializedName: "cloudRoleArn", + clientId: { + serializedName: "clientId", type: { name: "String" } - } - } - } -}; - -export const DefenderForContainersAwsOfferingCloudWatchToKinesis: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DefenderForContainersAwsOfferingCloudWatchToKinesis", - modelProperties: { - cloudRoleArn: { - serializedName: "cloudRoleArn", + }, + agentOnboardingServiceAccountNumericId: { + serializedName: "agentOnboardingServiceAccountNumericId", type: { name: "String" } @@ -4637,13 +5446,20 @@ export const DefenderForContainersAwsOfferingCloudWatchToKinesis: coreClient.Com } }; -export const DefenderForContainersAwsOfferingKinesisToS3: coreClient.CompositeMapper = { +export const DefenderForDatabasesGcpOfferingDefenderForDatabasesArcAutoProvisioning: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DefenderForContainersAwsOfferingKinesisToS3", + className: + "DefenderForDatabasesGcpOfferingDefenderForDatabasesArcAutoProvisioning", modelProperties: { - cloudRoleArn: { - serializedName: "cloudRoleArn", + serviceAccountEmailAddress: { + serializedName: "serviceAccountEmailAddress", + type: { + name: "String" + } + }, + workloadIdentityProviderId: { + serializedName: "workloadIdentityProviderId", type: { name: "String" } @@ -4652,13 +5468,19 @@ export const DefenderForContainersAwsOfferingKinesisToS3: coreClient.CompositeMa } }; -export const DefenderForServersAwsOfferingDefenderForServers: coreClient.CompositeMapper = { +export const DefenderForContainersGcpOfferingNativeCloudConnection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DefenderForServersAwsOfferingDefenderForServers", + className: "DefenderForContainersGcpOfferingNativeCloudConnection", modelProperties: { - cloudRoleArn: { - serializedName: "cloudRoleArn", + serviceAccountEmailAddress: { + serializedName: "serviceAccountEmailAddress", + type: { + name: "String" + } + }, + workloadIdentityProviderId: { + serializedName: "workloadIdentityProviderId", type: { name: "String" } @@ -4667,49 +5489,47 @@ export const DefenderForServersAwsOfferingDefenderForServers: coreClient.Composi } }; -export const DefenderForServersAwsOfferingArcAutoProvisioning: coreClient.CompositeMapper = { +export const DefenderForContainersGcpOfferingDataPipelineNativeCloudConnection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DefenderForServersAwsOfferingArcAutoProvisioning", + className: + "DefenderForContainersGcpOfferingDataPipelineNativeCloudConnection", modelProperties: { - enabled: { - serializedName: "enabled", + serviceAccountEmailAddress: { + serializedName: "serviceAccountEmailAddress", type: { - name: "Boolean" + name: "String" } }, - servicePrincipalSecretMetadata: { - serializedName: "servicePrincipalSecretMetadata", + workloadIdentityProviderId: { + serializedName: "workloadIdentityProviderId", type: { - name: "Composite", - className: - "DefenderForServersAwsOfferingArcAutoProvisioningServicePrincipalSecretMetadata" + name: "String" } } } } }; -export const DefenderForServersAwsOfferingArcAutoProvisioningServicePrincipalSecretMetadata: coreClient.CompositeMapper = { +export const Condition: coreClient.CompositeMapper = { type: { name: "Composite", - className: - "DefenderForServersAwsOfferingArcAutoProvisioningServicePrincipalSecretMetadata", + className: "Condition", modelProperties: { - expiryDate: { - serializedName: "expiryDate", + property: { + serializedName: "property", type: { name: "String" } }, - parameterStoreRegion: { - serializedName: "parameterStoreRegion", + value: { + serializedName: "value", type: { name: "String" } }, - parameterNameInStore: { - serializedName: "parameterNameInStore", + operator: { + serializedName: "operator", type: { name: "String" } @@ -4718,13 +5538,25 @@ export const DefenderForServersAwsOfferingArcAutoProvisioningServicePrincipalSec } }; -export const InformationProtectionAwsOfferingInformationProtection: coreClient.CompositeMapper = { +export const ApplicationCondition: coreClient.CompositeMapper = { type: { name: "Composite", - className: "InformationProtectionAwsOfferingInformationProtection", + className: "ApplicationCondition", modelProperties: { - cloudRoleArn: { - serializedName: "cloudRoleArn", + property: { + serializedName: "property", + type: { + name: "String" + } + }, + value: { + serializedName: "value", + type: { + name: "String" + } + }, + operator: { + serializedName: "operator", type: { name: "String" } @@ -7088,40 +7920,217 @@ export const Software: coreClient.CompositeMapper = { name: "String" } }, - softwareName: { - serializedName: "properties.softwareName", + softwareName: { + serializedName: "properties.softwareName", + type: { + name: "String" + } + }, + version: { + serializedName: "properties.version", + type: { + name: "String" + } + }, + endOfSupportStatus: { + serializedName: "properties.endOfSupportStatus", + type: { + name: "String" + } + }, + endOfSupportDate: { + serializedName: "properties.endOfSupportDate", + type: { + name: "String" + } + }, + numberOfKnownVulnerabilities: { + serializedName: "properties.numberOfKnownVulnerabilities", + type: { + name: "Number" + } + }, + firstSeenAt: { + serializedName: "properties.firstSeenAt", + type: { + name: "String" + } + } + } + } +}; + +export const GovernanceRule: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GovernanceRule", + modelProperties: { + ...Resource.type.modelProperties, + displayName: { + serializedName: "properties.displayName", + type: { + name: "String" + } + }, + description: { + serializedName: "properties.description", + type: { + name: "String" + } + }, + remediationTimeframe: { + serializedName: "properties.remediationTimeframe", + type: { + name: "String" + } + }, + isGracePeriod: { + serializedName: "properties.isGracePeriod", + type: { + name: "Boolean" + } + }, + rulePriority: { + constraints: { + InclusiveMaximum: 1000, + InclusiveMinimum: 0 + }, + serializedName: "properties.rulePriority", + type: { + name: "Number" + } + }, + isDisabled: { + serializedName: "properties.isDisabled", + type: { + name: "Boolean" + } + }, + ruleType: { + serializedName: "properties.ruleType", + type: { + name: "String" + } + }, + sourceResourceType: { + serializedName: "properties.sourceResourceType", + type: { + name: "String" + } + }, + conditionSets: { + serializedName: "properties.conditionSets", + type: { + name: "Sequence", + element: { + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + } + } + }, + ownerSource: { + serializedName: "properties.ownerSource", + type: { + name: "Composite", + className: "GovernanceRuleOwnerSource" + } + }, + governanceEmailNotification: { + serializedName: "properties.governanceEmailNotification", + type: { + name: "Composite", + className: "GovernanceRuleEmailNotification" + } + } + } + } +}; + +export const GovernanceAssignment: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GovernanceAssignment", + modelProperties: { + ...Resource.type.modelProperties, + owner: { + serializedName: "properties.owner", + type: { + name: "String" + } + }, + remediationDueDate: { + serializedName: "properties.remediationDueDate", + type: { + name: "DateTime" + } + }, + remediationEta: { + serializedName: "properties.remediationEta", + type: { + name: "Composite", + className: "RemediationEta" + } + }, + isGracePeriod: { + serializedName: "properties.isGracePeriod", type: { - name: "String" + name: "Boolean" } }, - version: { - serializedName: "properties.version", + governanceEmailNotification: { + serializedName: "properties.governanceEmailNotification", type: { - name: "String" + name: "Composite", + className: "GovernanceEmailNotification" } }, - endOfSupportStatus: { - serializedName: "properties.endOfSupportStatus", + additionalData: { + serializedName: "properties.additionalData", + type: { + name: "Composite", + className: "GovernanceAssignmentAdditionalData" + } + } + } + } +}; + +export const Application: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Application", + modelProperties: { + ...Resource.type.modelProperties, + displayName: { + serializedName: "properties.displayName", type: { name: "String" } }, - endOfSupportDate: { - serializedName: "properties.endOfSupportDate", + description: { + serializedName: "properties.description", type: { name: "String" } }, - numberOfKnownVulnerabilities: { - serializedName: "properties.numberOfKnownVulnerabilities", + sourceResourceType: { + serializedName: "properties.sourceResourceType", type: { - name: "Number" + name: "String" } }, - firstSeenAt: { - serializedName: "properties.firstSeenAt", + conditionSets: { + serializedName: "properties.conditionSets", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + } } } } @@ -7975,126 +8984,455 @@ export const AlertSimulatorBundlesRequestProperties: coreClient.CompositeMapper bundles: { serializedName: "bundles", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const CspmMonitorAwsOffering: coreClient.CompositeMapper = { + serializedName: "CspmMonitorAws", + type: { + name: "Composite", + className: "CspmMonitorAwsOffering", + uberParent: "CloudOffering", + polymorphicDiscriminator: CloudOffering.type.polymorphicDiscriminator, + modelProperties: { + ...CloudOffering.type.modelProperties, + nativeCloudConnection: { + serializedName: "nativeCloudConnection", + type: { + name: "Composite", + className: "CspmMonitorAwsOfferingNativeCloudConnection" + } + } + } + } +}; + +export const DefenderForContainersAwsOffering: coreClient.CompositeMapper = { + serializedName: "DefenderForContainersAws", + type: { + name: "Composite", + className: "DefenderForContainersAwsOffering", + uberParent: "CloudOffering", + polymorphicDiscriminator: CloudOffering.type.polymorphicDiscriminator, + modelProperties: { + ...CloudOffering.type.modelProperties, + kubernetesService: { + serializedName: "kubernetesService", + type: { + name: "Composite", + className: "DefenderForContainersAwsOfferingKubernetesService" + } + }, + kubernetesScubaReader: { + serializedName: "kubernetesScubaReader", + type: { + name: "Composite", + className: "DefenderForContainersAwsOfferingKubernetesScubaReader" + } + }, + cloudWatchToKinesis: { + serializedName: "cloudWatchToKinesis", + type: { + name: "Composite", + className: "DefenderForContainersAwsOfferingCloudWatchToKinesis" + } + }, + kinesisToS3: { + serializedName: "kinesisToS3", + type: { + name: "Composite", + className: "DefenderForContainersAwsOfferingKinesisToS3" + } + }, + containerVulnerabilityAssessment: { + serializedName: "containerVulnerabilityAssessment", + type: { + name: "Composite", + className: + "DefenderForContainersAwsOfferingContainerVulnerabilityAssessment" + } + }, + containerVulnerabilityAssessmentTask: { + serializedName: "containerVulnerabilityAssessmentTask", + type: { + name: "Composite", + className: + "DefenderForContainersAwsOfferingContainerVulnerabilityAssessmentTask" + } + }, + enableContainerVulnerabilityAssessment: { + serializedName: "enableContainerVulnerabilityAssessment", + type: { + name: "Boolean" + } + }, + autoProvisioning: { + serializedName: "autoProvisioning", + type: { + name: "Boolean" + } + }, + kubeAuditRetentionTime: { + serializedName: "kubeAuditRetentionTime", + type: { + name: "Number" + } + }, + scubaExternalId: { + serializedName: "scubaExternalId", + type: { + name: "String" + } + } + } + } +}; + +export const DefenderForServersAwsOffering: coreClient.CompositeMapper = { + serializedName: "DefenderForServersAws", + type: { + name: "Composite", + className: "DefenderForServersAwsOffering", + uberParent: "CloudOffering", + polymorphicDiscriminator: CloudOffering.type.polymorphicDiscriminator, + modelProperties: { + ...CloudOffering.type.modelProperties, + defenderForServers: { + serializedName: "defenderForServers", + type: { + name: "Composite", + className: "DefenderForServersAwsOfferingDefenderForServers" + } + }, + arcAutoProvisioning: { + serializedName: "arcAutoProvisioning", + type: { + name: "Composite", + className: "DefenderForServersAwsOfferingArcAutoProvisioning" + } + }, + vaAutoProvisioning: { + serializedName: "vaAutoProvisioning", + type: { + name: "Composite", + className: "DefenderForServersAwsOfferingVaAutoProvisioning" + } + }, + mdeAutoProvisioning: { + serializedName: "mdeAutoProvisioning", + type: { + name: "Composite", + className: "DefenderForServersAwsOfferingMdeAutoProvisioning" + } + }, + subPlan: { + serializedName: "subPlan", + type: { + name: "Composite", + className: "DefenderForServersAwsOfferingSubPlan" + } + }, + vmScanners: { + serializedName: "vmScanners", + type: { + name: "Composite", + className: "DefenderForServersAwsOfferingVmScanners" + } + } + } + } +}; + +export const DefenderFoDatabasesAwsOffering: coreClient.CompositeMapper = { + serializedName: "DefenderForDatabasesAws", + type: { + name: "Composite", + className: "DefenderFoDatabasesAwsOffering", + uberParent: "CloudOffering", + polymorphicDiscriminator: CloudOffering.type.polymorphicDiscriminator, + modelProperties: { + ...CloudOffering.type.modelProperties, + arcAutoProvisioning: { + serializedName: "arcAutoProvisioning", + type: { + name: "Composite", + className: "DefenderFoDatabasesAwsOfferingArcAutoProvisioning" + } + } + } + } +}; + +export const InformationProtectionAwsOffering: coreClient.CompositeMapper = { + serializedName: "InformationProtectionAws", + type: { + name: "Composite", + className: "InformationProtectionAwsOffering", + uberParent: "CloudOffering", + polymorphicDiscriminator: CloudOffering.type.polymorphicDiscriminator, + modelProperties: { + ...CloudOffering.type.modelProperties, + informationProtection: { + serializedName: "informationProtection", + type: { + name: "Composite", + className: "InformationProtectionAwsOfferingInformationProtection" + } + } + } + } +}; + +export const CspmMonitorGcpOffering: coreClient.CompositeMapper = { + serializedName: "CspmMonitorGcp", + type: { + name: "Composite", + className: "CspmMonitorGcpOffering", + uberParent: "CloudOffering", + polymorphicDiscriminator: CloudOffering.type.polymorphicDiscriminator, + modelProperties: { + ...CloudOffering.type.modelProperties, + nativeCloudConnection: { + serializedName: "nativeCloudConnection", + type: { + name: "Composite", + className: "CspmMonitorGcpOfferingNativeCloudConnection" + } + } + } + } +}; + +export const DefenderForServersGcpOffering: coreClient.CompositeMapper = { + serializedName: "DefenderForServersGcp", + type: { + name: "Composite", + className: "DefenderForServersGcpOffering", + uberParent: "CloudOffering", + polymorphicDiscriminator: CloudOffering.type.polymorphicDiscriminator, + modelProperties: { + ...CloudOffering.type.modelProperties, + defenderForServers: { + serializedName: "defenderForServers", + type: { + name: "Composite", + className: "DefenderForServersGcpOfferingDefenderForServers" + } + }, + arcAutoProvisioning: { + serializedName: "arcAutoProvisioning", + type: { + name: "Composite", + className: "DefenderForServersGcpOfferingArcAutoProvisioning" + } + }, + vaAutoProvisioning: { + serializedName: "vaAutoProvisioning", + type: { + name: "Composite", + className: "DefenderForServersGcpOfferingVaAutoProvisioning" + } + }, + mdeAutoProvisioning: { + serializedName: "mdeAutoProvisioning", + type: { + name: "Composite", + className: "DefenderForServersGcpOfferingMdeAutoProvisioning" + } + }, + subPlan: { + serializedName: "subPlan", + type: { + name: "Composite", + className: "DefenderForServersGcpOfferingSubPlan" } } } } }; -export const CspmMonitorAwsOffering: coreClient.CompositeMapper = { - serializedName: "CspmMonitorAws", +export const DefenderForDatabasesGcpOffering: coreClient.CompositeMapper = { + serializedName: "DefenderForDatabasesGcp", type: { name: "Composite", - className: "CspmMonitorAwsOffering", + className: "DefenderForDatabasesGcpOffering", uberParent: "CloudOffering", polymorphicDiscriminator: CloudOffering.type.polymorphicDiscriminator, modelProperties: { ...CloudOffering.type.modelProperties, - nativeCloudConnection: { - serializedName: "nativeCloudConnection", + arcAutoProvisioning: { + serializedName: "arcAutoProvisioning", type: { name: "Composite", - className: "CspmMonitorAwsOfferingNativeCloudConnection" + className: "DefenderForDatabasesGcpOfferingArcAutoProvisioning" + } + }, + defenderForDatabasesArcAutoProvisioning: { + serializedName: "defenderForDatabasesArcAutoProvisioning", + type: { + name: "Composite", + className: + "DefenderForDatabasesGcpOfferingDefenderForDatabasesArcAutoProvisioning" } } } } }; -export const DefenderForContainersAwsOffering: coreClient.CompositeMapper = { - serializedName: "DefenderForContainersAws", +export const DefenderForContainersGcpOffering: coreClient.CompositeMapper = { + serializedName: "DefenderForContainersGcp", type: { name: "Composite", - className: "DefenderForContainersAwsOffering", + className: "DefenderForContainersGcpOffering", uberParent: "CloudOffering", polymorphicDiscriminator: CloudOffering.type.polymorphicDiscriminator, modelProperties: { ...CloudOffering.type.modelProperties, - kubernetesService: { - serializedName: "kubernetesService", + nativeCloudConnection: { + serializedName: "nativeCloudConnection", type: { name: "Composite", - className: "DefenderForContainersAwsOfferingKubernetesService" + className: "DefenderForContainersGcpOfferingNativeCloudConnection" } }, - kubernetesScubaReader: { - serializedName: "kubernetesScubaReader", + dataPipelineNativeCloudConnection: { + serializedName: "dataPipelineNativeCloudConnection", type: { name: "Composite", - className: "DefenderForContainersAwsOfferingKubernetesScubaReader" + className: + "DefenderForContainersGcpOfferingDataPipelineNativeCloudConnection" } }, - cloudWatchToKinesis: { - serializedName: "cloudWatchToKinesis", + auditLogsAutoProvisioningFlag: { + serializedName: "auditLogsAutoProvisioningFlag", type: { - name: "Composite", - className: "DefenderForContainersAwsOfferingCloudWatchToKinesis" + name: "Boolean" } }, - kinesisToS3: { - serializedName: "kinesisToS3", + defenderAgentAutoProvisioningFlag: { + serializedName: "defenderAgentAutoProvisioningFlag", type: { - name: "Composite", - className: "DefenderForContainersAwsOfferingKinesisToS3" + name: "Boolean" + } + }, + policyAgentAutoProvisioningFlag: { + serializedName: "policyAgentAutoProvisioningFlag", + type: { + name: "Boolean" } } } } }; -export const DefenderForServersAwsOffering: coreClient.CompositeMapper = { - serializedName: "DefenderForServersAws", +export const CspmMonitorGithubOffering: coreClient.CompositeMapper = { + serializedName: "CspmMonitorGithub", type: { name: "Composite", - className: "DefenderForServersAwsOffering", + className: "CspmMonitorGithubOffering", uberParent: "CloudOffering", polymorphicDiscriminator: CloudOffering.type.polymorphicDiscriminator, modelProperties: { - ...CloudOffering.type.modelProperties, - defenderForServers: { - serializedName: "defenderForServers", - type: { - name: "Composite", - className: "DefenderForServersAwsOfferingDefenderForServers" - } - }, - arcAutoProvisioning: { - serializedName: "arcAutoProvisioning", + ...CloudOffering.type.modelProperties + } + } +}; + +export const CspmMonitorAzureDevOpsOffering: coreClient.CompositeMapper = { + serializedName: "CspmMonitorAzureDevOps", + type: { + name: "Composite", + className: "CspmMonitorAzureDevOpsOffering", + uberParent: "CloudOffering", + polymorphicDiscriminator: CloudOffering.type.polymorphicDiscriminator, + modelProperties: { + ...CloudOffering.type.modelProperties + } + } +}; + +export const AWSEnvironmentData: coreClient.CompositeMapper = { + serializedName: "AwsAccount", + type: { + name: "Composite", + className: "AWSEnvironmentData", + uberParent: "EnvironmentData", + polymorphicDiscriminator: EnvironmentData.type.polymorphicDiscriminator, + modelProperties: { + ...EnvironmentData.type.modelProperties, + organizationalData: { + serializedName: "organizationalData", type: { name: "Composite", - className: "DefenderForServersAwsOfferingArcAutoProvisioning" + className: "AwsOrganizationalData" } } } } }; -export const InformationProtectionAwsOffering: coreClient.CompositeMapper = { - serializedName: "InformationProtectionAws", +export const GcpProjectEnvironmentData: coreClient.CompositeMapper = { + serializedName: "GcpProject", type: { name: "Composite", - className: "InformationProtectionAwsOffering", - uberParent: "CloudOffering", - polymorphicDiscriminator: CloudOffering.type.polymorphicDiscriminator, + className: "GcpProjectEnvironmentData", + uberParent: "EnvironmentData", + polymorphicDiscriminator: EnvironmentData.type.polymorphicDiscriminator, modelProperties: { - ...CloudOffering.type.modelProperties, - informationProtection: { - serializedName: "informationProtection", + ...EnvironmentData.type.modelProperties, + organizationalData: { + serializedName: "organizationalData", type: { name: "Composite", - className: "InformationProtectionAwsOfferingInformationProtection" + className: "GcpOrganizationalData" + } + }, + projectDetails: { + serializedName: "projectDetails", + type: { + name: "Composite", + className: "GcpProjectDetails" } } } } }; +export const GithubScopeEnvironmentData: coreClient.CompositeMapper = { + serializedName: "GithubScope", + type: { + name: "Composite", + className: "GithubScopeEnvironmentData", + uberParent: "EnvironmentData", + polymorphicDiscriminator: EnvironmentData.type.polymorphicDiscriminator, + modelProperties: { + ...EnvironmentData.type.modelProperties + } + } +}; + +export const AzureDevOpsScopeEnvironmentData: coreClient.CompositeMapper = { + serializedName: "AzureDevOpsScope", + type: { + name: "Composite", + className: "AzureDevOpsScopeEnvironmentData", + uberParent: "EnvironmentData", + polymorphicDiscriminator: EnvironmentData.type.polymorphicDiscriminator, + modelProperties: { + ...EnvironmentData.type.modelProperties + } + } +}; + export const CefSolutionProperties: coreClient.CompositeMapper = { type: { name: "Composite", @@ -8153,6 +9491,120 @@ export const AadSolutionProperties: coreClient.CompositeMapper = { } }; +export const AwsOrganizationalDataMaster: coreClient.CompositeMapper = { + serializedName: "Organization", + type: { + name: "Composite", + className: "AwsOrganizationalDataMaster", + uberParent: "AwsOrganizationalData", + polymorphicDiscriminator: + AwsOrganizationalData.type.polymorphicDiscriminator, + modelProperties: { + ...AwsOrganizationalData.type.modelProperties, + stacksetName: { + serializedName: "stacksetName", + type: { + name: "String" + } + }, + excludedAccountIds: { + serializedName: "excludedAccountIds", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const AwsOrganizationalDataMember: coreClient.CompositeMapper = { + serializedName: "Member", + type: { + name: "Composite", + className: "AwsOrganizationalDataMember", + uberParent: "AwsOrganizationalData", + polymorphicDiscriminator: + AwsOrganizationalData.type.polymorphicDiscriminator, + modelProperties: { + ...AwsOrganizationalData.type.modelProperties, + parentHierarchyId: { + serializedName: "parentHierarchyId", + type: { + name: "String" + } + } + } + } +}; + +export const GcpOrganizationalDataOrganization: coreClient.CompositeMapper = { + serializedName: "Organization", + type: { + name: "Composite", + className: "GcpOrganizationalDataOrganization", + uberParent: "GcpOrganizationalData", + polymorphicDiscriminator: + GcpOrganizationalData.type.polymorphicDiscriminator, + modelProperties: { + ...GcpOrganizationalData.type.modelProperties, + excludedProjectNumbers: { + serializedName: "excludedProjectNumbers", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + serviceAccountEmailAddress: { + serializedName: "serviceAccountEmailAddress", + type: { + name: "String" + } + }, + workloadIdentityProviderId: { + serializedName: "workloadIdentityProviderId", + type: { + name: "String" + } + } + } + } +}; + +export const GcpOrganizationalDataMember: coreClient.CompositeMapper = { + serializedName: "Member", + type: { + name: "Composite", + className: "GcpOrganizationalDataMember", + uberParent: "GcpOrganizationalData", + polymorphicDiscriminator: + GcpOrganizationalData.type.polymorphicDiscriminator, + modelProperties: { + ...GcpOrganizationalData.type.modelProperties, + parentHierarchyId: { + serializedName: "parentHierarchyId", + type: { + name: "String" + } + }, + managementProjectNumber: { + serializedName: "managementProjectNumber", + type: { + name: "String" + } + } + } + } +}; + export const Automation: coreClient.CompositeMapper = { type: { name: "Composite", @@ -8230,8 +9682,15 @@ export const SecurityConnector: coreClient.CompositeMapper = { name: "String" } }, - cloudName: { - serializedName: "properties.cloudName", + hierarchyIdentifierTrialEndDate: { + serializedName: "properties.hierarchyIdentifierTrialEndDate", + readOnly: true, + type: { + name: "DateTime" + } + }, + environmentName: { + serializedName: "properties.environmentName", type: { name: "String" } @@ -8248,11 +9707,11 @@ export const SecurityConnector: coreClient.CompositeMapper = { } } }, - organizationalData: { - serializedName: "properties.organizationalData", + environmentData: { + serializedName: "properties.environmentData", type: { name: "Composite", - className: "SecurityConnectorPropertiesOrganizationalData" + className: "EnvironmentData" } } } @@ -8720,6 +10179,66 @@ export const ProcessNotAllowed: coreClient.CompositeMapper = { } }; +export const GovernanceRulesRuleIdExecuteSingleSubscriptionHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GovernanceRulesRuleIdExecuteSingleSubscriptionHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const GovernanceRulesRuleIdExecuteSingleSecurityConnectorHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GovernanceRulesRuleIdExecuteSingleSecurityConnectorHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const SubscriptionGovernanceRulesExecuteStatusGetHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SubscriptionGovernanceRulesExecuteStatusGetHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const SecurityConnectorGovernanceRulesExecuteStatusGetHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SecurityConnectorGovernanceRulesExecuteStatusGetHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + export let discriminators = { CustomAlertRule: CustomAlertRule, ResourceDetails: ResourceDetails, @@ -8729,6 +10248,9 @@ export let discriminators = { ResourceIdentifier: ResourceIdentifier, AlertSimulatorRequestProperties: AlertSimulatorRequestProperties, CloudOffering: CloudOffering, + EnvironmentData: EnvironmentData, + AwsOrganizationalData: AwsOrganizationalData, + GcpOrganizationalData: GcpOrganizationalData, "Resource.ExternalSecuritySolution": ExternalSecuritySolution, "Resource.Setting": Setting, "CustomAlertRule.ThresholdCustomAlertRule": ThresholdCustomAlertRule, @@ -8750,7 +10272,22 @@ export let discriminators = { "CloudOffering.CspmMonitorAws": CspmMonitorAwsOffering, "CloudOffering.DefenderForContainersAws": DefenderForContainersAwsOffering, "CloudOffering.DefenderForServersAws": DefenderForServersAwsOffering, + "CloudOffering.DefenderForDatabasesAws": DefenderFoDatabasesAwsOffering, "CloudOffering.InformationProtectionAws": InformationProtectionAwsOffering, + "CloudOffering.CspmMonitorGcp": CspmMonitorGcpOffering, + "CloudOffering.DefenderForServersGcp": DefenderForServersGcpOffering, + "CloudOffering.DefenderForDatabasesGcp": DefenderForDatabasesGcpOffering, + "CloudOffering.DefenderForContainersGcp": DefenderForContainersGcpOffering, + "CloudOffering.CspmMonitorGithub": CspmMonitorGithubOffering, + "CloudOffering.CspmMonitorAzureDevOps": CspmMonitorAzureDevOpsOffering, + "EnvironmentData.AwsAccount": AWSEnvironmentData, + "EnvironmentData.GcpProject": GcpProjectEnvironmentData, + "EnvironmentData.GithubScope": GithubScopeEnvironmentData, + "EnvironmentData.AzureDevOpsScope": AzureDevOpsScopeEnvironmentData, + "AwsOrganizationalData.Organization": AwsOrganizationalDataMaster, + "AwsOrganizationalData.Member": AwsOrganizationalDataMember, + "GcpOrganizationalData.Organization": GcpOrganizationalDataOrganization, + "GcpOrganizationalData.Member": GcpOrganizationalDataMember, "Resource.CEF": CefExternalSecuritySolution, "Resource.ATA": AtaExternalSecuritySolution, "Resource.AAD": AadExternalSecuritySolution, diff --git a/sdk/security/arm-security/src/models/parameters.ts b/sdk/security/arm-security/src/models/parameters.ts index 1ca7f7480b44..d7dc5a657c85 100644 --- a/sdk/security/arm-security/src/models/parameters.ts +++ b/sdk/security/arm-security/src/models/parameters.ts @@ -37,7 +37,11 @@ import { AlertSimulatorRequestBody as AlertSimulatorRequestBodyMapper, Setting as SettingMapper, IngestionSetting as IngestionSettingMapper, - SecurityConnector as SecurityConnectorMapper + SecurityConnector as SecurityConnectorMapper, + GovernanceRule as GovernanceRuleMapper, + ExecuteGovernanceRuleParams as ExecuteGovernanceRuleParamsMapper, + GovernanceAssignment as GovernanceAssignmentMapper, + Application as ApplicationMapper } from "../models/mappers"; export const accept: OperationParameter = { @@ -1010,7 +1014,7 @@ export const alertSimulatorRequestBody: OperationParameter = { export const apiVersion14: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2021-07-01", + defaultValue: "2022-05-01", isConstant: true, serializedName: "api-version", type: { @@ -1086,6 +1090,18 @@ export const softwareName: OperationURLParameter = { } }; +export const apiVersion17: OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + defaultValue: "2022-05-01-preview", + isConstant: true, + serializedName: "api-version", + type: { + name: "String" + } + } +}; + export const securityConnectorName: OperationURLParameter = { parameterPath: "securityConnectorName", mapper: { @@ -1101,3 +1117,80 @@ export const securityConnector: OperationParameter = { parameterPath: "securityConnector", mapper: SecurityConnectorMapper }; + +export const apiVersion18: OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + defaultValue: "2022-01-01-preview", + isConstant: true, + serializedName: "api-version", + type: { + name: "String" + } + } +}; + +export const governanceRule: OperationParameter = { + parameterPath: "governanceRule", + mapper: GovernanceRuleMapper +}; + +export const executeGovernanceRuleParams: OperationParameter = { + parameterPath: ["options", "executeGovernanceRuleParams"], + mapper: ExecuteGovernanceRuleParamsMapper +}; + +export const operationId: OperationURLParameter = { + parameterPath: "operationId", + mapper: { + serializedName: "operationId", + required: true, + type: { + name: "String" + } + } +}; + +export const assignmentKey: OperationURLParameter = { + parameterPath: "assignmentKey", + mapper: { + serializedName: "assignmentKey", + required: true, + type: { + name: "String" + } + } +}; + +export const governanceAssignment: OperationParameter = { + parameterPath: "governanceAssignment", + mapper: GovernanceAssignmentMapper +}; + +export const apiVersion19: OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + defaultValue: "2022-07-01-preview", + isConstant: true, + serializedName: "api-version", + type: { + name: "String" + } + } +}; + +export const applicationId: OperationURLParameter = { + parameterPath: "applicationId", + mapper: { + serializedName: "applicationId", + required: true, + type: { + name: "String" + } + } +}; + +export const application: OperationParameter = { + parameterPath: "application", + mapper: ApplicationMapper +}; diff --git a/sdk/security/arm-security/src/operations/applicationOperations.ts b/sdk/security/arm-security/src/operations/applicationOperations.ts new file mode 100644 index 000000000000..c0ae8b3ec051 --- /dev/null +++ b/sdk/security/arm-security/src/operations/applicationOperations.ts @@ -0,0 +1,144 @@ +/* + * 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 { ApplicationOperations } 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 { + ApplicationGetOptionalParams, + ApplicationGetResponse, + Application, + ApplicationCreateOrUpdateOptionalParams, + ApplicationCreateOrUpdateResponse, + ApplicationDeleteOptionalParams +} from "../models"; + +/** Class containing ApplicationOperations operations. */ +export class ApplicationOperationsImpl implements ApplicationOperations { + private readonly client: SecurityCenter; + + /** + * Initialize a new instance of the class ApplicationOperations class. + * @param client Reference to the service client + */ + constructor(client: SecurityCenter) { + this.client = client; + } + + /** + * Get a specific application for the requested scope by applicationId + * @param applicationId The security Application key - unique key for the standard application + * @param options The options parameters. + */ + get( + applicationId: string, + options?: ApplicationGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { applicationId, options }, + getOperationSpec + ); + } + + /** + * Creates or update a security application on the given subscription. + * @param applicationId The security Application key - unique key for the standard application + * @param application Application over a subscription scope + * @param options The options parameters. + */ + createOrUpdate( + applicationId: string, + application: Application, + options?: ApplicationCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { applicationId, application, options }, + createOrUpdateOperationSpec + ); + } + + /** + * Delete an Application over a given scope + * @param applicationId The security Application key - unique key for the standard application + * @param options The options parameters. + */ + delete( + applicationId: string, + options?: ApplicationDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { applicationId, options }, + deleteOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.Security/applications/{applicationId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.Application + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion19], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.applicationId + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.Security/applications/{applicationId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.Application + }, + 201: { + bodyMapper: Mappers.Application + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + requestBody: Parameters.application, + queryParameters: [Parameters.apiVersion19], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.applicationId + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.Security/applications/{applicationId}", + httpMethod: "DELETE", + responses: { 200: {}, 204: {}, default: {} }, + queryParameters: [Parameters.apiVersion19], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.applicationId + ], + serializer +}; diff --git a/sdk/security/arm-security/src/operations/applications.ts b/sdk/security/arm-security/src/operations/applications.ts new file mode 100644 index 000000000000..10bb96e03553 --- /dev/null +++ b/sdk/security/arm-security/src/operations/applications.ts @@ -0,0 +1,142 @@ +/* + * 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 { Applications } 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 { + Application, + ApplicationsListNextOptionalParams, + ApplicationsListOptionalParams, + ApplicationsListResponse, + ApplicationsListNextResponse +} from "../models"; + +/// +/** Class containing Applications operations. */ +export class ApplicationsImpl implements Applications { + private readonly client: SecurityCenter; + + /** + * Initialize a new instance of the class Applications class. + * @param client Reference to the service client + */ + constructor(client: SecurityCenter) { + this.client = client; + } + + /** + * Get a list of all relevant applications over a subscription level scope + * @param options The options parameters. + */ + public list( + options?: ApplicationsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(options); + } + }; + } + + private async *listPagingPage( + options?: ApplicationsListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext(continuationToken, options); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listPagingAll( + options?: ApplicationsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(options)) { + yield* page; + } + } + + /** + * Get a list of all relevant applications over a subscription level scope + * @param options The options parameters. + */ + private _list( + options?: ApplicationsListOptionalParams + ): Promise { + return this.client.sendOperationRequest({ options }, listOperationSpec); + } + + /** + * ListNext + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + nextLink: string, + options?: ApplicationsListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.Security/applications", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ApplicationsList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion19], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ApplicationsList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion19], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/security/arm-security/src/operations/governanceAssignments.ts b/sdk/security/arm-security/src/operations/governanceAssignments.ts new file mode 100644 index 000000000000..06bf4668034d --- /dev/null +++ b/sdk/security/arm-security/src/operations/governanceAssignments.ts @@ -0,0 +1,317 @@ +/* + * 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 { GovernanceAssignments } 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 { + GovernanceAssignment, + GovernanceAssignmentsListNextOptionalParams, + GovernanceAssignmentsListOptionalParams, + GovernanceAssignmentsListResponse, + GovernanceAssignmentsGetOptionalParams, + GovernanceAssignmentsGetResponse, + GovernanceAssignmentsCreateOrUpdateOptionalParams, + GovernanceAssignmentsCreateOrUpdateResponse, + GovernanceAssignmentsDeleteOptionalParams, + GovernanceAssignmentsListNextResponse +} from "../models"; + +/// +/** Class containing GovernanceAssignments operations. */ +export class GovernanceAssignmentsImpl implements GovernanceAssignments { + private readonly client: SecurityCenter; + + /** + * Initialize a new instance of the class GovernanceAssignments class. + * @param client Reference to the service client + */ + constructor(client: SecurityCenter) { + this.client = client; + } + + /** + * Get security governanceAssignments on all your resources inside a scope + * @param scope Scope of the query, can be subscription + * (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group + * (/providers/Microsoft.Management/managementGroups/mgName). + * @param assessmentName The Assessment Key - Unique key for the assessment type + * @param options The options parameters. + */ + public list( + scope: string, + assessmentName: string, + options?: GovernanceAssignmentsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(scope, assessmentName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(scope, assessmentName, options); + } + }; + } + + private async *listPagingPage( + scope: string, + assessmentName: string, + options?: GovernanceAssignmentsListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(scope, assessmentName, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext( + scope, + assessmentName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listPagingAll( + scope: string, + assessmentName: string, + options?: GovernanceAssignmentsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + scope, + assessmentName, + options + )) { + yield* page; + } + } + + /** + * Get security governanceAssignments on all your resources inside a scope + * @param scope Scope of the query, can be subscription + * (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group + * (/providers/Microsoft.Management/managementGroups/mgName). + * @param assessmentName The Assessment Key - Unique key for the assessment type + * @param options The options parameters. + */ + private _list( + scope: string, + assessmentName: string, + options?: GovernanceAssignmentsListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { scope, assessmentName, options }, + listOperationSpec + ); + } + + /** + * Get a specific governanceAssignment for the requested scope by AssignmentKey + * @param scope Scope of the query, can be subscription + * (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group + * (/providers/Microsoft.Management/managementGroups/mgName). + * @param assessmentName The Assessment Key - Unique key for the assessment type + * @param assignmentKey The security governance assignment key - the assessment key of the required + * governance assignment + * @param options The options parameters. + */ + get( + scope: string, + assessmentName: string, + assignmentKey: string, + options?: GovernanceAssignmentsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { scope, assessmentName, assignmentKey, options }, + getOperationSpec + ); + } + + /** + * Creates or update a security GovernanceAssignment on the given subscription. + * @param scope Scope of the query, can be subscription + * (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group + * (/providers/Microsoft.Management/managementGroups/mgName). + * @param assessmentName The Assessment Key - Unique key for the assessment type + * @param assignmentKey The security governance assignment key - the assessment key of the required + * governance assignment + * @param governanceAssignment GovernanceAssignment over a subscription scope + * @param options The options parameters. + */ + createOrUpdate( + scope: string, + assessmentName: string, + assignmentKey: string, + governanceAssignment: GovernanceAssignment, + options?: GovernanceAssignmentsCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { scope, assessmentName, assignmentKey, governanceAssignment, options }, + createOrUpdateOperationSpec + ); + } + + /** + * Delete a GovernanceAssignment over a given scope + * @param scope Scope of the query, can be subscription + * (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group + * (/providers/Microsoft.Management/managementGroups/mgName). + * @param assessmentName The Assessment Key - Unique key for the assessment type + * @param assignmentKey The security governance assignment key - the assessment key of the required + * governance assignment + * @param options The options parameters. + */ + delete( + scope: string, + assessmentName: string, + assignmentKey: string, + options?: GovernanceAssignmentsDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { scope, assessmentName, assignmentKey, options }, + deleteOperationSpec + ); + } + + /** + * ListNext + * @param scope Scope of the query, can be subscription + * (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group + * (/providers/Microsoft.Management/managementGroups/mgName). + * @param assessmentName The Assessment Key - Unique key for the assessment type + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + scope: string, + assessmentName: string, + nextLink: string, + options?: GovernanceAssignmentsListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { scope, assessmentName, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/{scope}/providers/Microsoft.Security/assessments/{assessmentName}/governanceAssignments", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GovernanceAssignmentsList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion18], + urlParameters: [ + Parameters.$host, + Parameters.scope, + Parameters.assessmentName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/{scope}/providers/Microsoft.Security/assessments/{assessmentName}/governanceAssignments/{assignmentKey}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GovernanceAssignment + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion18], + urlParameters: [ + Parameters.$host, + Parameters.scope, + Parameters.assessmentName, + Parameters.assignmentKey + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/{scope}/providers/Microsoft.Security/assessments/{assessmentName}/governanceAssignments/{assignmentKey}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.GovernanceAssignment + }, + 201: { + bodyMapper: Mappers.GovernanceAssignment + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + requestBody: Parameters.governanceAssignment, + queryParameters: [Parameters.apiVersion18], + urlParameters: [ + Parameters.$host, + Parameters.scope, + Parameters.assessmentName, + Parameters.assignmentKey + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/{scope}/providers/Microsoft.Security/assessments/{assessmentName}/governanceAssignments/{assignmentKey}", + httpMethod: "DELETE", + responses: { 200: {}, 204: {}, default: {} }, + queryParameters: [Parameters.apiVersion18], + urlParameters: [ + Parameters.$host, + Parameters.scope, + Parameters.assessmentName, + Parameters.assignmentKey + ], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GovernanceAssignmentsList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion18], + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.scope, + Parameters.assessmentName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/security/arm-security/src/operations/governanceRuleOperations.ts b/sdk/security/arm-security/src/operations/governanceRuleOperations.ts new file mode 100644 index 000000000000..ab0eb8f0474b --- /dev/null +++ b/sdk/security/arm-security/src/operations/governanceRuleOperations.ts @@ -0,0 +1,142 @@ +/* + * 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 { GovernanceRuleOperations } 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 { + GovernanceRule, + GovernanceRuleListNextOptionalParams, + GovernanceRuleListOptionalParams, + GovernanceRuleListResponse, + GovernanceRuleListNextResponse +} from "../models"; + +/// +/** Class containing GovernanceRuleOperations operations. */ +export class GovernanceRuleOperationsImpl implements GovernanceRuleOperations { + private readonly client: SecurityCenter; + + /** + * Initialize a new instance of the class GovernanceRuleOperations class. + * @param client Reference to the service client + */ + constructor(client: SecurityCenter) { + this.client = client; + } + + /** + * Get a list of all relevant governanceRules over a subscription level scope + * @param options The options parameters. + */ + public list( + options?: GovernanceRuleListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(options); + } + }; + } + + private async *listPagingPage( + options?: GovernanceRuleListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext(continuationToken, options); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listPagingAll( + options?: GovernanceRuleListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(options)) { + yield* page; + } + } + + /** + * Get a list of all relevant governanceRules over a subscription level scope + * @param options The options parameters. + */ + private _list( + options?: GovernanceRuleListOptionalParams + ): Promise { + return this.client.sendOperationRequest({ options }, listOperationSpec); + } + + /** + * ListNext + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + nextLink: string, + options?: GovernanceRuleListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.Security/governanceRules", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GovernanceRuleList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion18], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GovernanceRuleList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion18], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/security/arm-security/src/operations/governanceRules.ts b/sdk/security/arm-security/src/operations/governanceRules.ts new file mode 100644 index 000000000000..ddba6a77af68 --- /dev/null +++ b/sdk/security/arm-security/src/operations/governanceRules.ts @@ -0,0 +1,404 @@ +/* + * 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 { GovernanceRules } 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 { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + GovernanceRulesGetOptionalParams, + GovernanceRulesGetResponse, + GovernanceRule, + GovernanceRulesCreateOrUpdateOptionalParams, + GovernanceRulesCreateOrUpdateResponse, + GovernanceRulesDeleteOptionalParams, + GovernanceRulesRuleIdExecuteSingleSubscriptionOptionalParams, + GovernanceRulesRuleIdExecuteSingleSubscriptionResponse, + GovernanceRulesRuleIdExecuteSingleSecurityConnectorOptionalParams, + GovernanceRulesRuleIdExecuteSingleSecurityConnectorResponse +} from "../models"; + +/** Class containing GovernanceRules operations. */ +export class GovernanceRulesImpl implements GovernanceRules { + private readonly client: SecurityCenter; + + /** + * Initialize a new instance of the class GovernanceRules class. + * @param client Reference to the service client + */ + constructor(client: SecurityCenter) { + this.client = client; + } + + /** + * Get a specific governanceRule for the requested scope by ruleId + * @param ruleId The security GovernanceRule key - unique key for the standard GovernanceRule + * @param options The options parameters. + */ + get( + ruleId: string, + options?: GovernanceRulesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { ruleId, options }, + getOperationSpec + ); + } + + /** + * Creates or update a security GovernanceRule on the given subscription. + * @param ruleId The security GovernanceRule key - unique key for the standard GovernanceRule + * @param governanceRule GovernanceRule over a subscription scope + * @param options The options parameters. + */ + createOrUpdate( + ruleId: string, + governanceRule: GovernanceRule, + options?: GovernanceRulesCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { ruleId, governanceRule, options }, + createOrUpdateOperationSpec + ); + } + + /** + * Delete a GovernanceRule over a given scope + * @param ruleId The security GovernanceRule key - unique key for the standard GovernanceRule + * @param options The options parameters. + */ + delete( + ruleId: string, + options?: GovernanceRulesDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { ruleId, options }, + deleteOperationSpec + ); + } + + /** + * Execute a security GovernanceRule on the given subscription. + * @param ruleId The security GovernanceRule key - unique key for the standard GovernanceRule + * @param options The options parameters. + */ + async beginRuleIdExecuteSingleSubscription( + ruleId: string, + options?: GovernanceRulesRuleIdExecuteSingleSubscriptionOptionalParams + ): Promise< + PollerLike< + PollOperationState< + GovernanceRulesRuleIdExecuteSingleSubscriptionResponse + >, + GovernanceRulesRuleIdExecuteSingleSubscriptionResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { ruleId, options }, + ruleIdExecuteSingleSubscriptionOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * Execute a security GovernanceRule on the given subscription. + * @param ruleId The security GovernanceRule key - unique key for the standard GovernanceRule + * @param options The options parameters. + */ + async beginRuleIdExecuteSingleSubscriptionAndWait( + ruleId: string, + options?: GovernanceRulesRuleIdExecuteSingleSubscriptionOptionalParams + ): Promise { + const poller = await this.beginRuleIdExecuteSingleSubscription( + ruleId, + options + ); + return poller.pollUntilDone(); + } + + /** + * Execute a security GovernanceRule on the given security connector. + * @param resourceGroupName The name of the resource group within the user's subscription. The name is + * case insensitive. + * @param securityConnectorName The security connector name. + * @param ruleId The security GovernanceRule key - unique key for the standard GovernanceRule + * @param options The options parameters. + */ + async beginRuleIdExecuteSingleSecurityConnector( + resourceGroupName: string, + securityConnectorName: string, + ruleId: string, + options?: GovernanceRulesRuleIdExecuteSingleSecurityConnectorOptionalParams + ): Promise< + PollerLike< + PollOperationState< + GovernanceRulesRuleIdExecuteSingleSecurityConnectorResponse + >, + GovernanceRulesRuleIdExecuteSingleSecurityConnectorResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, securityConnectorName, ruleId, options }, + ruleIdExecuteSingleSecurityConnectorOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * Execute a security GovernanceRule on the given security connector. + * @param resourceGroupName The name of the resource group within the user's subscription. The name is + * case insensitive. + * @param securityConnectorName The security connector name. + * @param ruleId The security GovernanceRule key - unique key for the standard GovernanceRule + * @param options The options parameters. + */ + async beginRuleIdExecuteSingleSecurityConnectorAndWait( + resourceGroupName: string, + securityConnectorName: string, + ruleId: string, + options?: GovernanceRulesRuleIdExecuteSingleSecurityConnectorOptionalParams + ): Promise { + const poller = await this.beginRuleIdExecuteSingleSecurityConnector( + resourceGroupName, + securityConnectorName, + ruleId, + options + ); + return poller.pollUntilDone(); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.Security/governanceRules/{ruleId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GovernanceRule + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion18], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.ruleId + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.Security/governanceRules/{ruleId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.GovernanceRule + }, + 201: { + bodyMapper: Mappers.GovernanceRule + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + requestBody: Parameters.governanceRule, + queryParameters: [Parameters.apiVersion18], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.ruleId + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.Security/governanceRules/{ruleId}", + httpMethod: "DELETE", + responses: { 200: {}, 204: {}, default: {} }, + queryParameters: [Parameters.apiVersion18], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.ruleId + ], + serializer +}; +const ruleIdExecuteSingleSubscriptionOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.Security/governanceRules/{ruleId}/execute", + httpMethod: "POST", + responses: { + 200: { + headersMapper: + Mappers.GovernanceRulesRuleIdExecuteSingleSubscriptionHeaders + }, + 201: { + headersMapper: + Mappers.GovernanceRulesRuleIdExecuteSingleSubscriptionHeaders + }, + 202: { + headersMapper: + Mappers.GovernanceRulesRuleIdExecuteSingleSubscriptionHeaders + }, + 204: { + headersMapper: + Mappers.GovernanceRulesRuleIdExecuteSingleSubscriptionHeaders + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + requestBody: Parameters.executeGovernanceRuleParams, + queryParameters: [Parameters.apiVersion18], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.ruleId + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const ruleIdExecuteSingleSecurityConnectorOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/providers/Microsoft.Security/governanceRules/{ruleId}/execute", + httpMethod: "POST", + responses: { + 200: { + headersMapper: + Mappers.GovernanceRulesRuleIdExecuteSingleSecurityConnectorHeaders + }, + 201: { + headersMapper: + Mappers.GovernanceRulesRuleIdExecuteSingleSecurityConnectorHeaders + }, + 202: { + headersMapper: + Mappers.GovernanceRulesRuleIdExecuteSingleSecurityConnectorHeaders + }, + 204: { + headersMapper: + Mappers.GovernanceRulesRuleIdExecuteSingleSecurityConnectorHeaders + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + requestBody: Parameters.executeGovernanceRuleParams, + queryParameters: [Parameters.apiVersion18], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.ruleId, + Parameters.securityConnectorName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; diff --git a/sdk/security/arm-security/src/operations/index.ts b/sdk/security/arm-security/src/operations/index.ts index 31c23d8c1c95..1435bfc9d6ce 100644 --- a/sdk/security/arm-security/src/operations/index.ts +++ b/sdk/security/arm-security/src/operations/index.ts @@ -55,3 +55,14 @@ export * from "./settings"; export * from "./ingestionSettings"; export * from "./softwareInventories"; export * from "./securityConnectors"; +export * from "./governanceRuleOperations"; +export * from "./governanceRules"; +export * from "./securityConnectorGovernanceRule"; +export * from "./securityConnectorGovernanceRules"; +export * from "./subscriptionGovernanceRulesExecuteStatus"; +export * from "./securityConnectorGovernanceRulesExecuteStatus"; +export * from "./governanceAssignments"; +export * from "./applications"; +export * from "./applicationOperations"; +export * from "./securityConnectorApplications"; +export * from "./securityConnectorApplication"; diff --git a/sdk/security/arm-security/src/operations/pricings.ts b/sdk/security/arm-security/src/operations/pricings.ts index a89af1e257a5..9957b4ce9fdd 100644 --- a/sdk/security/arm-security/src/operations/pricings.ts +++ b/sdk/security/arm-security/src/operations/pricings.ts @@ -34,7 +34,7 @@ export class PricingsImpl implements Pricings { } /** - * Lists Security Center pricing configurations in the subscription. + * Lists Microsoft Defender for Cloud pricing configurations in the subscription. * @param options The options parameters. */ list(options?: PricingsListOptionalParams): Promise { @@ -42,7 +42,7 @@ export class PricingsImpl implements Pricings { } /** - * Gets a provided Security Center pricing configuration in the subscription. + * Gets a provided Microsoft Defender for Cloud pricing configuration in the subscription. * @param pricingName name of the pricing configuration * @param options The options parameters. */ @@ -57,7 +57,7 @@ export class PricingsImpl implements Pricings { } /** - * Updates a provided Security Center pricing configuration in the subscription. + * Updates a provided Microsoft Defender for Cloud pricing configuration in the subscription. * @param pricingName name of the pricing configuration * @param pricing Pricing object * @param options The options parameters. diff --git a/sdk/security/arm-security/src/operations/secureScores.ts b/sdk/security/arm-security/src/operations/secureScores.ts index bd34e4e27c61..017754ad8b3d 100644 --- a/sdk/security/arm-security/src/operations/secureScores.ts +++ b/sdk/security/arm-security/src/operations/secureScores.ts @@ -36,7 +36,7 @@ export class SecureScoresImpl implements SecureScores { } /** - * List secure scores for all your Security Center initiatives within your current scope. + * List secure scores for all your Microsoft Defender for Cloud initiatives within your current scope. * @param options The options parameters. */ public list( @@ -78,7 +78,7 @@ export class SecureScoresImpl implements SecureScores { } /** - * List secure scores for all your Security Center initiatives within your current scope. + * List secure scores for all your Microsoft Defender for Cloud initiatives within your current scope. * @param options The options parameters. */ private _list( @@ -88,8 +88,8 @@ export class SecureScoresImpl implements SecureScores { } /** - * Get secure score for a specific Security Center initiative within your current scope. For the ASC - * Default initiative, use 'ascScore'. + * Get secure score for a specific Microsoft Defender for Cloud initiative within your current scope. + * For the ASC Default initiative, use 'ascScore'. * @param secureScoreName The initiative name. For the ASC Default initiative, use 'ascScore' as in the * sample request below. * @param options The options parameters. diff --git a/sdk/security/arm-security/src/operations/securityConnectorApplication.ts b/sdk/security/arm-security/src/operations/securityConnectorApplication.ts new file mode 100644 index 000000000000..d409d1fa7bf5 --- /dev/null +++ b/sdk/security/arm-security/src/operations/securityConnectorApplication.ts @@ -0,0 +1,172 @@ +/* + * 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 { SecurityConnectorApplication } 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 { + SecurityConnectorApplicationGetOptionalParams, + SecurityConnectorApplicationGetResponse, + Application, + SecurityConnectorApplicationCreateOrUpdateOptionalParams, + SecurityConnectorApplicationCreateOrUpdateResponse, + SecurityConnectorApplicationDeleteOptionalParams +} from "../models"; + +/** Class containing SecurityConnectorApplication operations. */ +export class SecurityConnectorApplicationImpl + implements SecurityConnectorApplication { + private readonly client: SecurityCenter; + + /** + * Initialize a new instance of the class SecurityConnectorApplication class. + * @param client Reference to the service client + */ + constructor(client: SecurityCenter) { + this.client = client; + } + + /** + * Get a specific application for the requested scope by applicationId + * @param resourceGroupName The name of the resource group within the user's subscription. The name is + * case insensitive. + * @param securityConnectorName The security connector name. + * @param applicationId The security Application key - unique key for the standard application + * @param options The options parameters. + */ + get( + resourceGroupName: string, + securityConnectorName: string, + applicationId: string, + options?: SecurityConnectorApplicationGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, securityConnectorName, applicationId, options }, + getOperationSpec + ); + } + + /** + * Creates or update a security Application on the given security connector. + * @param resourceGroupName The name of the resource group within the user's subscription. The name is + * case insensitive. + * @param securityConnectorName The security connector name. + * @param applicationId The security Application key - unique key for the standard application + * @param application Application over a subscription scope + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + securityConnectorName: string, + applicationId: string, + application: Application, + options?: SecurityConnectorApplicationCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + securityConnectorName, + applicationId, + application, + options + }, + createOrUpdateOperationSpec + ); + } + + /** + * Delete an Application over a given scope + * @param resourceGroupName The name of the resource group within the user's subscription. The name is + * case insensitive. + * @param securityConnectorName The security connector name. + * @param applicationId The security Application key - unique key for the standard application + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + securityConnectorName: string, + applicationId: string, + options?: SecurityConnectorApplicationDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, securityConnectorName, applicationId, options }, + deleteOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/providers/Microsoft.Security/applications/{applicationId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.Application + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion19], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.securityConnectorName, + Parameters.applicationId + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/providers/Microsoft.Security/applications/{applicationId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.Application + }, + 201: { + bodyMapper: Mappers.Application + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + requestBody: Parameters.application, + queryParameters: [Parameters.apiVersion19], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.securityConnectorName, + Parameters.applicationId + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/providers/Microsoft.Security/applications/{applicationId}", + httpMethod: "DELETE", + responses: { 200: {}, 204: {}, default: {} }, + queryParameters: [Parameters.apiVersion19], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.securityConnectorName, + Parameters.applicationId + ], + serializer +}; diff --git a/sdk/security/arm-security/src/operations/securityConnectorApplications.ts b/sdk/security/arm-security/src/operations/securityConnectorApplications.ts new file mode 100644 index 000000000000..7cb809b3b930 --- /dev/null +++ b/sdk/security/arm-security/src/operations/securityConnectorApplications.ts @@ -0,0 +1,193 @@ +/* + * 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 { SecurityConnectorApplications } 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 { + Application, + SecurityConnectorApplicationsListNextOptionalParams, + SecurityConnectorApplicationsListOptionalParams, + SecurityConnectorApplicationsListResponse, + SecurityConnectorApplicationsListNextResponse +} from "../models"; + +/// +/** Class containing SecurityConnectorApplications operations. */ +export class SecurityConnectorApplicationsImpl + implements SecurityConnectorApplications { + private readonly client: SecurityCenter; + + /** + * Initialize a new instance of the class SecurityConnectorApplications class. + * @param client Reference to the service client + */ + constructor(client: SecurityCenter) { + this.client = client; + } + + /** + * Get a list of all relevant applications over a security connector level scope + * @param resourceGroupName The name of the resource group within the user's subscription. The name is + * case insensitive. + * @param securityConnectorName The security connector name. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + securityConnectorName: string, + options?: SecurityConnectorApplicationsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + securityConnectorName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage( + resourceGroupName, + securityConnectorName, + options + ); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + securityConnectorName: string, + options?: SecurityConnectorApplicationsListOptionalParams + ): AsyncIterableIterator { + let result = await this._list( + resourceGroupName, + securityConnectorName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + securityConnectorName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listPagingAll( + resourceGroupName: string, + securityConnectorName: string, + options?: SecurityConnectorApplicationsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + securityConnectorName, + options + )) { + yield* page; + } + } + + /** + * Get a list of all relevant applications over a security connector level scope + * @param resourceGroupName The name of the resource group within the user's subscription. The name is + * case insensitive. + * @param securityConnectorName The security connector name. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + securityConnectorName: string, + options?: SecurityConnectorApplicationsListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, securityConnectorName, options }, + listOperationSpec + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group within the user's subscription. The name is + * case insensitive. + * @param securityConnectorName The security connector name. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + securityConnectorName: string, + nextLink: string, + options?: SecurityConnectorApplicationsListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, securityConnectorName, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/providers/Microsoft.Security/applications", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ApplicationsList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion19], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.securityConnectorName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ApplicationsList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion19], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink, + Parameters.securityConnectorName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/security/arm-security/src/operations/securityConnectorGovernanceRule.ts b/sdk/security/arm-security/src/operations/securityConnectorGovernanceRule.ts new file mode 100644 index 000000000000..1e2993e8a11d --- /dev/null +++ b/sdk/security/arm-security/src/operations/securityConnectorGovernanceRule.ts @@ -0,0 +1,193 @@ +/* + * 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 { SecurityConnectorGovernanceRule } 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 { + GovernanceRule, + SecurityConnectorGovernanceRuleListNextOptionalParams, + SecurityConnectorGovernanceRuleListOptionalParams, + SecurityConnectorGovernanceRuleListResponse, + SecurityConnectorGovernanceRuleListNextResponse +} from "../models"; + +/// +/** Class containing SecurityConnectorGovernanceRule operations. */ +export class SecurityConnectorGovernanceRuleImpl + implements SecurityConnectorGovernanceRule { + private readonly client: SecurityCenter; + + /** + * Initialize a new instance of the class SecurityConnectorGovernanceRule class. + * @param client Reference to the service client + */ + constructor(client: SecurityCenter) { + this.client = client; + } + + /** + * Get a list of all relevant governanceRules over a security connector level scope + * @param resourceGroupName The name of the resource group within the user's subscription. The name is + * case insensitive. + * @param securityConnectorName The security connector name. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + securityConnectorName: string, + options?: SecurityConnectorGovernanceRuleListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + securityConnectorName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage( + resourceGroupName, + securityConnectorName, + options + ); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + securityConnectorName: string, + options?: SecurityConnectorGovernanceRuleListOptionalParams + ): AsyncIterableIterator { + let result = await this._list( + resourceGroupName, + securityConnectorName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + securityConnectorName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listPagingAll( + resourceGroupName: string, + securityConnectorName: string, + options?: SecurityConnectorGovernanceRuleListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + securityConnectorName, + options + )) { + yield* page; + } + } + + /** + * Get a list of all relevant governanceRules over a security connector level scope + * @param resourceGroupName The name of the resource group within the user's subscription. The name is + * case insensitive. + * @param securityConnectorName The security connector name. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + securityConnectorName: string, + options?: SecurityConnectorGovernanceRuleListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, securityConnectorName, options }, + listOperationSpec + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group within the user's subscription. The name is + * case insensitive. + * @param securityConnectorName The security connector name. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + securityConnectorName: string, + nextLink: string, + options?: SecurityConnectorGovernanceRuleListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, securityConnectorName, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/providers/Microsoft.Security/governanceRules", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GovernanceRuleList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion18], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.securityConnectorName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GovernanceRuleList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion18], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink, + Parameters.securityConnectorName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/security/arm-security/src/operations/securityConnectorGovernanceRules.ts b/sdk/security/arm-security/src/operations/securityConnectorGovernanceRules.ts new file mode 100644 index 000000000000..7496358d926b --- /dev/null +++ b/sdk/security/arm-security/src/operations/securityConnectorGovernanceRules.ts @@ -0,0 +1,172 @@ +/* + * 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 { SecurityConnectorGovernanceRules } 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 { + SecurityConnectorGovernanceRulesGetOptionalParams, + SecurityConnectorGovernanceRulesGetResponse, + GovernanceRule, + SecurityConnectorGovernanceRulesCreateOrUpdateOptionalParams, + SecurityConnectorGovernanceRulesCreateOrUpdateResponse, + SecurityConnectorGovernanceRulesDeleteOptionalParams +} from "../models"; + +/** Class containing SecurityConnectorGovernanceRules operations. */ +export class SecurityConnectorGovernanceRulesImpl + implements SecurityConnectorGovernanceRules { + private readonly client: SecurityCenter; + + /** + * Initialize a new instance of the class SecurityConnectorGovernanceRules class. + * @param client Reference to the service client + */ + constructor(client: SecurityCenter) { + this.client = client; + } + + /** + * Get a specific governanceRule for the requested scope by ruleId + * @param resourceGroupName The name of the resource group within the user's subscription. The name is + * case insensitive. + * @param securityConnectorName The security connector name. + * @param ruleId The security GovernanceRule key - unique key for the standard GovernanceRule + * @param options The options parameters. + */ + get( + resourceGroupName: string, + securityConnectorName: string, + ruleId: string, + options?: SecurityConnectorGovernanceRulesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, securityConnectorName, ruleId, options }, + getOperationSpec + ); + } + + /** + * Creates or update a security GovernanceRule on the given security connector. + * @param resourceGroupName The name of the resource group within the user's subscription. The name is + * case insensitive. + * @param securityConnectorName The security connector name. + * @param ruleId The security GovernanceRule key - unique key for the standard GovernanceRule + * @param governanceRule GovernanceRule over a subscription scope + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + securityConnectorName: string, + ruleId: string, + governanceRule: GovernanceRule, + options?: SecurityConnectorGovernanceRulesCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + securityConnectorName, + ruleId, + governanceRule, + options + }, + createOrUpdateOperationSpec + ); + } + + /** + * Delete a GovernanceRule over a given scope + * @param resourceGroupName The name of the resource group within the user's subscription. The name is + * case insensitive. + * @param securityConnectorName The security connector name. + * @param ruleId The security GovernanceRule key - unique key for the standard GovernanceRule + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + securityConnectorName: string, + ruleId: string, + options?: SecurityConnectorGovernanceRulesDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, securityConnectorName, ruleId, options }, + deleteOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/providers/Microsoft.Security/governanceRules/{ruleId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GovernanceRule + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion18], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.ruleId, + Parameters.securityConnectorName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/providers/Microsoft.Security/governanceRules/{ruleId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.GovernanceRule + }, + 201: { + bodyMapper: Mappers.GovernanceRule + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + requestBody: Parameters.governanceRule, + queryParameters: [Parameters.apiVersion18], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.ruleId, + Parameters.securityConnectorName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/providers/Microsoft.Security/governanceRules/{ruleId}", + httpMethod: "DELETE", + responses: { 200: {}, 204: {}, default: {} }, + queryParameters: [Parameters.apiVersion18], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.ruleId, + Parameters.securityConnectorName + ], + serializer +}; diff --git a/sdk/security/arm-security/src/operations/securityConnectorGovernanceRulesExecuteStatus.ts b/sdk/security/arm-security/src/operations/securityConnectorGovernanceRulesExecuteStatus.ts new file mode 100644 index 000000000000..07be6bd51c7d --- /dev/null +++ b/sdk/security/arm-security/src/operations/securityConnectorGovernanceRulesExecuteStatus.ts @@ -0,0 +1,178 @@ +/* + * 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 { SecurityConnectorGovernanceRulesExecuteStatus } 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 { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + SecurityConnectorGovernanceRulesExecuteStatusGetOptionalParams, + SecurityConnectorGovernanceRulesExecuteStatusGetResponse +} from "../models"; + +/** Class containing SecurityConnectorGovernanceRulesExecuteStatus operations. */ +export class SecurityConnectorGovernanceRulesExecuteStatusImpl + implements SecurityConnectorGovernanceRulesExecuteStatus { + private readonly client: SecurityCenter; + + /** + * Initialize a new instance of the class SecurityConnectorGovernanceRulesExecuteStatus class. + * @param client Reference to the service client + */ + constructor(client: SecurityCenter) { + this.client = client; + } + + /** + * Get a specific governanceRule execution status for the requested scope by ruleId and operationId + * @param resourceGroupName The name of the resource group within the user's subscription. The name is + * case insensitive. + * @param securityConnectorName The security connector name. + * @param ruleId The security GovernanceRule key - unique key for the standard GovernanceRule + * @param operationId The security GovernanceRule execution key - unique key for the execution of + * GovernanceRule + * @param options The options parameters. + */ + async beginGet( + resourceGroupName: string, + securityConnectorName: string, + ruleId: string, + operationId: string, + options?: SecurityConnectorGovernanceRulesExecuteStatusGetOptionalParams + ): Promise< + PollerLike< + PollOperationState< + SecurityConnectorGovernanceRulesExecuteStatusGetResponse + >, + SecurityConnectorGovernanceRulesExecuteStatusGetResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + resourceGroupName, + securityConnectorName, + ruleId, + operationId, + options + }, + getOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * Get a specific governanceRule execution status for the requested scope by ruleId and operationId + * @param resourceGroupName The name of the resource group within the user's subscription. The name is + * case insensitive. + * @param securityConnectorName The security connector name. + * @param ruleId The security GovernanceRule key - unique key for the standard GovernanceRule + * @param operationId The security GovernanceRule execution key - unique key for the execution of + * GovernanceRule + * @param options The options parameters. + */ + async beginGetAndWait( + resourceGroupName: string, + securityConnectorName: string, + ruleId: string, + operationId: string, + options?: SecurityConnectorGovernanceRulesExecuteStatusGetOptionalParams + ): Promise { + const poller = await this.beginGet( + resourceGroupName, + securityConnectorName, + ruleId, + operationId, + options + ); + return poller.pollUntilDone(); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/providers/Microsoft.Security/governanceRules/{ruleId}/operationResults/{operationId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ExecuteRuleStatus + }, + 201: { + bodyMapper: Mappers.ExecuteRuleStatus + }, + 202: { + bodyMapper: Mappers.ExecuteRuleStatus + }, + 204: { + bodyMapper: Mappers.ExecuteRuleStatus + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion18], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.ruleId, + Parameters.securityConnectorName, + Parameters.operationId + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/security/arm-security/src/operations/securityConnectors.ts b/sdk/security/arm-security/src/operations/securityConnectors.ts index 0f22159fc48a..07657b0301a6 100644 --- a/sdk/security/arm-security/src/operations/securityConnectors.ts +++ b/sdk/security/arm-security/src/operations/securityConnectors.ts @@ -295,7 +295,7 @@ const listOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion1], + queryParameters: [Parameters.apiVersion17], urlParameters: [Parameters.$host, Parameters.subscriptionId], headerParameters: [Parameters.accept], serializer @@ -312,7 +312,7 @@ const listByResourceGroupOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion1], + queryParameters: [Parameters.apiVersion17], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -333,7 +333,7 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion1], + queryParameters: [Parameters.apiVersion17], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -359,7 +359,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.securityConnector, - queryParameters: [Parameters.apiVersion1], + queryParameters: [Parameters.apiVersion17], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -383,7 +383,7 @@ const updateOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.securityConnector, - queryParameters: [Parameters.apiVersion1], + queryParameters: [Parameters.apiVersion17], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -405,7 +405,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion1], + queryParameters: [Parameters.apiVersion17], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -426,7 +426,7 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion1], + queryParameters: [Parameters.apiVersion17], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -446,7 +446,7 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion1], + queryParameters: [Parameters.apiVersion17], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/security/arm-security/src/operations/settings.ts b/sdk/security/arm-security/src/operations/settings.ts index 710b095ffea5..05fac13160e0 100644 --- a/sdk/security/arm-security/src/operations/settings.ts +++ b/sdk/security/arm-security/src/operations/settings.ts @@ -39,7 +39,7 @@ export class SettingsImpl implements Settings { } /** - * Settings about different configurations in security center + * Settings about different configurations in Microsoft Defender for Cloud * @param options The options parameters. */ public list( @@ -81,7 +81,7 @@ export class SettingsImpl implements Settings { } /** - * Settings about different configurations in security center + * Settings about different configurations in Microsoft Defender for Cloud * @param options The options parameters. */ private _list( @@ -91,7 +91,7 @@ export class SettingsImpl implements Settings { } /** - * Settings of different configurations in security center + * Settings of different configurations in Microsoft Defender for Cloud * @param settingName The name of the setting * @param options The options parameters. */ @@ -106,7 +106,7 @@ export class SettingsImpl implements Settings { } /** - * updating settings about different configurations in security center + * updating settings about different configurations in Microsoft Defender for Cloud * @param settingName The name of the setting * @param setting Setting object * @param options The options parameters. diff --git a/sdk/security/arm-security/src/operations/subscriptionGovernanceRulesExecuteStatus.ts b/sdk/security/arm-security/src/operations/subscriptionGovernanceRulesExecuteStatus.ts new file mode 100644 index 000000000000..5a7947e2a89d --- /dev/null +++ b/sdk/security/arm-security/src/operations/subscriptionGovernanceRulesExecuteStatus.ts @@ -0,0 +1,152 @@ +/* + * 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 { SubscriptionGovernanceRulesExecuteStatus } 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 { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + SubscriptionGovernanceRulesExecuteStatusGetOptionalParams, + SubscriptionGovernanceRulesExecuteStatusGetResponse +} from "../models"; + +/** Class containing SubscriptionGovernanceRulesExecuteStatus operations. */ +export class SubscriptionGovernanceRulesExecuteStatusImpl + implements SubscriptionGovernanceRulesExecuteStatus { + private readonly client: SecurityCenter; + + /** + * Initialize a new instance of the class SubscriptionGovernanceRulesExecuteStatus class. + * @param client Reference to the service client + */ + constructor(client: SecurityCenter) { + this.client = client; + } + + /** + * Get a specific governanceRule execution status for the requested scope by ruleId and operationId + * @param ruleId The security GovernanceRule key - unique key for the standard GovernanceRule + * @param operationId The security GovernanceRule execution key - unique key for the execution of + * GovernanceRule + * @param options The options parameters. + */ + async beginGet( + ruleId: string, + operationId: string, + options?: SubscriptionGovernanceRulesExecuteStatusGetOptionalParams + ): Promise< + PollerLike< + PollOperationState, + SubscriptionGovernanceRulesExecuteStatusGetResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { ruleId, operationId, options }, + getOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * Get a specific governanceRule execution status for the requested scope by ruleId and operationId + * @param ruleId The security GovernanceRule key - unique key for the standard GovernanceRule + * @param operationId The security GovernanceRule execution key - unique key for the execution of + * GovernanceRule + * @param options The options parameters. + */ + async beginGetAndWait( + ruleId: string, + operationId: string, + options?: SubscriptionGovernanceRulesExecuteStatusGetOptionalParams + ): Promise { + const poller = await this.beginGet(ruleId, operationId, options); + return poller.pollUntilDone(); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.Security/governanceRules/{ruleId}/operationResults/{operationId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ExecuteRuleStatus + }, + 201: { + bodyMapper: Mappers.ExecuteRuleStatus + }, + 202: { + bodyMapper: Mappers.ExecuteRuleStatus + }, + 204: { + bodyMapper: Mappers.ExecuteRuleStatus + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion18], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.ruleId, + Parameters.operationId + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/security/arm-security/src/operationsInterfaces/applicationOperations.ts b/sdk/security/arm-security/src/operationsInterfaces/applicationOperations.ts new file mode 100644 index 000000000000..6b0189486fbe --- /dev/null +++ b/sdk/security/arm-security/src/operationsInterfaces/applicationOperations.ts @@ -0,0 +1,49 @@ +/* + * 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 { + ApplicationGetOptionalParams, + ApplicationGetResponse, + Application, + ApplicationCreateOrUpdateOptionalParams, + ApplicationCreateOrUpdateResponse, + ApplicationDeleteOptionalParams +} from "../models"; + +/** Interface representing a ApplicationOperations. */ +export interface ApplicationOperations { + /** + * Get a specific application for the requested scope by applicationId + * @param applicationId The security Application key - unique key for the standard application + * @param options The options parameters. + */ + get( + applicationId: string, + options?: ApplicationGetOptionalParams + ): Promise; + /** + * Creates or update a security application on the given subscription. + * @param applicationId The security Application key - unique key for the standard application + * @param application Application over a subscription scope + * @param options The options parameters. + */ + createOrUpdate( + applicationId: string, + application: Application, + options?: ApplicationCreateOrUpdateOptionalParams + ): Promise; + /** + * Delete an Application over a given scope + * @param applicationId The security Application key - unique key for the standard application + * @param options The options parameters. + */ + delete( + applicationId: string, + options?: ApplicationDeleteOptionalParams + ): Promise; +} diff --git a/sdk/security/arm-security/src/operationsInterfaces/applications.ts b/sdk/security/arm-security/src/operationsInterfaces/applications.ts new file mode 100644 index 000000000000..93668c40f92c --- /dev/null +++ b/sdk/security/arm-security/src/operationsInterfaces/applications.ts @@ -0,0 +1,22 @@ +/* + * 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 { Application, ApplicationsListOptionalParams } from "../models"; + +/// +/** Interface representing a Applications. */ +export interface Applications { + /** + * Get a list of all relevant applications over a subscription level scope + * @param options The options parameters. + */ + list( + options?: ApplicationsListOptionalParams + ): PagedAsyncIterableIterator; +} diff --git a/sdk/security/arm-security/src/operationsInterfaces/governanceAssignments.ts b/sdk/security/arm-security/src/operationsInterfaces/governanceAssignments.ts new file mode 100644 index 000000000000..367898165d13 --- /dev/null +++ b/sdk/security/arm-security/src/operationsInterfaces/governanceAssignments.ts @@ -0,0 +1,86 @@ +/* + * 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 { + GovernanceAssignment, + GovernanceAssignmentsListOptionalParams, + GovernanceAssignmentsGetOptionalParams, + GovernanceAssignmentsGetResponse, + GovernanceAssignmentsCreateOrUpdateOptionalParams, + GovernanceAssignmentsCreateOrUpdateResponse, + GovernanceAssignmentsDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a GovernanceAssignments. */ +export interface GovernanceAssignments { + /** + * Get security governanceAssignments on all your resources inside a scope + * @param scope Scope of the query, can be subscription + * (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group + * (/providers/Microsoft.Management/managementGroups/mgName). + * @param assessmentName The Assessment Key - Unique key for the assessment type + * @param options The options parameters. + */ + list( + scope: string, + assessmentName: string, + options?: GovernanceAssignmentsListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get a specific governanceAssignment for the requested scope by AssignmentKey + * @param scope Scope of the query, can be subscription + * (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group + * (/providers/Microsoft.Management/managementGroups/mgName). + * @param assessmentName The Assessment Key - Unique key for the assessment type + * @param assignmentKey The security governance assignment key - the assessment key of the required + * governance assignment + * @param options The options parameters. + */ + get( + scope: string, + assessmentName: string, + assignmentKey: string, + options?: GovernanceAssignmentsGetOptionalParams + ): Promise; + /** + * Creates or update a security GovernanceAssignment on the given subscription. + * @param scope Scope of the query, can be subscription + * (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group + * (/providers/Microsoft.Management/managementGroups/mgName). + * @param assessmentName The Assessment Key - Unique key for the assessment type + * @param assignmentKey The security governance assignment key - the assessment key of the required + * governance assignment + * @param governanceAssignment GovernanceAssignment over a subscription scope + * @param options The options parameters. + */ + createOrUpdate( + scope: string, + assessmentName: string, + assignmentKey: string, + governanceAssignment: GovernanceAssignment, + options?: GovernanceAssignmentsCreateOrUpdateOptionalParams + ): Promise; + /** + * Delete a GovernanceAssignment over a given scope + * @param scope Scope of the query, can be subscription + * (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group + * (/providers/Microsoft.Management/managementGroups/mgName). + * @param assessmentName The Assessment Key - Unique key for the assessment type + * @param assignmentKey The security governance assignment key - the assessment key of the required + * governance assignment + * @param options The options parameters. + */ + delete( + scope: string, + assessmentName: string, + assignmentKey: string, + options?: GovernanceAssignmentsDeleteOptionalParams + ): Promise; +} diff --git a/sdk/security/arm-security/src/operationsInterfaces/governanceRuleOperations.ts b/sdk/security/arm-security/src/operationsInterfaces/governanceRuleOperations.ts new file mode 100644 index 000000000000..db471f8f1802 --- /dev/null +++ b/sdk/security/arm-security/src/operationsInterfaces/governanceRuleOperations.ts @@ -0,0 +1,22 @@ +/* + * 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 { GovernanceRule, GovernanceRuleListOptionalParams } from "../models"; + +/// +/** Interface representing a GovernanceRuleOperations. */ +export interface GovernanceRuleOperations { + /** + * Get a list of all relevant governanceRules over a subscription level scope + * @param options The options parameters. + */ + list( + options?: GovernanceRuleListOptionalParams + ): PagedAsyncIterableIterator; +} diff --git a/sdk/security/arm-security/src/operationsInterfaces/governanceRules.ts b/sdk/security/arm-security/src/operationsInterfaces/governanceRules.ts new file mode 100644 index 000000000000..c34e6f9ee9ff --- /dev/null +++ b/sdk/security/arm-security/src/operationsInterfaces/governanceRules.ts @@ -0,0 +1,114 @@ +/* + * 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 { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + GovernanceRulesGetOptionalParams, + GovernanceRulesGetResponse, + GovernanceRule, + GovernanceRulesCreateOrUpdateOptionalParams, + GovernanceRulesCreateOrUpdateResponse, + GovernanceRulesDeleteOptionalParams, + GovernanceRulesRuleIdExecuteSingleSubscriptionOptionalParams, + GovernanceRulesRuleIdExecuteSingleSubscriptionResponse, + GovernanceRulesRuleIdExecuteSingleSecurityConnectorOptionalParams, + GovernanceRulesRuleIdExecuteSingleSecurityConnectorResponse +} from "../models"; + +/** Interface representing a GovernanceRules. */ +export interface GovernanceRules { + /** + * Get a specific governanceRule for the requested scope by ruleId + * @param ruleId The security GovernanceRule key - unique key for the standard GovernanceRule + * @param options The options parameters. + */ + get( + ruleId: string, + options?: GovernanceRulesGetOptionalParams + ): Promise; + /** + * Creates or update a security GovernanceRule on the given subscription. + * @param ruleId The security GovernanceRule key - unique key for the standard GovernanceRule + * @param governanceRule GovernanceRule over a subscription scope + * @param options The options parameters. + */ + createOrUpdate( + ruleId: string, + governanceRule: GovernanceRule, + options?: GovernanceRulesCreateOrUpdateOptionalParams + ): Promise; + /** + * Delete a GovernanceRule over a given scope + * @param ruleId The security GovernanceRule key - unique key for the standard GovernanceRule + * @param options The options parameters. + */ + delete( + ruleId: string, + options?: GovernanceRulesDeleteOptionalParams + ): Promise; + /** + * Execute a security GovernanceRule on the given subscription. + * @param ruleId The security GovernanceRule key - unique key for the standard GovernanceRule + * @param options The options parameters. + */ + beginRuleIdExecuteSingleSubscription( + ruleId: string, + options?: GovernanceRulesRuleIdExecuteSingleSubscriptionOptionalParams + ): Promise< + PollerLike< + PollOperationState< + GovernanceRulesRuleIdExecuteSingleSubscriptionResponse + >, + GovernanceRulesRuleIdExecuteSingleSubscriptionResponse + > + >; + /** + * Execute a security GovernanceRule on the given subscription. + * @param ruleId The security GovernanceRule key - unique key for the standard GovernanceRule + * @param options The options parameters. + */ + beginRuleIdExecuteSingleSubscriptionAndWait( + ruleId: string, + options?: GovernanceRulesRuleIdExecuteSingleSubscriptionOptionalParams + ): Promise; + /** + * Execute a security GovernanceRule on the given security connector. + * @param resourceGroupName The name of the resource group within the user's subscription. The name is + * case insensitive. + * @param securityConnectorName The security connector name. + * @param ruleId The security GovernanceRule key - unique key for the standard GovernanceRule + * @param options The options parameters. + */ + beginRuleIdExecuteSingleSecurityConnector( + resourceGroupName: string, + securityConnectorName: string, + ruleId: string, + options?: GovernanceRulesRuleIdExecuteSingleSecurityConnectorOptionalParams + ): Promise< + PollerLike< + PollOperationState< + GovernanceRulesRuleIdExecuteSingleSecurityConnectorResponse + >, + GovernanceRulesRuleIdExecuteSingleSecurityConnectorResponse + > + >; + /** + * Execute a security GovernanceRule on the given security connector. + * @param resourceGroupName The name of the resource group within the user's subscription. The name is + * case insensitive. + * @param securityConnectorName The security connector name. + * @param ruleId The security GovernanceRule key - unique key for the standard GovernanceRule + * @param options The options parameters. + */ + beginRuleIdExecuteSingleSecurityConnectorAndWait( + resourceGroupName: string, + securityConnectorName: string, + ruleId: string, + options?: GovernanceRulesRuleIdExecuteSingleSecurityConnectorOptionalParams + ): Promise; +} diff --git a/sdk/security/arm-security/src/operationsInterfaces/index.ts b/sdk/security/arm-security/src/operationsInterfaces/index.ts index 31c23d8c1c95..1435bfc9d6ce 100644 --- a/sdk/security/arm-security/src/operationsInterfaces/index.ts +++ b/sdk/security/arm-security/src/operationsInterfaces/index.ts @@ -55,3 +55,14 @@ export * from "./settings"; export * from "./ingestionSettings"; export * from "./softwareInventories"; export * from "./securityConnectors"; +export * from "./governanceRuleOperations"; +export * from "./governanceRules"; +export * from "./securityConnectorGovernanceRule"; +export * from "./securityConnectorGovernanceRules"; +export * from "./subscriptionGovernanceRulesExecuteStatus"; +export * from "./securityConnectorGovernanceRulesExecuteStatus"; +export * from "./governanceAssignments"; +export * from "./applications"; +export * from "./applicationOperations"; +export * from "./securityConnectorApplications"; +export * from "./securityConnectorApplication"; diff --git a/sdk/security/arm-security/src/operationsInterfaces/pricings.ts b/sdk/security/arm-security/src/operationsInterfaces/pricings.ts index 913551099d5a..14dc0160e6ed 100644 --- a/sdk/security/arm-security/src/operationsInterfaces/pricings.ts +++ b/sdk/security/arm-security/src/operationsInterfaces/pricings.ts @@ -19,12 +19,12 @@ import { /** Interface representing a Pricings. */ export interface Pricings { /** - * Lists Security Center pricing configurations in the subscription. + * Lists Microsoft Defender for Cloud pricing configurations in the subscription. * @param options The options parameters. */ list(options?: PricingsListOptionalParams): Promise; /** - * Gets a provided Security Center pricing configuration in the subscription. + * Gets a provided Microsoft Defender for Cloud pricing configuration in the subscription. * @param pricingName name of the pricing configuration * @param options The options parameters. */ @@ -33,7 +33,7 @@ export interface Pricings { options?: PricingsGetOptionalParams ): Promise; /** - * Updates a provided Security Center pricing configuration in the subscription. + * Updates a provided Microsoft Defender for Cloud pricing configuration in the subscription. * @param pricingName name of the pricing configuration * @param pricing Pricing object * @param options The options parameters. diff --git a/sdk/security/arm-security/src/operationsInterfaces/secureScores.ts b/sdk/security/arm-security/src/operationsInterfaces/secureScores.ts index a7a0e56cfed2..316216383ab6 100644 --- a/sdk/security/arm-security/src/operationsInterfaces/secureScores.ts +++ b/sdk/security/arm-security/src/operationsInterfaces/secureScores.ts @@ -18,15 +18,15 @@ import { /** Interface representing a SecureScores. */ export interface SecureScores { /** - * List secure scores for all your Security Center initiatives within your current scope. + * List secure scores for all your Microsoft Defender for Cloud initiatives within your current scope. * @param options The options parameters. */ list( options?: SecureScoresListOptionalParams ): PagedAsyncIterableIterator; /** - * Get secure score for a specific Security Center initiative within your current scope. For the ASC - * Default initiative, use 'ascScore'. + * Get secure score for a specific Microsoft Defender for Cloud initiative within your current scope. + * For the ASC Default initiative, use 'ascScore'. * @param secureScoreName The initiative name. For the ASC Default initiative, use 'ascScore' as in the * sample request below. * @param options The options parameters. diff --git a/sdk/security/arm-security/src/operationsInterfaces/securityConnectorApplication.ts b/sdk/security/arm-security/src/operationsInterfaces/securityConnectorApplication.ts new file mode 100644 index 000000000000..8f690e9d8e8b --- /dev/null +++ b/sdk/security/arm-security/src/operationsInterfaces/securityConnectorApplication.ts @@ -0,0 +1,64 @@ +/* + * 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 { + SecurityConnectorApplicationGetOptionalParams, + SecurityConnectorApplicationGetResponse, + Application, + SecurityConnectorApplicationCreateOrUpdateOptionalParams, + SecurityConnectorApplicationCreateOrUpdateResponse, + SecurityConnectorApplicationDeleteOptionalParams +} from "../models"; + +/** Interface representing a SecurityConnectorApplication. */ +export interface SecurityConnectorApplication { + /** + * Get a specific application for the requested scope by applicationId + * @param resourceGroupName The name of the resource group within the user's subscription. The name is + * case insensitive. + * @param securityConnectorName The security connector name. + * @param applicationId The security Application key - unique key for the standard application + * @param options The options parameters. + */ + get( + resourceGroupName: string, + securityConnectorName: string, + applicationId: string, + options?: SecurityConnectorApplicationGetOptionalParams + ): Promise; + /** + * Creates or update a security Application on the given security connector. + * @param resourceGroupName The name of the resource group within the user's subscription. The name is + * case insensitive. + * @param securityConnectorName The security connector name. + * @param applicationId The security Application key - unique key for the standard application + * @param application Application over a subscription scope + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + securityConnectorName: string, + applicationId: string, + application: Application, + options?: SecurityConnectorApplicationCreateOrUpdateOptionalParams + ): Promise; + /** + * Delete an Application over a given scope + * @param resourceGroupName The name of the resource group within the user's subscription. The name is + * case insensitive. + * @param securityConnectorName The security connector name. + * @param applicationId The security Application key - unique key for the standard application + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + securityConnectorName: string, + applicationId: string, + options?: SecurityConnectorApplicationDeleteOptionalParams + ): Promise; +} diff --git a/sdk/security/arm-security/src/operationsInterfaces/securityConnectorApplications.ts b/sdk/security/arm-security/src/operationsInterfaces/securityConnectorApplications.ts new file mode 100644 index 000000000000..6ae46047cf6c --- /dev/null +++ b/sdk/security/arm-security/src/operationsInterfaces/securityConnectorApplications.ts @@ -0,0 +1,30 @@ +/* + * 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 { + Application, + SecurityConnectorApplicationsListOptionalParams +} from "../models"; + +/// +/** Interface representing a SecurityConnectorApplications. */ +export interface SecurityConnectorApplications { + /** + * Get a list of all relevant applications over a security connector level scope + * @param resourceGroupName The name of the resource group within the user's subscription. The name is + * case insensitive. + * @param securityConnectorName The security connector name. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + securityConnectorName: string, + options?: SecurityConnectorApplicationsListOptionalParams + ): PagedAsyncIterableIterator; +} diff --git a/sdk/security/arm-security/src/operationsInterfaces/securityConnectorGovernanceRule.ts b/sdk/security/arm-security/src/operationsInterfaces/securityConnectorGovernanceRule.ts new file mode 100644 index 000000000000..3915eb144a6f --- /dev/null +++ b/sdk/security/arm-security/src/operationsInterfaces/securityConnectorGovernanceRule.ts @@ -0,0 +1,30 @@ +/* + * 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 { + GovernanceRule, + SecurityConnectorGovernanceRuleListOptionalParams +} from "../models"; + +/// +/** Interface representing a SecurityConnectorGovernanceRule. */ +export interface SecurityConnectorGovernanceRule { + /** + * Get a list of all relevant governanceRules over a security connector level scope + * @param resourceGroupName The name of the resource group within the user's subscription. The name is + * case insensitive. + * @param securityConnectorName The security connector name. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + securityConnectorName: string, + options?: SecurityConnectorGovernanceRuleListOptionalParams + ): PagedAsyncIterableIterator; +} diff --git a/sdk/security/arm-security/src/operationsInterfaces/securityConnectorGovernanceRules.ts b/sdk/security/arm-security/src/operationsInterfaces/securityConnectorGovernanceRules.ts new file mode 100644 index 000000000000..3a13eefc1357 --- /dev/null +++ b/sdk/security/arm-security/src/operationsInterfaces/securityConnectorGovernanceRules.ts @@ -0,0 +1,64 @@ +/* + * 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 { + SecurityConnectorGovernanceRulesGetOptionalParams, + SecurityConnectorGovernanceRulesGetResponse, + GovernanceRule, + SecurityConnectorGovernanceRulesCreateOrUpdateOptionalParams, + SecurityConnectorGovernanceRulesCreateOrUpdateResponse, + SecurityConnectorGovernanceRulesDeleteOptionalParams +} from "../models"; + +/** Interface representing a SecurityConnectorGovernanceRules. */ +export interface SecurityConnectorGovernanceRules { + /** + * Get a specific governanceRule for the requested scope by ruleId + * @param resourceGroupName The name of the resource group within the user's subscription. The name is + * case insensitive. + * @param securityConnectorName The security connector name. + * @param ruleId The security GovernanceRule key - unique key for the standard GovernanceRule + * @param options The options parameters. + */ + get( + resourceGroupName: string, + securityConnectorName: string, + ruleId: string, + options?: SecurityConnectorGovernanceRulesGetOptionalParams + ): Promise; + /** + * Creates or update a security GovernanceRule on the given security connector. + * @param resourceGroupName The name of the resource group within the user's subscription. The name is + * case insensitive. + * @param securityConnectorName The security connector name. + * @param ruleId The security GovernanceRule key - unique key for the standard GovernanceRule + * @param governanceRule GovernanceRule over a subscription scope + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + securityConnectorName: string, + ruleId: string, + governanceRule: GovernanceRule, + options?: SecurityConnectorGovernanceRulesCreateOrUpdateOptionalParams + ): Promise; + /** + * Delete a GovernanceRule over a given scope + * @param resourceGroupName The name of the resource group within the user's subscription. The name is + * case insensitive. + * @param securityConnectorName The security connector name. + * @param ruleId The security GovernanceRule key - unique key for the standard GovernanceRule + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + securityConnectorName: string, + ruleId: string, + options?: SecurityConnectorGovernanceRulesDeleteOptionalParams + ): Promise; +} diff --git a/sdk/security/arm-security/src/operationsInterfaces/securityConnectorGovernanceRulesExecuteStatus.ts b/sdk/security/arm-security/src/operationsInterfaces/securityConnectorGovernanceRulesExecuteStatus.ts new file mode 100644 index 000000000000..8620f1d2b067 --- /dev/null +++ b/sdk/security/arm-security/src/operationsInterfaces/securityConnectorGovernanceRulesExecuteStatus.ts @@ -0,0 +1,58 @@ +/* + * 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 { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + SecurityConnectorGovernanceRulesExecuteStatusGetOptionalParams, + SecurityConnectorGovernanceRulesExecuteStatusGetResponse +} from "../models"; + +/** Interface representing a SecurityConnectorGovernanceRulesExecuteStatus. */ +export interface SecurityConnectorGovernanceRulesExecuteStatus { + /** + * Get a specific governanceRule execution status for the requested scope by ruleId and operationId + * @param resourceGroupName The name of the resource group within the user's subscription. The name is + * case insensitive. + * @param securityConnectorName The security connector name. + * @param ruleId The security GovernanceRule key - unique key for the standard GovernanceRule + * @param operationId The security GovernanceRule execution key - unique key for the execution of + * GovernanceRule + * @param options The options parameters. + */ + beginGet( + resourceGroupName: string, + securityConnectorName: string, + ruleId: string, + operationId: string, + options?: SecurityConnectorGovernanceRulesExecuteStatusGetOptionalParams + ): Promise< + PollerLike< + PollOperationState< + SecurityConnectorGovernanceRulesExecuteStatusGetResponse + >, + SecurityConnectorGovernanceRulesExecuteStatusGetResponse + > + >; + /** + * Get a specific governanceRule execution status for the requested scope by ruleId and operationId + * @param resourceGroupName The name of the resource group within the user's subscription. The name is + * case insensitive. + * @param securityConnectorName The security connector name. + * @param ruleId The security GovernanceRule key - unique key for the standard GovernanceRule + * @param operationId The security GovernanceRule execution key - unique key for the execution of + * GovernanceRule + * @param options The options parameters. + */ + beginGetAndWait( + resourceGroupName: string, + securityConnectorName: string, + ruleId: string, + operationId: string, + options?: SecurityConnectorGovernanceRulesExecuteStatusGetOptionalParams + ): Promise; +} diff --git a/sdk/security/arm-security/src/operationsInterfaces/settings.ts b/sdk/security/arm-security/src/operationsInterfaces/settings.ts index 28c3ca38bfce..2d2a5bbb1773 100644 --- a/sdk/security/arm-security/src/operationsInterfaces/settings.ts +++ b/sdk/security/arm-security/src/operationsInterfaces/settings.ts @@ -21,14 +21,14 @@ import { /** Interface representing a Settings. */ export interface Settings { /** - * Settings about different configurations in security center + * Settings about different configurations in Microsoft Defender for Cloud * @param options The options parameters. */ list( options?: SettingsListOptionalParams ): PagedAsyncIterableIterator; /** - * Settings of different configurations in security center + * Settings of different configurations in Microsoft Defender for Cloud * @param settingName The name of the setting * @param options The options parameters. */ @@ -37,7 +37,7 @@ export interface Settings { options?: SettingsGetOptionalParams ): Promise; /** - * updating settings about different configurations in security center + * updating settings about different configurations in Microsoft Defender for Cloud * @param settingName The name of the setting * @param setting Setting object * @param options The options parameters. diff --git a/sdk/security/arm-security/src/operationsInterfaces/subscriptionGovernanceRulesExecuteStatus.ts b/sdk/security/arm-security/src/operationsInterfaces/subscriptionGovernanceRulesExecuteStatus.ts new file mode 100644 index 000000000000..9dda1f5c5373 --- /dev/null +++ b/sdk/security/arm-security/src/operationsInterfaces/subscriptionGovernanceRulesExecuteStatus.ts @@ -0,0 +1,46 @@ +/* + * 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 { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + SubscriptionGovernanceRulesExecuteStatusGetOptionalParams, + SubscriptionGovernanceRulesExecuteStatusGetResponse +} from "../models"; + +/** Interface representing a SubscriptionGovernanceRulesExecuteStatus. */ +export interface SubscriptionGovernanceRulesExecuteStatus { + /** + * Get a specific governanceRule execution status for the requested scope by ruleId and operationId + * @param ruleId The security GovernanceRule key - unique key for the standard GovernanceRule + * @param operationId The security GovernanceRule execution key - unique key for the execution of + * GovernanceRule + * @param options The options parameters. + */ + beginGet( + ruleId: string, + operationId: string, + options?: SubscriptionGovernanceRulesExecuteStatusGetOptionalParams + ): Promise< + PollerLike< + PollOperationState, + SubscriptionGovernanceRulesExecuteStatusGetResponse + > + >; + /** + * Get a specific governanceRule execution status for the requested scope by ruleId and operationId + * @param ruleId The security GovernanceRule key - unique key for the standard GovernanceRule + * @param operationId The security GovernanceRule execution key - unique key for the execution of + * GovernanceRule + * @param options The options parameters. + */ + beginGetAndWait( + ruleId: string, + operationId: string, + options?: SubscriptionGovernanceRulesExecuteStatusGetOptionalParams + ): Promise; +} diff --git a/sdk/security/arm-security/src/securityCenter.ts b/sdk/security/arm-security/src/securityCenter.ts index 3967c4a6e986..d27d097e5e31 100644 --- a/sdk/security/arm-security/src/securityCenter.ts +++ b/sdk/security/arm-security/src/securityCenter.ts @@ -7,6 +7,7 @@ */ import * as coreClient from "@azure/core-client"; +import * as coreRestPipeline from "@azure/core-rest-pipeline"; import * as coreAuth from "@azure/core-auth"; import { MdeOnboardingsImpl, @@ -57,7 +58,18 @@ import { SettingsImpl, IngestionSettingsImpl, SoftwareInventoriesImpl, - SecurityConnectorsImpl + SecurityConnectorsImpl, + GovernanceRuleOperationsImpl, + GovernanceRulesImpl, + SecurityConnectorGovernanceRuleImpl, + SecurityConnectorGovernanceRulesImpl, + SubscriptionGovernanceRulesExecuteStatusImpl, + SecurityConnectorGovernanceRulesExecuteStatusImpl, + GovernanceAssignmentsImpl, + ApplicationsImpl, + ApplicationOperationsImpl, + SecurityConnectorApplicationsImpl, + SecurityConnectorApplicationImpl } from "./operations"; import { MdeOnboardings, @@ -108,7 +120,18 @@ import { Settings, IngestionSettings, SoftwareInventories, - SecurityConnectors + SecurityConnectors, + GovernanceRuleOperations, + GovernanceRules, + SecurityConnectorGovernanceRule, + SecurityConnectorGovernanceRules, + SubscriptionGovernanceRulesExecuteStatus, + SecurityConnectorGovernanceRulesExecuteStatus, + GovernanceAssignments, + Applications, + ApplicationOperations, + SecurityConnectorApplications, + SecurityConnectorApplication } from "./operationsInterfaces"; import { SecurityCenterOptionalParams } from "./models"; @@ -143,7 +166,7 @@ export class SecurityCenter extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-security/5.0.1`; + const packageDetails = `azsdk-js-arm-security/6.0.0-beta.1`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -162,6 +185,29 @@ export class SecurityCenter extends coreClient.ServiceClient { options.endpoint ?? options.baseUri ?? "https://management.azure.com" }; super(optionsWithDefaults); + + if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) { + const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies(); + const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some( + (pipelinePolicy) => + pipelinePolicy.name === + coreRestPipeline.bearerTokenAuthenticationPolicyName + ); + if (!bearerTokenAuthenticationPolicyFound) { + this.pipeline.removePolicy({ + name: coreRestPipeline.bearerTokenAuthenticationPolicyName + }); + this.pipeline.addPolicy( + coreRestPipeline.bearerTokenAuthenticationPolicy({ + scopes: `${optionsWithDefaults.baseUri}/.default`, + challengeCallbacks: { + authorizeRequestOnChallenge: + coreClient.authorizeRequestOnClaimChallenge + } + }) + ); + } + } // Parameter assignments this.subscriptionId = subscriptionId; @@ -250,6 +296,29 @@ export class SecurityCenter extends coreClient.ServiceClient { this.ingestionSettings = new IngestionSettingsImpl(this); this.softwareInventories = new SoftwareInventoriesImpl(this); this.securityConnectors = new SecurityConnectorsImpl(this); + this.governanceRuleOperations = new GovernanceRuleOperationsImpl(this); + this.governanceRules = new GovernanceRulesImpl(this); + this.securityConnectorGovernanceRule = new SecurityConnectorGovernanceRuleImpl( + this + ); + this.securityConnectorGovernanceRules = new SecurityConnectorGovernanceRulesImpl( + this + ); + this.subscriptionGovernanceRulesExecuteStatus = new SubscriptionGovernanceRulesExecuteStatusImpl( + this + ); + this.securityConnectorGovernanceRulesExecuteStatus = new SecurityConnectorGovernanceRulesExecuteStatusImpl( + this + ); + this.governanceAssignments = new GovernanceAssignmentsImpl(this); + this.applications = new ApplicationsImpl(this); + this.applicationOperations = new ApplicationOperationsImpl(this); + this.securityConnectorApplications = new SecurityConnectorApplicationsImpl( + this + ); + this.securityConnectorApplication = new SecurityConnectorApplicationImpl( + this + ); } mdeOnboardings: MdeOnboardings; @@ -301,4 +370,15 @@ export class SecurityCenter extends coreClient.ServiceClient { ingestionSettings: IngestionSettings; softwareInventories: SoftwareInventories; securityConnectors: SecurityConnectors; + governanceRuleOperations: GovernanceRuleOperations; + governanceRules: GovernanceRules; + securityConnectorGovernanceRule: SecurityConnectorGovernanceRule; + securityConnectorGovernanceRules: SecurityConnectorGovernanceRules; + subscriptionGovernanceRulesExecuteStatus: SubscriptionGovernanceRulesExecuteStatus; + securityConnectorGovernanceRulesExecuteStatus: SecurityConnectorGovernanceRulesExecuteStatus; + governanceAssignments: GovernanceAssignments; + applications: Applications; + applicationOperations: ApplicationOperations; + securityConnectorApplications: SecurityConnectorApplications; + securityConnectorApplication: SecurityConnectorApplication; } diff --git a/sdk/security/arm-security/test/sampleTest.ts b/sdk/security/arm-security/test/sampleTest.ts index 7ed89b043e1b..25aeb3ebcc36 100644 --- a/sdk/security/arm-security/test/sampleTest.ts +++ b/sdk/security/arm-security/test/sampleTest.ts @@ -7,35 +7,30 @@ */ import { - env, - record, - RecorderEnvironmentSetup, - Recorder + Recorder, + RecorderStartOptions, + env } from "@azure-tools/test-recorder"; -import * as assert from "assert"; +import { assert } from "chai"; +import { Context } from "mocha"; -const recorderEnvSetup: RecorderEnvironmentSetup = { - replaceableVariables: { - 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" - }, - customizationsOnRecordings: [ - (recording: any): any => - recording.replace( - /"access_token":"[^"]*"/g, - `"access_token":"access_token"` - ) - ], - queryParametersToSkip: [] +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() { - recorder = record(this, recorderEnvSetup); + beforeEach(async function(this: Context) { + recorder = new Recorder(this.currentTest); + await recorder.start(recorderOptions); }); afterEach(async function() { 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"